Reworked home manager configuration to modules
This commit is contained in:
37
modules/home/applications/ssh.nix
Normal file
37
modules/home/applications/ssh.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.applications.ssh;
|
||||
in {
|
||||
options = {
|
||||
settings.applications.ssh.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable ssh and configure some endpoints
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
archserver = {
|
||||
hostname = "192.168.1.20";
|
||||
user = "xeovalyte";
|
||||
identityFile = "~/.ssh/archserver";
|
||||
};
|
||||
|
||||
"gitea.xeovalyte.dev" = {
|
||||
hostname = "gitea.xeovalyte.dev";
|
||||
port = 2222;
|
||||
user = "git";
|
||||
identityFile = "~/.ssh/gitea";
|
||||
};
|
||||
};
|
||||
addKeysToAgent = "yes";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user