2024-07-23 08:36:03 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
|
|
|
|
|
|
|
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
|
2024-07-25 14:40:42 +02:00
|
|
|
system, # The home architecture for this host (eg. `x86_64-linux`).
|
2024-07-23 08:36:03 +02:00
|
|
|
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
|
|
|
|
format, # A normalized name for the home target (eg. `home`).
|
|
|
|
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
|
|
|
|
host, # The host name for this home.
|
|
|
|
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
sshDir = "${config.home.homeDirectory}/.ssh";
|
|
|
|
in {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
openssh
|
|
|
|
];
|
|
|
|
|
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
AddKeysToAgent yes
|
|
|
|
'';
|
|
|
|
|
2024-07-25 14:40:42 +02:00
|
|
|
matchBlocks = {
|
|
|
|
"github.com" = {
|
|
|
|
identityFile = "${sshDir}/id_ed25519";
|
|
|
|
identitiesOnly = true;
|
|
|
|
user = "git";
|
|
|
|
};
|
2024-07-23 08:36:03 +02:00
|
|
|
|
2024-07-25 14:40:42 +02:00
|
|
|
"gitlab.com" = {
|
|
|
|
identityFile = "${sshDir}/id_ed25519";
|
|
|
|
identitiesOnly = true;
|
|
|
|
user = "git";
|
|
|
|
};
|
2024-07-23 08:36:03 +02:00
|
|
|
|
2024-07-25 14:40:42 +02:00
|
|
|
"bitbucket.org" = {
|
|
|
|
identityFile = "${sshDir}/id_ed25519";
|
|
|
|
identitiesOnly = true;
|
|
|
|
user = "git";
|
|
|
|
};
|
|
|
|
};
|
2024-07-23 08:36:03 +02:00
|
|
|
};
|
|
|
|
}
|