mirror of
https://cgit.krebsco.de/krops
synced 2024-11-26 21:19:47 +01:00
populate git: add clean.exclude
This commit is contained in:
parent
e2b2965425
commit
170c46d53c
4 changed files with 12 additions and 2 deletions
|
@ -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, ... }: {
|
||||
|
|
|
@ -16,6 +16,7 @@ let {
|
|||
};
|
||||
};
|
||||
sanitize = x: lib.getAttr (lib.typeOf x) {
|
||||
list = map sanitize x;
|
||||
set = lib.mapAttrs
|
||||
(lib.const sanitize)
|
||||
(lib.filterAttrs
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue