Import base.nix
by default
This commit is contained in:
parent
64fa5c60c0
commit
cf598aca71
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||||
[]
|
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue