summaryrefslogtreecommitdiff
path: root/hosts/laptop-nixos/configuration.nix
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-21 12:37:35 +0200
committerKyren223 <Kyren223@proton.me>2024-11-21 12:37:35 +0200
commit43e8afe80486b805a3d93b1f46d17cb886455f81 (patch)
treed5267ad8efd2cc0bcb15985cea0057fcefa88f32 /hosts/laptop-nixos/configuration.nix
parent979a45d376bb120724bf28a0bbaed03321169ffa (diff)
Trying some stuff with clipboard and battery notification
Diffstat (limited to 'hosts/laptop-nixos/configuration.nix')
-rw-r--r--hosts/laptop-nixos/configuration.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/hosts/laptop-nixos/configuration.nix b/hosts/laptop-nixos/configuration.nix
index 4a80055..949f643 100644
--- a/hosts/laptop-nixos/configuration.nix
+++ b/hosts/laptop-nixos/configuration.nix
@@ -109,6 +109,29 @@
# Services
services.openssh.enable = true;
+ # battery levels notifier
+ systemd.timers."battery-notifier" = {
+ wantedBy = [ "timers.target" ];
+ timerConfig = {
+ OnBootSec = "1m";
+ OnUnitActiveSec = "1m";
+ Unit = "battery-notifier.service";
+ };
+ };
+
+ systemd.services."battery-notifier" = {
+ script = ''
+ set -eu
+ export DISPLAY=:0.0
+ touch $HOME/Desktop/EEEEEEE
+ $HOME/scripts/battery_notifier.sh
+ '';
+ serviceConfig = {
+ Type = "oneshot";
+ User = "kyren";
+ };
+ };
+
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];