From 82276bd493e4369d57463496c730dd40ca66b3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Thu, 5 Jun 2025 00:33:25 +0300 Subject: [PATCH] Migrate cert-store to flakes --- hosts/cert-store/configuration.nix | 5 +--- hosts/cert-store/state.nix | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 hosts/cert-store/state.nix diff --git a/hosts/cert-store/configuration.nix b/hosts/cert-store/configuration.nix index a9051ef..ea28884 100644 --- a/hosts/cert-store/configuration.nix +++ b/hosts/cert-store/configuration.nix @@ -1,11 +1,8 @@ { ... }: { - networking.hostName = "cert-store"; - imports = [ ../../shared/base.nix + ../../shared/hardware/vm.nix ../../servers/acme-cert-store.nix ]; - - services.qemuGuest.enable = true; } diff --git a/hosts/cert-store/state.nix b/hosts/cert-store/state.nix new file mode 100644 index 0000000..a5a8d61 --- /dev/null +++ b/hosts/cert-store/state.nix @@ -0,0 +1,39 @@ +{ lib, modulesPath, ... }: +{ + system.stateVersion = "24.11"; + + 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 = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/301cf8bf-93f0-4ba6-b14f-b7be94b075a0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/9E16-9A5D"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}