diff --git a/.gitignore b/.gitignore index cb8c1ca..0101081 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ *.swp .codex -hardware-configuration.nix diff --git a/flake.nix b/flake.nix index e29c919..5995ae9 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,8 @@ system = "x86_64-linux"; modules = [ ./configuration.nix - ./hostname/laptop-nixos-1.nix + ./hosts/laptop-nixos-1/hostname.nix + ./hosts/laptop-nixos-1/hardware-configuration.nix ]; }; }; diff --git a/hosts/laptop-nixos-1/hardware-configuration.nix b/hosts/laptop-nixos-1/hardware-configuration.nix new file mode 100644 index 0000000..08703e9 --- /dev/null +++ b/hosts/laptop-nixos-1/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/mapper/cryptroot"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/bec0b67c-636f-41ba-b626-0c705ee10f57"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/30B9-37E9"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hostname/laptop-nixos-1.nix b/hosts/laptop-nixos-1/hostname.nix similarity index 100% rename from hostname/laptop-nixos-1.nix rename to hosts/laptop-nixos-1/hostname.nix