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
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