laptop hyprland

This commit is contained in:
atagen 2023-03-31 16:42:19 +11:00
parent ba40b01e17
commit 33225f475c
5 changed files with 137 additions and 22 deletions

View file

@ -1,9 +1,19 @@
{ config, lib, pkgs, modulesPath, ... }:
{
let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
}).defaultNix;
in {
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
[ hyprland.nixosModules.default ];
nixpkgs.overlays = [
(self: super: {
@ -60,6 +70,16 @@
kwin-system76-scheduler-integration
];
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = false;
};
nvidiaPatches = true;
};
programs.xwayland.enable = true;
systemd.services."com.system76.Scheduler" = {
wantedBy = [ "multi-user.target" ];
description = "the system76 process scheduler";
@ -85,4 +105,15 @@
"system76-scheduler".source = "${pkgs.system76-scheduler}/etc/system76-scheduler";
};
xdg.portal = {
enable = true;
wlr = {
enable = true;
};
extraPortals = with pkgs; [
xdg-desktop-portal-kde
xdg-desktop-portal-gtk
];
};
}

View file

@ -10,8 +10,8 @@
imports = [
# where are we ?
#./wollomi.nix
# ./adrift.nix
./quiver.nix
./adrift.nix
# ./quiver.nix
# home manager should exist for users
<home-manager/nixos>
@ -33,24 +33,13 @@
keep-derivations = true
'';
environment.sessionVariables = rec {
WLR_NO_HARDWARE_CURSORS = "1";
GBM_BACKEND = "nvidia-drm";
NVD_BACKEND = "direct";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
__GL_VRR_ALLOWED = "1";
EDITOR = "hx";
};
hardware.enableRedistributableFirmware = true;
environment.pathsToLink = [ "/share/zsh" ];
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.consoleMode = "max";
boot.loader.timeout = 3;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.tmpOnTmpfs = true;
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@ -71,7 +60,7 @@
hardware.opengl.driSupport32Bit = true;
#input stuff
services.xserver.enable = false;
services.xserver.enable = true;
services.xserver.xkbOptions = "caps:escape";
services.xserver.layout = "us";
services.xserver.libinput.enable = true;

View file

@ -23,6 +23,18 @@ in {
imports =
[ hyprland.nixosModules.default ];
environment.sessionVariables = rec {
WLR_NO_HARDWARE_CURSORS = "1";
GBM_BACKEND = "nvidia-drm";
NVD_BACKEND = "direct";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
__GL_VRR_ALLOWED = "1";
EDITOR = "hx";
};
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "i2c-dev" ];