nixos/configuration.nix

22 lines
605 B
Nix
Raw Normal View History

{ lib, ... }:
2019-02-26 13:44:40 +01:00
with lib;
2019-02-26 13:44:40 +01:00
let
# 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)));
machineConf = machinePath + "/configuration.nix";
machineOpts = machinePath + "/options.nix";
in {
2019-02-26 13:44:40 +01:00
imports = [
machineConf
machineOpts
./config/default.nix
2019-02-26 13:44:40 +01:00
./pkgs/nixpkgs.nix
./pkgs/pkgsets.nix
./services/containers.nix
./services/default.nix
2019-02-26 13:44:40 +01:00
];
}