router: add some utils

This commit is contained in:
sinavir 2024-01-19 19:45:38 +01:00
parent dcde00c428
commit 50b22e0dcd
3 changed files with 19 additions and 0 deletions

6
machines/router/build.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
#
mkdir output/
nom-build -A outputs.tftpboot -o output/result

3
machines/router/serve.sh Executable file
View file

@ -0,0 +1,3 @@
#! /usr/bin/env bash
sudo capsh --keep=1 --user="$USER" --inh='cap_net_bind_service' --addamb='cap_net_bind_service' -- -c 'tftpy_server.py -r ./output'

10
machines/router/shell.nix Normal file
View file

@ -0,0 +1,10 @@
let
pkgs = import (import ./npins).nixpkgs {};
in
pkgs.mkShell {
packages = with pkgs; [
python3.pkgs.tftpy
minicom
];
}