nix-config/hosts/server10/hardware-configuration.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
2.4 KiB
Nix
Raw Normal View History

2022-12-04 08:53:28 +01:00
{ config, lib, modulesPath, ... }:
2022-05-14 20:33:56 +02:00
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
2024-01-07 03:40:39 +01:00
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
2022-05-14 20:33:56 +02:00
boot.kernelModules = [ "kvm-intel" ];
2024-01-07 03:40:39 +01:00
2024-02-07 00:31:53 +01:00
boot.initrd.luks.devices."server10-root".device = "/dev/disk/by-uuid/b4904afe-22b3-4abe-bd53-049817c1332f";
2022-05-14 20:33:56 +02:00
fileSystems."/" =
2024-01-07 03:40:39 +01:00
{ device = "server10-root/root";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/EB9B-15AA";
fsType = "vfat";
};
fileSystems."/etc" =
{ device = "server10-root/data/etc";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
fileSystems."/home" =
{ device = "server10-root/home";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
};
fileSystems."/nix" =
{ device = "server10-root/nix";
fsType = "zfs";
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
fileSystems."/nix/store" =
2024-01-07 03:40:39 +01:00
{ device = "server10-root/nix/store";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
fileSystems."/nix/var" =
{ device = "server10-root/nix/var";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
fileSystems."/var/backup" =
{ device = "server10-root/data/backup";
2022-05-14 20:33:56 +02:00
fsType = "zfs";
2024-01-07 03:40:39 +01:00
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
fileSystems."/var/lib" =
{ device = "server10-root/data/lib";
fsType = "zfs";
options = [ "zfsutil" ];
2022-05-14 20:33:56 +02:00
};
2024-01-07 03:40:39 +01:00
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f1.useDHCP = lib.mkDefault true;
2022-05-14 20:33:56 +02:00
2024-01-07 03:40:39 +01:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
2022-05-14 20:33:56 +02:00
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}