diff --git a/home/services/default.nix b/home/services/default.nix index 603ff47..9799edc 100644 --- a/home/services/default.nix +++ b/home/services/default.nix @@ -1,6 +1,5 @@ _: { imports = [ ./dunst.nix - ./gnome-keyring.nix ]; } diff --git a/home/services/gnome-keyring.nix b/home/services/gnome-keyring.nix deleted file mode 100644 index 6e369ad..0000000 --- a/home/services/gnome-keyring.nix +++ /dev/null @@ -1,12 +0,0 @@ -{pkgs, ...}: { - config = { - services.gnome-keyring.enable = true; - xdg.portal.config.common = { - "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; - }; - - # Enable seahorse (application for managing encryption keys - # and passwords in the gnome keyring) - home.packages = with pkgs; [ seahorse ]; - }; -} diff --git a/system/roles/workstation/services/default.nix b/system/roles/workstation/services/default.nix index 3f856bc..dcd7aee 100644 --- a/system/roles/workstation/services/default.nix +++ b/system/roles/workstation/services/default.nix @@ -4,6 +4,7 @@ ./mount.nix ./printing.nix ./misc.nix + ./gnome-keyring.nix ]; } diff --git a/system/roles/workstation/services/gnome-keyring.nix b/system/roles/workstation/services/gnome-keyring.nix new file mode 100644 index 0000000..23d8589 --- /dev/null +++ b/system/roles/workstation/services/gnome-keyring.nix @@ -0,0 +1,20 @@ +{pkgs, lib, config, ...}: let + inherit (lib) mkIf; + deviceType = config.myOptions.device.roles.type; + acceptedTypes = ["laptop" "desktop"]; +in { + config = mkIf (builtins.elem deviceType acceptedTypes) { + services = { + udev.packages = with pkgs; [gnome.gnome-settings-daemon]; + gnome.gnome-keyring.enable = true; + }; + + # seahorse is an application for managing encryption keys + # and passwords in the gnome keyring + programs.seahorse.enable = true; + + xdg.portal.config.common = { + "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; + }; + }; +}