]> Git — Sourcephile - sourcephile-nix.git/blob - install/mermet/logical/zfs.nix
nixops: add mermet
[sourcephile-nix.git] / install / mermet / logical / zfs.nix
1 { pkgs, lib, config, ... }:
2
3 {
4 imports = [];
5 boot.supportedFilesystems = [ "zfs" ];
6
7 # The 32-bit host id of the machine, formatted as 8 hexadecimal characters.
8 # You should try to make this id unique among your machines.
9 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
10 networking.hostId = "69c40b03";
11
12 # noop, the recommended elevator with zfs.
13 boot.kernelParams = [
14 "elevator=noop"
15 ];
16
17 # FIXME: Uncomment [on a working system] to ensure extra safeguards are active that zfs uses to protect zfs pools:
18 #boot.zfs.forceImportAll = false;
19 #boot.zfs.forceImportRoot = false;
20
21 boot.zfs.enableUnstable = true;
22 boot.zfs.requestEncryptionCredentials = true;
23
24 # Enables periodic scrubbing of ZFS pools.
25 services.zfs.autoScrub.enable = true;
26
27 /*
28 # Enable the (OpenSolaris-compatible) ZFS auto-snapshotting service.
29 services.zfs.autoSnapshot = {
30 enable = true;
31 frequent = ;
32 hourly = ;
33 daily = ;
34 weekly = ;
35 monthly = ;
36 };
37 */
38 /*
39 fileSystems."/boot" =
40 { device = "bpool/boot";
41 fsType = "zfs";
42 };
43 */
44 fileSystems."/" =
45 { device = "rpool/root";
46 fsType = "zfs";
47 };
48
49 fileSystems."/home" =
50 { device = "rpool/home";
51 fsType = "zfs";
52 };
53
54 fileSystems."/nix" =
55 { device = "rpool/nix";
56 fsType = "zfs";
57 };
58
59 fileSystems."/nix/var" =
60 { device = "rpool/nix/var";
61 fsType = "zfs";
62 };
63
64 fileSystems."/var" =
65 { device = "rpool/var";
66 fsType = "zfs";
67 };
68
69 fileSystems."/var/cache" =
70 { device = "rpool/var/cache";
71 fsType = "zfs";
72 };
73
74 fileSystems."/var/log" =
75 { device = "rpool/var/log";
76 fsType = "zfs";
77 };
78
79 fileSystems."/var/mail" =
80 { device = "rpool/var/mail";
81 fsType = "zfs";
82 };
83
84 fileSystems."/var/tmp" =
85 { device = "rpool/var/tmp";
86 fsType = "zfs";
87 };
88
89 fileSystems."/var/www" =
90 { device = "rpool/var/www";
91 fsType = "zfs";
92 };
93
94 }