mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
181 lines
4.7 KiB
Nix
181 lines
4.7 KiB
Nix
{
|
|
lib,
|
|
inputs,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
s = inputs.nix-secrets;
|
|
sopsFolder = inputs.nix-secrets + "/sops";
|
|
in
|
|
{
|
|
# Homepage.dev secrets
|
|
sops = {
|
|
secrets = {
|
|
"lubelogger/user" = {
|
|
sopsFile = "${sopsFolder}/services.yaml";
|
|
};
|
|
"lubelogger/pass" = {
|
|
sopsFile = "${sopsFolder}/services.yaml";
|
|
};
|
|
"freshrss/api" = {
|
|
sopsFile = "${sopsFolder}/services.yaml";
|
|
};
|
|
};
|
|
templates."homepage-environment".content = ''
|
|
HOMEPAGE_VAR_LAT = ${s.crow.location.lat}
|
|
HOMEPAGE_VAR_LONG = ${s.crow.location.long}
|
|
HOMEPAGE_ALLOWED_HOSTS = home.wanderingcrow.net
|
|
HOMEPAGE_VAR_LUBELOGGERUSER = ${config.sops.placeholder."lubelogger/user"}
|
|
HOMEPAGE_VAR_LUBELOGGERPASS = ${config.sops.placeholder."lubelogger/pass"}
|
|
HOMEPAGE_VAR_FRESHRSSPASS = ${config.sops.placeholder."freshrss/api"}
|
|
'';
|
|
};
|
|
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts."home.wanderingcrow.net".extraConfig = ''
|
|
@block not remote_ip ${inputs.nix-secrets.network.primary.publicIP} private_ranges
|
|
abort @block
|
|
reverse_proxy http://localhost:8089
|
|
'';
|
|
};
|
|
|
|
services = {
|
|
homepage-dashboard = {
|
|
enable = true;
|
|
listenPort = 8089;
|
|
environmentFile = config.sops.templates."homepage-environment".path;
|
|
settings = {
|
|
theme = "dark";
|
|
};
|
|
services = [
|
|
{
|
|
"Services" = [
|
|
{
|
|
"Garage" = {
|
|
icon = "https://garage.wanderingcrow.net/favicon.ico";
|
|
href = "https://garage.wanderingcrow.net";
|
|
description = "Vehicle management";
|
|
widget = {
|
|
type = "lubelogger";
|
|
url = "https://garage.wanderingcrow.net";
|
|
username = "{{HOMEPAGE_VAR_LUBELOGGERUSER}}";
|
|
password = "{{HOMEPAGE_VAR_LUBELOGGERPASS}}";
|
|
fields = [
|
|
"vehicles"
|
|
"reminders"
|
|
];
|
|
};
|
|
};
|
|
}
|
|
{
|
|
"RSS" = {
|
|
icon = "freshrss.svg";
|
|
href = "https://rss.wanderingcrow.net";
|
|
description = "RSS Feeds";
|
|
widget = {
|
|
type = "freshrss";
|
|
url = "https://rss.wanderingcrow.net";
|
|
username = "admin";
|
|
password = "{{HOMEPAGE_VAR_FRESHRSSPASS}}";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
}
|
|
];
|
|
widgets = [
|
|
{
|
|
search = {
|
|
provider = "duckduckgo";
|
|
target = "_blank";
|
|
};
|
|
}
|
|
{
|
|
openmeteo = {
|
|
timezone = "America/New_York";
|
|
units = "imperial";
|
|
cache = "5";
|
|
latitude = "{{HOMEPAGE_VAR_LAT}}";
|
|
longitude = "{{HOMEPAGE_VAR_LONG}}";
|
|
};
|
|
}
|
|
];
|
|
bookmarks = [
|
|
s.work.homepage
|
|
{
|
|
"Day to Day" = [
|
|
{
|
|
Messages = [
|
|
{
|
|
icon = "google-messages.svg";
|
|
href = "https://messages.google.com/web";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
YouTube = [
|
|
{
|
|
icon = "youtube.svg";
|
|
href = "https://youtube.com";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
"Proton Mail" = [
|
|
{
|
|
icon = "proton-mail.svg";
|
|
href = "https://mail.proton.me";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
Termbin = [
|
|
{
|
|
icon = "https://www.termbin.com/favicon.ico";
|
|
href = "https://www.termbin.com";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
Amazon = [
|
|
{
|
|
icon = "amazon.svg";
|
|
href = "https://amazon.com";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
}
|
|
{
|
|
Nix = [
|
|
{
|
|
Search = [
|
|
{
|
|
icon = "https://search.nixos.org/images/nix-logo.png";
|
|
href = "https://search.nixos.org";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
"Home Manager Options" = [
|
|
{
|
|
href = "https://home-manager-options.extranix.com/";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
"Nixpkgs Versions" = [
|
|
{
|
|
href = "https://lazamar.co.uk/nix-versions/";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|