refactor(modules): make sure nothing is added without setting enable

This commit is contained in:
matt1432 2025-01-04 19:02:30 -05:00
parent 4a2ad39114
commit 49dc072b81
56 changed files with 684 additions and 506 deletions

View file

@ -92,7 +92,7 @@ self: {
}/Caddyfile";
in {
options.services.caddy.virtualHosts = mkOption {
type = types.attrsOf (types.submodule (import ./vhost-options.nix {inherit cfg;}));
type = types.attrsOf (types.submodule (import ./vhost-options.nix cfg));
};
config = mkIf cfg.enable {

View file

@ -1,4 +1,4 @@
{cfg}: {
cfg: {
lib,
name,
...

View file

@ -1,4 +1,4 @@
{cfg}: {
cfg: {
lib,
name,
...
@ -22,7 +22,7 @@ in {
};
subDirectories = mkOption {
type = types.attrsOf (types.submodule (import ./sub-dir-options.nix {inherit cfg;}));
type = types.attrsOf (types.submodule (import ./sub-dir-options.nix cfg));
default = {};
example = literalExpression ''
{

View file

@ -1,4 +1,4 @@
{cfg}: {lib, ...}: let
cfg: {lib, ...}: let
inherit (lib) literalExpression mkOption types;
in {
options = {
@ -12,7 +12,7 @@ in {
};
subDomains = mkOption {
type = types.attrsOf (types.submodule (import ./sub-domain-options.nix {inherit cfg;}));
type = types.attrsOf (types.submodule (import ./sub-domain-options.nix cfg));
default = {};
example = literalExpression ''
{
@ -30,7 +30,7 @@ in {
};
subDirectories = mkOption {
type = types.attrsOf (types.submodule (import ./sub-dir-options.nix {inherit cfg;}));
type = types.attrsOf (types.submodule (import ./sub-dir-options.nix cfg));
default = {};
example = literalExpression ''
{