This commit is contained in:
4DBug
2026-02-22 22:25:44 -06:00
parent 22df37a203
commit 2fb9359a67
12 changed files with 181 additions and 88 deletions

24
flake.lock generated
View File

@@ -74,11 +74,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1771354440, "lastModified": 1771709154,
"narHash": "sha256-WuwTJAZh1Sot89h63kKWIMhy8ComS+sv1BsijvYhX5E=", "narHash": "sha256-OtbD6omjc5fZ8eWDgZe6JC9OvRbYU7+E/FUlZaydX/Q=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "f1a433a61718947853162043d3dd66905adc2657", "rev": "f5e70c7f6729e4f905863dbf057649eeac9425ec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,11 +89,11 @@
}, },
"den": { "den": {
"locked": { "locked": {
"lastModified": 1771364340, "lastModified": 1771679476,
"narHash": "sha256-i6IoHdOqdJHjJHuTIZqPJVDn6VVOG1nyRXR70qYQej4=", "narHash": "sha256-rU58QADljRw8/d0ciRtMeaB4/Y/V8JQBlhT1TTvaKmc=",
"owner": "vic", "owner": "vic",
"repo": "den", "repo": "den",
"rev": "f8cb8c618e1680e99c165d2bf826600170abb5a2", "rev": "61341ee04b80104bdd22a60541fb8c4c3b49d342",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -246,11 +246,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771505064, "lastModified": 1771683283,
"narHash": "sha256-lh9rF+C/nKFyWAqbHIa6tK9L/6N0UaQg7zw15aP4jBM=", "narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a0a01d8811fd5e99e003078ed64a0e7b531545dd", "rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -385,11 +385,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1771428844, "lastModified": 1771626923,
"narHash": "sha256-rTzo6bZEsdT7yHUZ0B4BYe32XQZzm8SiWKvWLJnxerE=", "narHash": "sha256-Mn6oeKrY+Sw6kH0jK+hp5QQH4MTcqwBRQL/ScZDNcz8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "stylix", "repo": "stylix",
"rev": "801843d10e9e22d7a00f660d069e2de70aa2980a", "rev": "b09847414b50c65788936199918272377f70fb91",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -19,7 +19,6 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cosmic-applets
cosmic-edit cosmic-edit
cosmic-ext-calculator cosmic-ext-calculator
cosmic-ext-tweaks cosmic-ext-tweaks

View File

@@ -2,6 +2,7 @@
{ den, ... }: { { den, ... }: {
den.aspects.box = { den.aspects.box = {
includes = with den.aspects; [ includes = with den.aspects; [
den.default
den.provides.home-manager den.provides.home-manager
syncthing syncthing
fish fish
@@ -12,12 +13,13 @@
glances glances
# invidious # invidious
mailserver mailserver
matrix #matrix
redlib redlib
sish #sish
vscode-server vscode-server
dns dns
openssh openssh
gitea
]; ];
nixos = { nixos = {

View File

@@ -1,6 +1,6 @@
{ {
den.default = { den.default = {
nixos = { pkgs, ... }: { nixos = { pkgs, lib, ... }: {
imports = [ imports = [
/etc/nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
]; ];
@@ -33,7 +33,7 @@
}; };
boot = { boot = {
kernelPackages = pkgs.linuxPackages_zen; #kernelPackages = lib.mkForce pkgs.linuxPackages_zen;
initrd.checkJournalingFS = false; initrd.checkJournalingFS = false;

View File

@@ -1,28 +1,28 @@
{ den, ... }: { { den, ... }: {
den.aspects.laptop = { den.aspects.laptop = {
includes = with den.aspects; [ includes = [
amdgpu den.default
cosmic <amdgpu>
firefox <cosmic>
audio <firefox>
<audio>
den.provides.home-manager den.provides.home-manager
stylix <stylix>
#nvidia <syncthing>
syncthing <swap>
swap <cloudflare-warp>
cloudflare-warp <packages>
packages <development>
development <cad>
cad <mpd>
mpd <virtualisation>
virtualisation <flatpak>
flatpak <fish>
fish <dns>
dns <openssh>
openssh <beets>
beets
]; ];
nixos = { nixos = {

View File

@@ -2,6 +2,7 @@
{ {
den.aspects.nix = { den.aspects.nix = {
includes = with den.aspects; [ includes = with den.aspects; [
den.default
#amdgpu #amdgpu
cosmic cosmic
firefox firefox
@@ -15,7 +16,7 @@
#cloudflare-warp #cloudflare-warp
packages packages
development development
cad #cad
mpd mpd
virtualisation virtualisation
flatpak flatpak

View File

@@ -21,8 +21,9 @@
"tube.bug.tools" = "http://127.0.0.1:3030"; "tube.bug.tools" = "http://127.0.0.1:3030";
"monitor.bug.tools" = "http://127.0.0.1:61208"; "monitor.bug.tools" = "http://127.0.0.1:61208";
"reddit.bug.tools" = "http://127.0.0.1:8975"; "reddit.bug.tools" = "http://127.0.0.1:8975";
"matrix.bug.tools" = "http://127.0.0.1:8008"; #"matrix.bug.tools" = "http://127.0.0.1:8008";
"bug.tools" = "http://127.0.0.1:8080"; #"bug.tools" = "http://127.0.0.1:8080";
"git.bug.tools" = "http://127.0.0.1:3000";
}; };
}; };
}; };

View File

@@ -23,9 +23,9 @@
passwordFile = "/home/bug/mailserver/bug.passwd"; passwordFile = "/home/bug/mailserver/bug.passwd";
}; };
sang = { #sang = {
passwordFile = "/home/bug/nix/sang.passwd"; #passwordFile = "/home/bug/nix/sang.passwd";
}; #};
}; };
groups = { groups = {
@@ -48,7 +48,7 @@
}; };
"/music" = { "/music" = {
path = "/home/bug/Music"; path = "/home/bug/Music/TidalScrape/Downloads/";
access = { access = {
r = "*"; r = "*";
@@ -61,18 +61,18 @@
}; };
}; };
"/sang" = { /* "/sang" = {
path = "/srv/sang"; path = "/srv/sang";
access = { access = {
rw = [ "bug" "sang" ]; rw = [ "bug" ]; #"sang" ];
}; };
flags = { flags = {
fk = 4; fk = 4;
scan = 60; scan = 60;
}; };
}; }; */
}; };
openFilesLimit = 8192; openFilesLimit = 8192;

View File

@@ -1,6 +1,6 @@
{ { den, lib, ... }: {
den.aspects.invidious = { den.aspects.invidious = {
nixos = { pkgs, lib, ... }: let nixos = { pkgs, ... }: let
companionPort = 8282; companionPort = 8282;
companionPath = "/companion"; companionPath = "/companion";
companionKey = "kKg3RKeZjE7frmvw"; companionKey = "kKg3RKeZjE7frmvw";
@@ -36,21 +36,13 @@
settings = { settings = {
domain = "tube.bug.tools"; domain = "tube.bug.tools";
https_only = true; https_only = false;
external_port = 443; external_port = 3030;
use_pubsub_feeds = true;
use_innertube_for_captions = true;
visitor_data = "Cgt6ZmQ4UEtOUkJJNCjwtcPMBjIKCgJVUxIEGgAgXA%3D%3D";
po_token = "Mni77CY6tviRIrvQXWaz6OfDryNNzAlKeIj4m0N1SHIITM94AZ8R0fK2dfuYke5tjZJjD33c4jB94p1Wy_XKCJPNbSkE2dgzRPdP502Q8ufofOe6fd4hV-fZFitud_tZO_BcNa18nKgfnupVYgV8huPgaFu-RKyGPIU=";
invidious_companion = [ invidious_companion = [
{ private_url = "http://127.0.0.1:${toString companionPort}${companionPath}"; } { private_url = "http://127.0.0.1:${toString companionPort}${companionPath}"; }
]; ];
popular_enabled = true;
invidious_companion_key = companionKey; invidious_companion_key = companionKey;
}; };
}; };

View File

@@ -39,6 +39,8 @@
"discord@bug.tools" "discord@bug.tools"
"github@bug.tools" "github@bug.tools"
"matrix@bug.tools" "matrix@bug.tools"
"fluxer@bug.tools"
"git@bug.tools"
]; ];
}; };

View File

@@ -1,7 +1,103 @@
{ {
den.aspects.matrix = { den.aspects.matrix = {
nixos = { nixos = {
config,
pkgs,
lib,
...
}: let
domain = "bug.tools";
matrixDomain = "matrix.${domain}";
clientConfig = {
"m.homeserver".base_url = "https://${matrixDomain}";
"m.identity_server" = {};
};
serverConfig = {
"m.server" = "${matrixDomain}:443";
};
mkWellKnown = data: ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON data}';
'';
in {
services.matrix-synapse = {
enable = true;
settings = {
server_name = domain;
public_baseurl = "https://${matrixDomain}";
listeners = [
{
port = 8008;
bind_addresses = ["127.0.0.1"];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = ["client" "federation"];
compress = true;
}
];
}
];
database = {
name = "psycopg2";
allow_unsafe_locale = true;
args = {
user = "matrix-synapse";
database = "matrix-synapse";
host = "/run/postgresql";
};
};
max_upload_size_mib = 100;
url_preview_enabled = true;
enable_registration = false;
enable_metrics = false;
registration_shared_secret_path = "/var/lib/matrix-synapse/registration_secret";
trusted_key_servers = [
{
server_name = "matrix.org";
}
];
};
};
services.postgresql = {
enable = true;
ensureDatabases = ["matrix-synapse"];
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
];
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
};
services.nginx.virtualHosts.${matrixDomain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8008";
extraConfig = ''
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
client_max_body_size 100M;
'';
};
};
}; };
}; };
} }

View File

@@ -3,7 +3,7 @@
includes = [ includes = [
den.provides.primary-user den.provides.primary-user
(den.provides.user-shell "fish") (den.provides.user-shell "fish")
den.provides.home-manager #den.provides.home-manager
]; ];
}; };
} }