From 9e2fb19146b6c23bdef3fb290d49763849d93ce0 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 17 Feb 2025 14:03:52 -0500 Subject: [PATCH] feat: add justfile to make nix run commands easier to run --- justfile | 24 ++++++++++++++++++++++++ modules/base/packages/default.nix | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 00000000..68207219 --- /dev/null +++ b/justfile @@ -0,0 +1,24 @@ +default: + @just --list + +docs args: + nix run "$FLAKE"#gen-docs + +genflake: + #!/usr/bin/env bash + # Get changes from inputs/default.nix + nix run "$FLAKE"#genflake "$FLAKE"/flake.nix && + # Evaluate `follows` from new flake.lock + nix run "$FLAKE"#genflake "$FLAKE"/flake.nix && + # Make sure everything is right + nix run "$FLAKE"#genflake "$FLAKE"/flake.nix + + alejandra -q "$FLAKE"/flake.nix + +[positional-arguments] +pin args: + nix run "$FLAKE"#pin-inputs -- "$@" + +[positional-arguments] +update args: + nix run "$FLAKE"#update-sources -- "$@" diff --git a/modules/base/packages/default.nix b/modules/base/packages/default.nix index 4b5241f1..8e0798e9 100644 --- a/modules/base/packages/default.nix +++ b/modules/base/packages/default.nix @@ -48,7 +48,7 @@ in { undollar ; - inherit (pkgs) alejandra; + inherit (pkgs) alejandra just; # Archiving inherit