pass-secret-service: add module (#1898)
pass-secret-service is a proxy between secret service (libsecret) and pass.
This commit is contained in:
parent
827636c619
commit
b4e3f069f1
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -211,6 +211,8 @@
|
|||
|
||||
/modules/services/parcellite.nix @gleber
|
||||
|
||||
/modules/services/pass-secret-service.nix @cab404
|
||||
|
||||
/modules/services/password-store-sync.nix @pacien
|
||||
|
||||
/modules/services/pasystray.nix @pltanton
|
||||
|
|
|
@ -1897,6 +1897,15 @@ in
|
|||
A new module is available: 'programs.exa'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2021-04-23T10:00:00+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.pass-secret-service'.
|
||||
'';
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -173,6 +173,7 @@ let
|
|||
(loadModule ./services/nextcloud-client.nix { })
|
||||
(loadModule ./services/owncloud-client.nix { })
|
||||
(loadModule ./services/parcellite.nix { })
|
||||
(loadModule ./services/pass-secret-service.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/password-store-sync.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/pasystray.nix { })
|
||||
(loadModule ./services/pbgopy.nix { condition = hostPlatform.isLinux; })
|
||||
|
|
28
modules/services/pass-secret-service.nix
Normal file
28
modules/services/pass-secret-service.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let serviceCfg = config.services.pass-secret-service;
|
||||
in {
|
||||
meta.maintainers = [ maintainers.cab404 ];
|
||||
options.services.pass-secret-service = {
|
||||
enable = mkEnableOption "Pass libsecret service";
|
||||
};
|
||||
config = mkIf serviceCfg.enable {
|
||||
assertions = [{
|
||||
assertion = config.programs.password-store.enable;
|
||||
message = "The 'services.pass-secret-service' module requires"
|
||||
+ " 'programs.password-store.enable = true'.";
|
||||
}];
|
||||
|
||||
systemd.user.services.pass-secret-service = {
|
||||
Unit = { Description = "Pass libsecret service"; };
|
||||
Service = {
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
# pass-secret-service doesn't use environment variables for some reason.
|
||||
ExecStart =
|
||||
"${pkgs.pass-secret-service}/bin/pass_secret_service --path ${config.programs.password-store.settings.PASSWORD_STORE_DIR}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue