diff options
| author | Joachim F <joachifm@users.noreply.github.com> | 2019-04-15 16:01:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-15 16:01:19 +0000 |
| commit | e4e6fa131740e123a9f62d65bbc1f5fffc47261c (patch) | |
| tree | e5a918e0be060dea54bd8a11957fb6a95cabead7 | |
| parent | Merge pull request #59551 from matthewbauer/busybox-clang-cross (diff) | |
| download | nixpkgs-origin/revert-59368-tox-node.tar.gz | |
Revert "nixos/tox-node: init"origin/revert-59368-tox-node
| -rw-r--r-- | nixos/doc/manual/release-notes/rl-1909.xml | 5 | ||||
| -rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
| -rw-r--r-- | nixos/modules/services/networking/tox-node.nix | 87 |
3 files changed, 0 insertions, 93 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 0a0228cdffb3..3bdfc5c17631 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -49,11 +49,6 @@ </link>. </para> </listitem> - <listitem> - <para> - There is a new <option>services.tox-node</option> module for running tox bootstrap nodes. - </para> - </listitem> </itemizedlist> </section> diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 70d1d1e7b82e..0b86cd8d95d8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -674,7 +674,6 @@ ./services/networking/tinydns.nix ./services/networking/tftpd.nix ./services/networking/tox-bootstrapd.nix - ./services/networking/tox-node.nix ./services/networking/toxvpn.nix ./services/networking/tvheadend.nix ./services/networking/unbound.nix diff --git a/nixos/modules/services/networking/tox-node.nix b/nixos/modules/services/networking/tox-node.nix deleted file mode 100644 index 26d77860cad0..000000000000 --- a/nixos/modules/services/networking/tox-node.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ lib, pkgs, config, ... }: - -with lib; - -let - pkg = pkgs.tox-node; - cfg = config.services.tox-node; - homeDir = "/var/lib/tox-node"; - - configFile = let - # fetchurl should be switched to getting this file from tox-node.src once - # the dpkg directory is in a release - src = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/tox-rs/tox-node/master/dpkg/config.yml"; - sha256 = "1431wzpzm786mcvyzk1rp7ar418n45dr75hdggxvlm7pkpam31xa"; - }; - confJSON = pkgs.writeText "config.json" ( - builtins.toJSON { - log-type = cfg.logType; - keys-file = cfg.keysFile; - udp-address = cfg.udpAddress; - tcp-addresses = cfg.tcpAddresses; - tcp-connections-limit = cfg.tcpConnectionLimit; - lan-discovery = cfg.lanDiscovery; - threads = cfg.threads; - motd = cfg.motd; - } - ); - in with pkgs; runCommand "config.yml" {} '' - ${remarshal}/bin/remarshal -if yaml -of json ${src} -o src.json - ${jq}/bin/jq -s '(.[0] | with_entries( select(.key == "bootstrap-nodes"))) * .[1]' src.json ${confJSON} > $out - ''; - -in { - options.services.tox-node = { - enable = mkEnableOption "Tox Node service"; - - logType = mkOption { - type = types.enum [ "Stderr" "Stdout" "Syslog" "None" ]; - default = "Stderr"; - }; - keysFile = mkOption { - type = types.str; - default = "${homeDir}/keys"; - }; - udpAddress = mkOption { - type = types.str; - default = "0.0.0.0:33445"; - }; - tcpAddresses = mkOption { - type = types.listOf types.str; - default = [ "0.0.0.0:33445" ]; - }; - tcpConnectionLimit = mkOption { - type = types.int; - default = 8192; - }; - lanDiscovery = mkOption { - type = types.bool; - default = true; - }; - threads = mkOption { - type = types.int; - default = 1; - }; - motd = mkOption { - type = types.str; - default = "Hi from tox-rs! I'm up {{uptime}}. TCP: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, UDP: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.services.tox-node = { - description = "Tox Node"; - - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - ExecStart = "${pkg}/bin/tox-node config ${configFile}"; - StateDirectory = "tox-node"; - DynamicUser = true; - Restart = "always"; - }; - }; - }; -} |
