Skip to content

Instantly share code, notes, and snippets.

@ConradMearns
Created May 24, 2020 18:59
Show Gist options
  • Save ConradMearns/6a209153e6010979e0a0f3a3fcb3c660 to your computer and use it in GitHub Desktop.
Save ConradMearns/6a209153e6010979e0a0f3a3fcb3c660 to your computer and use it in GitHub Desktop.
sd-image.nix
{ config, pkgs, ... }: {
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix> ];
# SSH Settings
services.openssh.enable = true;
services.openssh.passwordAuthentication = false;
services.openssh.permitRootLogin = "yes";
services.openssh.challengeResponseAuthentication = false;
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
# My public SSH key so that I can log into root over SSH without a password
users.extraUsers.root.openssh.authorizedKeys.keys = [( builtins.readFile ./neri_rsa.pub )];
# Short for Nerite (snail theme?)
networking.hostName = "neri";
# Avahi settings so that I can access the Pi as 'neri.local'
services.nscd.enable = true;
services.avahi = {
enable = true;
publish = {
enable = true;
addresses = true;
workstation = true;
};
};
networking.wireless.enable = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment