From 04c00b9877c2d1e56ab8cb8e7a1cf7bac892b559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sun, 18 Apr 2021 02:58:49 +0100 Subject: [PATCH] Fix NixOS profile imports --- configuration/hardware-configuration.nix | 4 ++-- flake.nix | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/configuration/hardware-configuration.nix b/configuration/hardware-configuration.nix index 6865858..2a33a67 100644 --- a/configuration/hardware-configuration.nix +++ b/configuration/hardware-configuration.nix @@ -1,11 +1,11 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = - [ + [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot.initrd.availableKernelModules = [ "virtio_pci" "ahci" "sd_mod" ]; diff --git a/flake.nix b/flake.nix index 5fad4b8..39f32f8 100644 --- a/flake.nix +++ b/flake.nix @@ -39,13 +39,15 @@ system = "x86_64-linux"; modules = [ - ({ ... }: { nixpkgs.overlays = overlays; }) + ({ modulesPath, ... }: { + imports = [ (modulesPath + "/profiles/headless.nix") ]; + nixpkgs.overlays = overlays; + }) (import ./modules) (import ./configuration) (import ./configuration/linode.nix) (import ./configuration/hardware-configuration.nix) - nixpkgs.modules.headless ]; }; @@ -53,7 +55,10 @@ system = "x86_64-linux"; modules = [ - ({ ... }: { nixpkgs.overlays = overlays; }) + ({ modulesPath, ... }: { + imports = [ (modulesPath + "/profiles/headless.nix") ]; + nixpkgs.overlays = overlays; + }) (import ./modules) (import ./configuration)