diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index b176a85..901e005 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -38,6 +38,7 @@ in neo = enabled; rbw = enabled; ripgrep = enabled; + ssh = enabled; systemctl = enabled; }; xorg = { diff --git a/modules/home/programs/ssh/default.nix b/modules/home/programs/ssh/default.nix new file mode 100644 index 0000000..d39fdee --- /dev/null +++ b/modules/home/programs/ssh/default.nix @@ -0,0 +1,37 @@ +{ + lib, + config, + namespace, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.ssh; +in +{ + options = mkEnableModule "programs.ssh"; + + config = mkIf cfg.enable { + programs.ssh = { + enable = true; + + # Equivalent of ~/.ssh/config + # %d - local user's home directory + # %r - remote username + matchBlocks = { + "tty.marleycentre" = { + hostname = "10.10.10.69"; + identityFile = "%d/.ssh/%r@marleycentre"; + }; + + "tty.marleynet" = { + hostname = "10.69.69.2"; + port = 222; + identityFile = "%d/.ssh/%r@marleynet"; + }; + }; + }; + }; +} diff --git a/old/home/programs/ssh.nix b/old/home/programs/ssh.nix deleted file mode 100644 index bd3174c..0000000 --- a/old/home/programs/ssh.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ ... }: -{ - programs.ssh = { - enable = true; - - # Equivalent of ~/.ssh/config - # %d - local user's home directory - # %r - remote username - matchBlocks = { - "tty.marleycentre" = { - hostname = "admin.punkfairie.net"; - identityFile = "%d/.ssh/%r@marleycentre"; - }; - - "tty.marleynet" = { - hostname = "10.69.69.2"; - port = 222; - identityFile = "%d/.ssh/%r@marleynet"; - }; - }; - }; -}