Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Alexander
b316a02e0c
Switch to using my fork of nixpkgs. 2025-08-31 22:21:35 -04:00
Tom Alexander
955c5963c8
Disable machine learning in firefox. 2025-08-31 22:21:34 -04:00
9 changed files with 51 additions and 212 deletions

View File

@ -39,11 +39,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750903843, "lastModified": 1756115622,
"narHash": "sha256-Ng9+f0H5/dW+mq/XOKvB9uwvGbsuiiO6HrPdAcVglCs=", "narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "83c4da299c1d7d300f8c6fd3a72ac46cb0d59aae", "rev": "bafad29f89e83b2d861b493aa23034ea16595560",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -190,18 +190,18 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1751271578, "lastModified": 1756692750,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", "narHash": "sha256-5n58fYrcMlPZB/xvj/yD53Lx+4I2pswUT4Zz3S0tnn0=",
"owner": "NixOS", "ref": "og-amd-debug-tools",
"repo": "nixpkgs", "rev": "977f46c905217623642e46eeb259044635bba4d2",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", "revCount": 854038,
"type": "github" "type": "git",
"url": "https://github.com/tomalexander/nixpkgs.git"
}, },
"original": { "original": {
"owner": "NixOS", "ref": "og-amd-debug-tools",
"ref": "nixos-unstable", "type": "git",
"repo": "nixpkgs", "url": "https://github.com/tomalexander/nixpkgs.git"
"type": "github"
} }
}, },
"nixpkgs-dda3dcd3f": { "nixpkgs-dda3dcd3f": {
@ -238,18 +238,18 @@
}, },
"nixpkgs-unoptimized": { "nixpkgs-unoptimized": {
"locked": { "locked": {
"lastModified": 1751271578, "lastModified": 1756692750,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", "narHash": "sha256-5n58fYrcMlPZB/xvj/yD53Lx+4I2pswUT4Zz3S0tnn0=",
"owner": "NixOS", "ref": "og-amd-debug-tools",
"repo": "nixpkgs", "rev": "977f46c905217623642e46eeb259044635bba4d2",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", "revCount": 854038,
"type": "github" "type": "git",
"url": "https://github.com/tomalexander/nixpkgs.git"
}, },
"original": { "original": {
"owner": "NixOS", "ref": "og-amd-debug-tools",
"ref": "nixos-unstable", "type": "git",
"repo": "nixpkgs", "url": "https://github.com/tomalexander/nixpkgs.git"
"type": "github"
} }
}, },
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {

View File

@ -42,9 +42,11 @@
inputs = { inputs = {
impermanence.url = "github:nix-community/impermanence"; 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-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 = { lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2"; url = "github:nix-community/lanzaboote/v0.4.2";

View File

@ -9,6 +9,6 @@
imports = [ ]; imports = [ ];
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 85" "w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 21845"
]; ];
} }

View File

@ -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;
};
}

View File

@ -21,37 +21,7 @@
lib.mkMerge [ lib.mkMerge [
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
amd_s2idle amd-debug-tools
];
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
# ]))
# ]
# }
# '';
# };
}
)
]; ];
} }
] ]

View File

@ -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;
};
}

View File

@ -73,6 +73,9 @@
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked"; "+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked";
# Disable weather on new tab page # Disable weather on new tab page
"browser.newtabpage.activity-stream.showWeather" = false; "browser.newtabpage.activity-stream.showWeather" = false;
# Disable AI stuff that wastes battery life
"browser.ml.chat.enabled" = false;
"browser.ml.enabled" = false;
}; };
# Check about:policies#documentation and https://mozilla.github.io/policy-templates/ for options. # Check about:policies#documentation and https://mozilla.github.io/policy-templates/ for options.
policies = { policies = {

View File

@ -94,12 +94,12 @@
# "net.ipv6.conf.default.use_tempaddr" = 2; # "net.ipv6.conf.default.use_tempaddr" = 2;
}; };
nixpkgs.overlays = [ # nixpkgs.overlays = [
(final: prev: { # (final: prev: {
inherit (pkgs-dda3dcd3f) # inherit (pkgs-dda3dcd3f)
linux-firmware # linux-firmware
; # ;
}) # })
]; # ];
} }

View File

@ -47,7 +47,7 @@
(lib.mkIf (!config.me.optimizations.enable) ( (lib.mkIf (!config.me.optimizations.enable) (
lib.mkMerge [ 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 = lib.kernel.freeform "300";
HZ_300 = lib.kernel.yes; HZ_300 = lib.kernel.yes;
HZ_1000 = lib.kernel.no; HZ_1000 = lib.kernel.no;
} prev.linux_6_15; } prev.linux_6_16;
} }
) )
(final: prev: { (final: prev: {
@ -126,6 +126,15 @@
} }
); );
}) })
# (final: prev: {
# pythonPackagesOverlays = prev.pythonPackagesOverlays.extend (
# final': prev': {
# inherit (pkgs-unoptimized.pythonPackagesOverlays)
# coverage
# ;
# }
# );
# })
(final: prev: { (final: prev: {
inherit (pkgs-unoptimized) inherit (pkgs-unoptimized)
gsl gsl
@ -133,6 +142,7 @@
valkey valkey
nix-serve-ng nix-serve-ng
rapidjson rapidjson
assimp
; ;
}) })
]; ];