sway: Decouple xdg.configFiles

This also adds an empty let binding to the waybar config to avoid an
upcoming commit to introduce a huge diff (twice, since this commit also
would have reformatted the entire waybar configuration).
This commit is contained in:
Simon Bruder 2021-03-02 12:26:06 +01:00
parent 57403a2d52
commit 2bbe4e715b
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -271,9 +271,30 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
wdisplays # graphical output manager
];
xdg.configFile = {
# FIXME deduplicate (everything except text is redundant)
xdg.configFile."swaynag/config".text = ''
font=Monospace 12
[warning]
text=b58900
background=fdf6e3
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
[error]
text=dc322f
background=fdf6e3
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
'';
# home-managers waybar module performs additional checks that are overly strict
"waybar/config".text = lib.generators.toJSON { } {
xdg.configFile."waybar/config".text =
let
in
lib.generators.toJSON { } {
layer = "top";
position = "top";
height = 24;
@ -451,28 +472,9 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
};
};
"waybar/style.css".source = pkgs.substituteAll ({
xdg.configFile."waybar/style.css".source = pkgs.substituteAll ({
src = ../files/waybar/style.css;
} // solarized);
# FIXME deduplicate (everything except text is redundant)
"swaynag/config".text = ''
font=Monospace 12
[warning]
text=b58900
background=fdf6e3
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
[error]
text=dc322f
background=fdf6e3
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
'';
};
systemd.user.services.waybar = {
Unit = {