From bdfc7b6a8d836977edcb396ef758a3b22a18dc41 Mon Sep 17 00:00:00 2001 From: mschwaig Date: Fri, 1 Jan 2021 07:50:30 +0100 Subject: [PATCH] avoid using NIX_PATH in resulting hardware-configuration.nix (#65) This makes the resulting hardware-configuration.nix usable from a system that is a nix flake without having to replace that usage of NIX_PATH first. --- nixos-infect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos-infect b/nixos-infect index 4d90c10..d109df9 100755 --- a/nixos-infect +++ b/nixos-infect @@ -38,9 +38,9 @@ makeConf() { EOF # If you rerun this later, be sure to prune the filesSystems attr cat > /etc/nixos/hardware-configuration.nix << EOF -{ ... }: +{ modulesPath, ... }: { - imports = [ ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot.loader.grub.device = "$grubdev"; fileSystems."/" = { device = "$rootfsdev"; fsType = "ext4"; }; }