push
This commit is contained in:
1 parent
8d55b87546
commit
c86ee98def
14 files changed
+472
-111
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{
|
||||
# Private Nix binary cache. Caches are created private; pulling needs a token (netrc).
|
||||
den.aspects.services.attic = let port = 8090; in {
|
||||
tunnel = { subdomain = "cache"; inherit port; };
|
||||
|
||||
nixos = { config, host, ... }: {
|
||||
services.atticd = {
|
||||
enable = true;
|
||||
# ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=...
|
||||
environmentFile = "${config.users.users.${host.owner}.home}/.config/attic/env";
|
||||
settings = {
|
||||
listen = "127.0.0.1:${toString port}";
|
||||
# No api-endpoint: CI uploads stay on localhost (Cloudflare caps bodies at 100MB).
|
||||
substituter-endpoint = "https://cache.${host.domain}/";
|
||||
# Big NARs (darling rootfs) dedupe better in chunks.
|
||||
chunking = {
|
||||
nar-size-threshold = 64 * 1024;
|
||||
min-size = 16 * 1024;
|
||||
avg-size = 64 * 1024;
|
||||
max-size = 256 * 1024;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
# Gitea Actions runner on box itself; jobs run directly on the host (label "native").
|
||||
den.aspects.services.gitea-runner.nixos = { config, host, pkgs, ... }: let
|
||||
home = config.users.users.${host.owner}.home;
|
||||
in {
|
||||
# Owner's GitHub SSH key, readable by jobs at $CREDENTIALS_DIRECTORY/github; never in Gitea.
|
||||
systemd.services."gitea-runner-${config.networking.hostName}".serviceConfig.LoadCredential = [ "github:${home}/.ssh/id_rsa" ];
|
||||
|
||||
services.gitea-actions-runner.instances.${config.networking.hostName} = {
|
||||
enable = true;
|
||||
name = config.networking.hostName;
|
||||
url = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
# TOKEN=<registration token from `gitea actions generate-runner-token`>
|
||||
tokenFile = "${config.users.users.${host.owner}.home}/.config/gitea-runner/token";
|
||||
labels = [ "native:host" ];
|
||||
hostPackages = with pkgs; [ bash coreutils gnused gnugrep findutils git openssh curl jq nix nodejs attic-client ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,10 +16,12 @@
|
||||
defaults.email = "security@${domain}";
|
||||
|
||||
certs."mx.${domain}" = {
|
||||
listenHTTP = ":1360";
|
||||
listenHTTP = ":80";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
den.aspects.services.redlib = let port = 8975; in {
|
||||
tunnel = { subdomain = "reddit"; inherit port; };
|
||||
|
||||
nixos = { pkgs, lib, ... }: {
|
||||
services.redlib = {
|
||||
enable = true;
|
||||
|
||||
# upstream main with the wreq TLS-fingerprint fix for Reddit OAuth 401s
|
||||
package = pkgs.redlib.overrideAttrs (old: rec {
|
||||
version = "0.36.0-unstable-2026-04-24";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "redlib-org";
|
||||
repo = "redlib";
|
||||
rev = "a4d36e954cf1bd64f209cd8868c5a29edc81b374";
|
||||
hash = "sha256-siyD6A12UALQIV7BMd7zu1TaojleTEYtpxPszuhx1/Y=";
|
||||
};
|
||||
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
hash = "sha256-eO3c7rlFna3DuO31etJ6S4c7NmcvgvIWZ1KVkNIuUqQ=";
|
||||
};
|
||||
|
||||
# BoringSSL via boring-sys2
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ (with pkgs; [
|
||||
cmake go perl git rustPlatform.bindgenHook
|
||||
]);
|
||||
|
||||
checkFlags = (old.checkFlags or [ ]) ++ [
|
||||
"--skip=oauth::tests::test_generic_web_backend"
|
||||
"--skip=oauth::tests::test_mobile_spoof_backend"
|
||||
];
|
||||
});
|
||||
|
||||
address = "127.0.0.1";
|
||||
port = port;
|
||||
|
||||
settings = {
|
||||
SFW_ONLY = "off";
|
||||
ROBOTS_DISABLE_INDEXING = "on";
|
||||
ENABLE_RSS = "on";
|
||||
THEME = "system";
|
||||
FRONT_PAGE = "default";
|
||||
LAYOUT = "card";
|
||||
WIDE = "on";
|
||||
POST_SORT = "hot";
|
||||
COMMENT_SORT = "confidence";
|
||||
BLUR_SPOILER = "off";
|
||||
SHOW_NSFW = "on";
|
||||
BLUR_NSFW = "off";
|
||||
USE_HLS = "on";
|
||||
HIDE_HLS_NOTIFICATION = "off";
|
||||
AUTOPLAY_VIDEOS = "off";
|
||||
HIDE_AWARDS = "off";
|
||||
DISABLE_VISIT_REDDIT_CONFIRMATION = "off";
|
||||
HIDE_SCORE = "off";
|
||||
HIDE_SIDEBAR_AND_SUMMARY = "off";
|
||||
FIXED_NAVBAR = "on";
|
||||
REMOVE_DEFAULT_FEEDS = "off";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.redlib = {
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Restart = lib.mkForce "always";
|
||||
RestartSec = "30s";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user