diff options
Diffstat (limited to 'hosts/akashi/hardware-configuration.nix')
| -rw-r--r-- | hosts/akashi/hardware-configuration.nix | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/hosts/akashi/hardware-configuration.nix b/hosts/akashi/hardware-configuration.nix new file mode 100644 index 0000000..a264937 --- /dev/null +++ b/hosts/akashi/hardware-configuration.nix @@ -0,0 +1,80 @@ +{ + config, + lib, + modulesPath, + ... +}: +let + nixosDevice = "/dev/disk/by-uuid/78655110-4037-4b06-9407-f155c595c3a3"; + + btrfsOptions = [ + "compress-force=zstd:1" + "noatime" + "discard=async" + "space_cache=v2" + ]; +in +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + swapDevices = [ ]; + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + boot = { + kernelModules = [ "kvm-amd" ]; + extraModulePackages = [ ]; + + initrd = { + kernelModules = [ ]; + + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_usb_sdmmc" + ]; + }; + }; + + fileSystems = { + "/" = { + device = nixosDevice; + fsType = "btrfs"; + options = btrfsOptions ++ [ "subvol=@" ]; + }; + + "/home" = { + device = nixosDevice; + fsType = "btrfs"; + options = btrfsOptions ++ [ "subvol=@home" ]; + }; + + "/var" = { + device = nixosDevice; + fsType = "btrfs"; + options = btrfsOptions ++ [ "subvol=@var" ]; + }; + + "/nix" = { + device = nixosDevice; + fsType = "btrfs"; + options = btrfsOptions ++ [ "subvol=@nix" ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/5B1D-BD89"; + fsType = "vfat"; + + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + }; +} |