From 5211eb8d71ef125333711f88b04cf45b3d96db2e Mon Sep 17 00:00:00 2001 From: chayleaf Date: Sat, 24 Jun 2023 15:04:45 +0700 Subject: [PATCH] router: fix unbound restarting on any flake update --- flake.lock | 1 - system/hosts/router/default.nix | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index cdc2142..f9a2ba1 100644 --- a/flake.lock +++ b/flake.lock @@ -198,7 +198,6 @@ "original": { "owner": "chayleaf", "repo": "nixos-router", - "rev": "b28e10ec8d247babd9ff461bb14725e504d3badf", "type": "github" } }, diff --git a/system/hosts/router/default.nix b/system/hosts/router/default.nix index 7d63c3a..61bf5a8 100644 --- a/system/hosts/router/default.nix +++ b/system/hosts/router/default.nix @@ -670,7 +670,9 @@ in { ''"${domain}. AAAA ${serverAddress6}"'' ]) hosted-domains); }; - python.python-script = toString ./avahi-resolver-v2.py; + # normally it would refer to the flake path, but then the service changes on every flake update + # instead, write a new file in nix store + python.python-script = builtins.toFile "avahi-resolver-v2.py" (builtins.readFile ./avahi-resolver-v2.py); remote-control.control-enable = true; }; };