mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2026-04-29 19:01:45 +01:00
Improved justfile script env caching
This commit is contained in:
@@ -1 +1,2 @@
|
||||
nix.conf
|
||||
.direnv
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user