diff options
Diffstat (limited to 'sys/x220.nix')
-rw-r--r-- | sys/x220.nix | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/sys/x220.nix b/sys/x220.nix new file mode 100644 index 000000000000..4eac8dda4045 --- /dev/null +++ b/sys/x220.nix @@ -0,0 +1,81 @@ +{ pkgs, ... }: + +{ + imports = [ + ../modules/nixos-hardware/lenovo/thinkpad/x220 + ../modules/persistence + ../modules/workstation/audio + ../modules/workstation/hardware/bluetooth + ../modules/workstation/physical + ]; + + hardware.enableRedistributableFirmware = true; + + boot.initrd.availableKernelModules = + [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" "i915" ]; + + boot.kernelModules = [ "kvm-intel" ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "nodev"; + + boot.initrd.postDeviceCommands = '' + mkdir /mnt + mount /dev/mapper/root /mnt + btrfs subvolume delete /mnt/boot + btrfs subvolume create /mnt/boot + umount /mnt + ''; + + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/c28ed0c0-4fa9-4d8a-a771-5fddac61adda"; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=boot" ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/home" ]; + }; + + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/local/nix" ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/6F69-3310"; + fsType = "vfat"; + }; + + fileSystems."/persist" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; + }; + + fileSystems."/srv" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/srv" ]; + }; + + fileSystems."/var/lib/machines" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/var/lib/machines" ]; + }; + + networking.hostName = "x220"; + + system.stateVersion = "22.05"; + + users.users.qyliss.hashedPassword = "$y$j9T$Q5bSnSDsY.PkqBX9AA3Gp0$cMl0jK1Cug/7vu8n4ShmQouZTbyPMkUO3NMBVpWn353"; + + hardware.opengl.enable = true; + hardware.opengl.extraPackages = with pkgs; [ libGL ]; +} |