1
Fork 0
satellite/home/adrielus/features/desktop/common/polybar/default.nix
Matei Adriel 1cd3d7a903
Hyprland
2023-05-24 03:17:09 +02:00

34 lines
672 B
Nix

{ pkgs, lib, paths, config, ... }:
let
base16-polybar = config.lib.stylix.colors {
template = builtins.readFile ./template.mustache;
};
script = ''
polybar main &
'';
in
{
services.polybar = {
enable = true;
script = ""; # Otherwise this tries starting on wayland
extraConfig = ''
; Generated theme
include-file = ${base16-polybar}
; Consistent fonts
[fonts]
regular = "${config.stylix.fonts.sansSerif.name}"
monospace = "${config.stylix.fonts.monospace.name}"
; Actual config
${builtins.readFile ./polybar.ini}
'';
};
xsession = {
enable = true;
initExtra = script;
};
}