Compare commits
No commits in common. "1dbdbbbb1a3458c10a7f29bc1b0a7255282fd350" and "5d1791947464d0d4719cbb9aa3a56253c3d5d24e" have entirely different histories.
1dbdbbbb1a
...
5d17919474
24
THOUGHTS.txt
24
THOUGHTS.txt
@ -168,6 +168,9 @@ Tue Sep 27 16:14:18 BST 2022
|
|||||||
TODO list is getting both longer and shorter, though longer on
|
TODO list is getting both longer and shorter, though longer on
|
||||||
average.
|
average.
|
||||||
|
|
||||||
|
DONE 1) rename config.environment as .filesystem. and add module
|
||||||
|
types for it
|
||||||
|
|
||||||
2) perhaps we shouldn't use process-based services like [ou]dhcp as
|
2) perhaps we shouldn't use process-based services like [ou]dhcp as
|
||||||
queryable endpoint for interface addresses (e.g. when adding routes).
|
queryable endpoint for interface addresses (e.g. when adding routes).
|
||||||
Instead have a separate service for interface address that depends on
|
Instead have a separate service for interface address that depends on
|
||||||
@ -183,8 +186,14 @@ creates the interface instead of using an existing unconfigured one
|
|||||||
|
|
||||||
5) write a test for udhcp
|
5) write a test for udhcp
|
||||||
|
|
||||||
|
DONE 6) squashfs size is ~ 14MB for a configuration with not much in it,
|
||||||
|
look for obvious wastes of space
|
||||||
|
|
||||||
7) some of the pppoe config should be moved into a ppp service
|
7) some of the pppoe config should be moved into a ppp service
|
||||||
|
|
||||||
|
8) some of configuration.nix (e.g. defining routes) should be moved into
|
||||||
|
tools
|
||||||
|
|
||||||
11) haven't done (overlayfs) overlays at all
|
11) haven't done (overlayfs) overlays at all
|
||||||
|
|
||||||
13) upgrade ppp to something with an ipv6-up-script option, move ppp and pppoe derivations into their own files
|
13) upgrade ppp to something with an ipv6-up-script option, move ppp and pppoe derivations into their own files
|
||||||
@ -194,16 +203,19 @@ creates the interface instead of using an existing unconfigured one
|
|||||||
15) "ip address add" seems to magically recognise v4 vs v6 but
|
15) "ip address add" seems to magically recognise v4 vs v6 but
|
||||||
is that specified or fluke?
|
is that specified or fluke?
|
||||||
|
|
||||||
19) ship logs somehow to log collection system
|
DONE 18) maybe stop suffixing all the service names with .service
|
||||||
|
|
||||||
21) dhcp, dns, hostap service for lan
|
19) syslogd - use busybox or s6? the only thing (so far) using it is pppd.
|
||||||
|
Maybe we could LD_PRELOAD it to use stderr instead
|
||||||
|
|
||||||
|
|
||||||
|
DONE 20) The option currently called defaultPackages needs a better name as
|
||||||
|
it doesn't have the same semantics as nixos
|
||||||
|
environment.defaultPackages. maybe call it packagesInProfile or
|
||||||
|
packagesOnPath. or defaultProfile.packages
|
||||||
|
|
||||||
22) support real hardware
|
|
||||||
|
|
||||||
Tue Sep 27 22:00:36 BST 2022
|
Tue Sep 27 22:00:36 BST 2022
|
||||||
|
|
||||||
Found the cause of huge image size: rp-pppoe ships with scripts that
|
Found the cause of huge image size: rp-pppoe ships with scripts that
|
||||||
reference build-time packages, so we have x86-64 glibc in there
|
reference build-time packages, so we have x86-64 glibc in there
|
||||||
|
|
||||||
We don't need syslog just to accommodate ppp, there's an underdocumented
|
|
||||||
option for it to log to a file descriptor
|
|
||||||
|
@ -17,7 +17,7 @@ interface: {
|
|||||||
let
|
let
|
||||||
name = "${interface.device}.pppoe";
|
name = "${interface.device}.pppoe";
|
||||||
ip-up = writeAshScript "ip-up" {} ''
|
ip-up = writeAshScript "ip-up" {} ''
|
||||||
outputs=/run/service-state/${name}/
|
outputs=/run/service-state/${name}.service/
|
||||||
mkdir -p $outputs
|
mkdir -p $outputs
|
||||||
(cd $outputs
|
(cd $outputs
|
||||||
echo $1 > ifname
|
echo $1 > ifname
|
||||||
@ -32,7 +32,6 @@ let
|
|||||||
"ip-up-script" ip-up
|
"ip-up-script" ip-up
|
||||||
"ipparam" name
|
"ipparam" name
|
||||||
"nodetach"
|
"nodetach"
|
||||||
"logfd" "2"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -14,7 +14,7 @@ action=$1
|
|||||||
|
|
||||||
set_address() {
|
set_address() {
|
||||||
ip address replace $ip/$mask dev $interface
|
ip address replace $ip/$mask dev $interface
|
||||||
dir=/run/service-state/${name}/
|
dir=/run/service-state/${name}.service/
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
for i in lease mask ip router siaddr dns serverid subnet opt53 interface ; do
|
for i in lease mask ip router siaddr dns serverid subnet opt53 interface ; do
|
||||||
echo ''${!i} > $dir/$i
|
echo ''${!i} > $dir/$i
|
||||||
|
@ -25,6 +25,11 @@ in rec {
|
|||||||
"PPP_SYNC_TTY" = "y";
|
"PPP_SYNC_TTY" = "y";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.syslogd = longrun {
|
||||||
|
name = "syslogd";
|
||||||
|
run = "${pkgs.busybox}/bin/syslogd -n -O /run/syslog";
|
||||||
|
};
|
||||||
|
|
||||||
services.pppoe =
|
services.pppoe =
|
||||||
let iface = interface { type = "hardware"; device = "eth0"; };
|
let iface = interface { type = "hardware"; device = "eth0"; };
|
||||||
in pppoe iface {
|
in pppoe iface {
|
||||||
@ -59,6 +64,7 @@ in rec {
|
|||||||
loopback
|
loopback
|
||||||
defaultroute4
|
defaultroute4
|
||||||
packet_forwarding
|
packet_forwarding
|
||||||
|
syslogd
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user