62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{ pkgs, nixos-hardware, ... }:
|
|
|
|
{
|
|
imports = [
|
|
# Include the results of the hardware scan.
|
|
./hardware-configuration.nix
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
|
|
|
../../modules/base
|
|
../../modules/ipfs/cluster.nix
|
|
../../modules/sops
|
|
];
|
|
|
|
nixpkgs.overlays = [ (import ../../overlays) ];
|
|
|
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
|
boot.loader.grub.enable = false;
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
boot.loader.generic-extlinux-compatible.enable = false;
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_rpi4;
|
|
boot.loader.raspberryPi = {
|
|
enable = true;
|
|
version = 4;
|
|
};
|
|
|
|
# networking.hostName = "nixos"; # Define your hostname.
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
# replicates the default behaviour.
|
|
networking.useDHCP = false;
|
|
networking.interfaces.eth0.useDHCP = true;
|
|
networking.interfaces.wlan0.useDHCP = true;
|
|
networking.firewall.enable = false;
|
|
|
|
# Enable the OpenSSH daemon.
|
|
services.openssh.enable = true;
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [ libraspberrypi ];
|
|
|
|
services = {
|
|
prometheus = {
|
|
enable = true;
|
|
port = 9090;
|
|
exporters = {
|
|
node = {
|
|
enable = true;
|
|
enabledCollectors = [ "systemd" ];
|
|
openFirewall = true;
|
|
port = 9100;
|
|
};
|
|
};
|
|
};
|
|
tailscale = { enable = true; };
|
|
};
|
|
}
|