Enable ssh
This commit is contained in:
parent
76087a056b
commit
7ec87ef1bd
@ -12,6 +12,7 @@
|
|||||||
./mangohud
|
./mangohud
|
||||||
./nh
|
./nh
|
||||||
./obs
|
./obs
|
||||||
|
./ssh
|
||||||
./steam
|
./steam
|
||||||
./sunshine
|
./sunshine
|
||||||
./syncthing
|
./syncthing
|
||||||
|
|||||||
91
modules/apps/ssh/default.nix
Normal file
91
modules/apps/ssh/default.nix
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.ssh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
ssh = {
|
||||||
|
enable = lib.mkEnableOption "Enable ssh in NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.ssh = {
|
||||||
|
startAgent = true;
|
||||||
|
};
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
listenAddresses = [
|
||||||
|
{
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
port = 15995;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ports = [ 15995 ];
|
||||||
|
settings = {
|
||||||
|
AllowUsers = [ "${username}" ];
|
||||||
|
# Allow forwarding ports to everywhere
|
||||||
|
GatewayPorts = "clientspecified";
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
KexAlgorithms = [
|
||||||
|
"sntrup761x25519-sha512@openssh.com"
|
||||||
|
"curve25519-sha256"
|
||||||
|
"curve25519-sha256@libssh.org"
|
||||||
|
#"diffie-hellman-group-exchange-sha256"
|
||||||
|
];
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
# Automatically remove stale sockets
|
||||||
|
StreamLocalBindUnlink = "yes";
|
||||||
|
UseDns = true;
|
||||||
|
X11Forwarding = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
|
desktop-entry-ssh-add = {
|
||||||
|
enable = true;
|
||||||
|
text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Exec=ssh-add -q .ssh/id_ed25519
|
||||||
|
Name=ssh-add
|
||||||
|
Type=Application
|
||||||
|
'';
|
||||||
|
target = "${config.xdg.configHome}/autostart/ssh-add.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [ sshs ];
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
Host thalia
|
||||||
|
HostName thalia
|
||||||
|
User ${username}
|
||||||
|
Port 6777
|
||||||
|
Host orion
|
||||||
|
HostName orion
|
||||||
|
User ${username}
|
||||||
|
Port 6777
|
||||||
|
Host media
|
||||||
|
HostName media.home
|
||||||
|
User ryan
|
||||||
|
Port 22
|
||||||
|
Host proxmox
|
||||||
|
HostName proxmox.home
|
||||||
|
User root
|
||||||
|
Port 22
|
||||||
|
Host router
|
||||||
|
HostName router.home
|
||||||
|
User root
|
||||||
|
Port 22
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -45,7 +45,7 @@ in
|
|||||||
# nvim.enable = true;
|
# nvim.enable = true;
|
||||||
# pay-respects.enable = true;
|
# pay-respects.enable = true;
|
||||||
# ripgrep.enable = true;
|
# ripgrep.enable = true;
|
||||||
# ssh.enable = true;
|
ssh.enable = true;
|
||||||
# starship.enable = true;
|
# starship.enable = true;
|
||||||
# tailscale.enable = true;
|
# tailscale.enable = true;
|
||||||
# tealdeer.enable = true;
|
# tealdeer.enable = true;
|
||||||
|
|||||||
5
todo
5
todo
@ -2,11 +2,12 @@ DONE secrets
|
|||||||
DONE syncthing
|
DONE syncthing
|
||||||
DONE Logseq
|
DONE Logseq
|
||||||
DONE mouse speed
|
DONE mouse speed
|
||||||
|
TODO git thru ssh
|
||||||
TODO boot into Hyprland
|
TODO boot into Hyprland
|
||||||
TODO autologin on boot
|
TODO autologin on boot
|
||||||
TODO git thru ssh
|
|
||||||
TODO zsh error
|
TODO zsh error
|
||||||
TODO ags
|
TODO ags
|
||||||
TODO sudo nopasswd
|
TODO sudo nopasswd
|
||||||
TODO brightness controls
|
TODO brightness controls
|
||||||
TODO sounds (disable bell!!!)
|
TODO sounds (disable bell!!!)
|
||||||
|
TODO KDEConnect
|
||||||
Loading…
Reference in New Issue
Block a user