Sebastian Walz 860d31cee1
Tohu vaBohu
2023-04-21 00:22:52 +02:00

43 lines
972 B
Nix

{ core, systems, ... }:
let
inherit(core) debug string time type version;
inherit(systems) SystemConfiguration;
config
= stateVersion:
{ dateTime, host, ... }:
{
boot.loader.grub
= {
configurationName = "${host.network.hostName}-${version.deriveVersion dateTime}";
};
system
= {
inherit stateVersion;
};
};
collect
= { source, version, ... }:
[
(
SystemConfiguration
{
configuration = config version;
inherit source;
}
)
];
prepare
= environment:
host:
version:
{
version = string.expect version;
source = host.source "version";
};
in
{
inherit collect prepare;
}