nixos-config/home-manager/modules/eww/default.nix
2023-07-10 13:42:25 +02:00

39 lines
813 B
Nix

{ 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;
};
home.packages = [ 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 pkgs.bash ]}:${config.home.profileDirectory}/bin"
];
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
}