[Hyprland,Eww] Refactors configs so that I can share more between Vega and Altair

This commit is contained in:
2026-06-01 16:54:06 -07:00
parent e078067a5e
commit e936b9da8f
12 changed files with 274 additions and 124 deletions

View File

@@ -1,15 +1,48 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [
# For Noto Sans NF
nerd-fonts.noto
];
file.".config/eww".source = ./config;
config,
pkgs,
lib,
...
}:
{
options = {
programs.eww.widgets = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
};
};
programs.eww = {
enable = true;
config = {
home = {
packages = with pkgs; [
# For Noto Sans NF
nerd-fonts.noto
];
file.".config/eww".source = ./config;
};
programs.eww = {
enable = true;
};
systemd.user.services.eww = lib.mkIf (config.programs.eww.widgets != [ ]) {
Unit = {
Description = "Eww widgets";
After = [ "hyprland-session.target" ]; # Start only after hyprland
PartOf = [ "hyprland-session.target" ]; # Force it to exit if hyprland does
};
Service = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.eww}/bin/eww open ${lib.concatStringsSep " " config.programs.eww.widgets}";
ExecStop = "${pkgs.eww}/bin/eww kill";
};
Install = {
WantedBy = [ "hyprland-session.target" ];
};
};
};
}