Add justfile

Update lock
Add treefmt
This commit is contained in:
2026-03-27 18:58:06 +01:00
parent 23dc86ce8a
commit b917a895f0
4 changed files with 51 additions and 27 deletions

21
Justfile Normal file
View File

@@ -0,0 +1,21 @@
update:
#!/usr/bin/env bash
echo "Starting update scan..."
for dir in */; do
dirname=${dir%/}
if [ -f "$dir/flake.nix" ]; then
echo "-------------------------------------------"
echo "Updating flake in: $dirname"
(cd "$dir" && nix flake update)
else
echo "Skipping $dirname (no flake.nix found)"
fi
done
echo "-------------------------------------------"
echo "Update complete."
update-lang lang:
cd {{lang}} && nix flake update
format:
treefmt .

6
cpp/flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1771932323,
"narHash": "sha256-3PadsTzuMJT/x0KmiD/Me1GG6rW8kaHoWVduSs0ue7o=",
"lastModified": 1774612448,
"narHash": "sha256-+uVDNwxihd82I6aZTgNvIXqFyLcfUBkg/Y0A8UBgycg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "89bb5c5da7a857869cc88ef9b856bffdff8af264",
"rev": "b55b0e0c856ac73c7f507336780f97aa7a9746e2",
"type": "github"
},
"original": {

View File

@@ -2,13 +2,13 @@
description = "Central C++ Dev Shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
outputs =
{ self, nixpkgs }:
let
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
in {
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gcc

3
treefmt.toml Normal file
View File

@@ -0,0 +1,3 @@
[formatter.alejandra]
command = "alejandra"
includes = ["*.nix"]