From 0f3442ab8ca1c711a2f3b6fae160913aafe59136 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 1 Dec 2023 15:18:19 +0100 Subject: [PATCH] Include machine specific config if existent --- lib/system.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/system.nix b/lib/system.nix index 04f70a9..37ddad5 100644 --- a/lib/system.nix +++ b/lib/system.nix @@ -3,14 +3,16 @@ { dualBoot ? false } : let lib = nixpkgs.lib; + configPath = ./machines/${name}.nix; in lib.nixosSystem { system = "x86_64-linux"; modules = [ ( { config, pkgs, ... }: { - imports = [ - ../hardware-configuration.nix + imports = lib.concatLists [ + (lib.optional (builtins.pathExists configPath) configPath) + [] ]; }) ];