Skip to content

Commit

Permalink
feat(nix): enable gnome-keyring to store passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Feb 1, 2024
1 parent e3810b6 commit cf0ad15
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions nix/modules/nixos/desktop/addons/keyring/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.custom.desktop.addons.keyring;
in {
options.custom.desktop.addons.keyring = with types; {
enable = mkBoolOpt false "Whether to enable the gnome keyring. Required to save DE passwords";
};

config = mkIf cfg.enable {
services.gnome.gnome-keyring.enable = true;

environment.systemPackages = with pkgs; [gnome.seahorse];
};
}
2 changes: 1 addition & 1 deletion nix/modules/nixos/desktop/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in {
custom.desktop.addons = {
# electron-support = enabled;
# hyprpicker = enabled;
# keyring = enabled;
keyring = enabled;
# nautilus = enabled;
# thunar = enabled;
gtk = enabled;
Expand Down
1 change: 1 addition & 0 deletions nix/modules/nixos/system/security/keyring/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ in {
gnome.gnome-keyring
gnome.libgnome-keyring
];
security.pam.services.${config.user.name}.enableGnomeKeyring = true;
};
}

0 comments on commit cf0ad15

Please sign in to comment.