From 2cfb6621991435c679c7317f270940257d747ee0 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 30 Apr 2024 07:50:04 -0500 Subject: [PATCH] Adding Matchbox. --- nixos/telperion/configuration.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nixos/telperion/configuration.nix b/nixos/telperion/configuration.nix index 316a197..9949386 100644 --- a/nixos/telperion/configuration.nix +++ b/nixos/telperion/configuration.nix @@ -53,6 +53,7 @@ environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget + matchbox-server ]; # Bind DNS server for externaldns on k8s to push zone updates @@ -66,6 +67,25 @@ 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 # started in user sessions. programs.mtr.enable = true;