From 903a214e1e3b5a93baeed576c9942b2cd73fadc3 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 24 Jun 2024 23:47:31 +0200 Subject: [PATCH] X11 is broken for games with plasma6.1 so I am commiting to wayland --- flake.nix | 3 ++- modules/home/tools/git/default.nix | 3 +-- modules/nixos/apps/onedrive/default.nix | 6 +----- .../desktop-manager/hyprland/default.nix | 6 +++++- .../display-manager/greetd/default.nix | 6 +++++- .../display-manager/sddm/default.nix | 6 +----- modules/nixos/security/gpg/default.nix | 2 +- .../submodules/graphical-interface/default.nix | 17 +++++------------ modules/nixos/system/boot/default.nix | 2 +- .../system/hardware/gpu/nvidia/default.nix | 16 +++++++--------- modules/nixos/tools/git/default.nix | 3 +-- systems/x86_64-linux/yggdrasil/default.nix | 6 +++++- 12 files changed, 35 insertions(+), 41 deletions(-) diff --git a/flake.nix b/flake.nix index 3ebe378..3edb704 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,13 @@ description = "NixOs Config"; inputs = { - # nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + # nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/master"; + # url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/modules/home/tools/git/default.nix b/modules/home/tools/git/default.nix index b02c7cf..6f8107d 100644 --- a/modules/home/tools/git/default.nix +++ b/modules/home/tools/git/default.nix @@ -16,8 +16,7 @@ in enable = mkBoolOpt true "Enable Git (Default true)"; userName = mkOpt types.str user.fullName "The name to configure git with."; userEmail = mkOpt types.str user.email "The email to configure git with."; - signingKey = - mkOpt types.str "6995A5FF33791B7B" "The pub key to sign commits with."; + signingKey = mkOpt types.str "6995A5FF33791B7B" "The pub key to sign commits with."; signByDefault = mkOpt types.bool true "Whether to sign commits by default."; }; diff --git a/modules/nixos/apps/onedrive/default.nix b/modules/nixos/apps/onedrive/default.nix index cb00866..d04b1e9 100644 --- a/modules/nixos/apps/onedrive/default.nix +++ b/modules/nixos/apps/onedrive/default.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: +{ lib, config, ... }: with lib; with lib.wyrdgard; let diff --git a/modules/nixos/graphical-interface/desktop-manager/hyprland/default.nix b/modules/nixos/graphical-interface/desktop-manager/hyprland/default.nix index 143b3dd..628e89b 100644 --- a/modules/nixos/graphical-interface/desktop-manager/hyprland/default.nix +++ b/modules/nixos/graphical-interface/desktop-manager/hyprland/default.nix @@ -15,7 +15,11 @@ in }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ polkit xdg-desktop-portal-hyprland dconf ]; + environment.systemPackages = with pkgs; [ + polkit + xdg-desktop-portal-hyprland + dconf + ]; services.xserver = enabled; diff --git a/modules/nixos/graphical-interface/display-manager/greetd/default.nix b/modules/nixos/graphical-interface/display-manager/greetd/default.nix index 638bac4..fcfd04f 100644 --- a/modules/nixos/graphical-interface/display-manager/greetd/default.nix +++ b/modules/nixos/graphical-interface/display-manager/greetd/default.nix @@ -15,7 +15,11 @@ let tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session"; - command = if hyperland.enable then "${tuigreet} --sessions ${hyprland-session}" else "${tuigreet} --sessions ${kde-session}"; + command = + if hyperland.enable then + "${tuigreet} --sessions ${hyprland-session}" + else + "${tuigreet} --sessions ${kde-session}"; in { options.wyrdgard.graphical-interface.display-manager.greetd = with types; { diff --git a/modules/nixos/graphical-interface/display-manager/sddm/default.nix b/modules/nixos/graphical-interface/display-manager/sddm/default.nix index 0f3f499..09bf3ef 100644 --- a/modules/nixos/graphical-interface/display-manager/sddm/default.nix +++ b/modules/nixos/graphical-interface/display-manager/sddm/default.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: +{ config, lib, ... }: with lib; with lib.wyrdgard; let diff --git a/modules/nixos/security/gpg/default.nix b/modules/nixos/security/gpg/default.nix index 7661d1f..6083559 100644 --- a/modules/nixos/security/gpg/default.nix +++ b/modules/nixos/security/gpg/default.nix @@ -20,7 +20,7 @@ let pinentry-program ${pkgs.pinentry-qt}/bin/pinentry-qt ''; - reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" '' + reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" '' ${pkgs.gnupg}/bin/gpg-connect-agent "scd serialno" "learn --force" /bye ''; in diff --git a/modules/nixos/submodules/graphical-interface/default.nix b/modules/nixos/submodules/graphical-interface/default.nix index f173972..4973055 100644 --- a/modules/nixos/submodules/graphical-interface/default.nix +++ b/modules/nixos/submodules/graphical-interface/default.nix @@ -1,5 +1,4 @@ { - options, config, lib, pkgs, @@ -18,18 +17,12 @@ in config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ xdg-utils ]; - services = { - xserver = { - enable = true; + wyrdgard.graphical-interface = { + display-manager.sddm = enabled; + desktop-manager = { + hyprland = enabled; + kde = enabled; }; - displayManager = { - defaultSession = "plasmax11"; - sddm = { - enable = true; - wayland.enable = true; - }; - }; - desktopManager.plasma6 = enabled; }; }; } diff --git a/modules/nixos/system/boot/default.nix b/modules/nixos/system/boot/default.nix index 2e4f50a..1f1f495 100644 --- a/modules/nixos/system/boot/default.nix +++ b/modules/nixos/system/boot/default.nix @@ -1,5 +1,4 @@ { - options, config, pkgs, lib, @@ -16,6 +15,7 @@ in }; config = mkIf cfg.enable { + boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/modules/nixos/system/hardware/gpu/nvidia/default.nix b/modules/nixos/system/hardware/gpu/nvidia/default.nix index 69ba79a..06b35b6 100644 --- a/modules/nixos/system/hardware/gpu/nvidia/default.nix +++ b/modules/nixos/system/hardware/gpu/nvidia/default.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: +{ lib, config, ... }: with lib; with lib.wyrdgard; let @@ -14,14 +10,16 @@ in }; config = mkIf cfg.enable { - hardware.graphics = enabled; + hardware.graphics = { + enable = true; + enable32Bit = true; + }; hardware.nvidia = { modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; + powerManagement.enable = true; open = false; - nvidiaSettings = false; + nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.beta; # stable, beta }; diff --git a/modules/nixos/tools/git/default.nix b/modules/nixos/tools/git/default.nix index 5905d8d..218f544 100644 --- a/modules/nixos/tools/git/default.nix +++ b/modules/nixos/tools/git/default.nix @@ -16,8 +16,7 @@ in enable = mkBoolOpt true "Wether or not to enable git (Default enabled)"; userName = mkOpt types.str user.fullName "The name to use git with"; userEmail = mkOpt types.str user.email "The email to use git with"; - signingKey = - mkOpt types.str "6995A5FF33791B7B" "The key ID to sign commits with."; + signingKey = mkOpt types.str "6995A5FF33791B7B" "The key ID to sign commits with."; }; config = mkIf cfg.enable { diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index 4af7fef..537ad1d 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -9,7 +9,11 @@ with lib.wyrdgard; { imports = [ ./hardware.nix ]; - environment.systemPackages = with pkgs; [ jetbrains.rust-rover inputs.pyfa teamspeak_client ]; + environment.systemPackages = with pkgs; [ + jetbrains.rust-rover + inputs.pyfa + teamspeak_client + ]; environment.pathsToLink = [ "/libexec" ];