aboutsummaryrefslogtreecommitdiff
path: root/modules/private/system/eldiron.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-27 23:03:05 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-27 23:03:05 +0200
commit7e214bf9e1bb58b83317db95dfb70dbeac0a4e28 (patch)
treec7378add2bf6faf6706db9dbb1e071b7942a86c5 /modules/private/system/eldiron.nix
parentca5478c652a7c04d4e28205c732e77f729d8b3ea (diff)
downloadNix-7e214bf9e1bb58b83317db95dfb70dbeac0a4e28.tar.gz
Nix-7e214bf9e1bb58b83317db95dfb70dbeac0a4e28.tar.zst
Nix-7e214bf9e1bb58b83317db95dfb70dbeac0a4e28.zip
Migrate eldiron to zfs
Diffstat (limited to 'modules/private/system/eldiron.nix')
-rw-r--r--modules/private/system/eldiron.nix25
1 files changed, 23 insertions, 2 deletions
diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix
index b2a728c..3fa78a4 100644
--- a/modules/private/system/eldiron.nix
+++ b/modules/private/system/eldiron.nix
@@ -1,10 +1,31 @@
1{ privateFiles }: 1{ privateFiles }:
2{ config, pkgs, ... }: 2{ config, pkgs, lib, ... }:
3{ 3{
4 boot.supportedFilesystems = [ "zfs" ]; 4 boot.supportedFilesystems = [ "zfs" ];
5 boot.kernelParams = ["zfs.zfs_arc_max=6442450944"];
5 boot.kernelPackages = pkgs.linuxPackages_latest; 6 boot.kernelPackages = pkgs.linuxPackages_latest;
6 myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; 7 myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
7 8
9 fileSystems = {
10 "/" = lib.mkForce { fsType = "zfs"; device = "zpool/root"; };
11 "/boot" = { fsType = "ext4"; device = "/dev/disk/by-uuid/e6bb18fb-ff56-4b5f-ae9f-e60d40dc0622"; };
12 "/etc" = { fsType = "zfs"; device = "zpool/root/etc"; };
13 "/nix" = { fsType = "zfs"; device = "zpool/root/nix"; };
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
21 services.zfs = {
22 autoSnapshot = {
23 enable = true;
24 };
25 autoScrub = {
26 enable = true;
27 };
28 };
8 networking = { 29 networking = {
9 hostId = "8262ca33"; # generated with head -c4 /dev/urandom | od -A none -t x4 30 hostId = "8262ca33"; # generated with head -c4 /dev/urandom | od -A none -t x4
10 firewall.enable = true; 31 firewall.enable = true;
@@ -98,7 +119,7 @@
98 fsType = "fuse"; 119 fsType = "fuse";
99 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" ];
100 }; 121 };
101 environment.systemPackages = [ pkgs.bindfs ]; 122 environment.systemPackages = [ pkgs.bindfs pkgs.pv pkgs.smartmontools ];
102 123
103 # This value determines the NixOS release with which your system is 124 # This value determines the NixOS release with which your system is
104 # 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