home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
54
modules/home/ssh/default.nix
Normal file
54
modules/home/ssh/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.ssh;
|
||||
in
|
||||
{
|
||||
options.my.home.ssh = with lib; {
|
||||
enable = my.mkDisableOption "ssh configuration";
|
||||
};
|
||||
|
||||
config.programs.ssh = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
includes = [
|
||||
# Local configuration, not-versioned
|
||||
"config.local"
|
||||
];
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
"git.belanyi.fr" = {
|
||||
hostname = "git.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