refactor waybar, and use waybar default config
This commit is contained in:
parent
85aa8b1ae0
commit
964ad68305
6 changed files with 255 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
|||
./firefox.nix
|
||||
./niri.nix
|
||||
./wluma.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ in
|
|||
swaynotificationcenter
|
||||
swaybg
|
||||
xwayland-satellite
|
||||
waybar
|
||||
];
|
||||
youthlic.programs = {
|
||||
fuzzel.enable = true;
|
||||
wluma.enable = true;
|
||||
waybar.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
config = builtins.readFile cfg.config;
|
||||
|
|
|
|||
33
home/modules/waybar.nix
Normal file
33
home/modules/waybar.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.waybar;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.waybar = {
|
||||
enable = lib.mkEnableOption "waybar";
|
||||
configDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = ./config;
|
||||
description = ''
|
||||
path to waybar config dir
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
waybar
|
||||
];
|
||||
xdg.configFile."waybar" = {
|
||||
enable = true;
|
||||
source = cfg.configDir;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue