mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-03-16 13:38:20 +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 {
|
user-passwords = makeTest {
|
||||||
name = "sops-user-passwords";
|
name = "sops-user-passwords";
|
||||||
nodes.machine = { config, ... }: {
|
nodes.machine = { config, lib, ... }: {
|
||||||
imports = [ ../../modules/sops ];
|
imports = [ ../../modules/sops ];
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = ./test-assets/age-keys.txt;
|
age.keyFile = ./test-assets/age-keys.txt;
|
||||||
|
@ -34,9 +34,16 @@
|
||||||
secrets."nested/test/file".owner = "example-user";
|
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;
|
isNormalUser = true;
|
||||||
hashedPasswordFile = config.sops.secrets.test_key.path;
|
${passwordFileKey} = config.sops.secrets.test_key.path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue