noisebell/pi/configuration.nix

53 lines
1.3 KiB
Nix

{ config, ... }:
{
system.stateVersion = "24.11";
networking.hostName = "noisebridge-pi";
networking.wireless = {
enable = true;
networks."Noisebridge".psk = "noisebridge";
};
services.avahi.enable = false;
# Decrypted at runtime by agenix
age.identityPaths = [
"/boot/noisebell-bootstrap.agekey"
"/etc/ssh/ssh_host_ed25519_key"
];
age.secrets.tailscale-auth-key.file = ../secrets/tailscale-auth-key.age;
age.secrets.pi-to-cache-key.file = ../secrets/pi-to-cache-key.age;
age.secrets.cache-to-pi-key.file = ../secrets/cache-to-pi-key.age;
services.noisebell = {
enable = true;
port = 80;
endpointUrl = "https://noisebell.extremist.software/webhook";
apiKeyFile = config.age.secrets.pi-to-cache-key.path;
inboundApiKeyFile = config.age.secrets.cache-to-pi-key.path;
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
services.tailscale = {
enable = true;
authKeyFile = config.age.secrets.tailscale-auth-key.path;
};
services.openssh.enable = true;
networking.firewall = {
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE40ISu3ydCqfdpb26JYD5cIN0Fu0id/FDS+xjB5zpqu"
];
}