rocblas workaround

This commit is contained in:
m3tam3re 2025-01-28 09:57:26 +01:00
parent 65a69df52b
commit e4b87c6908
7 changed files with 100 additions and 76 deletions

18
flake.lock generated
View File

@ -221,29 +221,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-b69de56": { "nixpkgs-d016996": {
"locked": { "locked": {
"lastModified": 1728538411, "lastModified": 1737074211,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "narHash": "sha256-BdTeiNTc1DUiEcKhmjjuJ54KRv+8UzyTqRl7QS64AMI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "rev": "d0169965cf1ce1cd68e50a63eabff7c8b8959743",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "rev": "d0169965cf1ce1cd68e50a63eabff7c8b8959743",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1738039266, "lastModified": 1738054107,
"narHash": "sha256-/cOXy6HEn+0uj3qQgrsEk/tV6Sf/w907ZuF+VjJbIUo=", "narHash": "sha256-7c6saLnHl63aTrzMbxtdYpGH7Pj7rmnibTr2uVvuJC0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12fbfbc565353ddf1d4628aa8e5074c376dd38ec", "rev": "a8a8c516eb47ae0005baab36d7a75fe3bc21eeef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -325,7 +325,7 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"hyprpanel": "hyprpanel", "hyprpanel": "hyprpanel",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-b69de56": "nixpkgs-b69de56", "nixpkgs-d016996": "nixpkgs-d016996",
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"rose-pine-hyprcursor": "rose-pine-hyprcursor" "rose-pine-hyprcursor": "rose-pine-hyprcursor"

View File

@ -17,7 +17,7 @@
}; };
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-b69de56.url = "github:nixos/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221"; nixpkgs-d016996.url = "github:nixos/nixpkgs/d0169965cf1ce1cd68e50a63eabff7c8b8959743";
nixpkgs-master.url = "github:nixos/nixpkgs/master"; nixpkgs-master.url = "github:nixos/nixpkgs/master";
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";

View File

@ -1,67 +1,84 @@
{pkgs, ...}: { {
home.packages = with pkgs; [bruno insomnia]; config,
programs.zed-editor = { lib,
enable = true; pkgs,
userSettings = { ...
features = { }:
copilot = false; with lib; let
}; cfg = config.features.desktop.office;
telemetry = { in {
metrics = false; options.features.desktop.coding.enable =
}; mkEnableOption "install coding related stuff";
lsp = {
rust_analyzer = { config = mkIf cfg.enable {
binary = {path_lookup = true;}; home.packages = with pkgs; [
bruno
insomnia
];
programs.zed-editor = {
enable = true;
userSettings = {
features = {
copilot = false;
}; };
}; telemetry = {
languages = { metrics = false;
Nix = { };
language_servers = ["nixd"]; lsp = {
formatter = { rust_analyzer = {
external = { binary = {path_lookup = true;};
command = "alejandra"; };
arguments = ["-q" "-"]; };
languages = {
Nix = {
language_servers = ["nixd"];
formatter = {
external = {
command = "alejandra";
arguments = ["-q" "-"];
};
};
};
Python = {
language_servers = ["pyright"];
formatter = {
external = {
command = "black";
arguments = ["-"];
};
}; };
}; };
}; };
Python = { assistant = {
language_servers = ["pyright"]; version = "2";
formatter = { default_model = {
external = { provider = "zed.dev";
command = "black"; model = "claude-3-5-sonnet-latest";
arguments = ["-"];
};
}; };
}; };
language_models = {
anthropic = {
version = "1";
api_url = "https://api.anthropic.com";
};
openai = {
version = "1";
api_url = "https://api.openai.com/v1";
};
ollama = {
api_url = "http://localhost:11434";
};
};
auto_update = false;
format_on_save = "on";
vim_mode = true;
load_direnv = "shell_hook";
theme = "Dracula";
buffer_font_family = "FiraCode Nerd Font";
ui_font_size = 16;
buffer_font_size = 16;
}; };
assistant = {
version = "2";
default_model = {
provider = "zed.dev";
model = "claude-3-5-sonnet-latest";
};
};
language_models = {
anthropic = {
version = "1";
api_url = "https://api.anthropic.com";
};
openai = {
version = "1";
api_url = "https://api.openai.com/v1";
};
ollama = {
api_url = "http://localhost:11434";
};
};
auto_update = false;
format_on_save = "on";
vim_mode = true;
load_direnv = "shell_hook";
theme = "Dracula";
buffer_font_family = "FiraCode Nerd Font";
ui_font_size = 16;
buffer_font_size = 16;
}; };
}; };
} }

View File

@ -31,16 +31,16 @@ in {
associations.added = { associations.added = {
"application/zip" = ["org.gnome.FileRoller.desktop"]; "application/zip" = ["org.gnome.FileRoller.desktop"];
"application/csv" = ["calc.desktop"]; "application/csv" = ["calc.desktop"];
"application/pdf" = ["okularApplication_pdf.desktop"]; "application/pdf" = ["io.github.zen_browser.zen.desktop"];
"x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"]; "x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"];
"x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"]; "x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"];
}; };
defaultApplications = { defaultApplications = {
"application/zip" = ["org.gnome.FileRoller.desktop"]; "application/zip" = ["org.gnome.FileRoller.desktop"];
"application/csv" = ["calc.desktop"]; "application/csv" = ["calc.desktop"];
"application/pdf" = ["okularApplication_pdf.desktop"]; "application/pdf" = ["io.github.zen_browser.zen.desktop"];
"application/md" = ["nvim.desktop"]; "application/md" = ["dev.zed.Zed.desktop"];
"application/text" = ["nvim.desktop"]; "application/text" = ["dev.zed.Zed.desktop"];
"x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"]; "x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"];
"x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"]; "x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"];
}; };
@ -55,6 +55,7 @@ in {
starship.enable = true; starship.enable = true;
}; };
desktop = { desktop = {
coding.enable = true;
gaming.enable = true; gaming.enable = true;
hyprland.enable = true; hyprland.enable = true;
media.enable = true; media.enable = true;
@ -79,7 +80,7 @@ in {
"2, monitor:DP-1" "2, monitor:DP-1"
"3, monitor:DP-1" "3, monitor:DP-1"
"4, monitor:DP-2" "4, monitor:DP-2"
"5, monitor:DP-1" "5, monitor:DP-2"
"6, monitor:DP-2" "6, monitor:DP-2"
"7, monitor:DP-2" "7, monitor:DP-2"
]; ];
@ -88,7 +89,7 @@ in {
"workspace 1,class:dev.zed.Zed" "workspace 1,class:dev.zed.Zed"
"workspace 2,class:(com.obsproject.Studio)" "workspace 2,class:(com.obsproject.Studio)"
"workspace 4,opacity 1.0, class:(chromium-browser)" "workspace 4,opacity 1.0, class:(chromium-browser)"
"workspace 4,opacity 1.0, class:(zen-alpha)" "workspace 4,opacity 1.0, class:(zen)"
]; ];
}; };
}; };

View File

@ -55,6 +55,7 @@ in {
starship.enable = true; starship.enable = true;
}; };
desktop = { desktop = {
coding.enable = true;
gaming.enable = true; gaming.enable = true;
hyprland.enable = true; hyprland.enable = true;
media.enable = true; media.enable = true;
@ -79,7 +80,7 @@ in {
"2, monitor:DP-1" "2, monitor:DP-1"
"3, monitor:DP-1" "3, monitor:DP-1"
"4, monitor:DP-2" "4, monitor:DP-2"
"5, monitor:DP-1" "5, monitor:DP-2"
"6, monitor:DP-2" "6, monitor:DP-2"
"7, monitor:DP-2" "7, monitor:DP-2"
]; ];
@ -88,7 +89,7 @@ in {
"workspace 1,class:dev.zed.Zed" "workspace 1,class:dev.zed.Zed"
"workspace 2,class:(com.obsproject.Studio)" "workspace 2,class:(com.obsproject.Studio)"
"workspace 4,opacity 1.0, class:(chromium-browser)" "workspace 4,opacity 1.0, class:(chromium-browser)"
"workspace 4,opacity 1.0, class:(zen-alpha)" "workspace 4,opacity 1.0, class:(zen)"
]; ];
}; };
}; };

View File

@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
with lib; let with lib; let
@ -11,6 +12,10 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.ollama = { services.ollama = {
enable = true; enable = true;
package =
if config.services.xserver.videoDrivers == ["amdgpu"] # rocblas-6.0.2 broken
then pkgs.pinned.ollama
else null;
acceleration = acceleration =
if config.services.xserver.videoDrivers == ["amdgpu"] if config.services.xserver.videoDrivers == ["amdgpu"]
then "rocm" then "rocm"

View File

@ -29,7 +29,7 @@
}; };
pinned-packages = final: _prev: { pinned-packages = final: _prev: {
pinned = import inputs.nixpkgs-b69de56 { pinned = import inputs.nixpkgs-d016996 {
system = final.system; system = final.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };