home: put modules into folders
This commit is contained in:
parent
5b0e0bcbc2
commit
dc5a44ce82
24 changed files with 23 additions and 23 deletions
49
home/ssh/default.nix
Normal file
49
home/ssh/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.ssh;
|
||||
in
|
||||
{
|
||||
options.my.home.ssh = with lib.my; {
|
||||
enable = mkDisableOption "ssh configuration";
|
||||
};
|
||||
|
||||
config.programs.ssh = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"gitlab.com" = {
|
||||
hostname = "gitlab.com";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"git.sr.ht" = {
|
||||
hostname = "git.sr.ht";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"gitea.belanyi.fr" = {
|
||||
hostname = "gitea.belanyi.fr";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
porthos = {
|
||||
hostname = "91.121.177.163";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "ambroisie";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue