From fa6ad02951a47bc4f34b4559f33dfff15a71ca40 Mon Sep 17 00:00:00 2001 From: Corbin Date: Tue, 19 Feb 2019 09:55:23 -0800 Subject: [PATCH 1/2] services.tahoe: Use `networking.hostName`. Previously we used nothing, leading to #25273. Big thanks to @t184256 for developing and testing this fix. Fixes #25273. --- nixos/modules/services/network-filesystems/tahoe.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index 534862a3c9e..e7b048a6741 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -243,7 +243,10 @@ in preStart = '' if [ ! -d ${lib.escapeShellArg nodedir} ]; then mkdir -p /var/db/tahoe-lafs - tahoe create-introducer ${lib.escapeShellArg nodedir} + # See https://github.com/NixOS/nixpkgs/issues/25273 + tahoe create-introducer \ + --hostname="${config.networking.hostName}" \ + ${lib.escapeShellArg nodedir} fi # Tahoe has created a predefined tahoe.cfg which we must now From 00d6b4cbc7daf19c44e81387f5d345b8ffdc461e Mon Sep 17 00:00:00 2001 From: Corbin Date: Tue, 19 Feb 2019 10:23:47 -0800 Subject: [PATCH 2/2] services.tahoe: Use 1.13-compatible invocations. --- nixos/modules/services/network-filesystems/tahoe.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index e7b048a6741..7d75eb28610 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -234,10 +234,10 @@ in Type = "simple"; PIDFile = pidfile; # Believe it or not, Tahoe is very brittle about the order of - # arguments to $(tahoe start). The node directory must come first, + # arguments to $(tahoe run). The node directory must come first, # and arguments which alter Twisted's behavior come afterwards. ExecStart = '' - ${settings.package}/bin/tahoe start ${lib.escapeShellArg nodedir} -n -l- --pidfile=${lib.escapeShellArg pidfile} + ${settings.package}/bin/tahoe run ${lib.escapeShellArg nodedir} --pidfile=${lib.escapeShellArg pidfile} ''; }; preStart = '' @@ -337,10 +337,10 @@ in Type = "simple"; PIDFile = pidfile; # Believe it or not, Tahoe is very brittle about the order of - # arguments to $(tahoe start). The node directory must come first, + # arguments to $(tahoe run). The node directory must come first, # and arguments which alter Twisted's behavior come afterwards. ExecStart = '' - ${settings.package}/bin/tahoe start ${lib.escapeShellArg nodedir} -n -l- --pidfile=${lib.escapeShellArg pidfile} + ${settings.package}/bin/tahoe run ${lib.escapeShellArg nodedir} --pidfile=${lib.escapeShellArg pidfile} ''; }; preStart = ''