Reorganize repository
This commit is contained in:
parent
da1824edb6
commit
0fc6c32a47
124 changed files with 16295 additions and 1229 deletions
36
modules/base/ssh/default.nix
Normal file
36
modules/base/ssh/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
ssh = pkgs.symlinkJoin {
|
||||
name = "ssh";
|
||||
paths = [
|
||||
(
|
||||
pkgs.writeShellScriptBin "ssh" ''
|
||||
export TERM=xterm-256color
|
||||
${pkgs.openssh}/bin/ssh $@
|
||||
''
|
||||
)
|
||||
pkgs.openssh
|
||||
];
|
||||
};
|
||||
base = home: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
compression = true;
|
||||
controlMaster = "auto";
|
||||
controlPersist = "10m";
|
||||
hashKnownHosts = true;
|
||||
userKnownHostsFile = "${config.chvp.cachePrefix}${home}/.ssh/known_hosts";
|
||||
serverAliveInterval = 10;
|
||||
extraOptionOverrides = {
|
||||
IdentityFile = "${config.chvp.dataPrefix}${home}/.ssh/id_ed25519";
|
||||
HostKeyAlgorithms = "ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa";
|
||||
};
|
||||
matchBlocks = import ./hosts.secret.nix;
|
||||
};
|
||||
home.packages = lib.mkIf config.chvp.graphical.enable [ ssh ];
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.users.root = { ... }: (base "/root");
|
||||
home-manager.users.charlotte = { ... }: (base "/home/charlotte");
|
||||
}
|
BIN
modules/base/ssh/hosts.secret.nix
Normal file
BIN
modules/base/ssh/hosts.secret.nix
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue