mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2026-05-27 14:42:02 +01:00
Improved justfile script env caching
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
nix.conf
|
nix.conf
|
||||||
|
.direnv
|
||||||
|
|||||||
@@ -56,6 +56,17 @@
|
|||||||
avatar = "/var/lib/AccountsService/icons/cianh";
|
avatar = "/var/lib/AccountsService/icons/cianh";
|
||||||
};
|
};
|
||||||
in {
|
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
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|||||||
@@ -99,12 +99,12 @@ cleanup days="":
|
|||||||
|
|
||||||
# Open the editor (nvim, yazi, or heh) for a target
|
# Open the editor (nvim, yazi, or heh) for a target
|
||||||
edit 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)
|
# Edit packages.nix for a specific system/user (run 'just packages help' for flags)
|
||||||
packages *flags:
|
packages *flags:
|
||||||
@scripts/packages.bb {{flags}}
|
@direnv exec . scripts/packages.bb {{flags}}
|
||||||
|
|
||||||
# Bootstrap a fresh system from the repo
|
# Bootstrap a fresh system from the repo
|
||||||
bootstrap:
|
bootstrap:
|
||||||
@scripts/bootstrap.py
|
@direnv exec . scripts/bootstrap.py
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env python3
|
||||||
#!nix-shell -i python3 -p "python3.withPackages(ps: with ps; [ typer rich ])"
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env python3
|
||||||
#!nix-shell -i python3 -p "python3.withPackages(ps: with ps; [ typer rich ])"
|
|
||||||
import typer
|
import typer
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env bb
|
||||||
#!nix-shell -i bb -p babashka
|
|
||||||
|
|
||||||
(require '[babashka.cli :as cli]
|
(require '[babashka.cli :as cli]
|
||||||
'[babashka.process :refer [shell]]
|
'[babashka.process :refer [shell]]
|
||||||
|
|||||||
Reference in New Issue
Block a user