1
Fork 0
satellite/home/adrielus/features/desktop/common/polybar/default.nix

34 lines
628 B
Nix
Raw Normal View History

2023-01-10 02:38:06 +01:00
{ pkgs, lib, paths, config, ... }:
let
2023-01-15 21:40:21 +01:00
base16-polybar = {
template = builtins.readFile ./template.mustache;
2023-01-10 02:38:06 +01:00
};
2023-01-10 02:58:59 +01:00
script = ''
polybar main &
'';
2023-01-10 02:38:06 +01:00
in
{
services.polybar = {
2023-01-10 02:58:59 +01:00
inherit script;
2023-01-10 02:38:06 +01:00
enable = true;
extraConfig = ''
; Generated theme
${builtins.readFile (config.scheme base16-polybar)}
2023-01-10 02:38:06 +01:00
; Consistent fonts
[fonts]
regular = "${config.fontProfiles.regular.family}"
monospace = "${config.fontProfiles.monospace.family}"
2023-01-10 02:38:06 +01:00
; Actual config
${builtins.readFile ./polybar.ini}
2023-01-10 02:38:06 +01:00
'';
};
xsession = {
enable = true;
2023-01-10 02:58:59 +01:00
initExtra = script;
2023-01-10 02:38:06 +01:00
};
}