13 changed files with 170 additions and 58 deletions
Generated
+41 -41
View File
@@ -35,11 +35,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780375472, "lastModified": 1786674943,
"narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=", "narHash": "sha256-UwVo4emt9+GDslfabJfCkfO1uOqdhLroqByMEd9RpGk=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "cli", "repo": "cli",
"rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7", "rev": "9857e1a5c4dad637a6220fa4290026559ba86c18",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +58,11 @@
"quickshell": "quickshell" "quickshell": "quickshell"
}, },
"locked": { "locked": {
"lastModified": 1781178648, "lastModified": 1787103705,
"narHash": "sha256-z6V1T7MHShM7TfFIMCDp94Bi1Wk9LJfK96vm8YFGY5M=", "narHash": "sha256-8KUEG+FPKJv+yNhOMfEZiGoB9YgTmKTwa611BVgu6LU=",
"owner": "caelestia-dots", "owner": "caelestia-dots",
"repo": "shell", "repo": "shell",
"rev": "a16c957a8bd13e0cfd09928ca0a22fecd3681e44", "rev": "27faa5cf95299c2eaa31848ccd78e746d6eef4ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781307432, "lastModified": 1787004344,
"narHash": "sha256-96fOVwSAFEoZNZtJM10E4Fz1kr59CwzYfUFidypPkKY=", "narHash": "sha256-/YbaX3cVP54l6Ol8qgS/K8H+Hu8zgyOgUVDLTv70txE=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "a00bc93fe1b6f71afffa43fab4efb88dceddea62", "rev": "6115eb452d2c2bbdeef5d19098fac17db69ddaa8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -207,11 +207,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781305496, "lastModified": 1786999651,
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=", "narHash": "sha256-MTGMFlLDTklsXhCp4r5GXB4VAVadPdalXLvUjd/K7h0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c87a39aa979acc4848016d2220c6238390d84779", "rev": "353742587cbaf079b3caee743115d037bc51fea6",
"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": 1786852476,
"narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=", "narHash": "sha256-IM5CYtf86W4w8eUPpKcY/LpdHElmVBtJhaKnoTKxZEA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c", "rev": "c7962dc97b45129df8d751bedaf37beb5a17706e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -283,11 +283,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1781074563, "lastModified": 1787070829,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", "narHash": "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "rev": "0ae2bc1419c3f345984c2629e72e7a631820fa4d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -299,11 +299,11 @@
}, },
"nixpkgsStable": { "nixpkgsStable": {
"locked": { "locked": {
"lastModified": 1780952837, "lastModified": 1782847189,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=", "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe", "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -342,11 +342,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780303737, "lastModified": 1785704021,
"narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=", "narHash": "sha256-eQtczKMAS4ItlB4pr1B3MqBZiyRVl2nkqNdtyRSQMa8=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "b66495fcc5022681b56b61f928c7acbe910e722c", "rev": "28771c7c74b42e20afca0b1b63980cb46515537c",
"revCount": 821, "revCount": 835,
"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": 1786629091,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "a8627b21b9107c5711c96b84f32a9a4b3d45295f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -487,11 +487,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1781101834, "lastModified": 1786855359,
"narHash": "sha256-gNVY6SYglFe37FpD+NnOjTipsqvVMM2vh/uc22KDEsA=", "narHash": "sha256-yeKMWFCPeoIKmPBLLvP1/15ulOJO8i9ZIlSSXGuW6aw=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "0243dd6707c969fc8440216c811b3f2e4a4cceb7", "rev": "0f478ff79b82abb785160cd4531293f61d21be86",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -507,11 +507,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781149687, "lastModified": 1786933611,
"narHash": "sha256-TanScAdzeSOcaVDN4V4rnTAlbuizMJlrVSSt9QkkPEA=", "narHash": "sha256-FhNVyQZuDvWOozJ1mNuFJ/LY62r3PtBC+kzQNzdi400=",
"owner": "nix-community", "owner": "nix-community",
"repo": "srvos", "repo": "srvos",
"rev": "7a66d11f03dd0588229af7a2b7018a435638dbf5", "rev": "3fea6d6ca2b90b9e86b36b0dc23abc8f92cf5b9f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -587,11 +587,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781242638, "lastModified": 1786685380,
"narHash": "sha256-n0s/QM5ZJl3/v4tgDLsATIHR2dC+4+Aa2BT6FnthGy4=", "narHash": "sha256-3ZuubfWk7CHPF/60w5BVrVkzdO7Oed1MgZ+ugLsgww8=",
"owner": "youwen5", "owner": "youwen5",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "79f7cca35f9e4e38d1f8767bac130159f60866cc", "rev": "e1e4aa6433a352f07059aeb8483ae42deb61f9b2",
"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
+3 -3
View File
@@ -23,9 +23,9 @@
id = "0003beef"; id = "0003beef";
firewall = { firewall = {
openPorts = [ openPorts = [
22 # Gitea SSH 22 # Gitea SSH
25 # SMTP 25 # SMTP
80 # HTTP 80 # HTTP
443 # HTTPS 443 # HTTPS
465 # SMTPS 465 # SMTPS
993 # IMAPS 993 # IMAPS
+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 with lib; let
cfg = config.home.desktop.caelestia; cfg = config.home.desktop.caelestia;
in { 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 { config.programs.caelestia = mkIf cfg.enable {
inherit (cfg) enable; inherit (cfg) enable;
systemd = { systemd = {
@@ -28,7 +35,7 @@ in {
inhibitWhenAudio = true; inhibitWhenAudio = true;
timeouts = [ timeouts = [
{ {
timeout = 3600; timeout = cfg.idleTimeout;
idleAction = "lock"; idleAction = "lock";
} }
]; ];
@@ -44,7 +51,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;
+21 -6
View File
@@ -1,15 +1,30 @@
{ {
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 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); corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
in { in {
options.home.dev.ai.opencode = { options.home.dev.ai.opencode = {
@@ -66,9 +81,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 {
+4 -1
View File
@@ -57,12 +57,15 @@ in {
inherit (cfg) name email; inherit (cfg) name email;
}; };
ui = { ui = {
inherit (cfg) editor;
default-command = "st"; default-command = "st";
pager = ":builtin"; pager = ":builtin";
show-cryptographic-signatures = true; show-cryptographic-signatures = true;
diff-editor = ":builtin"; diff-editor = ":builtin";
merge-editort = ":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 { signing = mkIf cfg.signing.enable {
behavior = "own"; behavior = "own";
+4
View File
@@ -38,6 +38,10 @@
"*.env.*" = "deny"; "*.env.*" = "deny";
"*.env.example" = "allow"; "*.env.example" = "allow";
}; };
skill = "allow";
question = "allow";
task = "allow";
todowrite = "allow";
}; };
formatter.nixfmt = { formatter.nixfmt = {
command = ["nix" "fmt" "$FILE"]; command = ["nix" "fmt" "$FILE"];
+1
View File
@@ -106,6 +106,7 @@
); );
}; };
}; };
media.mopidy.enable = false;
}; };
manual = { manual = {
+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;
}; };
+4 -1
View File
@@ -7,7 +7,10 @@
enable = true; enable = true;
ollama.gpu = "rocm"; 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; phundrak.sshKey.content = builtins.readFile ../keys/id_marpa.pub;
}; };
programs.caelestia.settings.bar.status = { programs.caelestia.settings.bar.status = {
+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