Waybar : Move to separate module & disable autostart.

This commit is contained in:
Dmitry Voronin 2024-09-29 19:22:15 +03:00
parent 68dc4812e8
commit e2d103c4c0
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 19 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... } @args: with lib; let { lib, config, pkgs, ... }: with lib; let
cfg = config.module.desktop.sway; cfg = config.module.desktop.sway;
in { in {
options = { options = {
@ -14,6 +14,7 @@ in {
brightness.enable = true; brightness.enable = true;
portal.enable = true; portal.enable = true;
sound.enable = true; sound.enable = true;
waybar.enable = true;
wayland.enable = true; wayland.enable = true;
}; };
realtime.enable = true; realtime.enable = true;
@ -22,7 +23,6 @@ in {
services.gnome.gnome-keyring.enable = mkForce false; services.gnome.gnome-keyring.enable = mkForce false;
environment.variables.XDG_CURRENT_DESKTOP = "sway"; environment.variables.XDG_CURRENT_DESKTOP = "sway";
programs.waybar.enable = true;
programs.sway = { programs.sway = {
enable = true; enable = true;
wrapperFeatures = { wrapperFeatures = {

17
module/Waybar.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, config, ... }: with lib; let
cfg = config.module.desktop.waybar;
in {
options = {
module.desktop.waybar = {
enable = mkEnableOption "Use Waybar.";
};
};
config = mkIf cfg.enable {
programs.waybar.enable = true;
# Do not start automatically ffs.
systemd.user.services.waybar.enable = lib.mkForce false;
};
}