]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/losurdo/hardware.nix
nix: format all .nix files
[sourcephile-nix.git] / hosts / losurdo / hardware.nix
1 { pkgs, inputs, hostName, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/hardware/dl10j.nix
5 (inputs.julm-nix + "/nixos/profiles/zramSwap.nix")
6 ];
7
8 hardware.opengl.enable = true;
9
10 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
11 # You should try to make this id unique among your hosts.
12 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
13 networking.hostId = "e18f71a6";
14
15 boot.loader.grub.devices = [
16 #"/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_250GB_S4EUNJ0N211426T"
17 #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
18 #"/dev/disk/by-id/mmc-SB32G_0xdb5e2237"
19 "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_S3YJNX0K863141Y"
20 ];
21
22 fileSystems."/boot" =
23 {
24 device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
25 fsType = "ext2";
26 };
27
28 fileSystems."/boot/efi" =
29 {
30 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
31 fsType = "vfat";
32 };
33
34 swapDevices = [
35 {
36 device = "/dev/disk/by-partlabel/${hostName}_nvme_swap";
37 randomEncryption = {
38 enable = true;
39 cipher = "aes-xts-plain64";
40 source = "/dev/urandom";
41 };
42 }
43 {
44 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
45 randomEncryption = {
46 enable = true;
47 cipher = "aes-xts-plain64";
48 source = "/dev/urandom";
49 };
50 }
51 ];
52
53 # Allow access to Yubikey USB device nodes.
54 services.udev.packages = [ pkgs.yubikey-personalization ];
55 }