Disable external user addition

This commit is contained in:
Kiana Sheibani 2024-07-22 02:21:31 -04:00
parent 41d546e21d
commit 01798f15c3

View file

@ -2,7 +2,6 @@
{
imports = [ ./hardware-configuration.nix ./modules ];
# boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
boot.kernelPackages = rpi5-kernel.legacyPackages.aarch64-linux.linuxPackages_rpi5;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
@ -25,7 +24,11 @@
PasswordAuthentication = false;
PermitRootLogin = "yes";
};
users.users.root.openssh.authorizedKeys.keyFiles = [ ./ssh/authorized_keys ];
users.mutableUsers = false;
users.users.root = {
hashedPassword = "$y$j9T$bEfEX118OZZ58ypi4/D4F/$c1yDUO7hW7WnD5eGj..ZXieELAwUoSPHL4DIsDl6T.6";
openssh.authorizedKeys.keyFiles = [ ./ssh/authorized_keys ];
};
networking.firewall.allowedTCPPorts = [ 22 80 443 ];