2024-02-23 07:19:14 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
sane.programs.gnome-keyring = {
|
|
|
|
packageUnwrapped = pkgs.gnome.gnome-keyring;
|
|
|
|
|
|
|
|
persist.byStore.private = [
|
|
|
|
".local/share/keyrings"
|
|
|
|
];
|
|
|
|
|
2024-02-23 08:14:09 +00:00
|
|
|
fs.".local/share/keyrings/Default_keyring.keyring" = {
|
2024-02-23 08:57:41 +00:00
|
|
|
file.text = ''
|
|
|
|
[keyring]
|
|
|
|
display-name=Default keyring
|
|
|
|
lock-on-idle=false
|
|
|
|
lock-after=false
|
|
|
|
'';
|
2024-02-23 08:14:09 +00:00
|
|
|
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`
|
|
|
|
};
|
2024-02-23 07:19:14 +00:00
|
|
|
fs.".local/share/keyrings/default" = {
|
2024-02-23 08:57:41 +00:00
|
|
|
file.text = "Default_keyring.keyring"; #< no trailing newline
|
2024-02-23 08:14:09 +00:00
|
|
|
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`
|
2024-02-23 07:19:14 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# adds gnome-keyring as a xdg-data-portal (xdg.portal)
|
|
|
|
# TODO: the gnome-keyring which this puts on PATH isn't sandboxed!
|
|
|
|
# nixos service doesn't even let it be pluggable
|
|
|
|
services.gnome.gnome-keyring = lib.mkIf config.sane.programs.gnome-keyring.enabled {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
}
|