From b74ed6a17b92ed151433bb25122d39eeb8ae6755 Mon Sep 17 00:00:00 2001 From: mdebray Date: Fri, 12 May 2023 11:04:05 +0000 Subject: [PATCH] web-01: refactor disko import --- machines/web-01/configuration.nix | 5 ----- machines/web-01/hardware-configuration.nix | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/machines/web-01/configuration.nix b/machines/web-01/configuration.nix index 7c14bb8..1187078 100644 --- a/machines/web-01/configuration.nix +++ b/machines/web-01/configuration.nix @@ -3,15 +3,10 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, lib, ... }: -let - sources = import ../../npins; -in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - (sources.disko + "/module.nix") - ./disko.nix ]; # Use the systemd-boot EFI boot loader. diff --git a/machines/web-01/hardware-configuration.nix b/machines/web-01/hardware-configuration.nix index 33543ed..0cff5b2 100644 --- a/machines/web-01/hardware-configuration.nix +++ b/machines/web-01/hardware-configuration.nix @@ -4,8 +4,10 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + (let sources = import ../../npins; in sources.disko + "/module.nix") + ./disko.nix ]; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "virtio_pci" "ahci" "virtio_blk" ];