]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/patate/hardware.nix
+user/perf(zswap): use zswap instead zramSwap
[julm/julm-nix.git] / hosts / patate / hardware.nix
1 { hostName, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/hardware/X200.nix
5 ../../nixos/profiles/zfs.nix
6 ];
7
8 boot.loader.grub = {
9 enable = true;
10 memtest86.enable = true;
11 device = "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD1";
12 configurationLimit = 3;
13 };
14 boot.zfs.requestEncryptionCredentials = [ hostName ];
15
16 fileSystems."/boot" = {
17 device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
18 fsType = "ext2";
19 };
20 fileSystems."/boot/efi" = {
21 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
22 fsType = "vfat";
23 };
24 swapDevices = [
25 {
26 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
27 randomEncryption = {
28 enable = true;
29 cipher = "aes-xts-plain64";
30 source = "/dev/urandom";
31 };
32 }
33 ];
34
35 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
36 # You should try to make this id unique among your hosts.
37 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
38 networking.hostId = "ec2adb40";
39
40 boot.supportedFilesystems = [
41 "ntfs"
42 "vfat"
43 ];
44 boot.extraModulePackages = [
45 #config.boot.kernelPackages.exfat-nofuse
46 ];
47
48 powerManagement.powertop.enable = true;
49
50 fileSystems."/" = {
51 device = "${hostName}/root";
52 fsType = "zfs";
53 };
54 fileSystems."/nix" = {
55 device = "${hostName}/nix";
56 fsType = "zfs";
57 };
58 fileSystems."/home/sevy" = {
59 device = "${hostName}/home";
60 fsType = "zfs";
61 };
62 fileSystems."/home/sevy/Documents" = {
63 device = "${hostName}/home/Documents";
64 fsType = "zfs";
65 };
66 fileSystems."/home/sevy/Images" = {
67 device = "${hostName}/home/Images";
68 fsType = "zfs";
69 };
70 fileSystems."/home/sevy/Téléchargements" = {
71 device = "${hostName}/home/Downloads";
72 fsType = "zfs";
73 };
74 fileSystems."/home/sevy/.thunderbird" = {
75 device = "${hostName}/home/Mails";
76 fsType = "zfs";
77 };
78 fileSystems."/home/sevy/Vidéos" = {
79 device = "${hostName}/home/Videos";
80 fsType = "zfs";
81 };
82 fileSystems."/var" = {
83 device = "${hostName}/var";
84 fsType = "zfs";
85 };
86 fileSystems."/var/cache" = {
87 device = "${hostName}/var/cache";
88 fsType = "zfs";
89 };
90 fileSystems."/var/log" = {
91 device = "${hostName}/var/log";
92 fsType = "zfs";
93 };
94 fileSystems."/var/tmp" = {
95 device = "${hostName}/var/tmp";
96 fsType = "zfs";
97 };
98
99 }