Compare commits

...
3 Commits
Author SHA1 Message Date
hektor 0776c9a63e fix(backups): improve reliability
check / lint (push) Successful in 19s
2026-10-25 13:46:12 +01:00
hektor 82109a74ff fix(ai-tools): bump 'ccline' 2026-10-25 13:44:08 +01:00
hektor 9ad228fd0e fix(ai-tools): use 'rtk' from 'nixpkgs' 2026-10-25 13:44:08 +01:00
2 changed files with 28 additions and 35 deletions

No files matched your search

+16 -35
View File
@@ -6,52 +6,33 @@
}:
let
cfg = config.ai-tools.claude-code;
rtk-version = "0.18.1";
in
{
config = lib.mkIf cfg.enable {
programs.claude-code.enable = true;
home.packages = with pkgs; [
(stdenv.mkDerivation {
name = "ccline";
src = fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
(rustPlatform.buildRustPackage (finalAttrs: {
pname = "ccometixline";
version = "2.0.1";
src = fetchFromGitHub {
owner = "Haleclipse";
repo = "CCometixLine";
tag = "v${finalAttrs.version}";
hash = "sha256-tzEo+8M86C6EdN31rDVqt8+SCYqeEXRCVFsbtbW41XY=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
cargoHash = "sha256-dTsuyklpaiYqp5Rq1Q7YUBrmQUH42ve2UY+MwUqF7Ek=";
checkFlags = [ "--skip=git::tests::detects_repositories_without_spawning_git" ];
postInstall = "mv $out/bin/ccometixline $out/bin/ccline";
meta = {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
description = "CCometixLine (ccline) - Claude Code statusline tool";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
mainProgram = "ccline";
platforms = lib.platforms.unix;
};
})
(stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
}))
rtk
mcp-nixos
];
};
+12
View File
@@ -21,6 +21,11 @@ in
type = lib.types.listOf lib.types.str;
default = [ "/home" ];
};
inhibitsSleep = lib.mkOption {
type = lib.types.bool;
default = config.host.role != "laptop";
};
};
config = lib.mkIf cfg.enable {
@@ -53,6 +58,7 @@ in
Persistent = true;
};
initialize = true;
inherit (cfg) inhibitsSleep;
extraBackupArgs = [ "--one-file-system" ];
pruneOpts = [
"--keep-daily 7"
@@ -62,5 +68,11 @@ in
];
environmentFile = config.sops.templates."restic/b2-env-${host}".path;
};
systemd.services.restic-backups-home = {
unitConfig = {
RequiresMountsFor = cfg.paths;
};
};
};
}