2022-11-22 02:33:47 +00:00
|
|
|
# trampoline from flake.nix into the specific host definition, while doing a tiny bit of common setup
|
2022-10-24 13:06:11 +00:00
|
|
|
|
2023-01-19 23:23:41 +00:00
|
|
|
# args from flake-level `import`
|
2023-01-11 08:56:06 +00:00
|
|
|
{ hostName, localSystem }:
|
2023-01-19 23:23:41 +00:00
|
|
|
|
|
|
|
# module args
|
2023-01-19 23:55:56 +00:00
|
|
|
{ config, ... }:
|
2023-01-11 08:56:06 +00:00
|
|
|
|
|
|
|
{
|
2022-10-24 13:06:11 +00:00
|
|
|
imports = [
|
2023-01-19 23:23:41 +00:00
|
|
|
./by-name/${hostName}
|
2022-11-22 02:52:07 +00:00
|
|
|
./common
|
2023-01-19 23:23:41 +00:00
|
|
|
./modules
|
2022-10-24 13:06:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
networking.hostName = hostName;
|
2023-01-11 08:56:06 +00:00
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(next: prev: {
|
|
|
|
# for local != target we by default just emulate the target while building.
|
|
|
|
# provide a `pkgs.cross.<pkg>` alias that consumers can use instead of `pkgs.<foo>`
|
|
|
|
# to explicitly opt into non-emulated cross compilation for any specific package.
|
|
|
|
# this is most beneficial for large packages with few pre-requisites -- like Linux.
|
2023-02-05 19:35:34 +00:00
|
|
|
cross = prev.crossFrom."${localSystem}";
|
2023-01-11 08:56:06 +00:00
|
|
|
})
|
|
|
|
];
|
2022-10-24 13:06:11 +00:00
|
|
|
}
|