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