aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/optional/services
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-11-09 19:46:51 -0800
committerMark Nipper <nipsy@bitgnome.net>2024-11-09 19:46:51 -0800
commitbc25565ebf85431c1def5ee88ca0922734d8fd9b (patch)
treea360bf2af7c8a65f35793ec5949e6c110cb09f7a /hosts/common/optional/services
parent7ccd2f3832f7c298d6a05215b81af011301ac033 (diff)
downloadnix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar.gz
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar.bz2
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar.lz
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar.xz
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.tar.zst
nix-bc25565ebf85431c1def5ee88ca0922734d8fd9b.zip
Move to standalone tftpd
Diffstat (limited to 'hosts/common/optional/services')
-rw-r--r--hosts/common/optional/services/dhcp.nix31
1 files changed, 25 insertions, 6 deletions
diff --git a/hosts/common/optional/services/dhcp.nix b/hosts/common/optional/services/dhcp.nix
index 034ef67..728805d 100644
--- a/hosts/common/optional/services/dhcp.nix
+++ b/hosts/common/optional/services/dhcp.nix
@@ -31,12 +31,31 @@
};
};
- systemd.services.kea-dhcp4-server = {
- serviceConfig = {
- ExecStart = lib.mkForce ''
- ${pkgs.kea}/bin/kea-dhcp4 -c ''${CREDENTIALS_DIRECTORY}/kea-dhcp4_conf
- '';
- LoadCredential = [ "kea-dhcp4_conf:${config.sops.secrets.kea-dhcp4_conf.path}" ];
+ systemd.services = {
+ kea-dhcp4-server = {
+ serviceConfig = {
+ ExecStart = lib.mkForce ''
+ ${pkgs.kea}/bin/kea-dhcp4 -c ''${CREDENTIALS_DIRECTORY}/kea-dhcp4_conf
+ '';
+ LoadCredential = [ "kea-dhcp4_conf:${config.sops.secrets.kea-dhcp4_conf.path}" ];
+ };
+ };
+
+ tftpd = {
+ after = [ "network.target" ];
+ description = "TFTP server";
+ serviceConfig = {
+ User = "root";
+ Group = "root";
+ Restart = "always";
+ RestartSec = 5;
+ Type = "exec";
+ ExecStart = "${pkgs.tftp-hpa}/bin/in.tftpd -l -a 192.168.1.1:69 -P /run/tftpd.pid /etc/tftp";
+ TimeoutStopSec = 20;
+ PIDFile = "/run/tftpd.pid";
+ };
+ wantedBy = [ "multi-user.target" ];
+ after = [ "nftables.service" ];
};
};
}