Move hyprland config into home-manager desktop

This commit is contained in:
2023-02-08 19:37:33 +00:00
parent e7162873d1
commit a7e729c29f
5 changed files with 36 additions and 41 deletions

View File

@@ -47,30 +47,8 @@
./hosts/${hostname}/configuration.nix ./hosts/${hostname}/configuration.nix
agenix.nixosModules.default 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.nixosModules.home-manager
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@@ -79,6 +57,9 @@
inherit hostname; inherit hostname;
inherit headless; inherit headless;
}; };
sharedModules = [
hyprland.homeManagerModules.default
];
}; };
} }
]; ];

View File

@@ -68,11 +68,9 @@ SUBSYSTEM="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666"
}; };
displayManager = { displayManager = {
sddm.enable = true; gdm = {
}; enable = true;
};
desktopManager = {
# plasma5.enable = true;
}; };
}; };
}; };

View File

@@ -3,6 +3,7 @@
# ./i3 # ./i3
# ./i3status-rust # ./i3status-rust
# ./polybar # ./polybar
./hyprland
./rofi ./rofi
]; ];

View File

@@ -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;
};
}

View File

@@ -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/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch
@@ -30,7 +17,7 @@ input {
kb_options = kb_options =
kb_rules = kb_rules =
follow_mouse = 0 follow_mouse = 2
touchpad { touchpad {
natural_scroll = no natural_scroll = no