fix(nixos,deployments): wire HOMELAB_STATE_ROOT in daemon env and retire docs target
- Set HOMELAB_STATE_ROOT=/home/<operatorUser>/var/lib/homelab in homelab-appctl and homelab-gitops systemd environments so sandboxed HOME=/var/lib/homelab/appctl does not break state containment checks - Remove retired docs (homelab-doc2site) entry from config/deployments.yaml - Set HOMELAB_DEPLOYMENTS_FILE hermetically in test_appctl_daemon.py daemon_env fixture
This commit was merged in pull request #31.
This commit is contained in:
1 parent
99bda8740f
commit
2b89ff44c3
3 files changed
+3
-5
No files matched your search
@@ -21,11 +21,6 @@ repositories:
|
|||||||
aliases:
|
aliases:
|
||||||
- "homelab-jellyfin"
|
- "homelab-jellyfin"
|
||||||
- "media"
|
- "media"
|
||||||
docs:
|
|
||||||
path: "~/Sites/homelab-doc2site"
|
|
||||||
aliases:
|
|
||||||
- "doc2site"
|
|
||||||
- "homelab-doc2site"
|
|
||||||
courses:
|
courses:
|
||||||
path: "~/Sites/courses"
|
path: "~/Sites/courses"
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
@@ -123,6 +123,7 @@
|
|||||||
GITOPS_SECRET_FILE = config.sops.secrets."gitops/webhook_secret".path;
|
GITOPS_SECRET_FILE = config.sops.secrets."gitops/webhook_secret".path;
|
||||||
GITOPS_APPCTL_TOKEN_FILE = config.sops.secrets."gitops/appctl_token".path;
|
GITOPS_APPCTL_TOKEN_FILE = config.sops.secrets."gitops/appctl_token".path;
|
||||||
DOCKER_CONFIG = "/home/${config.homelab.operatorUser}/.local/state/homelab/docker";
|
DOCKER_CONFIG = "/home/${config.homelab.operatorUser}/.local/state/homelab/docker";
|
||||||
|
HOMELAB_STATE_ROOT = "/home/${config.homelab.operatorUser}/var/lib/homelab";
|
||||||
};
|
};
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@@ -199,6 +200,7 @@
|
|||||||
APPCTL_TOKENS_FILE = config.sops.secrets."appctl/tokens_json".path;
|
APPCTL_TOKENS_FILE = config.sops.secrets."appctl/tokens_json".path;
|
||||||
SITES_DIR = config.homelab.sitesDir;
|
SITES_DIR = config.homelab.sitesDir;
|
||||||
CORE_DIR = config.homelab.coreDir;
|
CORE_DIR = config.homelab.coreDir;
|
||||||
|
HOMELAB_STATE_ROOT = "/home/${config.homelab.operatorUser}/var/lib/homelab";
|
||||||
HOMELAB_CONFIG_DIR = "/home/${config.homelab.operatorUser}/.config/homelab";
|
HOMELAB_CONFIG_DIR = "/home/${config.homelab.operatorUser}/.config/homelab";
|
||||||
HOMELAB_DEPLOYMENTS_FILE = "${config.homelab.coreDir}/config/deployments.yaml";
|
HOMELAB_DEPLOYMENTS_FILE = "${config.homelab.coreDir}/config/deployments.yaml";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ def daemon_env(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
|||||||
f' path: "{docs_dir}"\n',
|
f' path: "{docs_dir}"\n',
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
|
monkeypatch.setenv("HOMELAB_DEPLOYMENTS_FILE", str(deployments_file))
|
||||||
|
|
||||||
router = OperationalRouter(
|
router = OperationalRouter(
|
||||||
audit_logger=audit_logger,
|
audit_logger=audit_logger,
|
||||||
|
|||||||
Reference in new issue
Block a user