Revert "Manage waybar start with systemd"

This reverts commit 289f760252.

Since that commit breaks tray support.
This commit is contained in:
Simon Bruder 2020-12-10 20:08:01 +01:00
parent b5898a0896
commit c0c36b53d0
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -32,8 +32,6 @@ let
cfg = config.wayland.windowManager.sway.config; cfg = config.wayland.windowManager.sway.config;
thinsp = ""; thinsp = "";
waybar = (pkgs.waybar.override { pulseSupport = true; }); # FIXME: Remove override with 21.03 (https://github.com/NixOS/nixpkgs/pull/98490)
in in
lib.mkIf config.sbruder.gui.enable { lib.mkIf config.sbruder.gui.enable {
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -169,7 +167,9 @@ lib.mkIf config.sbruder.gui.enable {
"--locked ${cfg.modifier}+q" = ''exec 'test $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq "[.[].dpms] | any") = "true" && swaymsg "output * dpms off" || swaymsg "output * dpms on"''; "--locked ${cfg.modifier}+q" = ''exec 'test $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq "[.[].dpms] | any") = "true" && swaymsg "output * dpms off" || swaymsg "output * dpms on"'';
}; };
bars = [ ]; # started by systemd service bars = [
{ command = "waybar"; }
];
assigns = { assigns = {
"2" = [ "2" = [
@ -252,36 +252,14 @@ lib.mkIf config.sbruder.gui.enable {
fi fi
''; '';
home.packages = (with pkgs; [ home.packages = with pkgs; [
alacritty # terminal alacritty # terminal
brightnessctl # control screen brightness brightnessctl # control screen brightness
sway-contrib.grimshot # screenshots sway-contrib.grimshot # screenshots
(waybar.override { pulseSupport = true; }) # better status bar FIXME: Remove override with 21.03 (https://github.com/NixOS/nixpkgs/pull/98490)
wdisplays # graphical output manager wdisplays # graphical output manager
]) ++ [
waybar # better status bar FIXME: see above
]; ];
# taken from <home-manager/modules/programs/waybar.nix>
systemd.user.services.waybar = {
Unit = {
Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
Documentation = "https://github.com/Alexays/Waybar/wiki";
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "dbus";
BusName = "fr.arouillard.waybar";
ExecStart = "${waybar}/bin/waybar"; # FIXME see above
Restart = "always";
RestartSec = "1sec";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
xdg.configFile = { xdg.configFile = {
# home-managers waybar module performs additional checks that are overly strict # home-managers waybar module performs additional checks that are overly strict
"waybar/config".text = builtins.toJSON { "waybar/config".text = builtins.toJSON {