From 01798f15c39453a1c76b5d37f74cc0a6eda88d11 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Mon, 22 Jul 2024 02:21:31 -0400 Subject: [PATCH] Disable external user addition --- config.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config.nix b/config.nix index 7d8336b..f6d86b6 100644 --- a/config.nix +++ b/config.nix @@ -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 ];