1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 11:24:24 +02:00

feat(nix): home-manager option to read style.css file

This commit is contained in:
Alpha-Ursae-Minoris 2024-07-02 13:38:35 +00:00 committed by GitHub
parent 6a06fa534a
commit 92ae1a8d73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,7 +162,7 @@
}; };
style = lib.mkOption { style = lib.mkOption {
type = lib.types.lines; type = lib.types.either (lib.types.lines) (lib.types.path);
default = ""; default = "";
description = "The stylesheet to apply to ironbar."; description = "The stylesheet to apply to ironbar.";
}; };
@ -189,8 +189,12 @@
source = jsonFormat.generate "ironbar-config" cfg.config; source = jsonFormat.generate "ironbar-config" cfg.config;
}; };
"ironbar/style.css" = "ironbar/style.css" = lib.mkIf (cfg.style != "") (
lib.mkIf (cfg.style != "") { text = cfg.style; }; if builtins.isPath cfg.style || lib.isStorePath cfg.style then
{ source = cfg.style; }
else
{ text = cfg.style; }
);
}; };
systemd.user.services.ironbar = lib.mkIf cfg.systemd { systemd.user.services.ironbar = lib.mkIf cfg.systemd {