diff options
| author | seth <[email protected]> | 2023-10-30 04:22:32 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-10-30 09:46:15 +0000 |
| commit | 10b0df38b4286237b56ff9177f8d4c5676bfb5c1 (patch) | |
| tree | ab298c74339bf9bc41571fa88746ecd9c522fbdf /systems/turret/default.nix | |
| parent | 4c2c60a4f2b14c1e6ffaffe5e301dc31ac4fed0f (diff) | |
tree-wide: refactor
i went overboard on modules. this is much comfier
Diffstat (limited to 'systems/turret/default.nix')
| -rw-r--r-- | systems/turret/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/systems/turret/default.nix b/systems/turret/default.nix new file mode 100644 index 0000000..faac3d2 --- /dev/null +++ b/systems/turret/default.nix @@ -0,0 +1,38 @@ +{ + pkgs, + openwrt-imagebuilder, + ... +}: let + inherit (pkgs) runCommand; + inherit (pkgs.stdenv) mkDerivation; + inherit (openwrt-imagebuilder.lib) build profiles; + wrtProfiles = profiles { + inherit pkgs; + release = "22.03.3"; + }; + config = mkDerivation { + name = "openwrt-config-files"; + src = ./files; + installPhase = '' + mkdir -p $out + cp -r * $out/ + ''; + }; + image = + wrtProfiles.identifyProfile "netgear_wac104" + // { + packages = ["https-dns-proxy"]; + + files = runCommand "image-files" {} '' + mkdir -p $out/etc/uci-defaults + cat > $out/etc/uci-defaults/99-custom <<EOF + uci -q batch << EOI + set system.@system[0].hostname='turret' + commit + EOI + EOF + cp -fr ${config}/etc/* $out/etc/ + ''; + }; +in + build image |
