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:
parent
4e3f66f703
commit
0a9d5e41f6
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue