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 = [ ];
|
sshOpts = [ ];
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../utils.nix { }).evalModel (
|
(pkgs.callPackage ../utils.nix { }).evalModel (
|
||||||
{ config, modulesPath, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./resources
|
./resources
|
||||||
|
|
@ -59,7 +59,7 @@ in
|
||||||
) host-mapping;
|
) host-mapping;
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
environments = lib.mapAttrs (app: host: environment: {
|
environments = lib.mapAttrs (app: host: {
|
||||||
resources =
|
resources =
|
||||||
{
|
{
|
||||||
"external".garage = { };
|
"external".garage = { };
|
||||||
|
|
@ -71,29 +71,12 @@ in
|
||||||
}) host-mapping;
|
}) host-mapping;
|
||||||
implementation =
|
implementation =
|
||||||
{
|
{
|
||||||
required-resources,
|
|
||||||
deployment-name,
|
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
|
# try and use `ssh-host` since as of writing there is no plural variant
|
||||||
ssh-host = {
|
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;
|
inherit system;
|
||||||
ssh = {
|
ssh = {
|
||||||
username = "root";
|
username = "root";
|
||||||
|
|
@ -115,6 +98,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# omitting `nixos-configuration` as it's instead passed thru recursion's `ssh-host`
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) host-mapping;
|
}) host-mapping;
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ let
|
||||||
nixos-configuration = mkOption {
|
nixos-configuration = mkOption {
|
||||||
description = "A NixOS configuration.";
|
description = "A NixOS configuration.";
|
||||||
type = types.unspecified;
|
type = types.unspecified;
|
||||||
|
default = { };
|
||||||
};
|
};
|
||||||
# FIXME ensure this works from outside this repo too
|
# FIXME ensure this works from outside this repo too
|
||||||
caller = mkOption {
|
caller = mkOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue