2019-05-09 18:28:40 +02:00
|
|
|
{ lib, ... }:
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-03-17 11:43:14 +01:00
|
|
|
with lib;
|
|
|
|
|
2019-02-26 13:44:40 +01:00
|
|
|
let
|
2019-09-07 05:22:25 +02:00
|
|
|
# hostName can be set with -I hostName=$HOSTNAME, defaults to the contents of /secret/hostName
|
|
|
|
hostName = (findFirst (elem: elem.prefix == "hostName") { path = (fileContents /secret/hostName); } builtins.nixPath).path;
|
|
|
|
machinePath = (builtins.toPath ( ./machines + ("/" + hostName)));
|
2019-03-23 02:50:48 +01:00
|
|
|
machineConf = machinePath + "/configuration.nix";
|
|
|
|
machineOpts = machinePath + "/options.nix";
|
|
|
|
in {
|
2019-02-26 13:44:40 +01:00
|
|
|
imports = [
|
2019-03-23 02:50:48 +01:00
|
|
|
machineConf
|
|
|
|
machineOpts
|
|
|
|
./config/default.nix
|
2019-02-26 13:44:40 +01:00
|
|
|
./pkgs/nixpkgs.nix
|
|
|
|
./pkgs/pkgsets.nix
|
2019-03-23 02:50:48 +01:00
|
|
|
./services/containers.nix
|
|
|
|
./services/default.nix
|
2019-02-26 13:44:40 +01:00
|
|
|
];
|
|
|
|
}
|