From 928ac9f153682aa2a98213a39b6732591a8c27a6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 9 Sep 2016 19:38:12 +0200 Subject: k 4 types: add default value for user.mail --- krebs/4lib/types.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 37d44606b..02ca2b8db 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -284,6 +284,7 @@ types // rec { }; mail = mkOption { type = str; # TODO retiolum mail address + default = "${config._module.args.name}@${config.networking.hostName}.r"; }; name = mkOption { type = username; -- cgit v1.2.3 From 58c854c657b0bcbfc7e34b743cdba18675221e32 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 6 Oct 2016 19:16:42 +0200 Subject: tv nixpkgs: 2568ee3 -> 45b2a6d --- krebs/5pkgs/charybdis/default.nix | 2 +- krebs/5pkgs/dic/default.nix | 2 +- krebs/5pkgs/haskell-overrides/blessings.nix | 2 +- krebs/5pkgs/haskell-overrides/email-header.nix | 2 +- krebs/5pkgs/haskell-overrides/scanner.nix | 2 +- krebs/5pkgs/much/default.nix | 2 +- krebs/5pkgs/noVNC/default.nix | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/charybdis/default.nix b/krebs/5pkgs/charybdis/default.nix index f3e6be40e..6968be264 100644 --- a/krebs/5pkgs/charybdis/default.nix +++ b/krebs/5pkgs/charybdis/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchgit { url = "https://github.com/atheme/charybdis.git"; rev = "61815bf9324e872f51255e09fe37a8c595f94a60"; - sha256 = "0zsd6xk2cnspc1cvryy2296p3ix4hwjd9k24wmgbh5wzks0wahwy"; + sha256 = "1q9h7j2pm1wsbcybmm7r7hzimp1zda04lw9x2akb26l9p12zgfgc"; }; patches = [ diff --git a/krebs/5pkgs/dic/default.nix b/krebs/5pkgs/dic/default.nix index 3566de8cd..12cbedc60 100644 --- a/krebs/5pkgs/dic/default.nix +++ b/krebs/5pkgs/dic/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { src = fetchgit { url = https://github.com/krebscode/painload; rev = "35ccac73d563ad30d2851b9aeed4cfef69ff74e3"; - sha256 = "1y1fs2p3xj2yrqpw0h5kd0f3c5p1y70xk1hjnw99sr33r67s9c35"; + sha256 = "0arsfcd8qdrqafw7cxiag7f0kn95nwxxwrs0kdzxxdryfr6l1h07"; }; phases = [ diff --git a/krebs/5pkgs/haskell-overrides/blessings.nix b/krebs/5pkgs/haskell-overrides/blessings.nix index 741fb5c36..ba776b352 100644 --- a/krebs/5pkgs/haskell-overrides/blessings.nix +++ b/krebs/5pkgs/haskell-overrides/blessings.nix @@ -5,7 +5,7 @@ mkDerivation { src = fetchgit { url = http://cgit.cd.krebsco.de/blessings; rev = "25a510dcb38ea9158e9969d56eb66cb1b860ab5f"; - sha256 = "b962153e80e51519b52220199d8350b54154833e4bc25a792ecc58898fef3fb2"; + sha256 = "0xg329h1y68ndg4w3m1jp38pkg3gqg7r19q70gqqj4mswb6qcrqc"; }; libraryHaskellDepends = [ base ]; doHaddock = false; diff --git a/krebs/5pkgs/haskell-overrides/email-header.nix b/krebs/5pkgs/haskell-overrides/email-header.nix index 8c62f2f70..b54240809 100644 --- a/krebs/5pkgs/haskell-overrides/email-header.nix +++ b/krebs/5pkgs/haskell-overrides/email-header.nix @@ -7,8 +7,8 @@ mkDerivation { version = "0.3.0"; src = fetchgit { url = "https://github.com/4z3/email-header"; - sha256 = "f33fba567a39b1f2448869b269c26c40d8007599c23ab83bde5b4dfd9fd76ebc"; rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8"; + sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59"; }; buildDepends = [ attoparsec base base64-bytestring bytestring case-insensitive diff --git a/krebs/5pkgs/haskell-overrides/scanner.nix b/krebs/5pkgs/haskell-overrides/scanner.nix index b88b9dbe3..5146fa41d 100644 --- a/krebs/5pkgs/haskell-overrides/scanner.nix +++ b/krebs/5pkgs/haskell-overrides/scanner.nix @@ -5,7 +5,7 @@ mkDerivation { src = fetchgit { url = http://cgit.cd.krebsco.de/scanner; rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad"; - sha256 = "7d123c227777932039d26fc832b8d32a90f04c0bd6b7e8bcff0a6f49a54e0054"; + sha256 = "1lgl158axczsm4fx53fyq1d4116v91jsx4dbz66ka4k1ljqrmhgn"; }; libraryHaskellDepends = [ base ]; license = stdenv.lib.licenses.wtfpl; diff --git a/krebs/5pkgs/much/default.nix b/krebs/5pkgs/much/default.nix index efe84fbf0..61a58b01b 100644 --- a/krebs/5pkgs/much/default.nix +++ b/krebs/5pkgs/much/default.nix @@ -14,7 +14,7 @@ mkDerivation { src = fetchgit { url = "http://cgit.cd.krebsco.de/much"; rev = "045dc986b4de225a927175f81c8ccfdab450202c"; - sha256 = "cec175e3dc32ef93029ee5285f6c4042ce11d637945bc8cec02cb6699d06cc13"; + sha256 = "17jbw7x82a3bgn1qv5k764f103knrf865dmx48h7192vdh8gz766"; }; isLibrary = false; isExecutable = true; diff --git a/krebs/5pkgs/noVNC/default.nix b/krebs/5pkgs/noVNC/default.nix index 629d288ae..45c3afb3a 100644 --- a/krebs/5pkgs/noVNC/default.nix +++ b/krebs/5pkgs/noVNC/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchgit { url = https://github.com/kanaka/noVNC; rev = "refs/tags/v0.5.1"; - sha256 = "1azsnppwnrsv3axj0r5bw8lfarkibgz5vhgcyj8dzn4afn98f55w"; + sha256 = "1vckvvfcawgfqmx415r5rnl6k2alx53jbqmsj49kxpbdvvxpb49d"; }; phases = [ -- cgit v1.2.3 From 76a2187972ca8c0b7566aba78affdd032d8a1343 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 12 Oct 2016 12:14:57 +0200 Subject: remove comments from php config, phpfpm error --- krebs/3modules/rtorrent.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/rtorrent.nix b/krebs/3modules/rtorrent.nix index 57a579bc0..d53482339 100644 --- a/krebs/3modules/rtorrent.nix +++ b/krebs/3modules/rtorrent.nix @@ -336,7 +336,6 @@ let pm.min_spare_servers = 1 pm.max_spare_servers = 3 chdir = / - # errors to journal php_admin_value[error_log] = 'stderr' php_admin_flag[log_errors] = on catch_workers_output = yes -- cgit v1.2.3 From 38d26c551cf3c53151120646a893a13990b21c5c Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 19:46:11 +0200 Subject: exim: RIP --- krebs/5pkgs/exim/default.nix | 64 -------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 krebs/5pkgs/exim/default.nix (limited to 'krebs') diff --git a/krebs/5pkgs/exim/default.nix b/krebs/5pkgs/exim/default.nix deleted file mode 100644 index 835970555..000000000 --- a/krebs/5pkgs/exim/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ coreutils, fetchurl, db, openssl, pam, pcre, perl, pkgconfig, stdenv }: - -stdenv.mkDerivation rec { - name = "exim-4.87"; - - src = fetchurl { - url = "http://mirror.switch.ch/ftp/mirror/exim/exim/exim4/${name}.tar.bz2"; - sha256 = "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"; - }; - - buildInputs = [ coreutils db openssl pam pcre perl pkgconfig ]; - - preBuild = '' - sed ' - s:^\(BIN_DIRECTORY\)=.*:\1='"$out"'/bin: - s:^\(CONFIGURE_FILE\)=.*:\1=/etc/exim.conf: - s:^\(EXIM_USER\)=.*:\1=ref\:nobody: - s:^\(SPOOL_DIRECTORY\)=.*:\1=/exim-homeless-shelter: - s:^# \(SUPPORT_MAILDIR\)=.*:\1=yes: - s:^EXIM_MONITOR=.*$:# &: - s:^\(FIXED_NEVER_USERS\)=root$:\1=0: - s:^# \(WITH_CONTENT_SCAN\)=.*:\1=yes: - s:^# \(AUTH_PLAINTEXT\)=.*:\1=yes: - s:^# \(SUPPORT_TLS\)=.*:\1=yes: - s:^# \(USE_OPENSSL_PC=openssl\)$:\1: - s:^# \(LOG_FILE_PATH=syslog\)$:\1: - s:^# \(SUPPORT_PAM\)=.*:\1=yes\nEXTRALIBS=-lpam: - s:^# \(HAVE_IPV6=yes\)$:\1: - s:^# \(CHOWN_COMMAND\)=.*:\1=${coreutils}/bin/chown: - s:^# \(CHGRP_COMMAND\)=.*:\1=${coreutils}/bin/chgrp: - s:^# \(CHMOD_COMMAND\)=.*:\1=${coreutils}/bin/chmod: - s:^# \(MV_COMMAND\)=.*:\1=${coreutils}/bin/mv: - s:^# \(RM_COMMAND\)=.*:\1=${coreutils}/bin/rm: - s:^# \(TOUCH_COMMAND\)=.*:\1=${coreutils}/bin/touch: - s:^# \(PERL_COMMAND\)=.*:\1=${perl}/bin/perl: - #/^\s*#.*/d - #/^\s*$/d - ' < src/EDITME > Local/Makefile - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/man/man8 - cp doc/exim.8 $out/share/man/man8 - - ( cd build-Linux-* - cp exicyclog exim_checkaccess exim_dumpdb exim_lock exim_tidydb \ - exipick exiqsumm exigrep exim_dbmbuild exim exim_fixdb eximstats \ - exinext exiqgrep exiwhat \ - $out/bin ) - - ( cd $out/bin - for i in mailq newaliases rmail rsmtp runq sendmail; do - ln -s exim $i - done ) - ''; - - meta = { - homepage = http://exim.org/; - description = "A mail transfer agent (MTA)"; - license = stdenv.lib.licenses.gpl3; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.tv ]; - }; -} -- cgit v1.2.3 From 6c71792b6d22c7564b187fa6891fb8d36270a9ef Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:49:50 +0200 Subject: krebs lib: with lib --- krebs/4lib/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index 49241cc82..c901a1bde 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -1,9 +1,12 @@ -{ config, lib, ... }: +_: + +let + lib = import ; +in -with builtins; with lib; -let out = import // rec { +let out = lib // rec { eq = x: y: x == y; ne = x: y: x != y; -- cgit v1.2.3 From 9cb65273b1e832f1bf7d98e977a0179c81d24b44 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:01:22 +0200 Subject: lib: remove addName* --- krebs/4lib/default.nix | 5 ----- krebs/4lib/git.nix | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index c901a1bde..cf5395039 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -13,11 +13,6 @@ let out = lib // rec { mod = x: y: x - y * (x / y); - addName = name: set: - set // { inherit name; }; - - addNames = mapAttrs addName; - guard = spec@{ type, value, ... }: assert isOptionType type; if type.check value diff --git a/krebs/4lib/git.nix b/krebs/4lib/git.nix index d50ba2018..005c017a9 100644 --- a/krebs/4lib/git.nix +++ b/krebs/4lib/git.nix @@ -1,7 +1,12 @@ { lib, ... }: +with lib; + let - inherit (lib) addNames escapeShellArg makeSearchPath optionalString; + addName = name: set: + set // { inherit name; }; + + addNames = mapAttrs addName; commands = addNames { git-receive-pack = {}; -- cgit v1.2.3 From b4ec1fba50dc81df89cce88808dab1e232806cf4 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:06:43 +0200 Subject: lib: inline has-default-nix --- krebs/4lib/default.nix | 2 -- krebs/5pkgs/default.nix | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index cf5395039..b95564f74 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -28,8 +28,6 @@ let out = lib // rec { lib = lib // { inherit genid optionalTrace; }; }; - dir.has-default-nix = path: pathExists (path + "/default.nix"); - genid = import ./genid.nix { lib = lib // out; }; genid_signed = x: ((genid x) + 16777216) / 2; git = import ./git.nix { lib = lib // out; }; diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index cdab64212..75d1dac82 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -17,7 +17,7 @@ with config.krebs.lib; in {} // import ./builders.nix args // mapAttrs (_: flip callPackage {}) - (filterAttrs (_: dir.has-default-nix) + (filterAttrs (_: dir: pathExists (dir + "/default.nix")) (subdirsOf ./.)) // { empty = pkgs.runCommand "empty-1.0.0" {} "mkdir $out"; -- cgit v1.2.3 From 1a5f52234e4a21f21eb198ed0bffeb7dc2168bdf Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:18:40 +0200 Subject: krebs lib: move {eq,ne,mod} to lib --- krebs/4lib/default.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index b95564f74..3f224edd1 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -8,11 +8,6 @@ with lib; let out = lib // rec { - eq = x: y: x == y; - ne = x: y: x != y; - - mod = x: y: x - y * (x / y); - guard = spec@{ type, value, ... }: assert isOptionType type; if type.check value -- cgit v1.2.3 From 7c91a1954992db9fa06619753faa3a193a196040 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:49:04 +0200 Subject: lib: don't define defaults that require config --- krebs/3modules/makefu/default.nix | 1 + krebs/3modules/shared/default.nix | 2 ++ krebs/4lib/default.nix | 1 - krebs/4lib/types.nix | 13 +------------ 4 files changed, 4 insertions(+), 13 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index de5be964f..f5190b6ba 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -791,6 +791,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB } // { # hosts only maintained in stockholm, not owned by me muhbaasu = rec { + owner = config.krebs.users.root; cores = 1; nets = { internet = { diff --git a/krebs/3modules/shared/default.nix b/krebs/3modules/shared/default.nix index 47767d370..a9868954e 100644 --- a/krebs/3modules/shared/default.nix +++ b/krebs/3modules/shared/default.nix @@ -8,6 +8,7 @@ let "test-centos7" "test-all-krebs-modules" ] (name: { + owner = config.krebs.users.shared; inherit name; cores = 1; nets = { @@ -34,6 +35,7 @@ let in { hosts = { wolf = { + owner = config.krebs.users.shared; nets = { shack = { ip4.addr = "10.42.2.150" ; diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index 3f224edd1..c40b9a868 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -19,7 +19,6 @@ let out = lib // rec { ])); types = import ./types.nix { - inherit config; lib = lib // { inherit genid optionalTrace; }; }; diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 02ca2b8db..8d6ace2e5 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -1,14 +1,9 @@ -{ config, lib, ... }: +{ lib, ... }: with builtins; with lib; with types; -let - # Inherited attributes are used in submodules that have their own `config`. - inherit (config.krebs) build users; -in - types // rec { host = submodule ({ config, ... }: { @@ -27,7 +22,6 @@ types // rec { owner = mkOption { type = user; - default = users.krebs; }; extraZones = mkOption { @@ -49,10 +43,6 @@ types // rec { ssh.pubkey = mkOption { type = nullOr ssh-pubkey; default = null; - apply = x: - optionalTrace (x == null && config.owner.name == build.user.name) - "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused." - x; }; ssh.privkey = mkOption { type = nullOr ssh-privkey; @@ -187,7 +177,6 @@ types // rec { }; owner = mkOption { type = user; - default = users.root; }; group-name = mkOption { type = str; -- cgit v1.2.3