Merge pull request #244197 from wexder/netclient

netclient: init at 0.21.0
This commit is contained in:
Weijia Wang 2023-10-09 16:55:22 +02:00 committed by GitHub
commit ad855375b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 70 additions and 0 deletions

View File

@ -18668,6 +18668,12 @@
fingerprint = "F844 80B2 0CA9 D6CC C7F5 2479 A776 D2AD 099E 8BC0";
}];
};
wexder = {
email = "wexder19@gmail.com";
github = "wexder";
githubId = 24979302;
name = "Vladimír Zahradník";
};
wheelsandmetal = {
email = "jakob@schmutz.co.uk";
github = "wheelsandmetal";

View File

@ -91,6 +91,8 @@
- [ZITADEL](https://zitadel.com), a turnkey identity and access management platform. Available as [services.zitadel](#opt-services.zitadel.enable).
- [netclient](https://github.com/gravitl/netclient), an automated WireGuard® Management Client. Available as [services.netclient](#opt-services.netclient.enable).
## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
- `network-online.target` has been fixed to no longer time out for systems with `networking.useDHCP = true` and `networking.useNetworkd = true`.

View File

@ -985,6 +985,7 @@
./services/networking/ndppd.nix
./services/networking/nebula.nix
./services/networking/netbird.nix
./services/networking/netclient.nix
./services/networking/networkd-dispatcher.nix
./services/networking/networkmanager.nix
./services/networking/nextdns.nix

View File

@ -0,0 +1,27 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.netclient;
in
{
meta.maintainers = with lib.maintainers; [ wexder ];
options.services.netclient = {
enable = lib.mkEnableOption (lib.mdDoc "Netclient Daemon");
package = lib.mkPackageOptionMD pkgs "netclient" { };
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.netclient = {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
description = "Netclient Daemon";
serviceConfig = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} daemon";
Restart = "on-failure";
RestartSec = "15s";
};
};
};
}

View File

@ -0,0 +1,34 @@
{ buildGoModule
, fetchFromGitHub
, lib
, libX11
, stdenv
, darwin
}:
buildGoModule rec {
pname = "netclient";
version = "0.21.0";
src = fetchFromGitHub {
owner = "gravitl";
repo = "netclient";
rev = "v${version}";
hash = "sha256-68/BmVoAFaIg4vgjzhedSBqm6H9VDu3M7JemfPEcpjQ=";
};
vendorHash = "sha256-CsW4tW6+INw93A7uXtHeVnxRrE5unHXhm2SOmQkJwYA=";
buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa
++ lib.optional stdenv.isLinux libX11;
hardeningEnabled = [ "pie" ];
meta = with lib; {
description = "Automated WireGuard® Management Client";
homepage = "https://netmaker.io";
changelog = "https://github.com/gravitl/netclient/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ wexder ];
};
}