big changes

This commit is contained in:
fwastring 2025-10-17 09:51:35 +02:00
parent ac9462c677
commit 51de7ef3a2
14 changed files with 481 additions and 105 deletions

View file

@ -68,25 +68,25 @@ with lib;
sops.secrets.forgejo-runner-token = {};
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://git.wastring.com";
# Obtaining the path to the runner token file may differ
# tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
tokenFile = config.sops.secrets.forgejo-runner-token.path;
labels = [
"ubuntu-latest:docker://node:20-bullseye"
# "ubuntu-22.04:docker://node:16-bullseye"
# "ubuntu-20.04:docker://node:16-bullseye"
# "ubuntu-18.04:docker://node:16-buster"
## optionally provide native execution on the host:
# "native:host"
];
};
};
# services.gitea-actions-runner = {
# package = pkgs.forgejo-actions-runner;
# instances.default = {
# enable = true;
# name = "monolith";
# url = "https://git.wastring.com";
# # Obtaining the path to the runner token file may differ
# # tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
# tokenFile = config.sops.secrets.forgejo-runner-token.path;
# labels = [
# "ubuntu-latest:docker://node:20-bullseye"
# # "ubuntu-22.04:docker://node:16-bullseye"
# # "ubuntu-20.04:docker://node:16-bullseye"
# # "ubuntu-18.04:docker://node:16-buster"
# ## optionally provide native execution on the host:
# # "native:host"
# ];
# };
# };
services.forgejo = {
enable = true;

View file

@ -0,0 +1,95 @@
{
lib,
pkgs,
config,
...
}:
with lib;
{
options = {
glance = {
enable = mkEnableOption "enables glance";
port = lib.mkOption {
type = lib.types.int;
default = 8857;
description = "The port glance listens on.";
};
host = mkOption {
type = types.str;
defaultText = literalExpression "127.0.0.1";
description = "The hostname that glance binds to";
};
domain = mkOption {
type = types.str;
defaultText = literalExpression "home.wastring.com";
description = "The hostname that glance binds to";
};
};
};
config = mkMerge [
(mkIf config.glance.enable {
services.glance = {
enable = true;
settings = {
theme = {
background-color = "240 21 15";
contrast-multiplier = 1.2;
primary-color = "217 92 83";
positive-color = "115 54 76";
negative-color = "347 70 65";
};
server = {
host = config.glance.host;
port = config.glance.port;
};
pages = [
{
name = "Home";
columns = [
{
size = "small";
widgets = [
{ type = "calendar"; }
];
}
{
size = "full";
widgets = [
{
type = "videos";
style = "vertical-list";
channels = [
"UCwHwDuNd9lCdA7chyyquDXw"
"UC7YOGHUfC1Tb6E4pudI9STA"
"UCs76MNovGkuNYNZCmrxcb3Q"
];
}
];
}
{
size = "small";
widgets = [
{
type = "weather";
location = "Malmö, Sweden";
}
];
}
];
}
];
};
};
services.nginx.virtualHosts.${config.glance.domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${toString config.glance.host}:${toString config.glance.port}";
proxyWebsockets = true;
};
};
})
];
}