forked from fediversity/fediversity
pass null in favor of recursion
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
c296bdab0a
commit
a5b861db89
2 changed files with 4 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue