7 Commits

9 changed files with 156 additions and 54 deletions
Generated
+41 -41
View File
@@ -35,11 +35,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780375472, "lastModified": 1782533477,
"narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=", "narHash": "sha256-2enYwf3n9GUkne9v4J3Ud6LpoG4Uarl3BaSQgRAAH7o=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "cli", "repo": "cli",
"rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7", "rev": "e9e115568f818ee1df2d7a9e21925141b053ec6e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +58,11 @@
"quickshell": "quickshell" "quickshell": "quickshell"
}, },
"locked": { "locked": {
"lastModified": 1781178648, "lastModified": 1782636677,
"narHash": "sha256-z6V1T7MHShM7TfFIMCDp94Bi1Wk9LJfK96vm8YFGY5M=", "narHash": "sha256-u01nEjf7afRMCtRjp0LV45DmhC4/n/uPY3S/HAh/V2w=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "shell", "repo": "shell",
"rev": "a16c957a8bd13e0cfd09928ca0a22fecd3681e44", "rev": "145a6795ee41e023e863681cec6c5db3b334ffc0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781307432, "lastModified": 1782492933,
"narHash": "sha256-96fOVwSAFEoZNZtJM10E4Fz1kr59CwzYfUFidypPkKY=", "narHash": "sha256-v/BH1zfHaCFqP+4Ev9PWiGy15YrpmI9wzjxRtiFhgvA=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "a00bc93fe1b6f71afffa43fab4efb88dceddea62", "rev": "4c8203016f089b38281ed922a78255146f099e7b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -207,11 +207,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781305496, "lastModified": 1782702263,
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=", "narHash": "sha256-8/MG4Su7PhnynrmsVO61IeAfrK7GuUEu+E+gwbhy1QQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c87a39aa979acc4848016d2220c6238390d84779", "rev": "789a35fbdeb3c46b260096daa0b321c11be527ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -230,11 +230,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1780841807, "lastModified": 1781867614,
"narHash": "sha256-7N3iYAUmNjt0wgfpb1ZMVP5xRcXSrihQqOxZPM5N0Tc=", "narHash": "sha256-GHy8hEZtToo7FLxEZm0x/pn/fjg1w9sx7ZP9hRd1fcM=",
"ref": "develop", "ref": "develop",
"rev": "0e6b559d002cc7a9bcb758384623de0e8e034bbe", "rev": "d2c48605aac4ca9580d8a34aad4c65371c5a7cc1",
"revCount": 45, "revCount": 52,
"type": "git", "type": "git",
"url": "https://labs.phundrak.com/phundrak/jj-cz" "url": "https://labs.phundrak.com/phundrak/jj-cz"
}, },
@@ -268,11 +268,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780816331, "lastModified": 1782636943,
"narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=", "narHash": "sha256-ripjZa7BBLwL1uS5VJF3s/VpZpWt5ZIQEvkJ/FJNpQw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c", "rev": "058b1f9381fa79fcda49982370a750ff92dbba43",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -283,11 +283,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1781074563, "lastModified": 1782467914,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", "narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -299,11 +299,11 @@
}, },
"nixpkgsStable": { "nixpkgsStable": {
"locked": { "locked": {
"lastModified": 1780952837, "lastModified": 1782498288,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=", "narHash": "sha256-8/X3yyTXiE82b38n32ItbOqfWOVBl+gKa8fILyZfR4Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe", "rev": "3cac626ec5e3703e835f227687e88aa9e2f25701",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -342,11 +342,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780303737, "lastModified": 1781847791,
"narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=", "narHash": "sha256-Mo2YtNEGlcySnbq0YuP3nUKMAQCMAfE+TcCffo5vzD8=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "b66495fcc5022681b56b61f928c7acbe910e722c", "rev": "68c2c85c33845385f7ab8147b32f1450b1e468e0",
"revCount": 821, "revCount": 824,
"type": "git", "type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell" "url": "https://git.outfoxxed.me/outfoxxed/quickshell"
}, },
@@ -466,11 +466,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1782165805,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-478kKQBvK6SYTOdN2h9jhKJv94nbXRbFMfuL1WshErg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "56b24064fdcaedca53553b1a6d607fd23b613a24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -487,11 +487,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1781101834, "lastModified": 1782633406,
"narHash": "sha256-gNVY6SYglFe37FpD+NnOjTipsqvVMM2vh/uc22KDEsA=", "narHash": "sha256-JOSMk12GgnTLVlUSCuKkqyUF6cw82wl7t7e1WuFfg5s=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "0243dd6707c969fc8440216c811b3f2e4a4cceb7", "rev": "5ff9a6ca9dcbad7cccea2c97d30237468b16feda",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -507,11 +507,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781149687, "lastModified": 1782700116,
"narHash": "sha256-TanScAdzeSOcaVDN4V4rnTAlbuizMJlrVSSt9QkkPEA=", "narHash": "sha256-E63+nvH3jkAt/hBxhMa5aykstXdqRvBSeqNRDpQNv78=",
"owner": "nix-community", "owner": "nix-community",
"repo": "srvos", "repo": "srvos",
"rev": "7a66d11f03dd0588229af7a2b7018a435638dbf5", "rev": "d45cf79058f2d42c0b0dd7912bedb5d14faa00ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -587,11 +587,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781242638, "lastModified": 1782624757,
"narHash": "sha256-n0s/QM5ZJl3/v4tgDLsATIHR2dC+4+Aa2BT6FnthGy4=", "narHash": "sha256-pqFaCAV+g8H+p0kE4vYn9ZgcEFvt644zGy7SyCdf9c8=",
"owner": "youwen5", "owner": "youwen5",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "79f7cca35f9e4e38d1f8767bac130159f60866cc", "rev": "907465791e7064d86d37964dd95e23280dfb68da",
"type": "github" "type": "github"
}, },
"original": { "original": {
+4 -2
View File
@@ -96,7 +96,8 @@
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: let system: let
inherit (self) outputs; inherit (self) outputs;
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {inherit system;};
in { in {
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
@@ -104,13 +105,14 @@
pkgs.nh pkgs.nh
pkgs.jujutsu pkgs.jujutsu
pkgs.git pkgs.git
inputs.jj-cz.packages.${system}.default
]; ];
}; };
packages = { packages = {
homeConfigurations = let homeConfigurations = let
extraSpecialArgs = {inherit inputs outputs system;}; extraSpecialArgs = {inherit inputs outputs system;};
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = import nixpkgs {inherit system;};
defaultUserModules = [ defaultUserModules = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
inputs.spicetify.homeManagerModules.default inputs.spicetify.homeManagerModules.default
+69
View File
@@ -0,0 +1,69 @@
# Baseline variant of Bun for x86_64-linux CPUs without AVX2 support.
# The regular `bun` from nixpkgs requires AVX2 and crashes with SIGILL on older hardware.
#
# Version is typically kept in sync with nixpkgs's `bun` (passed via `callPackage`).
{
lib,
stdenvNoCC,
fetchurl,
autoPatchelfHook,
unzip,
makeBinaryWrapper,
glibc,
stdenv,
version ? "1.3.13",
}: let
# When updating `version`, compute the new hash with:
# nix store prefetch-file \
# "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"
hash = "sha256-nYokKSpwaAkCBdqsCloiP19pc29Sh+N7+I07QDHtx1A=";
in
stdenvNoCC.mkDerivation {
pname = "bun-baseline";
inherit version;
src = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip";
inherit hash;
};
nativeBuildInputs =
[unzip]
++ lib.optionals stdenvNoCC.hostPlatform.isLinux [
autoPatchelfHook
makeBinaryWrapper
];
buildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
glibc
(lib.getLib stdenv.cc.cc)
];
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
runHook preUnpack
mkdir -p source
cd source
${lib.getExe unzip} -q $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
find . -type f -name "bun" -not -path "./__MACOSX/*" -exec cp {} $out/bin/bun \;
chmod +x $out/bin/bun
ln -s $out/bin/bun $out/bin/bunx
runHook postInstall
'';
meta = {
description = "Bun JavaScript runtime (baseline variant, works without AVX2)";
homepage = "https://bun.sh";
license = lib.licenses.mit;
platforms = ["x86_64-linux"];
mainProgram = "bun";
};
}
+1 -1
View File
@@ -44,7 +44,7 @@ in {
}; };
launcher = { launcher = {
enabled = true; enabled = true;
showOnHover = true; showOnHover = false;
useFuzzy = { useFuzzy = {
apps = true; apps = true;
schemes = true; schemes = true;
+6 -1
View File
@@ -16,6 +16,11 @@ in {
options.home.dev.ai = { options.home.dev.ai = {
enable = mkEnableOption "Enables AI features"; enable = mkEnableOption "Enables AI features";
lmStudio = mkOption {
default = cfg.enable;
example = true;
description = "Enables LM Studio. Enabled by default when AI is enabled.";
};
mcpServers = mkOption { mcpServers = mkOption {
inherit (jsonFormat) type; inherit (jsonFormat) type;
default = {}; default = {};
@@ -31,7 +36,7 @@ in {
ollama.enable = mkDefault cfg.enable; ollama.enable = mkDefault cfg.enable;
opencode.enable = mkDefault cfg.enable; opencode.enable = mkDefault cfg.enable;
}; };
packages = [pkgs.lmstudio]; packages = lists.optional cfg.lmStudio pkgs.lmstudio;
}; };
programs.mcp = mkIf (cfg.mcpServers != {}) { programs.mcp = mkIf (cfg.mcpServers != {}) {
enable = true; enable = true;
+30 -6
View File
@@ -1,15 +1,39 @@
{ {
config, config,
lib, lib,
inputs,
pkgs, pkgs,
... ...
}: }:
with lib; let with lib; let
inherit (pkgs.stdenv.hostPlatform) system;
cfg = config.home.dev.ai.opencode; cfg = config.home.dev.ai.opencode;
defaultPackageCli = inputs.opencode.packages.${system}.opencode;
defaultPackageDesktop = inputs.opencode.packages.${system}.desktop; # On x86_64-linux CPUs without AVX2, use the baseline bun variant
# when building opencode - the regular `bun` from nixpkgs requires
# AVX2 and crashes on older hardware, such as my Thinkpad x220s
# Intel Core i5 2640M.
needsBaselineBun =
pkgs.stdenv.hostPlatform.isx86_64 && !pkgs.stdenv.hostPlatform.avx2Support;
defaultPackageCli =
if needsBaselineBun
then
pkgs.opencode.override {
bun = pkgs.callPackage ../../../../packages/bun-baseline.nix {
version = pkgs.bun.version;
};
}
else pkgs.opencode;
defaultPackageDesktop =
if needsBaselineBun
then
pkgs.opencode-desktop.override {
bun = pkgs.callPackage ../../../../packages/bun-baseline.nix {
version = pkgs.bun.version;
};
}
else pkgs.opencode-desktop;
corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim); corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
in { in {
options.home.dev.ai.opencode = { options.home.dev.ai.opencode = {
@@ -66,9 +90,9 @@ in {
}; };
}; };
config.programs.opencode = mkIf cfg.enable { config.programs.opencode = mkIf cfg.enable {
inherit (cfg) enable tui; inherit (cfg) enable tui package;
enableMcpIntegration = true; enableMcpIntegration = true;
extraPackages = with pkgs; [uv]; extraPackages = with pkgs; [uv] ++ lists.optional cfg.desktop.enable cfg.desktop.package;
settings = settings =
{ {
server = mkIf cfg.web.mdns.enable { server = mkIf cfg.web.mdns.enable {
+1
View File
@@ -2,6 +2,7 @@
imports = [../home.nix]; imports = [../home.nix];
home = { home = {
cli.nh.flake = "${config.home.homeDirectory}/.dotfiles"; cli.nh.flake = "${config.home.homeDirectory}/.dotfiles";
dev.ai.lmStudio = false;
desktop.hyprland.host = "gampo"; desktop.hyprland.host = "gampo";
phundrak.sshKey.content = builtins.readFile ../keys/id_gampo.pub; phundrak.sshKey.content = builtins.readFile ../keys/id_gampo.pub;
}; };
+1
View File
@@ -75,6 +75,7 @@ in {
tectonic # better LaTeX engine tectonic # better LaTeX engine
wakatime-cli wakatime-cli
zeal zeal
pandoc
## LSP servers ## LSP servers
bash-language-server bash-language-server