diff --git a/modules/apps/hyprland/default.nix b/modules/apps/hyprland/default.nix index 1fe2342..709a9ef 100644 --- a/modules/apps/hyprland/default.nix +++ b/modules/apps/hyprland/default.nix @@ -12,12 +12,6 @@ let in with lib; { - - imports = [ - ./waybar.nix - ./swaync.nix - ./rofi.nix - ]; options = { hyprland = { enable = lib.mkEnableOption "Enable hyprland in NixOS"; @@ -25,6 +19,12 @@ with lib; }; config = lib.mkIf cfg.enable { + imports = [ + ./waybar.nix + ./swaync.nix + ./rofi.nix + ]; + home-manager.users.${username}.wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; diff --git a/modules/apps/hyprland/rofi.nix b/modules/apps/hyprland/rofi.nix index 12b5e30..a8eaea4 100644 --- a/modules/apps/hyprland/rofi.nix +++ b/modules/apps/hyprland/rofi.nix @@ -1,6 +1,7 @@ -{ pkgs, username, ... }: - +{ config, pkgs, username, lib, ... }: { +config = lib.mkIf config.hyprland.enable { + home-manager.users.${username} = { home.packages = with pkgs; [ (writeShellScriptBin "rofi-launcher" '' @@ -223,4 +224,4 @@ }; }; }; -} +};} \ No newline at end of file diff --git a/modules/apps/hyprland/swaync.nix b/modules/apps/hyprland/swaync.nix index f452a0a..99e9154 100644 --- a/modules/apps/hyprland/swaync.nix +++ b/modules/apps/hyprland/swaync.nix @@ -1,6 +1,7 @@ -{ config, username, ... }: - +{ config, pkgs, username, lib, ... }: { +config = lib.mkIf config.hyprland.enable { + home-manager.users.${username}.home.file = { ".config/swaync/config.json".text = '' { @@ -312,3 +313,4 @@ ''; }; } +;} \ No newline at end of file diff --git a/modules/apps/hyprland/waybar.nix b/modules/apps/hyprland/waybar.nix index c5bda60..72e880e 100644 --- a/modules/apps/hyprland/waybar.nix +++ b/modules/apps/hyprland/waybar.nix @@ -1,10 +1,4 @@ -{ - pkgs, - lib, - username, - config, - ... -}: +{ config, pkgs, username, lib, ... }: let betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; @@ -12,6 +6,7 @@ let in with lib; { +config = lib.mkIf config.hyprland.enable { # Configure & Theme Waybar home-manager.users.${username} = { @@ -284,4 +279,4 @@ with lib; ]; }; }; -} +};} \ No newline at end of file