diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-07 19:10:43 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-07 19:13:09 +0200 |
commit | 31e11cdfcb4455f51c8db27958d6ae8db8820401 (patch) | |
tree | f0efe157c9f2b4b793b548ce6e0c440133748ecf /modules | |
parent | fb7611c1e059b87ba3bdd13229c3f2d96d41a794 (diff) | |
download | Nix-31e11cdfcb4455f51c8db27958d6ae8db8820401.tar.gz Nix-31e11cdfcb4455f51c8db27958d6ae8db8820401.tar.zst Nix-31e11cdfcb4455f51c8db27958d6ae8db8820401.zip |
Prepare migration to ZFS
Diffstat (limited to 'modules')
-rw-r--r-- | modules/private/system.nix | 7 | ||||
-rw-r--r-- | modules/private/system/dilion.nix | 2 | ||||
-rw-r--r-- | modules/private/system/eldiron.nix | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/modules/private/system.nix b/modules/private/system.nix index 9161738..0ab4a81 100644 --- a/modules/private/system.nix +++ b/modules/private/system.nix | |||
@@ -76,5 +76,12 @@ | |||
76 | pkgs.vim | 76 | pkgs.vim |
77 | ] ++ | 77 | ] ++ |
78 | (lib.optional (builtins.length (config.hostEnv.users pkgs) > 0) pkgs.home-manager); | 78 | (lib.optional (builtins.length (config.hostEnv.users pkgs) > 0) pkgs.home-manager); |
79 | |||
80 | systemd.targets.maintenance = { | ||
81 | description = "Maintenance target with only sshd"; | ||
82 | after = [ "network-online.target" "sshd.service" ]; | ||
83 | requires = [ "network-online.target" "sshd.service" ]; | ||
84 | unitConfig.AllowIsolate = "yes"; | ||
85 | }; | ||
79 | }; | 86 | }; |
80 | } | 87 | } |
diff --git a/modules/private/system/dilion.nix b/modules/private/system/dilion.nix index d8bad6b..977d427 100644 --- a/modules/private/system/dilion.nix +++ b/modules/private/system/dilion.nix | |||
@@ -1,10 +1,12 @@ | |||
1 | { privateFiles }: | 1 | { privateFiles }: |
2 | { config, pkgs, name, ... }: | 2 | { config, pkgs, name, ... }: |
3 | { | 3 | { |
4 | boot.supportedFilesystems = [ "zfs" ]; | ||
4 | boot.kernelPackages = pkgs.linuxPackages_latest; | 5 | boot.kernelPackages = pkgs.linuxPackages_latest; |
5 | myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; | 6 | myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; |
6 | 7 | ||
7 | networking = { | 8 | networking = { |
9 | hostId = "27c3048d"; # generated with head -c4 /dev/urandom | od -A none -t x4 | ||
8 | firewall.enable = false; | 10 | firewall.enable = false; |
9 | interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList | 11 | interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList |
10 | (n: ips: { address = ips.ip4; prefixLength = 32; }) | 12 | (n: ips: { address = ips.ip4; prefixLength = 32; }) |
diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix index 6ccaea5..b3bda53 100644 --- a/modules/private/system/eldiron.nix +++ b/modules/private/system/eldiron.nix | |||
@@ -1,10 +1,12 @@ | |||
1 | { privateFiles }: | 1 | { privateFiles }: |
2 | { config, pkgs, ... }: | 2 | { config, pkgs, ... }: |
3 | { | 3 | { |
4 | boot.supportedFilesystems = [ "zfs" ]; | ||
4 | boot.kernelPackages = pkgs.linuxPackages_latest; | 5 | boot.kernelPackages = pkgs.linuxPackages_latest; |
5 | myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; | 6 | myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; |
6 | 7 | ||
7 | networking = { | 8 | networking = { |
9 | hostId = "8262ca33"; # generated with head -c4 /dev/urandom | od -A none -t x4 | ||
8 | firewall.enable = true; | 10 | firewall.enable = true; |
9 | # 176.9.151.89 declared in nixops -> infra / tools | 11 | # 176.9.151.89 declared in nixops -> infra / tools |
10 | interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList | 12 | interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList |