]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/oignon/hardware.nix
upower: use instead of powertop which draws ~0.3W more
[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 fileSystems."/boot" =
33 { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
34 fsType = "ext2";
35 };
36 fileSystems."/boot/efi" =
37 { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
38 fsType = "vfat";
39 };
40 swapDevices = [
41 { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
42 randomEncryption = {
43 enable = true;
44 cipher = "aes-xts-plain64";
45 source = "/dev/urandom";
46 };
47 }
48 ];
49
50 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
51 # You should try to make this id unique among your hosts.
52 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
53 networking.hostId = "ce53d0c3";
54
55 boot.supportedFilesystems = [ "ntfs" "vfat" ];
56
57 fileSystems."/" =
58 { device = "${hostName}/root";
59 fsType = "zfs";
60 };
61 fileSystems."/nix" =
62 { device = "${hostName}/nix";
63 fsType = "zfs";
64 };
65 fileSystems."/var" =
66 { device = "${hostName}/var";
67 fsType = "zfs";
68 };
69
70 }