diff --git a/flake.nix b/flake.nix index a48ede8..ac2839d 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,8 @@ "ildkule" ]; in { + inherit inputs; + nixosConfigurations = let unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; nixosConfig = nixpkgs: name: config: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate diff --git a/justfile b/justfile new file mode 100644 index 0000000..41dca72 --- /dev/null +++ b/justfile @@ -0,0 +1,21 @@ +export GUM_FILTER_HEIGHT := "15" +nom := `if command -v nom >/dev/null; then echo nom; else echo nix; fi` + +@_default: + just "$(gum choose --ordered --header "Pick a recipie..." $(just --summary --unsorted))" + +check: + nix flake check --keep-going + +build-machine machine=`just _a_machine`: + {{nom}} build .#nixosConfigurations.{{ machine }}.config.system.build.toplevel + +@update-inputs: + nix eval .#inputs --apply builtins.attrNames --json \ + | jq '.[]' -r \ + | gum choose --no-limit --height=15 \ + | xargs nix flake update --commit-lock-file + + +_a_machine: + nix eval .#nixosConfigurations --apply builtins.attrNames --json | jq .[] -r | gum filter diff --git a/shell.nix b/shell.nix index 896d4bc..1dc7950 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,9 @@ { pkgs ? import {} }: pkgs.mkShellNoCC { packages = with pkgs; [ + justfile + jq + gum sops gnupg statix