From 3c95718f639848df202c220fb2dded64761be625 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:02:01 +0200 Subject: [PATCH 01/10] update kernel to 6.15-rc1 --- misc-unrelated/budak-image.nix | 46 +++++++++++++++++++++++++++++ modules/kernel-testing.nix | 54 +++++++++++++++++++++------------- 2 files changed, 80 insertions(+), 20 deletions(-) create mode 100644 misc-unrelated/budak-image.nix diff --git a/misc-unrelated/budak-image.nix b/misc-unrelated/budak-image.nix new file mode 100644 index 0000000..82d6c43 --- /dev/null +++ b/misc-unrelated/budak-image.nix @@ -0,0 +1,46 @@ +{ pkgs, modulesPath, config, lib, ... }: { + imports = [ + "${modulesPath}/installer/cd-dvd/installation-cd-graphical-gnome.nix" + ]; + + # use the latest Linux kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.initrd.kernelModules = [ "nvidia" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; + + users.users.root.initialHashedPassword = lib.mkForce "$y$j9T$PtiIvvs6UUq2PkyR9egC.0$/o9IIo66NmH8m/rW/DrhzZzY0IfA.FfYbxb6Pa.YPnD"; + users.users.nixos.initialHashedPassword = lib.mkForce "$y$j9T$PtiIvvs6UUq2PkyR9egC.0$/o9IIo66NmH8m/rW/DrhzZzY0IfA.FfYbxb6Pa.YPnD"; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + boot.kernelParams = + [ "nvidia-drm.fbdev=1" ]; + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware.nvidia = { + # Modesetting is required. + modesetting.enable = true; + # Open drivers with gsp stutters in VR - https://github.com/ValveSoftware/SteamVR-for-Linux/issues/631 + gsp.enable = false; + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + powerManagement.enable = false; + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + # GSP must be enabled for this to work. + open = false; + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; +} diff --git a/modules/kernel-testing.nix b/modules/kernel-testing.nix index 62349b4..e2ebdf1 100644 --- a/modules/kernel-testing.nix +++ b/modules/kernel-testing.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, lib, config, ... }: let #amdgpu_module_pkg = # { pkgs, lib, fetchurl, kernel ? pkgs.linuxPackages_latest.kernel, ... }: @@ -46,7 +46,31 @@ let # amdgpu_module = pkgs.callPackage amdgpu_module_pkg { # kernel = config.boot.kernelPackages.kernel; # }; + amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args: + buildLinux (args // rec { + version = "6.14.0-rc4"; + modDirVersion = version; + + src = fetchurl { + url = + "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz"; + hash = "sha256-sLS6uFo2KPbDdz8BhB1X10wQiiYdtT/Ny0Ii19F6feY="; + }; + kernelPatches = [ ]; + + extraMeta.branch = "6.14.0-rc4"; + } // (args.argsOverride or { })); + linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { }; + + linux_6_15 = pkgs.buildLinux { + version = "6.15.0-rc1"; + extraMeta.branch = "6.15"; + src = pkgs.fetchzip { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-6.15-rc1.tar.gz"; + hash = "sha256-6TIBhh9ZuAcu0nHMeS1goGM43dU/OOOLtBNGaRAu404="; + }; + }; in { #boot.extraModulePackages = [ amdgpu_module ]; @@ -63,24 +87,14 @@ in # }; #}); - boot.kernelPackages = - let - amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args: - - buildLinux (args // rec { - version = "6.14.0-rc4"; - modDirVersion = version; - - src = fetchurl { - url = - "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz"; - hash = "sha256-sLS6uFo2KPbDdz8BhB1X10wQiiYdtT/Ny0Ii19F6feY="; + nixpkgs.overlays = [ + (final: prev: { + linuxPackages_latest = pkgs.linuxPackagesFor linux_6_15; + }) + ]; + boot.kernelPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor (linux_6_15.override { + structuredExtraConfig = with lib.kernel; { + SCHED_DEBUG = lib.mkForce unset; }; - kernelPatches = [ ]; - - extraMeta.branch = "6.14.0-rc4"; - } // (args.argsOverride or { })); - linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { }; - in - pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_amd_drm_next); + })); } From d4d547fdeee58c8d02ac8b242a8a376ebf165590 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:43:03 +0200 Subject: [PATCH 02/10] update mesa --- modules/hardware/amd-gpu.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index e7194ad..0e2f2df 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -7,25 +7,25 @@ in { config = let - #mesa-new = pkgs.mesa-git.mesa.overrideAttrs (oldAttrs: { - # src = pkgs.fetchFromGitLab { - # domain = "gitlab.freedesktop.org"; - # owner = "mesa"; - # repo = "mesa"; - # rev = "69a08fd9b229ee9e859bfca5f4f9052c84714f98"; - # hash = "sha256-6vRcad3a3A/9945gkeFgRrjyoBrtsnZeDnG/zROIA2Q="; - # }; - #}); - mesa-new = pkgs.mesa-git.mesa.overrideAttrs (oldAttrs: { src = pkgs.fetchFromGitLab { domain = "gitlab.freedesktop.org"; - owner = "hakzsam"; + owner = "mesa"; repo = "mesa"; - rev = "9238ae542f15e4566430a540817e15a8ec079a59"; - hash = "sha256-c/iV/V7m3GuatEuybaetHVIPm66/a6lC1wvV/GGtvnQ="; + rev = "0f8753ffb83a635f47cb0c79e8a8f86c5343d1cf"; + hash = "sha256-3Si9bTGO1nUmiJN1X/tIR4vo0EH8Zi2JNUBs2oyuVYM="; }; }); + + #mesa-new = pkgs.mesa-git.mesa.overrideAttrs (oldAttrs: { + # src = pkgs.fetchFromGitLab { + # domain = "gitlab.freedesktop.org"; + # owner = "hakzsam"; + # repo = "mesa"; + # rev = "9238ae542f15e4566430a540817e15a8ec079a59"; + # hash = "sha256-c/iV/V7m3GuatEuybaetHVIPm66/a6lC1wvV/GGtvnQ="; + # }; + #}); in lib.mkIf cfg.enable { boot.kernelParams = From 8c65fb700de6fb862077bf7e10e86a19cbb64aab Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:42:21 +0200 Subject: [PATCH 03/10] cleanup and update mesa --- flake.lock | 57 +--------------------------- flake.nix | 30 ++------------- home-manager/nixvim/lsp.nix | 2 +- modules/hardware/amd-gpu.nix | 24 ++++++++++-- modules/kernel-testing.nix | 44 ++++++++++++++-------- overlays.nix | 70 +++++++---------------------------- pkgs/lact/default.nix | 12 +++--- systems/pc/configuration.nix | 8 ++-- systems/wsl/configuration.nix | 50 ------------------------- 9 files changed, 78 insertions(+), 219 deletions(-) delete mode 100644 systems/wsl/configuration.nix diff --git a/flake.lock b/flake.lock index 86e077c..4df4551 100644 --- a/flake.lock +++ b/flake.lock @@ -216,22 +216,6 @@ } }, "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -874,27 +858,6 @@ "type": "github" } }, - "nixos-wsl": { - "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1743125458, - "narHash": "sha256-0z+5AMacL2Eqo92fAd0eCWeKVecWrxPJwd5/BIfcdJ8=", - "owner": "nix-community", - "repo": "NixOS-WSL", - "rev": "394c77f61ac76399290bfc2ef9d47b1fba31b215", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NixOS-WSL", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1743367904, @@ -942,22 +905,6 @@ "type": "github" } }, - "nixpkgs-mesa-git": { - "locked": { - "lastModified": 1742289590, - "narHash": "sha256-q8/3YGv7LLReXOiiAH2S39YWeiM2fi0jlLA0hqdlacY=", - "owner": "kropatz", - "repo": "nixpkgs", - "rev": "ea362816984b10d5e3714cce63525888db07dda8", - "type": "github" - }, - "original": { - "owner": "kropatz", - "ref": "mesa-git", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1743315132, @@ -1126,10 +1073,8 @@ "nix-colors": "nix-colors", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", - "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "nixpkgs-gimp3": "nixpkgs-gimp3", - "nixpkgs-mesa-git": "nixpkgs-mesa-git", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "nur": "nur", @@ -1143,7 +1088,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_3", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", diff --git a/flake.nix b/flake.nix index 4f1378b..5efbbe2 100644 --- a/flake.nix +++ b/flake.nix @@ -21,15 +21,10 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; - nixos-wsl = { - url = "github:nix-community/NixOS-WSL"; - inputs.nixpkgs.follows = "nixpkgs"; - }; nix-colors.url = "github:misterio77/nix-colors"; ## unstable 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"; @@ -66,13 +61,12 @@ , nur , nixpkgs , nixos-hardware - , nixos-wsl , nixpkgs-unstable , agenix , home-manager , home-manager-unstable , nix-colors - #, nixos-cosmic + #, nixos-cosmic , nixvim , nixos-generators , stylix @@ -82,21 +76,15 @@ }@inputs: let inherit (self) outputs; - system = "x86_64-linux"; overlays = { outputs, ... }: { nixpkgs.overlays = with outputs.overlays; [ + #unstable-packages additions modifications - unstable-packages - stable-packages - mesa-git nur.overlays.default ]; }; defaultModules = [ ./modules agenix.nixosModules.default overlays ]; - merge = list: - builtins.foldl' (acc: elem: nixpkgs.lib.recursiveUpdate acc elem) { } - list; # helper function to create a machine mkHost = { modules @@ -117,8 +105,8 @@ ./modules/graphical stylix.nixosModules.stylix ./modules/graphical/stylix.nix - #nixos-cosmic.nixosModules.default - #./modules/graphical/cosmic.nix + #nixos-cosmic.nixosModules.default + #./modules/graphical/cosmic.nix ({ outputs, ... }: { stylix.image = ./tsukasa.jpg; }) ]; specialArgs = specialArgs // { inherit inputs outputs; }; @@ -148,7 +136,6 @@ "server-vm" = nixos-generators.nixosGenerate { format = "vmware"; inherit system; - #pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; specialArgs = { pkgsVersion = nixpkgs-unstable; } // { @@ -198,15 +185,6 @@ modules = [ ./users/anon ./systems/mini-pc-proxmox/configuration.nix ]; }; - "wsl" = mkHost { - modules = [ - #"${nixpkgs}/nixos/modules/profiles/minimal.nix" - ./users/anon - ./modules/nix/settings.nix - ./systems/wsl/configuration.nix - nixos-wsl.nixosModules.wsl - ]; - }; #initial install done with nix run github:nix-community/nixos-anywhere/73a6d3fef4c5b4ab9e4ac868f468ec8f9436afa7 -- --flake .#adam-site root@ #update with nixos-rebuild switch --flake .#adam-site --target-host "root@" "adam-site" = mkStableServer { diff --git a/home-manager/nixvim/lsp.nix b/home-manager/nixvim/lsp.nix index 37b8e1c..4f39369 100644 --- a/home-manager/nixvim/lsp.nix +++ b/home-manager/nixvim/lsp.nix @@ -30,7 +30,7 @@ lua_ls.enable = true; csharp_ls = { enable = true; - package = pkgs.stable.csharp-ls; + package = pkgs.csharp-ls; }; #typst-lsp.enable = true; }; diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index 0e2f2df..2ac950b 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -7,13 +7,13 @@ in { config = let - mesa-new = pkgs.mesa-git.mesa.overrideAttrs (oldAttrs: { + mesa-new = pkgs.mesa.overrideAttrs (oldAttrs: { src = pkgs.fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "mesa"; repo = "mesa"; - rev = "0f8753ffb83a635f47cb0c79e8a8f86c5343d1cf"; - hash = "sha256-3Si9bTGO1nUmiJN1X/tIR4vo0EH8Zi2JNUBs2oyuVYM="; + rev = "f23b376e847602d4fe7976f3bbb877dfd9d8b417"; + hash = "sha256-prPhezquh63OFkFdYNCRN1OkdwA+CTu88hUoHQD5kCw="; }; }); @@ -35,7 +35,8 @@ in { enable = true; enable32Bit = true; package = lib.mkForce mesa-new.drivers; - #extraPackages = with pkgs; [ mesa-git.amdvlk ]; + #extraPackages = with pkgs; [ mesa-git.amdvlk ]; + #extraPackages = with pkgs; [ rocmPackages.clr.icd ]; }; hardware.amdgpu.initrd.enable = lib.mkDefault true; @@ -48,5 +49,20 @@ in { ]; systemd.packages = with pkgs; [ lact ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ]; + #rocm + #systemd.tmpfiles.rules = + # let + # rocmEnv = pkgs.symlinkJoin { + # name = "rocm-combined"; + # paths = with pkgs.rocmPackages; [ + # rocblas + # hipblas + # clr + # ]; + # }; + # in + # [ + # "L+ /opt/rocm - - - - ${rocmEnv}" + # ]; }; } diff --git a/modules/kernel-testing.nix b/modules/kernel-testing.nix index e2ebdf1..e5d7f8c 100644 --- a/modules/kernel-testing.nix +++ b/modules/kernel-testing.nix @@ -49,26 +49,36 @@ let amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args: buildLinux (args // rec { - version = "6.14.0-rc4"; + version = "6.14.0-rc6"; modDirVersion = version; src = fetchurl { url = - "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz"; - hash = "sha256-sLS6uFo2KPbDdz8BhB1X10wQiiYdtT/Ny0Ii19F6feY="; + "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-fixes-6.15-2025-04-09/linux-amd-drm-fixes-6.15-2025-04-09.tar.gz"; + #"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz"; + hash = "sha256-AhyDuV9KufqDJEJ+Fp+jnAta3OM/a9OcMNG9UV+OgR0="; }; kernelPatches = [ ]; - extraMeta.branch = "6.14.0-rc4"; + extraMeta.branch = "6.14.0-rc6"; } // (args.argsOverride or { })); linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { }; + linux_6_14 = pkgs.buildLinux { + version = "6.14.2"; + extraMeta.branch = "6.14"; + src = pkgs.fetchzip { + url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.14.2.tar.xz"; + hash = "sha256-RytIKSDT9BMRBZvJER19QAShIqfnpwk59CMFKKgipAU="; + }; + }; + linux_6_15 = pkgs.buildLinux { - version = "6.15.0-rc1"; + version = "6.15.0-rc2"; extraMeta.branch = "6.15"; src = pkgs.fetchzip { - url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-6.15-rc1.tar.gz"; - hash = "sha256-6TIBhh9ZuAcu0nHMeS1goGM43dU/OOOLtBNGaRAu404="; + url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-6.15-rc2.tar.gz"; + hash = "sha256-3/GGVyGoLCv4EfG6e+EBM1NO3/FpKthLb8jp6FSVuFE="; }; }; in @@ -87,14 +97,16 @@ in # }; #}); - nixpkgs.overlays = [ - (final: prev: { - linuxPackages_latest = pkgs.linuxPackagesFor linux_6_15; - }) - ]; - boot.kernelPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor (linux_6_15.override { - structuredExtraConfig = with lib.kernel; { - SCHED_DEBUG = lib.mkForce unset; - }; + #boot.kernelPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor (linux_6_15.override { + # structuredExtraConfig = with lib.kernel; { + # SCHED_DEBUG = lib.mkForce unset; + # }; + #})); + + boot.kernelPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor (linux_amd_drm_next.override { + structuredExtraConfig = with lib.kernel; { + SCHED_DEBUG = lib.mkForce unset; + }; })); + #boot.kernelPackages = pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_6_14); } diff --git a/overlays.nix b/overlays.nix index f46c5c7..d981803 100644 --- a/overlays.nix +++ b/overlays.nix @@ -21,68 +21,26 @@ in 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 { - # owner = "hyprwm"; - # repo = "hyprland"; - # fetchSubmodules = true; - # rev = "refs/tags/v0.45.0"; - # hash = "sha256-//Ib7gXCA8jq8c+QGTTIO0oH0rUYYBXGp8sqpI1jlhA="; - # }; - #}); - - # mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - #}); hyprland = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.hyprland; xdg-desktop-portal-hyprland = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - #delta = prev.delta.overrideAttrs (oldAttrs: rec { - # version = "0.17.0-unstable-2024-08-12"; - # src = prev.fetchFromGitHub { - # owner = "dandavison"; - # repo = "delta"; - # rev = "a01141b72001f4c630d77cf5274267d7638851e4"; - # hash = "sha256-My51pQw5a2Y2VTu39MmnjGfmCavg8pFqOmOntUildS0="; - # }; - # cargoDeps = oldAttrs.cargoDeps.overrideAttrs { - # inherit src; - # outputHash = "sha256-TJ/yLt53hKElylycUfGV8JGt7GzqSnIO3ImhZvhVQu0="; - # }; - #}); - - # .png doesnt work :( - #fastfetch = prev.fastfetch.overrideAttrs (oldAttrs: { - # cmakeFlags = [ (prev.lib.cmakeBool "ENABLE_IMAGEMAGICK6" true) (prev.lib.cmakeBool "ENABLE_IMAGEMAGICK7" true) (prev.lib.cmakeBool "ENABLE_CHAFA" true) ]; - #}); - # example = prev.example.overrideAttrs (oldAttrs: rec { - # ... - # }); + #rocmPackages = prev.rocm-update.rocmPackages; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will # be accessible through 'pkgs.unstable' - unstable-packages = final: _prev: { - unstable = import inputs.nixpkgs-unstable { - system = final.system; - config.allowUnfree = true; - config.permittedInsecurePackages = [ "electron-27.3.11" ]; - }; - }; - stable-packages = final: _prev: { - stable = import inputs.nixpkgs { - system = final.system; - config.allowUnfree = true; - }; - }; - - mesa-git = final: _prev: { - mesa-git = import inputs.nixpkgs-mesa-git { - system = final.system; - config.allowUnfree = true; - }; - }; + #unstable-packages = final: _prev: { + # unstable = import inputs.nixpkgs-unstable { + # system = final.system; + # config.allowUnfree = true; + # config.permittedInsecurePackages = [ "electron-27.3.11" ]; + # }; + #}; + #stable-packages = final: _prev: { + # stable = import inputs.nixpkgs { + # system = final.system; + # config.allowUnfree = true; + # }; + #}; } diff --git a/pkgs/lact/default.nix b/pkgs/lact/default.nix index 1b10170..b2e1f30 100644 --- a/pkgs/lact/default.nix +++ b/pkgs/lact/default.nix @@ -17,19 +17,19 @@ rustPlatform.buildRustPackage rec { pname = "lact"; - version = "0.7.2"; + version = "0.7.3"; src = fetchFromGitHub { owner = "ilya-zlobintsev"; repo = "LACT"; rev = "v${version}"; - hash = "sha256-6nNt/EnJKHdldjpCW2pLPBkU5TLGEaqtnUUBraeRa3I="; + hash = "sha256-R8VEAk+CzJCxPzJohsbL/XXH1GMzGI2W92sVJ2evqXs="; #rev = "e472dec45682f96a272b77d368791121e10ba7da"; #hash = "sha256-d081f49ojJzz0N28lIu3NZ8SSvSuoz2HfjQl5Zu8PpU="; }; useFetchCargoVendor = true; - cargoHash = "sha256-NoWngD0LJ+cteoQIJ0iye0MZgmLuuxN2YHHyMqeEABc="; + cargoHash = "sha256-SH7jmXDvGYO9S5ogYEYB8dYCF3iz9GWDYGcZUaKpWDQ="; nativeBuildInputs = [ blueprint-compiler pkg-config wrapGAppsHook4 rustPlatform.bindgenHook ]; @@ -57,7 +57,7 @@ rustPlatform.buildRustPackage rec { substituteInPlace res/lactd.service \ --replace-fail ExecStart={lact,$out/bin/lact} - substituteInPlace res/io.github.lact-linux.desktop \ + substituteInPlace res/io.github.ilya_zlobintsev.LACT.desktop \ --replace-fail Exec={lact,$out/bin/lact} # read() looks for the database in /usr/share so we use read_from_file() instead @@ -67,8 +67,8 @@ rustPlatform.buildRustPackage rec { 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 + install -Dm444 res/io.github.ilya_zlobintsev.LACT.desktop -t $out/share/applications + install -Dm444 res/io.github.ilya_zlobintsev.LACT.png -t $out/share/pixmaps ''; postFixup = lib.optionalString stdenv.targetPlatform.isElf '' diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index af12f49..9f5bec8 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -105,11 +105,11 @@ ]; # apple shit - services.usbmuxd.enable = true; + #services.usbmuxd.enable = true; environment.systemPackages = with pkgs; [ - libimobiledevice - ifuse # optional, to mount using 'ifuse' - mesa-git.gimp + #libimobiledevice + #ifuse # optional, to mount using 'ifuse' + openai-whisper ]; nixpkgs.config.permittedInsecurePackages = [ diff --git a/systems/wsl/configuration.nix b/systems/wsl/configuration.nix deleted file mode 100644 index c0feeb3..0000000 --- a/systems/wsl/configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -# NixOS-WSL specific options are documented on the NixOS-WSL repository: -# https://github.com/nix-community/NixOS-WSL - -{ config, lib, pkgs, inputs, ... }: #nixos-wsl, ... }: - -{ - imports = [ - # include NixOS-WSL modules - # - ]; - - wsl = { - enable = true; - nativeSystemd = true; - startMenuLaunchers = true; - wslConf = { - automount.root = "/mnt"; - user.default = lib.mkForce "anon"; - interop = { enabled = false; appendWindowsPath = false; }; - }; - }; - - nix.optimise.automatic = true; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - nix.settings.trusted-substituters = [ "https://ai.cachix.org" ]; - nix.settings.trusted-public-keys = [ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - environment.systemPackages = with pkgs; [ - openssh - ]; - - networking.hostName = "wsl"; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It's perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? -} From 7e0406f64ba093b10baa86d9287ac8e1578a2c2b Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 14 Apr 2025 18:12:29 +0200 Subject: [PATCH 04/10] remove nix-colors --- flake.lock | 51 ------------------------------------------- flake.nix | 3 --- home-manager/code.nix | 38 ++++++++++++++++---------------- users/anon/home.nix | 1 - users/kopatz/home.nix | 1 - users/vm/home.nix | 1 - 6 files changed, 19 insertions(+), 76 deletions(-) diff --git a/flake.lock b/flake.lock index 4df4551..bab7313 100644 --- a/flake.lock +++ b/flake.lock @@ -108,22 +108,6 @@ "type": "github" } }, - "base16-schemes": { - "flake": false, - "locked": { - "lastModified": 1696158499, - "narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=", - "owner": "tinted-theming", - "repo": "base16-schemes", - "rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-schemes", - "type": "github" - } - }, "base16-vim": { "flake": false, "locked": { @@ -787,25 +771,6 @@ "type": "github" } }, - "nix-colors": { - "inputs": { - "base16-schemes": "base16-schemes", - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1707825078, - "narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=", - "owner": "misterio77", - "repo": "nix-colors", - "rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1", - "type": "github" - }, - "original": { - "owner": "misterio77", - "repo": "nix-colors", - "type": "github" - } - }, "nixlib": { "locked": { "lastModified": 1736643958, @@ -890,21 +855,6 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1697935651, - "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1743315132, @@ -1070,7 +1020,6 @@ "home-manager": "home-manager", "home-manager-unstable": "home-manager-unstable", "hyprland": "hyprland", - "nix-colors": "nix-colors", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 5efbbe2..c8f7608 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,6 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; - nix-colors.url = "github:misterio77/nix-colors"; ## unstable nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-gimp3.url = "github:jtojnar/nixpkgs/gimp-meson"; @@ -65,7 +64,6 @@ , agenix , home-manager , home-manager-unstable - , nix-colors #, nixos-cosmic , nixvim , nixos-generators @@ -169,7 +167,6 @@ // import ./systems/laptop/userdata.nix; pkgsVersion = nixpkgs-unstable; home-manager-version = home-manager-unstable; - inherit nix-colors; }; modules = [ ### User specific ### diff --git a/home-manager/code.nix b/home-manager/code.nix index 0200ae4..6fd8b24 100644 --- a/home-manager/code.nix +++ b/home-manager/code.nix @@ -1,24 +1,24 @@ { osConfig, config, pkgs, inputs, lib, ... }: { config = lib.mkIf osConfig.custom.graphical.code.enable rec { - home.activation.makeVSCodeConfigWritable = - let - configDirName = { - "vscode" = "Code"; - "vscode-insiders" = "Code - Insiders"; - "vscodium" = "VSCodium"; - }.${programs.vscode.package.pname}; - configPath = - "${config.xdg.configHome}/${configDirName}/User/settings.json"; - in - { - after = [ "writeBoundary" ]; - before = [ ]; - data = '' - if [ -e "$(readlink ${configPath})" ]; then - install -m 0640 "$(readlink ${configPath})" ${configPath} - fi - ''; - }; + #home.activation.makeVSCodeConfigWritable = + # let + # configDirName = { + # "vscode" = "Code"; + # "vscode-insiders" = "Code - Insiders"; + # "vscodium" = "VSCodium"; + # }.${programs.vscode.package.pname}; + # configPath = + # "${config.xdg.configHome}/${configDirName}/User/settings.json"; + # in + # { + # after = [ "writeBoundary" ]; + # before = [ ]; + # data = '' + # if [ -e "$(readlink ${configPath})" ]; then + # install -m 0640 "$(readlink ${configPath})" ${configPath} + # fi + # ''; + # }; programs.vscode = { enable = true; package = pkgs.vscodium; diff --git a/users/anon/home.nix b/users/anon/home.nix index a646a5c..74c8b7f 100644 --- a/users/anon/home.nix +++ b/users/anon/home.nix @@ -17,7 +17,6 @@ ../../home-manager/gitconfig.nix ../../home-manager/zsh ../../home-manager/direnv.nix - inputs.nix-colors.homeManagerModule inputs.nixvim.homeManagerModules.nixvim ]; diff --git a/users/kopatz/home.nix b/users/kopatz/home.nix index dffb69b..e1c3532 100644 --- a/users/kopatz/home.nix +++ b/users/kopatz/home.nix @@ -33,7 +33,6 @@ ../../home-manager/mpv.nix ../../home-manager/discord-theme.nix inputs.nixvim.homeManagerModules.nixvim - inputs.nix-colors.homeManagerModule ]; programs.feh = { diff --git a/users/vm/home.nix b/users/vm/home.nix index c9fa8ea..76a894c 100644 --- a/users/vm/home.nix +++ b/users/vm/home.nix @@ -8,7 +8,6 @@ #../../home-manager/kitty.nix #../../home-manager/i3.nix #inputs.nixvim.homeManagerModules.nixvim - #inputs.nix-colors.homeManagerModule ]; } From b90bbd858d5aff790274d58147162cc4cbf96b04 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:00:55 +0200 Subject: [PATCH 05/10] update flake --- flake.lock | 158 ++++++++++++++++---------------- pkgs/default.nix | 1 - pkgs/kop-newproject/default.nix | 2 +- pkgs/logseq/default.nix | 99 -------------------- systems/pc/configuration.nix | 12 --- 5 files changed, 80 insertions(+), 192 deletions(-) delete mode 100644 pkgs/logseq/default.nix diff --git a/flake.lock b/flake.lock index bab7313..c553458 100644 --- a/flake.lock +++ b/flake.lock @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1744289235, + "narHash": "sha256-ZFkHLdimtFzQACsVVyZkZlfYdj4iNy3PkzXfrwmlse8=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "c8282f4982b56dfa5e9b9f659809da93f8d37e7a", "type": "github" }, "original": { @@ -154,11 +154,11 @@ ] }, "locked": { - "lastModified": 1741786315, - "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", + "lastModified": 1744145203, + "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=", "owner": "nix-community", "repo": "disko", - "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", + "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989", "type": "github" }, "original": { @@ -170,11 +170,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1741628778, - "narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=", + "lastModified": 1743774811, + "narHash": "sha256-oiHLDHXq7ymsMVYSg92dD1OLnKLQoU/Gf2F1GoONLCE=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80", + "rev": "df53a7a31872faf5ca53dd0730038a62ec63ca9e", "type": "github" }, "original": { @@ -222,11 +222,11 @@ ] }, "locked": { - "lastModified": 1741352980, - "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -364,11 +364,11 @@ ] }, "locked": { - "lastModified": 1741379162, - "narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=", + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "type": "github" }, "original": { @@ -445,11 +445,11 @@ ] }, "locked": { - "lastModified": 1743387206, - "narHash": "sha256-24N3NAuZZbYqZ39NgToZgHUw6M7xHrtrAm18kv0+2Wo=", + "lastModified": 1744117652, + "narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", "owner": "nix-community", "repo": "home-manager", - "rev": "15c5f9d04fabd176f30286c8f52bbdb2c853a146", + "rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", "type": "github" }, "original": { @@ -466,11 +466,11 @@ ] }, "locked": { - "lastModified": 1743360001, - "narHash": "sha256-HtpS/ZdgWXw0y+aFdORcX5RuBGTyz3WskThspNR70SM=", + "lastModified": 1744663884, + "narHash": "sha256-a6QGaZMDM1miK8VWzAITsEPOdmLk+xTPyJSTjVs3WhI=", "owner": "nix-community", "repo": "home-manager", - "rev": "b6fd653ef8fbeccfd4958650757e91767a65506d", + "rev": "d5cdf55bd9f19a3debd55b6cb5d38f7831426265", "type": "github" }, "original": { @@ -525,11 +525,11 @@ ] }, "locked": { - "lastModified": 1739049071, - "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", + "lastModified": 1743953322, + "narHash": "sha256-prQ5JKopXtzCMX2eT3dXbaVvGmzjMRE2bXStQDdazpM=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", + "rev": "9d7f2687c84c729afbc3b13f7937655570f2978d", "type": "github" }, "original": { @@ -556,11 +556,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1743370710, - "narHash": "sha256-caSjWT8knTS9rtxxIBBUk8srdi+XlbPC82qFrC6Wp5s=", + "lastModified": 1744646317, + "narHash": "sha256-IHiF831GJNv+d+bAJ8Ys5+EaI222/T6QQA9BFcnlqTY=", "ref": "refs/heads/main", - "rev": "79b526a04199a05d1e9b0bbb035ba20b652a7a2b", - "revCount": 5952, + "rev": "8b7b169043de2a9d95f8505edb8b6576fac586fd", + "revCount": 5997, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -583,11 +583,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743714874, + "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", "type": "github" }, "original": { @@ -680,11 +680,11 @@ ] }, "locked": { - "lastModified": 1741191527, - "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", + "lastModified": 1744468525, + "narHash": "sha256-9HySx+EtsbbKlZDlY+naqqOV679VdxP6x6fP3wxDXJk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", + "rev": "f1000c54d266e6e4e9d646df0774fac5b8a652df", "type": "github" }, "original": { @@ -705,11 +705,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1743950287, + "narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "f2dc70e448b994cef627a157ee340135bd68fbc6", "type": "github" }, "original": { @@ -809,11 +809,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1743420942, - "narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=", + "lastModified": 1744633460, + "narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4", + "rev": "9a049b4a421076d27fee3eec664a18b2066824cb", "type": "github" }, "original": { @@ -825,11 +825,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743367904, - "narHash": "sha256-sOos1jZGKmT6xxPvxGQyPTApOunXvScV4lNjBCXd/CI=", + "lastModified": 1744440957, + "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7ffe0edc685f14b8c635e3d6591b0bbb97365e6c", + "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", "type": "github" }, "original": { @@ -841,11 +841,11 @@ }, "nixpkgs-gimp3": { "locked": { - "lastModified": 1743382397, - "narHash": "sha256-BySzSNxhxO2rWw7j27OhO+VaD2gKDqt69hb6tZm0q2g=", + "lastModified": 1744704223, + "narHash": "sha256-kAk1Oq6XGwm8Ato+Yda2oyOakej7S9xtD3YPVW/Iswk=", "owner": "jtojnar", "repo": "nixpkgs", - "rev": "7c249405cd7f26cb43882685955b75b8b1eb8498", + "rev": "bc17b33471454e8bce6edf92de8030a121c15dbd", "type": "github" }, "original": { @@ -857,11 +857,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1743315132, - "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", + "lastModified": 1744463964, + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "52faf482a3889b7619003c0daec593a1912fddc1", + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", "type": "github" }, "original": { @@ -873,11 +873,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1742800061, - "narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=", + "lastModified": 1744157173, + "narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734", + "rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f", "type": "github" }, "original": { @@ -889,11 +889,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1743315132, - "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", + "lastModified": 1744463964, + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "52faf482a3889b7619003c0daec593a1912fddc1", + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", "type": "github" }, "original": { @@ -910,11 +910,11 @@ "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1743362786, - "narHash": "sha256-XbXIRDbb8/vLBX1M096l7lM5wfzBTp1ZXfUl9bUhVGU=", + "lastModified": 1744669903, + "narHash": "sha256-gtfLmGx/N+BzIck9sGLIfzETxocYjVKo4gmSeH6zfaY=", "owner": "nix-community", "repo": "nixvim", - "rev": "d81f37256d0a8691b837b74979d27bf89be8ecdd", + "rev": "ee9655637cbf898415e09c399bc504180e246d42", "type": "github" }, "original": { @@ -930,11 +930,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1743416833, - "narHash": "sha256-JBz6KWbF4MFgQVpwrq7FaUsPxDN/wQEbUAUHmm1Q494=", + "lastModified": 1744701653, + "narHash": "sha256-t2gPDe1tLXZ9vEkVzGm6kDlJpSjQlw9BwqNdCESvegM=", "owner": "nix-community", "repo": "NUR", - "rev": "a3f52fa7fae676916064a4b32cf306f15a79b408", + "rev": "be95402b424e1dafa2e1e1e8c2781381903ef7b3", "type": "github" }, "original": { @@ -953,11 +953,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1741693509, - "narHash": "sha256-emkxnsZstiJWmGACimyAYqIKz2Qz5We5h1oBVDyQjLw=", + "lastModified": 1743884191, + "narHash": "sha256-foVcginhVvjg8ZnTzY5wwMeZ4wjJ8yX66PW5kgyivPE=", "owner": "nix-community", "repo": "NUR", - "rev": "5479646b2574837f1899da78bdf9a48b75a9fb27", + "rev": "fde90f5f52e13eed110a0e53a2818a2b09e4d37c", "type": "github" }, "original": { @@ -976,11 +976,11 @@ ] }, "locked": { - "lastModified": 1742659553, - "narHash": "sha256-i/JCrr/jApVorI9GkSV5to+USrRCa0rWuQDH8JSlK2A=", + "lastModified": 1743683223, + "narHash": "sha256-LdXtHFvhEC3S64dphap1pkkzwjErbW65eH1VRerCUT0=", "owner": "NuschtOS", "repo": "search", - "rev": "508752835128a3977985a4d5225ff241f7756181", + "rev": "56a49ffef2908dad1e9a8adef1f18802bc760962", "type": "github" }, "original": { @@ -1056,11 +1056,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1743347063, - "narHash": "sha256-2wCoQhyHo3lIRkm/Y4d2ViknCQHhoS2qGvjm//Noo90=", + "lastModified": 1744668092, + "narHash": "sha256-XDmpI3ywMkypsHKRF2am6BzZ5OjwpQMulAe8L87Ek8U=", "owner": "danth", "repo": "stylix", - "rev": "eede71351571c60b87dbf9eefb7ddf2b11fb1354", + "rev": "38aff11a7097f4da6b95d4c4d2c0438f25a08d52", "type": "github" }, "original": { @@ -1181,11 +1181,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1741468895, - "narHash": "sha256-YKM1RJbL68Yp2vESBqeZQBjTETXo8mCTTzLZyckCfZk=", + "lastModified": 1742851696, + "narHash": "sha256-sR4K+OVFKeUOvNIqcCr5Br7NLxOBEwoAgsIyjsZmb8s=", "owner": "tinted-theming", "repo": "schemes", - "rev": "47c8c7726e98069cade5827e5fb2bfee02ce6991", + "rev": "c37771c4ae8ff1667e27ddcf24991ebeb94a4e77", "type": "github" }, "original": { @@ -1197,11 +1197,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1740877430, - "narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=", + "lastModified": 1743296873, + "narHash": "sha256-8IQulrb1OBSxMwdKijO9fB70ON//V32dpK9Uioy7FzY=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "d48ee86394cbe45b112ba23ab63e33656090edb4", + "rev": "af5152c8d7546dfb4ff6df94080bf5ff54f64e3a", "type": "github" }, "original": { @@ -1297,11 +1297,11 @@ ] }, "locked": { - "lastModified": 1741934139, - "narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=", + "lastModified": 1744644585, + "narHash": "sha256-p0D/e4J6Sv6GSb+9u8OQcVHSE2gPNYB5ygIfGDyEiXQ=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "150b0b6f52bb422a1b232a53698606fe0320dde0", + "rev": "be6771e754345f18244fb00aae5c9e5ab21ccc26", "type": "github" }, "original": { diff --git a/pkgs/default.nix b/pkgs/default.nix index ebeb931..5a2aab2 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -11,6 +11,5 @@ 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; }; rdna4-lact = pkgs.callPackage ./lact/default.nix { }; } diff --git a/pkgs/kop-newproject/default.nix b/pkgs/kop-newproject/default.nix index 9a77bc5..6a4cafb 100644 --- a/pkgs/kop-newproject/default.nix +++ b/pkgs/kop-newproject/default.nix @@ -10,5 +10,5 @@ rustPlatform.buildRustPackage { hash = "sha256-Va6q9aDbX5Kag96WK1XAhDMb7VDzZzfp24t89C9oRuY="; }; - cargoHash = "sha256-FR4H3H+LOF0ZjWIoY5dTU9oKyvwmnWndnkVw3Y42bBg="; + cargoHash = "sha256-daR6Mt78QBheEV6Pg6kGUVmU+lgg2eV4/0Sl7UEXUeU="; } diff --git a/pkgs/logseq/default.nix b/pkgs/logseq/default.nix deleted file mode 100644 index e815a18..0000000 --- a/pkgs/logseq/default.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ 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 9f5bec8..1a1c87c 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -112,18 +112,6 @@ openai-whisper ]; - nixpkgs.config.permittedInsecurePackages = [ - "electron-27.3.11" - - "dotnet-runtime-wrapped-7.0.20" - "dotnet-runtime-7.0.20" - "dotnet-core-combined" - "dotnet-sdk-7.0.410" - "dotnet-sdk-6.0.428" - "dotnet-sdk-wrapped-6.0.428" - "dotnet-sdk-wrapped-7.0.410" - ]; - networking.firewall.allowedTCPPorts = [ 6567 ]; # mindustry networking.firewall.allowedUDPPorts = [ 6567 ]; # mindustry mainUser.layout = "de"; From 16eeaaede212ddeb1c062bf3e92b693e36958811 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:44:58 +0200 Subject: [PATCH 06/10] update mesa --- modules/hardware/amd-gpu.nix | 41 ++++++++++++++------------ modules/hardware/opencl.patch | 54 +++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 19 deletions(-) create mode 100644 modules/hardware/opencl.patch diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index 2ac950b..2a7b49e 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -7,14 +7,17 @@ in { config = let - mesa-new = pkgs.mesa.overrideAttrs (oldAttrs: { + mesa-new = pkgs.mesa.overrideAttrs (old: { src = pkgs.fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "mesa"; repo = "mesa"; - rev = "f23b376e847602d4fe7976f3bbb877dfd9d8b417"; - hash = "sha256-prPhezquh63OFkFdYNCRN1OkdwA+CTu88hUoHQD5kCw="; + rev = "93547d45ceb0a59f429f6029b339c044f8aaabaa"; + hash = "sha256-u5Lksclv0+cMfO02Ilp6v/7UCoTdm5veIvf1uejWlgQ="; }; + patches = [ + ./opencl.patch + ]; }); #mesa-new = pkgs.mesa-git.mesa.overrideAttrs (oldAttrs: { @@ -34,9 +37,9 @@ in { hardware.graphics = { enable = true; enable32Bit = true; - package = lib.mkForce mesa-new.drivers; + package = lib.mkForce mesa-new; #extraPackages = with pkgs; [ mesa-git.amdvlk ]; - #extraPackages = with pkgs; [ rocmPackages.clr.icd ]; + #extraPackages = with pkgs; [ rocmPackages.clr.icd ]; }; hardware.amdgpu.initrd.enable = lib.mkDefault true; @@ -50,19 +53,19 @@ in { systemd.packages = with pkgs; [ lact ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ]; #rocm - #systemd.tmpfiles.rules = - # let - # rocmEnv = pkgs.symlinkJoin { - # name = "rocm-combined"; - # paths = with pkgs.rocmPackages; [ - # rocblas - # hipblas - # clr - # ]; - # }; - # in - # [ - # "L+ /opt/rocm - - - - ${rocmEnv}" - # ]; + #systemd.tmpfiles.rules = + # let + # rocmEnv = pkgs.symlinkJoin { + # name = "rocm-combined"; + # paths = with pkgs.rocmPackages; [ + # rocblas + # hipblas + # clr + # ]; + # }; + # in + # [ + # "L+ /opt/rocm - - - - ${rocmEnv}" + # ]; }; } diff --git a/modules/hardware/opencl.patch b/modules/hardware/opencl.patch new file mode 100644 index 0000000..bdd2109 --- /dev/null +++ b/modules/hardware/opencl.patch @@ -0,0 +1,54 @@ +diff --git a/meson.build b/meson.build +index c150bff74ff..37fa7f0531b 100644 +--- a/meson.build ++++ b/meson.build +@@ -1850,7 +1850,7 @@ endif + + dep_clang = null_dep + if with_clc or with_gallium_clover +- llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir') ++ llvm_libdir = get_option('clang-libdir') + + dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false) + +diff --git a/meson.options b/meson.options +index 82324617884..4bde97a8568 100644 +--- a/meson.options ++++ b/meson.options +@@ -738,3 +738,10 @@ option( + 'none', 'dri2' + ], + ) ++ ++option( ++ 'clang-libdir', ++ type : 'string', ++ value : '', ++ description : 'Locations to search for clang libraries.' ++) +diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build +index ab2c83556a8..a59e88e122f 100644 +--- a/src/gallium/targets/opencl/meson.build ++++ b/src/gallium/targets/opencl/meson.build +@@ -56,7 +56,7 @@ if with_opencl_icd + configuration : _config, + input : 'mesa.icd.in', + output : 'mesa.icd', +- install : true, ++ install : false, + install_tag : 'runtime', + install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), + ) +diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build +index 35833dc7423..41a95927cab 100644 +--- a/src/gallium/targets/rusticl/meson.build ++++ b/src/gallium/targets/rusticl/meson.build +@@ -63,7 +63,7 @@ configure_file( + configuration : _config, + input : 'rusticl.icd.in', + output : 'rusticl.icd', +- install : true, ++ install : false, + install_tag : 'runtime', + install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), + ) From 7d12bd94984267f6736525e48e8ddd4e821c1746 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:50:59 +0200 Subject: [PATCH 07/10] remove electron --- flake.lock | 22 +---- flake.nix | 26 +---- pkgs/default.nix | 1 - pkgs/electron27/default.nix | 189 ------------------------------------ 4 files changed, 6 insertions(+), 232 deletions(-) delete mode 100644 pkgs/electron27/default.nix diff --git a/flake.lock b/flake.lock index c553458..190a569 100644 --- a/flake.lock +++ b/flake.lock @@ -872,22 +872,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1744157173, - "narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1744463964, "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", @@ -906,7 +890,9 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs-unstable" + ], "nuschtosSearch": "nuschtosSearch" }, "locked": { @@ -926,7 +912,7 @@ "nur": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "treefmt-nix": "treefmt-nix" }, "locked": { diff --git a/flake.nix b/flake.nix index c8f7608..11c5d85 100644 --- a/flake.nix +++ b/flake.nix @@ -36,8 +36,7 @@ # vim configuration with nix nixvim = { url = "github:nix-community/nixvim"; - #inputs.nixpkgs.follows = "nixpkgs-unstable"; - inputs.home-manager.follows = "home-manager-unstable"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # styling stylix = { @@ -129,28 +128,7 @@ }; customPackages = flake-utils.lib.eachDefaultSystem (system: { packages = - import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; } - // { - "server-vm" = nixos-generators.nixosGenerate { - format = "vmware"; - inherit system; - specialArgs = { - pkgsVersion = nixpkgs-unstable; - } // { - inherit inputs outputs; - }; - lib = nixpkgs-unstable.legacyPackages.x86_64-linux.lib; - modules = defaultModules ++ [ - home-manager-unstable.nixosModules.home-manager - ./users/anon - ./systems/amd-server-vm/configuration.nix - { - # 100G disk; - virtualisation.diskSize = 100 * 1024; - } - ]; - }; - }; + import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; }; }); in { diff --git a/pkgs/default.nix b/pkgs/default.nix index 5a2aab2..9c28ffa 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -10,6 +10,5 @@ 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 { }; rdna4-lact = pkgs.callPackage ./lact/default.nix { }; } diff --git a/pkgs/electron27/default.nix b/pkgs/electron27/default.nix deleted file mode 100644 index ab10772..0000000 --- a/pkgs/electron27/default.nix +++ /dev/null @@ -1,189 +0,0 @@ -{ 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)) From 5fc0d22aa52deb7bdabb2d139e4511920c36227c Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:55:28 +0200 Subject: [PATCH 08/10] cleanup --- flake.lock | 37 +++---------------------------------- flake.nix | 6 ++++-- home-manager/code.nix | 32 +++++++++++++++++--------------- 3 files changed, 24 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index 190a569..44bd183 100644 --- a/flake.lock +++ b/flake.lock @@ -839,22 +839,6 @@ "type": "github" } }, - "nixpkgs-gimp3": { - "locked": { - "lastModified": 1744704223, - "narHash": "sha256-kAk1Oq6XGwm8Ato+Yda2oyOakej7S9xtD3YPVW/Iswk=", - "owner": "jtojnar", - "repo": "nixpkgs", - "rev": "bc17b33471454e8bce6edf92de8030a121c15dbd", - "type": "github" - }, - "original": { - "owner": "jtojnar", - "ref": "gimp-meson", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1744463964, @@ -871,22 +855,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1744463964, - "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "flake-parts": "flake-parts", @@ -912,7 +880,9 @@ "nur": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs-unstable" + ], "treefmt-nix": "treefmt-nix" }, "locked": { @@ -1009,7 +979,6 @@ "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nixpkgs-gimp3": "nixpkgs-gimp3", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "nur": "nur", diff --git a/flake.nix b/flake.nix index 11c5d85..0423456 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,10 @@ flake-utils.url = "github:numtide/flake-utils"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; # nix user repository - nur = { url = "github:nix-community/NUR"; }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; ## stable nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; home-manager = { @@ -23,7 +26,6 @@ }; ## unstable 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"; diff --git a/home-manager/code.nix b/home-manager/code.nix index 6fd8b24..560a748 100644 --- a/home-manager/code.nix +++ b/home-manager/code.nix @@ -23,23 +23,25 @@ enable = true; package = pkgs.vscodium; #userSettings = { typst-lsp.exportPdf = "onType"; }; - userSettings = { - "Lua.workspace.library" = [ - "/home/kopatz/.vscode-oss/extensions/evaisa.vscode-noita-api-1.4.2/out/NoitaLua" + profiles.default = { + userSettings = { + "Lua.workspace.library" = [ + "/home/kopatz/.vscode-oss/extensions/evaisa.vscode-noita-api-1.4.2/out/NoitaLua" + ]; + "editor.mouseWheelZoom" = true; + "files.autoSave" = "afterDelay"; + "clangd.path" = "/run/current-system/sw/bin/clangd"; + }; + extensions = with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + #rust-lang.rust-analyzer broken on unstable + myriad-dreamin.tinymist + #tomoki1207.pdf latex-workshop is faster to preview pdf + james-yu.latex-workshop + twxs.cmake + llvm-vs-code-extensions.vscode-clangd ]; - "editor.mouseWheelZoom" = true; - "files.autoSave" = "afterDelay"; - "clangd.path" = "/run/current-system/sw/bin/clangd"; }; - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - #rust-lang.rust-analyzer broken on unstable - myriad-dreamin.tinymist - #tomoki1207.pdf latex-workshop is faster to preview pdf - james-yu.latex-workshop - twxs.cmake - llvm-vs-code-extensions.vscode-clangd - ]; }; }; } From fe318aa2e3148bbaba52718ac00d040552ab3c95 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 18 Apr 2025 23:21:08 +0200 Subject: [PATCH 09/10] update --- flake.lock | 50 ++++++++++++++++++------------------ modules/graphical/basics.nix | 1 - modules/hardware/amd-gpu.nix | 36 +++++++++++++++----------- overlays.nix | 1 - systems/pc/configuration.nix | 1 + 5 files changed, 47 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 44bd183..3efe372 100644 --- a/flake.lock +++ b/flake.lock @@ -154,11 +154,11 @@ ] }, "locked": { - "lastModified": 1744145203, - "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=", + "lastModified": 1744940522, + "narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=", "owner": "nix-community", "repo": "disko", - "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989", + "rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081", "type": "github" }, "original": { @@ -445,11 +445,11 @@ ] }, "locked": { - "lastModified": 1744117652, - "narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", + "lastModified": 1744743431, + "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", "owner": "nix-community", "repo": "home-manager", - "rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", + "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", "type": "github" }, "original": { @@ -466,11 +466,11 @@ ] }, "locked": { - "lastModified": 1744663884, - "narHash": "sha256-a6QGaZMDM1miK8VWzAITsEPOdmLk+xTPyJSTjVs3WhI=", + "lastModified": 1745001336, + "narHash": "sha256-R4HuzrgYtOYBNmB3lfRxcieHEBO4uSfgHNz4MzWkZ5M=", "owner": "nix-community", "repo": "home-manager", - "rev": "d5cdf55bd9f19a3debd55b6cb5d38f7831426265", + "rev": "fc09cb7aaadb70d6c4898654ffc872f0d2415df9", "type": "github" }, "original": { @@ -556,11 +556,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1744646317, - "narHash": "sha256-IHiF831GJNv+d+bAJ8Ys5+EaI222/T6QQA9BFcnlqTY=", + "lastModified": 1745005494, + "narHash": "sha256-hiRVFgpUi0aHjRV3yq7Vvvg6xCjJnVmsSIoOhBMeHtY=", "ref": "refs/heads/main", - "rev": "8b7b169043de2a9d95f8505edb8b6576fac586fd", - "revCount": 5997, + "rev": "51afc2c2910d6f7c1f2dee9c90f54729d3c3d940", + "revCount": 6007, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -841,11 +841,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1744463964, - "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { @@ -864,11 +864,11 @@ "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1744669903, - "narHash": "sha256-gtfLmGx/N+BzIck9sGLIfzETxocYjVKo4gmSeH6zfaY=", + "lastModified": 1744874965, + "narHash": "sha256-eOnMgAWsjqOhGRoY9smkKlNQcCz9R89mgiKwLrCIYBE=", "owner": "nix-community", "repo": "nixvim", - "rev": "ee9655637cbf898415e09c399bc504180e246d42", + "rev": "500b56f023e0f095ffee2d4f79e58aa09e6b0719", "type": "github" }, "original": { @@ -886,11 +886,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1744701653, - "narHash": "sha256-t2gPDe1tLXZ9vEkVzGm6kDlJpSjQlw9BwqNdCESvegM=", + "lastModified": 1745009194, + "narHash": "sha256-Y2CsvI0kxTf4F1HAN3uC7EUgrwtMmLcRGcnAr3Q/S1U=", "owner": "nix-community", "repo": "NUR", - "rev": "be95402b424e1dafa2e1e1e8c2781381903ef7b3", + "rev": "1a3564fa217bf2bf662f5fbcd5476318bfb12c07", "type": "github" }, "original": { @@ -1011,11 +1011,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1744668092, - "narHash": "sha256-XDmpI3ywMkypsHKRF2am6BzZ5OjwpQMulAe8L87Ek8U=", + "lastModified": 1744910471, + "narHash": "sha256-HItOUMA2whFnPMJuyN2XHq9TZttgrgOAZcoUXsaD4Js=", "owner": "danth", "repo": "stylix", - "rev": "38aff11a7097f4da6b95d4c4d2c0438f25a08d52", + "rev": "8d5cd725ad591890c0cd804bf68cc842b8afca51", "type": "github" }, "original": { diff --git a/modules/graphical/basics.nix b/modules/graphical/basics.nix index 0f802d0..c6759ff 100644 --- a/modules/graphical/basics.nix +++ b/modules/graphical/basics.nix @@ -32,7 +32,6 @@ in { v4l-utils logseq # notes ani-cli - mangal-patched ]; }; } diff --git a/modules/hardware/amd-gpu.nix b/modules/hardware/amd-gpu.nix index 2a7b49e..4fa31a8 100644 --- a/modules/hardware/amd-gpu.nix +++ b/modules/hardware/amd-gpu.nix @@ -3,6 +3,7 @@ let cfg = config.custom.hardware.amd-gpu; in { options.custom.hardware.amd-gpu = { enable = lib.mkEnableOption "Enables amd gpus"; + rocm.enable = lib.mkEnableOption "Enables rocm"; }; config = @@ -39,7 +40,7 @@ in { enable32Bit = true; package = lib.mkForce mesa-new; #extraPackages = with pkgs; [ mesa-git.amdvlk ]; - #extraPackages = with pkgs; [ rocmPackages.clr.icd ]; + extraPackages = lib.mkIf cfg.rocm.enable (with pkgs; [ rocmPackages.clr rocmPackages.clr.icd ]); }; hardware.amdgpu.initrd.enable = lib.mkDefault true; @@ -49,23 +50,28 @@ in { lact nvtopPackages.amd amdgpu_top + ] ++ lib.optionals cfg.rocm.enable [ + clinfo + rocmPackages.rocminfo ]; systemd.packages = with pkgs; [ lact ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ]; #rocm - #systemd.tmpfiles.rules = - # let - # rocmEnv = pkgs.symlinkJoin { - # name = "rocm-combined"; - # paths = with pkgs.rocmPackages; [ - # rocblas - # hipblas - # clr - # ]; - # }; - # in - # [ - # "L+ /opt/rocm - - - - ${rocmEnv}" - # ]; + systemd.tmpfiles.rules = + let + rocmEnv = pkgs.symlinkJoin { + name = "rocm-combined"; + paths = with pkgs.rocmPackages; [ + rocblas + hipblas + clr + ]; + }; + in + lib.mkIf cfg.rocm.enable + [ + "L+ /opt/rocm - - - - ${rocmEnv}" + ]; + }; } diff --git a/overlays.nix b/overlays.nix index d981803..c3179d9 100644 --- a/overlays.nix +++ b/overlays.nix @@ -25,7 +25,6 @@ in inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.hyprland; xdg-desktop-portal-hyprland = inputs.hyprland.packages.${prev.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - #rocmPackages = prev.rocm-update.rocmPackages; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 1a1c87c..476277c 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -43,6 +43,7 @@ hardware = { android.enable = true; amd-gpu.enable = true; + amd-gpu.rocm.enable = true; nvidia = { enable = false; clock = { From 55db17a4364bd29a4bff0b9a1c6bda4f98aaf743 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 18 Apr 2025 23:29:57 +0200 Subject: [PATCH 10/10] delete some stuff --- modules/cron.nix | 5 ----- modules/git.nix | 3 --- modules/graphical/games.nix | 6 +----- 3 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 modules/cron.nix delete mode 100644 modules/git.nix diff --git a/modules/cron.nix b/modules/cron.nix deleted file mode 100644 index 45c7141..0000000 --- a/modules/cron.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - services.cron = { - enable = true; - }; -} diff --git a/modules/git.nix b/modules/git.nix deleted file mode 100644 index dd6a15c..0000000 --- a/modules/git.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.git.enable = true; -} diff --git a/modules/graphical/games.nix b/modules/graphical/games.nix index 0a4254f..96c3707 100644 --- a/modules/graphical/games.nix +++ b/modules/graphical/games.nix @@ -36,11 +36,7 @@ in end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; }; }; - nixpkgs.config.permittedInsecurePackages = [ - "dotnet-runtime-wrapped-7.0.20" - "dotnet-runtime-wrapped-7.0.20" - "dotnet-runtime-wrapped-7.0.20" - ]; + environment.systemPackages = [ pkgs.mangohud ] ++ optionals cfg.enablePreinstalled (with pkgs; [ #taisei