From 8e3050f1f18c8ddc28266107a82948275a982fa1 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 2 Mar 2025 18:15:04 +0100 Subject: [PATCH 01/13] add nvidia oc as environment package --- modules/hardware/nvidia.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix index 29e67a6..0263516 100644 --- a/modules/hardware/nvidia.nix +++ b/modules/hardware/nvidia.nix @@ -89,6 +89,7 @@ in { libvdpau-va-gl libva libva-utils + pkgs.nvidia_oc (gwe.override { nvidia_x11 = config.hardware.nvidia.package; }) ]; From 065c64f420a19d123822f0998e6a64a0e196b3c9 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 4 Mar 2025 21:43:41 +0100 Subject: [PATCH 02/13] add jp locale for touhou --- systems/pc/configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 8503df4..8f1c189 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -89,6 +89,13 @@ }; virtualisation.waydroid.enable = true; + i18n.supportedLocales = [ + "C.UTF-8/UTF-8" + "de_AT.UTF-8/UTF-8" + "en_US.UTF-8/UTF-8" + "ja_JP.UTF-8/UTF-8" + ]; + # apple shit services.usbmuxd.enable = true; environment.systemPackages = with pkgs; [ From da13efe71623f0be5254de4080027b8d2cfe1978 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:07:12 +0100 Subject: [PATCH 03/13] fix home manager service error on rebuild --- home-manager/code.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home-manager/code.nix b/home-manager/code.nix index a8da703..7fdb289 100644 --- a/home-manager/code.nix +++ b/home-manager/code.nix @@ -12,7 +12,9 @@ after = [ "writeBoundary" ]; before = [ ]; data = '' - install -m 0640 "$(readlink ${configPath})" ${configPath} + if [ -e "$(readlink ${configPath})" ]; then + install -m 0640 "$(readlink ${configPath})" ${configPath} + fi ''; }; programs.vscode = { From 60f88c469cb12ba0d3498634af37590b399261c5 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Thu, 6 Mar 2025 16:26:34 +0100 Subject: [PATCH 04/13] update ente --- home-manager/firefox/config/preferences.nix | 6 ++++- pkgs/ente-frontend/default.nix | 2 +- systems/pc/configuration.nix | 1 + systems/pc/zen.nix | 28 +++++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 systems/pc/zen.nix diff --git a/home-manager/firefox/config/preferences.nix b/home-manager/firefox/config/preferences.nix index f3cb96a..125a578 100644 --- a/home-manager/firefox/config/preferences.nix +++ b/home-manager/firefox/config/preferences.nix @@ -58,8 +58,12 @@ "browser.download.useDownloadDir" = false; "browser.download.dir" = "/tmp"; # Restore previous session automatically - "browser.startup.page"= 3; + "browser.startup.page" = 3; "extensions.activeThemeID" = "{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}"; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "browser.ctrlTab.sortByRecentlyUsed" = true; + # Firefox 75+ remembers the last workspace it was opened on as part of its session management. + # This is annoying, because I can have a blank workspace, open Firefox and + # then have Firefox open on some other workspace + "widget.disable-workspace-management" = true; } diff --git a/pkgs/ente-frontend/default.nix b/pkgs/ente-frontend/default.nix index 33e8f7a..b103044 100644 --- a/pkgs/ente-frontend/default.nix +++ b/pkgs/ente-frontend/default.nix @@ -7,7 +7,7 @@ buildNpmPackage rec { src = "${(fetchGit { url = "git@github.com:oberprofis/ente.git"; ref = "master"; - rev = "42ccf9f7427d8007fce65526e9b9d0443115e476"; + rev = "f82b14a08080865be3c31144787ffaf8509a018a"; })}/website/tracker-site"; npmDepsHash = "sha256-fYTRhIU+8pdIm3wC5wJRcDUhgN3d+mmvfmVzuu0pjLQ="; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 8f1c189..38b4b75 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -101,6 +101,7 @@ environment.systemPackages = with pkgs; [ libimobiledevice ifuse # optional, to mount using 'ifuse' + (callPackage ./zen.nix {}) ]; nixpkgs.config.permittedInsecurePackages = [ diff --git a/systems/pc/zen.nix b/systems/pc/zen.nix new file mode 100644 index 0000000..d9ccea4 --- /dev/null +++ b/systems/pc/zen.nix @@ -0,0 +1,28 @@ +{ appimageTools, fetchurl, ... }: +let + pname = "zen"; + version = "latest"; + + src = fetchurl { + url = "https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage"; + sha256 = "sha256-hZiJ8JLzLhtD1W8DAso3yBAJYhFE+nJEbQJa59AWjnU="; + }; + + appimageContents = appimageTools.extract { + inherit pname version src; + }; +in +appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + # Install .desktop file + install -m 444 -D ${appimageContents}/zen.desktop $out/share/applications/${pname}.desktop + # Install icon + install -m 444 -D ${appimageContents}/zen.png $out/share/icons/hicolor/128x128/apps/${pname}.png + ''; + + meta = { + platforms = [ "x86_64-linux" ]; + }; +} From bff203d7da1c9941ae198a4687cbee517a9ed6bd Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:03:43 +0100 Subject: [PATCH 05/13] update adam site --- modules/misc/faster-boot-time.nix | 2 +- pkgs/adam-site/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/misc/faster-boot-time.nix b/modules/misc/faster-boot-time.nix index 268f41c..d9e2c72 100644 --- a/modules/misc/faster-boot-time.nix +++ b/modules/misc/faster-boot-time.nix @@ -8,7 +8,7 @@ lib.mkForce [ ]; # Normally ["network-online.target"] }; # mash spacebar to still be able to select a different boot option - boot.loader.timeout = 0; + boot.loader.timeout = 1; virtualisation.docker.enableOnBoot = false; } diff --git a/pkgs/adam-site/default.nix b/pkgs/adam-site/default.nix index 60b709b..e61107d 100644 --- a/pkgs/adam-site/default.nix +++ b/pkgs/adam-site/default.nix @@ -6,7 +6,7 @@ buildNpmPackage rec { src = fetchGit { url = "git@github.com:oberprofis/adams.git"; ref = "main"; - rev = "001e9feb4d53f3046068f1bb88c7386b6c6f7f58"; + rev = "6575c418f45aef025d2d89d5b0b4ff4fbdffe298"; }; npmDepsHash="sha256-PRFHBlVIdHfATAAKVKax+bY4o+9czdfl7HjFnKk4KtI="; installPhase = '' From 8a105162da5dfc5b44ed9dfaa7ca2b3f4d075548 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 9 Mar 2025 18:52:25 +0100 Subject: [PATCH 06/13] add manga use firefox again --- modules/hardware/amd-gpu.nix | 4 ++++ modules/services/kavita.nix | 1 + users/kopatz/home.nix | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index b8ecd38..9641276 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -8,5 +8,9 @@ in { config = lib.mkIf cfg.enable { boot.initrd.kernelModules = [ "amdgpu" ]; services.xserver.videoDrivers = [ "amdgpu" ]; + # controller (overclock, undervolt, fan curves) + environment.systemPackages = with pkgs; [ lact ]; + systemd.packages = with pkgs; [ lact ]; + systemd.services.lactd.wantedBy = [ "multi-user.target" ]; }; } diff --git a/modules/services/kavita.nix b/modules/services/kavita.nix index 081f370..7f1341b 100644 --- a/modules/services/kavita.nix +++ b/modules/services/kavita.nix @@ -113,6 +113,7 @@ in { ${mangal} inline -S AsuraScans --query "the_max_level_hero" --manga first --download ${mangal} inline -S Manganato --query "Parallel_City" --manga first --download ${mangal} inline -S Manganato --query "Existence" --manga first --download + ${mangal} inline -S Mangapill --query "Call_of_the_Night" --manga first --download ''; serviceConfig = { PrivateTmp = true; diff --git a/users/kopatz/home.nix b/users/kopatz/home.nix index b5489b6..93ea09e 100644 --- a/users/kopatz/home.nix +++ b/users/kopatz/home.nix @@ -15,8 +15,8 @@ ../../home-manager/code.nix ../../home-manager/fastfetch.nix ../../home-manager/direnv.nix - #../../home-manager/firefox - ../../home-manager/floorp + ../../home-manager/firefox + #../../home-manager/floorp ../../home-manager/gitconfig.nix ../../home-manager/hyprland #../../home-manager/kde-path.nix From 3f1147d87e5da3109bc8203a1ac411bce39258fa Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 9 Mar 2025 19:15:20 +0100 Subject: [PATCH 07/13] update --- flake.lock | 268 +++++++++++++---------------------- pkgs/default.nix | 2 + pkgs/electron27/default.nix | 162 +++++++++++++++++++++ pkgs/logseq/default.nix | 99 +++++++++++++ systems/pc/configuration.nix | 1 - systems/pc/zen.nix | 28 ---- 6 files changed, 364 insertions(+), 196 deletions(-) create mode 100644 pkgs/electron27/default.nix create mode 100644 pkgs/logseq/default.nix delete mode 100644 systems/pc/zen.nix diff --git a/flake.lock b/flake.lock index a4c76d5..2761ad5 100644 --- a/flake.lock +++ b/flake.lock @@ -130,27 +130,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735644329, - "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=", - "owner": "numtide", - "repo": "devshell", - "rev": "f7795ede5b02664b57035b3b757876703e2c3eac", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "disko": { "inputs": { "nixpkgs": [ @@ -158,11 +137,11 @@ ] }, "locked": { - "lastModified": 1739841949, - "narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=", + "lastModified": 1740485968, + "narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=", "owner": "nix-community", "repo": "disko", - "rev": "15dbf8cebd8e2655a883b74547108e089f051bf0", + "rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940", "type": "github" }, "original": { @@ -220,21 +199,6 @@ } }, "flake-compat_3": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_4": { - "flake": false, "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -291,6 +255,28 @@ "type": "github" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -367,12 +353,12 @@ "git-hooks": { "inputs": { "flake-compat": [ - "nixvim", + "stylix", "flake-compat" ], "gitignore": "gitignore", "nixpkgs": [ - "nixvim", + "stylix", "nixpkgs" ] }, @@ -390,55 +376,7 @@ "type": "github" } }, - "git-hooks_2": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735882644, - "narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { "inputs": { "nixpkgs": [ "stylix", @@ -505,11 +443,11 @@ ] }, "locked": { - "lastModified": 1739913864, - "narHash": "sha256-WhzgQjadrwnwPJQLLxZUUEIxojxa7UWDkf7raAkB1Lw=", + "lastModified": 1741540808, + "narHash": "sha256-KSOHzP9gnxaF9YdtwFOPwnFvJEikg/uAvZ6M6VA/FQc=", "owner": "nix-community", "repo": "home-manager", - "rev": "97ac0801d187b2911e8caa45316399de12f6f199", + "rev": "2967de4d1146f1b6aa820eed85b823ea2ebfd0fa", "type": "github" }, "original": { @@ -566,27 +504,6 @@ "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738743987, - "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nixlib": { "locked": { "lastModified": 1736643958, @@ -611,11 +528,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1739909000, - "narHash": "sha256-DsepQ7ApA4li8td4QFTmX2qs4gvCLfoN7Mlaifmji7Y=", + "lastModified": 1741532023, + "narHash": "sha256-wPoRT99r7dMQiXWzDe9v/2OSXOmGOWad/0q9norshvs=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5516035bb36dbb19f2bbe7b9cea6922db395e100", + "rev": "364761eb5ba3f1514446b6a0eb8e8651c5bc4c67", "type": "github" }, "original": { @@ -632,11 +549,11 @@ ] }, "locked": { - "lastModified": 1737057290, - "narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=", + "lastModified": 1740947705, + "narHash": "sha256-Co2kAD2SZalOm+5zoxmzEVZNvZ17TyafuFsD46BwSdY=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453", + "rev": "507911df8c35939050ae324caccc7cf4ffb76565", "type": "github" }, "original": { @@ -647,11 +564,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1739798439, - "narHash": "sha256-GyipmjbbQEaosel/+wq1xihCKbv0/e1LU00x/8b/fP4=", + "lastModified": 1741325094, + "narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "3e2ea8a49d4d76276b0f4e2041df8ca5c0771371", + "rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16", "type": "github" }, "original": { @@ -669,11 +586,11 @@ ] }, "locked": { - "lastModified": 1739782332, - "narHash": "sha256-bPZKuual2WKfyHv7Wq+Owcj9R+i/qFzOWByqSS9rlxI=", + "lastModified": 1741192150, + "narHash": "sha256-wB140alXVla1Rw/kENerUoma2qO1Jy5IYWbmiSqmJu0=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "59bdbb1e75232bf1dd6d2a9313b9b6ddc5049ba2", + "rev": "0e4ccdb8181da2c6193c047b50ffee5f1a3b6dc1", "type": "github" }, "original": { @@ -684,11 +601,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1739758141, - "narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=", + "lastModified": 1741332913, + "narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c618e28f70257593de75a7044438efc1c1fc0791", + "rev": "20755fa05115c84be00b04690630cb38f0a203ad", "type": "github" }, "original": { @@ -715,11 +632,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1739624908, - "narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=", + "lastModified": 1741332913, + "narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a60651b217d2e529729cbc7d989c19f3941b9250", + "rev": "20755fa05115c84be00b04690630cb38f0a203ad", "type": "github" }, "original": { @@ -731,11 +648,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1739866667, - "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { @@ -763,11 +680,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1739736696, - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", + "lastModified": 1741379970, + "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", + "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", "type": "github" }, "original": { @@ -779,24 +696,16 @@ }, "nixvim": { "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat_3", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", - "home-manager": [ - "home-manager-unstable" - ], - "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_2", - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1739902813, - "narHash": "sha256-BgOQcKKz7VNvSHIbBllHisv32HvF3W3ALF9sdnC++V8=", + "lastModified": 1741098523, + "narHash": "sha256-gXDSXDr6tAb+JgxGMvcEjKC9YO8tVOd8hMMZHJLyQ6Q=", "owner": "nix-community", "repo": "nixvim", - "rev": "0ab9947137cd034ec64eb5cd9ede94e53af21f50", + "rev": "03065fd4708bfdf47dd541d655392a60daa25ded", "type": "github" }, "original": { @@ -809,14 +718,37 @@ "inputs": { "flake-parts": "flake-parts_2", "nixpkgs": "nixpkgs_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1741541688, + "narHash": "sha256-So/foAIONGA7amt6gQez1RZOqYpFcvjeO+8g02LqfTU=", + "owner": "nix-community", + "repo": "NUR", + "rev": "55fd8b947ee109c7bc8ed6713a1e2e09d3e83c56", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "nur_2": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": [ + "stylix", + "nixpkgs" + ], "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1739903703, - "narHash": "sha256-w2tTcjx39lJoPDaFbIxi+INIjAKE0jbIx9TNjj9ghmg=", + "lastModified": 1740408283, + "narHash": "sha256-2xECnhgF3MU9YjmvOkrRp8wRFo2OjjewgCtlfckhL5s=", "owner": "nix-community", "repo": "NUR", - "rev": "2215ad5c4347f522523715e809f5f2022509f504", + "rev": "496a4a11162bdffb9a7b258942de138873f019f7", "type": "github" }, "original": { @@ -874,9 +806,9 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "git-hooks": "git-hooks_2", + "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager-unstable" @@ -884,6 +816,7 @@ "nixpkgs": [ "nixpkgs-unstable" ], + "nur": "nur_2", "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", @@ -892,11 +825,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1739909171, - "narHash": "sha256-GmuW8XkOF6lSEQBeXzUCyr6tetbbxX8wpNJlwFqT/9E=", + "lastModified": 1741533345, + "narHash": "sha256-wStpjHkVAuwYvs3oNSLWz8A2QkicfrGlP4rw2+OiyAU=", "owner": "danth", "repo": "stylix", - "rev": "aeb550add3bfa1ce3ce249c3b3dad71ebb018318", + "rev": "a76068262cfc16c04f9c07a6458715548b067450", "type": "github" }, "original": { @@ -1002,11 +935,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1737565458, - "narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=", + "lastModified": 1740351358, + "narHash": "sha256-Hdk850xgAd3DL8KX0AbyU7tC834d3Lej1jOo3duWiOA=", "owner": "tinted-theming", "repo": "schemes", - "rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9", + "rev": "a1bc2bd89e693e7e3f5764cfe8114e2ae150e184", "type": "github" }, "original": { @@ -1018,11 +951,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1735737224, - "narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=", + "lastModified": 1740272597, + "narHash": "sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64", + "rev": "b6c7f46c8718cc484f2db8b485b06e2a98304cd0", "type": "github" }, "original": { @@ -1050,16 +983,16 @@ "treefmt-nix": { "inputs": { "nixpkgs": [ - "nixvim", + "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1738680491, - "narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=", + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "64dbb922d51a42c0ced6a7668ca008dded61c483", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", "type": "github" }, "original": { @@ -1071,6 +1004,7 @@ "treefmt-nix_2": { "inputs": { "nixpkgs": [ + "stylix", "nur", "nixpkgs" ] diff --git a/pkgs/default.nix b/pkgs/default.nix index 7312b58..6db687e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -10,4 +10,6 @@ pkgs.callPackage ./website/default.nix { inherit kop-hub ente-frontend; }; sddm-astronaut = pkgs.callPackage ./sddm-astronaut/default.nix { }; mangal-patched = pkgs.callPackage ./mangal/default.nix { }; + electron_27 = pkgs.callPackage ./electron27/default.nix { }; + logseq = pkgs.callPackage ./logseq/default.nix { inherit electron_27; }; } diff --git a/pkgs/electron27/default.nix b/pkgs/electron27/default.nix new file mode 100644 index 0000000..0123155 --- /dev/null +++ b/pkgs/electron27/default.nix @@ -0,0 +1,162 @@ +{ lib, stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook3, glib, gtk3 +, unzip, at-spi2-atk, libdrm, libgbm, libxkbcommon, libxshmfence, libGL +, vulkan-loader, alsa-lib, cairo, cups, dbus, expat, gdk-pixbuf, nss, nspr, xorg +, pango, systemd, pciutils, }: + +let + version = "27.3.11"; + hashes = { + "aarch64-darwin" = + "a687b199fcb9890f43af90ac8a4d19dc7b15522394de89e42abd5f5c6b735804"; + "aarch64-linux" = + "ddbfcd5e04450178ca4e3113f776893454822af6757761adc792692f7978e0df"; + "armv7l-linux" = + "012127a3edf79e0e4623a08e853286e1cba512438a0414b1ab19b75d929c1cf2"; + "headers" = "0vrjdvqllfyz09sw2y078mds1di219hnmska8bw8ni7j35wxr2br"; + "x86_64-darwin" = + "357e70a1c8848d4ac7655346bec98dd18a7c0cee82452a7edf76142017779049"; + "x86_64-linux" = + "e3a6f55e54e7a623bba1a15016541248408eef5a19ab82a59d19c807aab14563"; + + }; + pname = "electron"; + + meta = with lib; { + description = "Cross platform desktop application shell"; + homepage = "https://github.com/electron/electron"; + license = licenses.mit; + mainProgram = "electron"; + maintainers = with maintainers; [ yayayayaka teutat3s ]; + platforms = + [ "x86_64-darwin" "x86_64-linux" "armv7l-linux" "aarch64-linux" ] + ++ optionals (versionAtLeast version "11.0.0") [ "aarch64-darwin" ] + ++ optionals (versionOlder version "19.0.0") [ "i686-linux" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + # https://www.electronjs.org/docs/latest/tutorial/electron-timelines + knownVulnerabilities = optional (versionOlder version "32.0.0") + "Electron version ${version} is EOL"; + }; + + fetcher = vers: tag: hash: + fetchurl { + url = + "https://github.com/electron/electron/releases/download/v${vers}/electron-v${vers}-${tag}.zip"; + sha256 = hash; + }; + + headersFetcher = vers: hash: + fetchurl { + url = + "https://artifacts.electronjs.org/headers/dist/v${vers}/node-v${vers}-headers.tar.gz"; + sha256 = hash; + }; + + tags = { + x86_64-linux = "linux-x64"; + armv7l-linux = "linux-armv7l"; + aarch64-linux = "linux-arm64"; + x86_64-darwin = "darwin-x64"; + } // lib.optionalAttrs (lib.versionAtLeast version "11.0.0") { + aarch64-darwin = "darwin-arm64"; + } // lib.optionalAttrs (lib.versionOlder version "19.0.0") { + i686-linux = "linux-ia32"; + }; + + get = as: platform: + as.${platform.system} or (throw "Unsupported system: ${platform.system}"); + + common = platform: { + inherit pname version meta; + src = fetcher version (get tags platform) (get hashes platform); + passthru.headers = headersFetcher version hashes.headers; + }; + + electronLibPath = lib.makeLibraryPath ([ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + nss + nspr + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libxkbfile + pango + pciutils + stdenv.cc.cc + systemd + ] ++ lib.optionals (lib.versionAtLeast version "9.0.0") [ libdrm libgbm ] + ++ lib.optionals (lib.versionOlder version "10.0.0") [ libXScrnSaver ] + ++ lib.optionals (lib.versionAtLeast version "11.0.0") [ libxkbcommon ] + ++ lib.optionals (lib.versionAtLeast version "12.0.0") [ libxshmfence ] + ++ lib.optionals (lib.versionAtLeast version "17.0.0") [ + libGL + vulkan-loader + ]); + + linux = finalAttrs: { + buildInputs = [ glib gtk3 ]; + + nativeBuildInputs = [ unzip makeWrapper wrapGAppsHook3 ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/libexec/electron $out/bin + unzip -d $out/libexec/electron $src + ln -s $out/libexec/electron/electron $out/bin + chmod u-x $out/libexec/electron/*.so* + ''; + + postFixup = '' + patchelf \ + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${electronLibPath}:$out/libexec/electron" \ + $out/libexec/electron/.electron-wrapped \ + ${ + lib.optionalString (lib.versionAtLeast version "15.0.0") + "$out/libexec/electron/.chrome_crashpad_handler-wrapped" + } + + # patch libANGLE + patchelf \ + --set-rpath "${lib.makeLibraryPath [ libGL pciutils vulkan-loader ]}" \ + $out/libexec/electron/lib*GL* + + # replace bundled vulkan-loader + rm "$out/libexec/electron/libvulkan.so.1" + ln -s -t "$out/libexec/electron" "${ + lib.getLib vulkan-loader + }/lib/libvulkan.so.1" + ''; + + passthru.dist = finalAttrs.finalPackage + "/libexec/electron"; + }; + + darwin = finalAttrs: { + nativeBuildInputs = [ makeWrapper unzip ]; + + buildCommand = '' + mkdir -p $out/Applications + unzip $src + mv Electron.app $out/Applications + mkdir -p $out/bin + makeWrapper $out/Applications/Electron.app/Contents/MacOS/Electron $out/bin/electron + ''; + + passthru.dist = finalAttrs.finalPackage + "/Applications"; + }; +in stdenv.mkDerivation (finalAttrs: + lib.recursiveUpdate (common stdenv.hostPlatform) + ((if stdenv.hostPlatform.isDarwin then darwin else linux) finalAttrs)) diff --git a/pkgs/logseq/default.nix b/pkgs/logseq/default.nix new file mode 100644 index 0000000..e815a18 --- /dev/null +++ b/pkgs/logseq/default.nix @@ -0,0 +1,99 @@ +{ lib +, stdenv +, fetchurl +, appimageTools +, unzip +, makeWrapper + # Notice: graphs will not sync without matching upstream's major electron version + # the specific electron version is set at top-level file to preserve override interface. + # whenever updating this package also sync electron version at top-level file. +, electron_27 +, autoPatchelfHook +, git +, nix-update-script +}: + +stdenv.mkDerivation (finalAttrs: +let + inherit (finalAttrs) pname version src; + inherit (stdenv.hostPlatform) system; + selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}"); + suffix = selectSystem { + x86_64-linux = "linux-x64-${version}.AppImage"; + x86_64-darwin = "darwin-x64-${version}.zip"; + aarch64-darwin = "darwin-arm64-${version}.zip"; + }; + hash = selectSystem { + x86_64-linux = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc="; + x86_64-darwin = "sha256-0i9ozqBSeV/y8v+YEmQkbY0V6JHOv6tKub4O5Fdx2fQ="; + aarch64-darwin = "sha256-Uvv96XWxpFj14wPH0DwPT+mlf3Z2dy1g/z8iBt5Te7Q="; + }; +in +{ + pname = "logseq"; + version = "0.10.9"; + src = fetchurl { + inherit hash; + url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-${suffix}"; + name = lib.optionalString stdenv.hostPlatform.isLinux "logseq-${version}.AppImage"; + }; + + nativeBuildInputs = [ makeWrapper ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ unzip ]; + buildInputs = [ (lib.getLib stdenv.cc.cc) ]; + + dontUnpack = stdenv.hostPlatform.isLinux; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + '' + lib.optionalString stdenv.hostPlatform.isLinux ( + let + appimageContents = appimageTools.extract { inherit pname src version; }; + in + '' + mkdir -p $out/bin $out/share/logseq $out/share/applications + cp -a ${appimageContents}/{locales,resources} $out/share/logseq + cp -a ${appimageContents}/Logseq.desktop $out/share/applications/logseq.desktop + # remove the `git` in `dugite` because we want the `git` in `nixpkgs` + chmod +w -R $out/share/logseq/resources/app/node_modules/dugite/git + chmod +w $out/share/logseq/resources/app/node_modules/dugite + rm -rf $out/share/logseq/resources/app/node_modules/dugite/git + chmod -w $out/share/logseq/resources/app/node_modules/dugite + mkdir -p $out/share/pixmaps + ln -s $out/share/logseq/resources/app/icons/logseq.png $out/share/pixmaps/logseq.png + substituteInPlace $out/share/applications/logseq.desktop \ + --replace Exec=Logseq Exec=logseq \ + --replace Icon=Logseq Icon=logseq + '' + ) + lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p $out/{Applications/Logseq.app,bin} + cp -R . $out/Applications/Logseq.app + makeWrapper $out/Applications/Logseq.app/Contents/MacOS/Logseq $out/bin/logseq + '' + '' + runHook postInstall + ''; + + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' + # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs + makeWrapper ${electron_27}/bin/electron $out/bin/logseq \ + --set "LOCAL_GIT_DIRECTORY" ${git} \ + --add-flags $out/share/logseq/resources/app \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base"; + homepage = "https://github.com/logseq/logseq"; + changelog = "https://github.com/logseq/logseq/releases/tag/${version}"; + license = lib.licenses.agpl3Plus; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ cheeseecake ]; + platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin; + mainProgram = "logseq"; + }; +}) diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 38b4b75..8f1c189 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -101,7 +101,6 @@ environment.systemPackages = with pkgs; [ libimobiledevice ifuse # optional, to mount using 'ifuse' - (callPackage ./zen.nix {}) ]; nixpkgs.config.permittedInsecurePackages = [ diff --git a/systems/pc/zen.nix b/systems/pc/zen.nix deleted file mode 100644 index d9ccea4..0000000 --- a/systems/pc/zen.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ appimageTools, fetchurl, ... }: -let - pname = "zen"; - version = "latest"; - - src = fetchurl { - url = "https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage"; - sha256 = "sha256-hZiJ8JLzLhtD1W8DAso3yBAJYhFE+nJEbQJa59AWjnU="; - }; - - appimageContents = appimageTools.extract { - inherit pname version src; - }; -in -appimageTools.wrapType2 { - inherit pname version src; - - extraInstallCommands = '' - # Install .desktop file - install -m 444 -D ${appimageContents}/zen.desktop $out/share/applications/${pname}.desktop - # Install icon - install -m 444 -D ${appimageContents}/zen.png $out/share/icons/hicolor/128x128/apps/${pname}.png - ''; - - meta = { - platforms = [ "x86_64-linux" ]; - }; -} From d0fa3674c3aa7b3d52c42f97f27012ce42fe641d Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 9 Mar 2025 19:24:37 +0100 Subject: [PATCH 08/13] remove typstwriter --- modules/fh/writing.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/fh/writing.nix b/modules/fh/writing.nix index accca91..9ef4073 100644 --- a/modules/fh/writing.nix +++ b/modules/fh/writing.nix @@ -1,6 +1,5 @@ {pkgs, ...}: { environment.systemPackages = with pkgs; [ typst - typstwriter ]; } From 28c4ff21a6ddd81086e9bf31697f525d7638d18e Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 10 Mar 2025 14:57:43 +0100 Subject: [PATCH 09/13] gimp3, disable channels --- .config/i3/config | 1 - flake.lock | 17 +++++++++++++++++ flake.nix | 2 ++ modules/hardware/ryzen.nix | 9 +++++++++ modules/nix/settings.nix | 1 + overlays.nix | 7 +++++++ systems/pc/configuration.nix | 6 ++---- 7 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 modules/hardware/ryzen.nix diff --git a/.config/i3/config b/.config/i3/config index 21706f7..7c5221b 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -351,7 +351,6 @@ exec_always --no-startup-id sleep 5 && pactl list short sources | grep 'alsa_inp exec --no-startup-id /usr/bin/env dunst # alternative if you installed aside with XFCE4: # exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd & -exec --no-startup-id sleep 5 && nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=230" # autotiling script # https://github.com/nwg-piotr/autotiling diff --git a/flake.lock b/flake.lock index 2761ad5..8a66c6a 100644 --- a/flake.lock +++ b/flake.lock @@ -615,6 +615,22 @@ "type": "github" } }, + "nixpkgs-gimp3": { + "locked": { + "lastModified": 1735507908, + "narHash": "sha256-VA+khC0S0di6w5Yv1kBNRpAihnt2prT/ehQzsKMhEoA=", + "owner": "jtojnar", + "repo": "nixpkgs", + "rev": "771cf18187fefcfaababd35834917c621447fee8", + "type": "github" + }, + "original": { + "owner": "jtojnar", + "ref": "gimp-meson", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1697935651, @@ -793,6 +809,7 @@ "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", + "nixpkgs-gimp3": "nixpkgs-gimp3", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "nur": "nur", diff --git a/flake.nix b/flake.nix index 0b7910b..98fd209 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ #TODO: wait until https://github.com/NixOS/nixpkgs/pull/339641 is in unstable https://nixpk.gs/pr-tracker.html?pr=339641 #nixpkgs-unstable.url = "github:nixos/nixpkgs/a6916c76a7d202e3c02134e620f6477b8600ce9d"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-gimp3.url = "github:jtojnar/nixpkgs/gimp-meson"; home-manager-unstable = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs-unstable"; @@ -73,6 +74,7 @@ modifications unstable-packages stable-packages + gimp3 nur.overlays.default ]; }; diff --git a/modules/hardware/ryzen.nix b/modules/hardware/ryzen.nix new file mode 100644 index 0000000..8b55fef --- /dev/null +++ b/modules/hardware/ryzen.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: { + + boot = { + extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; + kernelModules = [ "zenpower" ]; + blacklistedKernelModules = [ "k10temp" ]; + }; + environment.systemPackages = with pkgs; [ zenmonitor ]; +} diff --git a/modules/nix/settings.nix b/modules/nix/settings.nix index 065c7b5..cc833cb 100644 --- a/modules/nix/settings.nix +++ b/modules/nix/settings.nix @@ -32,6 +32,7 @@ in { dates = "weekly"; options = "--delete-older-than 30d"; }; + channel.enable = false; extraOptions = '' min-free = ${toString (100 * 1024 * 1024)} max-free = ${toString (1024 * 1024 * 1024)} diff --git a/overlays.nix b/overlays.nix index c7a9cbc..e359722 100644 --- a/overlays.nix +++ b/overlays.nix @@ -70,4 +70,11 @@ in { config.allowUnfree = true; }; }; + + gimp3 = final: _prev: { + gimp3 = import inputs.nixpkgs-gimp3 { + system = final.system; + config.allowUnfree = true; + }; + }; } diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 8f1c189..6ee44a2 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -14,6 +14,7 @@ ../../modules/fh/writing.nix ../../modules/work/vpn.nix ../../modules/misc/faster-boot-time.nix + ../../modules/hardware/ryzen.nix ]; custom = { @@ -101,6 +102,7 @@ environment.systemPackages = with pkgs; [ libimobiledevice ifuse # optional, to mount using 'ifuse' + gimp3.gimp ]; nixpkgs.config.permittedInsecurePackages = [ @@ -155,10 +157,6 @@ EndSection ''; - #zenpower for ryzen - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; - boot.kernelModules = [ "zenpower" ]; - boot.blacklistedKernelModules = [ "k10temp" ]; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; From 287c67e6dcc29773e7add1baa476a67ac4b81c89 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 11 Mar 2025 20:02:35 +0100 Subject: [PATCH 10/13] amd gpu --- .config/i3/config | 4 +- .config/polybar/amd-gpu.sh | 34 +++++++++ .config/waybar/amd-gpu.sh | 1 + flake.lock | 17 +++++ flake.nix | 1 + home-manager/hyprland/hyprland-settings.nix | 25 ++++--- home-manager/hyprland/hyprlock.nix | 2 +- home-manager/hyprland/styles/stats.css | 5 ++ home-manager/hyprland/waybar.nix | 9 ++- home-manager/i3.nix | 17 +++-- modules/networkmanager.nix | 2 + overlays.nix | 7 ++ pkgs/default.nix | 1 + pkgs/lact/default.nix | 78 +++++++++++++++++++++ systems/pc/configuration.nix | 7 +- 15 files changed, 188 insertions(+), 22 deletions(-) create mode 100755 .config/polybar/amd-gpu.sh create mode 120000 .config/waybar/amd-gpu.sh create mode 100644 pkgs/lact/default.nix diff --git a/.config/i3/config b/.config/i3/config index 7c5221b..8fcef21 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -1,8 +1,8 @@ # Please see https://i3wm.org/docs/userguide.html for a complete reference! set $mod Mod4 -set $LeftMonitor HDMI-0 -set $RightMonitor DP-4 +set $LeftMonitor HDMI-A-0 +set $RightMonitor DisplayPort-0 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. diff --git a/.config/polybar/amd-gpu.sh b/.config/polybar/amd-gpu.sh new file mode 100755 index 0000000..7b1758d --- /dev/null +++ b/.config/polybar/amd-gpu.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Base path for AMD GPU sysfs +GPU_BASE_PATH="/sys/class/drm/card1/device" + +# Check if AMD GPU sysfs exists +if [ ! -d "$GPU_BASE_PATH" ]; then + echo "---" + exit 1 +fi + +# Get GPU usage +GPU_UTIL=$(cat "$GPU_BASE_PATH/gpu_busy_percent" 2>/dev/null || echo "N/A") + +# Base path for hwmon (temperature and power readings) +HWMON_PATH="$GPU_BASE_PATH/hwmon/hwmon0" + +# Get GPU temperature +TEMP_PATH="$HWMON_PATH/temp1_input" +if [ -f "$TEMP_PATH" ]; then + GPU_TEMP=$(($(cat "$TEMP_PATH") / 1000)) # Convert from millidegrees to degrees +else + GPU_TEMP="N/A" +fi + +# Get GPU power usage +POWER_PATH="$HWMON_PATH/power1_average" +if [ -f "$POWER_PATH" ]; then + GPU_POWER=$(($(cat "$POWER_PATH") / 1000000)) # Convert from microwatts to watts +else + GPU_POWER="N/A" +fi + +echo "GPU ${GPU_UTIL}%, ${GPU_TEMP}°C, ${GPU_POWER}W" diff --git a/.config/waybar/amd-gpu.sh b/.config/waybar/amd-gpu.sh new file mode 120000 index 0000000..ed20b6f --- /dev/null +++ b/.config/waybar/amd-gpu.sh @@ -0,0 +1 @@ +../polybar/amd-gpu.sh \ No newline at end of file diff --git a/flake.lock b/flake.lock index 8a66c6a..e18c33a 100644 --- a/flake.lock +++ b/flake.lock @@ -646,6 +646,22 @@ "type": "github" } }, + "nixpkgs-mesa-git": { + "locked": { + "lastModified": 1741705751, + "narHash": "sha256-TERyCTgLllWgmuYMxbrnjjJQYkj2TT7QoTDUCT/oFOc=", + "owner": "kropatz", + "repo": "nixpkgs", + "rev": "97c017ceecbbc3a5a8e588f3f2e79182afd2dd29", + "type": "github" + }, + "original": { + "owner": "kropatz", + "ref": "mesa-git", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1741332913, @@ -810,6 +826,7 @@ "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "nixpkgs-gimp3": "nixpkgs-gimp3", + "nixpkgs-mesa-git": "nixpkgs-mesa-git", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "nur": "nur", diff --git a/flake.nix b/flake.nix index 98fd209..50ed55d 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ #nixpkgs-unstable.url = "github:nixos/nixpkgs/a6916c76a7d202e3c02134e620f6477b8600ce9d"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-gimp3.url = "github:jtojnar/nixpkgs/gimp-meson"; + nixpkgs-mesa-git.url = "github:kropatz/nixpkgs/mesa-git"; home-manager-unstable = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs-unstable"; diff --git a/home-manager/hyprland/hyprland-settings.nix b/home-manager/hyprland/hyprland-settings.nix index c2ca65a..ca7b348 100644 --- a/home-manager/hyprland/hyprland-settings.nix +++ b/home-manager/hyprland/hyprland-settings.nix @@ -10,6 +10,8 @@ let sleep 4 systemctl --user restart xdg-desktop-portal ''; + monitor1 = if isPc then "DP-1" else if isLaptop then "eDP-1" else "eDP-1"; + monitor2 = "HDMI-A-1"; in { config = lib.mkIf cfg.enable { @@ -28,8 +30,8 @@ in { # See https://wiki.hyprland.org/Configuring/Monitors/ monitor = if isPc then [ - "HDMI-A-1,1920x1080@60,0x0,1" - "DP-3,2560x1440@150,1920x0,1" + "${monitor2},1920x1080@60,0x0,1" + "${monitor1},2560x1440@144,1920x0,1" "Unknown-1,disable" ] else if isLaptop then [ # laptop @@ -45,13 +47,13 @@ in { workspace = lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [ - "1,monitor:DP-3" - "2,monitor:DP-3" - "3,monitor:DP-3" - "4,monitor:DP-3" - "5,monitor:DP-3" - "9,monitor:HDMI-A-1" - "10,monitor:HDMI-A-1" + "1,monitor:${monitor1}" + "2,monitor:${monitor1}" + "3,monitor:${monitor1}" + "4,monitor:${monitor1}" + "5,monitor:${monitor1}" + "9,monitor:${monitor2}" + "10,monitor:${monitor2}" ]; # See https://wiki.hyprland.org/Configuring/Keywords/ for more @@ -64,7 +66,7 @@ in { # Some default env vars. env = - [ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "WLR_NO_HARDWARE_CURSORS,1" ] + [ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" ] ++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "LIBVA_DRIVER_NAME,nvidia" "GBM_BACKEND,nvidia-drm" @@ -88,7 +90,7 @@ in { sensitivity = 0; }; - cursor = { no_hardware_cursors = true; }; + #cursor = { no_hardware_cursors = true; }; #render = { # explicit_sync = 1; @@ -303,6 +305,7 @@ in { ] ++ [ "sleep 3 && ${pkgs.waybar}/bin/waybar &" "${restartPortals}" + "xrandr --monitor ${monitor1} --primary" ]; }; extraConfig = let diff --git a/home-manager/hyprland/hyprlock.nix b/home-manager/hyprland/hyprlock.nix index 63bee38..1a058d9 100644 --- a/home-manager/hyprland/hyprlock.nix +++ b/home-manager/hyprland/hyprlock.nix @@ -58,7 +58,7 @@ in { }; # don't autostart - systemd.user.services.hypridle.Service.ExecStart = lib.mkForce "true"; + systemd.user.services.hypridle.Service.ExecStart = lib.mkForce "${pkgs.coreutils}/bin/true"; systemd.user.services.hypridle.Service.Restart = lib.mkForce "no"; services.hypridle.enable = true; services.hypridle.settings = { diff --git a/home-manager/hyprland/styles/stats.css b/home-manager/hyprland/styles/stats.css index a487d19..35de0f9 100644 --- a/home-manager/hyprland/styles/stats.css +++ b/home-manager/hyprland/styles/stats.css @@ -1,4 +1,5 @@ @define-color nvidia-green #76b900; +@define-color amdgpu-red #ed1c24; #other, #other-drawer, @@ -43,6 +44,10 @@ color: @nvidia-green; } +#custom-amd-gpu { + color: @amdgpu-red; +} + #network.disconnected { background-color: #f53c3c; } diff --git a/home-manager/hyprland/waybar.nix b/home-manager/hyprland/waybar.nix index ef111c7..997020a 100644 --- a/home-manager/hyprland/waybar.nix +++ b/home-manager/hyprland/waybar.nix @@ -34,7 +34,9 @@ in { modules-right = [ "group/stats" "group/other" ]; "group/stats" = { "orientation" = "horizontal"; - "modules" = [ "network" "cpu" "memory" "disk" "temperature" ] ++ lib.optionals (osConfig.networking.hostName != "nix-laptop") [ "custom/nvidia" ] ; + "modules" = [ "network" "cpu" "memory" "disk" "temperature" ] + ++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ] + ++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]; }; "group/other" = { "orientation" = "horizontal"; @@ -147,6 +149,11 @@ in { "exec" = "~/.config/waybar/nvidia.sh"; "exec-if" = "nvidia-smi"; }; + "custom/amd-gpu" = { + "format" = "{}"; + "interval" = 5; + "exec" = "~/.config/waybar/amd-gpu.sh"; + }; "tray".icon-size = 21; "tray".spacing = 10; "hyprland/window" = { diff --git a/home-manager/i3.nix b/home-manager/i3.nix index e0c14a0..a6871d8 100644 --- a/home-manager/i3.nix +++ b/home-manager/i3.nix @@ -55,8 +55,10 @@ in { module-margin = 1; modules-left = "i3 xwindow"; modules-center = ""; - modules-right = - "music network memory cpu cpu-wattage cpu-temp gpu pulseaudio date tray"; + modules-right = [ "music network memory cpu cpu-wattage cpu-temp" ] + ++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ] + ++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ] + ++ [ "pulseaudio date tray" ]; cursor-click = "pointer"; cursor-scroll = "ns-resize"; enable-ipc = true; @@ -187,13 +189,20 @@ in { exec = "~/.config/polybar/temperature.sh"; interval = 3; }; - "module/gpu" = { + "module/nvidia-gpu" = { type = "custom/script"; - format-foreground = "76b900"; #nvidia green + format-foreground = "76b900"; # nvidia green label = "%output:0:35:...%"; exec = "~/.config/polybar/nvidia.sh"; interval = 3; }; + "module/amd-gpu" = { + type = "custom/script"; + format-foreground = "ed1c24"; + label = "%output:0:35:...%"; + exec = "~/.config/polybar/amd-gpu.sh"; + interval = 3; + }; "module/music" = { type = "custom/script"; exec = "~/.config/polybar/player-mpris-simple.sh"; diff --git a/modules/networkmanager.nix b/modules/networkmanager.nix index 15456c3..9079055 100644 --- a/modules/networkmanager.nix +++ b/modules/networkmanager.nix @@ -1,3 +1,5 @@ +{pkgs, lib, ...}: { networking.networkmanager.enable = true; + networking.networkmanager.plugins = lib.mkForce [ pkgs.networkmanager-openvpn ]; } diff --git a/overlays.nix b/overlays.nix index e359722..1ac1ec6 100644 --- a/overlays.nix +++ b/overlays.nix @@ -4,6 +4,10 @@ let addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ patches; }); + mesa-git = import inputs.nixpkgs-mesa-git { + system = "x86_64-linux"; + config.allowUnfree = true; + }; in { # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ./pkgs { pkgs = final; }; @@ -15,6 +19,9 @@ in { discord-canary = prev.discord-canary.override { withVencord = true; }; discord = prev.discord.override { withVencord = true; }; tetrio-desktop = prev.tetrio-desktop.override { withTetrioPlus = true; }; + lact = prev.rdna4-lact; + #mesa = mesa-git.pkgs.mesa; + #wayland-protocols = mesa-git.pkgs.wayland-protocols; #hyprland = prev.hyprland.overrideAttrs (oldAttrs: { # version = "0.45.0"; # src = prev.fetchFromGitHub { diff --git a/pkgs/default.nix b/pkgs/default.nix index 6db687e..ebeb931 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -12,4 +12,5 @@ mangal-patched = pkgs.callPackage ./mangal/default.nix { }; electron_27 = pkgs.callPackage ./electron27/default.nix { }; logseq = pkgs.callPackage ./logseq/default.nix { inherit electron_27; }; + rdna4-lact = pkgs.callPackage ./lact/default.nix { }; } diff --git a/pkgs/lact/default.nix b/pkgs/lact/default.nix new file mode 100644 index 0000000..6c57dc2 --- /dev/null +++ b/pkgs/lact/default.nix @@ -0,0 +1,78 @@ +{ lib, rustPlatform, stdenv, fetchFromGitHub, blueprint-compiler, pkg-config +, wrapGAppsHook4, gdk-pixbuf, gtk4, libdrm, vulkan-loader, coreutils +, nix-update-script, hwdata, fuse }: + +rustPlatform.buildRustPackage rec { + pname = "lact"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "ilya-zlobintsev"; + repo = "LACT"; + #rev = "v${version}"; + #hash = "sha256-zaN6CQSeeoYFxLO6E1AMKAjeNOcPi2OsGfYkvZLPKcw="; + rev = "e472dec45682f96a272b77d368791121e10ba7da"; + hash = "sha256-d081f49ojJzz0N28lIu3NZ8SSvSuoz2HfjQl5Zu8PpU="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-vc8KqMov2Og5wRS4b9n9Vixtg4vwCM/MlkCDbqsG3Kg="; + + nativeBuildInputs = + [ blueprint-compiler pkg-config wrapGAppsHook4 rustPlatform.bindgenHook ]; + + buildInputs = [ gdk-pixbuf gtk4 libdrm vulkan-loader hwdata fuse ]; + + # we do this here so that the binary is usable during integration tests + RUSTFLAGS = lib.optionalString stdenv.targetPlatform.isElf + (lib.concatStringsSep " " [ + "-C link-arg=-Wl,-rpath,${lib.makeLibraryPath [ vulkan-loader libdrm ]}" + "-C link-arg=-Wl,--add-needed,${vulkan-loader}/lib/libvulkan.so" + "-C link-arg=-Wl,--add-needed,${libdrm}/lib/libdrm.so" + ]); + + checkFlags = [ + # tries and fails to initialize gtk + "--skip=app::pages::thermals_page::fan_curve_frame::tests::set_get_curve" + "--skip=tests::snapshot_everything" + ]; + + postPatch = '' + substituteInPlace lact-daemon/src/server/system.rs \ + --replace-fail 'Command::new("uname")' 'Command::new("${coreutils}/bin/uname")' + + substituteInPlace res/lactd.service \ + --replace-fail ExecStart={lact,$out/bin/lact} + + substituteInPlace res/io.github.lact-linux.desktop \ + --replace-fail Exec={lact,$out/bin/lact} + + # read() looks for the database in /usr/share so we use read_from_file() instead + substituteInPlace lact-daemon/src/server/handler.rs \ + --replace-fail 'Database::read()' 'Database::read_from_file("${hwdata}/share/hwdata/pci.ids")' + ''; + + postInstall = '' + install -Dm444 res/lactd.service -t $out/lib/systemd/system + install -Dm444 res/io.github.lact-linux.desktop -t $out/share/applications + install -Dm444 res/io.github.lact-linux.png -t $out/share/pixmaps + ''; + + postFixup = lib.optionalString stdenv.targetPlatform.isElf '' + patchelf $out/bin/.lact-wrapped \ + --add-needed libvulkan.so \ + --add-needed libdrm.so \ + --add-rpath ${lib.makeLibraryPath [ vulkan-loader libdrm ]} + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Linux GPU Configuration Tool for AMD and NVIDIA"; + homepage = "https://github.com/ilya-zlobintsev/LACT"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ figsoda atemu ]; + platforms = lib.platforms.linux; + mainProgram = "lact"; + }; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 6ee44a2..56c9a7c 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -15,6 +15,7 @@ ../../modules/work/vpn.nix ../../modules/misc/faster-boot-time.nix ../../modules/hardware/ryzen.nix + ../../modules/networkmanager.nix ]; custom = { @@ -40,8 +41,9 @@ services = { syncthing = { enable = true; }; }; hardware = { android.enable = true; + amd-gpu.enable = true; nvidia = { - enable = true; + enable = false; clock = { enable = true; min = 210; @@ -75,7 +77,7 @@ nightlight.enable = true; #plasma.enable = true; i3.enable = true; - sway.enable = true; + #sway.enable = true; hyprland.enable = true; #gnome.enable = true; #cosmic.enable = true; @@ -166,7 +168,6 @@ networking.hostName = "kop-pc"; # Define your hostname. # Enable networking - networking.networkmanager.enable = true; boot.initrd.systemd.network.wait-online.enable = false; systemd.network.wait-online.enable = false; From a8adef48e671a7c1e482f0427032820aef7f2df2 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 12 Mar 2025 10:27:55 +0100 Subject: [PATCH 11/13] use bleeding edge kernel, firmware and mesa --- flake.lock | 96 +++++++++---------- flake.nix | 1 + modules/hardware/amd-gpu.nix | 25 ++++- .../hardware/{ryzen.nix => ryzenmonitor.nix} | 0 modules/kernel.nix | 3 +- overlays.nix | 7 ++ systems/pc/configuration.nix | 2 +- systems/pc/hardware-configuration.nix | 2 +- 8 files changed, 84 insertions(+), 52 deletions(-) rename modules/hardware/{ryzen.nix => ryzenmonitor.nix} (100%) diff --git a/flake.lock b/flake.lock index e18c33a..e351b84 100644 --- a/flake.lock +++ b/flake.lock @@ -137,11 +137,11 @@ ] }, "locked": { - "lastModified": 1740485968, - "narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=", + "lastModified": 1741684000, + "narHash": "sha256-NQykaWIrn5zilncefIvW4jPQ76YMXVK/dMTzkSVDmdk=", "owner": "nix-community", "repo": "disko", - "rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940", + "rev": "2db1d64fc084b1d15e3871dffc02c62a94ed6ed7", "type": "github" }, "original": { @@ -153,11 +153,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1739223196, - "narHash": "sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz+e/655w=", + "lastModified": 1741628778, + "narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "a89108e6272426f4eddd93ba17d0ea101c34fb21", + "rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80", "type": "github" }, "original": { @@ -363,11 +363,11 @@ ] }, "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "lastModified": 1741379162, + "narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc", "type": "github" }, "original": { @@ -443,11 +443,11 @@ ] }, "locked": { - "lastModified": 1741540808, - "narHash": "sha256-KSOHzP9gnxaF9YdtwFOPwnFvJEikg/uAvZ6M6VA/FQc=", + "lastModified": 1741701235, + "narHash": "sha256-gBlb8R9gnjUAT5XabJeel3C2iEUiBHx3+91651y3Sqo=", "owner": "nix-community", "repo": "home-manager", - "rev": "2967de4d1146f1b6aa820eed85b823ea2ebfd0fa", + "rev": "c630dfa8abcc65984cc1e47fb25d4552c81dd37e", "type": "github" }, "original": { @@ -528,11 +528,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1741532023, - "narHash": "sha256-wPoRT99r7dMQiXWzDe9v/2OSXOmGOWad/0q9norshvs=", + "lastModified": 1741691385, + "narHash": "sha256-Zjs3cBTVm4GLjjLgdi9XS/7nEdjjciKPj2EFOLOrNcE=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "364761eb5ba3f1514446b6a0eb8e8651c5bc4c67", + "rev": "5af413f4e97073783ed2dc11fd134ffc7771414d", "type": "github" }, "original": { @@ -601,11 +601,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741332913, - "narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=", + "lastModified": 1741600792, + "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20755fa05115c84be00b04690630cb38f0a203ad", + "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", "type": "github" }, "original": { @@ -648,11 +648,11 @@ }, "nixpkgs-mesa-git": { "locked": { - "lastModified": 1741705751, - "narHash": "sha256-TERyCTgLllWgmuYMxbrnjjJQYkj2TT7QoTDUCT/oFOc=", + "lastModified": 1741766918, + "narHash": "sha256-Zy3o+H2S1D/PX/7MSYOuDDaCtOtUfLMAnoBqiMxrhb4=", "owner": "kropatz", "repo": "nixpkgs", - "rev": "97c017ceecbbc3a5a8e588f3f2e79182afd2dd29", + "rev": "386fd8931a36ffd2b899cfe163cee6a2aedbb742", "type": "github" }, "original": { @@ -664,11 +664,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1741332913, - "narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=", + "lastModified": 1741600792, + "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "20755fa05115c84be00b04690630cb38f0a203ad", + "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", "type": "github" }, "original": { @@ -680,11 +680,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "lastModified": 1741513245, + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "type": "github" }, "original": { @@ -712,11 +712,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "lastModified": 1741513245, + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "type": "github" }, "original": { @@ -733,11 +733,11 @@ "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1741098523, - "narHash": "sha256-gXDSXDr6tAb+JgxGMvcEjKC9YO8tVOd8hMMZHJLyQ6Q=", + "lastModified": 1741709061, + "narHash": "sha256-G1YTksB0CnVhpU1gEmvO3ugPS5CAmUpm5UtTIUIPnEI=", "owner": "nix-community", "repo": "nixvim", - "rev": "03065fd4708bfdf47dd541d655392a60daa25ded", + "rev": "3a3abf11700f76738d8ad9d15054ceaf182d2974", "type": "github" }, "original": { @@ -753,11 +753,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1741541688, - "narHash": "sha256-So/foAIONGA7amt6gQez1RZOqYpFcvjeO+8g02LqfTU=", + "lastModified": 1741725118, + "narHash": "sha256-X7TMqHh9r38zZviHUGaBucPir9Zi5oeA04jfEG74imQ=", "owner": "nix-community", "repo": "NUR", - "rev": "55fd8b947ee109c7bc8ed6713a1e2e09d3e83c56", + "rev": "122e9d68505de4d1ee2db7544bd3dbf2dd08338b", "type": "github" }, "original": { @@ -776,11 +776,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1740408283, - "narHash": "sha256-2xECnhgF3MU9YjmvOkrRp8wRFo2OjjewgCtlfckhL5s=", + "lastModified": 1741693509, + "narHash": "sha256-emkxnsZstiJWmGACimyAYqIKz2Qz5We5h1oBVDyQjLw=", "owner": "nix-community", "repo": "NUR", - "rev": "496a4a11162bdffb9a7b258942de138873f019f7", + "rev": "5479646b2574837f1899da78bdf9a48b75a9fb27", "type": "github" }, "original": { @@ -859,11 +859,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1741533345, - "narHash": "sha256-wStpjHkVAuwYvs3oNSLWz8A2QkicfrGlP4rw2+OiyAU=", + "lastModified": 1741706258, + "narHash": "sha256-Frn1vjiJlyzI9QcosZNWDrgKQjoCbsNAkCrLw2pUYZ4=", "owner": "danth", "repo": "stylix", - "rev": "a76068262cfc16c04f9c07a6458715548b067450", + "rev": "4a8718e5a14faeef3e57ededb4efb88b0deed329", "type": "github" }, "original": { @@ -969,11 +969,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1740351358, - "narHash": "sha256-Hdk850xgAd3DL8KX0AbyU7tC834d3Lej1jOo3duWiOA=", + "lastModified": 1741468895, + "narHash": "sha256-YKM1RJbL68Yp2vESBqeZQBjTETXo8mCTTzLZyckCfZk=", "owner": "tinted-theming", "repo": "schemes", - "rev": "a1bc2bd89e693e7e3f5764cfe8114e2ae150e184", + "rev": "47c8c7726e98069cade5827e5fb2bfee02ce6991", "type": "github" }, "original": { @@ -985,11 +985,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1740272597, - "narHash": "sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ=", + "lastModified": 1740877430, + "narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "b6c7f46c8718cc484f2db8b485b06e2a98304cd0", + "rev": "d48ee86394cbe45b112ba23ab63e33656090edb4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 50ed55d..c52ff34 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,7 @@ unstable-packages stable-packages gimp3 + mesa-git nur.overlays.default ]; }; diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index 9641276..70dd3d5 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -6,11 +6,34 @@ in { }; config = lib.mkIf cfg.enable { + boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" "split_lock_detect=off" ]; + hardware.graphics = { + enable = true; + enable32Bit = true; + package = lib.mkForce pkgs.mesa-git.mesa.drivers; + #extraPackages = with pkgs; [ amdvlk ]; + }; + boot.initrd.kernelModules = [ "amdgpu" ]; services.xserver.videoDrivers = [ "amdgpu" ]; # controller (overclock, undervolt, fan curves) - environment.systemPackages = with pkgs; [ lact ]; + environment.systemPackages = with pkgs; [ lact nvtopPackages.amd ]; systemd.packages = with pkgs; [ lact ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ]; + + #system.replaceDependencies.replacements = [ + # { oldDependency = pkgs.mesa; newDependency = pkgs.mesa-git.mesa; } + #]; + hardware.firmware = with pkgs; + [ + (linux-firmware.overrideAttrs (old: { + src = builtins.fetchGit { + url = + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"; + rev = + "b4cb02b2dc3330c6e5d69e84a616b1ca5faecf12"; # Uncomment this line to allow for pure builds + }; + })) + ]; }; } diff --git a/modules/hardware/ryzen.nix b/modules/hardware/ryzenmonitor.nix similarity index 100% rename from modules/hardware/ryzen.nix rename to modules/hardware/ryzenmonitor.nix diff --git a/modules/kernel.nix b/modules/kernel.nix index 91314b1..4208a22 100644 --- a/modules/kernel.nix +++ b/modules/kernel.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { - boot.kernelPackages = pkgs.linuxPackages_latest; + #boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_testing; } diff --git a/overlays.nix b/overlays.nix index 1ac1ec6..e9298da 100644 --- a/overlays.nix +++ b/overlays.nix @@ -84,4 +84,11 @@ in { config.allowUnfree = true; }; }; + + mesa-git = final: _prev: { + mesa-git = import inputs.nixpkgs-mesa-git { + system = final.system; + config.allowUnfree = true; + }; + }; } diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 56c9a7c..b9b9f2e 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -14,7 +14,7 @@ ../../modules/fh/writing.nix ../../modules/work/vpn.nix ../../modules/misc/faster-boot-time.nix - ../../modules/hardware/ryzen.nix + #../../modules/hardware/ryzenmonitor.nix ../../modules/networkmanager.nix ]; diff --git a/systems/pc/hardware-configuration.nix b/systems/pc/hardware-configuration.nix index e891a66..1c214a4 100644 --- a/systems/pc/hardware-configuration.nix +++ b/systems/pc/hardware-configuration.nix @@ -23,7 +23,7 @@ }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5AA5-45E0"; + { device = "/dev/disk/by-uuid/CC7C-CF82"; fsType = "vfat"; }; From d35d611b62f0288193a812dbd00b9df9e8404794 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Thu, 13 Mar 2025 17:26:25 +0100 Subject: [PATCH 12/13] =?UTF-8?q?amd=20vlk=20=F0=9F=94=A5=F0=9F=94=A5?= =?UTF-8?q?=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5?= =?UTF-8?q?=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5=20?= =?UTF-8?q?it=20doesn't=20crash=20in=20cyberpunk=20benchmark=20no=20more?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 6 +++--- modules/hardware/amd-gpu.nix | 2 +- systems/pc/configuration.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index e351b84..544cfda 100644 --- a/flake.lock +++ b/flake.lock @@ -648,11 +648,11 @@ }, "nixpkgs-mesa-git": { "locked": { - "lastModified": 1741766918, - "narHash": "sha256-Zy3o+H2S1D/PX/7MSYOuDDaCtOtUfLMAnoBqiMxrhb4=", + "lastModified": 1741880641, + "narHash": "sha256-jkMameX1CJeU77EKLNbkD6ibowV9uRwSenALk/YP9lo=", "owner": "kropatz", "repo": "nixpkgs", - "rev": "386fd8931a36ffd2b899cfe163cee6a2aedbb742", + "rev": "a25597d8f13187d47427f36459cca5a93e31fa7b", "type": "github" }, "original": { diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index 70dd3d5..0358673 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -11,7 +11,7 @@ in { enable = true; enable32Bit = true; package = lib.mkForce pkgs.mesa-git.mesa.drivers; - #extraPackages = with pkgs; [ amdvlk ]; + extraPackages = with pkgs; [ mesa-git.amdvlk ]; }; boot.initrd.kernelModules = [ "amdgpu" ]; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index b9b9f2e..809cf02 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -90,7 +90,7 @@ enable = false; acceleration = "cuda"; }; - virtualisation.waydroid.enable = true; + virtualisation.waydroid.enable = false; i18n.supportedLocales = [ "C.UTF-8/UTF-8" From 078b25feedd439bb101a0043c2c8f70f2df5d932 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Thu, 13 Mar 2025 22:47:18 +0100 Subject: [PATCH 13/13] update kernel version --- flake.lock | 72 +++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index 544cfda..8a45eb1 100644 --- a/flake.lock +++ b/flake.lock @@ -137,11 +137,11 @@ ] }, "locked": { - "lastModified": 1741684000, - "narHash": "sha256-NQykaWIrn5zilncefIvW4jPQ76YMXVK/dMTzkSVDmdk=", + "lastModified": 1741786315, + "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", "owner": "nix-community", "repo": "disko", - "rev": "2db1d64fc084b1d15e3871dffc02c62a94ed6ed7", + "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", "type": "github" }, "original": { @@ -443,11 +443,11 @@ ] }, "locked": { - "lastModified": 1741701235, - "narHash": "sha256-gBlb8R9gnjUAT5XabJeel3C2iEUiBHx3+91651y3Sqo=", + "lastModified": 1741894454, + "narHash": "sha256-Mu2YXrGr/8Cid6W44AXci/YYnASoXjGrMV9Sjs66oyc=", "owner": "nix-community", "repo": "home-manager", - "rev": "c630dfa8abcc65984cc1e47fb25d4552c81dd37e", + "rev": "0b0baed7b2bf6a5e365d4cba042b580a2bc32e34", "type": "github" }, "original": { @@ -528,11 +528,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1741691385, - "narHash": "sha256-Zjs3cBTVm4GLjjLgdi9XS/7nEdjjciKPj2EFOLOrNcE=", + "lastModified": 1741864154, + "narHash": "sha256-A39pa4ZmUqSjuE2L4swvHKGUQ2maKiY0P5UduZ+yE90=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5af413f4e97073783ed2dc11fd134ffc7771414d", + "rev": "05f8b43a311b3a1f914af89a94480b19d2eceac6", "type": "github" }, "original": { @@ -564,11 +564,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1741325094, - "narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=", + "lastModified": 1741792691, + "narHash": "sha256-f0BVt1/cvA0DQ/q3rB+HY4g4tKksd03ZkzI4xehC2Ew=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16", + "rev": "e1f12151258b12c567f456d8248e4694e9390613", "type": "github" }, "original": { @@ -586,11 +586,11 @@ ] }, "locked": { - "lastModified": 1741192150, - "narHash": "sha256-wB140alXVla1Rw/kENerUoma2qO1Jy5IYWbmiSqmJu0=", + "lastModified": 1741870048, + "narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "0e4ccdb8181da2c6193c047b50ffee5f1a3b6dc1", + "rev": "5d76001e33ee19644a598ad80e7318ab0957b122", "type": "github" }, "original": { @@ -601,11 +601,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741600792, - "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", + "lastModified": 1741862977, + "narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", + "rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0", "type": "github" }, "original": { @@ -648,11 +648,11 @@ }, "nixpkgs-mesa-git": { "locked": { - "lastModified": 1741880641, - "narHash": "sha256-jkMameX1CJeU77EKLNbkD6ibowV9uRwSenALk/YP9lo=", + "lastModified": 1741898246, + "narHash": "sha256-sjfZ3N1GU3Cjet8sO8rfyB4+p6HksKT9aOJK9dE/zSw=", "owner": "kropatz", "repo": "nixpkgs", - "rev": "a25597d8f13187d47427f36459cca5a93e31fa7b", + "rev": "30e357dc191e2b30061200b56d71ec062466990a", "type": "github" }, "original": { @@ -664,11 +664,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1741600792, - "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", + "lastModified": 1741724370, + "narHash": "sha256-WsD+8uodhl58jzKKcPH4jH9dLTLFWZpVmGq4W1XDVF4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", + "rev": "95600680c021743fd87b3e2fe13be7c290e1cac4", "type": "github" }, "original": { @@ -680,11 +680,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "type": "github" }, "original": { @@ -712,11 +712,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "type": "github" }, "original": { @@ -753,11 +753,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1741725118, - "narHash": "sha256-X7TMqHh9r38zZviHUGaBucPir9Zi5oeA04jfEG74imQ=", + "lastModified": 1741895983, + "narHash": "sha256-7CqlVqSsc/H4dy0P034L0IrWzueShNR3fvN6GQQE2E0=", "owner": "nix-community", "repo": "NUR", - "rev": "122e9d68505de4d1ee2db7544bd3dbf2dd08338b", + "rev": "1cf775289a4bd43ebeae46cc351d200aa4ed1c04", "type": "github" }, "original": { @@ -859,11 +859,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1741706258, - "narHash": "sha256-Frn1vjiJlyzI9QcosZNWDrgKQjoCbsNAkCrLw2pUYZ4=", + "lastModified": 1741880767, + "narHash": "sha256-tXtop1zIJMyRt1LDERIWwMAMVKdfDtFp/g37YKy2Ke4=", "owner": "danth", "repo": "stylix", - "rev": "4a8718e5a14faeef3e57ededb4efb88b0deed329", + "rev": "5053a63c87fea3508439b7e9c1a66fa6979a4694", "type": "github" }, "original": {