Compare commits
2 Commits
e37a84d77d
...
7b4dcdd1d8
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b4dcdd1d8 | |||
| 72d0aa61cd |
32
README.md
32
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
|
## actions
|
||||||
- [x] shutdown
|
- [x] shutdown
|
||||||
- [ ] wipe ram
|
- [ ] wipe ram
|
||||||
|
|||||||
@@ -85,7 +85,10 @@ func (p UsbDisconnect) GetName() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p UsbDisconnect) GetDescription() 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 {
|
func (p UsbDisconnect) GetExample() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user