From 7a1b4d19648a2975244244a6983d7c60e245dc46 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 16 Nov 2019 12:57:56 +0100 Subject: [PATCH] nixos/yggdrasil: remove /etc effects Use of the /etc directory should be avoided for software without hardcoded configuration paths. --- nixos/modules/services/networking/yggdrasil.nix | 8 +------- nixos/tests/yggdrasil.nix | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/yggdrasil.nix b/nixos/modules/services/networking/yggdrasil.nix index 0da50ccc344..5d65f8e3413 100644 --- a/nixos/modules/services/networking/yggdrasil.nix +++ b/nixos/modules/services/networking/yggdrasil.nix @@ -128,12 +128,6 @@ in { } ]; - environment.etc."yggdrasil.conf" = { - enable = true; - mode = "symlink"; - source = "/run/yggdrasil/yggdrasil.conf"; - }; - systemd.services.yggdrasil = { description = "Yggdrasil Network Service"; path = [ cfg.package ] ++ optional (configProvided && configFileProvided) pkgs.jq; @@ -146,7 +140,7 @@ in { ''; serviceConfig = { - ExecStart = "${cfg.package}/bin/yggdrasil -useconffile /etc/yggdrasil.conf"; + ExecStart = "${cfg.package}/bin/yggdrasil -useconffile /run/yggdrasil/yggdrasil.conf"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; Restart = "always"; diff --git a/nixos/tests/yggdrasil.nix b/nixos/tests/yggdrasil.nix index ddff35cce3a..0ef42a0180c 100644 --- a/nixos/tests/yggdrasil.nix +++ b/nixos/tests/yggdrasil.nix @@ -81,7 +81,7 @@ in import ./make-test.nix ({ pkgs, ...} : { denyDhcpcdInterfaces = [ "ygg0" ]; config = { IfTAPMode = true; - IFName = "ygg0"; + IfName = "ygg0"; MulticastInterfaces = [ "eth1" ]; LinkLocalTCPPort = 43210; };