diff --git a/default.nix b/default.nix index abbad27..b5970cc 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,5 @@ top@{ inputs, ... }: { - imports = [ ./nixos ./home ./packages ./overlays ]; + imports = [ ./nixos ./home ./packages ./overlays ./hardware-configurations ]; systems = [ "x86_64-linux" ]; flake.stateVersion = "24.05"; perSystem = perSystem@{ system, ... }: { diff --git a/hardware-configurations/default.nix b/hardware-configurations/default.nix new file mode 100644 index 0000000..09ceac4 --- /dev/null +++ b/hardware-configurations/default.nix @@ -0,0 +1,24 @@ +top@{ ... }: { + flake.hardwareConfigurations = { + nova = { lib, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + kernelModules = [ ]; + luks.devices."nixos".device = "/dev/disk/by-uuid/712dd8ba-d5b4-438a-9a77-663b8c935cfe"; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + fileSystems = { + "/" = { device = "/dev/disk/by-uuid/47536cbe-7265-493b-a2e3-bbd376a6f9af"; fsType = "btrfs"; }; + "/boot" = { device = "/dev/disk/by-uuid/4C3C-993A"; fsType = "vfat"; }; + }; + swapDevices = [ ]; + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkForce false; + }; + }; +} diff --git a/nixos/configs/default.nix b/nixos/configs/default.nix index 83640a5..5ed4819 100644 --- a/nixos/configs/default.nix +++ b/nixos/configs/default.nix @@ -2,28 +2,7 @@ toplevel@{ inputs, withSystem, ... }: let system = "x86_64-linux"; mods = toplevel.config.flake.nixosModules; - hardwareConfigurations = { - nova = { lib, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot = { - initrd = { - availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; - kernelModules = [ ]; - luks.devices."nixos".device = "/dev/disk/by-uuid/712dd8ba-d5b4-438a-9a77-663b8c935cfe"; - }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - }; - fileSystems = { - "/" = { device = "/dev/disk/by-uuid/47536cbe-7265-493b-a2e3-bbd376a6f9af"; fsType = "btrfs"; }; - "/boot" = { device = "/dev/disk/by-uuid/4C3C-993A"; fsType = "vfat"; }; - }; - swapDevices = [ ]; - networking.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkForce false; - }; - }; + hardwareConfigurations = toplevel.config.flake.hardwareConfigurations; essential = with mods; [ grub base security wireless wireguard ]; desktop = with mods; [ sound wayland ]; configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {