From a5b861db89194a925f756b366db88bed9db70214 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Sat, 22 Nov 2025 17:54:48 +0100 Subject: [PATCH] pass null in favor of recursion Signed-off-by: Kiara Grouwstra --- deployment/fediversity/ssh-hosts.nix | 22 +++------------------- deployment/run/default.nix | 1 + 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/deployment/fediversity/ssh-hosts.nix b/deployment/fediversity/ssh-hosts.nix index 71fbc4b1..c759c3ea 100644 --- a/deployment/fediversity/ssh-hosts.nix +++ b/deployment/fediversity/ssh-hosts.nix @@ -17,7 +17,7 @@ let sshOpts = [ ]; in (pkgs.callPackage ../utils.nix { }).evalModel ( - { config, modulesPath, ... }: + { config, ... }: { imports = [ ./resources @@ -59,7 +59,7 @@ in ) host-mapping; config = lib.mkMerge [ { - environments = lib.mapAttrs (app: host: environment: { + environments = lib.mapAttrs (app: host: { resources = { "external".garage = { }; @@ -71,29 +71,12 @@ in }) host-mapping; implementation = { - required-resources, deployment-name, ... }: - let - garage = environment.config.resources."external".garage.process required-resources; - relevant-resources = lib.getAttrs [ app ] required-resources; - in { # try and use `ssh-host` since as of writing there is no plural variant ssh-host = { - nixos-configuration = { - imports = - [ - ../../infra/common/nixos - "${sources.disko}/module.nix" - "${modulesPath}/profiles/qemu-guest.nix" - (environment.config.resources.${app}.network.process relevant-resources) - (environment.config.resources."age".secrets.process relevant-resources) - ] - ++ (environment.config.resources."fediversity".nixos-module.process relevant-resources) - ++ garage.applicationSide; - }; inherit system; ssh = { username = "root"; @@ -115,6 +98,7 @@ in }; }; }; + # omitting `nixos-configuration` as it's instead passed thru recursion's `ssh-host` }; }; }) host-mapping; diff --git a/deployment/run/default.nix b/deployment/run/default.nix index e32cdbd3..79f442ee 100644 --- a/deployment/run/default.nix +++ b/deployment/run/default.nix @@ -66,6 +66,7 @@ let nixos-configuration = mkOption { description = "A NixOS configuration."; type = types.unspecified; + default = { }; }; # FIXME ensure this works from outside this repo too caller = mkOption {