feat(hyprland): add hyprland to nixos modules and set relevant nvidia settings
This commit is contained in:
parent
1bf0680ac4
commit
8ff864caed
5 changed files with 33 additions and 0 deletions
10
modules/nixos/desktop/default.nix
Normal file
10
modules/nixos/desktop/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./windowManager.nix
|
||||
];
|
||||
|
||||
options.desktop = {
|
||||
windowManager = lib.pantheon.mkStrOption;
|
||||
};
|
||||
}
|
15
modules/nixos/desktop/windowManager.nix
Normal file
15
modules/nixos/desktop/windowManager.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.desktop.windowManager == "hyprland") {
|
||||
environment.variables = {
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -11,6 +11,11 @@
|
|||
hardware.nvidia.open = true;
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue