feat: add iso

Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
gwg313 2025-07-13 08:57:17 -04:00
parent bdede3c7b3
commit d6ef8aeecc
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
3 changed files with 176 additions and 271 deletions

View file

@ -0,0 +1,37 @@
{
config,
pkgs,
lib,
...
}:
{
networking.hostName = "nixos-iso";
# Required dummy boot device for ISO builds
boot.loader.grub.device = "/dev/sda";
# Enable OpenSSH at boot
services.openssh.enable = true;
# Permit root login via SSH key (disable password auth)
services.openssh.settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
users.users.root = {
initialHashedPassword = lib.mkForce "!"; # disables password login
openssh.authorizedKeys.keys = [
# Replace with your actual SSH public key
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvOfDSjlvegGqfUS18XwXB7SvS2n9/hGYUpKxRb9vgb gwg313@pm.me"
];
};
# Useful base tools
environment.systemPackages = with pkgs; [
git
htop
vim
curl
];
}