···
cfg = config.services.hologram-server;
···
services.hologram-server = {
38
+
enable = lib.mkOption {
39
+
type = lib.types.bool;
description = "Whether to enable the Hologram server for AWS instance credentials";
47
-
listenAddress = mkOption {
44
+
listenAddress = lib.mkOption {
45
+
type = lib.types.str;
default = "0.0.0.0:3100";
description = "Address and port to listen on";
53
-
ldapHost = mkOption {
50
+
ldapHost = lib.mkOption {
51
+
type = lib.types.str;
description = "Address of the LDAP server to use";
58
-
ldapInsecure = mkOption {
55
+
ldapInsecure = lib.mkOption {
56
+
type = lib.types.bool;
description = "Whether to connect to LDAP over SSL or not";
64
-
ldapUserAttr = mkOption {
61
+
ldapUserAttr = lib.mkOption {
62
+
type = lib.types.str;
description = "The LDAP attribute for usernames";
70
-
ldapBaseDN = mkOption {
67
+
ldapBaseDN = lib.mkOption {
68
+
type = lib.types.str;
description = "The base DN for your Hologram users";
75
-
ldapBindDN = mkOption {
72
+
ldapBindDN = lib.mkOption {
73
+
type = lib.types.str;
description = "DN of account to use to query the LDAP server";
80
-
ldapBindPassword = mkOption {
77
+
ldapBindPassword = lib.mkOption {
78
+
type = lib.types.str;
description = "Password of account to use to query the LDAP server";
85
-
enableLdapRoles = mkOption {
82
+
enableLdapRoles = lib.mkOption {
83
+
type = lib.types.bool;
description = "Whether to assign user roles based on the user's LDAP group memberships";
91
-
groupClassAttr = mkOption {
88
+
groupClassAttr = lib.mkOption {
89
+
type = lib.types.str;
default = "groupOfNames";
description = "The objectclass attribute to search for groups when enableLdapRoles is true";
97
-
roleAttr = mkOption {
94
+
roleAttr = lib.mkOption {
95
+
type = lib.types.str;
default = "businessCategory";
description = "Which LDAP group attribute to search for authorized role ARNs";
103
-
awsAccount = mkOption {
100
+
awsAccount = lib.mkOption {
101
+
type = lib.types.str;
description = "AWS account number";
108
-
awsDefaultRole = mkOption {
105
+
awsDefaultRole = lib.mkOption {
106
+
type = lib.types.str;
description = "AWS default role";
113
-
statsAddress = mkOption {
110
+
statsAddress = lib.mkOption {
111
+
type = lib.types.str;
description = "Address of statsd server";
119
-
cacheTimeoutSeconds = mkOption {
116
+
cacheTimeoutSeconds = lib.mkOption {
117
+
type = lib.types.int;
description = "How often (in seconds) to refresh the LDAP cache";
127
-
config = mkIf cfg.enable {
124
+
config = lib.mkIf cfg.enable {
systemd.services.hologram-server = {
description = "Provide EC2 instance credentials to machines outside of EC2";
after = [ "network.target" ];