Closed rcoder closed 3 weeks ago
I'll definitely update the README and add Docker publishing tasks to the justfile
(or port that to a boring ol' Makefile if needed).
Two other questions:
cargo build
works on a machine with a normal Rust development toolchain, so I'm inclined to just stick with Nix instead of trying to support builds on arbitrary base distros/images.deb
or rpm
packages? It's possible to output those archive formats via nix-bundlers but I haven't used that package in anger.Also, as an aside: I have a proof of concept for a NixOS module that would let you provide a network ID and path to a token file and get a fully-running ZT1 + ZeroNSD setup that joins and serves DNS for that network. If folks are interested in seeing how that works I can add it to the Flake. Combined with nixos-generators I think it would be a pretty easy way to create VM images that could run on a cloud or local hypervisor.
I don't personally know how to manage the distro packages efficiently and without ssl lib problems. I think they are one of the main reasons no updates are happening. Maybe others have a better handle on that.
I was getting an error during cargo build
in nix develop
, so I added to the devInputs
in the flake and it worke.d
devInputs = with pkgs; [
rust-bin.stable.${rust-version}.complete
pkg-config
openssl
] ++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
] ;
I don't know if this is idomatic
All looks good to me so far. Only issue is trying to build with just
in the nix develop
environment results in this error:
error: a 'x86_64-linux' with features {kvm} is required to build '/nix/store/lpjhzs199wpjwraqrcm1gnmjcv5f1jyk-docker-layer-zeronsd.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, nixos-test, uid-range}
error: Recipe `build` failed on line 2 with exit code 1
Alright. Got that fixed by adding
system-features = kvm
to /etc/nix/nix.conf
This does a number of things which could be separated, so I consider this more or less experimental.
Implied in the removal of the various dockerfiles is the expectation that production deployments of ZeroNSD will simply use a Docker container, rather than distro-native packages.
TODO: automate publishing of containers from Nix-generated image