mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos: nix.sshServe: add trusted option
This commit is contained in:
parent
7c9ee40e3e
commit
7b593827dd
1 changed files with 9 additions and 1 deletions
|
|
@ -26,7 +26,13 @@ in
|
|||
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.";
|
||||
description = "Whether to enable writing to the Nix store as a remote store via SSH. Note: by default, the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.sshServe.trusted` option in most use cases, such as allowing remote building of derivations to anonymous people based on ssh key";
|
||||
};
|
||||
|
||||
trusted = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to add nix-ssh to the nix.settings.trusted-users";
|
||||
};
|
||||
|
||||
keys = lib.mkOption {
|
||||
|
|
@ -59,6 +65,8 @@ in
|
|||
};
|
||||
users.groups.nix-ssh = { };
|
||||
|
||||
nix.settings.trusted-users = lib.mkIf cfg.trusted [ "nix-ssh" ];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
services.openssh.extraConfig = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue