From fa7c1141966f830153f65355b69d177bdfb4b5cf Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 22 Sep 2021 13:04:19 +0200 Subject: [PATCH 1/3] safeeyes: install .desktop file and icons With the icons at the correct location, you'll even get a correct tray icon. --- pkgs/applications/misc/safeeyes/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/misc/safeeyes/default.nix b/pkgs/applications/misc/safeeyes/default.nix index 179ebd33d856..c188e5f78532 100644 --- a/pkgs/applications/misc/safeeyes/default.nix +++ b/pkgs/applications/misc/safeeyes/default.nix @@ -57,6 +57,9 @@ in buildPythonApplication rec { # safeeyes images --prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share" ) + mkdir -p $out/share/applications + cp -r safeeyes/platform/icons $out/share/ + cp safeeyes/platform/safeeyes.desktop $out/share/applications/ ''; doCheck = false; # no tests From 693ccbac67ceeb2cfee41529a5596ef6c528f286 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 22 Sep 2021 13:07:33 +0200 Subject: [PATCH 2/3] nixos/safeeyes: add `alsa-utils` for `aplay` to the service's path This is needed in order to use the `audiblealert`-plugin which requires `aplay` to be available to work. --- nixos/modules/services/misc/safeeyes.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/safeeyes.nix b/nixos/modules/services/misc/safeeyes.nix index 1e748195e41a..ed2dae69a9fe 100644 --- a/nixos/modules/services/misc/safeeyes.nix +++ b/nixos/modules/services/misc/safeeyes.nix @@ -32,6 +32,8 @@ in wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; + path = [ pkgs.alsa-utils ]; + startLimitIntervalSec = 350; startLimitBurst = 10; serviceConfig = { From f59c862770b68756f3248b85870fc2179e2a4c82 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 22 Sep 2021 13:12:27 +0200 Subject: [PATCH 3/3] nixos/safeeyes: add `safeeyes` to the global path This will be needed for e.g. the settings dialog to work properly. --- nixos/modules/services/misc/safeeyes.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/safeeyes.nix b/nixos/modules/services/misc/safeeyes.nix index ed2dae69a9fe..638218d8bb00 100644 --- a/nixos/modules/services/misc/safeeyes.nix +++ b/nixos/modules/services/misc/safeeyes.nix @@ -26,6 +26,8 @@ in config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.safeeyes ]; + systemd.user.services.safeeyes = { description = "Safeeyes";