mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/picosnitch: init
This commit is contained in:
parent
a4eebda62e
commit
acfed64224
@ -955,6 +955,7 @@
|
||||
./services/networking/pdns-recursor.nix
|
||||
./services/networking/pdnsd.nix
|
||||
./services/networking/peroxide.nix
|
||||
./services/networking/picosnitch.nix
|
||||
./services/networking/pixiecore.nix
|
||||
./services/networking/pleroma.nix
|
||||
./services/networking/polipo.nix
|
||||
|
26
nixos/modules/services/networking/picosnitch.nix
Normal file
26
nixos/modules/services/networking/picosnitch.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.picosnitch;
|
||||
in
|
||||
{
|
||||
options.services.picosnitch = {
|
||||
enable = mkEnableOption (lib.mdDoc "picosnitch daemon");
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.picosnitch ];
|
||||
systemd.services.picosnitch = {
|
||||
description = "picosnitch";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
ExecStart = "${pkgs.picosnitch}/bin/picosnitch start-no-daemon";
|
||||
PIDFile = "/run/picosnitch/picosnitch.pid";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user