From dec36d2e9aaca7ca7149a244aa984e97925a3dba Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 17 May 2026 01:05:14 +0200 Subject: moved ssh and tailscale to srv, revamped netwroking modules --- os/core/ssh.nix | 55 ------------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 os/core/ssh.nix (limited to 'os/core/ssh.nix') diff --git a/os/core/ssh.nix b/os/core/ssh.nix deleted file mode 100644 index 52b7c32..0000000 --- a/os/core/ssh.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - config, - lib, - username, - ... -}: -let - cfg = config.os.core.ssh; - keys = { - main = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC610CJfgc3yII7MpLVqzEzQGa8Tsm+dih+CTXHXTnv4"; - oci = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgWmRbNTP/kcaZ8JNV1boVTZ/FQVV4qP/9eTKL9buzDvz9HJdgyWmbCiVZicNSert31IRdWOF/wm1sFjZ48nSkGDHbrnc//MPSdHULTx+kMES/NW9SZwwpaquFIJClrObysxrFYBAqweD+DJ3bp451WIymBs7lRBMNKPgoHBpJ5WN2CfIQjl60Jqnli7ML5seCsrquPEemcMPr1TFPmrFCbirzgDVkzCLL5kOowSD2uprtSA08fFm/pZ6nZh6KTQaEgPO4zR9tK+NQ46oCynWwBTI7JOPB4/LtIOiC5TjEUrkXZ/sJzpCBiNPYSRI8RWnAD0N/uVFJ4EYPUKLO2C/d"; - }; -in -{ - options.os.core.ssh.enable = lib.mkEnableOption "enables ssh server setup"; - - config = lib.mkIf cfg.enable { - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - }; - }; - - programs.ssh.startAgent = true; - services.gnome.gcr-ssh-agent.enable = false; - - users.users.${username}.openssh.authorizedKeys.keys = [ "${keys.main} adikro@disroot.org" ]; - - environment.etc."ssh/allowed_signers".text = "adikro@disroot.org ${keys.main}"; - home-manager.users.${username} = { - programs.ssh = { - enable = true; - enableDefaultConfig = false; - - matchBlocks = { - "github.com codeberg.org" = { - identityFile = "~/.ssh/main_id_ed25519.pub"; - identitiesOnly = true; - user = "git"; - }; - "oci" = { - hostname = "130.162.223.123"; - user = "opc"; - }; - }; - }; - home.file = { - ".ssh/main_id_ed25519.pub".text = keys.main; - ".ssh/oci.pub".text = keys.oci; - }; - }; - }; -} -- cgit v1.3