hive-priv: create the nixos-containers directories at boot
This commit is contained in:
parent
a437f9ccd5
commit
bf77b72217
1 changed files with 42 additions and 5 deletions
|
|
@ -43,10 +43,17 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf config.services.hyperhive.deploy.hive-controller.enable {
|
||||
# The parent of every agent socket dir. hive-priv is its only writer
|
||||
# (`EnsureAgentSocketDir`), and its unit lists it in `ReadWritePaths`,
|
||||
# which fails the unit when the path is missing.
|
||||
systemd.tmpfiles.rules = [ "d /run/hive-agent 0755 root root - -" ];
|
||||
# Every directory hive-priv writes to that nothing else creates before it
|
||||
# starts. Its unit lists them in `ReadWritePaths`, which fails the unit
|
||||
# (226/NAMESPACE) when a path is missing:
|
||||
# /run/hive-agent parent of every agent socket dir
|
||||
# /etc/nixos-containers exists only once a container is declared
|
||||
# /var/lib/nixos-containers same; 0700 is the mode nixos-container gives it
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /run/hive-agent 0755 root root - -"
|
||||
"d /etc/nixos-containers 0755 root root - -"
|
||||
"d /var/lib/nixos-containers 0700 root root - -"
|
||||
];
|
||||
|
||||
assertions = [
|
||||
(
|
||||
|
|
|
|||
Loading…
Reference in a new issue