WIP push to see what passes

This commit is contained in:
Daniel Barlow committed 2023-03-01 22:24:58 +00:00
1 parent 259f5c767b
commit adc198b3af
7 files changed
+100 -57

No files matched your search

+3 -3
View File
@@ -8,7 +8,7 @@ let
inherit (liminix.services) oneshot longrun;
inherit (lib) concatStringsSep optional;
in {
interface = { type, device, primary ? null, dependencies ? [] } @ args:
interface = { type ? "hardware", device, primary ? null, dependencies ? [] } @ args:
let ups =
[]
++ optional (type == "bridge")
@@ -25,10 +25,10 @@ in {
} // {
inherit device;
};
address = interface: { family, prefixLength, address } @ args:
address = interface: { family, dependencies ? [], prefixLength, address } @ args:
let inherit (builtins) toString;
in oneshot {
dependencies = [ interface ];
dependencies = [ interface ] ++ dependencies;
name = "${interface.device}.addr.${address}";
up = "ip address add ${address}/${toString prefixLength} dev ${interface.device} ";
down = "ip address del ${address}/${toString prefixLength} dev ${interface.device} ";