From 8a6be4f1de5e0086cb5df8ef167ff147eacf7b3e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 25 Nov 2024 08:03:59 +0000 Subject: [PATCH] Re-use dunst for battery notifications --- nix/modules/nixos/desktop/i3.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/nix/modules/nixos/desktop/i3.nix b/nix/modules/nixos/desktop/i3.nix index 3dc2e60..5fa0ea6 100644 --- a/nix/modules/nixos/desktop/i3.nix +++ b/nix/modules/nixos/desktop/i3.nix @@ -13,6 +13,14 @@ let in { services = { + cron = { + enable = true; + + systemCronJobs = [ + "* * * * * opdavies /home/opdavies/bin/notify-battery" + ]; + }; + displayManager.defaultSession = "none+i3"; xserver = { @@ -30,7 +38,8 @@ in }; environment.systemPackages = with pkgs; [ - dunst + acpi + libnotify nitrogen ]; @@ -135,5 +144,11 @@ in load.enable = false; }; }; + + services.dunst = { + enable = true; + + settings.global.follow = "keyboard"; + }; }; }