Compare commits
4 Commits
202a37221a
...
98318b450d
Author | SHA1 | Date |
---|---|---|
Daniel Barlow | 98318b450d | |
Daniel Barlow | e4ac7f19dc | |
Daniel Barlow | 9c22744850 | |
Daniel Barlow | c697be8c28 |
32
THOUGHTS.txt
32
THOUGHTS.txt
|
@ -4289,3 +4289,35 @@ Wed Mar 6 18:24:29 GMT 2024
|
||||||
What happens when we attempt to start the service but it fails? We
|
What happens when we attempt to start the service but it fails? We
|
||||||
assume the start was successful so we won't try and restart it again
|
assume the start was successful so we won't try and restart it again
|
||||||
next time we get an event that should cause it to start.
|
next time we get an event that should cause it to start.
|
||||||
|
|
||||||
|
Thu Mar 7 11:48:26 GMT 2024
|
||||||
|
|
||||||
|
what next?
|
||||||
|
|
||||||
|
- fennel script needs to know where s6-rc is
|
||||||
|
- some nix syntax
|
||||||
|
- update bridge module members.nix to use the new thing
|
||||||
|
|
||||||
|
I can't find a ci derivation that uses the bridge.
|
||||||
|
|
||||||
|
Mon Mar 11 20:31:45 GMT 2024
|
||||||
|
|
||||||
|
Create a qemu config where wan and lan devices are bridged into a
|
||||||
|
single bridge
|
||||||
|
|
||||||
|
start qemu paused
|
||||||
|
Use qemu monitor commands to no-carrier the network devices
|
||||||
|
set_link virtio-net-pci.1 off
|
||||||
|
set_link virtio-net-pci.0 off
|
||||||
|
|
||||||
|
Boot the system
|
||||||
|
|
||||||
|
See if both devices are bridge members
|
||||||
|
|
||||||
|
See if reboot is possible
|
||||||
|
|
||||||
|
Use qemu monitor commands to enable the network devices
|
||||||
|
set_link virtio-net-pci.1 on
|
||||||
|
set_link virtio-net-pci.0 on
|
||||||
|
|
||||||
|
See if both devices are bridge members
|
||||||
|
|
16
overlay.nix
16
overlay.nix
|
@ -77,6 +77,22 @@ extraPkgs // {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# luarocks wants a cross-compiled cmake (which seems like a bug,
|
||||||
|
# we're never going to run luarocks on the device, but ...)
|
||||||
|
# but https://github.com/NixOS/nixpkgs/issues/284734
|
||||||
|
# so we do surgery on the cmake derivation until that's fixed
|
||||||
|
|
||||||
|
cmake = prev.cmake.overrideAttrs(o:
|
||||||
|
# don't override the build cmake or we'll have to rebuild
|
||||||
|
# half the known universe to no useful benefit
|
||||||
|
if final.stdenv.buildPlatform != final.stdenv.hostPlatform
|
||||||
|
then {
|
||||||
|
preConfigure =
|
||||||
|
builtins.replaceStrings
|
||||||
|
["$configureFlags"] ["$configureFlags $cmakeFlags"] o.preConfigure;
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
dnsmasq =
|
dnsmasq =
|
||||||
let d = prev.dnsmasq.overrideAttrs(o: {
|
let d = prev.dnsmasq.overrideAttrs(o: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(local netlink (require :netlink))
|
(local netlink (require :netlink))
|
||||||
|
|
||||||
(local { : view } (require :fennel))
|
; (local { : view } (require :fennel))
|
||||||
|
|
||||||
(fn events [groups]
|
(fn events [groups]
|
||||||
(let [sock (netlink.socket)]
|
(let [sock (netlink.socket)]
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
, netlink-lua
|
, netlink-lua
|
||||||
, writeFennelScript
|
, writeFennelScript
|
||||||
, runCommand
|
, runCommand
|
||||||
|
, anoia
|
||||||
}:
|
}:
|
||||||
runCommand "ifwait" {} ''
|
runCommand "ifwait" {} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp -p ${writeFennelScript "ifwait" [netlink-lua] ./ifwait.fnl} $out/bin/ifwait
|
cp -p ${writeFennelScript "ifwait" [anoia netlink-lua] ./ifwait.fnl} $out/bin/ifwait
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue