Try out the better local config declaration.
This commit is contained in:
parent
39ad4beff8
commit
598f9bb256
3 changed files with 27 additions and 10 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|
||||||
# TODO Figure out a better way to manage secrets.
|
# TODO Figure out a better way to manage secrets.
|
||||||
local.secrets = {
|
local.secrets = {
|
||||||
gitUserName = "Your Name";
|
gitUserName = "Your Name";
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,19 @@
|
||||||
cfg = config.services.forgejo;
|
cfg = config.services.forgejo;
|
||||||
srv = cfg.settings.server;
|
srv = cfg.settings.server;
|
||||||
in {
|
in {
|
||||||
|
options.local = {
|
||||||
|
hostname = lib.mkOption {type = lib.types.str;};
|
||||||
|
username = lib.mkOption {type = lib.types.str;};
|
||||||
|
userDescription = lib.mkOption {type = lib.types.str;};
|
||||||
|
address = lib.mkOption {type = lib.types.str;};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
local.hostname = "forgejoprg";
|
local.hostname = "forgejoprg";
|
||||||
local.username = "forgejoprg";
|
local.username = "forgejoprg";
|
||||||
local.userDescription = "Forgejo Admin";
|
local.userDescription = "Forgejo Admin";
|
||||||
local.address = "10.1.1.4";
|
local.address = "10.1.1.4";
|
||||||
|
};
|
||||||
|
|
||||||
# Enable Fedgejo service
|
# Enable Fedgejo service
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,19 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
options.local = {
|
||||||
|
hostname = lib.mkOption {type = lib.types.str;};
|
||||||
|
username = lib.mkOption {type = lib.types.str;};
|
||||||
|
userDescription = lib.mkOption {type = lib.types.str;};
|
||||||
|
address = lib.mkOption {type = lib.types.str;};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
local.hostname = "nixos-traefik";
|
local.hostname = "nixos-traefik";
|
||||||
local.username = "traefikprg";
|
local.username = "traefikprg";
|
||||||
local.userDescription = "NixOS PRG Traefik Service";
|
local.userDescription = "NixOS PRG Traefik Service";
|
||||||
local.address = "10.1.1.250";
|
local.address = "10.1.1.250";
|
||||||
|
};
|
||||||
|
|
||||||
services.traefik = {
|
services.traefik = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue