fediwall: init at 0.4.0 (#413666)

Changed files
+205
maintainers
nixos
doc
manual
release-notes
modules
services
web-apps
pkgs
by-name
fe
fediwall
fediwall-unwrapped
+11
maintainers/maintainer-list.nix
···
github = "tpwrules";
githubId = 208010;
};
traverseda = {
email = "traverse.da@gmail.com";
github = "traverseda";
···
github = "tpwrules";
githubId = 208010;
};
+
transcaffeine = {
+
name = "transcaffeine";
+
email = "transcaffeine@finally.coffee";
+
github = "transcaffeine";
+
githubId = 139544537;
+
keys = [
+
{
+
fingerprint = "5E0A 9CB3 9806 57CB 9AB9 4AE6 790E AEC8 F99A B41F";
+
}
+
];
+
};
traverseda = {
email = "traverse.da@gmail.com";
github = "traverseda";
+2
nixos/doc/manual/release-notes/rl-2511.section.md
···
- [Pi-hole](https://pi-hole.net/), a DNS sinkhole for advertisements based on Dnsmasq. Available as [services.pihole-ftl](#opt-services.pihole-ftl.enable), and [services.pihole-web](#opt-services.pihole-web.enable) for the web GUI and API.
- [FileBrowser](https://filebrowser.org/), a web application for managing and sharing files. Available as [services.filebrowser](#opt-services.filebrowser.enable).
- Options under [networking.getaddrinfo](#opt-networking.getaddrinfo.enable) are now allowed to declaratively configure address selection and sorting behavior of `getaddrinfo` in dual-stack networks.
···
- [Pi-hole](https://pi-hole.net/), a DNS sinkhole for advertisements based on Dnsmasq. Available as [services.pihole-ftl](#opt-services.pihole-ftl.enable), and [services.pihole-web](#opt-services.pihole-web.enable) for the web GUI and API.
+
- [Fediwall](https://fediwall.social), a web application for live displaying toots from mastodon, inspired by mastowall. Available as [services.fediwall](#opt-services.fediwall.enable).
+
- [FileBrowser](https://filebrowser.org/), a web application for managing and sharing files. Available as [services.filebrowser](#opt-services.filebrowser.enable).
- Options under [networking.getaddrinfo](#opt-networking.getaddrinfo.enable) are now allowed to declaratively configure address selection and sorting behavior of `getaddrinfo` in dual-stack networks.
+1
nixos/modules/module-list.nix
···
./services/web-apps/eintopf.nix
./services/web-apps/engelsystem.nix
./services/web-apps/ethercalc.nix
./services/web-apps/fider.nix
./services/web-apps/filebrowser.nix
./services/web-apps/filesender.nix
···
./services/web-apps/eintopf.nix
./services/web-apps/engelsystem.nix
./services/web-apps/ethercalc.nix
+
./services/web-apps/fediwall.nix
./services/web-apps/fider.nix
./services/web-apps/filebrowser.nix
./services/web-apps/filesender.nix
+128
nixos/modules/services/web-apps/fediwall.nix
···
···
+
{
+
lib,
+
pkgs,
+
config,
+
...
+
}:
+
+
let
+
cfg = config.services.fediwall;
+
pkg = cfg.package.override { conf = cfg.settings; };
+
format = pkgs.formats.json { };
+
in
+
{
+
options.services.fediwall = {
+
enable = lib.mkEnableOption "fediwall, a social media wall for the fediverse";
+
package = lib.mkPackageOption pkgs "fediwall" { };
+
hostName = lib.mkOption {
+
type = lib.types.str;
+
default = config.networking.fqdnOrHostName;
+
defaultText = lib.literalExpression "config.networking.fqdnOrHostName";
+
example = "fediwall.example.org";
+
description = "The hostname to serve fediwall on.";
+
};
+
settings = lib.mkOption {
+
default = { };
+
description = ''
+
Fediwall configuration. See
+
https://github.com/defnull/fediwall/blob/main/public/wall-config.json.example
+
for information on supported values.
+
'';
+
type = lib.types.submodule {
+
freeformType = format.type;
+
options = {
+
servers = lib.mkOption {
+
type = with lib.types; listOf str;
+
default = [ "mastodon.social" ];
+
description = "Servers to load posts from";
+
};
+
tags = lib.mkOption {
+
type = with lib.types; listOf str;
+
default = [ ];
+
example = lib.literalExpression "[ \"cats\" \"dogs\"]";
+
description = "Tags to follow";
+
};
+
loadPublic = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = "Load public posts";
+
};
+
loadFederated = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = "Load federated posts";
+
};
+
loadTrends = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = "Load trending posts";
+
};
+
hideSensitive = lib.mkOption {
+
type = lib.types.bool;
+
default = true;
+
description = "Hide sensitive (potentially NSFW) posts";
+
};
+
hideBots = lib.mkOption {
+
type = lib.types.bool;
+
default = true;
+
description = "Hide posts from bot accounts";
+
};
+
hideReplies = lib.mkOption {
+
type = lib.types.bool;
+
default = true;
+
description = "Hide replies";
+
};
+
hideBoosts = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = "Hide boosts";
+
};
+
showMedia = lib.mkOption {
+
type = lib.types.bool;
+
default = true;
+
description = "Show media in posts";
+
};
+
playVideos = lib.mkOption {
+
type = lib.types.bool;
+
default = true;
+
description = "Autoplay videos in posts";
+
};
+
};
+
};
+
};
+
nginx = lib.mkOption {
+
type = lib.types.submodule (
+
lib.recursiveUpdate (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) { }
+
);
+
default = { };
+
example = lib.literalExpression ''
+
{
+
serverAliases = [
+
"fedi.''${config.networking.domain}"
+
];
+
# Enable TLS and use let's encrypt for ACME
+
forceSSL = true;
+
enableACME = true;
+
}
+
'';
+
description = "Allows customizing the nginx virtualHost settings";
+
};
+
};
+
+
config = lib.mkIf cfg.enable {
+
services.nginx = {
+
enable = lib.mkDefault true;
+
virtualHosts."${cfg.hostName}" = lib.mkMerge [
+
cfg.nginx
+
{
+
root = lib.mkForce "${pkg}";
+
locations = {
+
"/" = {
+
index = "index.html";
+
};
+
};
+
}
+
];
+
};
+
};
+
}
+38
pkgs/by-name/fe/fediwall-unwrapped/package.nix
···
···
+
{
+
lib,
+
fetchFromGitHub,
+
buildNpmPackage,
+
}:
+
+
let
+
version = "1.4.0";
+
in
+
buildNpmPackage {
+
pname = "fediwall";
+
inherit version;
+
+
src = fetchFromGitHub {
+
owner = "defnull";
+
repo = "fediwall";
+
tag = "v${version}";
+
hash = "sha256-aEY6mO7Es+H6CNE4shj/jz47nUeEIxGijKbUscIp0pM=";
+
};
+
+
npmDepsHash = "sha256-0VQ/CBqpQNqjg3lug+AQfFVbh0KhEaGwd+cEakBr/Dc=";
+
+
installPhase = ''
+
runHook preInstall
+
+
cp -r dist $out
+
+
runHook postInstall
+
'';
+
+
meta = {
+
description = "Social media wall for the Fediverse";
+
homepage = "https://fediwall.social";
+
license = lib.licenses.agpl3Plus;
+
platforms = lib.platforms.all;
+
maintainers = with lib.maintainers; [ transcaffeine ];
+
};
+
}
+25
pkgs/by-name/fe/fediwall/package.nix
···
···
+
{
+
lib,
+
stdenv,
+
fediwall-unwrapped,
+
conf ? { },
+
}:
+
+
if (conf == { }) then
+
fediwall-unwrapped
+
else
+
stdenv.mkDerivation {
+
pname = "fediwall";
+
inherit (fediwall-unwrapped) version meta;
+
+
dontUnpack = true;
+
+
installPhase = ''
+
runHook preInstall
+
mkdir -p $out
+
ln -s ${fediwall-unwrapped}/* $out
+
echo ${lib.escapeShellArg (builtins.toJSON conf)} \
+
> "$out/wall-config.json"
+
runHook postInstall
+
'';
+
}