Merge pull request #159095 from helsinki-systems/drop/nixos-gogoclient
nixos/gogoclient: drop
This commit is contained in:
commit
3a5835bb68
3 changed files with 2 additions and 88 deletions
|
@ -760,7 +760,6 @@
|
||||||
./services/networking/go-neb.nix
|
./services/networking/go-neb.nix
|
||||||
./services/networking/go-shadowsocks2.nix
|
./services/networking/go-shadowsocks2.nix
|
||||||
./services/networking/gobgpd.nix
|
./services/networking/gobgpd.nix
|
||||||
./services/networking/gogoclient.nix
|
|
||||||
./services/networking/gvpe.nix
|
./services/networking/gvpe.nix
|
||||||
./services/networking/hans.nix
|
./services/networking/hans.nix
|
||||||
./services/networking/haproxy.nix
|
./services/networking/haproxy.nix
|
||||||
|
|
|
@ -90,6 +90,8 @@ with lib;
|
||||||
|
|
||||||
(mkRemovedOptionModule [ "services" "shellinabox" ] "The corresponding package was removed from nixpkgs.")
|
(mkRemovedOptionModule [ "services" "shellinabox" ] "The corresponding package was removed from nixpkgs.")
|
||||||
|
|
||||||
|
(mkRemovedOptionModule [ "services" "gogoclient" ] "The corresponding package was removed from nixpkgs.")
|
||||||
|
|
||||||
# Do NOT add any option renames here, see top of the file
|
# Do NOT add any option renames here, see top of the file
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let cfg = config.services.gogoclient;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
###### interface
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services.gogoclient = {
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Enable the gogoCLIENT IPv6 tunnel.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
autorun = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = ''
|
|
||||||
Whether to automatically start the tunnel.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
username = mkOption {
|
|
||||||
default = "";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
Your Gateway6 login name, if any.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
password = mkOption {
|
|
||||||
default = "";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
Path to a file (as a string), containing your gogoNET password, if any.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
server = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "anonymous.freenet6.net";
|
|
||||||
example = "broker.freenet6.net";
|
|
||||||
description = "The Gateway6 server to be used.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
###### implementation
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
boot.kernelModules = [ "tun" ];
|
|
||||||
|
|
||||||
networking.enableIPv6 = true;
|
|
||||||
|
|
||||||
systemd.services.gogoclient = {
|
|
||||||
description = "ipv6 tunnel";
|
|
||||||
|
|
||||||
after = [ "network.target" ];
|
|
||||||
requires = [ "network.target" ];
|
|
||||||
|
|
||||||
unitConfig.RequiresMountsFor = "/var/lib/gogoc";
|
|
||||||
|
|
||||||
script = let authMethod = if cfg.password == "" then "anonymous" else "any"; in ''
|
|
||||||
mkdir -p -m 700 /var/lib/gogoc
|
|
||||||
cat ${pkgs.gogoclient}/share/${pkgs.gogoclient.name}/gogoc.conf.sample | \
|
|
||||||
${pkgs.gnused}/bin/sed \
|
|
||||||
-e "s|^userid=|&${cfg.username}|" \
|
|
||||||
-e "s|^passwd=|&${optionalString (cfg.password != "") "$(cat ${cfg.password})"}|" \
|
|
||||||
-e "s|^server=.*|server=${cfg.server}|" \
|
|
||||||
-e "s|^auth_method=.*|auth_method=${authMethod}|" \
|
|
||||||
-e "s|^#log_file=|log_file=1|" > /var/lib/gogoc/gogoc.conf
|
|
||||||
cd /var/lib/gogoc
|
|
||||||
exec ${pkgs.gogoclient}/bin/gogoc -y -f /var/lib/gogoc/gogoc.conf
|
|
||||||
'';
|
|
||||||
} // optionalAttrs cfg.autorun {
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue