From 4f307a45d1a2fd283d02df3a13700d724d89525e Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Wed, 14 Dec 2022 20:09:17 +0100 Subject: [PATCH] Create module for swaynotificationcenter --- .../swaynotificationcenter/default.nix | 20 +++++++++++++++++++ users/erwin/home.nix | 1 + 2 files changed, 21 insertions(+) create mode 100644 home-manager/modules/swaynotificationcenter/default.nix diff --git a/home-manager/modules/swaynotificationcenter/default.nix b/home-manager/modules/swaynotificationcenter/default.nix new file mode 100644 index 0000000..f9db79c --- /dev/null +++ b/home-manager/modules/swaynotificationcenter/default.nix @@ -0,0 +1,20 @@ +{ pkgs, config, lib, ... }: +with lib; +let + cfg = config.eboskma.programs.swaynotificationcenter; + settingsFormat = pkgs.formats.json { }; +in +{ + options.eboskma.programs.swaynotificationcenter = { enable = mkEnableOption "SwayNotificationCenter"; }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ swaynotificationcenter ]; + + xdg.configFile."swaync/config.json" = { + source = settingsFormat.generate "swaync-config.json" { + "$schema" = "${pkgs.swaynotificationcenter}/etc/xdg/swaync/configScheme.json"; + scripts = { }; + }; + }; + }; +} diff --git a/users/erwin/home.nix b/users/erwin/home.nix index 7863176..61c4fbc 100644 --- a/users/erwin/home.nix +++ b/users/erwin/home.nix @@ -86,6 +86,7 @@ in solvespace.enable = true; ssh.enable = true; sway.enable = true; + swaynotificationcenter.enable = true; tea = { enable = true; settings = {