mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
parent
6695b1d477
commit
82ee14ff60
124 changed files with 1848 additions and 1891 deletions
|
|
@ -4,24 +4,23 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
|
||||
cfg = config.services.pass-secret-service;
|
||||
|
||||
busName = "org.freedesktop.secrets";
|
||||
in
|
||||
{
|
||||
meta.maintainers = with maintainers; [
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
cab404
|
||||
cyntheticfox
|
||||
];
|
||||
|
||||
options.services.pass-secret-service = {
|
||||
enable = mkEnableOption "Pass libsecret service";
|
||||
enable = lib.mkEnableOption "Pass libsecret service";
|
||||
|
||||
package = mkPackageOption pkgs "pass-secret-service" { };
|
||||
package = lib.mkPackageOption pkgs "pass-secret-service" { };
|
||||
|
||||
storePath = mkOption {
|
||||
type = with types; nullOr str;
|
||||
|
|
@ -37,9 +36,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "services.pass-secret-service" pkgs platforms.linux)
|
||||
(lib.hm.assertions.assertPlatform "services.pass-secret-service" pkgs lib.platforms.linux)
|
||||
{
|
||||
assertion = !config.services.gnome-keyring.enable;
|
||||
message = ''
|
||||
|
|
@ -64,7 +63,7 @@ in
|
|||
|
||||
Service = {
|
||||
Type = "dbus";
|
||||
ExecStart = "${binPath} ${optionalString (cfg.storePath != null) "--path ${cfg.storePath}"}";
|
||||
ExecStart = "${binPath} ${lib.optionalString (cfg.storePath != null) "--path ${cfg.storePath}"}";
|
||||
BusName = busName;
|
||||
Environment = [ "GNUPGHOME=${config.programs.gpg.homedir}" ];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue