13 changed files with 170 additions and 58 deletions
Generated
+41 -41
View File
@@ -35,11 +35,11 @@
]
},
"locked": {
"lastModified": 1780375472,
"narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=",
"lastModified": 1786674943,
"narHash": "sha256-UwVo4emt9+GDslfabJfCkfO1uOqdhLroqByMEd9RpGk=",
"owner": "caelestia-dots",
"repo": "cli",
"rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7",
"rev": "9857e1a5c4dad637a6220fa4290026559ba86c18",
"type": "github"
},
"original": {
@@ -58,11 +58,11 @@
"quickshell": "quickshell"
},
"locked": {
"lastModified": 1781178648,
"narHash": "sha256-z6V1T7MHShM7TfFIMCDp94Bi1Wk9LJfK96vm8YFGY5M=",
"lastModified": 1787103705,
"narHash": "sha256-8KUEG+FPKJv+yNhOMfEZiGoB9YgTmKTwa611BVgu6LU=",
"owner": "caelestia-dots",
"repo": "shell",
"rev": "a16c957a8bd13e0cfd09928ca0a22fecd3681e44",
"rev": "27faa5cf95299c2eaa31848ccd78e746d6eef4ed",
"type": "github"
},
"original": {
@@ -79,11 +79,11 @@
]
},
"locked": {
"lastModified": 1781307432,
"narHash": "sha256-96fOVwSAFEoZNZtJM10E4Fz1kr59CwzYfUFidypPkKY=",
"lastModified": 1787004344,
"narHash": "sha256-/YbaX3cVP54l6Ol8qgS/K8H+Hu8zgyOgUVDLTv70txE=",
"owner": "9001",
"repo": "copyparty",
"rev": "a00bc93fe1b6f71afffa43fab4efb88dceddea62",
"rev": "6115eb452d2c2bbdeef5d19098fac17db69ddaa8",
"type": "github"
},
"original": {
@@ -207,11 +207,11 @@
]
},
"locked": {
"lastModified": 1781305496,
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=",
"lastModified": 1786999651,
"narHash": "sha256-MTGMFlLDTklsXhCp4r5GXB4VAVadPdalXLvUjd/K7h0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c87a39aa979acc4848016d2220c6238390d84779",
"rev": "353742587cbaf079b3caee743115d037bc51fea6",
"type": "github"
},
"original": {
@@ -230,11 +230,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1780841807,
"narHash": "sha256-7N3iYAUmNjt0wgfpb1ZMVP5xRcXSrihQqOxZPM5N0Tc=",
"lastModified": 1781867614,
"narHash": "sha256-GHy8hEZtToo7FLxEZm0x/pn/fjg1w9sx7ZP9hRd1fcM=",
"ref": "develop",
"rev": "0e6b559d002cc7a9bcb758384623de0e8e034bbe",
"revCount": 45,
"rev": "d2c48605aac4ca9580d8a34aad4c65371c5a7cc1",
"revCount": 52,
"type": "git",
"url": "https://labs.phundrak.com/phundrak/jj-cz"
},
@@ -268,11 +268,11 @@
]
},
"locked": {
"lastModified": 1780816331,
"narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=",
"lastModified": 1786852476,
"narHash": "sha256-IM5CYtf86W4w8eUPpKcY/LpdHElmVBtJhaKnoTKxZEA=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c",
"rev": "c7962dc97b45129df8d751bedaf37beb5a17706e",
"type": "github"
},
"original": {
@@ -283,11 +283,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"lastModified": 1787070829,
"narHash": "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"rev": "0ae2bc1419c3f345984c2629e72e7a631820fa4d",
"type": "github"
},
"original": {
@@ -299,11 +299,11 @@
},
"nixpkgsStable": {
"locked": {
"lastModified": 1780952837,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
"lastModified": 1782847189,
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
"type": "github"
},
"original": {
@@ -342,11 +342,11 @@
]
},
"locked": {
"lastModified": 1780303737,
"narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=",
"lastModified": 1785704021,
"narHash": "sha256-eQtczKMAS4ItlB4pr1B3MqBZiyRVl2nkqNdtyRSQMa8=",
"ref": "refs/heads/master",
"rev": "b66495fcc5022681b56b61f928c7acbe910e722c",
"revCount": 821,
"rev": "28771c7c74b42e20afca0b1b63980cb46515537c",
"revCount": 835,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},
@@ -466,11 +466,11 @@
]
},
"locked": {
"lastModified": 1780547341,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
"lastModified": 1786629091,
"narHash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
"rev": "a8627b21b9107c5711c96b84f32a9a4b3d45295f",
"type": "github"
},
"original": {
@@ -487,11 +487,11 @@
"systems": "systems_4"
},
"locked": {
"lastModified": 1781101834,
"narHash": "sha256-gNVY6SYglFe37FpD+NnOjTipsqvVMM2vh/uc22KDEsA=",
"lastModified": 1786855359,
"narHash": "sha256-yeKMWFCPeoIKmPBLLvP1/15ulOJO8i9ZIlSSXGuW6aw=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "0243dd6707c969fc8440216c811b3f2e4a4cceb7",
"rev": "0f478ff79b82abb785160cd4531293f61d21be86",
"type": "github"
},
"original": {
@@ -507,11 +507,11 @@
]
},
"locked": {
"lastModified": 1781149687,
"narHash": "sha256-TanScAdzeSOcaVDN4V4rnTAlbuizMJlrVSSt9QkkPEA=",
"lastModified": 1786933611,
"narHash": "sha256-FhNVyQZuDvWOozJ1mNuFJ/LY62r3PtBC+kzQNzdi400=",
"owner": "nix-community",
"repo": "srvos",
"rev": "7a66d11f03dd0588229af7a2b7018a435638dbf5",
"rev": "3fea6d6ca2b90b9e86b36b0dc23abc8f92cf5b9f",
"type": "github"
},
"original": {
@@ -587,11 +587,11 @@
]
},
"locked": {
"lastModified": 1781242638,
"narHash": "sha256-n0s/QM5ZJl3/v4tgDLsATIHR2dC+4+Aa2BT6FnthGy4=",
"lastModified": 1786685380,
"narHash": "sha256-3ZuubfWk7CHPF/60w5BVrVkzdO7Oed1MgZ+ugLsgww8=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "79f7cca35f9e4e38d1f8767bac130159f60866cc",
"rev": "e1e4aa6433a352f07059aeb8483ae42deb61f9b2",
"type": "github"
},
"original": {
+4 -2
View File
@@ -96,7 +96,8 @@
flake-utils.lib.eachDefaultSystem (
system: let
inherit (self) outputs;
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {inherit system;};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
@@ -104,13 +105,14 @@
pkgs.nh
pkgs.jujutsu
pkgs.git
inputs.jj-cz.packages.${system}.default
];
};
packages = {
homeConfigurations = let
extraSpecialArgs = {inherit inputs outputs system;};
pkgs = nixpkgs.legacyPackages.x86_64-linux;
pkgs = import nixpkgs {inherit system;};
defaultUserModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.spicetify.homeManagerModules.default
+70
View File
@@ -0,0 +1,70 @@
# 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 = {
"1.3.13" = "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";
hash = hash.${version};
};
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";
};
}
+10 -3
View File
@@ -7,7 +7,14 @@
with lib; let
cfg = config.home.desktop.caelestia;
in {
options.home.desktop.caelestia.enable = mkEnableOption "Enables Caelestia Shell";
options.home.desktop.caelestia = {
enable = mkEnableOption "Enables Caelestia Shell";
idleTimeout = mkOption {
description = "Idle duration in seconds before locking the session";
default = 60 * 60; # an hour
type = types.int;
};
};
config.programs.caelestia = mkIf cfg.enable {
inherit (cfg) enable;
systemd = {
@@ -28,7 +35,7 @@ in {
inhibitWhenAudio = true;
timeouts = [
{
timeout = 3600;
timeout = cfg.idleTimeout;
idleAction = "lock";
}
];
@@ -44,7 +51,7 @@ in {
};
launcher = {
enabled = true;
showOnHover = true;
showOnHover = false;
useFuzzy = {
apps = true;
schemes = true;
+6 -1
View File
@@ -16,6 +16,11 @@ in {
options.home.dev.ai = {
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 {
inherit (jsonFormat) type;
default = {};
@@ -31,7 +36,7 @@ in {
ollama.enable = mkDefault cfg.enable;
opencode.enable = mkDefault cfg.enable;
};
packages = [pkgs.lmstudio];
packages = lists.optional cfg.lmStudio pkgs.lmstudio;
};
programs.mcp = mkIf (cfg.mcpServers != {}) {
enable = true;
+21 -6
View File
@@ -1,15 +1,30 @@
{
config,
lib,
inputs,
pkgs,
...
}:
with lib; let
inherit (pkgs.stdenv.hostPlatform) system;
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 x220’s
# Intel Core i5 2640M.
needsBaselineBun =
pkgs.stdenv.hostPlatform.isx86_64 && !pkgs.stdenv.hostPlatform.avx2Support;
bunBaseline = pkgs.callPackage ../../../../packages/bun-baseline.nix {};
defaultPackageCli =
if needsBaselineBun
then pkgs.opencode.override {bun = bunBaseline;}
else pkgs.opencode;
defaultPackageDesktop =
if needsBaselineBun
then pkgs.opencode-desktop.override {bun = bunBaseline;}
else pkgs.opencode-desktop;
corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
in {
options.home.dev.ai.opencode = {
@@ -66,9 +81,9 @@ in {
};
};
config.programs.opencode = mkIf cfg.enable {
inherit (cfg) enable tui;
inherit (cfg) enable tui package;
enableMcpIntegration = true;
extraPackages = with pkgs; [uv];
extraPackages = with pkgs; [uv] ++ lists.optional cfg.desktop.enable cfg.desktop.package;
settings =
{
server = mkIf cfg.web.mdns.enable {
+4 -1
View File
@@ -57,12 +57,15 @@ in {
inherit (cfg) name email;
};
ui = {
inherit (cfg) editor;
default-command = "st";
pager = ":builtin";
show-cryptographic-signatures = true;
diff-editor = ":builtin";
merge-editort = ":builtin";
inherit (cfg) editor;
# These are for vc-jj.el in Emacs
diff-formatter = ":git";
conflict-marker-style = "git";
};
signing = mkIf cfg.signing.enable {
behavior = "own";
+4
View File
@@ -38,6 +38,10 @@
"*.env.*" = "deny";
"*.env.example" = "allow";
};
skill = "allow";
question = "allow";
task = "allow";
todowrite = "allow";
};
formatter.nixfmt = {
command = ["nix" "fmt" "$FILE"];
+1
View File
@@ -106,6 +106,7 @@
);
};
};
media.mopidy.enable = false;
};
manual = {
+1
View File
@@ -2,6 +2,7 @@
imports = [../home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/.dotfiles";
dev.ai.lmStudio = false;
desktop.hyprland.host = "gampo";
phundrak.sshKey.content = builtins.readFile ../keys/id_gampo.pub;
};
+4 -1
View File
@@ -7,7 +7,10 @@
enable = true;
ollama.gpu = "rocm";
};
desktop.hyprland.host = "marpa";
desktop = {
hyprland.host = "marpa";
caelestia.idleTimeout = 60 * 60 * 24; # a day
};
phundrak.sshKey.content = builtins.readFile ../keys/id_marpa.pub;
};
programs.caelestia.settings.bar.status = {
+1
View File
@@ -75,6 +75,7 @@ in {
tectonic # better LaTeX engine
wakatime-cli
zeal
pandoc
## LSP servers
bash-language-server