Skip to content

Commit 269aa59

Browse files
committed
Revert
1 parent 1b51a7c commit 269aa59

File tree

5 files changed

+83
-40
lines changed

5 files changed

+83
-40
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/default.nix

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ pkgs, config, ... }:
1+
{
2+
pkgs,
3+
config,
4+
lib,
5+
...
6+
}:
27
{
38
imports = [
49
./hardware-configuration.nix
@@ -53,15 +58,76 @@
5358
proxyWebsockets = true;
5459
};
5560
};
61+
"git.thilohohlt.com" = {
62+
enableACME = true;
63+
forceSSL = true;
64+
locations."/" = {
65+
proxyPass = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
66+
proxyWebsockets = true;
67+
};
68+
};
69+
"music.thilohohlt.com" = {
70+
enableACME = true;
71+
forceSSL = true;
72+
locations."/" = {
73+
proxyPass = "http://localhost:${toString config.services.navidrome.settings.Port}";
74+
proxyWebsockets = true;
75+
};
76+
};
5677
};
5778
};
5879
redlib = {
5980
enable = true;
6081
port = 2222;
6182
address = "127.0.0.1";
6283
};
84+
gitea = {
85+
enable = true;
86+
database = {
87+
type = "postgres";
88+
host = "/run/postgresql";
89+
port = 5432;
90+
};
91+
settings = {
92+
server = {
93+
HTTP_ADDR = "127.0.0.1";
94+
HTTP_PORT = 3333;
95+
};
96+
service = {
97+
DISABLE_REGISTRATION = true;
98+
};
99+
session = {
100+
COOKIE_SECURE = true;
101+
};
102+
};
103+
};
104+
navidrome = {
105+
enable = true;
106+
settings = {
107+
Port = 4444;
108+
Address = "127.0.0.1";
109+
MusicFolder = "/home/thohlt/Music";
110+
};
111+
};
112+
postgresql = {
113+
enable = true;
114+
ensureDatabases = [ "gitea" ];
115+
ensureUsers = [
116+
{
117+
name = "gitea";
118+
ensureDBOwnership = true;
119+
}
120+
];
121+
};
63122
};
64123

124+
systemd.tmpfiles.rules = [
125+
"a /home/thohlt - - - - u:navidrome:--x"
126+
"A /home/thohlt/Music - - - - u:navidrome:r-X,d:u:navidrome:r-X"
127+
];
128+
129+
systemd.services.navidrome.serviceConfig.ProtectHome = lib.mkForce false;
130+
65131
security = {
66132
acme = {
67133
acceptTerms = true;
@@ -80,5 +146,5 @@
80146
];
81147
};
82148

83-
system.stateVersion = "25.10";
149+
system.stateVersion = "25.11";
84150
}

src/components/Nav.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Button from "./Button.astro";
66
const routes = ["blog", "tracks", "services"];
77
---
88

9-
<nav class="sticky top-0 z-10 max-w-none bg-white dark:bg-neutral-800">
9+
<nav class="sticky top-0 z-20 max-w-none bg-white dark:bg-neutral-800">
1010
<div
1111
class="mx-auto flex max-w-screen-xl items-center justify-between gap-4 ps-4 pe-2 text-neutral-700 dark:text-neutral-300"
1212
>

src/components/Track.astro

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,16 @@ const videoId = youtubeLink.split("v=")[1];
1717
const thumbnail = `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`;
1818
---
1919

20-
<figure
21-
class="relative flex flex-col border border-neutral-400 duration-300 hover:scale-105 active:scale-105 dark:border-neutral-500"
20+
<a
21+
href={youtubeLink}
22+
class="relative mt-4 block p-4 duration-300 after:absolute after:inset-0 after:z-0 after:bg-[rgba(255,255,255,0.75)] after:content-[''] first:mt-0 hover:scale-105 dark:after:bg-[rgba(38,38,38,0.75)]"
23+
style={`word-break: break-word; background-image: url('${thumbnail}'); background-size: cover; background-position: center;`}
2224
>
23-
<span
24-
class="absolute -start-2 -top-2 border border-neutral-400 bg-white px-2 text-lg font-bold dark:border-neutral-500 dark:bg-neutral-800"
25-
>{index}</span
26-
>
27-
<a href={youtubeLink}>
28-
<img
29-
src={thumbnail}
30-
alt={`Cover for the song '${title}' by artist(s) '${artist}'`}
31-
class="aspect-video w-full border-b border-neutral-400 dark:border-neutral-500"
32-
/>
33-
</a>
34-
<figcaption
35-
class="flex flex-1 flex-col p-6 text-center"
36-
style="word-break: break-word;"
25+
<div
26+
class="relative z-10 flex flex-col gap-2 text-neutral-900 dark:text-white"
3727
>
3828
<p class="text-lg font-bold">{title}</p>
39-
<p class="mb-3">{uniqueArtists}</p>
40-
<p
41-
class="mt-auto border-t border-neutral-400 pt-3 text-sm dark:border-neutral-500"
42-
>
43-
{album}
44-
</p>
45-
</figcaption>
46-
</figure>
29+
<p>{uniqueArtists}</p>
30+
<p class="text-sm">{album}</p>
31+
</div>
32+
</a>

src/pages/tracks.astro

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,7 @@ const tracks = await getCollection("tracks");
1010
title="Tracks"
1111
description="My entire music playlist. It contains all kinds of songs."
1212
>
13-
<p class="mb-8 text-center">
14-
My entire music playlist. It contains all kinds of songs. <br />
15-
Current total amount of songs: <strong class="text-lg"
16-
>{tracks.length}</strong
17-
>
18-
<br />
19-
</p>
20-
<div
21-
class="not-prose relative start-1/2 -ms-[min(50vw-1rem,50ch)] grid max-w-[calc(min(100vw-2rem,100ch))] grid-cols-[repeat(auto-fit,minmax(min(100%,200px),1fr))] place-content-center gap-6"
22-
>
13+
<div class="not-prose">
2314
{
2415
tracks.map(({ data: { title, artist, album, youtubeLink } }, index) => (
2516
<Track {title} {artist} {album} {youtubeLink} index={++index} />

0 commit comments

Comments
 (0)