aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2025-02-01 00:34:58 +0100
committerHanketsu <hanketsu@egregore.fun>2025-02-01 17:47:17 +0100
commit35aabcd513415ab7a65fc6d70725f33e2dd0ff5d (patch)
tree6e42f1c82cd2800a05ffea48cd63d75e20367d20
parentb288c05cb7c28cd89743bb2a440d09c5f9202ff0 (diff)
battering: Add opensnitchd.
* battering/packages/opensnitch.scm (opensnitchd): New variable.
-rw-r--r--battering/packages/opensnitch.scm27
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)))))