Personal Nix setup

Update default options

Changed files
+28 -8
modules
+5 -1
modules/base/gpg.nix
···
cfg = config.modules.gpg;
in {
options.modules.gpg = {
-
enable = mkEnableOption "GnuPG";
+
enable = mkOption {
+
default = true;
+
description = "GnuPG";
+
type = types.bool;
+
};
};
config = mkIf cfg.enable {
+10 -2
modules/nvim/default.nix
···
neovim = pkgs.wrapNeovimUnstable neovimPkg neovimConfig;
in {
options.modules.nvim = {
-
enable = mkEnableOption "Neovim";
-
useCustomConfig = mkEnableOption "Custom Configuration";
+
enable = mkOption {
+
default = true;
+
description = "Neovim";
+
type = types.bool;
+
};
+
useCustomConfig = mkOption {
+
default = cfg.enable;
+
description = "Custom Configuration";
+
type = types.bool;
+
};
};
config = mkIf cfg.enable {
+3 -3
modules/server/caddy.nix
···
}
}
'') cfg.caddy.exposeFolders;
-
in string.concatStringsSep "\n\n" configs;
+
in strings.concatStringsSep "\n\n" configs;
in {
options.modules.server.caddy = {
enable = mkOption {
-
default = cfg.enable;
+
default = false;
example = true;
description = "Whether to enable Caddy.";
type = types.bool;
···
};
};
-
config = mkIf cfg.caddy.enable {
+
config = mkIf (cfg.enable && cfg.caddy.enable) {
services.tailscale = mkIf tailscaleEnabled {
permitCertUid = config.services.caddy.user;
};
+5 -1
modules/server/jellyfin.nix
···
type = types.bool;
};
-
sync = mkEnableOption "Whether to sync files from remotes";
+
sync = mkOption {
+
default = cfg.enable;
+
description = "Whether to sync files from remotes";
+
type = types.bool;
+
};
};
config = mkIf (cfg.enable && cfgRoot.enable) {
+5 -1
modules/server/podman.nix
···
type = types.bool;
};
-
tweakKernel = mkEnableOption "Whether to tweak kernel configuration";
+
tweakKernel = mkOption {
+
default = cfg.enable;
+
description = "Whether to tweak kernel configuration";
+
type = types.bool;
+
};
};
config = mkIf (cfg.enable && cfgRoot.enable) {