@@ -0,0 +1,43 @@
1+# Accounts-SSO gSignOn daemon
2+
3+{ config, lib, pkgs, ... }:
4+
5+with lib;
6+
7+let
8+ package = pkgs.gsignond.override { plugins = config.services.gsignond.plugins; };
9+in
10+{
11+
12+ ###### interface
13+
14+ options = {
15+
16+ services.gsignond = {
17+
18+ enable = mkOption {
19+ type = types.bool;
20+ default = false;
21+ description = ''
22+ Whether to enable gSignOn daemon, a DBus service
23+ which performs user authentication on behalf of its clients.
24+ '';
25+ };
26+
27+ plugins = mkOption {
28+ type = types.listOf types.package;
29+ default = [];
30+ description = ''
31+ What plugins to use with the gSignOn daemon.
32+ '';
33+ };
34+ };
35+ };
36+
37+ ###### implementation
38+ config = mkIf config.services.gsignond.enable {
39+ environment.etc."gsignond.conf".source = "${package}/etc/gsignond.conf";
40+ services.dbus.packages = [ package ];
41+ };
42+
43+}