nixos/configuration.nix

25 lines
516 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
# hint: use 'echo -n' so there is no newline char in the hostName file
cfgPath = (builtins.toPath ("/etc/nixos/machines/" + (builtins.readFile /secret/hostName) + "/configuration.nix"));
in rec {
imports = [
cfgPath
# use
# config.machine.confPath
# instead of
./machines/Lilim/Lilim.nix
# ./config/default.nix # same problem as above
./pkgs/nixpkgs.nix
./pkgs/pkgsets.nix
# ./services/default.nix # same problem as above
];
}