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