diff --git a/home/laptop/hyprland/default.nix b/home/laptop/hyprland/default.nix index 80e3a7e..2a4a09c 100644 --- a/home/laptop/hyprland/default.nix +++ b/home/laptop/hyprland/default.nix @@ -1,8 +1,5 @@ { inputs, pkgs, ... }: { - imports = [ - ./waybar.nix - ]; wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index efa0220..2d16ac8 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -40,6 +40,7 @@ }; wantedBy = ["multi-user.target"]; }; + modules.gnome.enable = true; modules.nvidia.enable = true; modules.gaming.enable = true; diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index c8c7103..15774de 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -22,5 +22,6 @@ }; }; modules.hyprland.enable = true; + modules.greetd.enable = true; } diff --git a/modules/default.nix b/modules/default.nix index 9c684a2..0cdd87b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -8,5 +8,6 @@ _: ./gaming.nix ./stylix.nix ./hyprland.nix + ./greetd.nix ]; } diff --git a/modules/greetd.nix b/modules/greetd.nix new file mode 100644 index 0000000..ae1316e --- /dev/null +++ b/modules/greetd.nix @@ -0,0 +1,43 @@ +{ inputs, config, lib, pkgs, ... }: +let + cfg = config.modules.greetd; + + inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; + greeter = lib.getExe config.programs.regreet.package; + Hyprland = lib.getExe' hyprland "Hyprland"; + hyprctl = lib.getExe' hyprland "hyprctl"; + hyprlandConfig = pkgs.writeText "greetd-hyprland-config" '' + misc { + force_default_wallpaper=0 + focus_on_activate=1 + } + + animations { + enabled=0 + first_launch_animation=0 + } + + exec-once=${greeter}; ${hyprctl} dispatch exit + exec-once=${hyprctl} dispatch focuswindow ${greeter} + ''; +in + { + options = { + modules.greetd = { + enable = lib.mkEnableOption "Enable the greetd module"; + }; + }; + config = lib.mkIf cfg.enable { + programs.regreet.enable = true; + services.greetd = { + enable = true; + settings = rec { + initial_session = { + command = "${Hyprland} --config ${hyprlandConfig}"; + user = "nezia"; + }; + default_session = initial_session; + }; + }; + }; +}