mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
nixos/dae: init
This commit is contained in:
parent
2e93b24ced
commit
dcf5ae3d0b
@ -863,6 +863,7 @@
|
||||
./services/networking/coturn.nix
|
||||
./services/networking/create_ap.nix
|
||||
./services/networking/croc.nix
|
||||
./services/networking/dae.nix
|
||||
./services/networking/dante.nix
|
||||
./services/networking/dhcpcd.nix
|
||||
./services/networking/dnscache.nix
|
||||
|
41
nixos/modules/services/networking/dae.nix
Normal file
41
nixos/modules/services/networking/dae.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.services.dae;
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.maintainers; [ pokon548 ];
|
||||
|
||||
options = {
|
||||
services.dae = {
|
||||
enable = lib.options.mkEnableOption (lib.mdDoc "the dae service");
|
||||
package = lib.mkPackageOptionMD pkgs "dae" { };
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.dae.enable {
|
||||
networking.firewall.allowedTCPPorts = [ 12345 ];
|
||||
networking.firewall.allowedUDPPorts = [ 12345 ];
|
||||
|
||||
systemd.services.dae = {
|
||||
unitConfig = {
|
||||
Description = "dae Service";
|
||||
Documentation = "https://github.com/daeuniverse/dae";
|
||||
After = [ "network.target" "systemd-sysctl.service" ];
|
||||
Wants = [ "network.target" ];
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStartPre = "${lib.getExe cfg.package} validate -c /etc/dae/config.dae";
|
||||
ExecStart = "${lib.getExe cfg.package} run --disable-timestamp -c /etc/dae/config.dae";
|
||||
ExecReload = "${lib.getExe cfg.package} reload $MAINPID";
|
||||
LimitNPROC = 512;
|
||||
LimitNOFILE = 1048576;
|
||||
Restart = "on-abnormal";
|
||||
Type = "notify";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user