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

treewide: remove with lib (#6871)

Remove from services.
This commit is contained in:
Austin Horstman 2025-04-21 09:00:59 -07:00 committed by GitHub
parent 6695b1d477
commit 82ee14ff60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
124 changed files with 1848 additions and 1891 deletions

View file

@ -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}" ];
};