]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/oignon/hardware.nix
nix: update nixpkgs
[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 device = "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X";
20 configurationLimit = 3;
21
22 #zfsSupport = true;
23 #efiSupport = true;
24 #enableCryptodisk = true;
25 };
26
27 fileSystems."/boot" =
28 { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
29 fsType = "ext2";
30 };
31 fileSystems."/boot/efi" =
32 { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
33 fsType = "vfat";
34 };
35 swapDevices = [
36 { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
37 randomEncryption = {
38 enable = true;
39 cipher = "aes-xts-plain64";
40 source = "/dev/urandom";
41 };
42 }
43 ];
44
45 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
46 # You should try to make this id unique among your hosts.
47 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
48 networking.hostId = "ce53d0c3";
49
50 boot.supportedFilesystems = [ "ntfs" "vfat" ];
51 boot.extraModulePackages = [
52 #config.boot.kernelPackages.exfat-nofuse
53 ];
54
55 fileSystems."/" =
56 { device = "${hostName}/root";
57 fsType = "zfs";
58 };
59 fileSystems."/nix" =
60 { device = "${hostName}/nix";
61 fsType = "zfs";
62 };
63 fileSystems."/var" =
64 { device = "${hostName}/var";
65 fsType = "zfs";
66 };
67
68 }