ssh changes

This commit is contained in:
jacekpoz 2023-07-20 13:33:32 +02:00
parent c55e8210e8
commit 8d6502a77b
4 changed files with 34 additions and 7 deletions

View file

@ -68,7 +68,6 @@ in
sessionVariables = {
TERM = "foot";
EDITOR = "nvim";
SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
@ -115,10 +114,6 @@ in
alsa.support32Bit = true;
pulse.enable = true;
};
openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
greetd = {
enable = true;
settings = {
@ -128,6 +123,7 @@ in
};
};
blueman.enable = true;
mullvad-vpn.enable = true;
};
hardware = {

View file

@ -3,8 +3,6 @@
pkgs,
...
}: {
services.mullvad-vpn.enable = true;
systemd.services."mullvad-daemon".postStart = let
mullvad = config.services.mullvad-vpn.package;
in ''

View file

@ -0,0 +1,10 @@
{
config,
pkgs,
...
}: {
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
}

View file

@ -0,0 +1,23 @@
{
config,
pkgs,
...
}: {
systemd.user.services.ssh-agent = {
enable = true;
description = "SSH key agent";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
};
environment = {
SSH_AUTH_SOCK = "%t/ssh-agent.socket";
DISPLAY = ":0";
};
wantedBy = [ "default.target" ];
};
environment.sessionVariables = {
SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
};
}