pinwheel: Add enable option to hyprland module

This commit is contained in:
Alexander Heldt
2023-10-16 23:09:14 +02:00
parent d3bb764006
commit a5ec186a59
2 changed files with 194 additions and 182 deletions

View File

@@ -77,6 +77,7 @@
mod = {
nix-index.enable = true;
greetd.enable = true;
hyprland.enable = true;
git.enable = true;
openvpn.enable = true;
go.enable = true;

View File

@@ -1,5 +1,15 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
let
enabled = config.mod.hyprland.enable;
in
{
options = {
mod.hyprland= {
enable = lib.mkEnableOption "enable hyprland module";
};
};
config = lib.mkIf enabled {
home-manager.users.alex = {
wayland.windowManager.hyprland = {
enable = true;
@@ -198,4 +208,5 @@
socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
'';
};
};
}