From 15c116214c98baccc0e52be63bc39a61b25d8df0 Mon Sep 17 00:00:00 2001 From: KaitoTLex Date: Thu, 16 Jan 2025 23:45:39 -0800 Subject: [PATCH] fixed every part of graphics except sleep --- flake.lock | 54 +++++++++++++++++++++++++++++++++- flake.nix | 4 +++ hosts/kuroko/configuration.nix | 26 +++++++++++++--- users/kaitotlex/home.nix | 1 + 4 files changed, 80 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 7fa71b2..07799e5 100644 --- a/flake.lock +++ b/flake.lock @@ -114,6 +114,24 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -293,6 +311,18 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1730504152, + "narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" + } + }, "nixvim": { "inputs": { "nixCats": "nixCats", @@ -355,7 +385,8 @@ "nixvim": "nixvim", "spicetify": "spicetify", "stylix": "stylix", - "wallpapers": "wallpapers" + "wallpapers": "wallpapers", + "zen": "zen" } }, "spicetify": { @@ -510,6 +541,27 @@ "repo": "wallpaper", "type": "github" } + }, + "zen": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1731377913, + "narHash": "sha256-U/NKOKRChr15VE2zT583iOJ/uBpAARBKfiAeNB+XNq4=", + "owner": "kaitotlex", + "repo": "zen", + "rev": "4d151693f8fdf58bdcdc63ea51d1420b5779577c", + "type": "github" + }, + "original": { + "owner": "kaitotlex", + "repo": "zen", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fe34683..cc65b75 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,10 @@ url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; + zen = { + url = "github:kaitotlex/zen"; + inputs.nixpkgs.follows = "nixpkgs"; + }; wallpapers = { url = "github:kaitotlex/wallpaper"; flake = false; diff --git a/hosts/kuroko/configuration.nix b/hosts/kuroko/configuration.nix index 368f7c3..5686c3d 100644 --- a/hosts/kuroko/configuration.nix +++ b/hosts/kuroko/configuration.nix @@ -12,20 +12,26 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ]; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; virtualisation.waydroid.enable = true; boot.kernelPackages = pkgs.linuxPackages_xanmod; + #systemdefaults networking.hostName = "kuroko"; # Define your hostname. services.ratbagd.enable = true; - hardware.graphics.enable32Bit = true; hardware.pulseaudio.support32Bit = true; + #Nvidia Hardware begins + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.graphics.enable = true; + hardware.graphics.enable32Bit = true; + hardware.nvidia = { # Modesetting is required. - modesetting.enable = true; + modesetting.enable = lib.mkForce true; # Nvidia power management. Experimental, and can cause sleep/suspend to fail. # Enable this if you have graphical corruption issues or application crashes after waking @@ -44,11 +50,11 @@ # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # Only available from driver 515.43.04+ # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = true; + open = lib.mkForce true; # Enable the Nvidia settings menu, # accessible via `nvidia-settings`. - nvidiaSettings = true; + nvidiaSettings = false; # Optionally, you may need to select the appropriate driver version for your specific GPU. package = config.boot.kernelPackages.nvidiaPackages.production; @@ -115,10 +121,22 @@ driver = pkgs.libfprint-2-tod1-elan; }; }; + #System specific power management to fix... + services.tlp = { + enable = true; + settings = { + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 20; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 98; # 80 and above it stops charging + }; + }; #System specific packages to install environment.systemPackages = with pkgs; [ nvtop + osu-lazer + davinci-resolve + wacomtablet ]; # List services that you want to enable: diff --git a/users/kaitotlex/home.nix b/users/kaitotlex/home.nix index 08ee039..73bad6f 100644 --- a/users/kaitotlex/home.nix +++ b/users/kaitotlex/home.nix @@ -23,6 +23,7 @@ # here is some command line tools I use frequently # feel free to add your own or remove some of them #davinci-resolve + libreoffice rasm arduino-language-server #betterbird-unwrapped