2024-03-19 13:36:02 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-02-18 00:10:05 -05:00
|
|
|
inherit (config.sops) secrets;
|
2024-03-19 13:36:02 -04:00
|
|
|
inherit (pkgs.writers) writeYAML;
|
2024-02-18 00:10:05 -05:00
|
|
|
in {
|
2024-07-24 20:52:32 -04:00
|
|
|
khepri.compositions."homepage" = {
|
|
|
|
networks.proxy_net = {external = true;};
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
services."homepage" = {
|
|
|
|
image = import ./images/homepage.nix pkgs;
|
|
|
|
restart = "always";
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
ports = [
|
|
|
|
"3020:3000"
|
|
|
|
];
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
networks = ["proxy_net"];
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
extraHosts = ["lan.nelim.org:10.0.0.130"];
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environmentFiles = [secrets.homepage.path];
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
volumes = let
|
|
|
|
services = writeYAML "services.yaml" (import ./services.nix);
|
2024-02-18 00:10:05 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
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;
|
2024-03-07 00:04:39 -05:00
|
|
|
};
|
2024-07-24 20:52:32 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
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"
|
2024-02-18 00:10:05 -05:00
|
|
|
];
|
2024-07-24 20:52:32 -04:00
|
|
|
};
|
2024-02-18 00:10:05 -05:00
|
|
|
};
|
|
|
|
}
|