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