Local config hell.
This commit is contained in:
parent
9e349b7164
commit
6e399b829a
2 changed files with 194 additions and 145 deletions
|
|
@ -8,6 +8,30 @@
|
|||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in {
|
||||
options.local = {
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos-default";
|
||||
description = "System hostname";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "user";
|
||||
description = "Primary user username";
|
||||
};
|
||||
userDescription = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "NixOS User";
|
||||
description = "Primary user description";
|
||||
};
|
||||
address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.1.1.100";
|
||||
description = "Static IP address";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
local.hostname = "forgejoprg";
|
||||
local.username = "forgejoprg";
|
||||
local.userDescription = "Forgejo Admin";
|
||||
|
|
@ -83,4 +107,5 @@ in {
|
|||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,35 @@
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
options.local = {
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos-default";
|
||||
description = "System hostname";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "user";
|
||||
description = "Primary user username";
|
||||
};
|
||||
userDescription = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "NixOS User";
|
||||
description = "Primary user description";
|
||||
};
|
||||
address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.1.1.100";
|
||||
description = "Static IP address";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
local.hostname = "nixos-traefik";
|
||||
local.username = "traefikprg";
|
||||
local.userDescription = "NixOS PRG Traefik Service";
|
||||
local.address = "10.1.1.250";
|
||||
|
||||
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
group = "acme";
|
||||
|
|
@ -99,4 +122,5 @@
|
|||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue