services: prepare for migration
This commit is contained in:
parent
6526f3b4e5
commit
cfdabda225
4 changed files with 10 additions and 10 deletions
|
@ -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 { })
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
services.forgejo-runner = {
|
config.services.forgejo-runner = {
|
||||||
hosts = [
|
hosts = [
|
||||||
"ude"
|
"ude"
|
||||||
"youko"
|
"youko"
|
||||||
];
|
];
|
||||||
config =
|
module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
services.forgejo = {
|
config.services.forgejo = {
|
||||||
host = "kazuki";
|
host = "kazuki";
|
||||||
ports = [ 3000 ];
|
ports = [ 3000 ];
|
||||||
config =
|
module =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
age.secrets.rab-lol-cf = {
|
age.secrets.rab-lol-cf = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue