]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/oignon/hardware.nix
aubergine: wireguard: move to port 43646
[julm/julm-nix.git] / hosts / oignon / hardware.nix
1 { config, lib, pkgs, hostName, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/hardware/X201.nix
5 ../../nixos/profiles/zfs.nix
6 ../../nixos/profiles/zramSwap.nix
7 ];
8
9 /*
10 boot.loader.efi = {
11 canTouchEfiVariables = true;
12 efiSysMountPoint = "/boot/efi";
13 };
14 */
15 boot.loader.grub = {
16 enable = true;
17 version = 2;
18 devices = [
19 "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X"
20 ];
21 configurationLimit = 16;
22
23 #zfsSupport = true;
24 #efiSupport = true;
25 #enableCryptodisk = true;
26 };
27
28 services.udev.extraRules = ''
29 ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9204", RUN+="${pkgs.gobi_loader}/lib/udev/gobi_loader -2000 $env{DEVNAME} /home/julm/documents/thinkpad-x201/gobi"
30 '';
31
32
33 fileSystems."/boot" =
34 { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
35 fsType = "ext2";
36 };
37 fileSystems."/boot/efi" =
38 { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
39 fsType = "vfat";
40 };
41 swapDevices = [
42 { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
43 randomEncryption = {
44 enable = true;
45 cipher = "aes-xts-plain64";
46 source = "/dev/urandom";
47 };
48 }
49 ];
50
51 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
52 # You should try to make this id unique among your hosts.
53 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
54 networking.hostId = "ce53d0c3";
55
56 boot.supportedFilesystems = [ "ntfs" "vfat" ];
57
58 powerManagement.powertop.enable = true;
59 #services.fprintd.enable = true;
60
61 fileSystems."/" =
62 { device = "${hostName}/root";
63 fsType = "zfs";
64 };
65 fileSystems."/nix" =
66 { device = "${hostName}/nix";
67 fsType = "zfs";
68 };
69 fileSystems."/var" =
70 { device = "${hostName}/var";
71 fsType = "zfs";
72 };
73
74 }