From a8e1b6ecbc63990ccc256e2df5760b9d5f7e8983 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 22 Jan 2025 22:31:51 -0800 Subject: [PATCH 1/2] feat: add patched aquamarine option --- flake.lock | 18 ++++++++++++++++++ flake.nix | 4 ++++ hosts/kuroko/configuration.nix | 4 +++- modules/core/default.nix | 4 +++- modules/graphics/default.nix | 23 +++++++++++++++++++++++ 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 modules/graphics/default.nix diff --git a/flake.lock b/flake.lock index baeb2a5..d96e054 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,22 @@ { "nodes": { + "aq": { + "flake": false, + "locked": { + "lastModified": 1736050555, + "narHash": "sha256-TUoKhJ2QMK2AYTRvBCRpYFmaSihiF/OgB+HDZjamZtI=", + "owner": "quantum9innovation", + "repo": "aquamarine", + "rev": "546ce7963d18cbd30b32bf8d464f9ab3f6d54f74", + "type": "github" + }, + "original": { + "owner": "quantum9innovation", + "ref": "patch-125", + "repo": "aquamarine", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -362,6 +379,7 @@ }, "root": { "inputs": { + "aq": "aq", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixvim": "nixvim", diff --git a/flake.nix b/flake.nix index e47e639..e5fc783 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,10 @@ url = "github:kaitotlex/wallpaper"; flake = false; }; + aq = { + url = "github:quantum9innovation/aquamarine/patch-125"; + flake = false; + }; }; outputs = diff --git a/hosts/kuroko/configuration.nix b/hosts/kuroko/configuration.nix index ceae3b4..55c6e79 100644 --- a/hosts/kuroko/configuration.nix +++ b/hosts/kuroko/configuration.nix @@ -19,7 +19,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; virtualisation.waydroid.enable = true; - boot.kernelPackages = pkgs.linuxPackages_5_15; + boot.kernelPackages = pkgs.linuxPackages_zen; #systemdefaults networking.hostName = "kuroko"; # Define your hostname. services.ratbagd.enable = true; @@ -34,6 +34,8 @@ hardware.graphics.enable32Bit = true; hardware.nvidia = { + # custom option defined in graphics/default.nix + usePatchedAquamarine = true; # Modesetting is required. modesetting.enable = lib.mkForce true; diff --git a/modules/core/default.nix b/modules/core/default.nix index ea71cc5..908bea6 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -1,10 +1,12 @@ { pkgs, inputs, - options, ... }: { + imports = [ + ../graphics + ]; # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver.enable = false; diff --git a/modules/graphics/default.nix b/modules/graphics/default.nix new file mode 100644 index 0000000..094830e --- /dev/null +++ b/modules/graphics/default.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + inputs, + ... +}: +let + cfg = config.hardware.nvidia; +in +{ + options.hardware.nvidia.usePatchedAquamarine = lib.mkEnableOption "q9i's patched aquamarine with working sleep on Nvidia"; + + config = lib.mkIf cfg.usePatchedAquamarine { + nixpkgs.overlays = [ + (final: prev: { + aquamarine = prev.aquamarine.overrideAttrs { + src = inputs.aq; + version = inputs.aq.rev; + }; + }) + ]; + }; +} From 5e2fa6448f02b6f6716e0c736236d6f032c63e97 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 22 Jan 2025 22:32:07 -0800 Subject: [PATCH 2/2] fix: typo in ucodenix nixpkgs follows --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e5fc783..2bb16aa 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ }; ucodenix = { url = "github:e-tho/ucodenix"; - inputs.nixpks.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs"; }; wallpapers = { url = "github:kaitotlex/wallpaper";