From b316a02e0c30561b622f2e49062b2d5a89e11ba2 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 24 Aug 2025 12:27:47 -0400 Subject: [PATCH] Switch to using my fork of nixpkgs. --- nix/configuration/flake.lock | 46 +++++------ nix/configuration/flake.nix | 6 +- .../hosts/odo/screen_brightness.nix | 2 +- .../roles/amd_s2idle/cysystemd.nix | 76 ------------------- .../roles/amd_s2idle/default.nix | 32 +------- .../roles/amd_s2idle/package.nix | 70 ----------------- nix/configuration/roles/network/default.nix | 14 ++-- .../roles/optimized_build/default.nix | 14 +++- 8 files changed, 48 insertions(+), 212 deletions(-) delete mode 100644 nix/configuration/roles/amd_s2idle/cysystemd.nix delete mode 100644 nix/configuration/roles/amd_s2idle/package.nix diff --git a/nix/configuration/flake.lock b/nix/configuration/flake.lock index 455a82b..5d1c060 100644 --- a/nix/configuration/flake.lock +++ b/nix/configuration/flake.lock @@ -39,11 +39,11 @@ ] }, "locked": { - "lastModified": 1750903843, - "narHash": "sha256-Ng9+f0H5/dW+mq/XOKvB9uwvGbsuiiO6HrPdAcVglCs=", + "lastModified": 1756115622, + "narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=", "owner": "nix-community", "repo": "disko", - "rev": "83c4da299c1d7d300f8c6fd3a72ac46cb0d59aae", + "rev": "bafad29f89e83b2d861b493aa23034ea16595560", "type": "github" }, "original": { @@ -190,18 +190,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", - "type": "github" + "lastModified": 1756692750, + "narHash": "sha256-5n58fYrcMlPZB/xvj/yD53Lx+4I2pswUT4Zz3S0tnn0=", + "ref": "og-amd-debug-tools", + "rev": "977f46c905217623642e46eeb259044635bba4d2", + "revCount": 854038, + "type": "git", + "url": "https://github.com/tomalexander/nixpkgs.git" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "ref": "og-amd-debug-tools", + "type": "git", + "url": "https://github.com/tomalexander/nixpkgs.git" } }, "nixpkgs-dda3dcd3f": { @@ -238,18 +238,18 @@ }, "nixpkgs-unoptimized": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", - "type": "github" + "lastModified": 1756692750, + "narHash": "sha256-5n58fYrcMlPZB/xvj/yD53Lx+4I2pswUT4Zz3S0tnn0=", + "ref": "og-amd-debug-tools", + "rev": "977f46c905217623642e46eeb259044635bba4d2", + "revCount": 854038, + "type": "git", + "url": "https://github.com/tomalexander/nixpkgs.git" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "ref": "og-amd-debug-tools", + "type": "git", + "url": "https://github.com/tomalexander/nixpkgs.git" } }, "pre-commit-hooks-nix": { diff --git a/nix/configuration/flake.nix b/nix/configuration/flake.nix index 54b2c84..85e5518 100644 --- a/nix/configuration/flake.nix +++ b/nix/configuration/flake.nix @@ -42,9 +42,11 @@ inputs = { impermanence.url = "github:nix-community/impermanence"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # nixpkgs.url = "github:tomalexander/nixpkgs/amd-debug-tools"; + nixpkgs.url = "git+https://github.com/tomalexander/nixpkgs.git?ref=og-amd-debug-tools"; nixpkgs-dda3dcd3f.url = "github:NixOS/nixpkgs/dda3dcd3fe03e991015e9a74b22d35950f264a54"; - nixpkgs-unoptimized.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-unoptimized.url = "git+https://github.com/tomalexander/nixpkgs.git?ref=og-amd-debug-tools"; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; diff --git a/nix/configuration/hosts/odo/screen_brightness.nix b/nix/configuration/hosts/odo/screen_brightness.nix index 80c1eac..543b7e2 100644 --- a/nix/configuration/hosts/odo/screen_brightness.nix +++ b/nix/configuration/hosts/odo/screen_brightness.nix @@ -9,6 +9,6 @@ imports = [ ]; systemd.tmpfiles.rules = [ - "w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 85" + "w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 21845" ]; } diff --git a/nix/configuration/roles/amd_s2idle/cysystemd.nix b/nix/configuration/roles/amd_s2idle/cysystemd.nix deleted file mode 100644 index 0337b98..0000000 --- a/nix/configuration/roles/amd_s2idle/cysystemd.nix +++ /dev/null @@ -1,76 +0,0 @@ -# unpackPhase -# patchPhase -# configurePhase -# buildPhase -# checkPhase -# installPhase -# fixupPhase -# installCheckPhase -# distPhase -{ - stdenv, - pkgs, - sqlite, - makeWrapper, - lib, - python3, - systemd, - # setuptools, - # cython, - pkg-config, - # python3Packages, - ... -}: -let - version = "1.6.3"; -in -python3.pkgs.buildPythonPackage { - pname = "cysystemd"; - version = version; - pyproject = true; - - # format = "pyproject"; - - build-system = [ - python3.pkgs.setuptools - python3.pkgs.cython - ]; - buildInputs = [ systemd ]; - nativeBuildInputs = with python3.pkgs; [ - # setuptools - # setuptools-git-versioning - # setuptools-git - # pyudev - # pkgs.systemd - pkg-config - ]; - propagatedBuildInputs = with python3.pkgs; [ - # pyudev - # pandas - # jinja2 - # tabulate - # seaborn - # cysystemd - # jinja2 - # matplotlib - # seaborn - ]; - src = pkgs.fetchgit { - url = "https://github.com/mosquito/cysystemd.git"; - tag = version; - sha256 = "sha256-xumrQgoKfFeKdRQUIYXXiXEcNd76i4wo/EIDm8BN7oU="; - # leaveDotGit = true; - }; - - # postPatch = '' - # substituteInPlace pyproject.toml \ - # --replace-fail ', "setuptools-git-versioning>=2.0,<3"' "" - # ''; - - meta = with lib; { - description = "systemd wrapper on Cython"; - homepage = "https://github.com/mosquito/cysystemd"; - license = licenses.asl20; - platforms = platforms.linux; - }; -} diff --git a/nix/configuration/roles/amd_s2idle/default.nix b/nix/configuration/roles/amd_s2idle/default.nix index ace417a..a11329c 100644 --- a/nix/configuration/roles/amd_s2idle/default.nix +++ b/nix/configuration/roles/amd_s2idle/default.nix @@ -21,37 +21,7 @@ lib.mkMerge [ { environment.systemPackages = with pkgs; [ - amd_s2idle - ]; - nixpkgs.overlays = [ - ( - final: prev: - let - innerPackage = (final.callPackage ./package.nix { }); - in - { - amd_s2idle = innerPackage; - # amd_s2idle = final.buildEnv { - # name = innerPackage.name; - # paths = [ - # innerPackage - # ]; - # nativeBuildInputs = [ final.makeWrapper ]; - # postBuild = '' - # wrapProgram $out/bin/amd_s2idle --prefix PATH : ${ - # lib.makeBinPath [ - # (final.python3.withPackages (python-pkgs: [ - # python-pkgs.distro # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py - # python-pkgs.pyudev # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py - # python-pkgs.systemd # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py - # python-pkgs.packaging # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py - # ])) - # ] - # } - # ''; - # }; - } - ) + amd-debug-tools ]; } ] diff --git a/nix/configuration/roles/amd_s2idle/package.nix b/nix/configuration/roles/amd_s2idle/package.nix deleted file mode 100644 index 6df6b6c..0000000 --- a/nix/configuration/roles/amd_s2idle/package.nix +++ /dev/null @@ -1,70 +0,0 @@ -# unpackPhase -# patchPhase -# configurePhase -# buildPhase -# checkPhase -# installPhase -# fixupPhase -# installCheckPhase -# distPhase -{ - stdenv, - pkgs, - sqlite, - makeWrapper, - lib, - python3, - callPackage, - # python3Packages, - acpica-tools, - ethtool, - libdisplay-info, - ... -}: -let - version = "0.2.7"; -in -python3.pkgs.buildPythonApplication { - pname = "amd-debug-tools"; - version = version; - pyproject = true; - - # name = "amd-debug-tools"; - # format = "pyproject"; - nativeBuildInputs = with python3.pkgs; [ - setuptools - setuptools-git-versioning - setuptools-git - pyudev - ]; - propagatedBuildInputs = with python3.pkgs; [ - (callPackage ./cysystemd.nix { }) - jinja2 - matplotlib - pandas - pyudev - seaborn - tabulate - acpica-tools - ethtool - libdisplay-info - ]; - src = pkgs.fetchgit { - url = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git"; - tag = version; - sha256 = "sha256-6X9cUKN0BkkKcYGU+YJYCGT+l5iUZDN+D8Fqq/ns98Q="; - leaveDotGit = true; - }; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail ', "setuptools-git-versioning>=2.0,<3"' "" - ''; - - meta = with lib; { - description = "Debug tools for AMD zen systems"; - homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/"; - license = licenses.mit; - platforms = platforms.linux; - }; -} diff --git a/nix/configuration/roles/network/default.nix b/nix/configuration/roles/network/default.nix index 9e72334..3d90f79 100644 --- a/nix/configuration/roles/network/default.nix +++ b/nix/configuration/roles/network/default.nix @@ -94,12 +94,12 @@ # "net.ipv6.conf.default.use_tempaddr" = 2; }; - nixpkgs.overlays = [ - (final: prev: { - inherit (pkgs-dda3dcd3f) - linux-firmware - ; - }) - ]; + # nixpkgs.overlays = [ + # (final: prev: { + # inherit (pkgs-dda3dcd3f) + # linux-firmware + # ; + # }) + # ]; } diff --git a/nix/configuration/roles/optimized_build/default.nix b/nix/configuration/roles/optimized_build/default.nix index 1996bcb..2600b7b 100644 --- a/nix/configuration/roles/optimized_build/default.nix +++ b/nix/configuration/roles/optimized_build/default.nix @@ -47,7 +47,7 @@ (lib.mkIf (!config.me.optimizations.enable) ( lib.mkMerge [ { - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_15; + boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_16; } ] )) @@ -94,7 +94,7 @@ HZ = lib.kernel.freeform "300"; HZ_300 = lib.kernel.yes; HZ_1000 = lib.kernel.no; - } prev.linux_6_15; + } prev.linux_6_16; } ) (final: prev: { @@ -126,6 +126,15 @@ } ); }) + # (final: prev: { + # pythonPackagesOverlays = prev.pythonPackagesOverlays.extend ( + # final': prev': { + # inherit (pkgs-unoptimized.pythonPackagesOverlays) + # coverage + # ; + # } + # ); + # }) (final: prev: { inherit (pkgs-unoptimized) gsl @@ -133,6 +142,7 @@ valkey nix-serve-ng rapidjson + assimp ; }) ];