dotfiles/default.nix -rw-r--r-- 673 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let pkgs = import <nixpkgs> { };
in rec {
  utils = import ./utils.nix {
    pkgs = pkgs;
    src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
    baseName = "dotfiles";
  };
  subtasks = rec {
    docs = utils.baseTask.overrideAttrs (baseAttrs: {
      name = "${baseAttrs.name}-docs";
      buildPhase = ''
        mkdir $out
        cp ${utils.readmeOrg "dotfiles"} $out/index.html
        cp -Lr public/* $out/
      '';
    });
  };
  test = utils.test [
    utils.formatNix
    (utils.shellcheck ".*(encrypted|npmrc).*")
    (utils.fixme [ "default.nix" "utils.nix" ])
  ];
  publishScript =
    utils.overwritingPublishScript { docsDerivation = subtasks.docs; };
}