Import base.nix by default

This commit is contained in:
Manuel Thalmann 2023-12-01 16:04:29 +01:00
parent 64fa5c60c0
commit cf598aca71

View file

@ -4,15 +4,19 @@
let let
lib = nixpkgs.lib; lib = nixpkgs.lib;
configPath = ./machines/${name}.nix; configPath = ./machines/${name}.nix;
machineConfig =
if builtins.pathExists configPath then
configPath
else
./hardware/base.nix;
in in
lib.nixosSystem { lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
( (
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = lib.concatLists [ imports = [
(lib.optional (builtins.pathExists configPath) configPath) machineConfig
[]
]; ];
}) })
]; ];