From 521dc4a0ec537e8291a9c7ab1be179a5682bed68 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Mon, 8 Jul 2024 22:03:34 -0700 Subject: [PATCH] add git.zynh.me to ssh hosts --- home/modules/default.nix | 1 + home/modules/ssh.nix | 24 ++++++++++++++++++++++++ hosts/snowhawk/home.nix | 1 + 3 files changed, 26 insertions(+) create mode 100644 home/modules/ssh.nix diff --git a/home/modules/default.nix b/home/modules/default.nix index 471ad0f..c8b8857 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -15,6 +15,7 @@ ./lazygit.nix ./dunst.nix ./sops.nix + ./ssh.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/home/modules/ssh.nix b/home/modules/ssh.nix new file mode 100644 index 0000000..fe8021f --- /dev/null +++ b/home/modules/ssh.nix @@ -0,0 +1,24 @@ +{ lib, config, ... }: + +let + cfg = config.snowhawk.ssh; +in +{ + options.snowhawk.ssh = { + enable = lib.mkEnableOption "ssh"; + }; + + config = lib.mkIf cfg.enable { + programs.ssh = { + enable = true; + matchBlocks = { + "git.zynh.me" = { + hostname = "git.zynh.me"; + user = "git"; + port = 2221; + identityFile = "${config.home.homeDirectory}/.ssh/personal_git"; + }; + }; + }; + }; +} diff --git a/hosts/snowhawk/home.nix b/hosts/snowhawk/home.nix index 5275031..43f1d74 100644 --- a/hosts/snowhawk/home.nix +++ b/hosts/snowhawk/home.nix @@ -19,6 +19,7 @@ in lazygit.enable = true; dunst.enable = true; sops.enable = true; + ssh.enable = true; }; xsession.numlock.enable = true;