mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
glance: Init module
This commit is contained in:
parent
fd5acfbcf6
commit
3abf299cd6
2 changed files with 35 additions and 0 deletions
|
|
@ -72,6 +72,11 @@
|
||||||
domain = "status.${config.custom.networking.overlay.domain}";
|
domain = "status.${config.custom.networking.overlay.domain}";
|
||||||
generateDefaultEndpoints = true;
|
generateDefaultEndpoints = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
glance = {
|
||||||
|
enable = true;
|
||||||
|
domain = "home.${config.custom.networking.overlay.domain}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
modules/nixos/web-services/glance.nix
Normal file
30
modules/nixos/web-services/glance.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.custom.web-services.glance;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom.web-services.glance = {
|
||||||
|
enable = lib.mkEnableOption "";
|
||||||
|
domain = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 63958;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.glance = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
inherit (cfg) port;
|
||||||
|
|
||||||
|
#pages
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue