commit dc513cf960c8b9927713bb84eaf32f79280f3245
parent 2c9b88794ecfd8fd4b293ca5eb611e3b2afa0d1c
Author: Vincent Demeester <vincent@sbr.pm>
Date: Wed, 10 Jan 2024 16:37:34 +0100
Add hyprland module.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
5 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/systems/hosts/wakasu.nix b/systems/hosts/wakasu.nix
@@ -96,6 +96,7 @@ in
};
desktop = {
wayland.sway.enable = true;
+ wayland.hyprland.enable = true;
};
dev = {
enable = true;
diff --git a/systems/modules/desktop/default.nix b/systems/modules/desktop/default.nix
@@ -1,6 +1,7 @@
{
imports = [
./base.nix
+ ./hyprland.nix
./i3.nix
./sway.nix
./wayland.nix
diff --git a/systems/modules/desktop/hyprland.nix b/systems/modules/desktop/hyprland.nix
@@ -0,0 +1,17 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) mkIf mkEnableOption mkDefault;
+ cfg = config.modules.desktop.wayland.hyprland;
+in
+{
+ options = {
+ modules.desktop.wayland.hyprland = {
+ enable = mkEnableOption "Enable hyprland desktop profile";
+ };
+ };
+ config = mkIf cfg.enable
+ {
+ programs.hyprland.enable = true;
+ };
+}
diff --git a/users/vincent/desktop/default.nix b/users/vincent/desktop/default.nix
@@ -18,6 +18,7 @@ in
++ optionals nixosConfig.modules.desktop.xorg.enable [ ./xorg.nix ]
++ optionals nixosConfig.profiles.desktop.i3.enable [ ./i3.nix ./xorg.nix ]
++ optionals nixosConfig.modules.desktop.wayland.sway.enable [ ./sway.nix ]
+ ++ optionals nixosConfig.modules.desktop.wayland.hyprland.enable [ ./hyprland.nix ]
++ optionals nixosConfig.profiles.desktop.gnome.enable [ (import ./gnome.nix) ];
home.sessionVariables = { WEBKIT_DISABLE_COMPOSITING_MODE = 1; };
diff --git a/users/vincent/desktop/hyprland.nix b/users/vincent/desktop/hyprland.nix
@@ -0,0 +1,8 @@
+{ config, lib, pkgs, ... }:
+
+{
+ wayland.windowManager.hyprland = {
+ enable = true;
+ systemd.enable = true;
+ };
+}