summaryrefslogtreecommitdiff
path: root/hosts/utm
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-05-04 04:15:15 -0700
committerFuwn <[email protected]>2025-05-04 04:15:15 -0700
commit876f417afe6dc9d6b165f10b23d69ab433094509 (patch)
treeb91c3eabde80be7e29f2c970f0f51f49b484bfac /hosts/utm
parentNara: Add Motrix cask (diff)
downloadnixos-config-876f417afe6dc9d6b165f10b23d69ab433094509.tar.xz
nixos-config-876f417afe6dc9d6b165f10b23d69ab433094509.zip
UTM: Add UTM build host
Diffstat (limited to 'hosts/utm')
-rw-r--r--hosts/utm/configuration.nix48
-rw-r--r--hosts/utm/default.nix27
-rw-r--r--hosts/utm/hardware-configuration.nix21
3 files changed, 96 insertions, 0 deletions
diff --git a/hosts/utm/configuration.nix b/hosts/utm/configuration.nix
new file mode 100644
index 0000000..b355e05
--- /dev/null
+++ b/hosts/utm/configuration.nix
@@ -0,0 +1,48 @@
+{
+ modulesPath,
+ lib,
+ pkgs,
+ ...
+}:
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ disko.devices.disk.disk1.device = "/dev/vda";
+
+ boot.loader.grub = {
+ efiSupport = true;
+ efiInstallAsRemovable = true;
+ };
+
+ environment.systemPackages =
+ with pkgs;
+ map lib.lowPrio [
+ curl
+ gitMinimal
+ ];
+
+ virtualisation.rosetta.enable = true;
+ networking.hostName = "utm-vm-nixos-builder";
+
+ services = {
+ openssh.enable = true;
+
+ avahi = {
+ enable = true;
+ nssmdns4 = true;
+ openFirewall = true;
+
+ publish = {
+ enable = true;
+ userServices = true;
+ addresses = true;
+ };
+ };
+ };
+
+ users.users.root.openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOeo/QyAKaDxiRah+Drf91P7jvw3uB3S28GlzrwHuE8k"
+ ];
+
+ system.stateVersion = "24.11";
+}
diff --git a/hosts/utm/default.nix b/hosts/utm/default.nix
new file mode 100644
index 0000000..8d6aaaa
--- /dev/null
+++ b/hosts/utm/default.nix
@@ -0,0 +1,27 @@
+{
+ inputs,
+ kansaiPkgs,
+ self,
+ lib,
+ ...
+}:
+let
+ pkgs =
+ (kansaiPkgs {
+ nixpkgsExtraConfig = {
+ allowUnsupportedSystem = true;
+ };
+ })."aarch64-linux";
+in
+{
+ flake.nixosConfigurations.utm = lib.nixosSystem {
+ inherit pkgs;
+
+ modules = with inputs; [
+ ./configuration.nix
+ ./hardware-configuration.nix
+ "${self}/disks/utm.nix"
+ disko.nixosModules.disko
+ ];
+ };
+}
diff --git a/hosts/utm/hardware-configuration.nix b/hosts/utm/hardware-configuration.nix
new file mode 100644
index 0000000..d34d94e
--- /dev/null
+++ b/hosts/utm/hardware-configuration.nix
@@ -0,0 +1,21 @@
+{ lib, ... }:
+{
+ boot = {
+ initrd = {
+ availableKernelModules = [
+ "virtio_pci"
+ "xhci_pci"
+ "usb_storage"
+ "usbhid"
+ ];
+
+ kernelModules = [ ];
+ };
+
+ kernelModules = [ ];
+ extraModulePackages = [ ];
+ };
+
+ networking.useDHCP = lib.mkDefault true;
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+}