Improved justfile script env caching

This commit is contained in:
2026-04-07 13:05:41 +01:00
parent c4d74f74b8
commit 2ce738fc0e
7 changed files with 19 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
use flake
+1
View File
@@ -1 +1,2 @@
nix.conf
.direnv
+11
View File
@@ -56,6 +56,17 @@
avatar = "/var/lib/AccountsService/icons/cianh";
};
in {
# A temporary devshell for running system management functions
devShells."x86_64-linux".default = let
pkgs = import nixpkgs {system = "x86_64-linux";};
in
pkgs.mkShell {
packages = [
pkgs.babashka
(pkgs.python3.withPackages (ps: with ps; [typer rich]))
];
};
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
+3 -3
View File
@@ -99,12 +99,12 @@ cleanup days="":
# Open the editor (nvim, yazi, or heh) for a target
edit target:
@scripts/edit.py "{{target}}"
@direnv exec . scripts/edit.py "{{target}}"
# Edit packages.nix for a specific system/user (run 'just packages help' for flags)
packages *flags:
@scripts/packages.bb {{flags}}
@direnv exec . scripts/packages.bb {{flags}}
# Bootstrap a fresh system from the repo
bootstrap:
@scripts/bootstrap.py
@direnv exec . scripts/bootstrap.py
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages(ps: with ps; [ typer rich ])"
#!/usr/bin/env python3
import os
import sys
import subprocess
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages(ps: with ps; [ typer rich ])"
#!/usr/bin/env python3
import typer
import subprocess
from pathlib import Path
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bb -p babashka
#!/usr/bin/env bb
(require '[babashka.cli :as cli]
'[babashka.process :refer [shell]]