diff --git a/flake.nix b/flake.nix index 6307951..505eb74 100644 --- a/flake.nix +++ b/flake.nix @@ -287,7 +287,7 @@ in builtins.mapAttrs (hostname: curried: curried hostname) { #hostname "domain" "system" inputs "state" [ modules ... ] asgaut = mk "pbsds.net" "riscv64-linux" inputs-2405 "24.05" [ hw.starfive-visionfive-2 ]; - noximilien = mk "pbsds.net" "x86_64-linux" inputs-2405 "24.05" [ au ts1 tse intel ]; + noximilien = mk "pbsds.net" "x86_64-linux" inputs-2411 "24.05" [ au ts1 tse intel ]; brumlebasse = mk "pbsds.net" "x86_64-linux" inputs-2405 "24.05" [ au amd nspawn ]; nord = mk "pbsds.net" "x86_64-linux" inputs-2411 "24.05" [ au ts1 intel-novga hw.common-gpu-intel-sandy-bridge rocm hidpi ]; sopp = mk "pbsds.net" "x86_64-linux" inputs-edge "24.05" [ au ts1 nixld intel cuda p1005 ]; diff --git a/hosts/nixos/noximilien/configuration.nix b/hosts/nixos/noximilien/configuration.nix index 5b126f5..012cb3f 100644 --- a/hosts/nixos/noximilien/configuration.nix +++ b/hosts/nixos/noximilien/configuration.nix @@ -37,7 +37,7 @@ #../../../profiles/http/services/jellyfin.nix ../../../profiles/http/services/plex.nix #../../../profiles/http/services/tautulli.nix # will run a first-time-setup where admin account is made - ../../../profiles/http/services/libreddit.nix + ../../../profiles/http/services/redlib.nix #../../../profiles/http/services/mattermost.nix #../../../profiles/http/services/navidrome.nix #../../../profiles/http/services/netdata.nix # put behind firewall @@ -46,7 +46,7 @@ #../../../profiles/http/services/microbin.nix # TODO: move out of home net #../../../profiles/http/services/owncast.nix #../../../profiles/http/services/paperless.nix - /* ../../../profiles/http/services/polaris.nix */ + ../../../profiles/http/services/polaris.nix #../../../profiles/http/services/resilio.nix ../../../profiles/http/services/roundcube.nix #../../../profiles/http/services/snappymail.nix # WIP diff --git a/profiles/http/index/default.nix b/profiles/http/index/default.nix index 6f4da82..979893d 100644 --- a/profiles/http/index/default.nix +++ b/profiles/http/index/default.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, mkDomain, allSubdomains, ... }: let # TODO: support fully qualified urls as well + # `null` means filter customDescriptions = rec { index = "This page"; "links.pbsds.net" = "Linktree"; @@ -14,6 +15,7 @@ let docs = "Various documentation"; element = pkgs.element-web.meta.description; shlink = "Url shortener"; + libreddit = null; head = pkgs.headscale.meta.description; }; @@ -48,7 +50,7 @@ in
urldescription - ${lib.concatStringsSep "\n" (map mkRow allSubdomains)} + ${lib.concatStringsSep "\n" (map mkRow (builtins.filter (domain: getDesc domain != null) allSubdomains))}
''; }; diff --git a/profiles/http/services/libreddit.nix b/profiles/http/services/libreddit.nix deleted file mode 100644 index 1a47d12..0000000 --- a/profiles/http/services/libreddit.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, pkgs, lib, mkDomain, ... }: -{ - # Libreddit - # Private front-end for Reddit - - services.libreddit = { - enable = true; - address = "127.0.0.1"; - port = 4876; - }; - systemd.services.libreddit.environment = lib.mkIf config.services.libreddit.enable { - # https://github.com/spikecodes/libreddit#change-default-settings= - # TODO: merge my module addition - LIBREDDIT_DEFAULT_THEME = "gold"; - }; - services.nginx.virtualHosts.${mkDomain "libreddit"} = lib.mkIf config.services.libreddit.enable { - forceSSL = true; # addSSL = true; - enableACME = true; #useACMEHost = acmeDomain; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.libreddit.port}"; - proxyWebsockets = true; - }; - }; - -} diff --git a/profiles/http/services/redlib.nix b/profiles/http/services/redlib.nix new file mode 100644 index 0000000..17b0cd9 --- /dev/null +++ b/profiles/http/services/redlib.nix @@ -0,0 +1,33 @@ +{ config, pkgs, lib, mkDomain, ... }: +{ + # redlib, previously libreddit + # Private front-end for Reddit + + services.redlib = { + enable = true; + address = "127.0.0.1"; + port = 4876; + }; + systemd.services.redlib.environment = lib.mkIf config.services.redlib.enable { + # https://github.com/redlib-org/redlib?tab=readme-ov-file#default-user-settings + # TODO: merge my module addition + REDLIB_DEFAULT_THEME = "gold"; + }; + services.nginx.virtualHosts.${mkDomain "redlib"} = lib.mkIf config.services.redlib.enable { + /* serverAliases = [ (mkDomain "libreddit") ]; */ + forceSSL = true; # addSSL = true; + enableACME = true; #useACMEHost = acmeDomain; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.redlib.port}"; + proxyWebsockets = true; + }; + }; + services.nginx.virtualHosts.${mkDomain "libreddit"} = lib.mkIf config.services.redlib.enable { + forceSSL = true; # addSSL = true; + enableACME = true; #useACMEHost = acmeDomain; + locations."/".extraConfig = '' + return 301 https://${mkDomain "redlib"}$request_uri; + ''; + }; + +} diff --git a/profiles/mounts/common-zfs.nix b/profiles/mounts/common-zfs.nix index d2786fb..93964b3 100644 --- a/profiles/mounts/common-zfs.nix +++ b/profiles/mounts/common-zfs.nix @@ -34,6 +34,7 @@ # the `sharenfs` property generates /etc/exports.d/zfs.exports file, automatically processed by NFS # https://man.archlinux.org/man/core/nfs-utils/exports.5.en # # zfs set sharenfs="-maproot=0:0 -network=192.168.1.0/24" Reidun/shared + # # zfs set sharenfs="-maproot=0:0 -network=192.168.1.0/24" Freon/Music # # zfs set sharenfs="ro=192.168.1.0/24,all_squash,anonuid=70,anongid=70" Meconium # # zfs set sharenfs="rw=@192.168.1.0/24" Meconium # # zfs set sharenfs="rw=@100.64.0.0/10" Meconium