mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-18 11:04:22 +02:00
feat(nix): home-manager option to read style.css file
This commit is contained in:
parent
6a06fa534a
commit
92ae1a8d73
1 changed files with 7 additions and 3 deletions
10
flake.nix
10
flake.nix
|
@ -162,7 +162,7 @@
|
|||
};
|
||||
|
||||
style = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
type = lib.types.either (lib.types.lines) (lib.types.path);
|
||||
default = "";
|
||||
description = "The stylesheet to apply to ironbar.";
|
||||
};
|
||||
|
@ -189,8 +189,12 @@
|
|||
source = jsonFormat.generate "ironbar-config" cfg.config;
|
||||
};
|
||||
|
||||
"ironbar/style.css" =
|
||||
lib.mkIf (cfg.style != "") { text = cfg.style; };
|
||||
"ironbar/style.css" = lib.mkIf (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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue