From 3928a2a6e99fa10aa9a05a26bacba42c6d706e86 Mon Sep 17 00:00:00 2001 From: Sijmen Date: Sun, 7 Aug 2022 23:35:26 +0200 Subject: [PATCH] add nas hardware-configuration.nix --- nas/configuration.nix | 2 +- nas/hardware-configuration.nix | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 nas/hardware-configuration.nix diff --git a/nas/configuration.nix b/nas/configuration.nix index d88dc60..e09c38b 100644 --- a/nas/configuration.nix +++ b/nas/configuration.nix @@ -3,7 +3,7 @@ { imports = [ - ../hardware-configuration.nix + ./hardware-configuration.nix ../common/configuration.nix ]; diff --git a/nas/hardware-configuration.nix b/nas/hardware-configuration.nix new file mode 100644 index 0000000..499b7be --- /dev/null +++ b/nas/hardware-configuration.nix @@ -0,0 +1,36 @@ +# 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" "ehci_pci" "ahci" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAG923996P-part1"; + fsType = "btrfs"; + options = [ "subvol=nixos" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAG923996P-part3"; + fsType = "vfat"; + }; + + fileSystems."/mnt/backup" = + { device = "/dev/disk/by-uuid/93a86fb5-8c9f-488b-a3e4-ca5444343246"; + fsType = "btrfs"; + options = [ "space_cache=v2" ]; + }; + + swapDevices = [ ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +}