Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
Rust 59%
Nix 41%
Shell <1%
README.md
sessiond-hooks #
sessiond-hooks is a sessiond client that launches and supervises a per-user
session hook (dinit --user, runsvdir, …) started for every unique UID.
Installation #
sessiond-hooks requires sessiond to be installed and enabled first.
On finix with flakes:
{
inputs.sessiond-hooks.url = "git+https://tangled.org/r0chd.pl/sessiond-hooks";
}
{ inputs, lib, pkgs, ... }:
{
imports = [
inputs.sessiond-hooks.finixModules.default
];
services.sessiond-hooks = {
package = inputs.sessiond-hooks.packages.${pkgs.system}.default;
hooks.dinit.settings = {
on_start = {
exec = lib.getExe' pkgs.dinit "dinit";
args = [ "--user" "--services-dir" "~/.config/dinit.d" ];
};
restart = {
on = "Failure";
delay = 5;
};
};
};
}
With npins:
npins add git --name sessiond-hooks https://tangled.org/r0chd.pl/sessiond-hooks --branch master
{ lib, pkgs, ... }:
let
sources = import ./npins;
sessiond-hooks = import sources.sessiond-hooks.outPath { };
in
{
imports = [
sessiond-hooks.finixModules.default
];
services.sessiond-hooks = {
package = sessiond-hooks.packages.sessiond-hooks;
hooks.dinit.settings = {
on_start = {
exec = lib.getExe' pkgs.dinit "dinit";
args = [ "--user" "--services-dir" "~/.config/dinit.d" ];
};
restart = {
on = "Failure";
delay = 5;
};
};
};
}
To build it manually:
cargo build --release
The binary is written to target/release/sessiond-hooks.
Usage #
sessiond-hooks [--config PATH] [--log-target stderr|syslog]
Example configuration:
[on_start]
exec = "/usr/bin/dinit"
args = ["--user", "--services-dir", "~/.config/dinit.d"]
[restart]
on = "Failure"
delay = 5