update: work on pam and ssh for main-homelab
This commit is contained in:
parent
60c14e70f2
commit
2c7e31c431
1 changed files with 26 additions and 7 deletions
|
|
@ -25,10 +25,33 @@
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 12342 ];
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = true;
|
||||||
|
AllowUsers = null;
|
||||||
|
UsePAM = true;
|
||||||
|
X11Forwarding = false;
|
||||||
|
PermitRootLogin = "prohibit-password"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam = {
|
||||||
|
services.sshd = {
|
||||||
|
name = "sshd";
|
||||||
|
googleAuthenticator.enable = true;
|
||||||
|
gnupg.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.endlessh-go = {
|
||||||
|
enable = true;
|
||||||
|
port = 22;
|
||||||
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Rome";
|
time.timeZone = "Europe/Rome";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
|
|
@ -43,14 +66,12 @@
|
||||||
LC_TIME = "it_IT.UTF-8";
|
LC_TIME = "it_IT.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = {
|
||||||
layout = "it";
|
layout = "it";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure console keymap
|
console.keyMap = "it";
|
||||||
console.keyMap = "it2";
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nano
|
nano
|
||||||
|
|
@ -72,8 +93,6 @@
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue