diff options
Diffstat (limited to 'sys/x220.nix')
-rw-r--r-- | sys/x220.nix | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/sys/x220.nix b/sys/x220.nix new file mode 100644 index 000000000000..a8b20eb2c055 --- /dev/null +++ b/sys/x220.nix @@ -0,0 +1,75 @@ +{ pkgs, ... }: + +{ + imports = [ + ../modules/workstation/physical + ../modules/nixos-hardware/lenovo/thinkpad/x220 + ]; + + hardware.enableRedistributableFirmware = true; + + boot.initrd.availableKernelModules = + [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" "i915" ]; + + boot.kernelModules = [ "kvm-intel" ]; + + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + + boot.cleanTmpDir = true; + + networking.hostId = "008dd68a"; + + boot.supportedFilesystems = [ "zfs" ]; + + boot.zfs.requestEncryptionCredentials = true; + + fileSystems."/" = { + device = "rpool/root"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "rpool/home/qyliss"; + fsType = "zfs"; + }; + + fileSystems."/root" = { + device = "rpool/home/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "rpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = { + device = "rpool/var"; + fsType = "zfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/6c2a9dd7-45b4-413a-bded-fccf682ffa36"; + fsType = "ext4"; + }; + + swapDevices = [ + { + device = "/dev/disk/by-partuuid/82326179-f409-4f28-9233-805c44a04879"; + randomEncryption = true; + } + ]; + + nix.settings.max-jobs = 2; + powerManagement.cpuFreqGovernor = "powersave"; + + networking.hostName = "x220"; + + system.stateVersion = "18.09"; + + users.users.qyliss.hashedPassword = "$5$rounds=1000000$tySRQ3rdqbPOduux$NcW7CoffEScpmOyS0Ga9gE5ZNLt8PT6.2Gvwn91vQn7"; + + hardware.opengl.enable = true; + hardware.opengl.extraPackages = with pkgs; [ libGL ]; +} |