Adding Matchbox.

This commit is contained in:
Joseph Hanson 2024-04-30 07:50:04 -05:00
parent 627549d907
commit 2cfb662199
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -53,6 +53,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget wget
matchbox-server
]; ];
# Bind DNS server for externaldns on k8s to push zone updates # Bind DNS server for externaldns on k8s to push zone updates
@ -66,6 +67,25 @@
enable = true; enable = true;
}; };
# Matchbox Server for PXE booting via device profiles
users.users = {
matchbox = {
group = "matchbox";
home = "matchbox";
};
};
systemd.services.matchbox = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${pkgs.matchbox}/bin/matchbox -address=0.0.0.0:8080 -data-path=/srv/matchbox/data -log-level=debug";
Restart = "on-failure";
User = "matchbox";
Group = "matchbox";
};
};
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
programs.mtr.enable = true; programs.mtr.enable = true;