services: prepare for migration

This commit is contained in:
Nikodem Rabuliński 2025-03-23 22:02:20 +01:00
parent 3a421dfd3c
commit b9b4835c5c
Signed by: nrabulinski
SSH key fingerprint: SHA256:AZZVyfKStaCo8sbJB+3Rr/CRrlym1oEgw7vMnynJeR8
3 changed files with 8 additions and 8 deletions

View file

@ -21,11 +21,11 @@ let
type = with lib.types; listOf str; type = with lib.types; listOf str;
default = [ config.host ]; default = [ config.host ];
}; };
config = lib.mkOption { module = lib.mkOption {
type = lib.types.deferredModule; type = lib.types.deferredModule;
default = { }; default = { };
}; };
hostConfig = lib.mkOption { hostModule = lib.mkOption {
type = with lib.types; attrsOf deferredModule; type = with lib.types; attrsOf deferredModule;
default = { }; default = { };
}; };
@ -36,8 +36,8 @@ let
cfg: cfg:
lib.genAttrs cfg.hosts (host: { lib.genAttrs cfg.hosts (host: {
imports = [ imports = [
cfg.config cfg.module
(cfg.hostConfig.${host} or { }) (cfg.hostModule.${host} or { })
]; ];
}); });

View file

@ -1,12 +1,12 @@
{ {
services.attic = config.services.attic =
let let
atticPort = 9476; atticPort = 9476;
in in
{ {
host = "kazuki"; host = "kazuki";
ports = [ atticPort ]; ports = [ atticPort ];
config = module =
{ config, ... }: { config, ... }:
{ {
age.secrets.attic-creds = { age.secrets.attic-creds = {

View file

@ -1,10 +1,10 @@
{ {
services.forgejo-runner = { config.services.forgejo-runner = {
hosts = [ hosts = [
"ude" "ude"
"youko" "youko"
]; ];
config = module =
{ {
config, config,
lib, lib,