corenix: allow setting extraFiles.*.src to null

wip/yesman
Milan Pässler 4 years ago
parent bd04e09fc6
commit cdf3c75541
  1. 4
      modules/corenix/default.nix

@ -7,7 +7,7 @@ let
fileOptions.options = {
src = mkOption {
type = types.path;
type = types.nullOr types.path;
};
type = mkOption {
@ -38,7 +38,7 @@ in {
config = {
corenix.installCommands = let
filteredFiles = filterAttrs (k: v: v != null) cfg.extraFiles;
filteredFiles = filterAttrs (k: v: v.src != null) cfg.extraFiles;
filesList = mapAttrsToList (k: v: v // { name = k; }) filteredFiles;
in concatMapStringsSep "\n" (file:
if file.type == "payload" then ''

Loading…
Cancel
Save