diff options
| author | Franck Cuny <franck@fcuny.net> | 2023-05-28 16:32:53 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2023-05-28 16:34:42 -0700 |
| commit | 9c7344efb4e3d663d26ddb81699c6572bbcfd148 (patch) | |
| tree | ac65d14fdfe611de665bff060b57881c1360f5bb /tools/waybar-systemd-units/default.nix | |
| parent | font: switch to Roboto for system font and JetBrain for monospace (diff) | |
| download | infra-9c7344efb4e3d663d26ddb81699c6572bbcfd148.tar.gz | |
tools/waybar-systemd-units: get a list of failed systemd units
Get a list of failed systemd units (both user and systems), and
generate an output compatible to what waybar expects.
Refer to https://github.com/Alexays/Waybar/wiki/Module:-Custom for
more details about the format.
Diffstat (limited to 'tools/waybar-systemd-units/default.nix')
| -rw-r--r-- | tools/waybar-systemd-units/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/waybar-systemd-units/default.nix b/tools/waybar-systemd-units/default.nix new file mode 100644 index 0000000..70cac84 --- /dev/null +++ b/tools/waybar-systemd-units/default.nix @@ -0,0 +1,27 @@ +{ self, lib, python3, stdenvNoCC, pkgs }: + +stdenvNoCC.mkDerivation rec { + pname = "waybar-systemd-units"; + src = ./waybar-systemd.py; + version = "0.1.0"; + + buildInputs = [ (pkgs.python310.withPackages (ps: with ps; [ click ])) ]; + + propagatedBuildInputs = + [ (pkgs.python310.withPackages (ps: with ps; [ click ])) ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${pname} + ''; + + meta = with lib; { + description = "Get a list of systemd units that have failed."; + license = with licenses; [ mit ]; + platforms = platforms.unix; + maintainers = with maintainers; [ fcuny ]; + }; +} |
