1
Fork 0
satellite/home/adrielus/features/desktop/common/polybar/default.nix
2023-01-15 21:40:21 +01:00

34 lines
628 B
Nix

{ pkgs, lib, paths, config, ... }:
let
base16-polybar = {
template = builtins.readFile ./template.mustache;
};
script = ''
polybar main &
'';
in
{
services.polybar = {
inherit script;
enable = true;
extraConfig = ''
; Generated theme
${builtins.readFile (config.scheme base16-polybar)}
; Consistent fonts
[fonts]
regular = "${config.fontProfiles.regular.family}"
monospace = "${config.fontProfiles.monospace.family}"
; Actual config
${builtins.readFile ./polybar.ini}
'';
};
xsession = {
enable = true;
initExtra = script;
};
}