This commit is contained in:
dingfeng.wong
2025-07-18 13:50:59 +08:00
parent f21234790e
commit a2d6b6f460
6 changed files with 58 additions and 20 deletions
+46 -2
View File
@@ -21,7 +21,7 @@
outputs.nixosModules.important-defaults
outputs.nixosModules.incus
outputs.nixosModules.orbstack
outputs.nixosModules.power-user-defaults
# outputs.nixosModules.power-user-defaults
];
nixpkgs = {
@@ -80,6 +80,14 @@
home = "/home/wongdingfeng";
homeMode = "700";
useDefaultShell = true;
# SSH keys
openssh.authorizedKeys.keys = [
# Add your SSH public keys here
# "ssh-rsa AAAAB3NzaC1yc2EAAAA... your-email@example.com"
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... your-email@example.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICA/3qb5Eg8NSFMHXZqFlWI9TxHZHQtFAjvcDfiTUtbv wongdingfeng@Wong-Ding-Fengs-MacBook-Pro.local-2024-01-23"
];
};
security.sudo.wheelNeedsPassword = false;
@@ -89,6 +97,42 @@
time.timeZone = "Asia/Singapore";
# SSH Server configuration
services.openssh = {
enable = true;
settings = {
# Better security defaults
PasswordAuthentication = true;
PermitRootLogin = "yes";
# Enable X11 forwarding
X11Forwarding = true;
X11DisplayOffset = 10;
X11UseLocalhost = true;
# Additional security settings
Protocol = 2;
MaxAuthTries = 3;
ClientAliveInterval = 300;
ClientAliveCountMax = 2;
# Allow only specific users (optional - uncomment if needed)
# AllowUsers = [ "wongdingfeng" ];
};
# Optional: Custom port (uncomment if you want to change from default 22)
ports = [ 2222 ];
};
# System packages are now handled in power-user-defaults.nix
# environment.systemPackages is defined there with a comprehensive list
environment.systemPackages = with pkgs; [
neovim
gitAndTools.gitFull
tmux
htop
neofetch
ripgrep
fd
ranger
];
}