Compare commits

...

2 Commits

Author SHA1 Message Date
7b4dcdd1d8 [docs] add minimal nix documentation 2023-10-31 14:47:03 +01:00
72d0aa61cd [docs] update usb 2023-10-31 14:46:45 +01:00
2 changed files with 36 additions and 1 deletions

View File

@@ -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

View File

@@ -85,7 +85,10 @@ func (p UsbDisconnect) GetName() string {
}
func (p UsbDisconnect) GetDescription() string {
return "Triggers when given usb drive is disconnected"
return `
Triggers when given usb drive is disconnected.
Currently it simply checks that the file /dev/disk/by-id/$deviceId exists.
`
}
func (p UsbDisconnect) GetExample() string {