1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 08:31:03 +01:00

test: update tests path for new pwd-store path

This commit is contained in:
octvs 2025-11-24 18:45:46 +01:00 committed by Austin Horstman
parent 14bc4c56fc
commit a26b74229f
9 changed files with 85 additions and 8 deletions

View file

@ -0,0 +1,9 @@
{
home.stateVersion = "25.11"; # Or any other newer version
programs.password-store.enable = true;
nmt.script = ''
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh \
'^export PASSWORD_STORE_DIR='
'';
}

View file

@ -0,0 +1,5 @@
{
password-store-default-path = ./default-path.nix;
password-store-old-default-path = ./old-default-path.nix;
password-store-nondefault-path = ./nondefault-path.nix;
}

View file

@ -0,0 +1,15 @@
let
somePath = "/some/random/path/I/store/pwds";
in
{
home.stateVersion = "25.11";
programs.password-store = {
enable = true;
settings.PASSWORD_STORE_DIR = somePath;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export PASSWORD_STORE_DIR="${somePath}"'
'';
}

View file

@ -0,0 +1,10 @@
{ config, ... }:
{
home.stateVersion = "25.05"; # <= 25.11
programs.password-store.enable = true;
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export PASSWORD_STORE_DIR="${config.xdg.dataHome}/password-store"'
'';
}

View file

@ -10,6 +10,6 @@
serviceFile=home-files/.config/systemd/user/pass-secret-service.service
assertFileExists $serviceFile
assertFileRegex $serviceFile 'ExecStart=.*/bin/pass_secret_service'
assertFileRegex $serviceFile '^ExecStart=.*/bin/pass_secret_service$'
'';
}

View file

@ -2,5 +2,7 @@
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
pass-secret-service-default-configuration = ./default-configuration.nix;
pass-secret-service-old-default-path = ./old-default-path.nix;
pass-secret-service-nondefault-path = ./nondefault-path.nix;
pass-secret-service-basic-configuration = ./basic-configuration.nix;
}

View file

@ -0,0 +1,20 @@
{ config, ... }:
let
somePath = "/some/random/path/I/store/pwds";
in
{
home.stateVersion = "25.11";
programs.password-store = {
enable = true;
settings.PASSWORD_STORE_DIR = somePath;
};
services.pass-secret-service = {
enable = true;
package = config.lib.test.mkStubPackage { };
};
nmt.script = ''
assertFileContains home-files/.config/systemd/user/pass-secret-service.service \
'ExecStart=${config.services.pass-secret-service.package}/bin/pass_secret_service --path ${somePath}'
'';
}

View file

@ -0,0 +1,17 @@
{ config, ... }:
{
home.stateVersion = "25.05"; # <= 25.11
programs.password-store.enable = true;
services.pass-secret-service = {
enable = true;
package = config.lib.test.mkStubPackage { };
};
nmt.script = ''
serviceFile=home-files/.config/systemd/user/pass-secret-service.service
assertFileExists $serviceFile
assertFileRegex $serviceFile '^ExecStart=.*/bin/pass_secret_service --path ${config.xdg.dataHome}/password-store$'
'';
}