services: prepare for migration

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,8 @@
{
services.forgejo = {
config.services.forgejo = {
host = "kazuki";
ports = [ 3000 ];
config =
module =
{ config, pkgs, ... }:
{
age.secrets.rab-lol-cf = {