29 lines
718 B
Nix
29 lines
718 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
substituteDirectory = args:
|
|
pkgs.stdenvNoCC.mkDerivation ({
|
|
name = if args ? name then args.name else baseNameOf (toString args.src);
|
|
builder = ./substitute-dir.sh;
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
} // args);
|
|
in {
|
|
environment.etc = {
|
|
|
|
"syndicate/boot".source = substituteDirectory {
|
|
src = ./boot;
|
|
getty = "${pkgs.busybox}/bin/busybox getty";
|
|
inherit (config.services.getty) loginProgram;
|
|
};
|
|
|
|
"syndicate/core".source = substituteDirectory {
|
|
src = ./core;
|
|
inherit (pkgs) mdevd;
|
|
hostnameOneShot =
|
|
"${pkgs.busybox}/bin/busybox hostname ${config.networking.hostName}";
|
|
};
|
|
|
|
};
|
|
}
|