From 5028503d6d2a21d9e4cb3100a2f9b2795cb5d4bd Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 23 Aug 2024 01:03:50 +0100 Subject: basic kiosk module --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..da3a9ce --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +SERVERS := g1-bigscreen + +default: servers +all: servers + +.PHONY: default all infra servers local dry-local + +# Servers +servers: $(SERVERS) +$(SERVERS): %: + rsync --delete -ravP --filter=':- .gitignore' --exclude='.git' . $@:/etc/nixos + rsync --delete -ravP state $@:/etc/nixos/ + ssh -t $@ "tmux new-session -s rebuild 'cd /etc/nixos && rm -rf .git && nixos-rebuild switch --flake .; echo \"--- done ---\"; read;'" + +$(addprefix dry-,$(SERVERS)): %: + rsync --delete -ravP --filter=':- .gitignore' --exclude='.git' . ${subst dry-,,$@}:/etc/nixos/dry + rsync --delete -ravP state ${subst dry-,,$@}:/etc/nixos/dry + ssh -t ${subst dry-,,$@} "tmux new-session -s rebuild 'cd /etc/nixos/dry && rm -rf .git && nixos-rebuild dry-activate --flake .; echo \"--- done ---\"; read;'" + +$(addprefix vm-,$(SERVERS)): %: + nix build .#nixosConfigurations.${subst vm-,,$@}.config.system.build.vm + ./result/bin/run-${subst vm-,,$@}-vm + +$(addprefix build-,$(SERVERS)): %: + nix build .#nixosConfigurations.${subst build-,,$@}.config.system.build.toplevel +$(addprefix tree-,$(SERVERS)): %: + nix build .#nixosConfigurations.${subst tree-,,$@}.config.system.build.toplevel + nix-tree ./result -- cgit v1.2.3