Compare commits

...

10 Commits

Author SHA1 Message Date
4DBug
20bd5609e4 push 2026-03-05 11:06:06 -06:00
4DBug
83c72a1742 push 2026-03-03 21:48:51 -06:00
4DBug
aeea92d752 organize 2026-03-03 17:25:37 -06:00
4DBug
c10eca565f ports test 2026-03-03 17:05:04 -06:00
4DBug
4974969c6f move essentials 2026-03-03 15:05:38 -06:00
4DBug
b34040203c organize and configure librewolf 2026-03-03 15:01:19 -06:00
4DBug
a21805e59b organize packages 2026-03-03 12:08:01 -06:00
4DBug
60805bcace update janitor 2026-03-03 09:25:33 -06:00
4DBug
c8361a4c57 organize, update nixcord, add janitor 2026-03-03 09:15:54 -06:00
4DBug
a117ed02a2 gitea mirrors 2026-03-03 02:05:08 -06:00
77 changed files with 1679 additions and 712 deletions

View File

@@ -1,31 +1,75 @@
# nix
[dendritic](https://github.com/vic/den) [nix](https://nixos.org/) configuration.
my [nixos](https://nixos.org/) configuration, structured with [den](https://github.com/vic/den) and [flake-parts](https://github.com/hercules-ci/flake-parts).
## structure
```nix/flake.nix#L1-2
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
```
modules are automatically discovered via [import-tree](https://github.com/vic/import-tree) and composed using `den.aspects`.
```
modules/
├── core/ # System fundamentals (desktop, audio, graphics, network, theme)
├── hosts/ # Per-machine includes (nix, styx, box)
├── infra/ # Infrastructure (syncthing, cloudflared tunnels)
├── services/ # Self-hosted services (searxng, gitea, copyparty, ...)
├── software/ # User software (firefox, nixcord, beets, ...)
└── users/ # User accounts
```
---
## hosts
| host | command |
|-|-|
| [desktop](https://github.com/4DBug/nix/tree/master/modules/hosts/nix/nix.nix) | `nh os switch ~/nix --impure -H nix` |
| [laptop](https://github.com/4DBug/nix/tree/master/modules/hosts/nix/laptop.nix) | `nh os switch ~/nix --impure -H laptop` |
| [server](https://github.com/4DBug/nix/tree/master/modules/hosts/nix/box.nix) | `nh os switch ~/nix --impure -H box` |
## services
| service | location | file |
|-|-|-|
| [invidious](https://github.com/invidious/invidious) | [tube.bug.tools](https://tube.bug.tools/) | /modules/services |
| [glances](https://github.com/nicolargo/glances) | [monitor.bug.tools](https://monitor.bug.tools/) | /modules/services |
| [searxng](https://github.com/searxng/searxng) | [search.bug.tools](https://search.bug.tools/) | /modules/services |
| [redlib](https://github.com/redlib-org/redlibb) | [reddit.bug.tools](https://reddit.bug.tools/) | ./modules/services/searxng/searxng.nix |
| [copyparty](https://github.com/9001/copyparty) | [files.bug.tools](https://files.bug.tools/) | /modules/services |
| [matrix](https://matrix.org/) | [matrix.bug.tools](https://matrix.bug.tools/) | /modules/services |
| [nixos-mailserver](https://gitlab.com/simple-nixos-mailserver/nixos-mailserver) | [mail.bug.tools](https://mail.bug.tools/) | /modules/services |
| [sish](https://docs.ssi.sh/) | [tuns.bug.tools](https://tuns.bug.tools/) | /modules/services |
| [vscode-server](https://github.com/cdr/code-server) | - | /modules/services |
| Host | Role | GPU | Switch Command |
|------|------|-----|----------------|
| `nix` | desktop | nvidia | `nh os switch ~/nix --impure -H nix` |
| `styx` | laptop | amd | `nh os switch ~/nix --impure -H styx` |
| `box` | homeserver | — | `nh os switch ~/nix --impure -H box` |
## software
---
| software | file |
|-|-|
| a | b |
| c | d |
| e | f |
## self-hosted services
all services on `box` are proxied through cloudflared tunnels to `*.bug.tools`.
| Service | URL | Description |
|---------|-----|-------------|
| [searxng](https://github.com/searxng/searxng) | [search.bug.tools](https://search.bug.tools) | Privacy-respecting metasearch engine |
| [redlib](https://github.com/redlib-org/redlib) | [reddit.bug.tools](https://reddit.bug.tools) | Private Reddit frontend *(disabled)* |
| [copyparty](https://github.com/9001/copyparty) | [files.bug.tools](https://files.bug.tools) | File server / uploader |
| [gitea](https://gitea.io/) | [git.bug.tools](https://git.bug.tools) | Self-hosted Git with org mirrors |
| [glances](https://github.com/nicolargo/glances) | [monitor.bug.tools](https://monitor.bug.tools) | System monitoring |
| [nixos-mailserver](https://gitlab.com/simple-nixos-mailserver/nixos-mailserver) | [mail.bug.tools](https://mail.bug.tools) | Email server |
| [invidious](https://github.com/iv-org/invidious) | [tube.bug.tools](https://tube.bug.tools) | YouTube frontend *(disabled)* |
| [matrix](https://matrix.org/) | [matrix.bug.tools](https://matrix.bug.tools) | Matrix homeserver *(disabled)* |
| [sish](https://docs.ssi.sh/) | [tuns.bug.tools](https://tuns.bug.tools) | SSH tunnels *(disabled)* |
| vscode-server | — | Remote VS Code access |
---
## flake inputs
| Input | Purpose |
|-------|---------|
| [nixpkgs](https://github.com/nixos/nixpkgs) (unstable) | Package set |
| [home-manager](https://github.com/nix-community/home-manager) | User environment management |
| [flake-parts](https://github.com/hercules-ci/flake-parts) | Flake structure |
| [den](https://github.com/vic/den) | Dendritic aspect system |
| [import-tree](https://github.com/vic/import-tree) | Auto module discovery |
| [stylix](https://github.com/nix-community/stylix) | System-wide theming |
| [catppuccin/nix](https://github.com/catppuccin/nix) | Catppuccin theme modules |
| [nixcord](https://github.com/FlameFlag/nixcord) | Declarative Vesktop/Discord |
| [nix-flatpak](https://github.com/gmodena/nix-flatpak) | Declarative Flatpak |
| [copyparty](https://github.com/9001/copyparty) | File server |
---
## TODO
fix matrix server
fix invidious instance
fix redlib instance
configure cosmic with home

162
flake.lock generated
View File

@@ -86,17 +86,56 @@
"type": "github"
}
},
"catppuccin-userstyles": {
"flake": false,
"locked": {
"lastModified": 1749817927,
"narHash": "sha256-lftRs+pfcOrqHDtDWX/Vd/CQvDJguCRxlhI/aIkIB/k=",
"owner": "catppuccin",
"repo": "userstyles",
"rev": "714b153c7022c362a37ab8530286a87e4484a828",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "userstyles",
"type": "github"
}
},
"catppuccin-userstyles-nix": {
"inputs": {
"catppuccin-userstyles": "catppuccin-userstyles",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1772639159,
"narHash": "sha256-kMVdp61rzAowZ7ukYq+eam6DMbOSCFXcydKyYjjm7lg=",
"owner": "4DBug",
"repo": "catppuccin-userstyles-nix",
"rev": "20756f27c723caeda354950e89cd9dc041a7b1a7",
"type": "github"
},
"original": {
"owner": "4DBug",
"repo": "catppuccin-userstyles-nix",
"type": "github"
}
},
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1771834427,
"narHash": "sha256-B1j0ahVuxyZtpbFfy34gk2DjacimPIuzyzCPvDhvxI4=",
"lastModified": 1772605780,
"narHash": "sha256-p7IzkFmB1kCtl16+bvLKP1hdP61EFQxj+VSKX2lOWgE=",
"owner": "9001",
"repo": "copyparty",
"rev": "ab8bd0178b26a0b6c6406f7bae835d13b16ef188",
"rev": "00e821db231d143169236971b50b85b9c9edd298",
"type": "github"
},
"original": {
@@ -107,11 +146,11 @@
},
"den": {
"locked": {
"lastModified": 1771679476,
"narHash": "sha256-rU58QADljRw8/d0ciRtMeaB4/Y/V8JQBlhT1TTvaKmc=",
"lastModified": 1772645664,
"narHash": "sha256-7cf6DEczxIHuUFcfbmbLPznf/R35fyvMjgipO9DUyN0=",
"owner": "vic",
"repo": "den",
"rev": "61341ee04b80104bdd22a60541fb8c4c3b49d342",
"rev": "21a1d36a234e7dca490edf1f1de5f1a5033a3652",
"type": "github"
},
"original": {
@@ -138,11 +177,11 @@
},
"flake-aspects": {
"locked": {
"lastModified": 1771395573,
"narHash": "sha256-bcCOG2CW23/Eww/zULJf1xd0Shz2zS4c2AJWwLALyJ8=",
"lastModified": 1772587379,
"narHash": "sha256-Ftbenlg5Kz8j7dZ2dmsUJJbaYkB35IV41+jyvai0RpE=",
"owner": "vic",
"repo": "flake-aspects",
"rev": "8297f3bc41ad79b9f01d56d0dd92f7aac51bacfb",
"rev": "b0f62449459f91c050db9cd1f7709d488fcef48d",
"type": "github"
},
"original": {
@@ -167,11 +206,11 @@
},
"flake-file": {
"locked": {
"lastModified": 1771017549,
"narHash": "sha256-n68HeYEQJ67hMH2LPI0cERD2pkpNe5dyeOGg11uZ7rc=",
"lastModified": 1772343585,
"narHash": "sha256-7jADySzWscA2822JzNbfRdC+R+B7tzDoWavG8DMY1tU=",
"owner": "vic",
"repo": "flake-file",
"rev": "9d89918faacdbd2ce26d0aa7298da0fecad8b437",
"rev": "0f5c1039860127fa5673d362d68f8b7df29a44bc",
"type": "github"
},
"original": {
@@ -187,11 +226,11 @@
]
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
@@ -205,11 +244,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
@@ -240,6 +279,27 @@
}
},
"flake-utils": {
"inputs": {
"systems": [
"catppuccin-userstyles-nix",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
@@ -296,11 +356,11 @@
]
},
"locked": {
"lastModified": 1771683283,
"narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=",
"lastModified": 1772633327,
"narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a",
"rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc",
"type": "github"
},
"original": {
@@ -311,11 +371,11 @@
},
"import-tree": {
"locked": {
"lastModified": 1771045967,
"narHash": "sha256-oYO4poyw0Sb/db2PigqugMlDwsvwLg6CSpFrMUWxA3Q=",
"lastModified": 1772344373,
"narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=",
"owner": "vic",
"repo": "import-tree",
"rev": "c968d3b54d12cf5d9c13f16f7c545a06c9d1fde6",
"rev": "10fda59eee7d7970ec443b925f32a1bc7526648c",
"type": "github"
},
"original": {
@@ -347,11 +407,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1772266502,
"narHash": "sha256-HBO3W1ooO9UwmxwwwFflnbCrAVHhaxpB8YnxFGPvOsY=",
"lastModified": 1772641310,
"narHash": "sha256-Hp3AyU0xX8kiwF5AA8BkziGhQUlUnGUV+P4FAMRG4Kc=",
"owner": "FlameFlag",
"repo": "nixcord",
"rev": "e805e50f0cc8b9f2d950dc81cd9ee1c986899eaf",
"rev": "02760c85446ac5b457c994b5a2ef3168d9b4dd4f",
"type": "github"
},
"original": {
@@ -378,11 +438,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"lastModified": 1772328832,
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github"
},
"original": {
@@ -408,11 +468,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1770617025,
"narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=",
"lastModified": 1772465433,
"narHash": "sha256-ywy9troNEfpgh0Ee+zaV1UTgU8kYBVKtvPSxh6clYGU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482",
"rev": "c581273b8d5bdf1c6ce7e0a54da9841e6a763913",
"type": "github"
},
"original": {
@@ -424,11 +484,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1771207753,
"narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=",
"lastModified": 1772615108,
"narHash": "sha256-lC0KbklwgeSqS+sTkaYpnSYr/HDeVMzYUZqV/dT31Lo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d1c15b7d5806069da59e819999d70e1cec0760bf",
"rev": "0c39f3b5a9a234421d4ad43ab9c7cf64840172d0",
"type": "github"
},
"original": {
@@ -466,6 +526,7 @@
"root": {
"inputs": {
"catppuccin": "catppuccin",
"catppuccin-userstyles-nix": "catppuccin-userstyles-nix",
"copyparty": "copyparty",
"den": "den",
"flake-aspects": "flake-aspects",
@@ -480,7 +541,7 @@
"nixpkgs"
],
"stylix": "stylix",
"systems": "systems_2"
"systems": "systems_3"
}
},
"stylix": {
@@ -496,7 +557,7 @@
"nixpkgs"
],
"nur": "nur",
"systems": "systems",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@@ -504,11 +565,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1771626923,
"narHash": "sha256-Mn6oeKrY+Sw6kH0jK+hp5QQH4MTcqwBRQL/ScZDNcz8=",
"lastModified": 1772296853,
"narHash": "sha256-pAtzPsgHRKw/2Kv8HgAjSJg450FDldHPWsP3AKG/Xj0=",
"owner": "nix-community",
"repo": "stylix",
"rev": "b09847414b50c65788936199918272377f70fb91",
"rev": "c4b8e80a1020e09a1f081ad0f98ce804a6e85acf",
"type": "github"
},
"original": {
@@ -518,6 +579,21 @@
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -532,7 +608,7 @@
"type": "github"
}
},
"systems_2": {
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View File

@@ -3,19 +3,27 @@
inputs = {
den.url = "github:vic/den";
flake-aspects.url = "github:vic/flake-aspects";
flake-file.url = "github:vic/flake-file";
flake-parts = {
inputs.nixpkgs-lib.follows = "nixpkgs-lib";
url = "github:hercules-ci/flake-parts";
};
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
import-tree.url = "github:vic/import-tree";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-lib.follows = "nixpkgs";
systems.url = "github:nix-systems/default";
stylix = {
@@ -30,5 +38,17 @@
catppuccin.url = "github:catppuccin/nix";
nixcord.url = "github:FlameFlag/nixcord";
catppuccin-userstyles-nix = {
url = "github:4DBug/catppuccin-userstyles-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-citizen.url = "github:LovingMelody/nix-citizen";
# nix-gaming.url = "github:fufexan/nix-gaming";
# nix-citizen.inputs.nix-gaming.follows = "nix-gaming";
# hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
};
}

22
modules/core/boot.nix Normal file
View File

@@ -0,0 +1,22 @@
{
den.aspects.boot = {
nixos = {
boot = {
# kernelPackages = lib.mkForce pkgs.linuxPackages_zen;
initrd.checkJournalingFS = false;
loader = {
grub.splashImage = null;
systemd-boot = {
enable = true;
configurationLimit = 25;
};
efi.canTouchEfiVariables = true;
};
};
};
};
}

View File

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

View File

@@ -0,0 +1,34 @@
let
uuid = "4118935e-359b-4dd2-95bd-eb27f7b0c5bb";
domain = "bug.tools";
creds = "/home/bug/.cloudflared/${uuid}.json";
in {
den.aspects.cloudflared = {
nixos = { config, pkgs, lib, ... }: {
options.den.tunnels = lib.mkOption {
default = [];
description = "cloudflared tunnels";
type = lib.types.listOf lib.types.str;
};
config = {
environment.systemPackages = [ pkgs.cloudflared ];
environment.etc."cloudflared/${uuid}.json".source = creds;
services.cloudflared = {
enable = true;
tunnels.${uuid} = {
credentialsFile = "/etc/cloudflared/${uuid}.json";
default = "http_status:404";
ingress = lib.listToAttrs (map (subdomain: {
name = "${subdomain}.${domain}";
value = "http://127.0.0.1:${toString config.den.portmap.${subdomain}}";
}) config.den.tunnels);
};
};
};
};
};
}

View File

@@ -0,0 +1,45 @@
{
den.aspects.syncthing = {
homeManager = let
devices = ["desktop" "laptop" "server"];
mkFolder = path: {
inherit path;
devices = devices;
};
in {
services.syncthing = {
enable = true;
overrideDevices = true;
overrideFolders = true;
key = "/home/bug/.syncthing/key.pem";
cert = "/home/bug/.syncthing/cert.pem";
settings = {
devices = {
desktop.id = "VEZXY3W-U6UXWTP-6BHANIG-O5EKNZY-XNV5YOX-4V4O3HB-ETECIUX-T2DK7AV";
laptop.id = "I6NW53P-IJMMT73-7O53TXY-3GAHS2U-4EAADM7-ZNB5ZPB-62QHKVW-H7DYXQ2";
server.id = "KJECAIP-Y2Y3FHV-NOJKIQV-LWIDMMZ-5ITEAZ4-LQCQL72-3BGW6T7-BFPFJQA";
};
folders = {
"Archives" = mkFolder "/home/bug/Archives";
"Software" = mkFolder "/home/bug/Software";
"Scripts" = mkFolder "/home/bug/Scripts";
"Documents" = mkFolder "/home/bug/Documents";
"Downloads" = mkFolder "/home/bug/Downloads";
"Pictures" = mkFolder "/home/bug/Pictures";
"Videos" = mkFolder "/home/bug/Videos";
"Music" = mkFolder "/home/bug/Music";
"nix" = mkFolder "/home/bug/nix";
"hytale" = mkFolder "/home/bug/.local/share/Hytale/UserData/Saves";
"ssh" = mkFolder "/home/bug/.ssh";
"cloudflared" = mkFolder "/home/bug/.cloudflared";
};
};
};
};
};
}

23
modules/core/locale.nix Normal file
View File

@@ -0,0 +1,23 @@
{
den.aspects.locale = {
nixos = {
time.timeZone = "America/Chicago";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
};
};
}

View File

@@ -1 +1,41 @@
{}
{
den.aspects.crab-hole = {
nixos = { ... }: {
services.crab-hole = {
enable = true;
settings = {
blocklist = {
include_subdomains = true;
lists = [
"https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts"
"https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt"
];
};
downstream = [
{ protocol = "udp"; listen = "127.0.0.1"; port = 53; }
{ protocol = "udp"; listen = "::1"; port = 53; }
];
upstream = {
name_servers = [
{
socket_addr = "1.1.1.1:853";
protocol = "tls";
tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com";
trust_nx_responses = false;
}
{
socket_addr = "[2606:4700:4700::1111]:853";
protocol = "tls";
tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com";
trust_nx_responses = false;
}
];
};
};
};
};
};
}

View File

@@ -1,10 +1,15 @@
{
den.aspects.dns = {
nixos = {
nixos = { config, lib, ... }: {
networking = {
networkmanager.enable = true;
networkmanager = {
enable = true;
dns = lib.mkIf config.services.crab-hole.enable "none";
};
nameservers = [ "1.1.1.1" "1.0.0.1" ];
nameservers = if config.services.crab-hole.enable
then [ "127.0.0.1" "::1" ]
else [ "1.1.1.1" "1.0.0.1" ];
};
};
};

10
modules/core/security.nix Normal file
View File

@@ -0,0 +1,10 @@
{
den.aspects.security = {
nixos = {
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
};
};
}

View File

@@ -3,11 +3,12 @@ let
isNormalUser = true;
description = "bug";
extraGroups = [ "networkmanager" "wheel" "audio" "video" "libvirtd" "ydotool" "dialout" ];
classes = [ "homeManager" ];
};
in {
den.hosts.x86_64-linux = {
nix.users.bug = bug;
laptop.users.bug = bug;
styx.users.bug = bug;
box.users.bug = bug;
};

View File

@@ -1,39 +1,32 @@
{ den, ... }: {
den.aspects.box = {
includes = with den.aspects; [
den.default
den.provides.home-manager
syncthing
fish
#cloudflared
cloudflared
portmap
searxng
copyparty
glances
# invidious
invidious
mailserver
# matrix
redlib
# sish
vscode-server
dns
openssh
gitea
catppuccin
(tunnel 3001 "tvtun")
(tunnel 8888 "search")
(tunnel 3210 "files")
(tunnel 3030 "tube")
(tunnel 8975 "reddit")
(tunnel 3002 "git")
(tunnel 61208 "monitor")
janitor
];
nixos = {
networking.hostName = "box";
# den.tunnels = [ "tvtun" ];
users.users.levi = {
isNormalUser = true;
description = "levi";

29
modules/hosts/common.nix Normal file
View File

@@ -0,0 +1,29 @@
{ den, ... }: {
den.aspects.common = {
includes = with den.aspects; [
den.default
cosmic
audio
swap
virtualisation
stylix
flatpak
development
compatibility
utilities
firefox
librewolf
music
social
gaming
crab-hole
];
};
}

View File

@@ -1,12 +1,27 @@
{
{ den, ... }: {
den.default = {
nixos = { pkgs, lib, ... }: {
includes = with den.aspects; [
boot
security
locale
essentials
dns
openssh
syncthing
fish
];
nixos = { ... }: {
imports = [
/etc/nixos/hardware-configuration.nix
];
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "hm-backup";
home-manager = {
useGlobalPkgs = true;
backupFileExtension = "hm-backup";
};
system = {
stateVersion = "26.05";
@@ -17,85 +32,16 @@
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
};
nixpkgs.config.allowUnfree = true;
nix = {
optimise.automatic = true;
settings.experimental-features = [ "nix-command" "flakes" ];
};
security = {
sudo = {
enable = true;
wheelNeedsPassword = false;
};
};
boot = {
#kernelPackages = lib.mkForce pkgs.linuxPackages_zen;
initrd.checkJournalingFS = false;
loader = {
grub.splashImage = null;
systemd-boot = {
enable = true;
configurationLimit = 25;
};
efi.canTouchEfiVariables = true;
};
};
environment.systemPackages = with pkgs; [
comma
fastfetch
git
home-manager
inetutils
micro
nh
nil
nixd
nixfmt
nix-index
nix-output-monitor
nix-prefetch
nvd
psmisc
tree
unzip
wget
];
time.timeZone = "America/Chicago";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
};
homeManager = {
home = {
stateVersion = "26.05";
};
home.stateVersion = "26.05";
};
};
}

View File

@@ -1,41 +0,0 @@
{ den, ... }: {
den.aspects.laptop = {
includes = with den.aspects; [
den.default
den.aspects.amdgpu
cosmic
firefox
audio
den.provides.home-manager
stylix
syncthing
swap
cloudflare-warp
packages
development
cad
mpd
virtualisation
flatpak
fish
dns
openssh
beets
catppuccin
#librewolf
nixcord
organize
];
nixos = {
networking.hostName = "nix";
services.logind.settings.Login = {
HandleLidSwitch = "ignore";
HandleLidSwitchDocked = "ignore";
};
};
};
}

17
modules/hosts/nix.nix Normal file
View File

@@ -0,0 +1,17 @@
{ den, ... }: {
den.aspects.nix = {
includes = with den.aspects; [
common
nvidia
catppuccin
janitor
];
nixos = {
networking.hostName = "nix";
};
};
}

View File

@@ -1,36 +0,0 @@
{ den, ... }:
{
den.aspects.nix = {
includes = with den.aspects; [
den.default
#amdgpu
cosmic
firefox
audio
den.provides.home-manager
stylix
nvidia
syncthing
swap
#cloudflare-warp
packages
development
#cad
mpd
virtualisation
flatpak
fish
dns
openssh
beets
catppuccin
# librewolf
nixcord
];
nixos = {
networking.hostName = "nix";
};
};
}

24
modules/hosts/styx.nix Normal file
View File

@@ -0,0 +1,24 @@
{ den, ... }: {
den.aspects.styx = {
includes = with den.aspects; [
common
amdgpu
cloudflare-warp
cad
catppuccin
janitor
];
nixos = {
networking.hostName = "styx";
services.logind.settings.Login = {
HandleLidSwitch = "ignore";
HandleLidSwitchDocked = "ignore";
};
};
};
}

View File

@@ -1,32 +0,0 @@
{ den, ... }: let
tunnel_uuid = "4118935e-359b-4dd2-95bd-eb27f7b0c5bb";
domain = "bug.tools";
creds = "/home/bug/.cloudflared/${tunnel_uuid}.json";
tunnel = port: subdomain: { pkgs, ... }: {
environment = {
systemPackages = [ pkgs.cloudflared ];
etc."cloudflared/${tunnel_uuid}.json".source = creds;
};
services.cloudflared = {
enable = true;
tunnels.${tunnel_uuid} = {
credentialsFile = "/etc/cloudflared/${tunnel_uuid}.json";
default = "http_status:404";
ingress = {
"${subdomain}.${domain}" = "http://127.0.0.1:${toString port}";
};
};
};
};
in {
den.aspects.tunnel = port: subdomain: den.lib.parametric {
includes = [
(_: { nixos = tunnel port subdomain; })
];
};
}

View File

@@ -1,70 +0,0 @@
{
den.aspects.syncthing = {
homeManager = {
services.syncthing = {
enable = true;
overrideDevices = true;
overrideFolders = true;
key = "/home/bug/.syncthing/key.pem";
cert = "/home/bug/.syncthing/cert.pem";
settings = {
devices = {
desktop.id = "VEZXY3W-U6UXWTP-6BHANIG-O5EKNZY-XNV5YOX-4V4O3HB-ETECIUX-T2DK7AV";
laptop.id = "I6NW53P-IJMMT73-7O53TXY-3GAHS2U-4EAADM7-ZNB5ZPB-62QHKVW-H7DYXQ2";
server.id = "KJECAIP-Y2Y3FHV-NOJKIQV-LWIDMMZ-5ITEAZ4-LQCQL72-3BGW6T7-BFPFJQA";
};
folders = {
"Documents" = {
path = "/home/bug/Documents";
devices = ["desktop" "laptop" "server"];
};
"Downloads" = {
path = "/home/bug/Downloads";
devices = ["desktop" "laptop" "server"];
};
"Pictures" = {
path = "/home/bug/Pictures";
devices = ["desktop" "laptop" "server"];
};
"Videos" = {
path = "/home/bug/Videos";
devices = ["desktop" "laptop" "server"];
};
"nix" = {
path = "/home/bug/nix";
devices = ["desktop" "laptop" "server"];
};
"hytale" = {
path = "/home/bug/.local/share/Hytale/UserData/Saves";
devices = ["desktop" "laptop"];
};
"ssh" = {
path = "/home/bug/.ssh";
devices = ["desktop" "laptop" "server"];
};
"cloudflared" = {
path = "/home/bug/.cloudflared";
devices = ["desktop" "laptop" "server"];
};
"Music" = {
path = "/home/bug/Music/";
devices = ["desktop" "laptop" "server"];
};
};
};
};
};
};
}

View File

@@ -1,10 +1,12 @@
{ inputs, ... }: {
den.aspects.copyparty = {
nixos = {
nixos = { config, ... }: {
imports = [ inputs.copyparty.nixosModules.default ];
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
den.tunnels = [ "files" ];
services.copyparty = {
enable = true;
@@ -13,7 +15,7 @@
settings = {
i = "0.0.0.0";
p = [ 3210 3211 ];
p = [ config.den.portmap.files (config.den.portmap.files + 1) ];
no-reload = true;
ignored-flag = false;
};
@@ -22,10 +24,6 @@
bug = {
passwordFile = "/home/bug/mailserver/bug.passwd";
};
#sang = {
#passwordFile = "/home/bug/nix/sang.passwd";
#};
};
groups = {

View File

@@ -1,17 +0,0 @@
{
den.aspects.gitea = {
nixos = {
services.gitea = {
enable = true;
database.type = "mysql";
settings.service = {
DISABLE_REGISTRATION = true;
};
settings.server.HTTP_PORT = 3002;
};
};
};
}

View File

@@ -0,0 +1,218 @@
{
den.aspects.gitea-mirrors = {
nixos = { pkgs, lib, config, ... }:
let
cfg = config.services.gitea;
mcfg = cfg.mirrors;
uniqueOwners = lib.unique (
(map (m: m.owner) mcfg.repos) ++
(map (m: m.owner) mcfg.users)
);
giteaUrl = "http://localhost:${toString cfg.settings.server.HTTP_PORT}";
tokenFile = "${cfg.stateDir}/mirror-setup-token";
repoSource = m:
if m ? source then m.source
else if (m.service or "git") == "github" then "https://github.com/${m.owner}/${m.repo}.git"
else if (m.service or "git") == "gitlab" then "https://gitlab.com/${m.owner}/${m.repo}.git"
else throw "mirrors.repos: '${m.owner}/${m.repo}' has no source and service '${m.service or "git"}' needs an explicit source";
setupScript = pkgs.writeShellScript "gitea-mirror-setup" ''
set -euo pipefail
GITEA_URL="${giteaUrl}"
TOKEN_FILE="${tokenFile}"
GITEA_CMD="${lib.getExe cfg.package}"
for i in $(seq 1 60); do
if ${pkgs.curl}/bin/curl -sf "$GITEA_URL/api/v1/version" >/dev/null 2>&1; then
break
fi
sleep 2
done
$GITEA_CMD admin user create \
--username "${mcfg.admin.user}" \
--email "${mcfg.admin.email}" \
--random-password \
--admin \
--must-change-password=false 2>/dev/null || true
if [ ! -f "$TOKEN_FILE" ]; then
TOKEN=$($GITEA_CMD admin user generate-access-token \
--username "${mcfg.admin.user}" \
--token-name "mirror-setup" \
--scopes "all" \
--raw)
echo "$TOKEN" > "$TOKEN_FILE"
chmod 600 "$TOKEN_FILE"
fi
TOKEN=$(cat "$TOKEN_FILE")
AUTH="Authorization: token $TOKEN"
${lib.concatMapStringsSep "\n" (owner: ''
RAND_PASS=$(${pkgs.openssl}/bin/openssl rand -base64 32)
${pkgs.curl}/bin/curl -sf -X POST "$GITEA_URL/api/v1/admin/users" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d "{
\"username\": \"${owner}\",
\"email\": \"${owner}@git.bug.tools\",
\"password\": \"$RAND_PASS\",
\"must_change_password\": false,
\"visibility\": \"public\"
}" >/dev/null 2>&1 || true
'') uniqueOwners}
${lib.concatMapStringsSep "\n" (m: ''
${pkgs.curl}/bin/curl -sf -X POST "$GITEA_URL/api/v1/repos/migrate" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{
"clone_addr": "${repoSource m}",
"repo_name": "${m.repo}",
"repo_owner": "${m.owner}",
"mirror": true,
"private": false,
"service": "${m.service or "git"}"
}' >/dev/null 2>&1 || true
'') mcfg.repos}
${lib.concatMapStringsSep "\n" (u:
let
platform = u.platform;
owner = u.owner;
baseUrl = u.baseUrl or (if platform == "github" then "https://api.github.com"
else if platform == "gitlab" then "https://gitlab.com"
else if platform == "gitea" then u.baseUrl
else throw "mirrors.users: unsupported platform '${platform}', provide baseUrl");
cloneBase = if platform == "github" then "https://github.com/${owner}"
else if platform == "gitlab" then "${u.baseUrl or "https://gitlab.com"}/${owner}"
else if platform == "gitea" then "${u.baseUrl}/${owner}"
else throw "mirrors.users: unsupported platform '${platform}'";
service = if platform == "github" then "github"
else if platform == "gitlab" then "gitlab"
else if platform == "gitea" then "gitea"
else "git";
jqExpr = if platform == "gitlab" then ".[].path" else ".[].name";
pageSize = if platform == "gitea" then 50 else 100;
pageSizeStr = toString pageSize;
listUrl = if platform == "github" then "${baseUrl}/users/${owner}/repos?per_page=${pageSizeStr}&type=owner"
else if platform == "gitlab" then "${baseUrl}/api/v4/users/${owner}/projects?per_page=${pageSizeStr}"
else "${baseUrl}/api/v1/users/${owner}/repos?limit=${pageSizeStr}";
in ''
echo "Fetching repos for ${owner} from ${platform}..."
PAGE=1
while true; do
REPOS=$(${pkgs.curl}/bin/curl -sf "${listUrl}&page=$PAGE" || echo "[]")
NAMES=$(echo "$REPOS" | ${pkgs.jq}/bin/jq -r '${jqExpr}')
if [ -z "$NAMES" ] || [ "$NAMES" = "null" ]; then
break
fi
for REPO_NAME in $NAMES; do
${pkgs.curl}/bin/curl -sf -X POST "$GITEA_URL/api/v1/repos/migrate" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d "{
\"clone_addr\": \"${cloneBase}/$REPO_NAME.git\",
\"repo_name\": \"$REPO_NAME\",
\"repo_owner\": \"${owner}\",
\"mirror\": true,
\"private\": false,
\"service\": \"${service}\"
}" >/dev/null 2>&1 || true
done
COUNT=$(echo "$REPOS" | ${pkgs.jq}/bin/jq 'length')
if [ "$COUNT" -lt ${pageSizeStr} ]; then break; fi
PAGE=$((PAGE + 1))
done
'') mcfg.users}
echo "Mirror setup complete."
'';
in
{
options.services.gitea.mirrors = {
admin = {
user = lib.mkOption {
type = lib.types.str;
default = "admin";
description = "Gitea admin username for mirror management.";
};
email = lib.mkOption {
type = lib.types.str;
default = "admin@localhost";
description = "Gitea admin email.";
};
};
repos = lib.mkOption {
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
default = [];
description = "Individual repositories to mirror. Each entry: { owner, repo, service?, source? }. Source is auto-derived for github/gitlab.";
example = [
{ owner = "nixos"; repo = "nixpkgs"; service = "github"; }
{ owner = "someone"; repo = "thing"; source = "https://custom.instance/someone/thing.git"; }
];
};
users = lib.mkOption {
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
default = [];
description = "Mirror all public repos of a user/org. Each entry: { owner, platform, baseUrl? }.";
example = [
{ owner = "catppuccin"; platform = "github"; }
];
};
};
config = lib.mkIf (mcfg.repos != [] || mcfg.users != []) {
services.gitea.settings.mirror = {
DEFAULT_INTERVAL = "6h";
MIN_INTERVAL = "10m";
};
services.gitea.settings."cron.update_mirrors" = {
SCHEDULE = "@every 10m";
RUN_AT_START = true;
};
systemd.services.gitea-mirror-setup = {
description = "Setup Gitea mirror repositories";
after = [ "gitea.service" ];
requires = [ "gitea.service" ];
serviceConfig = {
Type = "oneshot";
User = cfg.user;
Group = cfg.group;
ExecStart = setupScript;
WorkingDirectory = cfg.stateDir;
Environment = [
"GITEA_WORK_DIR=${cfg.stateDir}"
"GITEA_CUSTOM=${cfg.customDir}"
];
};
};
systemd.timers.gitea-mirror-setup = {
description = "Run Gitea mirror setup on boot and periodically";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "2min";
OnUnitActiveSec = "6h";
Unit = "gitea-mirror-setup.service";
};
};
};
};
};
}

View File

@@ -0,0 +1,43 @@
{ den, ... }: {
den.aspects.gitea = {
# includes = [ den.aspects.gitea-mirrors ];
nixos = { config, ... }: {
den.tunnels = [ "git" ];
services.gitea = {
enable = true;
database.type = "mysql";
settings.service = {
DISABLE_REGISTRATION = false;
};
settings.server.HTTP_PORT = config.den.portmap.git;
/*
mirrors = {
admin = {
user = "admin";
email = "admin@bug.tools";
};
repos = [
{ owner = "gmodena"; repo = "nix-flatpak"; service = "github"; }
{ owner = "FlameFlag"; repo = "nixcord"; service = "github"; }
{ owner = "jacob.eva"; repo = "opencom-lte"; source = "https://git.liberatedsystems.co.uk/jacob.eva/opencom-lte.git"; }
];
users = [
{ owner = "nix-community"; platform = "github"; }
{ owner = "catppuccin"; platform = "github"; }
{ owner = "picosh"; platform = "github"; }
{ owner = "vic"; platform = "github"; }
];
};
*/
};
};
};
}

View File

@@ -1,6 +1,8 @@
{ den, ...}: {
{
den.aspects.glances = {
nixos = { pkgs, ... }: {
nixos = { pkgs, config, ... }: {
den.tunnels = [ "monitor" ];
environment.systemPackages = [ pkgs.glances ];
users.users.glances = {
@@ -24,7 +26,7 @@
ExecStart = ''
${pkgs.glances}/bin/glances \
-w \
-p 61208 \
-p ${toString config.den.portmap.monitor} \
-B 0.0.0.0
'';

View File

@@ -1,10 +1,13 @@
{ den, lib, ... }: {
den.aspects.invidious = {
nixos = { pkgs, ... }: let
nixos = { pkgs, config, ... }: let
companionPort = 8282;
companionPath = "/companion";
companionKey = "kKg3RKeZjE7frmvw";
port = config.den.portmap.tube;
in {
den.tunnels = [ "tube" ];
virtualisation.podman.enable = true;
virtualisation.oci-containers.backend = lib.mkDefault "podman";
@@ -29,7 +32,7 @@
package = pkgs.invidious;
address = "127.0.0.1";
port = 3030;
port = port;
nginx.enable = false;
sig-helper.enable = false;
@@ -37,7 +40,7 @@
settings = {
domain = "tube.bug.tools";
https_only = false;
external_port = 3030;
external_port = port;
invidious_companion = [
{ private_url = "http://127.0.0.1:${toString companionPort}${companionPath}"; }

View File

@@ -4,7 +4,7 @@
imports = [
(fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/master.tar.gz";
sha256 = "0rm5f749xakmkqrpkl5ay1pydbnlinr50pvwg1vm795js2infmj5";
sha256 = "1n5yxya54mdsjmdix0pjzlqbk49jqf0gfhmgqc3lywxifrdi6k0q";
})
];

View File

@@ -6,6 +6,7 @@
lib,
...
}: let
port = config.den.portmap.matrix;
domain = "bug.tools";
matrixDomain = "matrix.${domain}";
clientConfig = {
@@ -29,7 +30,7 @@
listeners = [
{
port = 8008;
port = port;
bind_addresses = ["127.0.0.1"];
type = "http";
tls = false;
@@ -89,7 +90,7 @@
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8008";
proxyPass = "http://127.0.0.1:${toString port}";
extraConfig = ''
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;

View File

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

View File

@@ -0,0 +1,20 @@
{
den.aspects.portmap.nixos = { lib, ... }: {
options.den.portmap = lib.mkOption {
type = lib.types.attrsOf lib.types.port;
default = {};
description = "ports";
};
config.den.portmap = {
tvtun = 3001;
search = 8888;
files = 3210;
tube = 3030;
reddit = 8975;
git = 3002;
monitor = 61208;
matrix = 8008;
};
};
}

View File

@@ -1,12 +1,14 @@
{
den.aspects.redlib = {
nixos = {
nixos = { config, ... }: {
den.tunnels = [ "reddit" ];
services.redlib = {
enable = true;
address = "127.0.0.1";
port = 8975;
openFirewall = false;
port = config.den.portmap.reddit;
openFirewall = true;
settings = {
SFW_ONLY = "off";

View File

@@ -1,6 +1,8 @@
{
den.aspects.searxng = {
nixos = {
nixos = { config, ... }: {
den.tunnels = [ "search" ];
systemd.services.searx-init.serviceConfig.EnvironmentFile = [
"/home/bug/.searxng.env"
];
@@ -15,7 +17,7 @@
settings = {
general.instance_name = "search.bug.tools";
server.port = 8888;
server.port = config.den.portmap.search;
server.bind_address = "0.0.0.0";
server.secret_key = "$SEARX_SECRET_KEY";
};

View File

@@ -0,0 +1,205 @@
{ inputs, lib, ... }: {
den.aspects.librewolf = {
homeManager = { pkgs, ... }: {
programs.librewolf = {
enable = true;
settings = {
"browser.startup.homepage" = "https://search.bug.tools";
"browser.startup.page" = 1;
"datareporting.healthreport.uploadEnabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"app.shield.optoutstudies.enabled" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.enabled" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
"privacy.resistFingerprinting.letterboxing" = true;
"privacy.donottrackheader.enabled" = true;
"privacy.globalprivacycontrol.enabled" = true;
"browser.search.separatePrivateDefault" = false;
"browser.download.autohideButton" = true;
"browser.quitShortcut.disabled" = true;
"browser.sessionstore.resume_session_once" = true;
"browser.cache.memory.capacity" = 65536;
"browser.sessionstore.interval" = 60000;
"browser.sessionstore.max_tabs_undo" = 10;
"browser.sessionstore.max_windows_undo" = 1;
"browser.tabs.unloadOnLowMemory" = true;
"gfx.webrender.all" = true;
"gfx.canvas.accelerated" = true;
"media.hardware-video-decoding.force-enabled" = true;
"network.http.max-connections" = 1500;
"network.http.max-persistent-connections-per-server" = 10;
"network.prefetch-next" = false;
"browser.tabs.animate" = false;
"browser.fullscreen.animate" = false;
};
profiles.default = {
search = {
force = true;
default = "search.bug.tools";
engines = {
"search.bug.tools" = {
urls = [
{
template = "https://search.bug.tools/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}
];
icon = "https://search.bug.tools/favicon.ico";
definedAliases = [ "@s" "@sq" ];
};
"NixOS Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "query"; value = "{searchTerms}"; }
];
}
];
icon = "https://search.nixos.org/favicon.png";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "query"; value = "{searchTerms}"; }
];
}
];
icon = "https://search.nixos.org/favicon.png";
definedAliases = [ "@no" ];
};
"Home Manager Options" = {
urls = [
{
template = "https://home-manager-options.extranix.com/";
params = [
{ name = "query"; value = "{searchTerms}"; }
{ name = "release"; value = "master"; }
];
}
];
icon = "https://home-manager-options.extranix.com/images/favicon.png";
definedAliases = [ "@hm" ];
};
google.metaData.hidden = true;
bing.metaData.hidden = true;
amazondotcom-us.metaData.hidden = true;
ebay.metaData.hidden = true;
wikipedia.metaData = {
hidden = false;
alias = "@w";
};
};
};
extensions = {
force = true;
settings = {
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = {
force = true;
settings = inputs.catppuccin-userstyles-nix.stylusSettings.${pkgs.stdenv.hostPlatform.system} {
global = {
lightFlavor = "mocha";
darkFlavor = "mocha";
accentColor = "mauve";
};
};
};
};
};
};
policies = {
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
BlockAboutConfig = true;
DisableTelemetry = true;
DisableFirefoxStudies = true;
DisableFeedbackCommands = true;
DisableCrashReporter = true;
DisablePocket = true;
DisableFirefoxAccounts = false;
ExtensionSettings = let
mkExtensions = ids: lib.genAttrs ids (id: {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
installation_mode = "force_installed";
private_browsing = true;
});
in {
"*".installation_mode = "blocked";
} // (mkExtensions [
"{cb31ec5d-c49a-4e5a-b240-16c767444f62}" # indie-wiki-buddy
"{1b66b5ad-408f-4300-aac6-55a68b2b24ff}" # catppuccin-mocha-no-borders
"{1b66b5ad-408f-4300-aac6-55a68b2b24ff}" # catppuccin-mocha-no-borders
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" # styl-us
"{60f82f00-9ad5-4de5-b31c-b16a47c51558}" # cookie-quick-manager
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}" # hide-youtube-shorts
"firefox@tampermonkey.net" # tampermonkey
"deArrow@ajay.app" # dearrow
"sponsorBlocker@ajay.app" # sponsorblock
"uBlock0@raymondhill.net" # ublock-origin
"contact@lesspass.com" # lesspass
"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" # user-agent-string-switcher
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" # return-youtube-dislikes
]);
};
};
};
};
}

View File

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

View File

@@ -0,0 +1,14 @@
{ ... }: {
den.aspects.appimage = {
nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
appimage-run
];
programs.appimage = {
enable = true;
binfmt = true;
};
};
};
}

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.compatibility = {
includes = with den.aspects; [ wine appimage nix-ld ];
};
}

View File

@@ -0,0 +1,5 @@
{
# nix-alien = import (
# builtins.fetchTarball "https://github.com/thiagokokada/nix-alien/tarball/master"
# ) {};
}

View File

@@ -0,0 +1,23 @@
{ ... }: {
den.aspects.nix-ld = {
nixos = { pkgs, options, ... }: {
programs.nix-ld = {
enable = true;
libraries = options.programs.nix-ld.libraries.default ++ (with pkgs; [
libxml2
udev
gcc
egl-wayland
mesa
libglvnd
wayland
libX11
libXcursor
libXrandr
libXi
]);
};
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }: {
den.aspects.wine = {
nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
wine64
wineWow64Packages.full
];
};
};
}

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.development = {
includes = with den.aspects; [ editors ];
};
}

View File

@@ -0,0 +1,10 @@
{ ... }: {
den.aspects.editors = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
zed-editor
arduino-ide
];
};
};
}

View File

@@ -0,0 +1,26 @@
{
den.aspects.essentials = {
nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
comma
fastfetch
git
home-manager
inetutils
micro
nh
nil
nixd
nixfmt
nix-index
nix-output-monitor
nix-prefetch
nvd
psmisc
tree
unzip
wget
];
};
};
}

View File

@@ -1,9 +1,21 @@
{
den.aspects.fish = {
nixos = {
nixos = { pkgs, ...}: {
programs.fish.shellAliases = {
fetch = "fastfetch --file ~/nix/nix.ans";
box = "ssh box.bug.tools";
unbox = "sh -c 'ssh -N -L \"$1\":0.0.0.0:\"$1\" box.bug.tools &' --";
rebox = "sh -c 'fuser -k \"$1\"/tcp' --";
dock = "sh -c 'ssh -N -D \"$1\" box.bug.tools &' --";
pico = "ssh pico.sh";
};
environment.systemPackages = with pkgs.fishPlugins; [
done
sponge
];
};
};
}

View File

@@ -1,55 +1,25 @@
{ inputs, lib, ... }: {
den.aspects.flatpak = {
nixos = { pkgs, ... }: {
nixos = { ... }: {
imports = [ inputs.nix-flatpak.nixosModules.nix-flatpak ];
services.flatpak = {
enable = true;
enable = true;
remotes = lib.mkOptionDefault [{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}];
remotes = lib.mkOptionDefault [{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}];
update.auto.enable = true;
uninstallUnmanaged = true;
update.auto.enable = true;
uninstallUnmanaged = true;
packages = [
"org.vinegarhq.Sober"
"org.vinegarhq.Vinegar"
"org.gnome.Decibels"
"org.pipewire.Helvum"
"community.pathofbuilding.PathOfBuilding"
"io.github.gaheldev.Millisecond"
{
appId = "com.hytale.Launcher";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
bundle = "${pkgs.fetchurl {
url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
}}";
}
# add Polytoria client
# https://cdn.polytoria.com/releases/installer/linux/Polytoria%20Setup%204.12.0.flatpak
{
appId = "com.polytoria.launcher";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
bundle = "${pkgs.fetchurl {
url = "https://github.com/4DBug/poly/releases/download/poly/poly.flatpak";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
}}";
}
];
overrides = {
global = {
Context.sockets = ["wayland" "!x11" "!fallback-x11"];
};
overrides = {
global = {
Context.sockets = [ "wayland" "!x11" "!fallback-x11" ];
};
};
};
};
};
}
}

View File

@@ -0,0 +1,25 @@
{ ... }: {
den.aspects.fonts = {
nixos = { pkgs, ... }: {
fonts = {
fontDir.enable = true;
enableDefaultPackages = true;
packages = with pkgs; [
twitter-color-emoji
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
];
fontconfig = {
enable = true;
useEmbeddedBitmaps = true;
defaultFonts = {
emoji = [ "Twitter Color Emoji" ];
};
};
};
};
};
}

View File

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

View File

@@ -0,0 +1,18 @@
{ ... }: {
den.aspects.game-tools = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
steamtinkerlaunch
scanmem
samrewritten
lug-helper
gamemode
steam-run
];
services.flatpak.packages = [
"community.pathofbuilding.PathOfBuilding"
];
};
};
}

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.gaming = {
includes = with den.aspects; [ steam roblox hytale polytoria game-tools ];
};
}

View File

@@ -0,0 +1,16 @@
{ ... }: {
den.aspects.hytale = {
nixos = { pkgs, ... }: {
services.flatpak.packages = [
{
appId = "com.hytale.Launcher";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
bundle = "${pkgs.fetchurl {
url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
}}";
}
];
};
};
}

View File

@@ -0,0 +1,16 @@
{ ... }: {
den.aspects.polytoria = {
nixos = { pkgs, ... }: {
services.flatpak.packages = [
{
appId = "com.polytoria.launcher";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
bundle = "${pkgs.fetchurl {
url = "https://github.com/4DBug/poly/releases/download/poly/poly.flatpak";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
}}";
}
];
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }: {
den.aspects.roblox = {
nixos = {
services.flatpak.packages = [
"org.vinegarhq.Sober"
"org.vinegarhq.Vinegar"
];
};
};
}

View File

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

View File

@@ -0,0 +1,34 @@
{ ... }: {
den.aspects.steam = {
nixos = { pkgs, ... }: {
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
#platformOptimizations.enable = true;
};
gamescope = {
enable = true;
capSysNice = true;
args = [
"--rt"
"--expose-wayland"
];
};
};
};
};
}

View File

@@ -0,0 +1,189 @@
{
den.aspects.janitor-backend = {
nixos = { pkgs, lib, config, ... }:
let
cfg = config.services.janitor;
janitorScript = pkgs.writeText "janitor.py" ''
import os
import sys
import json
import shutil
import time
import logging
from pathlib import Path
logging.basicConfig(
level=logging.INFO,
format="[janitor] %(message)s",
stream=sys.stdout,
)
log = logging.getLogger("janitor")
CONFIG_PATH = os.environ.get("JANITOR_CONFIG")
def load_config():
if not CONFIG_PATH or not os.path.exists(CONFIG_PATH):
raise FileNotFoundError(f"JANITOR_CONFIG not set or missing: {CONFIG_PATH}")
with open(CONFIG_PATH) as f:
return json.load(f)
def get_destination(extension, rules):
ext = extension.lower().lstrip(".")
for folder, extensions in rules.items():
if ext in extensions:
return folder
return None
def resolve_dest(dest_key, watch_dir):
if os.path.isabs(dest_key):
return Path(dest_key)
return watch_dir.parent / dest_key
def unique_path(target):
if not target.exists():
return target
stem, suffix = target.stem, target.suffix
counter = 1
while True:
candidate = target.parent / f"{stem}_{counter}{suffix}"
if not candidate.exists():
return candidate
counter += 1
def main():
try:
config = load_config()
except Exception as e:
log.error("Failed to load config: %s", e)
sys.exit(1)
grace_period = config.get("grace_period", 60)
rules = config.get("rules", {})
now = time.time()
for watch_dir_str in config.get("watched_dirs", []):
watch_dir = Path(os.path.expanduser(watch_dir_str))
if not watch_dir.exists():
log.warning("Watched dir does not exist: %s", watch_dir)
continue
for item in watch_dir.iterdir():
if not item.is_file() or item.name.startswith("."):
continue
age = now - item.stat().st_mtime
if age < grace_period:
continue
dest_key = get_destination(item.suffix, rules)
if dest_key is None:
continue
target_dir = resolve_dest(dest_key, watch_dir)
target_dir.mkdir(parents=True, exist_ok=True)
target = unique_path(target_dir / item.name)
try:
shutil.move(str(item), str(target))
log.info("Moved %s -> %s", item.name, target)
except Exception as e:
log.error("Failed to move %s: %s", item.name, e)
if __name__ == "__main__":
main()
'';
janitorConfig = pkgs.writeText "janitor_config.json" (builtins.toJSON {
grace_period = cfg.gracePeriod;
watched_dirs = cfg.watchedDirs;
rules = cfg.rules;
});
in {
options.services.janitor = {
enable = lib.mkEnableOption "file sorting janitor";
interval = lib.mkOption {
type = lib.types.str;
default = "5min";
description = "How often to run the janitor (systemd time span, e.g. \"5min\", \"1h\").";
};
gracePeriod = lib.mkOption {
type = lib.types.int;
default = 60;
description = "Seconds a file must remain unmodified before it is eligible to be moved.";
};
watchedDirs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "~/Downloads" ];
description = "Directories to scan and sort. Supports ~ expansion.";
};
rules = lib.mkOption {
type = lib.types.attrsOf (lib.types.listOf lib.types.str);
default = { };
description = ''
Mapping of destination folder path to a list of file extensions (without leading dot).
Destinations are relative to the parent of the watched directory, or absolute if they
start with /.
Example:
rules = {
"Pictures/Downloads" = [ "jpg" "png" "gif" "webp" ];
"Videos/Downloads" = [ "mp4" "mkv" "webm" ];
"/mnt/archive" = [ "zip" "tar" ];
};
'';
example = lib.literalExpression ''
{
"Pictures/Downloads" = [ "jpg" "jpeg" "png" "gif" "webp" "avif" ];
"Videos/Downloads" = [ "mp4" "mkv" "mov" "webm" "avi" ];
"Music/Downloads" = [ "mp3" "flac" "wav" "ogg" "opus" "m4a" ];
"Documents/Downloads" = [ "pdf" "doc" "docx" "odt" "txt" "md" "epub" ];
}
'';
};
user = lib.mkOption {
type = lib.types.str;
default = "bug";
description = "User account the janitor service runs as.";
};
};
config = lib.mkIf cfg.enable {
systemd.services.janitor = {
description = "File sorting janitor";
environment.JANITOR_CONFIG = "${janitorConfig}";
serviceConfig = {
Type = "oneshot";
User = cfg.user;
ExecStart = "${pkgs.python3}/bin/python3 ${janitorScript}";
};
};
systemd.timers.janitor = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "10m";
OnUnitActiveSec = cfg.interval;
};
};
};
};
};
}

View File

@@ -0,0 +1,45 @@
{ den, ... }: {
den.aspects.janitor = {
includes = with den.aspects; [ janitor-backend ];
nixos = {
services.janitor = {
enable = true;
interval = "1min";
gracePeriod = 60;
watchedDirs = [ "~/Downloads" ];
rules = {
"Pictures/Downloads" = [ "jpg" "jpeg" "png" "gif" "webp" "svg" "heic" "avif" "ico" ];
"Videos/Downloads" = [ "mp4" "mkv" "mov" "webm" "avi" "flv" ];
"Music/Downloads" = [ "mp3" "flac" "wav" "ogg" "m4a" "opus" ];
"Documents/Downloads" = [ "pdf" "doc" "docx" "odt" "txt" "md" "epub" "ppt" "pptx" "xls" "xlsx" "csv" ];
"Archives/Downloads" = [ "iso" "zip" "tar" "gz" "bz2" "xz" "rar" "7z" "wsz" ];
"Fonts/Downloads" = [ "ttf" "otf" "woff" "woff2" ];
"3D/Downloads" = [ "blend" "obj" "fbx" "stl" "dae" "3ds" "3mf" ];
"Software/Downloads" = [ "deb" "rpm" "appimage" "jar" "exe" "msi" "flatpak" ];
"Scripts/Downloads" = [ "sh" "py" "lua" ];
"Games/Doom" = [ "wad" "pk3" ];
"Games/Switch" = [ "nsp" "xci" ];
"Games/3DS" = [ "3ds" "cia" ];
"Games/WiiU" = [ "wux" "wud" ];
"Games/Wii" = [ "wbfs" ];
"Games/GameCube" = [ "gcm" ];
"Games/N64" = [ "n64" "z64" ];
"Games/SNES" = [ "sfc" "smc" ];
"Games/NES" = [ "nes" ];
"Games/DS" = [ "nds" "dsi" ];
"Games/GBA" = [ "gba" ];
"Games/GBC" = [ "gbc" ];
"Games/GB" = [ "gb" ];
"Games/PS1" = [ "cue" "bin" ];
"Games/Xbox" = [ "xiso" ];
"Games/Genesis" = [ "gen" ];
"Games/Dreamcast" = [ "gdi" "cdi" ];
"Games/Saturn" = [ "sat" ];
};
};
};
};
}

View File

@@ -1,25 +0,0 @@
{
den.aspects.librewolf = {
homeManager = {
programs.librewolf = {
enable = true;
settings = {
"browser.startup.homepage" = "https://search.bug.tools";
};
# set default search engine to search.bug.tools (searxng)
# and add stylus, tampermonkey, sponsorblock, dearrow, cookie quick manager
policies = {
BlockAboutConfig = true;
};
# https://github.com/nix-community/nur-combined/blob/main/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
};
};
};
}

View File

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

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.music = {
includes = with den.aspects; [ beets player nicotine mpd ];
};
}

View File

@@ -0,0 +1,9 @@
{
den.aspects.nicotine = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
nicotine-plus
];
};
};
}

View File

@@ -0,0 +1,15 @@
{ ... }: {
den.aspects.player = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
euphonica
rhythmbox
];
services.flatpak.packages = [
"org.gnome.Decibels"
"org.pipewire.Helvum"
];
};
};
}

View File

@@ -1,46 +0,0 @@
{ inputs, ... }: {
den.aspects.nixcord = {
homeManager = {
imports = [ inputs.nixcord.homeModules.nixcord ];
programs.nixcord = {
enable = true;
discord.enable = false;
vesktop.enable = true;
config = {
themeLinks = [ "https://catppuccin.github.io/discord/dist/catppuccin-mocha-mauve.theme.css" "https://codeberg.org/ridge/Discord-Adblock/raw/branch/main/discord-adblock.css" ];
plugins = {
alwaysTrust.enable = true;
betterGifPicker.enable = true;
betterUploadButton.enable = true;
biggerStreamPreview.enable = true;
callTimer.enable = true;
fullSearchContext.enable = true;
fullUserInChatbox.enable = true;
implicitRelationships.enable = true;
dearrow.enable = true;
youtubeAdblock.enable = true;
fixYoutubeEmbeds.enable = true;
# lastFMRichPresence = {
# enable = true;
# username = "USER_NAME";
# apiKey = "YOUR_LASTFM_API_KEY";
# hideWithSpotify = false;
# nameFormat = "artist-first";
# useListeningStatus = true;
# showLastFmLogo = false;
# };
viewIcons.enable = true;
volumeBooster.enable = true;
webScreenShareFixes.enable = true;
};
};
};
};
};
}

View File

@@ -1,7 +0,0 @@
{ inputs, ... }: {
den.aspects.organize = {
nixos = {
};
};
}

View File

@@ -1,195 +0,0 @@
{
den.aspects.packages = {
nixos = { pkgs, options, ... }: {
environment.systemPackages = with pkgs; [
gnome-boxes
wine64
wineWow64Packages.full
appimage-run
pulseaudioFull
lug-helper
gamemode
steam-run
firmware-updater
file-roller
baobab
firefox-bin
];
users.users.bug.packages = with pkgs; [
obsidian
# vesktop
nicotine-plus
fastfetch
gh
scanmem
samrewritten
impression
mission-center
authenticator
steamtinkerlaunch
#prismlauncher
euphonica
kooha
loupe
arduino-ide
geary
fractal
gnome-calendar
];
services = {
/*
flatpak = {
enable = true;
remotes = lib.mkOptionDefault [{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}];
update.auto.enable = true;
uninstallUnmanaged = true;
packages = [
"org.vinegarhq.Sober"
"org.vinegarhq.Vinegar"
"org.gnome.Decibels"
"org.pipewire.Helvum"
"community.pathofbuilding.PathOfBuilding"
"io.github.gaheldev.Millisecond"
{
appId = "com.hytale.Launcher";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
bundle = "${pkgs.fetchurl {
url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak";
sha256 = "sha256-SUxfyovC2umZmsOj5bOTZ8WfGCpnWcz7svOESwNekV0=";
}}";
}
# add Polytoria client
# https://cdn.polytoria.com/releases/installer/linux/Polytoria%20Setup%204.12.0.flatpak
{
appId = "com.polytoria.launcher";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
bundle = "${pkgs.fetchurl {
url = "https://github.com/4DBug/poly/releases/download/poly/poly.flatpak";
sha256 = "sha256-VjhNiJfSdCtlH2SuP3Mn8jjOrx5xcOqhtDKaWYIwxYg=";
}}";
}
];
overrides = {
global = {
Context.sockets = ["wayland" "!x11" "!fallback-x11"];
};
};
};
*/
ollama = {
enable = false;
loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b" "deepseek-r1:8b"];
};
};
fonts = {
fontDir.enable = true;
enableDefaultPackages = true;
packages = with pkgs; [
twitter-color-emoji
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
];
fontconfig = {
enable = true;
useEmbeddedBitmaps = true;
defaultFonts = {
emoji = [ "Twitter Color Emoji" ];
};
};
};
programs = {
appimage = {
enable = true;
binfmt = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
#platformOptimizations.enable = true;
};
ydotool.enable = true;
gamescope = {
enable = true;
capSysNice = true;
args = [
"--rt"
"--expose-wayland"
];
};
virt-manager.enable = true;
nix-ld = {
enable = true;
libraries = options.programs.nix-ld.libraries.default ++ (with pkgs; [
libxml2
udev
gcc
egl-wayland
mesa
libglvnd
wayland
libX11
libXcursor
libXrandr
libXi
]);
};
};
};
};
}

View File

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

View File

@@ -0,0 +1,9 @@
{ ... }: {
den.aspects.mail = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
geary
];
};
};
}

View File

@@ -0,0 +1,9 @@
{ ... }: {
den.aspects.matrix-client = {
nixos = { pkgs, ... }: {
users.users.bug.packages = with pkgs; [
fractal
];
};
};
}

View File

@@ -0,0 +1,93 @@
{ inputs, ... }: {
den.aspects.nixcord = {
homeManager = {
imports = [ inputs.nixcord.homeModules.nixcord ];
programs.nixcord = {
enable = true;
discord.enable = false;
vesktop.enable = true;
config = {
themeLinks = [
"https://catppuccin.github.io/discord/dist/catppuccin-mocha-mauve.theme.css"
"https://codeberg.org/ridge/Discord-Adblock/raw/branch/main/discord-adblock.css"
];
plugins = {
alwaysTrust.enable = true;
betterGifPicker.enable = true;
betterUploadButton.enable = true;
biggerStreamPreview.enable = true;
callTimer.enable = true;
fullSearchContext.enable = true;
fullUserInChatbox.enable = true;
implicitRelationships.enable = true;
dearrow.enable = true;
youtubeAdblock.enable = true;
fixYoutubeEmbeds.enable = true;
# lastFMRichPresence = {
# enable = true;
# username = "USER_NAME";
# apiKey = "YOUR_LASTFM_API_KEY";
# hideWithSpotify = false;
# nameFormat = "artist-first";
# useListeningStatus = true;
# showLastFmLogo = false;
# };
viewIcons.enable = true;
volumeBooster.enable = true;
webScreenShareFixes.enable = true;
fixImagesQuality.enable = true;
messageLogger = {
enable = true;
collapseDeleted = true;
ignoreSelf = true;
ignoreBots = true;
};
textReplace.enable = true;
textReplace.regexRules = [
{
find = "https?:\\/\\/(www\\.)?instagram\\.com\\/[^\\/]+\\/(p|reel)\\/([A-Za-z0-9-_]+)\\/?";
replace = "https://g.ddinstagram.com/$2/$3";
}
{
find = "https:\\/\\/x\\.com\\/([^\\/]+\\/status\\/[0-9]+)";
replace = "https://vxtwitter.com/$1";
}
{
find = "https:\\/\\/twitter\\.com\\/([^\\/]+\\/status\\/[0-9]+)";
replace = "https://vxtwitter.com/$1";
}
{
find = "https:\\/\\/(www\\.|old\\.)?reddit\\.com\\/(r\\/[a-zA-Z0-9_]+\\/comments\\/[a-zA-Z0-9_]+\\/[^\\s]*)";
replace = "https://vxreddit.com/$2";
}
{
find = "https:\\/\\/(www\\.)?pixiv\\.net\\/(.*)";
replace = "https://phixiv.net/$2";
}
{
find = "https:\\/\\/(?:www\\.|m\\.)?twitch\\.tv\\/twitch\\/clip\\/(.*)";
replace = "https://clips.fxtwitch.tv/$1";
}
{
find = "https:\\/\\/(?:www\\.)?youtube\\.com\\/(?:watch\\?v=|shorts\\/)([a-zA-Z0-9_-]+)";
replace = "https://youtu.be/$1";
}
];
disableCallIdle.enable = true;
ClearURLs.enable = true;
};
};
};
};
};
}

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.social = {
includes = with den.aspects; [ nixcord matrix-client mail ];
};
}

View File

@@ -1,21 +1,17 @@
{
den.aspects.development = {
{ ... }: {
den.aspects.desktop-utils = {
nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
file-roller
];
users.users.bug.packages = with pkgs; [
zed-editor
vscode
tree
gh
scanmem
arduino-ide
obsidian
impression
kooha
loupe
authenticator
];
};
};
}
}

View File

@@ -0,0 +1,28 @@
{ ... }: {
den.aspects.system-utils = {
nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
gnome-boxes
pulseaudioFull
firmware-updater
];
users.users.bug.packages = with pkgs; [
mission-center
baobab
fastfetch
];
programs = {
ydotool.enable = true;
virt-manager.enable = true;
};
services.ollama = {
enable = false;
loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b" "deepseek-r1:8b" ];
};
};
};
}

View File

@@ -0,0 +1,5 @@
{ den, ... }: {
den.aspects.utilities = {
includes = with den.aspects; [ system-utils desktop-utils fonts ];
};
}