⚙ darkone.system.services
DNF service registry: every service module registers here, and the registry is resolved against the network topology.
Sub-modules (services/):
activation.nix: services enabled per host profile (config/modules.nix);caddy.nix: reverse proxy vhosts, TLS, HTTP(S) firewall;oauth2-proxy.nix: Kanidm SSO of the protected services.
Activation (activation.nix)
Section titled “Activation (activation.nix)”Each host profile enabled on a host, directly or through another one
(laptop → desktop → minimal), turns on the services its triggers name:
triggers.always, or triggers.keys.<key> when <key> is under the host’s
services: in etc/config.yaml.
Reverse proxy (caddy.nix)
Section titled “Reverse proxy (caddy.nix)”One Caddy vhost per resolved service, plus the HTTP(S) firewall of zone gateways and of the HCS.
SSO (oauth2-proxy.nix)
Section titled “SSO (oauth2-proxy.nix)”oauth2-proxy in front of the protected services of a zone, backed by the
Kanidm internal-service OAuth2 client.
Options
Section titled “Options”- enable
boolEnable DNF services manager to register and expose services - service
attrsGlobal services configuration <name>- enable
boolEnable service proxy - defaultParams
submoduleThese options are computed bydnfLib.extractServiceParams- domain
strDomain name for the service - title
strDisplay name in homepage - description
strService description for homepage - icon
strIcon name for homepage 🡕 - global
boolGlobal service is accessible on Internet - noRobots
boolPrevent robots from scanning if global is true - fqdn
strCalculated FQDN or the service before the reverse proxy - href
strCalculated URL of the service before the reverse proxy - ip
strCalculated IP to contact the service
- domain
- displayOnHomepage
boolDisplay a link on homepage - persist.dirs
listOf strService persistant dirs - persist.files
listOf strService persistant files - persist.dbDirs
listOf strService persistant dirs with database(s) - persist.dbFiles
listOf strService database file(s) - persist.varDirs
listOf strVariable secondary files (log, cache, etc.) - persist.mediaDirs
listOf strService media dirs (pictures, videos, big files) - proxy.enable
boolWhether to create virtualHost configuration (false for services that manage their own) - proxy.isProtected
boolOauth2 protected service - proxy.allowedGroups
listOf strKanidm groups allowed on this protected service (empty = any authenticated user) - proxy.spaceMembersOnly
boolRestrict to the members of the instance host’s AI space (Kanidm groupspace-<host>); implies isProtected - proxy.tailnetIdentity
boolIdentify a member’s personal tailnet device without the SSO, for clients unable to follow the login flow; requires spaceMembersOnly - proxy.isInternal
boolBind service on internal interface only (not internet accessible) - proxy.hasReverseProxy
boolThis is a reverse proxy (or another virtualhost configuration via extraConfig) - proxy.defaultService
boolIs the default service - proxy.servicePort
nullOr portService internal port - proxy.preExtraConfig
linesExtra caddy virtualHost configuration (prefix) - proxy.extraConfig
linesExtra caddy virtualHost configuration - proxy.extraGlobalConfig
linesExtra caddy configuration - proxy.scheme
strInternal service scheme (http / https)
- enable
- resolved
rawResolved service registry.
darkone.system.services = { enable = false; service.enable = false; service.defaultParams.domain = ""; service.defaultParams.title = ""; service.defaultParams.description = ""; service.defaultParams.icon = ""; service.defaultParams.global = false; service.defaultParams.noRobots = true; service.defaultParams.fqdn = ""; service.defaultParams.href = ""; service.defaultParams.ip = ""; service.displayOnHomepage = true; service.persist.dirs = [ ]; service.persist.files = [ ]; service.persist.dbDirs = [ ]; service.persist.dbFiles = [ ]; service.persist.varDirs = [ ]; service.persist.mediaDirs = [ ]; service.proxy.enable = true; service.proxy.isProtected = false; service.proxy.allowedGroups = [ ]; service.proxy.spaceMembersOnly = false; service.proxy.tailnetIdentity = false; service.proxy.isInternal = false; service.proxy.hasReverseProxy = true; service.proxy.defaultService = false; service.proxy.servicePort = null; service.proxy.preExtraConfig = ""; service.proxy.extraConfig = ""; service.proxy.extraGlobalConfig = ""; service.proxy.scheme = "https"; resolved = { inherit services hasProtectedServices authHost; };};Source: modules/system/services.nix 🡕