Modularize Hyprland configuration
This commit is contained in:
parent
25eac3559f
commit
bab352d00e
18 changed files with 543 additions and 472 deletions
31
modules/programs/hyprland/hyprpaper.nix
Normal file
31
modules/programs/hyprland/hyprpaper.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, options, pkgs, ... }: {
|
||||
options.mods = {
|
||||
hyprland.hyprpaper = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables Hyprpaper";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = '''';
|
||||
example = ''
|
||||
Hyprpaper config
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
description = ''
|
||||
Hyprpaper config
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.hyprpaper.enable
|
||||
(lib.optionalAttrs (options?xdg.configFile)
|
||||
{
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
|
||||
text = config.mods.hyprland.hyprpaper.config;
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue