about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFelix Buehler2024-08-24 22:05:50 +0200
committerFelix Buehler2024-08-30 23:00:54 +0200
commitb48bee9985f8d39e690a2d6fbfec0d03947ab9a0 (patch)
tree5b049c619fd5bbed5bf5942ff7d7c887fecd93f8 /nixos
parent42bdc30f19a40cf41fba5ad4a6711a28e5cfd062 (diff)
nixos/nix.sshServe: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/nix-ssh-serve.nix20
1 files changed, 9 insertions, 11 deletions
diff --git a/nixos/modules/services/misc/nix-ssh-serve.nix b/nixos/modules/services/misc/nix-ssh-serve.nix
index f60736c688d9..b0ccf495c7eb 100644
--- a/nixos/modules/services/misc/nix-ssh-serve.nix
+++ b/nixos/modules/services/misc/nix-ssh-serve.nix
@@ -1,6 +1,4 @@
 { config, lib, pkgs, ... }:
-
-with lib;
 let cfg = config.nix.sshServe;
     command =
       if cfg.protocol == "ssh"
@@ -11,27 +9,27 @@ in {
 
     nix.sshServe = {
 
-      enable = mkOption {
-        type = types.bool;
+      enable = lib.mkOption {
+        type = lib.types.bool;
         default = false;
         description = "Whether to enable serving the Nix store as a remote store via SSH.";
       };
 
-      write = mkOption {
-        type = types.bool;
+      write = lib.mkOption {
+        type = lib.types.bool;
         default = false;
         description = "Whether to enable writing to the Nix store as a remote store via SSH. Note: the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.settings.trusted-users` option in most use cases, such as allowing remote building of derivations.";
       };
 
-      keys = mkOption {
-        type = types.listOf types.str;
+      keys = lib.mkOption {
+        type = lib.types.listOf lib.types.str;
         default = [];
         example = [ "ssh-dss AAAAB3NzaC1k... alice@example.org" ];
         description = "A list of SSH public keys allowed to access the binary cache via SSH.";
       };
 
-      protocol = mkOption {
-        type = types.enum [ "ssh" "ssh-ng" ];
+      protocol = lib.mkOption {
+        type = lib.types.enum [ "ssh" "ssh-ng" ];
         default = "ssh";
         description = "The specific Nix-over-SSH protocol to use.";
       };
@@ -40,7 +38,7 @@ in {
 
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
 
     users.users.nix-ssh = {
       description = "Nix SSH store user";