diff --git a/modules/desktop/desktop.nix b/modules/desktop/desktop.nix index c23790879..6cbe1adc2 100644 --- a/modules/desktop/desktop.nix +++ b/modules/desktop/desktop.nix @@ -1,4 +1,3 @@ -# desktop.nix { config, lib, @@ -13,19 +12,42 @@ in { ]; config = lib.mkIf cfg.enable { + wayland.windowManager.hyprland = lib.mkIf cfg.settings.hyprland.useNixForConf { + enable = true; + xwayland.enable = true; + systemd.enable = true; + }; + + imports = lib.optionals cfg.settings.hyprland.useNixForConf [ + ./hyprland/hypr/keybinds.nix + ./hyprland/hypr/execs.nix + ./hyprland/hypr/rules.nix + ./hyprland/hypr/env.nix + ./hyprland/hypr/colours.nix + ]; + home.file = { ".config/quickshell".source = builtins.path {path = ../../.config/quickshell;}; - ".config/hypr".source = builtins.path {path = ../../.config/hypr;}; - ".config/matugen".source = builtins.path {path = ../../.config/matugen;}; - ".config/foot".source = builtins.path {path = ../../.config/foot;}; + ".config/hypr" = lib.mkIf (!cfg.settings.hyprland.useNixForConf) { + source = builtins.path { + path = ../../.config/hypr; + executable = true; + }; + }; + + # dont forget hypridle and hyprlock!!! ".config/kitty".source = builtins.path {path = ../../.config/kitty;}; + ".config/foot".source = builtins.path {path = ../../.config/foot;}; + ".config/matugen".source = builtins.path {path = ../../.config/matugen;}; + + # wont modify these in nix format, coz im lazy ".config/qt5ct".source = builtins.path {path = ../../.config/qt5ct;}; ".config/qt6ct".source = builtins.path {path = ../../.config/qt6ct;}; ".config/wlogout".source = builtins.path {path = ../../.config/wlogout;}; ".config/Kvantum".source = builtins.path {path = ../../.config/Kvantum;}; ".config/xdg-desktop-portal".source = builtins.path {path = ../../.config/xdg-desktop-portal;}; - # ".config/starship.toml".source = builtins.path {path = ../../.config/starship.toml;}; }; + home.packages = import ../packages.nix {inherit pkgs;} ++ [ diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 13744ee75..488dbc3cb 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -1,17 +1,29 @@ -{pkgs, ...}: { +{ + pkgs, + config, + lib, + ... +}: { imports = [ - ./keybinds.nix - ./execs.nix - ./rules.nix - ./env.nix - ./colours.nix + ./hypr/keybinds.nix + ./hypr/execs.nix + ./hypr/rules.nix + ./hypr/env.nix + ./hypr/colours.nix ]; + home.file = { + ".config/hypr/scripts" = { + source = builtins.path { + path = ../../.config/hypr/hyprland/scripts; + executable = true; + }; + }; + }; + wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; systemd.enable = true; - settings = { - }; }; } diff --git a/modules/desktop/hyprland/env.nix b/modules/desktop/hyprland/hypr/env.nix similarity index 100% rename from modules/desktop/hyprland/env.nix rename to modules/desktop/hyprland/hypr/env.nix diff --git a/modules/desktop/hyprland/exec.nix b/modules/desktop/hyprland/hypr/exec.nix similarity index 100% rename from modules/desktop/hyprland/exec.nix rename to modules/desktop/hyprland/hypr/exec.nix diff --git a/modules/desktop/hyprland/general.nix b/modules/desktop/hyprland/hypr/general.nix similarity index 100% rename from modules/desktop/hyprland/general.nix rename to modules/desktop/hyprland/hypr/general.nix diff --git a/modules/desktop/hyprland/keybinds.nix b/modules/desktop/hyprland/hypr/keybinds.nix similarity index 100% rename from modules/desktop/hyprland/keybinds.nix rename to modules/desktop/hyprland/hypr/keybinds.nix diff --git a/modules/desktop/hyprland/rules.nix b/modules/desktop/hyprland/hypr/rules.nix similarity index 100% rename from modules/desktop/hyprland/rules.nix rename to modules/desktop/hyprland/hypr/rules.nix diff --git a/modules/options.nix b/modules/options.nix index e10c6891e..c6c494a13 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -18,12 +18,10 @@ }; }; hyprland = { - useNixForConf = { - enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Use .nix files for hyprland setup instead of exporting .config/hypr. Useful for modifiable configurations."; - }; + useNixForConf = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Use .nix files for hyprland setup instead of exporting .config/hypr. Useful for modifiable configurations."; }; }; };