feat: updated glance

This commit is contained in:
Nick 2025-05-26 14:56:10 -05:00
parent 8d4ce8d2f9
commit a5bfa31ada
19 changed files with 115 additions and 22 deletions

View file

@ -1,7 +1,12 @@
{
flake,
pkgs,
...
}:
let
inherit (flake.config.people) user0;
inherit (flake.config.people.users.${user0}) email;
in
{
services.espanso = {
enable = true;
@ -68,7 +73,7 @@
replace = "Δ";
}
{
trigger = ":em";
trigger = ":emdash";
replace = "";
}
{
@ -119,6 +124,30 @@
trigger = ":ss0";
replace = "";
}
{
trigger = ":ntt";
replace = ''
World A) Animals farmed for food.
World B) Humans farmed for food.
All else equal, what is true of world A that is untrue of world B, that if made true of world B, would make world B permissible?'';
}
{
trigger = ":dotfiles";
replace = "https://gitlab.com/upRootNutrition/dotfiles";
}
{
trigger = ":website";
replace = "https://uprootnutrition.com";
}
{
trigger = ":mail0";
replace = email.address0;
}
{
trigger = ":mail1";
replace = email.address2;
}
];
};
global_vars = {

7
modules/nixos/services/glance/config/branding.nix Normal file → Executable file
View file

@ -1,8 +1,7 @@
{
hide-footer = true;
# logo-url = /assets/logo.png;
# favicon-url = /assets/logo.png;
# logo-url = "/assets/logo.png";
# app-name = "My Dashboard";
# app-icon-url = "/assets/app-icon.png";
# app-background-color = "#151519";
# favicon-url = "/assets/logo.png";
# app-icon-url = "/assets/logo.png";
}

13
modules/nixos/services/glance/config/pages.nix Normal file → Executable file
View file

@ -8,6 +8,8 @@ let
calendar = import (widgetsPath + /calendar.nix);
clock = import (widgetsPath + /clock.nix);
weather = import (widgetsPath + /weather.nix);
reddit = import (widgetsPath + /reddit.nix);
videos = import (widgetsPath + /videos.nix);
};
in
[
@ -16,13 +18,20 @@ in
{
size = "full";
widgets = [
widgets.podcasts
{
type = "group";
widgets = [
widgets.podcasts
widgets.videos
];
}
widgets.reddit
];
}
{
size = "small";
widgets = [
widgets.jellyfin
# widgets.jellyfin
widgets.steam
];
}

7
modules/nixos/services/glance/config/server.nix Normal file → Executable file
View file

@ -1,6 +1,9 @@
{ service, ... }:
{ flake, service, ... }:
let
inherit (flake.config.people) user0;
in
{
# assets-path = "/home/${user0}/Files/Projects/dotfiles/modules/nixos/services/glance/assets";
assets-path = "/home/${user0}/Files/Projects/dotfiles/modules/nixos/services/glance/assets";
port = service.ports.port0;
# auth = {
# secret-key = config.sops.secrets."${service.name}-key".path;

0
modules/nixos/services/glance/config/theme.nix Normal file → Executable file
View file

View file

0
modules/nixos/services/glance/config/widgets/clock.nix Normal file → Executable file
View file

View file

View file

@ -0,0 +1,6 @@
{
type = "monitor";
cache = "1m";
title = "Services";
}

View file

@ -1,9 +1,5 @@
{
type = "rss";
title = "Podcasts";
style = "detailed-list";
collapse-after = 6;
feeds = [
let
podcastData = [
{
url = "https://sigmanutrition.libsyn.com/rss/";
title = "Sigma Nutrition Radio";
@ -17,4 +13,19 @@
title = "Docs Who Lift";
}
];
podcastEntries = builtins.map (
podcast:
podcast
// {
hide-description = true;
hide-categories = true;
}
) podcastData;
in
{
type = "rss";
title = "Podcasts";
style = "detailed-list";
collapse-after = 3;
feeds = podcastEntries;
}

View file

@ -0,0 +1,21 @@
let
subList = [
"privacy"
"selfhosted"
"vegan"
];
subredditEntries = builtins.map (sub: {
type = "reddit";
subreddit = sub;
collapse-after = 4;
show-thumbnails = true;
sort-by = "top";
top-period = "day";
}) subList;
in
{
type = "group";
widgets = subredditEntries;
}

View file

View file

View file

@ -0,0 +1,14 @@
{
type = "videos";
style = "vertical-list";
collapse-after = 6;
channels = [
"UCfQgsKhHjSyRLOp9mnffqVg"
"UCld68syR8Wi-GY_n4CaoJGA"
"UChIs72whgZI9w6d6FhwGGHA"
"UCes5DW7sk9WU8oqE9HGJdpg"
"UCOksmJqNzaYLhplfs7Sl8cA"
"UCQNmHyGAKqzOT_JsVEs4eag"
"UCd8rTrNRM6DYR4TXgSqNw8g"
];
}

View file

View file

@ -6,7 +6,7 @@ let
service = glance;
configPath = ./config;
configImports = {
server = import (configPath + /server.nix) { inherit service; };
server = import (configPath + /server.nix) { inherit flake service; };
branding = import (configPath + /branding.nix);
theme = import (configPath + /theme.nix);
pages = import (configPath + /pages.nix) { inherit config flake; };
@ -22,9 +22,10 @@ in
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}";
path = "/run/secrets/${service.name}-${secret}";
owner = "root";
mode = "600";
group = "root";
mode = "644";
};
in
{