You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/var/lib/yggdrasil/ is moved to /var/lib/private/yggdrasil/ and permissions are changed
Adding insult to injury, there's nothing inside that directory. This is purely systemd making our lives harder. I'd normally just override the persistent-key path, but this NixOS module doesn't really support any customization.
But this doesn't work if I want to switch NixOS configurations after boot:
$ sudo nixos-rebuild switch --flake .
building the system configuration...
activating the configuration...
setting up /etc...
A file already exists at /var/lib/yggdrasil/keys.json!
Activation script snippet 'persist-files' failed (1)
Any thoughts? If this can't be fixed here, then just say so and I'll raise the issue to nixpkgs.
The text was updated successfully, but these errors were encountered:
Yes; persisting the directory caused systemd to fail to start yggdrasil.service. Does that pattern work for other services?
Not other services specifically, but I ran across many situations where simply persisting a file would cause rebuild failures and persisting the directory wouldn't. It's disheartening to hear that it fails in this case regardless of the method.
I have machines with something like:
The NixOS module wants to do the following:
yggdrasil.service
starts, runyggdrasil-persistent-keys.service
, a one-shot which generates/var/lib/yggdrasil/keys.json
/run/yggdrasil/yggdrasil.conf
which includes that file/var/lib/yggdrasil/
is moved to/var/lib/private/yggdrasil/
and permissions are changedAdding insult to injury, there's nothing inside that directory. This is purely systemd making our lives harder. I'd normally just override the persistent-key path, but this NixOS module doesn't really support any customization.
I can work around this somewhat with:
But this doesn't work if I want to switch NixOS configurations after boot:
Any thoughts? If this can't be fixed here, then just say so and I'll raise the issue to nixpkgs.
The text was updated successfully, but these errors were encountered: