bootstrapped enigma

This commit is contained in:
Julien Malka 2023-09-17 23:29:19 +02:00
parent be30f5759f
commit dac74da222
Signed by: Luj
GPG key ID: 6FC74C847011FD83
5 changed files with 242 additions and 0 deletions

View file

@ -47,6 +47,11 @@ inputs: lib: with lib; let
nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
};
enigma = {
arch = "aarch64-linux";
nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
};
lambda = {
inherit tld;
arch = "aarch64-linux";

102
machines/enigma/default.nix Normal file
View file

@ -0,0 +1,102 @@
{ config, pkgs, lib, inputs, ... }:
{
imports =
[
./hardware.nix
./home-julien.nix
../../users/julien.nix
../../users/default.nix
];
networking.hostName = "enigma";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.tailscale.enable = true;
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.dns = "systemd-resolved";
services.resolved.enable = true;
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
# driSupport32Bit = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Do not disable this unless your GPU is unsupported or if you have a good reason to.
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
boot.initrd.kernelModules = [ "nvidia" ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
time.timeZone = "Europe/Paris";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
programs.dconf.enable = true;
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
tailscale
brightnessctl
sbctl
];
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns = true;
# for a WiFi printer
services.avahi.openFirewall = true;
system.stateVersion = "23.05";
}

View file

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/7ae035c9-89b2-46d4-8bf7-5630388f73e9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/FC3A-33B4";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fad463ac-98c9-43c4-a153-7a3bf89c97dc"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enP5p1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View file

@ -0,0 +1,96 @@
{ pkgs, lib, config, inputs, ... }:
{
luj.hmgr.julien =
{
home.stateVersion = "23.05";
luj.programs.neovim.enable = true;
luj.programs.ssh-client.enable = true;
luj.programs.git.enable = true;
luj.programs.gtk.enable = true;
luj.programs.kitty.enable = true;
luj.emails.enable = true;
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = "Fira Font";
theme = "DarkBlue";
};
programs.direnv = {
enable = true;
enableFishIntegration = true;
nix-direnv.enable = true;
};
dconf.settings = {
"org/gnome/desktop/input-sources" = {
sources = [ (inputs.home-manager.lib.hm.gvariant.mkTuple [ "xkb" "fr" ]) ];
xkb-options = [ ];
};
};
home.packages = with pkgs;
[
du-dust
kitty
jq
lazygit
fira-code
feh
meld
vlc
stable.nerdfonts
libreoffice
font-awesome
nodejs
neomutt
htop
evince
mosh
obsidian
zotero
flameshot
kitty
networkmanagerapplet
element-desktop
xdg-utils
sops
step-cli
scli
texlive.combined.scheme-full
];
fonts.fontconfig.enable = true;
home.keyboard = {
layout = "fr";
};
services.dunst = {
enable = true;
};
programs.chromium = {
enable = true;
commandLineArgs = [
"--ozone-platform-hint=wayland"
"--load-media-router-component-extension=1"
];
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin
{ id = "ldlghkoiihaelfnggonhjnfiabmaficg"; } # Alt+Q switcher
{ id = "enjjhajnmggdgofagbokhmifgnaophmh"; } # Resolution Zoom for HiDPI
{ id = "fihnjjcciajhdojfnbdddfaoknhalnja"; } # I don't care about cookies
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero Connector
{ id = "hlepfoohegkhhmjieoechaddaejaokhf"; } # Refined GitHub
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "dcpihecpambacapedldabdbpakmachpb"; updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/src/updates/updates.xml"; }
];
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 KiB