networkmanager: fix dispatcher scripts (#24507)

networkmanager used `source` to mean `text` and wrote dispatcher scripts with the default mode (0666), which means networkmanager wouldn't call them.
This commit is contained in:
pngwjpgh 2017-04-09 14:14:04 +02:00 committed by Joachim F
parent 42e1314727
commit 773c456ef4

View file

@ -162,9 +162,9 @@ in {
type = types.listOf (types.submodule {
options = {
source = mkOption {
type = types.str;
type = types.path;
description = ''
A script source.
A script.
'';
};
@ -224,7 +224,7 @@ in {
target = "NetworkManager/dispatcher.d/02overridedns";
}
++ lib.imap (i: s: {
text = s.source;
inherit (s) source;
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
}) cfg.dispatcherScripts;