aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/desktops/gnome3/gnome-keyring.nix
blob: db60445ef7731dfba3f25037954386da2f68148d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# GNOME Keyring daemon.

{ config, pkgs, lib, ... }:

with lib;

{

  ###### interface

  options = {

    services.gnome3.gnome-keyring = {

      enable = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Whether to enable GNOME Keyring daemon, a service designed to
          take care of the user's security credentials,
          such as user names and passwords.
        '';
      };

    };

  };


  ###### implementation

  config = mkIf config.services.gnome3.gnome-keyring.enable {

    environment.systemPackages = [ pkgs.gnome3.gnome-keyring ];

    services.dbus.packages = [ pkgs.gnome3.gnome-keyring pkgs.gcr ];

    security.pam.services.login.enableGnomeKeyring = true;

    security.wrappers.gnome-keyring-daemon = {
      source = "${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon";
      capabilities = "cap_ipc_lock=ep";
    };

  };

}