nixos/configuration.nix

20 lines
498 B
Nix

{ config, lib, pkgs, ... }:
with lib;
# hint: use 'echo -n' so there is no newline char in the hostName file
let
machinePath = (builtins.toPath ("/etc/nixos/machines/" + (builtins.readFile /secret/hostName)));
machineConf = machinePath + "/configuration.nix";
machineOpts = machinePath + "/options.nix";
in {
imports = [
machineConf
machineOpts
./config/default.nix
./pkgs/nixpkgs.nix
./pkgs/pkgsets.nix
./services/containers.nix
./services/default.nix
];
}