diff options
author | Hanketsu <hanketsu@egregore.fun> | 2025-02-01 00:34:58 +0100 |
---|---|---|
committer | Hanketsu <hanketsu@egregore.fun> | 2025-06-13 00:04:27 +0200 |
commit | 9686e956f927416f4e7ebcef2f9e47df62a1e78c (patch) | |
tree | 34634e53b1369d02d082da8a5b3ae77b60878fd2 /battering | |
parent | 7a47cac27c04e8bdbb7303dc295282686dba7613 (diff) |
battering: Add opensnitchd.
* battering/packages/opensnitch.scm (opensnitchd): New variable.
Diffstat (limited to 'battering')
-rw-r--r-- | battering/packages/opensnitch.scm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm index 97744fe..5b562d0 100644 --- a/battering/packages/opensnitch.scm +++ b/battering/packages/opensnitch.scm @@ -198,3 +198,30 @@ Opensnitch to monitor traffic via eBPF rules.") (synopsis "GNU/Linux application firewall.") (description "OpenSnitch is an interactive GNU/Linux application firewall inspired by Little Snitch.") (license license:gpl3))) + +(define-public opensnitchd + (package/inherit go-github-com-evilsocket-opensnitch-daemon + (name "opensnitchd") + (arguments + (substitute-keyword-arguments + (package-arguments go-github-com-evilsocket-opensnitch-daemon) + ((#:phases p) + #~(modify-phases #$p + (add-after 'install 'rename-daemon + (lambda _ + (rename-file + (string-append #$output "/bin/daemon") + (string-append #$output "/bin/opensnitchd")))) + (add-after 'install 'install-config-file + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (format #f "src/~a/" import-path) + (let ((etc (string-append #$output "/etc/"))) + (mkdir-p etc) + (copy-file "default-config.json" + (string-append etc "/default-config.json")) + (copy-file "system-fw.json" + (string-append etc "/system-fw.json")) + (substitute* (string-append etc "/default-config.json") + (("(Address.*)," all rest) rest) + (("^.*(LogFile|ProcMonitorMethod).*\n$") "")))))))) + ((#:install-source? _ #f) #f))))) |