From 7b4dcdd1d8b04080e54559e45ac5dad0db9db011 Mon Sep 17 00:00:00 2001 From: kalipso Date: Tue, 31 Oct 2023 14:47:03 +0100 Subject: [PATCH] [docs] add minimal nix documentation --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 23b1a15..cde84b2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,38 @@ gokill should run as daemon. config should be read from /etc/somename/config.jso ] ``` +## nix support + +gokill enjoys full nix support. gokill exposes a nix flakes that outputs a gokill package, a nixosModule and more. +That means you can super easily incorporate gokill into your existing nixosConfigurations. +Here is a small example config: + +``` nix +{ + services.gokill.enable = true; + services.gokill.triggers = [ + { + type = "EthernetDisconnect"; + name = "MainTrigger"; + options = { + interfaceName = "eth1"; + }; + actions = [ + { + type = "Command"; + options = { + command = "echo hello world"; + }; + stage = 1; + } + ]; + } + ]; +} +``` + +This will automatically configure and enable a systemd running gokill as root user in the background + ## actions - [x] shutdown - [ ] wipe ram