summaryrefslogtreecommitdiff
path: root/os/core/ssh.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-05-17 01:05:14 +0200
committeradikro <adikro@disroot.org>2026-05-17 01:05:14 +0200
commitdec36d2e9aaca7ca7149a244aa984e97925a3dba (patch)
treebdf3ec35e101beaa4e74c48930dca4341d48ae2c /os/core/ssh.nix
parent8bedd672ac49617d2e3a808efe470228cbb0240d (diff)
moved ssh and tailscale to srv, revamped netwroking modules
Diffstat (limited to 'os/core/ssh.nix')
-rw-r--r--os/core/ssh.nix55
1 files changed, 0 insertions, 55 deletions
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;
- };
- };
- };
-}