From 7b2fe81cc04e97c322664036c090b355e3e98765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Mon, 9 Jun 2025 00:19:42 +0300 Subject: [PATCH] Add ci host config --- hosts/ci/configuration.nix | 8 ++++++++ hosts/ci/state.nix | 25 +++++++++++++++++++++++++ shared/disko/basic-ext4.nix | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 hosts/ci/configuration.nix create mode 100644 hosts/ci/state.nix diff --git a/hosts/ci/configuration.nix b/hosts/ci/configuration.nix new file mode 100644 index 0000000..e0f9428 --- /dev/null +++ b/hosts/ci/configuration.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + imports = [ + ../../shared/base.nix + ../../shared/hardware/vm.nix + ../../shared/disko/basic-ext4.nix + ]; +} diff --git a/hosts/ci/state.nix b/hosts/ci/state.nix new file mode 100644 index 0000000..ef43817 --- /dev/null +++ b/hosts/ci/state.nix @@ -0,0 +1,25 @@ +{ lib, modulesPath, ... }: +{ + system.stateVersion = "25.05"; + + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ + "uhci_hcd" + "ehci_pci" + "ahci" + "virtio_pci" + "virtio_scsi" + "sd_mod" + "sr_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/shared/disko/basic-ext4.nix b/shared/disko/basic-ext4.nix index 3b23e20..23efe51 100644 --- a/shared/disko/basic-ext4.nix +++ b/shared/disko/basic-ext4.nix @@ -1,7 +1,7 @@ { disko.devices = { disk = { - main-disk = { + main = { device = "/dev/sda"; type = "disk"; content = {