2023-01-28 20:49:10 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.crypto;
|
2023-01-28 20:49:10 +00:00
|
|
|
in {
|
2021-05-30 19:10:28 +00:00
|
|
|
options.pub-solar.crypto = {
|
|
|
|
enable = mkEnableOption "Life in private";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-01-28 20:49:10 +00:00
|
|
|
services.udev.packages = [pkgs.yubikey-personalization];
|
|
|
|
services.dbus.packages = [pkgs.gcr];
|
2021-05-30 19:10:28 +00:00
|
|
|
services.pcscd.enable = true;
|
|
|
|
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
home-manager = with pkgs;
|
|
|
|
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
|
|
|
systemd.user.services.polkit-gnome-authentication-agent = import ./polkit-gnome-authentication-agent.service.nix pkgs;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
services.gpg-agent = {
|
|
|
|
enable = true;
|
|
|
|
pinentryFlavor = "gnome3";
|
|
|
|
verbose = true;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
programs.gpg = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
home.packages = [
|
|
|
|
gnome.seahorse
|
|
|
|
keepassxc
|
|
|
|
libsecret
|
|
|
|
qMasterPassword
|
|
|
|
restic
|
|
|
|
];
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|