From 8f0d0981a11726398904d6fa63c524750a133e9b Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Mon, 5 Apr 2021 23:24:24 -0400 Subject: [PATCH] move host config common modules --- hosts/default.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 140a152..5386262 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,22 +1,29 @@ { unstable, stable2009 }: let + + commonModules = [ + ../. + ({ ... }: { + config = { + sconfig.flakes.enable = true; + sconfig.flakes.rebuildPath = "github:buckley310/nixos-config"; + }; + }) + ]; + mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ + modules = commonModules ++ [ pkgs.nixosModules.notDetected - ({ ... }: { config = { sconfig.flakes.enable = true; }; }) (./. + "/configuration_${name}.nix") - ../. ]; }; mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - ({ modulesPath, ... }: { imports = [ "${modulesPath}/profiles/qemu-guest.nix" ]; }) - ({ ... }: { config = { sconfig.flakes.enable = true; }; }) + modules = commonModules ++ [ + (x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; }) (./. + "/configuration_${name}.nix") - ../. ]; };