mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
project-wide: Working DNS setup + referencing tf.nix from hostConfig
This commit is contained in:
parent
92c12dd991
commit
2eb84e4654
6 changed files with 43 additions and 9 deletions
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
./deploy
|
||||
./tf-glue
|
||||
(sources.tf-nix + "/modules/nixos/secrets.nix")
|
||||
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
|
||||
];
|
||||
|
|
|
|||
30
modules/nixos/tf-glue/default.nix
Normal file
30
modules/nixos/tf-glue/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, ... }: 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue