Service modules
✨ darkone.service.adguardhome
Section titled “✨ darkone.service.adguardhome”Full-configured AdGuard Home for local gateway / router.
- enable
boolEnable local adguardhome service
darkone.service.adguardhome.enable = false;✨ darkone.service.ai
Section titled “✨ darkone.service.ai”Local Artifical Intelligence (open-webui + ollama + llms).
- enable
boolEnable local AI service
darkone.service.ai.enable = false;✨ darkone.service.audio
Section titled “✨ darkone.service.audio”Audio services: alsa, pulse (not jack for the moment).
Automatically adds users to the audio group when enabled.
- enable
boolEnable sound system
darkone.service.audio.enable = false;✨ darkone.service.dnsmasq
Section titled “✨ darkone.service.dnsmasq”Pre-configured dnsmasq for local gateway / router.
- enable
boolEnable local dnsmasq service
darkone.service.dnsmasq.enable = false;✨ darkone.service.docs
Section titled “✨ darkone.service.docs”A full-configured LaSuite Docs module.
- enable
boolEnable local docs service - s3Host
strS3 backend hostname - s3Port
portS3 backend port - s3Bucket
strS3 bucket name for document storage
darkone.service.docs = { enable = false; s3Host = "127.0.0.1"; s3Port = dnfConfig.network.ports.garage; s3Bucket = "docs";};✨ darkone.service.element
Section titled “✨ darkone.service.element”Element web client for local matrix service.
- enable
boolEnable local element service
darkone.service.element.enable = false;✨ darkone.service.fail2ban
Section titled “✨ darkone.service.fail2ban”Fail2ban DNF specific module.
- enable
boolEnable fail2ban with DNF specificities
darkone.service.fail2ban.enable = false;✨ darkone.service.forgejo
Section titled “✨ darkone.service.forgejo”A full-configured forgejo git forge.
- enable
boolEnable local forgejo service
darkone.service.forgejo.enable = false;✨ darkone.service.garage
Section titled “✨ darkone.service.garage”A full-configured local Garage S3 service.
Provides an internal S3-compatible object storage backend accessible only on 127.0.0.1:3900.
- enable
boolEnable local Garage S3 service - srvPort
portS3 API port exposed on the internal IP - s3Region
strS3 region name (must match consumer config) - capacity
strNode storage capacity hint passed togarage layout assign. Used only at first boot for layout initialization; does not act as a hard quota on the underlying filesystem. Supported suffixes: B, KB, MB, GB, TB, PB.
darkone.service.garage = { enable = false; srvPort = srvPort; s3Region = s3Region; capacity = "500GB";};✨ darkone.service.geneweb
Section titled “✨ darkone.service.geneweb”GeneWeb — Powerful Genealogy Service.
- enable
boolEnable local GeneWeb genealogy service - enablePasswords
boolEnable sops passwords (not recommanded)
darkone.service.geneweb = { enable = false; enablePasswords = false;};✨ darkone.service.harmonia
Section titled “✨ darkone.service.harmonia”Harmonia: local Nix binary cache server (serves this host’s /nix/store).
Exposes locally built / realised store paths over plain HTTP (port 5000),
signed with the deployment-wide binary-cache key. Enable per host from
usr/config.yaml (services.harmonia), like any other DNF service.
- enable
boolEnable a local Harmonia Nix binary cache server
darkone.service.harmonia.enable = false;✨ darkone.service.headscale
Section titled “✨ darkone.service.headscale”A full-configured headscale service for HCS.
- enable
boolEnable headscale DNF service - enableGRPC
boolOpen GRPC TCP port
darkone.service.headscale = { enable = false; enableGRPC = false;};✨ darkone.service.home-assistant
Section titled “✨ darkone.service.home-assistant”A Home Assistant with some plugins (wip).
- enable
boolEnable home assitant
darkone.service.home-assistant.enable = false;✨ darkone.service.homepage
Section titled “✨ darkone.service.homepage”Dynamically configured homepage dashboard for your local network.
- enable
boolEnable homepage dashboard + httpd + host - protect
boolRestrict homepage to authenticated Kanidm users (oauth2-proxy forward auth) - localServices
listOf attrsServices to add in Local Applications section - globalServices
listOf attrsFull network common & public-accessible services - remoteServices
listOf attrsServices to add in Remote Applications section - bookmarks
listOf attrsReplace default bookmarks (links) - widgets
listOf attrsReplace default widgets
darkone.service.homepage = { enable = false; protect = true; localServices = [ ]; globalServices = [ ]; remoteServices = [ ]; bookmarks = [ ]; widgets = [ ];};✨ darkone.service.idm
Section titled “✨ darkone.service.idm”Kanidm (identity manager) DNF Service.
- enable
boolEnable local SSO with Kanidm - oauth2
attrsOAuth2/OIDC client templates contributed by service modules. Kanidm provisions one client per matching entry innetwork.services, withclientId = dnfLib.oauth2ClientName.- enable
boolWhether to provision OAuth2 clients for this template. - clientName
nullOr strOverride the kanidm client name. Defaults to dnfLib.oauth2ClientName. - displayName
strHuman-readable name shown on the kanidm consent screen. - imageFile
pathApplication icon. Re-uploaded on every kanidm-provision run. - redirectPaths
listOf strOAuth2 redirect paths (one per accepted callback URL). - landingPath
strAuto-connect entry point path on the service. - enableLegacyCrypto
boolAllow legacy JWT signing algorithms (eg. RS256). - allowInsecureClientDisablePkce
boolDisable PKCE on the client (only for clients that do not implement it). - preferShortUsername
nullOr boolUse the short username (no domain) in thepreferred_usernameclaim. - extra
attrsExtra attributes merged into the provisioned client (claimMaps, etc).
- enable
darkone.service.idm = { enable = false; oauth2.enable = true; oauth2.clientName = null; oauth2.displayName = null; oauth2.imageFile = null; oauth2.redirectPaths = [ ]; oauth2.landingPath = "/"; oauth2.enableLegacyCrypto = false; oauth2.allowInsecureClientDisablePkce = false; oauth2.preferShortUsername = null; oauth2.extra = { };};✨ darkone.service.immich
Section titled “✨ darkone.service.immich”Immich (photo management) full-configured service.
- enable
boolEnable local immich service - enableMachineLearning
boolEnable machine learning features (face recognition, object detection) - enableRedis
boolEnable Redis for caching (recommended for performance)
darkone.service.immich = { enable = false; enableMachineLearning = false; enableRedis = false;};✨ darkone.service.jellyfin
Section titled “✨ darkone.service.jellyfin”A full-configured jellyfin server.
- enable
boolEnable jellyfin service
darkone.service.jellyfin.enable = false;✨ darkone.service.jitsi-meet
Section titled “✨ darkone.service.jitsi-meet”A full-configured jitsi-meet service.
- enable
boolEnable local jitsi-meet service
darkone.service.jitsi-meet.enable = false;✨ darkone.service.loki
Section titled “✨ darkone.service.loki”Loki + Alloy, http stats with grafana.
- enable
boolDeploys the Loki server + Grafana datasource (colocated with Grafana). - isClient
boolDeploys Alloy to collect local Caddy access logs. - retentionTime
strLog retention duration in Loki (30 days by default).
darkone.service.loki = { enable = config.darkone.service.monitoring.enable; isClient = config.services.caddy.enable; retentionTime = "720h";};✨ darkone.service.matrix
Section titled “✨ darkone.service.matrix”DNF matrix (synapse) server with mautrix bridges.
Bridges (whatsapp, signal, telegram, messenger, discord) are usable by every
local account: each user links its own remote account by talking to the
bridge bot (@whatsappbot, @signalbot, … then login); sessions are
isolated per user. The declared network.matrix.admin administrates the
bridges.
Double puppeting uses the official appservice method
(https://docs.mau.fi/bridges/general/double-puppeting.html 🡕): a shared
doublepuppet appservice token lets bridges send remote-originated messages
as the user’s real matrix account. Required sops secrets:
mautrix-doublepuppet-as-token and mautrix-doublepuppet-hs-token
(openssl rand -hex 32 each).
Every bridge’s appservice as/hs tokens are sops-provided rather than auto-generated: the registration file becomes a pure function of the secrets, so resetting a bridge’s state dir never invalidates the registration synapse has loaded (which would otherwise require a registration wipe + synapse restart and produce “as_token was not accepted” errors).
Federation
Section titled “Federation”Federation is configurable via darkone.service.matrix.federation:
enable = false: blocks all federation (empty domain whitelist).enable = true; whitelist = [ ]: open federation with every server.enable = true; whitelist = [ "ami.org" ]: allowlist (inbound + outbound).
Discovery stays locked regardless (rooms absent from remote directories, profiles private over federation), so the network is reachable but not searchable.
Friend self-registration (friendRegistration.enable) opens token-gated
local password accounts alongside Kanidm OIDC users. Minting a token needs a
server admin (Synapse admin API / Synapse-Admin UI); with MAS enabled, mint
with mas-cli manage issue-user-registration-token on the host instead.
Next-gen auth (MAS)
Section titled “Next-gen auth (MAS)”mas.enable delegates all authentication to Matrix Authentication Service
(required by Element X, QR login, /account self-service portal). Kanidm
stays the identity source: MAS becomes the OIDC client instead of synapse,
and synapse only asks MAS to introspect tokens. Served on the same vhost:
MAS owns the root + compat auth endpoints, synapse keeps /_matrix/* and
/_synapse/*; client discovery is automatic (synapse serves
auth_metadata itself), so no well-known change.
Required sops secrets (openssl rand -hex 32 unless stated):
mas-encryption-secret, mas-synapse-secret, and mas-rsa-private-key
(openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096).
- enable
boolEnable matrix (synapse) service - federation.enable
boolAllow server-to-server federation. False blocks all federation. - federation.whitelist
listOf strEmpty = federate with all servers; non-empty = only these domains (inbound + outbound). - mas.enable
boolDelegate all authentication to Matrix Authentication Service (Element X support). - friendRegistration.enable
boolAllow friends to self-register with an invite token (token-gated). - bridges.whatsapp.enable
boolMautrix WhatsApp bridge (login by QR code). - bridges.signal.enable
boolMautrix Signal bridge (login by QR code). - bridges.telegram.enable
boolMautrix Telegram bridge (login by phone number). - bridges.messenger.enable
boolMautrix Facebook Messenger bridge (login by cookies). - bridges.discord.enable
boolMautrix Discord bridge (login by QR code, experimental).
darkone.service.matrix = { enable = false; federation.enable = true; federation.whitelist = [ ]; mas.enable = false; friendRegistration.enable = false; bridges.whatsapp.enable = true; bridges.signal.enable = true; bridges.telegram.enable = true; bridges.messenger.enable = true; bridges.discord.enable = false;};✨ darkone.service.mealie
Section titled “✨ darkone.service.mealie”Mealie Recipe Management
- enable
boolEnable mealie service
darkone.service.mealie.enable = false;✨ darkone.service.minio
Section titled “✨ darkone.service.minio”A full-configured local MinIO S3 service. (wip)
Provides an internal S3-compatible object storage backend accessible only on 127.0.0.1:9000. The console web UI runs on 127.0.0.1:9001 for administration and debugging.
- enable
boolEnable local MinIO S3 service
darkone.service.minio.enable = false;✨ darkone.service.monitoring
Section titled “✨ darkone.service.monitoring”Supervision module: Grafana dashboards + per-node exporter.
- enable
boolEnable monitoring with prometheus, grafana and node exporter - isNode
boolIs a monitoring node - kioskTarget
strTarget (relative, no/) for the automatic redirect to Grafana from the monitoring domain root. Overridden by the Loki module when active to point to a multi-source home dashboard.
darkone.service.monitoring = { enable = false; isNode = lib.hasAttrByPath [ "features" "monitoring-node" ] host; kioskTarget = "d/dnf-monitoring-home/home?kiosk";};✨ darkone.service.nextcloud
Section titled “✨ darkone.service.nextcloud”Nextcloud full-configured service.
- enable
boolEnable local nextcloud service - adminUser
strAdmin username for Nextcloud - plugins
listOf (enum (appstoreApps ++ shippedToggleableApps))Nextcloud apps to enable. Onlycalendarandcontactsare on by default; Talk (spreed), the dashboard, activity feed, photos, and every other app stay disabled until listed here.
user_oidc is required for Kanidm SSO and is force-included
regardless of this list.
darkone.service.nextcloud = { enable = false; adminUser = "admin"; plugins = [ ];};✨ darkone.service.nfs
Section titled “✨ darkone.service.nfs”NFS server + client for home shares.
- enable
boolEnable NFS DNF server (avoid enable manually) - serverDomain
strNFS Server FQDN
darkone.service.nfs = { enable = hasServer && (isServer || isClient); serverDomain = "nfs";};✨ darkone.service.nix-cache
Section titled “✨ darkone.service.nix-cache”Per-zone Nix binary-cache proxy (nginx proxy_cache).
Caches the public Nix cache (cache.nixos.org) on the zone gateway so a
fleet-wide deploy pulls each closure from the WAN once, then serves it over
the LAN to every other host. Locally built paths are served straight from
harmonia (see harmonia.nix); this proxy never fronts harmonia.
- enable
boolthe per-zone Nix binary-cache proxy (nginx in front of cache.nixos.org) - maxSize
strMaximum on-disk cache size; nginx evicts least-recently-used entries beyond it. - roaming
boolNomadic host (laptop moved between zones): replace the zone-pinned substituters with the zone-neutral names every zone’s DNS resolves to its own cache services. Outside any DNF zone the names NXDOMAIN instantly and Nix falls back to cache.nixos.org.
darkone.service.nix-cache = { enable = false; maxSize = "40g"; roaming = false;};✨ darkone.service.outline
Section titled “✨ darkone.service.outline”A full-configured outline wiki.
- enable
boolEnable local outline service
darkone.service.outline.enable = false;✨ darkone.service.oxicloud
Section titled “✨ darkone.service.oxicloud”OxiCloud — Fast Sovereign Cloud (file storage, WebDAV, CalDAV & CardDAV).
- enable
boolEnable local OxiCloud service
darkone.service.oxicloud.enable = false;✨ darkone.service.postfix
Section titled “✨ darkone.service.postfix”Postfix SMTP Relay.
- enable
boolEnable Postfix SMTP Relay
darkone.service.postfix.enable = false;✨ darkone.service.printing
Section titled “✨ darkone.service.printing”Printers and scanners.
- enable
boolDefault useful packages - loadAll
boolFull printers and scanners - enableScanners
boolEnable scanners - enableHpPrinters
boolHP printers only - enableManualInstall
boolManual drivers installation
darkone.service.printing = { enable = false; loadAll = false; enableScanners = false; enableHpPrinters = false; enableManualInstall = false;};✨ darkone.service.prometheus
Section titled “✨ darkone.service.prometheus”Prometheus monitoring server with declarative Alertmanager escalation.
- enable
boolEnable the Prometheus metrics + alerting server - retentionTime
strPrometheus metrics retention duration - alerting.enable
boolEnable Alertmanager (defaults on once the Matrix alert rooms are provisioned) - alerting.matrix.enable
boolDeliver alerts to Matrix rooms via the matrix-alertmanager bot - alerting.matrix.userId
strMatrix user ID of the alert bot (defaults from network.matrix.bot) - alerting.matrix.warningsRoom
strMatrix room ID for warnings (defaults from network.matrix.warningsRoom) - alerting.matrix.incidentsRoom
strMatrix room ID for incidents (defaults from network.matrix.incidentsRoom) - alerting.email.enable
boolAlso send critical alerts by mail (through the local Postfix relay) - alerting.email.to
strRecipient of critical alert mails - alerting.network.enable
boolProbe network reachability (gateway/tailnet/DNS) with blackbox_exporter - alerting.network.internetProbeTargets
listOf strExternal IPs the zone gateway pings to detect a WAN outage. When all fail,ZoneInternetDownfires and inhibits the (false) down-alerts of hosts reachable only across the WAN (e.g. the HCS). Empty disables it. - alerting.network.httpProbeUrls
listOf strHTTP(S) URLs probed for liveness (ServiceEndpointDown) and TLS certificate expiry (CertificateExpiringSoon/Critical). Empty by default: list the public web endpoints worth watching. Redirects to an SSO login (3xx) count as up; cert expiry is read from the TLS handshake regardless of HTTP status. - alerting.silenceOnRebuild
boolShip the dnf-maintenance flag (textfile collector) so rebuilds inhibit a node’s alerts - alerting.thresholds
attrsOverride resource alert thresholds (see dnf/lib/alerts.nix defaults)
darkone.service.prometheus = { enable = false; retentionTime = "30d"; alerting.enable = roomsReady; alerting.matrix.enable = true; alerting.matrix.userId = "@alertbot:poncon.fr"; alerting.matrix.warningsRoom = "!warnings:poncon.fr"; alerting.matrix.incidentsRoom = "!incidents:poncon.fr"; alerting.email.enable = true; alerting.email.to = "admin@${network.domain}"; alerting.network.enable = true; alerting.network.internetProbeTargets = [ ]; alerting.network.httpProbeUrls = [ ]; alerting.silenceOnRebuild = true; alerting.thresholds = { };};✨ darkone.service.restic
Section titled “✨ darkone.service.restic”Restic backup module: REST server + per-host backup targets.
Example (machine config):
darkone.service.restic = { enable = true; targets = [ { name = "main"; root = "rest:http://restic.my-zone.my-domain.tld:8888"; zone = "ag"; categories = [ "system" "nfs" ]; } ];};Repository layout per target:
<root>/<hostname>/system <- "system" category (/ minus excludes)<root>/<hostname>/srv/nfs <- "nfs" category (/srv/nfs/<...>)<root>/<hostname>/srv/medias <- "medias" category (/srv/medias/<...>)- enable
boolEnable restic backup client - enableDryRun
boolDry Run mode - enableWaitRemoteFs
boolRun backups only after remote-fs.target - enableServer
boolEnable restic REST server - serverDataDir
strLocal storage root of the REST server (all hosts’ repos) - targets
listOf ( submodule { options = { name = lib.mkOption { type = str; default = "main"; description = "Target id, used in backup/unit names (<category>-<name>)"; }; root = lib.mkOption { type = str; default = "/mnt/backup/restic"; example = "rest:http://restic.${zone.domain}:${toString srvPort}"; description = "Repository root: local path or REST URL"; }; zone = lib.mkOption { type = str; default = zone.name; description = "Zone selecting the repo passphrase (restic-password-<zone>)"; }; categories = lib.mkOption { type = listOf ( enum [ "system" "nfs" "medias" ] ); default = [ "system" ]; description = "What to back up to this target"; }; }; } )Backup destinations for this host (local path or REST URL)- name
strTarget id, used in backup/unit names (<category>-<name>) - root
strRepository root: local path or REST URL - zone
strZone selecting the repo passphrase (restic-password-<zone>) - categories
listOf ( enum [ "system" "nfs" "medias" ] )What to back up to this target
- name
- nfsPaths
listOf strNFS dirs (/srv/nfs/<xxx>) included in the ‘nfs’ category - mediasPaths
listOf strMedias dirs (/srv/medias/<xxx>) included in the ‘medias’ category
darkone.service.restic = { enable = false; enableDryRun = false; enableWaitRemoteFs = false; enableServer = false; serverDataDir = "/mnt/backup/restic"; targets = [ ]; targets.name = "main"; targets.root = "rest:http://restic.${zone.domain}:${toString srvPort}"; targets.zone = zone.name; targets.categories = [ ]; nfsPaths = [ ]; mediasPaths = [ ];};✨ darkone.service.searx
Section titled “✨ darkone.service.searx”A full-configured hardened search engine.
- enable
boolEnable local search proxy
darkone.service.searx.enable = false;✨ darkone.service.tailscale
Section titled “✨ darkone.service.tailscale”Tailscale client service for HCS.
- enable
boolEnable tailscale client to connect HCS - isGateway
boolThis tailscale node is a subnet gateway - isExitNode
boolConfigure this client as exit node - selfHeal.enable
boolWatchdog: detect headscale disconnection and restart tailscaled. - autoPauseOnLan.enable
boolRoaming client: pause tailscale (down) while plugged into a known DNF zone LAN, resume it elsewhere. Non-gateway NetworkManager clients only.
darkone.service.tailscale = { enable = false; isGateway = false; isExitNode = false; selfHeal.enable = true; autoPauseOnLan.enable = false;};✨ darkone.service.turn
Section titled “✨ darkone.service.turn”Coturn server (matrix).
Add DNS entries to optimize :
Type,Name,Priority,Pds,Port,TargetSRV,_stun._udp,0,0,3478,turn.mydomain.tldSRV,_stun._tcp,0,0,3478,turn.mydomain.tldSRV,_turn._udp,0,0,3478,turn.mydomain.tldSRV,_turn._tcp,0,0,3478,turn.mydomain.tldSRV,_turns._tcp,0,0,5349,turn.mydomain.tld- enable
boolEnable local turn service (visio)
darkone.service.turn.enable = false;✨ darkone.service.vaultwarden
Section titled “✨ darkone.service.vaultwarden”A full-configured vaultwarden server (wip).
- enable
boolEnable local Vaultwarden service - enableSmtp
boolEnable SMTP to send emails (recommended)
darkone.service.vaultwarden = { enable = false; enableSmtp = true;};