aboutsummaryrefslogtreecommitdiff
path: root/modules/private/system
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-02 00:22:15 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-02 00:22:15 +0200
commit740a6506f419bdcfb082f1cfde7553735dfd0570 (patch)
tree11d8e76ed581b7f0498244cf698b7d4573ffbc9a /modules/private/system
parentda28a4e2afef21710f73860b26893fa18dd32858 (diff)
downloadNix-740a6506f419bdcfb082f1cfde7553735dfd0570.tar.gz
Nix-740a6506f419bdcfb082f1cfde7553735dfd0570.tar.zst
Nix-740a6506f419bdcfb082f1cfde7553735dfd0570.zip
Migrate dilion to ZFS
Diffstat (limited to 'modules/private/system')
-rw-r--r--modules/private/system/dilion.nix14
-rw-r--r--modules/private/system/eldiron.nix2
2 files changed, 15 insertions, 1 deletions
diff --git a/modules/private/system/dilion.nix b/modules/private/system/dilion.nix
index ca9a052..14155ef 100644
--- a/modules/private/system/dilion.nix
+++ b/modules/private/system/dilion.nix
@@ -5,6 +5,19 @@
5 boot.kernelPackages = pkgs.linuxPackages_latest; 5 boot.kernelPackages = pkgs.linuxPackages_latest;
6 myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; 6 myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
7 7
8 fileSystems = {
9 "/" = lib.mkForce { fsType = "zfs"; device = "zpool/root"; };
10 "/boot" = { fsType = "ext4"; device = "/dev/disk/by-uuid/fd1c511e-2bc0-49d5-b8bb-95e7e8c8c816"; };
11 "/etc" = { fsType = "zfs"; device = "zpool/root/etc"; };
12 "/home" = { fsType = "zfs"; device = "zpool/root/home"; };
13 "/home/immae" = { fsType = "zfs"; device = "zpool/root/home/immae"; };
14 "/tmp" = { fsType = "zfs"; device = "zpool/root/tmp"; };
15 "/var" = { fsType = "zfs"; device = "zpool/root/var"; };
16 };
17 boot.initrd.secrets = {
18 "/boot/pass.key" = "/boot/pass.key";
19 };
20
8 networking = { 21 networking = {
9 hostId = "27c3048d"; # generated with head -c4 /dev/urandom | od -A none -t x4 22 hostId = "27c3048d"; # generated with head -c4 /dev/urandom | od -A none -t x4
10 firewall.enable = false; 23 firewall.enable = false;
@@ -82,6 +95,7 @@
82 install -m 0755 -o root -g root -d /var/lib/caldance 95 install -m 0755 -o root -g root -d /var/lib/caldance
83 ''; 96 '';
84 virtualisation.docker.enable = true; 97 virtualisation.docker.enable = true;
98 virtualisation.docker.storageDriver = "zfs";
85 virtualisation.libvirtd.enable = true; 99 virtualisation.libvirtd.enable = true;
86 users.extraUsers.immae.extraGroups = [ "libvirtd" "docker" ]; 100 users.extraUsers.immae.extraGroups = [ "libvirtd" "docker" ];
87 systemd.services.libvirtd.postStart = '' 101 systemd.services.libvirtd.postStart = ''
diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix
index 3fa78a4..8a5d11c 100644
--- a/modules/private/system/eldiron.nix
+++ b/modules/private/system/eldiron.nix
@@ -119,7 +119,7 @@
119 fsType = "fuse"; 119 fsType = "fuse";
120 options = [ "force-user=pub" "create-for-user=wwwrun" "create-for-group=wwwrun" ]; 120 options = [ "force-user=pub" "create-for-user=wwwrun" "create-for-group=wwwrun" ];
121 }; 121 };
122 environment.systemPackages = [ pkgs.bindfs pkgs.pv pkgs.smartmontools ]; 122 environment.systemPackages = [ pkgs.bindfs ];
123 123
124 # This value determines the NixOS release with which your system is 124 # This value determines the NixOS release with which your system is
125 # to be compatible, in order to avoid breaking some software such as 125 # to be compatible, in order to avoid breaking some software such as