feat(ssh): initial ssh config
This commit is contained in:
parent
62150d615f
commit
8fcda1a7e9
7 changed files with 38 additions and 5 deletions
|
|
@ -66,6 +66,9 @@ in
|
||||||
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
||||||
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
||||||
'' +
|
'' +
|
||||||
|
''
|
||||||
|
set -gx SSH_AUTH_SOCK ~/.1password/agent.sock
|
||||||
|
'' +
|
||||||
# Use vim bindings and cursors
|
# Use vim bindings and cursors
|
||||||
''
|
''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = /* config */''
|
extraConfig = /* config */''
|
||||||
Host *
|
Host *
|
||||||
IdentitiesOnly=yes
|
|
||||||
IdentityAgent "~/.1password/agent.sock"
|
IdentityAgent "~/.1password/agent.sock"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ in
|
||||||
};
|
};
|
||||||
multiplexer.zellij.enable = true;
|
multiplexer.zellij.enable = true;
|
||||||
utility = {
|
utility = {
|
||||||
|
ssh.enable = true;
|
||||||
nixIndex.enable = true;
|
nixIndex.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
tools.enable = true;
|
tools.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
./security.nix
|
./security.nix
|
||||||
./services
|
./services
|
||||||
|
./ssh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@ in
|
||||||
networking.firewall.allowedTCPPorts = [57621]; # Spotify
|
networking.firewall.allowedTCPPorts = [57621]; # Spotify
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings.UseDns = true;
|
|
||||||
};
|
|
||||||
resolved.enable = true;
|
resolved.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
32
system/modules/ssh.nix
Normal file
32
system/modules/ssh.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.systemModules.openssh;
|
||||||
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk";
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options.systemModules = {
|
||||||
|
openssh = {
|
||||||
|
enable = lib.mkEnableOption "enable openssh system module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.sessionVariables.SSH_AUTH_SOCK = "~/.1password/agent.sock";
|
||||||
|
|
||||||
|
users.users.ooks.openssh.authorizedKeys.keys = [ key ];
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
UseDns = true;
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
StreamLocalBindUnlink = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -21,6 +21,7 @@ in
|
||||||
bootloader.systemd.enable = true;
|
bootloader.systemd.enable = true;
|
||||||
programs.gnomeServices.enable = true;
|
programs.gnomeServices.enable = true;
|
||||||
displayManager.tuigreet.enable = true;
|
displayManager.tuigreet.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.git];
|
environment.systemPackages = [pkgs.git];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue