From: Ismaƫl Bouya Date: Sun, 7 Jun 2020 17:10:43 +0000 (+0200) Subject: Prepare migration to ZFS X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=commitdiff_plain;h=31e11cdfcb4455f51c8db27958d6ae8db8820401 Prepare migration to ZFS --- 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 @@ pkgs.vim ] ++ (lib.optional (builtins.length (config.hostEnv.users pkgs) > 0) pkgs.home-manager); + + systemd.targets.maintenance = { + description = "Maintenance target with only sshd"; + after = [ "network-online.target" "sshd.service" ]; + requires = [ "network-online.target" "sshd.service" ]; + unitConfig.AllowIsolate = "yes"; + }; }; } 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 @@ { privateFiles }: { config, pkgs, name, ... }: { + boot.supportedFilesystems = [ "zfs" ]; boot.kernelPackages = pkgs.linuxPackages_latest; myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; networking = { + hostId = "27c3048d"; # generated with head -c4 /dev/urandom | od -A none -t x4 firewall.enable = false; interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList (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 @@ { privateFiles }: { config, pkgs, ... }: { + boot.supportedFilesystems = [ "zfs" ]; boot.kernelPackages = pkgs.linuxPackages_latest; myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; }; networking = { + hostId = "8262ca33"; # generated with head -c4 /dev/urandom | od -A none -t x4 firewall.enable = true; # 176.9.151.89 declared in nixops -> infra / tools interfaces."eth0".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList