From 1b5ed0e03858f3a87ca7b91867f9084375c017ae Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Mon, 26 Jun 2023 15:27:31 +0100 Subject: [PATCH] Add configuration for Pi Nix images --- pi-imgs/pi-initial.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pi-imgs/pi-initial.nix diff --git a/pi-imgs/pi-initial.nix b/pi-imgs/pi-initial.nix new file mode 100644 index 0000000..22d7323 --- /dev/null +++ b/pi-imgs/pi-initial.nix @@ -0,0 +1,27 @@ +{ lib, pkgs, ... }: { + imports = [ + + ]; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILIztwQxt+jqroFONSgq+xzPMuE2I5Dq/zWPQ8RcTYJr gabriel@gitgalaxy.com" + ]; + # bzip2 compression takes loads of time with emulation, skip it. + sdImage.compressImage = false; + # OpenSSH is forced to have an empty `wantedBy` on the installer system[1], this won't allow it + # to be started. Override it with the normal value. + # [1] https://github.com/NixOS/nixpkgs/blob/9e5aa25/nixos/modules/profiles/installation-device.nix#L76 + systemd.services.openssh.wantedBy = lib.mkOverride 40 [ "multi-user.target" ]; + # Enable OpenSSH out of the box. + services.openssh.enable = true; + + environment.systemPackages = with pkgs; [ + vim + wget + htop + git + screen + nix-output-monitor + tailscale + ]; +}