about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--justfile10
-rw-r--r--nix/machines/vm-aarch64/default.nix7
-rw-r--r--nix/machines/vm-hetzner/default.nix2
-rw-r--r--nix/machines/vm-shared.nix4
-rw-r--r--nix/machines/vm-synology/default.nix4
5 files changed, 19 insertions, 8 deletions
diff --git a/justfile b/justfile
index 992a107..6dea92f 100644
--- a/justfile
+++ b/justfile
@@ -5,17 +5,19 @@ nixaddr := ""
 
 hostname := lowercase(`hostname -s`)
 
-# update dependencies
 [group('nix')]
+[doc('update dependencies')]
 update-deps:
 	nix flake update --commit-lock-file
 
-# a simple check to ensure the nix configuration is OK
+[group('nix')]
+[doc('a simple check to ensure the nix configuration is OK')]
 test-nix:
 	nix flake check
 	nix develop -c echo OK
 
-# run various formatting tools
+[group('nix')]
+[doc('run various formatting tools')]
 fmt:
 	nix fmt
 
@@ -39,6 +41,7 @@ build:
 switch:
 	nixos-rebuild switch --flake .#{{hostname}}
 
+[group('vm')]
 vm-bootstrap:
 	#!/usr/bin/env bash
 	set -euxo pipefail
@@ -65,6 +68,7 @@ vm-bootstrap:
 		nixos-install --no-root-passwd && reboot; \
 	"
 
+[group('vm')]
 vm-copy:
 	#!/usr/bin/env bash
 	rsync -av -e 'ssh {{SSH_OPTIONS}}' \
diff --git a/nix/machines/vm-aarch64/default.nix b/nix/machines/vm-aarch64/default.nix
index 302a80c..b1444cc 100644
--- a/nix/machines/vm-aarch64/default.nix
+++ b/nix/machines/vm-aarch64/default.nix
@@ -1,5 +1,12 @@
 { ... }: {
   imports = [ ./hardware.nix ../vm-shared.nix ];
 
+  # Use the systemd-boot EFI boot loader.
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+
   networking.hostName = "vm-aarch64";
+
+  # enable the guest agent
+  services.qemuGuest.enable = true;
 }
diff --git a/nix/machines/vm-hetzner/default.nix b/nix/machines/vm-hetzner/default.nix
index a268779..889b00d 100644
--- a/nix/machines/vm-hetzner/default.nix
+++ b/nix/machines/vm-hetzner/default.nix
@@ -1,5 +1,5 @@
 { pkgs, lib, ... }: {
-  imports = [ ./hardware/vm-hetzner.nix ./vm-shared.nix ];
+  imports = [ ./hardware.nix ../vm-shared.nix ];
 
   boot.tmp.cleanOnBoot = true;
   zramSwap.enable = true;
diff --git a/nix/machines/vm-shared.nix b/nix/machines/vm-shared.nix
index 0a1b4b2..01dbaac 100644
--- a/nix/machines/vm-shared.nix
+++ b/nix/machines/vm-shared.nix
@@ -9,10 +9,6 @@
     };
   };
 
-  # Use the systemd-boot EFI boot loader.
-  boot.loader.systemd-boot.enable = true;
-  boot.loader.efi.canTouchEfiVariables = true;
-
   time.timeZone = "America/Los_Angeles";
 
   # Don't require password for sudo
diff --git a/nix/machines/vm-synology/default.nix b/nix/machines/vm-synology/default.nix
index 928ab86..8af114b 100644
--- a/nix/machines/vm-synology/default.nix
+++ b/nix/machines/vm-synology/default.nix
@@ -1,5 +1,9 @@
 { ... }: {
   imports = [ ./hardware.nix ../vm-shared.nix ];
 
+  # Use the systemd-boot EFI boot loader.
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+
   networking.hostName = "vm-synology";
 }