mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/yggdrasil: Fix stray 0-byte /private-key file (#538065)
This commit is contained in:
commit
8bb61a40df
1 changed files with 3 additions and 10 deletions
|
|
@ -33,17 +33,11 @@ let
|
|||
else
|
||||
null;
|
||||
|
||||
# Build base configuration with systemd credential path override
|
||||
baseSettings =
|
||||
cfg.settings
|
||||
// (
|
||||
if effectiveKeyPath != null then
|
||||
{
|
||||
PrivateKeyPath = "/private-key";
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
// lib.optionalAttrs (effectiveKeyPath != null) {
|
||||
PrivateKeyPath = "/run/credentials/yggdrasil.service/private-key";
|
||||
};
|
||||
|
||||
# Remove null values that yggdrasil doesn't expect
|
||||
cleanSettings = lib.filterAttrs (n: v: v != null) baseSettings;
|
||||
|
|
@ -327,7 +321,6 @@ in
|
|||
StateDirectory = "yggdrasil";
|
||||
RuntimeDirectory = "yggdrasil";
|
||||
RuntimeDirectoryMode = "0750";
|
||||
BindReadOnlyPaths = lib.optional (effectiveKeyPath != null) "%d/private-key:/private-key";
|
||||
LoadCredential = lib.optional (effectiveKeyPath != null) "private-key:${effectiveKeyPath}";
|
||||
|
||||
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue