summaryrefslogtreecommitdiff
path: root/hosts/thinkpad
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/thinkpad')
-rw-r--r--hosts/thinkpad/default.nix46
-rw-r--r--hosts/thinkpad/hardware.nix43
2 files changed, 47 insertions, 42 deletions
diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix
index 082e13f..6c7a15e 100644
--- a/hosts/thinkpad/default.nix
+++ b/hosts/thinkpad/default.nix
@@ -15,6 +15,10 @@ inputs.nixpkgs.lib.nixosSystem rec {
../../programs
../../system
{
+ imports = [
+ ./hardware.nix
+ ];
+
# options
hostName = "thinkpad";
monitors = [
@@ -23,48 +27,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
scale = 1.0;
}
];
-
- # hardware
- hardware.graphics.enable = true;
- hardware.bluetooth.enable = true;
-
- # bootloader
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi = {
- canTouchEfiVariables = true;
- efiSysMountPoint = "/boot/efi";
- };
-
- # kernel modules
- boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = ["kvm-intel"];
- boot.extraModulePackages = [];
-
- # firmware
- hardware.enableRedistributableFirmware = true;
- hardware.cpu.intel.updateMicrocode = true;
-
- # luks device
- boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/fe5e24c0-d35d-4722-929d-1496b7eb9872";
-
- # root
- fileSystems."/" = {
- device = "/dev/disk/by-uuid/e7bdadd0-0914-42ea-81c4-4449537d3477";
- fsType = "btrfs";
- };
-
- # boot
- fileSystems."/boot/efi" = {
- device = "/dev/disk/by-uuid/6CE8-EFE0";
- fsType = "vfat";
- options = ["fmask=0022" "dmask=0022"];
- };
-
- # swap
- swapDevices = [
- {device = "/dev/disk/by-uuid/01099db8-dd7a-4fe5-981a-6889fdb3735e";}
- ];
}
];
}
diff --git a/hosts/thinkpad/hardware.nix b/hosts/thinkpad/hardware.nix
new file mode 100644
index 0000000..61948b4
--- /dev/null
+++ b/hosts/thinkpad/hardware.nix
@@ -0,0 +1,43 @@
+{...}: {
+ # hardware
+ hardware.graphics.enable = true;
+ hardware.bluetooth.enable = true;
+
+ # bootloader
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi = {
+ canTouchEfiVariables = true;
+ efiSysMountPoint = "/boot/efi";
+ };
+
+ # kernel modules
+ boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
+ boot.initrd.kernelModules = [];
+ boot.kernelModules = ["kvm-intel"];
+ boot.extraModulePackages = [];
+
+ # firmware
+ hardware.enableRedistributableFirmware = true;
+ hardware.cpu.intel.updateMicrocode = true;
+
+ # luks device
+ boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/fe5e24c0-d35d-4722-929d-1496b7eb9872";
+
+ # root
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/e7bdadd0-0914-42ea-81c4-4449537d3477";
+ fsType = "btrfs";
+ };
+
+ # boot
+ fileSystems."/boot/efi" = {
+ device = "/dev/disk/by-uuid/6CE8-EFE0";
+ fsType = "vfat";
+ options = ["fmask=0022" "dmask=0022"];
+ };
+
+ # swap
+ swapDevices = [
+ {device = "/dev/disk/by-uuid/01099db8-dd7a-4fe5-981a-6889fdb3735e";}
+ ];
+}