]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/mermet/fileSystems.nix
mermet: vnstat: enable service
[sourcephile-nix.git] / hosts / mermet / fileSystems.nix
1 { lib, inputs, ... }:
2 {
3 imports = [
4 (inputs.julm-nix + "/nixos/profiles/zfs.nix")
5 ];
6
7 /*
8 fileSystems."/boot" =
9 { device = "bpool/boot";
10 fsType = "zfs";
11 };
12 */
13 fileSystems."/" = {
14 device = "rpool/root";
15 fsType = "zfs"; # TODO: options = [ "zfsutil" ];
16 };
17
18 # This will automatically load the zfs password prompt on login
19 # and kill the other prompt so boot can continue
20 # The pkill zfs kills the zfs load-key from the console
21 # allowing the boot to continue.
22 boot.initrd.network.postCommands = ''
23 echo >>/root/.profile "zfs load-key rpool && pkill zfs"
24 '';
25 boot.zfs.requestEncryptionCredentials = lib.mkForce [ "rpool" ];
26 #boot.zfs.requestEncryptionCredentials = [ hostName ];
27
28 fileSystems."/home" =
29 {
30 device = "rpool/home";
31 fsType = "zfs";
32 };
33
34 fileSystems."/home/julm" =
35 {
36 device = "rpool/home/julm";
37 fsType = "zfs";
38 };
39
40 fileSystems."/home/julm/log" =
41 {
42 device = "rpool/home/julm/log";
43 fsType = "zfs";
44 };
45
46 fileSystems."/home/julm/mail" =
47 {
48 device = "rpool/home/julm/mail";
49 fsType = "zfs";
50 };
51
52 fileSystems."/nix" =
53 {
54 device = "rpool/nix";
55 fsType = "zfs";
56 };
57
58 fileSystems."/var" =
59 {
60 device = "rpool/var";
61 fsType = "zfs";
62 };
63
64 fileSystems."/var/cache" =
65 {
66 device = "rpool/var/cache";
67 fsType = "zfs";
68 };
69
70 fileSystems."/var/log" =
71 {
72 device = "rpool/var/log";
73 fsType = "zfs";
74 };
75
76 fileSystems."/var/tmp" =
77 {
78 device = "rpool/var/tmp";
79 fsType = "zfs";
80 };
81
82 fileSystems."/var/www" =
83 {
84 device = "rpool/var/www";
85 fsType = "zfs";
86 };
87 }