This commit is contained in:
4DBug
2026-02-18 22:44:39 -06:00
parent bca6b60a3e
commit e5f9674f8d
82 changed files with 9362 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
{ inputs, ... }: {
den.aspects.copyparty = {
nixos = {
imports = [ inputs.copyparty.nixosModules.default ];
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
services.copyparty = {
enable = true;
user = "bug";
group = "copyparty";
settings = {
i = "0.0.0.0";
p = [ 3210 3211 ];
no-reload = true;
ignored-flag = false;
};
accounts = {
bug = {
passwordFile = "/home/bug/mailserver/bug.passwd";
};
sang = {
passwordFile = "/home/bug/nix/sang.passwd";
};
};
groups = {
g1 = [ "bug" ];
};
volumes = {
"/" = {
path = "/srv/copyparty";
access = {
r = "*";
rw = [ "bug" ];
};
flags = {
fk = 4;
scan = 60;
};
};
"/music" = {
path = "/home/bug/Music";
access = {
r = "*";
rw = [ "bug" ];
};
flags = {
fk = 4;
scan = 60;
};
};
"/sang" = {
path = "/srv/sang";
access = {
rw = [ "bug" "sang" ];
};
flags = {
fk = 4;
scan = 60;
};
};
};
openFilesLimit = 8192;
};
};
};
}

View File

@@ -0,0 +1,44 @@
{
den.aspects.glances = {
nixos = { pkgs, ... }: {
environment.systemPackages = [ pkgs.glances ];
users.users.glances = {
isSystemUser = true;
group = "glances";
home = "/var/lib/glances";
createHome = true;
};
users.groups.glances = {};
systemd.services.glances-web = {
description = "glances web interface";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "glances";
Group = "glances";
ExecStart = ''
${pkgs.glances}/bin/glances \
-w \
-p 61208 \
-B 0.0.0.0
'';
Restart = "always";
RestartSec = 5;
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
};
};
};
};
}

View File

@@ -0,0 +1,65 @@
{
den.aspects.invidious = {
nixos = { pkgs, lib, ... }: let
companionPort = 8282;
companionPath = "/companion";
companionKey = "kKg3RKeZjE7frmvw";
in {
virtualisation.podman.enable = true;
virtualisation.oci-containers.backend = lib.mkDefault "podman";
virtualisation.oci-containers.containers.invidious-companion = {
image = "quay.io/invidious/invidious-companion:latest";
extraOptions = [ "--network=host" "--pull=always" ];
environment = {
SERVER_SECRET_KEY = companionKey;
HOST = "127.0.0.1";
PORT = toString companionPort;
SERVER_BASE_URL = "http://127.0.0.1:${toString companionPort}";
# HTTP_PROXY = "http://proxy.example:3128";
# HTTPS_PROXY = "http://proxy.example:3128";
# NO_PROXY = "127.0.0.1,localhost";
};
};
services.invidious = {
enable = true;
package = pkgs.invidious;
address = "127.0.0.1";
port = 3030;
nginx.enable = false;
sig-helper.enable = false;
settings = {
domain = "tube.bug.tools";
https_only = true;
external_port = 443;
use_pubsub_feeds = true;
use_innertube_for_captions = true;
visitor_data = "Cgt6ZmQ4UEtOUkJJNCjwtcPMBjIKCgJVUxIEGgAgXA%3D%3D";
po_token = "Mni77CY6tviRIrvQXWaz6OfDryNNzAlKeIj4m0N1SHIITM94AZ8R0fK2dfuYke5tjZJjD33c4jB94p1Wy_XKCJPNbSkE2dgzRPdP502Q8ufofOe6fd4hV-fZFitud_tZO_BcNa18nKgfnupVYgV8huPgaFu-RKyGPIU=";
invidious_companion = [
{ private_url = "http://127.0.0.1:${toString companionPort}${companionPath}"; }
];
popular_enabled = true;
invidious_companion_key = companionKey;
};
};
systemd.services.invidious = let dep = "podman-invidious-companion.service"; in {
wants = [ dep ];
after = [ dep ];
requires = [ dep ];
};
};
};
}

View File

@@ -0,0 +1,52 @@
{
den.aspects.mailserver = {
nixos = {
imports = [
(builtins.fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/master.tar.gz";
sha256 = "0rm5f749xakmkqrpkl5ay1pydbnlinr50pvwg1vm795js2infmj5";
})
];
security.acme = {
acceptTerms = true;
defaults.email = "security@bug.tools";
certs."mail.bug.tools" = {
listenHTTP = "1360";
};
};
mailserver = {
enable = true;
stateVersion = 3;
fqdn = "mail.bug.tools";
domains = [ "bug.tools" ];
x509.useACMEHost = "mail.bug.tools";
loginAccounts = {
"bug@bug.tools" = {
hashedPasswordFile = "/home/bug/mailserver/bug.passwd";
aliases = [
"admin@bug.tools"
"google@bug.tools"
"apple@bug.tools"
"roblox@bug.tools"
"twitch@bug.tools"
"discord@bug.tools"
"github@bug.tools"
"matrix@bug.tools"
];
};
"pare@bug.tools" = {
hashedPasswordFile = "/home/bug/mailserver/pare.passwd";
};
};
};
};
};
}

View File

@@ -0,0 +1,7 @@
{
den.aspects.matrix = {
nixos = {
};
};
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,37 @@
{
den.aspects.redlib = {
nixos = {
services.redlib = {
enable = true;
address = "127.0.0.1";
port = 8975;
openFirewall = false;
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";
};
};
};
};
}

View File

@@ -0,0 +1,25 @@
{
den.aspects.searxng = {
nixos = {
systemd.services.searx-init.serviceConfig.EnvironmentFile = [
"/home/bug/.searxng.env"
];
services.searx = {
enable = true;
redisCreateLocally = false;
configureUwsgi = false;
settingsFile = ./searxng.yml;
environmentFile = "/home/bug/.searxng.env";
settings = {
general.instance_name = "search.bug.tools";
server.port = 8888;
server.bind_address = "0.0.0.0";
server.secret_key = "$SEARX_SECRET_KEY";
};
};
};
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
{
den.aspects.sish = {
nixos = {
};
};
}

View File

@@ -0,0 +1,11 @@
{
den.aspects.vscode-server = {
nixos = {
imports = [
(fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master")
];
services.vscode-server.enable = true;
};
};
}