Skip to content

Commit

Permalink
nixos/desktop/ssh: init
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Oct 2, 2023
1 parent 23b17e2 commit eadfb3f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions nixos/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
./greetd.nix
./locale.nix
./plymouth.nix
./ssh.nix
./tailscale.nix
./wayland.nix
./xserver.nix
Expand Down
17 changes: 17 additions & 0 deletions nixos/desktop/ssh.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ config, lib, ... }:

let
cfg = config.nixos.desktop.ssh;
in
{
options.nixos.desktop.ssh.enable = lib.mkEnableOption "SSH config (client side)" // {
default = config.nixos.desktop.enable;
};

config = lib.mkIf cfg.enable {
programs.ssh = {
enableAskPassword = true;
forwardX11 = true;
};
};
}
2 changes: 1 addition & 1 deletion nixos/server/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
in
{
options.nixos.server.ssh = {
enable = lib.mkEnableOption "SSH config";
enable = lib.mkEnableOption "SSH config (server side)";
enableRootLogin = lib.mkEnableOption "Root login via SSH";
authorizedKeys = lib.mkOption {
description = "List of authorized keys.";
Expand Down

0 comments on commit eadfb3f

Please sign in to comment.