diff options
author | Daniel Nagy | 2024-09-20 17:15:00 +0200 |
---|---|---|
committer | Emery Hemingway | 2024-09-21 06:30:54 +0000 |
commit | cb7635612e5fe9b98eba671f85d4124d6d6feb16 (patch) | |
tree | b995c41ef3c1ca91ce65707e6a493debde4a7928 | |
parent | 9dbfe42052c60bd8e33003f6269f57f877e24bd6 (diff) |
nixos/yggdrasil: remove `with lib;`
-rw-r--r-- | nixos/modules/services/networking/yggdrasil.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nixos/modules/services/networking/yggdrasil.nix b/nixos/modules/services/networking/yggdrasil.nix index c1c952adac39..3953c81ef214 100644 --- a/nixos/modules/services/networking/yggdrasil.nix +++ b/nixos/modules/services/networking/yggdrasil.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: -with lib; + let + inherit (lib) mkIf mkOption; + inherit (lib.types) nullOr path bool listOf str; keysPath = "/var/lib/yggdrasil/keys.json"; cfg = config.services.yggdrasil; @@ -11,14 +13,14 @@ let in { imports = [ - (mkRenamedOptionModule + (lib.mkRenamedOptionModule [ "services" "yggdrasil" "config" ] [ "services" "yggdrasil" "settings" ]) ]; - options = with types; { + options = { services.yggdrasil = { - enable = mkEnableOption "the yggdrasil system service"; + enable = lib.mkEnableOption "the yggdrasil system service"; settings = mkOption { type = format.type; @@ -73,7 +75,7 @@ in }; group = mkOption { - type = types.nullOr types.str; + type = nullOr str; default = null; example = "wheel"; description = "Group to grant access to the Yggdrasil control socket. If `null`, only root can access the socket."; @@ -108,9 +110,9 @@ in ''; }; - package = mkPackageOption pkgs "yggdrasil" { }; + package = lib.mkPackageOption pkgs "yggdrasil" { }; - persistentKeys = mkEnableOption '' + persistentKeys = lib.mkEnableOption '' persistent keys. If enabled then keys will be generated once and Yggdrasil will retain the same IPv6 address when the service is restarted. Keys are stored at ${keysPath} |