diff options
Diffstat (limited to 'virtual/eldiron.nix')
-rw-r--r-- | virtual/eldiron.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/virtual/eldiron.nix b/virtual/eldiron.nix index 30face7..63106d6 100644 --- a/virtual/eldiron.nix +++ b/virtual/eldiron.nix | |||
@@ -5,8 +5,16 @@ | |||
5 | }; | 5 | }; |
6 | 6 | ||
7 | eldiron = { config, pkgs, ... }: | 7 | eldiron = { config, pkgs, ... }: |
8 | let mypkgs = import ./packages.nix; | 8 | with import ../libs.nix; |
9 | mylibs = import ../libs.nix; | 9 | let |
10 | mypkgs = nixpkgs_unstable.callPackage ./packages.nix { | ||
11 | inherit checkEnv fetchedGitPrivate fetchedGithub; | ||
12 | gitwebOverride = nixpkgs_unstable.gitweb.overrideAttrs(old: { | ||
13 | installPhase = old.installPhase + '' | ||
14 | cp -r ${./packages/gitweb} $out/gitweb-theme; | ||
15 | ''; | ||
16 | }); | ||
17 | }; | ||
10 | in | 18 | in |
11 | { | 19 | { |
12 | # FIXME: they are not overriden in packages.nix | 20 | # FIXME: they are not overriden in packages.nix |
@@ -171,9 +179,9 @@ | |||
171 | chown redis /run/redis | 179 | chown redis /run/redis |
172 | ''; | 180 | ''; |
173 | gitolite = | 181 | gitolite = |
174 | assert mylibs.checkEnv "NIXOPS_GITOLITE_LDAP_PASSWORD"; | 182 | assert checkEnv "NIXOPS_GITOLITE_LDAP_PASSWORD"; |
175 | let | 183 | let |
176 | gitolite_ldap_groups = mylibs.wrap { | 184 | gitolite_ldap_groups = wrap { |
177 | name = "gitolite_ldap_groups.sh"; | 185 | name = "gitolite_ldap_groups.sh"; |
178 | file = ./packages/gitolite_ldap_groups.sh; | 186 | file = ./packages/gitolite_ldap_groups.sh; |
179 | vars = { | 187 | vars = { |
@@ -197,8 +205,8 @@ | |||
197 | 205 | ||
198 | environment.etc."ssh/ldap_authorized_keys" = let | 206 | environment.etc."ssh/ldap_authorized_keys" = let |
199 | ldap_authorized_keys = | 207 | ldap_authorized_keys = |
200 | assert mylibs.checkEnv "NIXOPS_SSHD_LDAP_PASSWORD"; | 208 | assert checkEnv "NIXOPS_SSHD_LDAP_PASSWORD"; |
201 | mylibs.wrap { | 209 | wrap { |
202 | name = "ldap_authorized_keys"; | 210 | name = "ldap_authorized_keys"; |
203 | file = ./ldap_authorized_keys.sh; | 211 | file = ./ldap_authorized_keys.sh; |
204 | vars = { | 212 | vars = { |
@@ -238,7 +246,7 @@ | |||
238 | }; | 246 | }; |
239 | ldap = { | 247 | ldap = { |
240 | modules = [ "ldap" "authnz_ldap" ]; | 248 | modules = [ "ldap" "authnz_ldap" ]; |
241 | extraConfig = assert mylibs.checkEnv "NIXOPS_HTTP_LDAP_PASSWORD"; '' | 249 | extraConfig = assert checkEnv "NIXOPS_HTTP_LDAP_PASSWORD"; '' |
242 | <IfModule ldap_module> | 250 | <IfModule ldap_module> |
243 | LDAPSharedCacheSize 500000 | 251 | LDAPSharedCacheSize 500000 |
244 | LDAPCacheEntries 1024 | 252 | LDAPCacheEntries 1024 |
@@ -370,7 +378,7 @@ | |||
370 | 378 | ||
371 | security.pam.services = let | 379 | security.pam.services = let |
372 | pam_ldap = pkgs.pam_ldap; | 380 | pam_ldap = pkgs.pam_ldap; |
373 | pam_ldap_mysql = assert mylibs.checkEnv "NIXOPS_MYSQL_PAM_PASSWORD"; | 381 | pam_ldap_mysql = assert checkEnv "NIXOPS_MYSQL_PAM_PASSWORD"; |
374 | pkgs.writeText "mysql.conf" '' | 382 | pkgs.writeText "mysql.conf" '' |
375 | host ldap.immae.eu | 383 | host ldap.immae.eu |
376 | base dc=immae,dc=eu | 384 | base dc=immae,dc=eu |