diff --git a/machines/persephone.nix b/machines/persephone.nix index cc93ec3..fd6977a 100644 --- a/machines/persephone.nix +++ b/machines/persephone.nix @@ -20,15 +20,6 @@ in ../profiles/desktop.linux.nix ]; - nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "1password" - "1password-cli" - "nvidia-x11" - "nvidia-settings" - ]; - # FILE SYSTEM fileSystems."/boot" = { @@ -103,51 +94,30 @@ in swapDevices = [ ]; - environment.systemPackages = with pkgs; [ - adwaita-icon-theme - mesa-demos + boot = { + extraModulePackages = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelPackages = pkgs.linuxPackages_6_17; + kernelParams = [ "i915.enable_guc=3" ]; + }; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "ahci" + "usbhid" + "sd_mod" ]; - # BOOTLOADER - boot.bootspec.enable = true; - - boot.initrd = { - availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "nvme" - "ahci" - "usbhid" - "sd_mod" - ]; - kernelModules = [ ]; - systemd.enable = true; + console = { + keyMap = "us"; + font = "${pkgs.terminus_font}/share/consolefonts/ter-v28b.psf.gz"; }; + + i18n.defaultLocale = "en_US.UTF-8"; - boot.extraModulePackages = [ ]; - - boot.kernelModules = [ "kvm-intel" ]; - - boot.lanzaboote = { - enable = true; - pkiBundle = "/var/lib/sbctl"; - }; - - boot.loader.efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "efi"; - }; - - boot.loader.systemd-boot = { - enable = lib.mkForce false; - xbootldrMountPoint = "/boot"; - }; - - # CPU hardware.enableRedistributableFirmware = true; - - # GPU - boot.kernelParams = [ "i915.enable_guc=3" ]; + hardware.bluetooth.enable = true; hardware.graphics = { enable = true; @@ -168,36 +138,6 @@ in nvidiaBusId = "PCI:2:0:0"; }; - services.xserver.videoDrivers = [ - "modesetting" - "nvidia" - ]; - - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; - VDPAU_DRIVER = "va_gl"; - }; - - services.pipewire.enable = true; - hardware.bluetooth.enable = true; - - # MISC - boot.kernelPackages = pkgs.linuxPackages_6_17; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - time.timeZone = "Europe/Paris"; - console = { - keyMap = "us"; - font = "${pkgs.terminus_font}/share/consolefonts/ter-v28b.psf.gz"; - }; - i18n.defaultLocale = "en_US.UTF-8"; - - nix.settings = { - substituters = [ "https://cache.nixos-cuda.org" ]; - trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ]; - }; - fonts.packages = with pkgs; [ apple-fonts.sf-pro noto-fonts-cjk-sans @@ -243,8 +183,36 @@ in }) ]; + environment.sessionVariables = { + LIBVA_DRIVER_NAME = "iHD"; + VDPAU_DRIVER = "va_gl"; + }; + + nix.settings = { + substituters = [ "https://cache.nixos-cuda.org" ]; + trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ]; + }; + + nixpkgs.config.allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "1password" + "1password-cli" + "nvidia-x11" + "nvidia-settings" + ]; + programs._1password.enable = true; + services.pipewire.enable = true; + + services.xserver.videoDrivers = [ + "modesetting" + "nvidia" + ]; + + time.timeZone = "Europe/Paris"; + users.users.pml = { isNormalUser = true; shell = pkgs.zsh; diff --git a/profiles/desktop.linux.nix b/profiles/desktop.linux.nix index 7ee3c7f..50cabd3 100644 --- a/profiles/desktop.linux.nix +++ b/profiles/desktop.linux.nix @@ -12,6 +12,7 @@ let }; systemPackages = with pkgs; [ + adwaita-icon-theme ddcutil gsettings-desktop-schemas libva-utils diff --git a/profiles/minimal.linux.nix b/profiles/minimal.linux.nix index 126e7c7..44721b6 100644 --- a/profiles/minimal.linux.nix +++ b/profiles/minimal.linux.nix @@ -3,5 +3,28 @@ { imports = [ ./minimal.nix ]; + boot.bootspec.enable = true; + boot.initrd = { + kernelModules = [ ]; + systemd.enable = true; + }; + + boot.lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; + + boot.loader.efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "efi"; + }; + + boot.loader.systemd-boot = { + enable = lib.mkForce false; + xbootldrMountPoint = "/boot"; + }; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }