summaryrefslogtreecommitdiffstats
path: root/tv/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-09-19 09:00:54 +0200
committertv <tv@krebsco.de>2017-09-19 09:00:54 +0200
commit388bed48209ad7f5c774ff005afc255c6a71934d (patch)
treefd57fcd54b6a369f7abce0291f4081296f62ba33 /tv/3modules
parent23fcf1c4e92aee18625380eb4cbcab4023098a58 (diff)
tv nixpkgs-overlays: init
This module allows to have per-system nixpkgs-overlays and is required because at the moment of committing, only xu has an up-to-date stockholm development directory in /home/tv/stockholm.
Diffstat (limited to 'tv/3modules')
-rw-r--r--tv/3modules/default.nix1
-rw-r--r--tv/3modules/nixpkgs-overlays.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/tv/3modules/default.nix b/tv/3modules/default.nix
index 83dc212a6..57ffbfab8 100644
--- a/tv/3modules/default.nix
+++ b/tv/3modules/default.nix
@@ -6,6 +6,7 @@ _:
./ejabberd
./hosts.nix
./iptables.nix
+ ./nixpkgs-overlays.nix
./x0vncserver.nix
];
}
diff --git a/tv/3modules/nixpkgs-overlays.nix b/tv/3modules/nixpkgs-overlays.nix
new file mode 100644
index 000000000..4eb7a86bd
--- /dev/null
+++ b/tv/3modules/nixpkgs-overlays.nix
@@ -0,0 +1,23 @@
+with import <stockholm/lib>;
+{ config, pkgs, ... }: {
+
+ options.tv.nixpkgs-overlays = mkOption {
+ apply = src:
+ pkgs.runCommand "nixpkgs-overlays" {} ''
+ mkdir $out
+ ${concatStringsSep "\n" (mapAttrsToList (name: path:
+ "ln -s ${shell.escape path} $out/${shell.escape name}"
+ ) src)}
+ '' // {
+ inherit src;
+ };
+ type = types.attrsOf types.absolute-pathname;
+ };
+
+ config = {
+ tv.nixpkgs-overlays = {
+ krebs = mkDefault "/var/src/stockholm/krebs/5pkgs";
+ tv = mkDefault "/var/src/stockholm/tv/5pkgs";
+ };
+ };
+}