feat: remove ssh profile generation
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
serviceHostNames = {
|
||||
github = "github.com";
|
||||
gitlab = "gitlab.com";
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.source-control =
|
||||
@@ -31,7 +27,6 @@ in
|
||||
inherit matches name;
|
||||
isValid = matches != null;
|
||||
scope = if matches == null then null else builtins.elemAt matches 1;
|
||||
service = if matches == null then null else builtins.elemAt matches 0;
|
||||
}
|
||||
) profileNames;
|
||||
|
||||
@@ -141,20 +136,5 @@ in
|
||||
condition = "gitdir:${gitRoot.root}/";
|
||||
contents = gitConfigForScope gitRoot.scope;
|
||||
}) gitRoots;
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = lib.listToAttrs (
|
||||
map (
|
||||
profile:
|
||||
lib.nameValuePair profile.name {
|
||||
hostname = serviceHostNames.${profile.service};
|
||||
identitiesOnly = true;
|
||||
identityFile = privateKeyPathForScope profile.scope;
|
||||
user = "git";
|
||||
}
|
||||
) validProfiles
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user