Skip to content

Commit

Permalink
fixup! Rename passwordFile to hashedPasswordFile
Browse files Browse the repository at this point in the history
  • Loading branch information
Pizmovc authored and mergify[bot] committed Nov 6, 2023
1 parent 4e3f66f commit 0a9d5e4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkgs/sops-install-secrets/nixos-test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
};
};

Expand Down

0 comments on commit 0a9d5e4

Please sign in to comment.