Commit graph

23 commits

Author SHA1 Message Date
Daniel Barlow
6f92f8fa8b merge bridge services into one 2023-08-16 23:29:53 +01:00
Daniel Barlow
fbb2c04132 move module-based-service parameter types into service
This is in preparation for writing something that extracts them
into documentation.

user configurations now call config.system.service.foo.build { ...params }
instead of config.system.service.foo

the parameter type definitions themselves now move into the
config stanza of the module referencing the service

new helper function  liminix.callService

The only service moved so far is dnsmasq
2023-08-04 20:39:29 +01:00
Daniel Barlow
682183a88d move typeChecked into pkgs.liminix.lib 2023-07-14 20:22:29 +01:00
Daniel Barlow
2de4d7a8f9 fennel: extract some common functions into a shareable module 2023-07-05 20:23:27 +01:00
Daniel Barlow
c3bb33c9ce add fennelrepl package
Runs fennel using a Lua compiled with the same options as the
host system, and with packages set up so it can find all the local
Lua packages

To shorten the dev feedback loop further, allows FENNEL_PATH to be set
on the command line so you can point directly it at the Fennel sources
for some library you're working against instead of having to run
nix-build and compile them to Lua
2023-07-04 22:58:51 +01:00
Daniel Barlow
24befe6bf7 install fennel from source as a package
nixos lua packaging is giving me a headache
2023-07-04 22:56:17 +01:00
Daniel Barlow
9aa5ff6ed1 make a package for odhcpc-script 2023-06-30 20:02:03 +01:00
Daniel Barlow
6101f3f3d8 load necessary kernel modules for firewall 2023-06-27 21:18:09 +01:00
Daniel Barlow
80639a7256 add firewallgen package, which creates an nft script 2023-06-18 17:40:16 +01:00
Daniel Barlow
3f4dbfcfd3 ipv6 prefix delegation for rotuer
much tidying needed, but it works
2023-05-31 23:29:05 +01:00
Daniel Barlow
fdffdbb22a add writeFennelScript function, make ifwait use it 2023-05-29 20:20:12 +01:00
Daniel Barlow
447f068569 partly support getting IPv6 addresses
- gets interface id from ppp
- runs odhcpc to get RA and prefix delegation
- doesn't do anything useful with the data yet
2023-05-24 23:01:50 +01:00
Daniel Barlow
339c2d9873 upgrade to ppp 2.5.0 2023-05-22 23:31:57 +01:00
Daniel Barlow
b0098f1c8e move min-list-garbage into min-collect-garbage pkg
we don't want it in the same package as min-copy-closure as
that depends on bash
2023-05-20 21:55:23 +01:00
Daniel Barlow
74f2aa6247 initramfs-peek: an initramfs image with a shell, for debugging 2023-05-06 23:03:51 +01:00
Daniel Barlow
30153a2d4e add min-copy-closure, a minimal nix-copy-closure substitute 2023-05-06 22:47:03 +01:00
Daniel Barlow
28264febdb add smaller-than-gnu "hello world" package 2023-04-23 20:56:20 +01:00
Daniel Barlow
5dd0c6e3c0 rewrite preinit as very small C program
By using the kernel "nolibc" header to avoid requiring a C library, we
can bring the initramfs size to around 4k

This does involve a tiny bit of inline mips assembly which I'm not
sure about. gcc seems unwilling to generate the code to load $gp at
function entry of main(), so we do it by hand - but I'd rather find
out why gcc doesn't.
2023-04-15 18:27:39 +01:00
Daniel Barlow
54a1ab3529 support jffs2, with initramfs
the jffs2 filesystem contains only /nix/store and a script which is
run in early init (initramfs) and is responsible for recreating
"traditional" directories (/bin /etc/**/* /var &c) based on the
configuration.

this is tested only in qemu so far and could use some cleanup
2023-04-04 23:35:49 +01:00
Daniel Barlow
aa1a2e5d75 package gen_init_cpio, tool for making an initramfs 2023-04-04 22:54:20 +01:00
Daniel Barlow
efd878dc5e extract common code for patching kernel source fdorm openwrt 2023-03-18 19:17:58 +00:00
Daniel Barlow
83e56a3a90 add swconfig package 2023-03-05 22:32:56 +00:00
Daniel Barlow
fd500041fa move new packages to pkgs/default.nix 2023-03-03 22:21:27 +00:00