fix openssh secrets
All checks were successful
checks / check-links (pull_request) Successful in 20s
checks / checks-impure (pull_request) Successful in 1m52s
checks / checks (pull_request) Successful in 3m55s

change facts path to be the full path

sshd: fixup store path
This commit is contained in:
Jörg Thalheim 2024-03-13 14:26:39 +01:00
parent 08e8027347
commit a6d52a669d
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
services.openssh.enable = true;
services.openssh.hostKeys = [{
path = config.clanCore.secrets.openssh.secrets."ssh.id_ed25519".path;
path = builtins.storePath config.clanCore.secrets.openssh.secrets."ssh.id_ed25519".path;
type = "ed25519";
}];

View File

@ -147,14 +147,14 @@
description = ''
path to a fact which is generated by the generator
'';
default = "machines/${config.clanCore.machineName}/facts/${fact.config._module.args.name}";
default = "${config.clanCore.clanDir}/machines/${config.clanCore.machineName}/facts/${fact.config._module.args.name}";
};
value = lib.mkOption {
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
type = lib.types.nullOr lib.types.str;
default =
if builtins.pathExists "${config.clanCore.clanDir}/${fact.config.path}" then
lib.strings.removeSuffix "\n" (builtins.readFile "${config.clanCore.clanDir}/${fact.config.path}")
if builtins.pathExists fact.config.path then
lib.strings.fileContents fact.config.path
else
null;
};