don't try building x86_64 image
Some checks failed
Build Images / build (push) Failing after 1m30s
Check / check (push) Successful in 3m38s

This commit is contained in:
Joakim Repomaa
2026-02-22 16:31:43 +02:00
parent 13e119a6c3
commit 5bff4d9713
4 changed files with 110 additions and 58 deletions

View File

@@ -41,12 +41,6 @@ in
description = "Path to write Unbound include file";
};
leasesJsonPath = lib.mkOption {
type = lib.types.str;
default = "/var/lib/router/leases.json";
description = "Path to write leases JSON file";
};
interval = lib.mkOption {
type = lib.types.str;
default = "30s";
@@ -67,7 +61,6 @@ in
# Ensure directories and files exist with proper permissions
systemd.tmpfiles.rules = [
"d /var/lib/unbound 0755 unbound unbound -"
"d /var/lib/router 0755 dhcp-dns-sync dhcp-dns-sync -"
"f ${cfg.unboundConfigPath} 0644 dhcp-dns-sync dhcp-dns-sync -"
];
@@ -99,22 +92,16 @@ in
# Allow access to networkctl via D-Bus
SupplementaryGroups = [ "systemd-network" ];
# Read/write paths
ReadWritePaths = [
"/var/lib/unbound"
"/var/lib/router"
ReadWritePaths = [ "/var/lib/unbound" ];
ExecStart = lib.concatStringsSep " " [
(lib.getExe dhcp-leases-to-unbound)
"-i ${cfg.interface}"
"-d ${cfg.domain}"
"-o ${cfg.unboundConfigPath}"
"--networkctl ${lib.getExe' pkgs.systemd "networkctl"}"
"--unbound-control ${lib.getExe' pkgs.unbound "unbound-control"}"
];
# Execute paths
ExecPaths = [ "/run/current-system/sw/bin" ];
};
script = ''
${lib.getExe dhcp-leases-to-unbound} \
-i ${cfg.interface} \
-d ${cfg.domain} \
-o ${cfg.unboundConfigPath} \
--leases-json ${cfg.leasesJsonPath} \
--networkctl ${lib.getExe' pkgs.systemd "networkctl"}
'';
};
# Systemd timer