common aspects reworked into base aspect
This commit is contained in:
parent
bfa2521ed0
commit
5d1b54c8bf
15 changed files with 72 additions and 112 deletions
32
aspects/base/ssh.nix
Normal file
32
aspects/base/ssh.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
flake.modules.nixos.ssh =
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
extraConfig = ''
|
||||
PrintLastLog no
|
||||
'';
|
||||
};
|
||||
programs = {
|
||||
bash.interactiveShellInit = ''
|
||||
if { [ -n "$SSH_CONNECTION" ] && [ -z "$IN_NIX_SHELL" ]; } || [ -z "$TMUX" ]; then
|
||||
export TERM=xterm-256color
|
||||
clear
|
||||
fastfetch
|
||||
fi
|
||||
'';
|
||||
fish.interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
if set -q SSH_CONNECTION; and not set -q IN_NIX_SHELL; or not set -q TMUX
|
||||
export TERM=xterm-256color
|
||||
clear
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue