Commit acfed642 authored by Eric Lesiuta's avatar Eric Lesiuta
Browse files

nixos/picosnitch: init

parent a4eebda6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
{ 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";
      };
    };
  };
}