summaryrefslogtreecommitdiffstats
path: root/tv/3modules/nixpkgs-overlays.nix
blob: 4eb7a86bdd1b6221b74a75bf21e89110def33194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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";
    };
  };
}