simplify enable opts, and fix security.nix
This commit is contained in:
parent
06b42a1aa6
commit
5d5cd7979c
10 changed files with 34 additions and 40 deletions
|
@ -11,10 +11,7 @@ let
|
|||
};
|
||||
in {
|
||||
options.modules.services.forgejo = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable forgejo, a lightweight git server";
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "git.reidlab.online";
|
||||
|
|
|
@ -5,10 +5,7 @@ let
|
|||
cfg = config.modules.services.metrics;
|
||||
in {
|
||||
options.modules.services.metrics = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable grafana with loki, prometheus, and promtail";
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "grafana.reidlab.online";
|
||||
|
|
|
@ -5,10 +5,7 @@ let
|
|||
cfg = config.modules.services.mosh;
|
||||
in {
|
||||
options.modules.services.mosh = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable mosh, the mobile SSH shell";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -5,10 +5,7 @@ let
|
|||
cfg = config.modules.services.nginx-config;
|
||||
in {
|
||||
options.modules.services.nginx-config = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable nginx, a high performance web server along with default configurations";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
|
|
|
@ -5,10 +5,7 @@ let
|
|||
cfg = config.modules.services.postgres;
|
||||
in {
|
||||
options.modules.services.postgres = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable postgres, the database industry standard";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -5,10 +5,7 @@ let
|
|||
cfg = config.modules.services.redis;
|
||||
in {
|
||||
options.modules.services.redis = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
enable = mkEnableOption "enable redis, a speedy cache database";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -5,11 +5,7 @@ let
|
|||
cfg = config.modules.services.ssh;
|
||||
in {
|
||||
options.modules.services.ssh = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Provide system SSH support though OpenSSH.";
|
||||
};
|
||||
enable = mkEnableOption "enable openssh, a server for remote shell access";
|
||||
|
||||
requirePassword = mkOption {
|
||||
type = types.bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue