cleanup
This commit is contained in:
86
systems/x86_64-linux/jallen-nas/nas-defaults.nix
Normal file
86
systems/x86_64-linux/jallen-nas/nas-defaults.nix
Normal file
@@ -0,0 +1,86 @@
|
||||
# NAS-wide defaults for all mkModule services.
|
||||
#
|
||||
# Every service's configDir and dataDir default to paths on the NAS bcachefs
|
||||
# pool. Setting them here via lib.mkDefault means individual service
|
||||
# declarations in apps.nix only need to override when they deviate from the
|
||||
# convention, keeping apps.nix concise.
|
||||
#
|
||||
# The companion RequiresMountsFor in mkModule uses these paths to derive the
|
||||
# correct systemd mount dependency automatically — no service needs to hardcode
|
||||
# "media-nas-main.mount" by name.
|
||||
{ lib, namespace, ... }:
|
||||
let
|
||||
appdata = "/media/nas/main/appdata";
|
||||
data = "/media/nas/main";
|
||||
|
||||
svcDefault = name: {
|
||||
${namespace}.services.${name} = {
|
||||
configDir = lib.mkDefault appdata;
|
||||
dataDir = lib.mkDefault data;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# Bespoke services that define their own path options (not via mkModule).
|
||||
# Set NAS-specific paths here so the module defaults stay generic.
|
||||
${namespace}.services.your_spotify.configPath = lib.mkDefault "${appdata}/your_spotify";
|
||||
${namespace}.services.ocis = {
|
||||
dataPath = lib.mkDefault "${data}/ocis";
|
||||
configPath = lib.mkDefault "${appdata}/ocis";
|
||||
};
|
||||
|
||||
imports = map svcDefault [
|
||||
"actual"
|
||||
"ai"
|
||||
"arrs"
|
||||
"attic"
|
||||
"authentik"
|
||||
"authentikRac"
|
||||
"booklore"
|
||||
"caddy"
|
||||
"calibre"
|
||||
"calibre-web"
|
||||
"code-server"
|
||||
"collabora"
|
||||
"coturn"
|
||||
"crowdsec"
|
||||
"dispatcharr"
|
||||
"free-games-claimer"
|
||||
"gitea"
|
||||
"glance"
|
||||
"glances"
|
||||
"grafana"
|
||||
"guacd"
|
||||
"headscale"
|
||||
"immich"
|
||||
"jellyfin"
|
||||
"jellyseerr"
|
||||
"lubelogger"
|
||||
"manyfold"
|
||||
"matrix"
|
||||
"minecraft"
|
||||
"mongodb"
|
||||
"nebula"
|
||||
"nebula-lighthouse"
|
||||
"netbootxyz"
|
||||
"nextcloud"
|
||||
"ntfy"
|
||||
"onlyoffice"
|
||||
"opencloud"
|
||||
"orca-slicer"
|
||||
"paperless"
|
||||
"paperless-ai"
|
||||
"protonmail-bridge"
|
||||
"restic"
|
||||
"sparky-fitness"
|
||||
"sparky-fitness-server"
|
||||
"sparky-fitness-db"
|
||||
"sunshine"
|
||||
"tdarr"
|
||||
"termix"
|
||||
"tunarr"
|
||||
"unmanic"
|
||||
"uptime-kuma"
|
||||
"wyoming"
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user