Files
dotfiles/config/hosts/aspects/servers/rpi5.nix
T
2026-07-12 16:05:12 +01:00

81 lines
1.8 KiB
Nix

{
den,
__findFile,
modules,
...
}:
{
den.aspects.rpi5 = {
includes = [
<modules/raspberry-pi/5>
# <modules/services/traefik>
<modules/services/caddy>
<modules/services/home-assistant>
<modules/services/docker-registry>
<modules/services/ddns>
<modules/services/rtmp-to-whip>
];
nixos =
{ pkgs, ... }:
{
networking.hostName = "nixos-001-rp5";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
options = [ "noatime" ];
};
"/boot/firmware" = {
device = "/dev/disk/by-uuid/2175-794E";
fsType = "vfat";
options = [ "noatime" ];
};
};
networking.firewall = {
enable = true;
allowedTCPPorts = [
80
443
8080
];
allowedUDPPortRanges = [ ];
};
system.activationScripts.docker-config-fix = ''
if [ -d /root/.docker/config.json ]; then
rm -rf /root/.docker/config.json
echo '{}' > /root/.docker/config.json
fi
'';
virtualisation.docker.enable = true;
virtualisation.docker.package = pkgs.docker;
virtualisation.docker.autoPrune = {
enable = true;
dates = "weekly";
flags = [
"--all"
"--volumes"
];
};
virtualisation.oci-containers.backend = "docker";
services.openssh.enable = true;
nixpkgs.hostPlatform = "aarch64-linux";
nix.gc = {
automatic = true;
};
};
homeManager =
{ pkgs, ... }:
{
home.packages = [
pkgs.btop
];
};
};
}