feat: add iso
Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
parent
bdede3c7b3
commit
d6ef8aeecc
3 changed files with 176 additions and 271 deletions
37
hosts/iso/configuration.nix
Normal file
37
hosts/iso/configuration.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue