This commit is contained in:
iFargle 2023-09-16 12:08:02 +09:00
parent 8703def541
commit a29f885b27
2 changed files with 20 additions and 2 deletions

View file

@ -39,12 +39,15 @@
sops.secrets.nixos-rpi4-01_tailscale_key = {
owner = "root";
sopsFile = ../../../secrets/tailscale.yaml;
restartUnits = [ "tailscaled.service" ];
restartUnits = [
"tailscaled.service"
"tailscaled-autoconnect.service"
];
};
services.tailscale.authKeyFile = "/run/secrets/nixos-rpi4-01_tailscale_key";
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
# Temporary
networking.firewall.allowedTCPPorts = [ 22 ];
# networking.firewall.allowedTCPPorts = [ 22 ];
}

15
sd-image.nix Normal file
View file

@ -0,0 +1,15 @@
# Raspberry Pi SD Image
# $ nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./sd-image.nix
# https://nixos.wiki/wiki/NixOS_on_ARM#Installation
{ ... }: {
nixpkgs.crossSystem.system = "armv7l-linux";
# Simple bootstrap SD image for the Raspberry Pi
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
./nixos/users/albert
];
# Temporarily allow ssh access for imaging
networking.firewall.allowedTCPPorts = [ 22 ];
}