Files
alo-cluster/hosts/common/compute-node.nix
2023-06-30 07:32:34 +01:00

67 lines
1.7 KiB
Nix

{ pkgs, ... }:
{
imports = [
./impermanence.nix
./user-ppetru.nix
];
boot.initrd.kernelModules = [ "usb_storage" ];
boot.initrd.luks.devices."luksroot" = {
allowDiscards = true;
bypassWorkqueues = true;
keyFileSize = 4096;
keyFile = "/dev/sda";
};
security.sudo = {
extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
wheelNeedsPassword = false;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
environment.systemPackages = with pkgs; [
vim
];
services.openssh = {
enable = true;
allowSFTP = false;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
allowedUDPPorts = [ ];
};
system.copySystemConfiguration = false; # not supported with flakes
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}