liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

primary.nix (315B)


      1 {
      2   liminix
      3 , ifwait
      4 , lib
      5 }:
      6 { ifname } :
      7 let
      8   inherit (liminix.services) bundle oneshot;
      9   inherit (lib) mkOption types;
     10 in oneshot rec {
     11   name = "${ifname}.link";
     12   up = ''
     13     ip link add name ${ifname} type bridge
     14     ${liminix.networking.ifup name ifname}
     15   '';
     16   down = "ip link set down dev ${ifname}";
     17 }