summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-21 00:08:18 +0200
committerlassulus <lass@aidsballs.de>2015-10-21 01:53:07 +0200
commit3ce57c3de3f3dc95669d3a0564f6f7d0ff425321 (patch)
tree58eab48c4a0c8150f3f6ad66f0e952b18d73a627 /krebs
parent8f7253184ac53792d125c6713b0757da58389b1e (diff)
stockholm: provide krebs lib
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/build.nix2
-rw-r--r--krebs/3modules/default.nix2
-rw-r--r--krebs/3modules/git.nix2
-rw-r--r--krebs/3modules/github-hosts-sync.nix3
-rw-r--r--krebs/3modules/lass/default.nix2
-rw-r--r--krebs/3modules/makefu/default.nix2
-rw-r--r--krebs/3modules/tv/default.nix2
-rw-r--r--krebs/4lib/default.nix2
-rw-r--r--krebs/5pkgs/default.nix5
-rw-r--r--krebs/default.nix7
10 files changed, 10 insertions, 19 deletions
diff --git a/krebs/3modules/build.nix b/krebs/3modules/build.nix
index 57495ea69..1205e192b 100644
--- a/krebs/3modules/build.nix
+++ b/krebs/3modules/build.nix
@@ -1,6 +1,6 @@
{ config, lib, ... }:
-with import ../4lib { inherit lib; };
+with lib;
let
target = config.krebs.build // { user.name = "root"; };
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 756245c0b..c695589ca 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -1,6 +1,6 @@
{ config, lib, ... }:
-with import ../4lib { inherit lib; };
+with lib;
let
cfg = config.krebs;
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 64b7820b2..234129497 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -6,7 +6,7 @@
# TODO when authorized_keys changes, then restart ssh
# (or kill already connected users somehow)
-with import ../4lib { inherit lib; };
+with lib;
let
cfg = config.krebs.git;
diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix
index 2a1df9e03..5503ee8d6 100644
--- a/krebs/3modules/github-hosts-sync.nix
+++ b/krebs/3modules/github-hosts-sync.nix
@@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
-with builtins;
-with import ../4lib { inherit lib; };
+with lib;
let
cfg = config.krebs.github-hosts-sync;
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index 3f81acb9e..d86c00563 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -1,6 +1,6 @@
{ lib, ... }:
-with import ../../4lib { inherit lib; };
+with lib;
let
testHosts = lib.genAttrs [
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index acc5d7dd2..42764e48c 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -1,6 +1,6 @@
{ lib, ... }:
-with import ../../4lib { inherit lib; };
+with lib;
{
hosts = addNames {
diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix
index 5d5fead8f..5a1ff1416 100644
--- a/krebs/3modules/tv/default.nix
+++ b/krebs/3modules/tv/default.nix
@@ -1,6 +1,6 @@
{ lib, ... }:
-with import ../../4lib { inherit lib; };
+with lib;
{
dns.providers = {
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index 0a6101314..396307c22 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -3,8 +3,6 @@
with builtins;
with lib;
-builtins //
-lib //
rec {
eq = x: y: x == y;
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index 84fb8725b..0ec4b3ded 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -1,7 +1,6 @@
-{ pkgs, ... }:
-
-with import ../4lib { inherit (pkgs) lib; };
+{ lib, pkgs, ... }:
+with lib;
let
subdirs = mapAttrs (_: flip pkgs.callPackage {}) (subdirsOf ./.);
pkgs' = pkgs // subdirs;
diff --git a/krebs/default.nix b/krebs/default.nix
index de805a89c..5518a4496 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -1,6 +1,7 @@
{ current-date
, current-host-name
, current-user-name
+, lib
, stockholm
}:
@@ -8,7 +9,6 @@ let out = {
inherit deploy;
inherit infest;
inherit init;
- inherit lib;
inherit nixos-install;
};
@@ -131,11 +131,6 @@ let out = {
''}
'';
- lib = import ./4lib { lib = import <nixpkgs/lib>; } // rec {
- stockholm-path = ../.;
- nspath = ns: p: stockholm-path + "/${ns}/${p}";
- };
-
doc = s:
let b = "EOF${builtins.hashString "sha256" s}"; in
''