1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2024-12-14 11:57:52 +00:00

fixup! Rename passwordFile to hashedPasswordFile

This commit is contained in:
pizmovc 2023-11-05 14:40:23 +01:00 committed by mergify[bot]
parent 4e3f66f703
commit 0a9d5e41f6

View file

@ -25,7 +25,7 @@
user-passwords = makeTest {
name = "sops-user-passwords";
nodes.machine = { config, ... }: {
nodes.machine = { config, lib, ... }: {
imports = [ ../../modules/sops ];
sops = {
age.keyFile = ./test-assets/age-keys.txt;
@ -34,9 +34,16 @@
secrets."nested/test/file".owner = "example-user";
};
users.users.example-user = {
users.users.example-user = let
passwordFileKey =
if (lib.versionAtLeast (lib.versions.majorMinor lib.version)
"23.11") then
"hashedPasswordFile"
else
"passwordFile";
in {
isNormalUser = true;
hashedPasswordFile = config.sops.secrets.test_key.path;
${passwordFileKey} = config.sops.secrets.test_key.path;
};
};