nixos/netclient: init

This commit is contained in:
Vladimír Zahradník 2023-07-18 23:27:34 +02:00 committed by Weijia Wang
parent 202f059e7d
commit 9053490648
3 changed files with 30 additions and 0 deletions

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";
};
};
};
}