Compare commits

...

5 Commits

Author SHA1 Message Date
46ae872ead
nixos-wsl: commit tmpfiles workaround
TODO: move impl to system, this isn't even needed on WSL
2024-12-21 17:39:02 +00:00
9c85910688
rpi4: set btrfs commit interval to 5 minutes
i meant to do this months ago. my last sd card died and i want to avoid
that happening again.
2024-12-17 00:59:13 +00:00
28cad3a3fb
rpi4: fix redlib, rename from libreddit 2024-07-23 19:51:19 +00:00
5782db8360
rpi4: fix libreddit subscriptions 2024-07-23 19:34:39 +00:00
f9f32ba0f4
rpi4: subscribe to garn47 2024-07-23 19:29:26 +00:00
5 changed files with 25 additions and 5 deletions

View File

@ -1,5 +1,8 @@
{ pkgs, config, lib, vars, ... }:
{
imports = [
./tmpfiles-workaround.nix
];
config = {
networking.hostName = "nixos-wsl";

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
config.systemd.tmpfiles.packages = let
package = pkgs.runCommand "no-systemd-tmpfiles-nocow" {} ''
mkdir -p "$out/lib/tmpfiles.d"
cd "$out/lib/tmpfiles.d"
ln -s /dev/null journal-nocow.conf
'';
in lib.mkAfter [ package ];
}

View File

@ -22,7 +22,7 @@
"/opt/hassio"
"/opt/hassio/.snapshots"
];
fn = (x: { options = [ "compress=zstd" ];});
fn = (x: { options = [ "compress=zstd commit=300" ];});
in lib.genAttrs mounts fn;
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)

View File

@ -19,6 +19,7 @@ femboymemes
feminineboys
flatpak
geometrydash
garn47
homeassistant
ihaveihaveihavereddit
linux

View File

@ -194,7 +194,12 @@
"deemix.protogen.io" = mkAuthProxy 6595;
# libreddit auth 8087
"libreddit.protogen.io" = mkAuthProxy 8087;
"libreddit.protogen.io" = {
useACMEHost = "protogen.io";
forceSSL = true;
locations."/".return = "302 https://redlib.protogen.io$request_uri";
};
"redlib.protogen.io" = mkAuthProxy 8087;
"rss.protogen.io" = mkReverseProxy 8082;
"blahaj.protogen.io" = mkReverseProxy 8086;
@ -300,15 +305,15 @@
# needed for mDNS in Home Assistant
networking.firewall.allowedUDPPorts = [ 5353 ];
systemd.services.libreddit.environment = {
LIBREDDIT_DEFAULT_SUBSCRIPTIONS = lib.pipe ./reddit-subscriptions.txt [
systemd.services.redlib.environment = {
REDLIB_DEFAULT_SUBSCRIPTIONS = lib.pipe ./reddit-subscriptions.txt [
builtins.readFile
(lib.splitString "\n")
(lib.filter (x: x != ""))
(lib.concatStringsSep "+")
];
};
services.libreddit = {
services.redlib = {
enable = true;
port = 8087;
package = pkgs.redlib;