feat: remove ssh profile generation
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
homeModules = config.flake.modules.homeManager;
|
homeModules = config.flake.modules.homeManager;
|
||||||
serviceHostNames = {
|
|
||||||
github = "github.com";
|
|
||||||
gitlab = "gitlab.com";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.source-control =
|
flake.modules.homeManager.source-control =
|
||||||
@@ -31,7 +27,6 @@ in
|
|||||||
inherit matches name;
|
inherit matches name;
|
||||||
isValid = matches != null;
|
isValid = matches != null;
|
||||||
scope = if matches == null then null else builtins.elemAt matches 1;
|
scope = if matches == null then null else builtins.elemAt matches 1;
|
||||||
service = if matches == null then null else builtins.elemAt matches 0;
|
|
||||||
}
|
}
|
||||||
) profileNames;
|
) profileNames;
|
||||||
|
|
||||||
@@ -141,20 +136,5 @@ in
|
|||||||
condition = "gitdir:${gitRoot.root}/";
|
condition = "gitdir:${gitRoot.root}/";
|
||||||
contents = gitConfigForScope gitRoot.scope;
|
contents = gitConfigForScope gitRoot.scope;
|
||||||
}) gitRoots;
|
}) 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