From e5259868bd1ecc636cd3926de4978a2f5a1b20ca Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sat, 16 Jul 2022 18:48:31 -0400 Subject: [PATCH] Adding gnome-keychain support --- modules/applications/gnome-common.nix | 5 +++-- modules/system/default.nix | 1 + modules/system/keyring.nix | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 modules/system/keyring.nix diff --git a/modules/applications/gnome-common.nix b/modules/applications/gnome-common.nix index 6853e99..1627369 100644 --- a/modules/applications/gnome-common.nix +++ b/modules/applications/gnome-common.nix @@ -2,6 +2,7 @@ let graphical = config.this.graphical; power = config.this.system.power; + keyring = config.this.system.keyring; in with lib; { config = mkIf graphical.enable { services.gvfs.enable = true; @@ -29,9 +30,9 @@ in with lib; { libgnome-keyring nautilus pomodoro - seahorse sushi - ] ++ optionals (power.enable) [ gnome-power-manager ]; + ] ++ optionals (power.enable) [ gnome-power-manager ] + ++ optionals (keyring.enable) [ seahorse ]; }; }; } diff --git a/modules/system/default.nix b/modules/system/default.nix index b59383c..a772a5d 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -6,6 +6,7 @@ ./flatpak.nix ./fonts.nix ./gtk.nix + ./keyring.nix ./power.nix ./xdg.nix ./yubikey.nix diff --git a/modules/system/keyring.nix b/modules/system/keyring.nix new file mode 100644 index 0000000..cc9f4d8 --- /dev/null +++ b/modules/system/keyring.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: +let cfg = config.this.system.keyring; +in with lib; { + options.this = { + system.keyring.enable = mkOption { + default = true; + type = with types; bool; + }; + }; + # options.this.system.keyring.enable = mkEnableOption "keyring"; + + config = mkIf cfg.enable { services.gnome.gnome-keyring.enable = true; }; +}