diff options
Diffstat (limited to 'nixos/modules/services/networking/yggdrasil.nix')
-rw-r--r-- | nixos/modules/services/networking/yggdrasil.nix | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/nixos/modules/services/networking/yggdrasil.nix b/nixos/modules/services/networking/yggdrasil.nix index 0da50ccc344..9e675ecd6f4 100644 --- a/nixos/modules/services/networking/yggdrasil.nix +++ b/nixos/modules/services/networking/yggdrasil.nix @@ -12,11 +12,11 @@ let configFileProvided = (cfg.configFile != null); generateConfig = ( if configProvided && configFileProvided then - "${pkgs.jq}/bin/jq -s add /run/yggdrasil/configFile.json ${configAsFile}" + "${pkgs.jq}/bin/jq -s add ${configAsFile} ${cfg.configFile}" else if configProvided then "cat ${configAsFile}" else if configFileProvided then - "cat /run/yggdrasil/configFile.json" + "cat ${cfg.configFile}" else "${cfg.package}/bin/yggdrasil -genconf" ); @@ -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,14 +140,14 @@ 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"; RuntimeDirectory = "yggdrasil"; RuntimeDirectoryMode = "0700"; BindReadOnlyPaths = mkIf configFileProvided - [ "${cfg.configFile}:/run/yggdrasil/configFile.json" ]; + [ "${cfg.configFile}" ]; # TODO: as of yggdrasil 0.3.8 and systemd 243, yggdrasil fails # to set up the network adapter when DynamicUser is set. See |