diff options
| author | Fuwn <[email protected]> | 2024-10-28 07:20:06 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-28 07:20:06 -0700 |
| commit | 66aee595a1c230745614644261273615cbb53d5a (patch) | |
| tree | 5c22fb41ea498468bdafd91b186928992440c1f7 /modules | |
| parent | server: add harmonia (diff) | |
| download | nixos-config-66aee595a1c230745614644261273615cbb53d5a.tar.xz nixos-config-66aee595a1c230745614644261273615cbb53d5a.zip | |
core: allow mosh as optional
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/core/access/mosh.nix | 9 | ||||
| -rw-r--r-- | modules/options/default.nix | 18 |
2 files changed, 20 insertions, 7 deletions
diff --git a/modules/core/access/mosh.nix b/modules/core/access/mosh.nix index c9af5bf..7d6d7e9 100644 --- a/modules/core/access/mosh.nix +++ b/modules/core/access/mosh.nix @@ -1,6 +1,9 @@ +{ config, lib, ... }: { - programs.mosh = { - enable = true; - openFirewall = false; + config = lib.mkIf config.modules.mosh.enable { + programs.mosh = { + enable = true; + openFirewall = false; + }; }; } diff --git a/modules/options/default.nix b/modules/options/default.nix index 4401826..39276d1 100644 --- a/modules/options/default.nix +++ b/modules/options/default.nix @@ -5,8 +5,18 @@ ./nix.nix ]; - options.modules.primaryUser = lib.options.mkOption { - default = null; - type = lib.types.str; - }; + options.modules = + with lib.options; + with lib.types; + { + primaryUser = mkOption { + default = null; + type = types.str; + }; + + mosh.enable = mkOption { + default = false; + type = types.bool; + }; + }; } |