From 2ba551f1b0cf4012e5dfbbcbf6db74f85df7b8f8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 10 May 2021 17:49:37 +0200 Subject: [PATCH] home: add power-alert --- home/default.nix | 1 + home/power-alert.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 home/power-alert.nix diff --git a/home/default.nix b/home/default.nix index f38aa10..9b33d23 100644 --- a/home/default.nix +++ b/home/default.nix @@ -17,6 +17,7 @@ ./nm-applet.nix ./packages.nix ./pager.nix + ./power-alert.nix ./secrets # Home-manager specific secrets ./ssh.nix ./terminal diff --git a/home/power-alert.nix b/home/power-alert.nix new file mode 100644 index 0000000..8dbb5e6 --- /dev/null +++ b/home/power-alert.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: +let + cfg = config.my.home.power-alert; +in +{ + options.my.home.power-alert = with lib; { + enable = mkEnableOption "power-alert configuration"; + }; + + config = lib.mkIf cfg.enable { + services.poweralertd = { + enable = true; + }; + }; +}