summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--default.nix2
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/lib.nix11
3 files changed, 14 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 2aa0a8e14..c96d4dd1c 100644
--- a/default.nix
+++ b/default.nix
@@ -46,6 +46,8 @@ let stockholm = {
(map (f: f "5pkgs") [ lib.kpath lib.upath ])
]);
+ krebs.lib = lib;
+
krebs.current.enable = true;
krebs.current.host = config.krebs.hosts.${current-host-name};
krebs.current.user = config.krebs.users.${current-user-name};
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index b2a02e9c7..695562192 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -20,6 +20,7 @@ let
./git.nix
./go.nix
./iptables.nix
+ ./lib.nix
./nginx.nix
./nixpkgs.nix
./per-user.nix
diff --git a/krebs/3modules/lib.nix b/krebs/3modules/lib.nix
new file mode 100644
index 000000000..31390a263
--- /dev/null
+++ b/krebs/3modules/lib.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, lib, ... }:
+with lib;
+let
+ out = {
+ options.krebs.lib = api;
+ };
+ api = mkOption {
+ default = {};
+ type = types.attrs;
+ };
+in out