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,38 +1,24 @@
default: nixos
default: nova
all: nixos music nonya ai
all: nova (nova "music")
home:
home-manager switch --flake ./. -b $(mktemp -u XXXX)
nixos:
doas nixos-rebuild switch --flake ./.
nova config="nova":
#!/usr/bin/env sh
cfg={{config}}
if [ "$cfg" != "nova" ]; then
cfg="nova-{{config}}"
fi
doas nixos-rebuild switch --flake ./#"$cfg"
update:
nix flake update
nix flake update
clean: cleanRoot cleanHome
cleanHome:
nix-collect-garbage --delete-older-than 90d
cleanRoot:
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
clean:
nix-collect-garbage --delete-older-than 90d
doas nix-collect-garbage --delete-older-than 90d
installer-iso:
nix shell nixpkgs#nixos-generators --command nixos-generate -f install-iso --flake ./#installer-iso
vps:
nixos-rebuild switch --flake ./#vps --target-host root@10.0.0.1
nixos-rebuild switch --flake ./#vps --target-host root@10.0.0.1

View File

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