justfile with params

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-04 14:49:20 +02:00
parent 12466783f7
commit 2d99617d89
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
2 changed files with 18 additions and 32 deletions

View File

@ -1,36 +1,22 @@
default: nixos default: nova
all: nixos music nonya ai all: nova (nova "music")
home: nova config="nova":
home-manager switch --flake ./. -b $(mktemp -u XXXX) #!/usr/bin/env sh
cfg={{config}}
nixos: if [ "$cfg" != "nova" ]; then
doas nixos-rebuild switch --flake ./. cfg="nova-{{config}}"
fi
doas nixos-rebuild switch --flake ./#"$cfg"
update: update:
nix flake update nix flake update
clean: cleanRoot cleanHome clean:
cleanHome:
nix-collect-garbage --delete-older-than 90d nix-collect-garbage --delete-older-than 90d
cleanRoot:
doas nix-collect-garbage --delete-older-than 90d doas nix-collect-garbage --delete-older-than 90d
news:
home-manager news --flake ./.
music:
doas nixos-rebuild switch --flake ./#music
nonya:
doas nixos-rebuild switch --flake ./#nonya
ai:
doas nixos-rebuild switch --flake ./#ai
installer-iso: installer-iso:
nix shell nixpkgs#nixos-generators --command nixos-generate -f install-iso --flake ./#installer-iso nix shell nixpkgs#nixos-generators --command nixos-generate -f install-iso --flake ./#installer-iso

View File

@ -16,10 +16,10 @@ let
in in
{ {
flake.nixosConfigurations = { flake.nixosConfigurations = {
nixos = novaConfig [ mods.ivand ]; nova = novaConfig [ mods.ivand ];
music = novaConfig (with mods; [ music ivand ]); nova-music = novaConfig (with mods; [ music ivand ]);
nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]); nova-nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]);
ai = novaConfig (with mods; [ ai ivand ]); nova-ai = novaConfig (with mods; [ ai ivand ]);
installer-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); }; installer-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); };
vps = configWithModules { modules = (with mods; [ base shell security vps ]); }; vps = configWithModules { modules = (with mods; [ base shell security vps ]); };
}; };