From 1dcb329d97c27c039b706528c5142ec50bb3c2db Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 11:38:00 +0530 Subject: [PATCH] add hyprland --- hosts/default/configuration.nix | 7 +------ modules/nixos/default.nix | 2 ++ modules/nixos/hyprland/default.nix | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 modules/nixos/hyprland/default.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 5d0c766..6ffdc72 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../../modules/nixos/default.nix inputs.home-manager.nixosModules.default ]; # Set your time zone. @@ -16,12 +17,6 @@ # Debug infod services.nixseparatedebuginfod.enable = true; - # Enable hyprland - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - nix.settings.trusted-users = ["root" "user"]; # Define a user account. Don't forget to set a password with ‘passwd’. diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 215c960..22fd66f 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -8,6 +8,7 @@ ./filesystem ./fonts ./hardware + ./hyprland ./kernel ./locale ./networking @@ -48,6 +49,7 @@ display-manager.enable = lib.mkDefault true; editor = lib.mkDefault true; hardware = lib.mkDefault true; + hyprland = lib.mkDefault false; networking = lib.mkDefault true; sound = lib.mkDefault true; ssh = lib.mkDefault true; diff --git a/modules/nixos/hyprland/default.nix b/modules/nixos/hyprland/default.nix new file mode 100644 index 0000000..0749853 --- /dev/null +++ b/modules/nixos/hyprland/default.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + ... +}: { + options = { + hyprland.enable = lib.mkEnableOption "enable hyprland"; + }; + config = lib.mkIf config.hyprland.enable { + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + }; +}