diff --git a/flake.nix b/flake.nix index fccc4b3..87a910e 100644 --- a/flake.nix +++ b/flake.nix @@ -47,30 +47,8 @@ ./hosts/${hostname}/configuration.nix agenix.nixosModules.default - hyprland.nixosModules.default - {programs.hyprland = { - enable = true; - package = hyprland.packages.${system}.default.overrideAttrs (finalAttrs: previousAttrs: { - buildInputs = previousAttrs.buildInputs ++ [pkgs.makeWrapper]; - postInstall = '' - ls -lar $out - wrapProgram $out/bin/Hyprland \ - --set LIBVA_DRIVER_NAME nvidia \ - --set XDG_SESSION_TYPE wayland \ - --set GBM_BACKEND nvidia-drm \ - --set __GLX_VENDOR_LIBRARY_NAME nvidia \ - --set WLR_NO_HARDWARE_CURSORS 1 - ''; - }); - xwayland = { - enable = true; - hidpi = true; - }; - nvidiaPatches = true; - };} home-manager.nixosModules.home-manager - { home-manager = { useGlobalPkgs = true; @@ -79,6 +57,9 @@ inherit hostname; inherit headless; }; + sharedModules = [ + hyprland.homeManagerModules.default + ]; }; } ]; diff --git a/hosts/common/graphical/default.nix b/hosts/common/graphical/default.nix index 5706f0a..e2a2710 100644 --- a/hosts/common/graphical/default.nix +++ b/hosts/common/graphical/default.nix @@ -68,11 +68,9 @@ SUBSYSTEM="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666" }; displayManager = { - sddm.enable = true; - }; - - desktopManager = { - # plasma5.enable = true; + gdm = { + enable = true; + }; }; }; }; diff --git a/users/daniel/configs/desktop/default.nix b/users/daniel/configs/desktop/default.nix index 3b384c3..b6d6df2 100644 --- a/users/daniel/configs/desktop/default.nix +++ b/users/daniel/configs/desktop/default.nix @@ -3,6 +3,7 @@ # ./i3 # ./i3status-rust # ./polybar + ./hyprland ./rofi ]; diff --git a/users/daniel/configs/desktop/hyprland/default.nix b/users/daniel/configs/desktop/hyprland/default.nix new file mode 100644 index 0000000..252558d --- /dev/null +++ b/users/daniel/configs/desktop/hyprland/default.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + ... +}: { + wayland.windowManager.hyprland = { + enable = true; + package = pkgs.hyprland.overrideAttrs (finalAttrs: previousAttrs: { + buildInputs = previousAttrs.buildInputs ++ [pkgs.makeWrapper]; + postInstall = '' + ls -lar $out + wrapProgram $out/bin/Hyprland \ + --set LIBVA_DRIVER_NAME nvidia \ + --set XDG_SESSION_TYPE wayland \ + --set GBM_BACKEND nvidia-drm \ + --set __GLX_VENDOR_LIBRARY_NAME nvidia \ + --set WLR_NO_HARDWARE_CURSORS 1 + ''; + }); + xwayland = { + enable = true; + hidpi = true; + }; + nvidiaPatches = true; + extraConfig = builtins.readFile ./hyprland.conf; + }; +} diff --git a/hyprland.conf b/users/daniel/configs/desktop/hyprland/hyprland.conf similarity index 90% rename from hyprland.conf rename to users/daniel/configs/desktop/hyprland/hyprland.conf index 2f9cec1..4a34329 100644 --- a/hyprland.conf +++ b/users/daniel/configs/desktop/hyprland/hyprland.conf @@ -1,19 +1,6 @@ - -######################################################################################## -AUTOGENERATED HYPR CONFIG. -PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, -OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. -######################################################################################## - -# -# Please note not all available settings / options are set here. -# For a full list, see the wiki -# - # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,auto - # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch @@ -30,7 +17,7 @@ input { kb_options = kb_rules = - follow_mouse = 0 + follow_mouse = 2 touchpad { natural_scroll = no