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
lib = nixpkgs.lib;
configPath = ./machines/${name}.nix;
machineConfig =
if builtins.pathExists configPath then
configPath
else
./hardware/base.nix;
in
lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ config, pkgs, ... }: {
imports = lib.concatLists [
(lib.optional (builtins.pathExists configPath) configPath)
[]
imports = [
machineConfig
];
})
];