From d7306aba7cd98308e44c74b416adfc430076e835 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:42:51 +0300 Subject: [PATCH] lemonbar and poly bar --- config/lemonbar/.gitkeep | 0 hosts/sakotop/configuration.nix | 5 ++++- modules/desktop/bspwm/default.nix | 9 ++++---- modules/desktop/bspwm/lemonbar/default.nix | 24 ++++++++++++++++++++++ modules/desktop/bspwm/polybar/default.nix | 24 ++++++++++++++++++++++ 5 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 config/lemonbar/.gitkeep create mode 100644 modules/desktop/bspwm/lemonbar/default.nix create mode 100644 modules/desktop/bspwm/polybar/default.nix diff --git a/config/lemonbar/.gitkeep b/config/lemonbar/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 630aa971..87cc13ea 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -15,7 +15,10 @@ modules = { desktop = { kitty.enable = true; - bspwm.enable = true; + bspwm = { + enable = true; + polybar.enable = true; + }; dunst.enable = true; browsers = { qutebrowser.enable = true; diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix index 9cf43d69..22327cc4 100644 --- a/modules/desktop/bspwm/default.nix +++ b/modules/desktop/bspwm/default.nix @@ -4,6 +4,10 @@ let cfg = config.modules.desktop.bspwm; in { + imports = [ + ./polybar + ./lemonbar + ]; options.modules.desktop.bspwm = { enable = mkEnableOption false; }; @@ -48,7 +52,6 @@ in }; }; users.users.sako.packages = with pkgs; [ - polybar rofi # network networkmanagerapplet @@ -74,10 +77,6 @@ in sxhkd = { source = ../../../config/sxhkd; }; - polybar = { - source = ../../../config/polybar; - recursive = true; - }; }; }; }; diff --git a/modules/desktop/bspwm/lemonbar/default.nix b/modules/desktop/bspwm/lemonbar/default.nix new file mode 100644 index 00000000..53ed9141 --- /dev/null +++ b/modules/desktop/bspwm/lemonbar/default.nix @@ -0,0 +1,24 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.bspwm.lemonbar; +in +{ + options.modules.desktop.bspwm.lemonbar = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + lemonbar-xft + ]; + home-manager.users.sako = { pkgs, ...}: { + xdg.configFile = { + lemonbar = { + source = ../../../config/lemonbar; + recursive = true; + }; + }; + }; + }; +} diff --git a/modules/desktop/bspwm/polybar/default.nix b/modules/desktop/bspwm/polybar/default.nix new file mode 100644 index 00000000..83f39e0d --- /dev/null +++ b/modules/desktop/bspwm/polybar/default.nix @@ -0,0 +1,24 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.bspwm.polybar; +in +{ + options.modules.desktop.bspwm.polybar = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + polybar + ]; + home-manager.users.sako = { pkgs, ...}: { + xdg.configFile = { + polybar = { + source = ../../../config/polybar; + recursive = true; + }; + }; + }; + }; +}