From 37ea9456b60b4b6400ed3676b26c9b297e1a5028 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Wed, 5 Jul 2023 16:59:16 +0200 Subject: [PATCH] eww: init module --- home-manager/modules/eww/default.nix | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 home-manager/modules/eww/default.nix diff --git a/home-manager/modules/eww/default.nix b/home-manager/modules/eww/default.nix new file mode 100644 index 0000000..18ee7ed --- /dev/null +++ b/home-manager/modules/eww/default.nix @@ -0,0 +1,35 @@ +{ pkgs, config, lib, ... }: +with lib; +let + cfg = config.eboskma.programs.eww; +in +{ + options.eboskma.programs.eww = { + enable = mkEnableOption "eww"; + package = mkPackageOption pkgs "eww" { }; + }; + + config = mkIf cfg.enable { + programs.eww = { + enable = true; + configDir = ./config; + package = cfg.package; + }; + + systemd.user.services.eww-daemon = { + Unit = { + Description = "eww"; + }; + + Service = { + ExecStart = "${cfg.package}/bin/eww --no-daemonize daemon"; + Environment.PATH = makeBinPath [ pkgs.ha-now-playing pkgs.jaq pkgs.pamedia ]; + }; + + Install = { + WantedBy = [ "default.target" ]; + }; + }; + }; +} +