fix up nixarr links and add homarr for nav

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-06-23 17:50:09 -05:00
parent cd54c615ca
commit adbd55f43c
5 changed files with 54 additions and 88 deletions

View file

@ -0,0 +1,47 @@
{
...
}:
let
name = "homarr";
hostDataDir = "/var/lib/${name}";
v_port = 7575;
in
{
virtualisation.oci-containers.containers = {
"${name}" = {
image = "ghcr.io/homarr-labs/homarr:latest";
ports = [
"127.0.0.1:${toString v_port}:${toString v_port}"
];
volumes = [
"${hostDataDir}:/appdata"
"/var/run/docker.sock:/var/run/docker.sock"
];
environment = {
SECRET_ENCRYPTION_KEY = "0b7e80116a742d16a8f07452a2d9b206b1997d32a6dd2c29cfe4df676e281295";
};
};
};
system.activationScripts."${name}_directories" = ''
mkdir -p ${hostDataDir}
chown -R root:root ${hostDataDir}
chmod -R 777 ${hostDataDir}
'';
services.nginx.virtualHosts = {
"100.64.0.13" = {
locations."/" = {
return = "301 http://h001.net.joshuabell.xyz";
};
};
"h001.net.joshuabell.xyz" = {
locations = {
"/" = {
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:${builtins.toString v_port}";
};
};
};
};
}