forked from fediversity/fediversity
Compare commits
1 commit
ac563f905f
...
172939a617
| Author | SHA1 | Date | |
|---|---|---|---|
| 172939a617 |
1 changed files with 19 additions and 28 deletions
|
|
@ -4,19 +4,12 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib) attrNames mkOption genAttrs;
|
||||||
attrNames
|
|
||||||
mapAttrs
|
|
||||||
mkOption
|
|
||||||
genAttrs
|
|
||||||
;
|
|
||||||
inherit (lib.types)
|
inherit (lib.types)
|
||||||
attrsOf
|
attrsOf
|
||||||
attrTag
|
attrTag
|
||||||
deferredModule
|
deferredModule
|
||||||
mergeTypes
|
|
||||||
submoduleWith
|
submoduleWith
|
||||||
submodule
|
|
||||||
;
|
;
|
||||||
runtime-configuration = mkOption {
|
runtime-configuration = mkOption {
|
||||||
description = "The NixOS module of a run-time environment";
|
description = "The NixOS module of a run-time environment";
|
||||||
|
|
@ -28,28 +21,26 @@ let
|
||||||
runtime-environment = attrTag (
|
runtime-environment = attrTag (
|
||||||
mapAttrs
|
mapAttrs
|
||||||
(
|
(
|
||||||
name:
|
name: options:
|
||||||
option@{ type, ... }:
|
mkOption {
|
||||||
mkOption (
|
type = submoduleWith {
|
||||||
option
|
modules = [
|
||||||
// {
|
{
|
||||||
type = mergeTypes type (submodule {
|
options = options // {
|
||||||
options.module = mkOption {
|
module = mkOption {
|
||||||
description = "The NixOS module of the run-time environment";
|
description = "The NixOS module of the run-time environment";
|
||||||
type = deferredModule;
|
type = deferredModule;
|
||||||
default = config.runtime-configurations.${name};
|
default = config.runtime-configurations.${name};
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
)
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nixos = {
|
nixos = { };
|
||||||
description = "A NixOS instance to deploy to.";
|
|
||||||
type = submodule {
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
application = submoduleWith {
|
application = submoduleWith {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue