diff --git a/nodes/hosts/common/configuration.nix b/nodes/hosts/common/configuration.nix index a53f4c4..82a516f 100644 --- a/nodes/hosts/common/configuration.nix +++ b/nodes/hosts/common/configuration.nix @@ -24,6 +24,7 @@ ./system/bluetooth.nix ./system/environment.nix ./system/locale.nix + ./system/networking.nix ./system/nixos.nix ./system/security.nix ./system/time.nix diff --git a/nodes/hosts/common/system/networking.nix b/nodes/hosts/common/system/networking.nix new file mode 100644 index 0000000..5764a64 --- /dev/null +++ b/nodes/hosts/common/system/networking.nix @@ -0,0 +1,5 @@ +{ config, ...}: { + networking.networkmanager.enable = true; + networking.useDHCP = lib.mkDefault true; +} + diff --git a/nodes/hosts/lappy/configuration.nix b/nodes/hosts/lappy/configuration.nix index 25fe700..00e2e93 100644 --- a/nodes/hosts/lappy/configuration.nix +++ b/nodes/hosts/lappy/configuration.nix @@ -10,19 +10,11 @@ ./hardware-configuration.nix ./programs/sof-firmware.nix ./services/touchpad.nix + ./system/bootloader.nix ./system/filesystems.nix ./system/networking.nix ]; - # Use the systemd-boot EFI boot loader. - nixpkgs.hostPlatform = "x86_64-linux"; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Use latest kernel. - boot.kernelPackages = pkgs.linuxPackages_latest; - system.stateVersion = "25.05"; # Did you read the comment? - } diff --git a/nodes/hosts/lappy/hardware-configuration.nix b/nodes/hosts/lappy/hardware-configuration.nix index 2f1bd62..a280ae3 100644 --- a/nodes/hosts/lappy/hardware-configuration.nix +++ b/nodes/hosts/lappy/hardware-configuration.nix @@ -8,19 +8,6 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # 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.enp0s20f0u1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nodes/hosts/lappy/system/bootloader.nix b/nodes/hosts/lappy/system/bootloader.nix new file mode 100644 index 0000000..dd223cb --- /dev/null +++ b/nodes/hosts/lappy/system/bootloader.nix @@ -0,0 +1,47 @@ +{ pkgs, config, ... }: { + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + kernelPackages = pkgs.linuxPackages_xanmod_stable; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = with config.boot.kernelPackages; [ xone ]; + + initrd = { + + # OLD CONFIG + # NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS + # nvme0n1 + # └─nvme0n1p1 crypto_LUKS 2 e174181f-828c-44fd-97c1-0e2fdc2322e5 + # └─luks-e174181f-828c-44fd-97c1-0e2fdc2322e5 btrfs home f8ed950a-5cc9-4b87-901c-4cfece6daf6c 3.3T 9% /home + # luks.devices."luks-e174181f-828c-44fd-97c1-0e2fdc2322e5".device = "/dev/disk/by-uuid/e174181f-828c-44fd-97c1-0e2fdc2322e5"; + # nvme1n1 + # ├─nvme1n1p1 vfat FAT32 D19B-1967 4.3G 3% /boot + # ├─nvme1n1p2 crypto_LUKS 2 300fdb2a-d887-4e53-bc97-9fdc123856ce + # │ └─luks-300fdb2a-d887-4e53-bc97-9fdc123856ce swap 1 swap 66b9e1f6-1fc5-4c32-afc7-724880504495 [SWAP] + # luks.devices."luks-300fdb2a-d887-4e53-bc97-9fdc123856ce".device = "/dev/disk/by-uuid/300fdb2a-d887-4e53-bc97-9fdc123856ce"; + # └─nvme1n1p3 crypto_LUKS 2 e69c5d63-f5a7-4cb1-a858-4e6396d8def7 + # └─luks-e69c5d63-f5a7-4cb1-a858-4e6396d8def7 btrfs root f53b22d4-df74-4ee0-9f85-3fb0eb087150 /nix/store + # luks.devices."luks-e69c5d63-f5a7-4cb1-a858-4e6396d8def7".device = "/dev/disk/by-uuid/e69c5d63-f5a7-4cb1-a858-4e6396d8def7"; + + # NEW CONFIG + # nvme0n1 + # └─nvme0n1p1 crypto_LUKS 2 1976c849-c317-46c0-af98-d2dfc455c489 + # └─crypthome btrfs home c63ca365-e963-4ea4-bb71-ed1c7e1b6bc8 /mnt/home + # luks.devices."crypthome".device = "/dev/disk/by-uuid/1976c849-c317-46c0-af98-d2dfc455c489"; + # nvme1n1 + # ├─nvme1n1p1 vfat FAT32 CDA0-8838 4.4G 0% /mnt/boot + # └─nvme1n1p2 crypto_LUKS 2 e948662c-ae57-46aa-b7bf-cc09dbaa8cdb + # └─cryptroot btrfs nixos 77021dd1-9fa5-4e9f-9be2-ba943e6de77c 925.1G 0% /mnt/var/log + # /mnt/persist + # /mnt/nix + # /mnt + #luks.devices."cryptroot".device = "/dev/disk/by-uuid/e68d4928-961d-4c80-9d3c-921514ebc63c"; + kernelModules = [ ]; + + availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; + }; + }; +} + diff --git a/nodes/hosts/lappy/system/networking.nix b/nodes/hosts/lappy/system/networking.nix index f5558d9..b54b4c3 100644 --- a/nodes/hosts/lappy/system/networking.nix +++ b/nodes/hosts/lappy/system/networking.nix @@ -1,6 +1,4 @@ { config, ...}: { networking.hostName = "lappy"; # Define your hostname. - - networking.networkmanager.enable = true; }