refactor
This commit is contained in:
1 parent
81e576a877
commit
cde67e4d75
46 files changed
+619
-518
No files matched your search
@@ -1,19 +1,28 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.ssh-client =
|
||||
{ config, ... }:
|
||||
let
|
||||
server = config.facts.topology.server;
|
||||
in
|
||||
{
|
||||
imports = [ homeModules.sops ];
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
includes = [
|
||||
config.sops.templates."ssh-config-orion".path
|
||||
config.sops.templates."ssh-config-${server.machine}".path
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets."orion-ip" = { };
|
||||
sops.templates."ssh-config-orion".content = ''
|
||||
Host orion
|
||||
HostName ${config.sops.placeholder."orion-ip"}
|
||||
sops.secrets."${server.machine}-ip" = { };
|
||||
sops.templates."ssh-config-${server.machine}".content = ''
|
||||
Host ${server.sshAlias}
|
||||
HostName ${config.sops.placeholder."${server.machine}-ip"}
|
||||
ForwardAgent yes
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user