feat: add comprehensive NixOS configuration documentation and structure
- Introduced `08-structure.md` detailing project structure, main files, and versioning. - Created `README.md` for documentation overview and quick start guide. - Added user-specific configurations for Alacritty, Vim, Micro, Git, Zsh, Tmux, and tools. - Implemented system modules for desktop environment (KDE Plasma), audio (PipeWire), networking, and services (OpenSSH, GnuPG). - Configured Nix settings with flakes support and garbage collection. - Established user management for `ada` with necessary groups and shell settings. - Enabled VirtualBox guest additions for improved VM experience.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Сервер OpenSSH с усиленной безопасностью
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
# Аутентификация
|
||||
PasswordAuthentication = false;
|
||||
PubkeyAuthentication = true;
|
||||
PermitRootLogin = "no";
|
||||
KbdInteractiveAuthentication = false;
|
||||
ChallengeResponseAuthentication = false;
|
||||
PermitEmptyPasswords = false;
|
||||
|
||||
# Сессии и доступ
|
||||
LoginGraceTime = 30;
|
||||
MaxAuthTries = 3;
|
||||
MaxSessions = 2;
|
||||
ClientAliveInterval = 300;
|
||||
ClientAliveCountMax = 2;
|
||||
|
||||
# Отключить устаревшие возможности
|
||||
X11Forwarding = false;
|
||||
AllowAgentForwarding = false;
|
||||
PermitUserEnvironment = false;
|
||||
};
|
||||
|
||||
# Дополнительная конфигурация
|
||||
extraConfig = ''
|
||||
# Authentication methods
|
||||
AuthenticationMethods publickey
|
||||
|
||||
# Reduce legacy or risky features
|
||||
IgnoreRhosts yes
|
||||
HostbasedAuthentication no
|
||||
TCPKeepAlive no
|
||||
|
||||
# Connection throttling
|
||||
MaxStartups 10:30:60
|
||||
'';
|
||||
};
|
||||
|
||||
# Агент GnuPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# MTR для сетевой диагностики
|
||||
programs.mtr.enable = true;
|
||||
|
||||
# Firefox
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# AmneziaVPN
|
||||
programs.amnezia-vpn.enable = true;
|
||||
|
||||
# Системные пакеты
|
||||
environment.systemPackages = with pkgs; [
|
||||
amneziawg-tools
|
||||
neofetch
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user