mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Using ./home.nix and ./nixos.nix as entrypoints for hosts. Using hardware profiles. Using new entrypoints (profiles/base/profiles.nix + profiles/base/home.nix). New modules (for DNS handling, for themeing, ...). Split up deploy-tf.nix into several modules. Renamed common profile to base profile.
39 lines
701 B
Nix
39 lines
701 B
Nix
{ config, lib, ... }:
|
|
|
|
/*
|
|
This module:
|
|
* Provides in-scope TF config for home-manager.
|
|
*/
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.deploy.tf;
|
|
unmergedValues = types.mkOptionType {
|
|
name = "unmergedValues";
|
|
merge = loc: defs: map (def: def.value) defs;
|
|
};
|
|
in
|
|
{
|
|
|
|
options.deploy.tf = mkOption {
|
|
type = types.submodule {
|
|
freeformType = types.attrsOf unmergedValues;
|
|
|
|
options = {
|
|
attrs = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
};
|
|
out.set = mkOption { type = types.unspecified; };
|
|
};
|
|
};
|
|
|
|
};
|
|
config = {
|
|
deploy.tf = {
|
|
attrs = [ "out" "attrs" ];
|
|
out.set = removeAttrs cfg cfg.attrs;
|
|
};
|
|
};
|
|
}
|