Skip to content

Instantly share code, notes, and snippets.

@will
Created August 3, 2023 13:47
Show Gist options
  • Save will/09728182df3dda6fcfb72c36190bf7fb to your computer and use it in GitHub Desktop.
Save will/09728182df3dda6fcfb72c36190bf7fb to your computer and use it in GitHub Desktop.
user data ec2 nixos
{ config, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
ec2.hvm = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "nixos";
security.sudo.wheelNeedsPassword = false;
users.users.will = {
isNormalUser = true;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGq0NvOp8fyKAS3iHPad2Mz6cOVKNBIElLpnHMy9zNve" ];
extraGroups = [ "wheel" ];
};
environment.systemPackages = with pkgs; [
neovim
];
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
system.stateVersion = "23.05";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment