nixos-configs/devices/nos/modules/docker/homepage/compose.nix
matt1432 59d2205e7a
All checks were successful
Discord / discord commits (push) Has been skipped
fix(docker): add required changes to make every container work
2024-07-24 20:52:32 -04:00

68 lines
1.5 KiB
Nix

{
config,
pkgs,
...
}: let
inherit (config.sops) secrets;
inherit (pkgs.writers) writeYAML;
in {
khepri.compositions."homepage" = {
networks.proxy_net = {external = true;};
services."homepage" = {
image = import ./images/homepage.nix pkgs;
restart = "always";
ports = [
"3020:3000"
];
networks = ["proxy_net"];
extraHosts = ["lan.nelim.org:10.0.0.130"];
environmentFiles = [secrets.homepage.path];
volumes = let
services = writeYAML "services.yaml" (import ./services.nix);
bookmarks = writeYAML "bookmarks.yaml" {};
settings = writeYAML "settings.yaml" {
# FIXME: title not working
title = "bruh";
theme = "dark";
color = "gray";
target = "_self";
layout.video = {
style = "columns";
row = 4;
# columns = 2;
};
};
widgets = writeYAML "widgets.yaml" [
{
resources = {
cpu = true;
memory = true;
disk = "/";
};
}
{
search = {
provider = "duckduckgo";
target = "_blank";
};
}
];
in [
"${bookmarks}:/app/config/bookmarks.yaml:ro"
"${services}:/app/config/services.yaml:ro"
"${settings}:/app/config/settings.yaml:ro"
"${widgets}:/app/config/widgets.yaml:ro"
];
};
};
}