diff --git a/hosts/firefly/system/boot/default.nix b/hosts/firefly/system/boot/default.nix new file mode 100644 index 0000000..86a44dc --- /dev/null +++ b/hosts/firefly/system/boot/default.nix @@ -0,0 +1,50 @@ +{ pkgs, ... }: +let + commonKernelParams = [ + # Nvidia settings + "nvidia_drm.fbdev=1" + "nouveau.config=NvGspRm=1" + + # VM/GPU passthrough + "amd_iommu=on" + "iommu=pt" + "nested=1" + + # Virtualization nonsense + "transparent_hugepage=never" + + # Isolate devices into IOMMU groups + "pcie_acs_override=downstream,multifunction" + "pci=routeirq" + ]; +in { + boot = { + kernelPackages = pkgs.unstable.linuxPackages_zen; + blacklistedKernelModules = [ + "pcspkr" + ]; + kernel.sysctl."vm.max_map_count" = 2147483642; + kernelParams = commonKernelParams ++ [ + "vfio-pci.ids=10de:1f82,10de:10fa" + ]; + + # Encryption and TPM + initrd = { + systemd.enable = true; + luks.devices = { + "crypt-ssd" = { + device = "/dev/disk/by-uuid/52110c74-19b6-40ef-9710-e6c9b157005f"; + preLVM = true; + allowDiscards = true; + }; + }; + }; + }; + + # Additional entry to boot from the second GPU + specialisation = { + gputwo.configuration = { + boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ]; + }; + }; +} diff --git a/hosts/firefly/system/default.nix b/hosts/firefly/system/default.nix index 652005e..2d5c458 100644 --- a/hosts/firefly/system/default.nix +++ b/hosts/firefly/system/default.nix @@ -2,6 +2,7 @@ { imports = [ ./hardware + ./boot # Apps and programs ../../../modules/system diff --git a/hosts/firefly/system/hardware/default.nix b/hosts/firefly/system/hardware/default.nix index 2790d82..2edf666 100644 --- a/hosts/firefly/system/hardware/default.nix +++ b/hosts/firefly/system/hardware/default.nix @@ -1,70 +1,26 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - # Set common boot paramaters - commonKernelParams = [ - # Nvidia settings - "nvidia_drm.fbdev=1" - "nouveau.config=NvGspRm=1" - - # VM/GPU passthrough - "amd_iommu=on" - "iommu=pt" - "nested=1" - - # Virtualization nonsense - "transparent_hugepage=never" - - # Isolate devices into IOMMU groups - "pcie_acs_override=downstream,multifunction" - "pci=routeirq" - ]; -in { +{ config, lib, modulesPath, ... }: +{ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { - kernelPackages = pkgs.unstable.linuxPackages_zen; - blacklistedKernelModules = [ - "pcspkr" - ]; - kernel.sysctl."vm.max_map_count" = 2147483642; - kernelParams = commonKernelParams ++ [ - "vfio-pci.ids=10de:1f82,10de:10fa" - ]; initrd = { availableKernelModules = [ "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" ]; kernelModules = [ - "dm-snapshot" + "dm-snapshot" "vfio" - "vfio_pci" - "vfio_iommu_type1" - "kvm-amd" + "vfio_pci" + "vfio_iommu_type1" + "kvm-amd" ]; - - # Encryption and TPM - systemd.enable = true; - luks.devices = { - "crypt-ssd" = { - device = "/dev/disk/by-uuid/52110c74-19b6-40ef-9710-e6c9b157005f"; - preLVM = true; - allowDiscards = true; - }; - }; - }; - }; - - # Additional entry to boot from the second GPU - specialisation = { - gputwo.configuration = { - boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ]; }; }; diff --git a/hosts/lacros/home/default.nix b/hosts/lacros/home/default.nix index 75cd42e..b51a8c8 100644 --- a/hosts/lacros/home/default.nix +++ b/hosts/lacros/home/default.nix @@ -14,7 +14,7 @@ # Misc ../../../overlays ../../../variables - ../../../variables/look/colors/purple + ../../../variables/look/colors/orange # Imports nur.nixosModules.nur diff --git a/hosts/lacros/system/hardware/default.nix b/hosts/lacros/system/hardware/default.nix index 8b8c889..3e40098 100644 --- a/hosts/lacros/system/hardware/default.nix +++ b/hosts/lacros/system/hardware/default.nix @@ -1,66 +1,56 @@ -# 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, ... }: +{ config, lib, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "sdhci_pci" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "sdhci_pci" ]; + kernelModules = [ "dm-snapshot" ]; + }; + kernelModules = [ "kvm-intel" ]; + }; - fileSystems."/" = - { device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; fsType = "btrfs"; options = [ "subvol=@" ]; }; - - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + "/nix" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; fsType = "btrfs"; options = [ "subvol=@nix" ]; }; - - fileSystems."/var" = - { device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + "/var" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; fsType = "btrfs"; options = [ "subvol=@var" ]; }; - - fileSystems."/.snapshots" = - { device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + "/.snapshots" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; fsType = "btrfs"; options = [ "subvol=@snapshots" ]; }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + "/home" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; fsType = "btrfs"; options = [ "subvol=@home" ]; }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1C76-1006"; + "/boot" = { + device = "/dev/disk/by-uuid/1C76-1006"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/54a9cc22-4a2c-4e04-a968-313c34481489"; } - ]; + swapDevices = [ + { device = "/dev/disk/by-uuid/54a9cc22-4a2c-4e04-a968-313c34481489"; } + ]; - # 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..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.wg0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/home/default.nix b/modules/home/default.nix index 9216df2..1feed84 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,7 +1,6 @@ { ... }: { + programs.home-manager.enable = true; nixpkgs.config.allowUnfree = true; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "24.05"; } diff --git a/modules/home/files/assets/wallpapers/hillorange/1.png b/modules/home/files/assets/wallpapers/hillorange/1.png new file mode 100644 index 0000000..0ed3607 Binary files /dev/null and b/modules/home/files/assets/wallpapers/hillorange/1.png differ diff --git a/modules/home/files/assets/wallpapers/hillorange/2.png b/modules/home/files/assets/wallpapers/hillorange/2.png new file mode 100644 index 0000000..5dfc477 Binary files /dev/null and b/modules/home/files/assets/wallpapers/hillorange/2.png differ diff --git a/modules/home/files/assets/wallpapers/hillorange/3.png b/modules/home/files/assets/wallpapers/hillorange/3.png new file mode 100644 index 0000000..85dbbea Binary files /dev/null and b/modules/home/files/assets/wallpapers/hillorange/3.png differ diff --git a/modules/home/programs/misc/headless/default.nix b/modules/home/programs/misc/headless/default.nix index d27ecc8..9bc4853 100644 --- a/modules/home/programs/misc/headless/default.nix +++ b/modules/home/programs/misc/headless/default.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { home.packages = with pkgs; [ - home-manager gotop tcptrack p7zip diff --git a/modules/system/accounts/users/jimbo/default.nix b/modules/system/accounts/users/jimbo/default.nix index c1f5ae9..e468f9d 100644 --- a/modules/system/accounts/users/jimbo/default.nix +++ b/modules/system/accounts/users/jimbo/default.nix @@ -6,9 +6,10 @@ hashedPassword = config.secrets.jimboAccPass; isNormalUser = true; openssh.authorizedKeys.keys = [ - (builtins.readFile ../../../../../hosts/firefly/id_ed25519.pub) - (builtins.readFile ../../../../../hosts/cyberspark/id_ed25519.pub) - (builtins.readFile ../../../../../hosts/shuttleworth/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/firefly/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/cyberspark/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/shuttleworth/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/lacros/id_ed25519.pub) "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 pixel9" ]; diff --git a/modules/system/default.nix b/modules/system/default.nix index 124fe0a..8820ac9 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -33,6 +33,5 @@ hardware.enableRedistributableFirmware = true; - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion system.stateVersion = "24.05"; } diff --git a/modules/system/devices/boot/lanzaboote/default.nix b/modules/system/devices/boot/lanzaboote/default.nix index 9ba80ba..dbe8e40 100644 --- a/modules/system/devices/boot/lanzaboote/default.nix +++ b/modules/system/devices/boot/lanzaboote/default.nix @@ -1,4 +1,4 @@ -{ lanzaboote, ... }: +{ lanzaboote, pkgs, ... }: { imports = [ lanzaboote.nixosModules.lanzaboote @@ -8,4 +8,8 @@ enable = true; pkiBundle = "/etc/secureboot"; }; + + environment.systemPackages = with pkgs; [ + sbctl + ]; } diff --git a/modules/system/devices/boot/systemd/default.nix b/modules/system/devices/boot/systemd/default.nix index 825910e..a2c9a5d 100644 --- a/modules/system/devices/boot/systemd/default.nix +++ b/modules/system/devices/boot/systemd/default.nix @@ -3,6 +3,5 @@ boot.loader.systemd-boot = { enable = true; editor = false; - netbootxyz.enable = true; }; } diff --git a/variables/look/colors/orange/default.nix b/variables/look/colors/orange/default.nix new file mode 100644 index 0000000..1d4785f --- /dev/null +++ b/variables/look/colors/orange/default.nix @@ -0,0 +1,22 @@ +{ lib, config, ... }: +{ + options.look.colors = lib.mkOption { + type = lib.types.attrs; + default = {}; + }; + + config.look.colors = { + prime = "f4a61f"; #f4a61f + accent = "684820"; #684820 + split = "9e8955"; #9e8955 + actSplit = "c9ae68"; #c9ae68 + dark = "101419"; #101419 + mid = "191810"; #191810 + light = "332e26"; #332e26 + urgent = "C43823"; #C43823 + text = "C7D3E3"; #C7D3E3 + + folder = "orange"; + wallpapers = "hillorange"; + }; +} diff --git a/variables/look/colors/red/default.nix b/variables/look/colors/red/default.nix index 5da2db1..fd647c3 100644 --- a/variables/look/colors/red/default.nix +++ b/variables/look/colors/red/default.nix @@ -12,7 +12,7 @@ actSplit = "754566"; #754566 dark = "191016"; #191016 mid = "23171d"; #23171d - light = "272b33"; #272B33 + light = "332926"; #332926 urgent = "C43823"; #C43823 text = "C7D3E3"; #C7D3E3