nix-files/hosts/common/programs/gnome-keyring/default.nix
Colin b8b805765b programs: gnome-keyring-daemon: remove the SUID wrapper
it's not actually mandated. just, when enabled, gkd will `mlock` its
secrets into memory. but i don't use swap anyway. plus, i'll enable that
momentarily anyway (though systemd will probably not understand the
capablity)
2024-02-23 09:28:41 +00:00

46 lines
1.5 KiB
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.sane.programs.gnome-keyring;
in
{
sane.programs.gnome-keyring = {
packageUnwrapped = pkgs.rmDbusServices pkgs.gnome.gnome-keyring;
persist.byStore.private = [
".local/share/keyrings"
];
fs.".local/share/keyrings/Default_keyring.keyring" = {
file.text = ''
[keyring]
display-name=Default keyring
lock-on-idle=false
lock-after=false
'';
wantedBy = [ config.sane.fs."${config.sane.persist.stores.private.origin}".unit ];
# TODO: move gnome-keyring.service under our control and then i can
# ensure ordering here.
wantedBeforeBy = [ ]; # don't create this as part of `multi-user.target`
};
fs.".local/share/keyrings/default" = {
file.text = "Default_keyring.keyring"; #< no trailing newline
wantedBy = [ config.sane.fs."${config.sane.persist.stores.private.origin}".unit ];
# TODO: move gnome-keyring.service under our control and then i can
# ensure ordering here.
wantedBeforeBy = [ ]; # don't create this as part of `multi-user.target`
};
services.gnome-keyring = {
description = "gnome-keyring-daemon: secret provider";
after = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/gnome-keyring-daemon --start --foreground --components=secrets";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
};
}