2021-04-26 20:28:47 -04:00
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
2022-01-24 18:35:39 -05:00
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
2021-04-26 20:28:47 -04:00
|
|
|
|
./hardware-configuration.nix
|
2021-05-19 21:15:38 -04:00
|
|
|
|
./rpi-poe.nix
|
2021-06-21 22:44:03 -04:00
|
|
|
|
|
2021-10-30 23:33:26 -04:00
|
|
|
|
../../modules/ipfs/cluster.nix
|
2021-11-15 21:26:30 -05:00
|
|
|
|
../../modules/sops
|
2021-04-26 20:28:47 -04:00
|
|
|
|
];
|
|
|
|
|
|
2021-11-19 22:59:43 -05:00
|
|
|
|
nixpkgs.overlays = [ (import ../../overlays) ];
|
|
|
|
|
|
2021-04-26 20:28:47 -04:00
|
|
|
|
# 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
|
2022-01-24 18:35:39 -05:00
|
|
|
|
boot.loader.generic-extlinux-compatible.enable = false;
|
2021-04-26 20:28:47 -04:00
|
|
|
|
|
|
|
|
|
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;
|
2021-06-21 22:44:03 -04:00
|
|
|
|
networking.firewall.enable = false;
|
2021-04-26 20:28:47 -04:00
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-10 21:42:30 -04:00
|
|
|
|
environment.systemPackages = with pkgs; [ libraspberrypi ];
|
|
|
|
|
|
|
|
|
|
services = {
|
|
|
|
|
prometheus = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 9090;
|
|
|
|
|
exporters = {
|
|
|
|
|
node = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enabledCollectors = [ "systemd" ];
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
port = 9100;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
tailscale = { enable = true; };
|
|
|
|
|
};
|
2021-04-26 20:28:47 -04:00
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "21.03"; # Did you read the comment?
|
|
|
|
|
}
|