1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-12-23 10:19:52 +01:00

populate git: add clean.exclude

This commit is contained in:
tv 2018-10-31 18:24:57 +01:00
parent e2b2965425
commit 170c46d53c
4 changed files with 12 additions and 2 deletions

View file

@ -26,9 +26,9 @@ let
source = lib.evalSource [{
nixpkgs.git = {
clean.exclude = ["/.version-suffix"];
ref = "4b4bbce199d3b3a8001ee93495604289b01aaad3";
url = https://github.com/NixOS/nixpkgs;
};
nixos-config.file = toString (pkgs.writeText "nixos-config" ''
{ pkgs, ... }: {

View file

@ -16,6 +16,7 @@ let {
};
};
sanitize = x: lib.getAttr (lib.typeOf x) {
list = map sanitize x;
set = lib.mapAttrs
(lib.const sanitize)
(lib.filterAttrs

View file

@ -56,6 +56,12 @@
};
git = lib.types.submodule {
options = {
clean = {
exclude = lib.mkOption {
default = [];
type = lib.types.listOf lib.types.str;
};
};
ref = lib.mkOption {
type = lib.types.str; # TODO lib.types.git.ref
};

View file

@ -45,7 +45,10 @@ let
git submodule update --init --recursive
fi
git clean -dfx
git clean -dfx \
${concatMapStringsSep " "
(pattern: /* sh */ "-e ${quote pattern}")
source.clean.exclude }
'';
pop.pass = target: source: let