From 9484c4ec525c02caa8a65ecfe37ed24f1d4b321d Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 2 Mar 2026 00:03:12 -0800 Subject: Remove local nix directory to prepare for submodule --- nix/.sops.yaml | 13 - nix/data/deploy-matterbridge.sh | 25 - nix/data/matterbridge.toml | 25 - nix/data/motd.txt | 8 - nix/data/public-inbox.css | 143 ---- nix/disko/btrfs-simple.nix | 77 --- nix/disko/drive-bios.nix | 35 - nix/disko/drive-simple.nix | 42 -- nix/dns/default.nix | 3 - nix/fake-update-dns.sh | 3 - nix/flake.lock | 770 --------------------- nix/flake.nix | 212 ------ nix/flakevars.nix | 23 - nix/init.el | 689 ------------------ nix/modules/bitcoin.nix | 7 - nix/modules/cgit.nix | 34 - nix/modules/conduit.nix | 212 ------ nix/modules/configuration.nix | 606 ---------------- nix/modules/coturn.nix | 10 - nix/modules/cuda.nix | 9 - nix/modules/default.nix | 82 --- nix/modules/docker.nix | 15 - nix/modules/dovecot.nix | 8 - nix/modules/fail2ban.nix | 11 - nix/modules/firejail.nix | 20 - nix/modules/git-daemon.nix | 11 - nix/modules/gitolite.nix | 8 - nix/modules/gitweb.nix | 12 - nix/modules/gotosocial.nix | 14 - nix/modules/heisenbridge.nix | 9 - nix/modules/home/default.nix | 219 ------ nix/modules/home/emacs.nix | 102 --- nix/modules/home/fcitx.nix | 14 - nix/modules/home/firefox.nix | 25 - nix/modules/home/gammastep.nix | 20 - nix/modules/home/git.nix | 40 -- nix/modules/home/gtk.nix | 27 - nix/modules/home/home.nix | 11 - nix/modules/home/hyprland.nix | 192 ----- nix/modules/home/kitty.nix | 53 -- nix/modules/home/mako.nix | 15 - nix/modules/home/mbsync.nix | 33 - nix/modules/home/mpd.nix | 44 -- nix/modules/home/mpv.nix | 12 - nix/modules/home/msmtp.nix | 27 - nix/modules/home/pantalaimon.nix | 19 - nix/modules/home/personal_secrets.nix | 23 - nix/modules/home/secrets.nix | 35 - nix/modules/home/user.nix | 202 ------ nix/modules/home/vps_secrets.nix | 43 -- nix/modules/home/waybar.nix | 274 -------- nix/modules/home/wofi.nix | 188 ----- nix/modules/home/yt-dlp.nix | 13 - nix/modules/home/zsh.nix | 47 -- nix/modules/honk.nix | 8 - nix/modules/i2pd.nix | 9 - nix/modules/icecast.nix | 21 - nix/modules/impermanence.nix | 100 --- nix/modules/inspircd.nix | 539 --------------- nix/modules/ircd.nix | 12 - nix/modules/kubo.nix | 20 - nix/modules/maddy.nix | 196 ------ nix/modules/matrix-appservice-irc.nix | 10 - nix/modules/matterbridge.nix | 7 - nix/modules/mautrix.nix | 150 ---- nix/modules/murmur.nix | 14 - nix/modules/nginx.nix | 54 -- nix/modules/ngircd.nix | 35 - nix/modules/ntfy-sh.nix | 79 --- nix/modules/nvidia.nix | 22 - nix/modules/ollama.nix | 20 - nix/modules/pantalaimon.nix | 13 - nix/modules/pipewire.nix | 42 -- nix/modules/postfix.nix | 8 - nix/modules/public_inbox.nix | 86 --- nix/modules/secrets.nix | 118 ---- nix/modules/ssh.nix | 13 - nix/modules/tor.nix | 20 - nix/modules/vars.nix | 131 ---- nix/modules/xserver.nix | 27 - nix/modules/znc.nix | 37 - nix/poetry.lock | 363 ---------- nix/pyproject.toml | 18 - nix/secrets/secrets.yaml | 21 - nix/secrets/vps_secrets.yaml | 30 - nix/spontaneity.qcow2 | Bin 21954560 -> 0 bytes nix/systems/affinity/default.nix | 16 - nix/systems/affinity/home.nix | 6 - nix/systems/common.nix | 8 - nix/systems/continuity/default.nix | 19 - nix/systems/continuity/home.nix | 6 - nix/systems/home-common.nix | 7 - nix/systems/home.nix | 15 - nix/systems/installer/commits.nix | 5 - nix/systems/installer/default.nix | 156 ----- nix/systems/rpi-skepticism/default.nix | 7 - nix/systems/rpi-zero/default.nix | 21 - nix/systems/rpi-zero/home.nix | 7 - nix/systems/spontaneity/default.nix | 28 - nix/systems/spontaneity/hardware-configuration.nix | 23 - nix/systems/spontaneity/home.nix | 6 - nix/topology/default.nix | 55 -- nix/update-dns.sh | 3 - nix/vm-boot.log | 26 - 104 files changed, 7451 deletions(-) delete mode 100644 nix/.sops.yaml delete mode 100755 nix/data/deploy-matterbridge.sh delete mode 100644 nix/data/matterbridge.toml delete mode 100644 nix/data/motd.txt delete mode 100644 nix/data/public-inbox.css delete mode 100644 nix/disko/btrfs-simple.nix delete mode 100644 nix/disko/drive-bios.nix delete mode 100644 nix/disko/drive-simple.nix delete mode 100644 nix/dns/default.nix delete mode 100644 nix/fake-update-dns.sh delete mode 100644 nix/flake.lock delete mode 100644 nix/flake.nix delete mode 100644 nix/flakevars.nix delete mode 100644 nix/init.el delete mode 100644 nix/modules/bitcoin.nix delete mode 100644 nix/modules/cgit.nix delete mode 100644 nix/modules/conduit.nix delete mode 100644 nix/modules/configuration.nix delete mode 100644 nix/modules/coturn.nix delete mode 100644 nix/modules/cuda.nix delete mode 100644 nix/modules/default.nix delete mode 100644 nix/modules/docker.nix delete mode 100644 nix/modules/dovecot.nix delete mode 100644 nix/modules/fail2ban.nix delete mode 100644 nix/modules/firejail.nix delete mode 100644 nix/modules/git-daemon.nix delete mode 100644 nix/modules/gitolite.nix delete mode 100644 nix/modules/gitweb.nix delete mode 100644 nix/modules/gotosocial.nix delete mode 100644 nix/modules/heisenbridge.nix delete mode 100644 nix/modules/home/default.nix delete mode 100644 nix/modules/home/emacs.nix delete mode 100644 nix/modules/home/fcitx.nix delete mode 100644 nix/modules/home/firefox.nix delete mode 100644 nix/modules/home/gammastep.nix delete mode 100644 nix/modules/home/git.nix delete mode 100644 nix/modules/home/gtk.nix delete mode 100644 nix/modules/home/home.nix delete mode 100644 nix/modules/home/hyprland.nix delete mode 100644 nix/modules/home/kitty.nix delete mode 100644 nix/modules/home/mako.nix delete mode 100644 nix/modules/home/mbsync.nix delete mode 100644 nix/modules/home/mpd.nix delete mode 100644 nix/modules/home/mpv.nix delete mode 100644 nix/modules/home/msmtp.nix delete mode 100644 nix/modules/home/pantalaimon.nix delete mode 100644 nix/modules/home/personal_secrets.nix delete mode 100644 nix/modules/home/secrets.nix delete mode 100644 nix/modules/home/user.nix delete mode 100644 nix/modules/home/vps_secrets.nix delete mode 100644 nix/modules/home/waybar.nix delete mode 100644 nix/modules/home/wofi.nix delete mode 100644 nix/modules/home/yt-dlp.nix delete mode 100644 nix/modules/home/zsh.nix delete mode 100644 nix/modules/honk.nix delete mode 100644 nix/modules/i2pd.nix delete mode 100644 nix/modules/icecast.nix delete mode 100644 nix/modules/impermanence.nix delete mode 100644 nix/modules/inspircd.nix delete mode 100644 nix/modules/ircd.nix delete mode 100644 nix/modules/kubo.nix delete mode 100644 nix/modules/maddy.nix delete mode 100644 nix/modules/matrix-appservice-irc.nix delete mode 100644 nix/modules/matterbridge.nix delete mode 100644 nix/modules/mautrix.nix delete mode 100644 nix/modules/murmur.nix delete mode 100644 nix/modules/nginx.nix delete mode 100644 nix/modules/ngircd.nix delete mode 100644 nix/modules/ntfy-sh.nix delete mode 100644 nix/modules/nvidia.nix delete mode 100644 nix/modules/ollama.nix delete mode 100644 nix/modules/pantalaimon.nix delete mode 100644 nix/modules/pipewire.nix delete mode 100644 nix/modules/postfix.nix delete mode 100644 nix/modules/public_inbox.nix delete mode 100644 nix/modules/secrets.nix delete mode 100644 nix/modules/ssh.nix delete mode 100644 nix/modules/tor.nix delete mode 100644 nix/modules/vars.nix delete mode 100644 nix/modules/xserver.nix delete mode 100644 nix/modules/znc.nix delete mode 100644 nix/poetry.lock delete mode 100644 nix/pyproject.toml delete mode 100644 nix/secrets/secrets.yaml delete mode 100644 nix/secrets/vps_secrets.yaml delete mode 100644 nix/spontaneity.qcow2 delete mode 100644 nix/systems/affinity/default.nix delete mode 100644 nix/systems/affinity/home.nix delete mode 100644 nix/systems/common.nix delete mode 100644 nix/systems/continuity/default.nix delete mode 100644 nix/systems/continuity/home.nix delete mode 100644 nix/systems/home-common.nix delete mode 100644 nix/systems/home.nix delete mode 100644 nix/systems/installer/commits.nix delete mode 100644 nix/systems/installer/default.nix delete mode 100644 nix/systems/rpi-skepticism/default.nix delete mode 100644 nix/systems/rpi-zero/default.nix delete mode 100644 nix/systems/rpi-zero/home.nix delete mode 100644 nix/systems/spontaneity/default.nix delete mode 100644 nix/systems/spontaneity/hardware-configuration.nix delete mode 100644 nix/systems/spontaneity/home.nix delete mode 100644 nix/topology/default.nix delete mode 100644 nix/update-dns.sh delete mode 100644 nix/vm-boot.log (limited to 'nix') diff --git a/nix/.sops.yaml b/nix/.sops.yaml deleted file mode 100644 index 3613e2b..0000000 --- a/nix/.sops.yaml +++ /dev/null @@ -1,13 +0,0 @@ -keys: - - &primary age165ul43e8rc0qwzz2f2q9cw02psm2mkudsrwavq2e0pxs280p64yqy2z0dr - - &vps age1acpuyy2qnduyxzwvusd8urr6a78e3f37ylhvh2pngyqytf5r8ans5vkest -creation_rules: - - path_regex: secrets/secrets.yaml$ - key_groups: - - age: - - *primary - - - path_regex: secrets/vps_secrets.yaml$ - key_groups: - - age: - - *vps diff --git a/nix/data/deploy-matterbridge.sh b/nix/data/deploy-matterbridge.sh deleted file mode 100755 index a0758ec..0000000 --- a/nix/data/deploy-matterbridge.sh +++ /dev/null @@ -1,25 +0,0 @@ -set -e # Exit on error - -# Ensure required environment variables are set -#: "${MATTERBRIDGE_DISCORD_TOKEN:?Need to set MATTERBRIDGE_DISCORD_TOKEN}" -: "${MATTERBRIDGE_MATRIX_PASS:?Need to set MATTERBRIDGE_MATRIX_PASS}" - -# Define paths -TEMPLATE_CONFIG="matterbridge.toml" -GENERATED_CONFIG="matterbridge.built.toml" -REMOTE_SERVER="root@nullring.xyz" -REMOTE_PATH="/etc/matterbridge.toml" - -# Generate config file -sed "s|\${MATTERBRIDGE_MATRIX_PASS}|$MATTERBRIDGE_MATRIX_PASS|g" $TEMPLATE_CONFIG > $GENERATED_CONFIG - -# Securely transfer to server -scp "$GENERATED_CONFIG" "$REMOTE_SERVER:$REMOTE_PATH" - -# Restart Matterbridge service -ssh "$REMOTE_SERVER" "sudo systemctl restart matterbridge" - -# delete config file with secrets from repo -shred -u "$GENERATED_CONFIG" - -echo "✅ Matterbridge config deployed successfully!" diff --git a/nix/data/matterbridge.toml b/nix/data/matterbridge.toml deleted file mode 100644 index aebb8c2..0000000 --- a/nix/data/matterbridge.toml +++ /dev/null @@ -1,25 +0,0 @@ -[matrix.mymatrix] -Server="https://matrix.ret2pop.net" -Login="bridge" -Password="${MATTERBRIDGE_MATRIX_PASS}" -RemoteNickFormat="[{PROTOCOL}] <{NICK}> " -NoHomeServerSuffix=true - -[irc.myirc] -Server="nullring.xyz:6697" -Nick="bridge" -RemoteNickFormat="[{PROTOCOL}] <{NICK}> " -UseTLS=true -SkipTLSVerify=true - -[[gateway]] -name="gateway1" -enable=true - -[[gateway.inout]] -account="matrix.mymatrix" -channel="!BQZli4UPBNC5w6ntXu:matrix.ret2pop.net" - -[[gateway.inout]] -account="irc.myirc" -channel="#nullring" \ No newline at end of file diff --git a/nix/data/motd.txt b/nix/data/motd.txt deleted file mode 100644 index ffcd31f..0000000 --- a/nix/data/motd.txt +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to the NullRing experience! -The main channel is #nullring; we're glad to have you! - -Rules: -1. Don't be annoying. -2. No illegal content. -And if you're here to have constructive, philisophical and theoretical -conversations, this is the place for you! diff --git a/nix/data/public-inbox.css b/nix/data/public-inbox.css deleted file mode 100644 index df94873..0000000 --- a/nix/data/public-inbox.css +++ /dev/null @@ -1,143 +0,0 @@ -:root { - --bg: #f8f9fa; - --fg: #2e3440; - --link: #5e81ac; - --link-hover: #81a1c1; - --border: #d8dee9; - --card-bg: #ffffff; - --meta-fg: #4c566a; /* Darker gray for better legibility */ - --btn-fg: #ffffff; - --max-width: 780px; -} - -@media (prefers-color-scheme: dark) { - :root { - --bg: #1a1b26; - --fg: #a9b1d6; - --link: #7aa2f7; - --link-hover: #bb9af7; - --border: #414868; /* Distinct border for dark mode */ - --card-bg: #1f2335; - --meta-fg: #9aa5ce; /* Brighter gray for dark mode */ - --btn-fg: #1a1b26; - } -} - -span.q { - color: var(--meta-fg); - font-style: italic; -} - -body { - background-color: var(--bg); - color: var(--fg); - line-height: 1.6; - max-width: var(--max-width); - margin: 3rem auto; - padding: 0 1.5rem; - font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; - - /* Keep this for smoother rendering on macOS/iOS */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* 1. Global Link Fixes */ -body a, body a:visited { - color: var(--link); -} - -/* 2. Card Styling */ -body pre { - white-space: pre-wrap; - background: var(--card-bg); - padding: 2rem; - border-radius: 12px; - border: 1px solid var(--border); - margin-bottom: 2.5rem; -} - -/* 3. Header Cleanup */ -body pre b:first-of-type { - font-weight: 700; - color: var(--link); - font-size: 1.1rem; - display: block; - margin-bottom: 0.5rem; -} - -/* 4. Fixing the "Permalink" label on documentation */ -/* We target links ending in / but EXCLUDE system paths like help or mirror */ -body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]) { - font-size: 0; - text-decoration: none; - margin-right: 10px; -} - -body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]):after { - content: "permalink"; - font-size: 11px; - font-weight: bold; - color: var(--fg); /* Use main text color for high contrast */ - background: var(--bg); - border: 1px solid var(--link); /* Use link color for the border */ - padding: 4px 10px; - border-radius: 4px; - display: inline-block; -} - -/* 5. Fixing the "Raw" button contrast */ -body pre a[href$="/raw"] { - font-size: 0; - text-decoration: none; -} - -body pre a[href$="/raw"]:after { - content: "raw"; - font-size: 11px; - font-weight: bold; - color: var(--fg); - background: var(--bg); - border: 1px solid var(--link); - padding: 4px 10px; - border-radius: 4px; - display: inline-block; -} - -/* Hover effect for ghost buttons: solid color shift */ -body pre a[href$="/"]:hover:after, -body pre a[href$="/raw"]:hover:after { - background: var(--link); - color: var(--btn-fg); -} - -/* 6. The Reply Button (Primary Action) */ -body pre a[href$="#R"], body pre a[href$="#R"]:visited { - font-size: 0; - text-decoration: none; -} - -body pre a[href$="#R"]:after { - content: "REPLY"; - font-size: 12px; - font-weight: bold; - padding: 6px 20px; - background: var(--link); - color: var(--btn-fg); - border-radius: 6px; - display: inline-block; - margin-left: 10px; -} - -/* 7. Hide clutter */ -body pre a[href^="#r"], body pre a[href^="#r"] + b, body hr { - display: none; -} - -/* Fix: Mathematically outscore the header rule to keep link text inline */ -body pre a[href] b:first-of-type { - display: inline; - font-size: inherit; - margin-bottom: 0; - color: inherit; -} diff --git a/nix/disko/btrfs-simple.nix b/nix/disko/btrfs-simple.nix deleted file mode 100644 index b49558d..0000000 --- a/nix/disko/btrfs-simple.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ lib, config, ... }: -let - spec = { - disko.devices = { - disk = { - main = { - type = "disk"; - device = config.monorepo.vars.device; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - passwordFile = "/tmp/secret.key"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - - "/home" = { - mountpoint = "/home"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - - "/persistent" = { - mountpoint = "/persistent"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; -in -{ - monorepo.vars.diskoSpec = spec; - disko.devices = spec.disko.devices; -} diff --git a/nix/disko/drive-bios.nix b/nix/disko/drive-bios.nix deleted file mode 100644 index 3dd0a74..0000000 --- a/nix/disko/drive-bios.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, ... }: -let - spec = { - disko.devices = { - disk = { - main = { - device = config.monorepo.vars.device; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; - }; - root = { - label = "disk-main-root"; - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; - }; -in -{ - monorepo.vars.diskoSpec = spec; - disko.devices = spec.disko.devices; -} diff --git a/nix/disko/drive-simple.nix b/nix/disko/drive-simple.nix deleted file mode 100644 index 7e105cb..0000000 --- a/nix/disko/drive-simple.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, config, ... }: -let - spec = { - disko.devices = { - disk = { - main = { - device = config.monorepo.vars.device; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "500M"; - priority = 1; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - priority = 2; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; - }; -in -{ - monorepo.vars.diskoSpec = spec; - disko.devices = spec.disko.devices; -} diff --git a/nix/dns/default.nix b/nix/dns/default.nix deleted file mode 100644 index 52ca8b6..0000000 --- a/nix/dns/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - defaultTTL = 120; -} diff --git a/nix/fake-update-dns.sh b/nix/fake-update-dns.sh deleted file mode 100644 index a236cb2..0000000 --- a/nix/fake-update-dns.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -export CLOUDFLARE_TOKEN="$(cat /run/user/1000/secrets/cloudflare-dns | tr -d '\n')" -poetry run octodns-sync --config-file result diff --git a/nix/flake.lock b/nix/flake.lock deleted file mode 100644 index b810ba5..0000000 --- a/nix/flake.lock +++ /dev/null @@ -1,770 +0,0 @@ -{ - "nodes": { - "crane": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717535930, - "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", - "owner": "ipetkov", - "repo": "crane", - "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "deep-research": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1755738911, - "narHash": "sha256-BobMSFfhK8GprfN6V+BedMj6d1v/pKce6sqiETHiv48=", - "owner": "ret2pop", - "repo": "ollama-deep-researcher", - "rev": "678a3ef8e8d8ded2aab9288fd7396579a13aec46", - "type": "github" - }, - "original": { - "owner": "ret2pop", - "repo": "ollama-deep-researcher", - "type": "github" - } - }, - "disko": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769524058, - "narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=", - "owner": "nix-community", - "repo": "disko", - "rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "disko", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": [ - "nixpak", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770726378, - "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "pre-commit-hooks-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "hercules-ci-effects": { - "inputs": { - "flake-parts": [ - "nixpak", - "flake-parts" - ], - "nixpkgs": [ - "nixpak", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765774562, - "narHash": "sha256-UQhfCggNGDc7eam+EittlYmeW89CZVT1KkFIHZWBH7k=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "edcbb19948b6caf1700434e369fde6ff9e6a3c93", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763992789, - "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.05", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "impermanence", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1768598210, - "narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c47b2cc64a629f8e075de52e4742de688f930dc6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "impermanence": { - "inputs": { - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1769548169, - "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, - "lanzaboote": { - "inputs": { - "crane": "crane", - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1718178907, - "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", - "owner": "nix-community", - "repo": "lanzaboote", - "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v0.4.1", - "repo": "lanzaboote", - "type": "github" - } - }, - "nix-topology": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769983422, - "narHash": "sha256-/zQdD8Aogh16eD5lgFokRMA0EYCm5uQITKCA90/01Oo=", - "owner": "oddlama", - "repo": "nix-topology", - "rev": "20b5c5c698d45cc0f950889b3f6379ced5ce9c4a", - "type": "github" - }, - "original": { - "owner": "oddlama", - "repo": "nix-topology", - "type": "github" - } - }, - "nixos-dns": { - "inputs": { - "flake-compat": "flake-compat_3", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_2", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1742583654, - "narHash": "sha256-aTsLqhW9XD0O37BTJo0u5f0gkk/x4KnZ9sho9hSE6hE=", - "owner": "Janik-Haag", - "repo": "nixos-dns", - "rev": "04b00ea7423c8dbe6e0ea78e4eb96f874a04c543", - "type": "github" - }, - "original": { - "owner": "Janik-Haag", - "repo": "nixos-dns", - "type": "github" - } - }, - "nixpak": { - "inputs": { - "flake-parts": "flake-parts_3", - "hercules-ci-effects": "hercules-ci-effects", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769288622, - "narHash": "sha256-GaDPnzDQAx5WRi12XVttCHsVw0VkOMYNpniT7KHYNfk=", - "owner": "nixpak", - "repo": "nixpak", - "rev": "4276954ad4f877d79801fd8952af38a3370bcb65", - "type": "github" - }, - "original": { - "owner": "nixpak", - "repo": "nixpak", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1755615617, - "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "20075955deac2583bb12f07151c2df830ef346b4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1765674936, - "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1768564909, - "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1770197578, - "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1770197578, - "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1769740369, - "narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6308c3b21396534d8aaeac46179c14c439a89b8a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nur": { - "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1770405908, - "narHash": "sha256-910mKFyjbU6/t8sPJ2U6S1cxJiTgYFU1OOMuihNJO20=", - "owner": "nix-community", - "repo": "NUR", - "rev": "a84c4ed98604b96fc4cb6a4c2b24350aecd8ac3f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "pre-commit-hooks-nix": { - "inputs": { - "flake-compat": [ - "lanzaboote", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1717664902, - "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "deep-research": "deep-research", - "disko": "disko", - "git-hooks": "git-hooks", - "home-manager": "home-manager", - "impermanence": "impermanence", - "lanzaboote": "lanzaboote", - "nix-topology": "nix-topology", - "nixos-dns": "nixos-dns", - "nixpak": "nixpak", - "nixpkgs": "nixpkgs_3", - "nur": "nur", - "scripts": "scripts", - "sops-nix": "sops-nix", - "sounds": "sounds", - "wallpapers": "wallpapers" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717813066, - "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "scripts": { - "locked": { - "lastModified": 1709958643, - "narHash": "sha256-+NHuHYUTUkjIOaCZlH7gICDwRu2dMgJ6smmU9DvgLT0=", - "owner": "ret2pop", - "repo": "scripts", - "rev": "8e230dcb118d5a25629c1980a4764ae071bfb2bf", - "type": "github" - }, - "original": { - "owner": "ret2pop", - "repo": "scripts", - "type": "github" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1770145881, - "narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "sounds": { - "locked": { - "lastModified": 1737024247, - "narHash": "sha256-OTtqUYIe713ti4vaa8hS1Z0UvD/X4J9XkLzKgl2+RBE=", - "owner": "ret2pop", - "repo": "sounds", - "rev": "9714690a6d216f9c55bfe56969d6e7d98768559f", - "type": "github" - }, - "original": { - "owner": "ret2pop", - "repo": "sounds", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "id": "systems", - "type": "indirect" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixos-dns", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742370146, - "narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "adc195eef5da3606891cedf80c0d9ce2d3190808", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "wallpapers": { - "locked": { - "lastModified": 1759390995, - "narHash": "sha256-u3MP+vb4DXbuEo6B8zVesG6t6MCtG9vFjp7Cxsazlxs=", - "owner": "ret2pop", - "repo": "wallpapers", - "rev": "3b88e204405fd594581b7d988abad9dc7e593884", - "type": "github" - }, - "original": { - "owner": "ret2pop", - "repo": "wallpapers", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/flake.nix b/nix/flake.nix deleted file mode 100644 index 4ad9dd8..0000000 --- a/nix/flake.nix +++ /dev/null @@ -1,212 +0,0 @@ -{ - description = "Emacs centric configurations for a complete networked system"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nur.url = "github:nix-community/NUR"; - sops-nix.url = "github:Mic92/sops-nix"; - - scripts.url = "github:ret2pop/scripts"; - wallpapers.url = "github:ret2pop/wallpapers"; - sounds.url = "github:ret2pop/sounds"; - deep-research.url = "github:ret2pop/ollama-deep-researcher"; - impermanence.url = "github:nix-community/impermanence"; - - nix-topology = { - url = "github:oddlama/nix-topology"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - disko = { - url = "github:nix-community/disko"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - lanzaboote = { - url = "github:nix-community/lanzaboote/v0.4.1"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nixos-dns = { - url = "github:Janik-Haag/nixos-dns"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nixpak = { - url = "github:nixpak/nixpak"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - git-hooks = { - url = "github:cachix/git-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = - { self - , nixpkgs - , home-manager - , nur - , disko - , lanzaboote - , sops-nix - , nix-topology - , nixos-dns - , deep-research - , impermanence - , nixpak - , git-hooks - , ... - } - @attrs: - let - vars = import ./flakevars.nix; - system = "x86_64-linux"; - - pkgs = import nixpkgs { inherit system; }; - armPkgs = import nixpkgs { inherit system; }; - - generate = nixos-dns.utils.generate nixpkgs.legacyPackages."${system}"; - - dnsConfig = { - inherit (self) nixosConfigurations; - extraConfig = import ./dns/default.nix; - }; - - # function that generates all systems from hostnames - mkConfigs = map (hostname: - let - isRpi = (builtins.match "rpi-.*" hostname) != null; - hostSystem = if isRpi then "aarch64-linux" else system; - in - { - name = "${hostname}"; - value = nixpkgs.lib.nixosSystem { - system = hostSystem; - specialArgs = attrs; - modules = - if (hostname == "installer") then [ - (./. + "/systems/${hostname}/default.nix") - { networking.hostName = "${hostname}"; } - nix-topology.nixosModules.default - ] else - (if isRpi then [ - (./. + "/systems/${hostname}/default.nix") - disko.nixosModules.disko - home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops - lanzaboote.nixosModules.lanzaboote - ] else - ([ - { - environment.systemPackages = with nixpkgs.lib; [ - deep-research.packages."${system}".deep-research - ]; - } - impermanence.nixosModules.impermanence - nix-topology.nixosModules.default - lanzaboote.nixosModules.lanzaboote - disko.nixosModules.disko - home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops - nixos-dns.nixosModules.dns - { - nixpkgs.overlays = [ nur.overlays.default ]; - home-manager.extraSpecialArgs = attrs // { - systemHostName = "${hostname}"; - }; - networking.hostName = "${hostname}"; - } - (./. + "/systems/${hostname}/default.nix") - ])); - }; - }); - - mkDiskoFiles = map (hostname: { - name = "${hostname}"; - value = self.nixosConfigurations."${hostname}".config.monorepo.vars.diskoSpec; - }); - - pre-commit-check = git-hooks.lib.${system}.run { - src = ./.; - hooks = { - # 1. Formatting - nixpkgs-fmt.enable = false; - - # 2. Linting - statix.enable = true; - deadnix.enable = true; - - # 3. Custom VM Boot Check (The "Integration" part) - # This runs the build-vm derivation to ensure it compiles - vm-build-check = { - enable = true; - name = "vps-vm-build"; - description = "Ensure VPS configuration is buildable as a VM"; - entry = "nix build .#nixosConfigurations.vps.config.system.build.vm --no-link"; - pass_filenames = false; - }; - }; - }; - in - { - checks."${system}" = { - inherit pre-commit-check; - }; - - nixosConfigurations = builtins.listToAttrs (mkConfigs vars.hostnames); - - evalDisko = builtins.listToAttrs (mkDiskoFiles (builtins.filter (x: x != "installer") vars.hostnames)); - - topology."${system}" = import nix-topology { - pkgs = import nixpkgs { - inherit system; - overlays = [ nix-topology.overlays.default ]; - }; - modules = [ - ./topology/default.nix - { nixosConfigurations = self.nixosConfigurations; } - ]; - }; - - devShell."${system}" = with pkgs; mkShell { - inherit (pre-commit-check) shellHook; - buildInputs = [ - fira-code - python3 - poetry - statix - deadnix - ]; - }; - - packages."${system}" = { - zoneFiles = generate.zoneFiles dnsConfig; - octodns = generate.octodnsConfig { - inherit dnsConfig; - - config = { - providers = { - cloudflare = { - class = "octodns_cloudflare.CloudflareProvider"; - token = "env/CLOUDFLARE_TOKEN"; - }; - config = { - check_origin = false; - }; - }; - }; - zones = { - "${vars.remoteHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; - "${vars.orgHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; - }; - }; - }; - }; -} diff --git a/nix/flakevars.nix b/nix/flakevars.nix deleted file mode 100644 index e737e82..0000000 --- a/nix/flakevars.nix +++ /dev/null @@ -1,23 +0,0 @@ -let - # I'm ret2pop! What's your name? - internetName = "ret2pop"; -in -{ - # Name of spontaneity box - remoteHost = "${internetName}.net"; - - # Your internet name - internetName = internetName; - - # Name of your organization - orgHost = "nullring.xyz"; - - # Hostnames of my systems - hostnames = [ - "rpi-zero" - "affinity" - "continuity" - "spontaneity" - "installer" - ]; -} diff --git a/nix/init.el b/nix/init.el deleted file mode 100644 index e977c85..0000000 --- a/nix/init.el +++ /dev/null @@ -1,689 +0,0 @@ -(use-package emacs -:custom -;; global defaults -(indent-tabs-mode nil "no real tabs, only spaces") -(tab-width 2 "tab show as 2 spaces") -(standard-indent 2 "base indentation") - -;; Startup errors -(warning-minimum-level :emergency "Supress emacs warnings") -(confirm-kill-processes nil "Don't ask to quit") -(debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") -(browse-url-generic-program "librewolf") -(browse-url-secondary-browser-function 'browse-url-generic) -(browse-url-browser-function 'browse-url-generic) - -;; Mouse wheel -(mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") -(mouse-wheel-progressive-speed nil "Make scrolling non laggy") -(mouse-wheel-follow-mouse 't "Scroll correct window") -(scroll-conservatively 101 "Sort of smooth scrolling") -(scroll-step 1 "Scroll one line at a time") -(debug-on-error nil "Don't make the annoying popups") -(display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 150 "Draw a line at 100 characters") - (fill-column 150) - (line-spacing 2 "Default line spacing") - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) - - :hook ((text-mode . visual-line-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode) - (org-mode . (lambda () - (setq prettify-symbols-alist - '(("#+begin_src" . ?) - ("#+BEGIN_SRC" . ?) - ("#+end_src" . ?) - ("#+END_SRC" . ?) - ("#+begin_example" . ?) - ("#+BEGIN_EXAMPLE" . ?) - ("#+end_example" . ?) - ("#+END_EXAMPLE" . ?) - ("#+header:" . ?) - ("#+HEADER:" . ?) - ("#+name:" . ?﮸) - ("#+NAME:" . ?﮸) - ("#+results:" . ?) - ("#+RESULTS:" . ?) - ("#+call:" . ?) - ("#+CALL:" . ?) - (":PROPERTIES:" . ?) - (":properties:" . ?) - ("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode))) - (prog-mode . - (lambda () - (setq prettify-symbols-alist - '(("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode)))) - :config - (require 'tex-site) - (server-start) - - ;; start wiith sane defaults - (pixel-scroll-precision-mode 1) - (display-battery-mode 1) - (display-time-mode 1) - (menu-bar-mode -1) - (scroll-bar-mode -1) - (tool-bar-mode -1) - - ;; load theme, fonts, and transparency. Prettify symbols. - (global-prettify-symbols-mode 1) - (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) - (set-frame-parameter nil 'alpha-background 70) - (add-to-list 'default-frame-alist '(alpha-background . 70))) - -(use-package org - :hook - ((org-mode-hook . (lambda () (remove-hook 'post-self-insert-hook #'yaml-electric-bar-and-angle t)))) - :custom - (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") - (org-export-with-broken-links t "publish website even with broken links") - (org-src-fontify-natively t "Colors!") - (org-latex-preview-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (TeX-PDF-mode t) - (org-latex-compiler "xelatex" "Use latex as default") - (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default") - (TeX-engine 'xetex "set xelatex as default engine") - (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") - (preview-image-type 'png "Use PNGs") -;; (org-format-latex-options (plist-put org-format-latex-options :scale 1.5) "space latex better") - (org-return-follows-link t "be able to follow links without mouse") - (org-habit-preceding-days 7 "See org habit entries") - (org-habit-following-days 35 "See org habit entries") - (org-habit-show-habits t "See org habit entries") - (org-habit-show-habits-only-for-today nil "See org habit entries") - (org-habit-show-all-today t "Show org habit graph") - (org-startup-indented t "Indent the headings") - (org-image-actual-width '(300) "Cap width") - (org-startup-with-latex-preview t "see latex previews on opening file") - (org-startup-with-inline-images t "See images on opening file") - (org-hide-emphasis-markers t "prettify org mode") - (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") - (org-pretty-entities t "prettify org mode") - (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") - (org-default-notes-file (concat org-directory "/notes.org") "Notes file") - (org-publish-project-alist - '(("website-org" - :base-directory "~/monorepo" - :base-extension "org" - :publishing-directory "~/website_html" - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 - :html-preamble t - :html-preamble-format (("en" "

home | section main page


"))) - ("website-static" - :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt" - :publishing-directory "~/website_html/" - :recursive t - :publishing-function org-publish-attachment) - ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website") - (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") - :config - (require 'ox-publish) - (require 'org-tempo) - (require 'org-habit) - (org-babel-do-load-languages 'org-babel-load-languages - '((shell . t) - (python . t) - (latex . t)))) - -(use-package unicode-fonts - :init (unicode-fonts-setup)) - -(use-package electric-pair - :hook ((prog-mode . electric-pair-mode) - (org-mode . (lambda () (setq-local electric-pair-inhibit-predicate (lambda (c) (if (eq c ?<) t (electric-pair-default-inhibit c)))))))) - -(use-package wgrep - :after grep) - -(defun insert-urandom-password (&optional length) - (interactive "P") - (let ((length (or length 32)) - (chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{};:,.<>?")) - (insert - (with-temp-buffer - (call-process "head" nil t nil "-c" (number-to-string length) "/dev/urandom") - (let ((bytes (buffer-string))) - (mapconcat (lambda (c) - (string (elt chars (mod (string-to-char (char-to-string c)) (length chars))))) - bytes "")))))) - -(use-package org-fragtog :hook (org-mode . org-fragtog-mode)) - -(use-package yasnippet - :config - (add-to-list 'yas-snippet-dirs "~/monorepo/yasnippet/") - (yas-global-mode 1) - :hook (org-mode . (lambda () (yas-minor-mode) (yas-activate-extra-mode 'latex-mode)))) - -(use-package company - :config - '(add-to-list 'company-backends '(company-ispell company-capf company-yasnippet company-files)) - :hook ((after-init . global-company-mode))) - -(use-package ispell - :custom - (ispell-program-name "aspell" "use aspell") - (ispell-silently-savep t "Save changes to dict without confirmation") - (ispell-dictionary "en" "Use english dictionary") - (ispell-alternate-dictionary "~/.local/share/dict" "dict location")) - -(use-package flyspell - :hook (text-mode . flyspell-mode)) - -(use-package evil - :custom - (evil-want-keybinding nil "Don't load a whole bunch of default keybindings") - :config - (evil-mode 1) - (evil-set-undo-system 'undo-redo) - (evil-set-initial-state 'pdf-view-mode 'normal) - ;; bind / and ? safely after evil is loaded - (define-key evil-normal-state-map (kbd "/") 'swiper) - (define-key evil-normal-state-map (kbd "?") - (lambda () (interactive) (swiper "--reverse")))) - -(use-package evil-collection - :after (evil) - :config - (with-eval-after-load 'evil-maps - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "RET") nil) - (define-key evil-motion-state-map (kbd "TAB") nil)) - (evil-collection-init)) - - -(use-package evil-commentary - :after (evil) - :config - (evil-commentary-mode)) - -(use-package evil-org - :after (evil org) - :hook (org-mode . (lambda () evil-org-mode)) - :config - (require 'evil-org-agenda) - (evil-org-agenda-set-keys)) - -(use-package which-key - :config - (which-key-mode)) - -(use-package page-break-lines - :init - (page-break-lines-mode)) - -(use-package org-journal - :after (org) - :custom - (org-journal-dir "~/monorepo/journal/" "Set journal directory") - (org-journal-date-format "%A, %d %B %Y" "Date format") - (org-journal-file-format "%Y%m%d.org" "Automatic file creation format based on date") - (org-journal-enable-agenda-integration t "All org-journal entries are org-agenda entries") - :init - (defun org-journal-file-header-func (time) - "Custom function to create journal header." - (concat - (pcase org-journal-file-type - (`daily "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+HTML_HEAD: \n#+html_head: \n#+html_head: \n#+options: broken-links:t") - (`weekly "#+TITLE: Weekly Journal\n#+STARTUP: folded") - (`monthly "#+TITLE: Monthly Journal\n#+STARTUP: folded") - (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded")))) - (setq org-journal-file-header 'org-journal-file-header-func)) - -(use-package doom-modeline - :config - (doom-modeline-mode 1)) - -(use-package doom-themes - :ensure t - :custom - (doom-themes-enable-bold t) - (doom-themes-enable-italic t) - (doom-themes-treemacs-theme "doom-rouge") - :config - (load-theme 'doom-rouge t) - - (doom-themes-visual-bell-config) - (doom-themes-treemacs-config) - (doom-themes-org-config)) -;; (load-theme 'catppuccin :no-confirm) - -(use-package writegood-mode - :hook (text-mode . writegood-mode)) - -(use-package org-superstar - :after (org) - :hook (org-mode . (lambda () (org-superstar-mode 1)))) - -;; (use-package eglot - ;; :hook - ;; (prog-mode . eglot-ensure) - ;; (nix-mode . eglot-ensure) - ;; :config - ;; (add-to-list 'eglot-server-programs '(nix-mode . ("nil")))) - - (use-package lsp - :hook - (prog-mode . lsp)) - -(with-eval-after-load 'lsp-mode - (setq lsp-typescript-format-enable t - lsp-typescript-indent-size 4 - lsp-typescript-tab-size 4 - lsp-typescript-indent-style "spaces")) - -(use-package editorconfig - :config - (editorconfig-mode 1)) - - (use-package flycheck - :config (global-flycheck-mode)) - - (use-package platformio-mode -:hook (prog-mode . platformio-conditionally-enable)) - -(use-package irony-mode - :hook ( - (c++-mode . irony-mode) - (c-mode . irony-mode) - (objc-mode . irony-mode) - (irony-mode . irony-cdb-autosetup-compile-options))) - -(use-package irony-eldoc - :hook ((irony-mode . irony-eldoc))) - -(use-package solidity-mode) -(use-package company-solidity) -(use-package solidity-flycheck - :custom - (solidity-flycheck-solc-checker-active t)) - -(use-package projectile - :custom - (projectile-project-search-path '("~/org" "~/src" "~/monorepo" "~/projects") "search path for projects") - :config - (projectile-mode +1)) - -(use-package dashboard - :after (projectile) - :custom - (dashboard-banner-logo-title "Welcome, Commander!" "Set title for dashboard") - (dashboard-icon-type 'nerd-icons "Use nerd icons") - (dashboard-vertically-center-content t "Center content") - (dashboard-set-init-info t) - (dashboard-week-agenda t "Agenda in dashboard") - (dashboard-items '((recents . 5) - (bookmarks . 5) - (projects . 5) - (agenda . 5) - (registers . 5)) "Look at some items") - :config - (dashboard-setup-startup-hook)) - -(use-package counsel) - -(use-package ivy - :custom - (ivy-use-virtual-buffers t "Make searching more efficient") - (enable-recursive-minibuffers t "Don't get soft locked when in a minibuffer") - :bind - ("C-s" . swiper) - ("C-c C-r" . ivy-resume) - ("M-x" . counsel-M-x) - ("C-x C-f" . counsel-find-file) - (" f" . counsel-describe-function) - (" v" . counsel-describe-variable) - (" o" . counsel-describe-symbol) - (" l" . counsel-find-library) - (" i" . counsel-info-lookup-symbol) - (" u" . counsel-unicode-char) - ("C-c g" . counsel-git) - ("C-c j" . counsel-git-grep) - ("C-c k" . counsel-ag) - ("C-x l" . counsel-locate) - :config - (ivy-mode)) -(define-key ivy-minibuffer-map (kbd "C-j") 'ivy-immediate-done) - -(use-package magit) - -(use-package erc - :hook - ((erc-mode . erc-notifications-mode)) - :custom - (erc-nick system-username "sets erc username to the one set in nix config") - (erc-user-full-name system-fullname "sets erc fullname to the one set in nix config")) - -(use-package general - :init - (defun znc () - (interactive) - (erc-tls :server "ret2pop.net" - :port "5000")) - - (defun prestonpan () - (interactive) - (erc-tls :server "nullring.xyz" - :port "6697")) - - (defun liberachat () - (interactive) - (erc-tls :server "irc.libera.chat" - :port "6697")) - - (defun efnet () - (interactive) - (erc-tls :server "irc.prison.net" - :port "6697")) - - (defun matrix-org () - (interactive) - (ement-connect)) - - (defun gimp-org () - (interactive) - (erc-tls :server "irc.gimp.org" - :port "6697")) - - :config - (general-create-definer leader-key :prefix "SPC") - (leader-key 'normal - "o c" '(org-capture :wk "Capture") - - ;; Org Mode - "n" '(:ignore t :wk "Org mode plugins") - "n j j" '(org-journal-new-entry :wk "Make new journal entry") - "n r f" '(org-roam-node-find :wk "Find roam node") - "n r i" '(org-roam-node-insert :wk "Insert roam node") - "n r a" '(org-roam-alias-add :wk "Add alias to org roam node") - "n r g" '(org-roam-graph :wk "Graph roam database") - "m I" '(org-id-get-create :wk "Make org id") - - ;; Programming Projects - "." '(counsel-find-file :wk "find file") - "p a" '(projectile-add-known-project :wk "Add to project list") - - "N f" '(nix-flake :wk "nix flake menu") - "f" '(:ignore t :wk "file operations") - "f p" '(projectile-switch-project :wk "find project to switch to") - "f f" '(counsel-fzf :wk "find file in project") - "f s" '(counsel-rg :wk "find string in project") - - "y n s" '(yas-new-snippet :wk "Create new snippet") - - "g" '(:ignore t :wk "Magit") - "g /" '(magit-dispatch :wk "git commands") - "g P" '(magit-push :wk "git push") - "g c" '(magit-commit :wk "git commit") - "g p" '(magit-pull :wk "Pull from git") - "g s" '(magit-status :wk "Change status of files") - "g i" '(magit-init :wk "init new git project") - "g r" '(magit-rebase :wk "Rebase branch") - "g m" '(magit-merge :wk "Merge branches") - "g b" '(magit-branch :wk "Git branch") - - "o p" '(treemacs :wk "Project Drawer") - "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") - - "w r" '(writeroom-mode :wk "focus mode for writing") - - ;; Applications - "o" '(:ignore t :wk "Open application") - "o t" '(vterm :wk "Terminal") - "o e" '(eshell :wk "Elisp Interpreter") - "o m" '(mu4e :wk "Email") - "o M" '(matrix-org :wk "Connect to matrix") - "o r s" '(elfeed :wk "rss feed") - "o a" '(org-agenda :wk "Open agenda") - "o w" '(eww :wk "web browser") - "m m" '(emms :wk "Music player") - "s m" '(proced :wk "System Manager") - "l p" '(list-processes :wk "List Emacs Processes") - - "m P p" '(org-publish :wk "Publish website components") - "s e" '(sudo-edit :wk "Edit file with sudo") - - ;; "f f" '(eglot-format :wk "Format code buffer") - "i p c" '(prestonpan :wk "Connect to my IRC server") - "i l c" '(liberachat :wk "Connect to libera chat server") - "i e c" '(efnet :wk "Connect to efnet chat server") - "i g c" '(gimp-org :wk "Connect to gimp chat server") - "i z c" '(znc :wk "Connect to my ZNC instance") - - ;; Documentation - "h" '(:ignore t :wk "Documentation") - "h v" '(counsel-describe-variable :wk "Describe variable") - "h f" '(counsel-describe-function :wk "Describe function") - "h h" '(help :wk "Help") - "h m" '(woman :wk "Manual") - "h i" '(info :wk "Info") - - "s i p" '(insert-urandom-password :wk "insert random password to buffer (for sops)") - - "h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/monorepo/config/emacs.org"))))) - -;; (use-package ellama -;; :custom -;; (ellama-sessions-directory "~/org/ellama/" "Set org directory for LLM sessions") -;; :init -;; (require 'llm-ollama) -;; (setopt ellama-provider (make-llm-ollama -;; :host "localhost" -;; :chat-model "qwen2.5:14b"))) - -(use-package minuet - :bind - (("M-y" . #'minuet-complete-with-minibuffer) - ("C-c m" . #'minuet-show-suggestion) - :map minuet-active-mode-map - ("C-c r" . #'minuet-dismiss-suggestion) - ("TAB" . #'minuet-accept-suggestion)) - - :init - (add-hook 'prog-mode-hook #'minuet-auto-suggestion-mode) - - :custom - (minuet-request-timeout 40 "Max timeout in seconds") - (minuet-provider 'openai-fim-compatible "FIM compatible OpenAI-like API (Ollama)") - (minuet-n-completions 1 "I am using ghost text so I only need one possible completion") - (minuet-context-window 1024 "how much context do I want?") - - :config - (plist-put minuet-openai-fim-compatible-options :end-point "http://localhost:11434/v1/completions") - - (plist-put minuet-openai-fim-compatible-options :name "Ollama") - (plist-put minuet-openai-fim-compatible-options :api-key "TERM") - (plist-put minuet-openai-fim-compatible-options :model "qwen2.5-coder:14b") - - (minuet-set-optional-options minuet-openai-fim-compatible-options :max_tokens 50)) - -(use-package elfeed - :custom - (elfeed-search-filter "@1-month-ago +unread" "Only display unread articles from a month ago") - - :config - (run-with-timer 0 (* 60 60 4) 'elfeed-update) - - :hook ((elfeed-search-mode . elfeed-update))) - -(use-package elfeed-org - :custom - (rmh-elfeed-org-files '("~/monorepo/config/elfeed.org") "Use elfeed config in repo as default") - :config - (elfeed-org)) - -(use-package elfeed-tube - :after elfeed - :demand t - :config - (elfeed-tube-setup) - :bind (:map elfeed-show-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save) - :map elfeed-search-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save))) - -(use-package elfeed-tube-mpv - :bind (:map elfeed-show-mode-map - ("C-c C-f" . elfeed-tube-mpv-follow-mode) - ("C-c C-c" . elfeed-tube-mpv) - ("C-c C-w" . elfeed-tube-mpv-where) - :map elfeed-search-mode-map - ("M" . elfeed-tube-mpv))) - -(use-package treemacs) -(use-package treemacs-evil - :after (treemacs evil)) -(use-package treemacs-projectile - :after (treemacs projectile)) -(use-package treemacs-magit - :after (treemacs magit)) - -(use-package eww - :custom - (search-engines - '((("google" "g") "https://google.com/search?q=%s") - (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s") - (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt") - (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")) - "use this set of search engines") - - (search-engine-default "google" "Use google as default") - (eww-search-prefix "https://google.com/search?q=" "Google prefix") - :hook ((eww-mode . (lambda () (local-set-key (kbd "y Y") #'eww-copy-page-url))))) - -(use-package org-roam - :after (org) - :custom - (org-roam-db-update-on-save t "Update org-roam db") - (org-roam-graph-viewer "librewolf" "Use librewolf to view org-roam graph") - (org-roam-directory (file-truename "~/monorepo/mindmap") "Set org-roam directory inside monorepo") - (org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${title}.org" - "#+title: ${title}\n#+author: Preston Pan\n#+html_head: \n#+html_head: \n#+html_head: \n#+options: broken-links:t") - :unnarrowed t)) "org-roam files start with this snippet by default") - :config - (org-roam-db-autosync-mode) - ;; Otherwise links are broken when publishing - (org-roam-update-org-id-locations)) - -(use-package org-roam-ui - :after org-roam - :hook (after-init . org-roam-ui-mode) - :custom - (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") - (org-roam-ui-follow t "Have cool visual while editing org-roam") - (org-roam-ui-update-on-save t "This option is obvious") - (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads")) - -(use-package pinentry - :custom (epa-pinentry-mode `loopback "Set this option to match gpg-agent.conf") - :config (pinentry-start)) - -(use-package smtpmail - :custom - (user-mail-address system-email "Use our email") - (user-full-name system-fullname "Use our full name") - (sendmail-program "msmtp" "Use msmtp in order to send emails") - (send-mail-function 'smtpmail-send-it "This is required for this to work") - (message-sendmail-f-is-evil t "Use evil-mode for sendmail") - (message-sendmail-extra-arguments '("--read-envelope-from") "idk what this does") - (message-send-mail-function 'message-send-mail-with-sendmail "Use sendmail")) - -(use-package mu4e - :after smtpmail - :hook - ((mu4e-compose-mode . mml-secure-message-sign-pgpmime)) - :custom - (mu4e-drafts-folder "/Drafts" "Set drafts folder mu db") - (mu4e-sent-folder "/Sent" "Set sent folder in mu db") - (mu4e-trash-folder "/Trash" "Set trash folder in mu db") - (mu4e-attachment-dir "~/Downloads" "Set downloads folder for attachments") - (mu4e-view-show-addresses 't "Show email addresses in main view") - (mu4e-confirm-quit nil "Don't ask to quit") - (message-kill-buffer-on-exit t "Kill buffer when I exit mu4e") - (mu4e-compose-dont-reply-to-self t "Don't include self in replies") - (mu4e-change-filenames-when-moving t) - (mu4e-get-mail-command (concat "mbsync " system-username) "Use mbsync for imap") - (mu4e-compose-reply-ignore-address (list "no-?reply" system-email) "ignore my own address and noreply") - (mu4e-html2text-command "w3m -T text/html" "Use w3m to convert html to text") - (mu4e-update-interval 300 "Update duration") - (mu4e-headers-auto-update t "Auto-updates feed") - (mu4e-view-show-images t "Shows images") - (mu4e-compose-signature-auto-include nil) - (mml-secure-openpgp-sign-with-sender t) - (mml-secure-openpgp-signers (list system-gpgkey)) - (mail-user-agent 'mu4e-user-agent) - (message-mail-user-agent 'mu4e-user-agent) - (mu4e-use-fancy-chars t "Random option to make mu4e look nicer")) - -(use-package emms - :custom - (emms-source-file-default-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-music-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-server-name "localhost" "Connect to localhost") - (emms-player-mpd-server-port "6600" "Connect to port 6600") - (emms-player-list '(emms-player-mpd) "Use mpd") - (emms-lyrics-display-on-modeline t) - :hook - ((emms-playlist-mode . emms-lyrics-mode) - (emms-player-started . emms-lyrics-lrclib-get)) - :init - (emms-all) - (add-to-list 'emms-info-functions 'emms-info-mpd) - (add-to-list 'emms-player-list 'emms-player-mpd) - :config (emms-player-mpd-connect)) - -(use-package centaur-tabs - :custom - (centaur-tabs-set-icons t "use icons for centaur-tabs") - (centaur-tabs-set-modified-marker t "show when buffer modified") - (centaur-tabs-icon-type 'all-the-icons "use all-the-icons for icons") - :demand - :config - (centaur-tabs-mode t) - :bind - ("C-" . centaur-tabs-backward) - ("C-" . centaur-tabs-forward)) - -(use-package lean4-mode - :commands lean4-mode - :vc (:url "https://github.com/leanprover-community/lean4-mode.git" - :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6")) diff --git a/nix/modules/bitcoin.nix b/nix/modules/bitcoin.nix deleted file mode 100644 index bd014bb..0000000 --- a/nix/modules/bitcoin.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, ... }: -{ - services.bitcoind."${config.monorepo.vars.userName}" = { - enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - prune = 10000; - }; -} diff --git a/nix/modules/cgit.nix b/nix/modules/cgit.nix deleted file mode 100644 index 5bf888d..0000000 --- a/nix/modules/cgit.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, config, ... }: -let - serverName = "git.${config.monorepo.vars.orgHost}"; -in -{ - services.cgit."my-projects" = { - enable = lib.mkDefault config.services.gitDaemon.enable; - scanPath = "${config.users.users.git.home}"; - settings = { - root-title = "Nullring Git Server"; - root-desc = "Projects and cool things"; - enable-commit-graph = 1; - enable-log-filecount = 1; - enable-log-linecount = 1; - enable-index-owner = 0; - clone-prefix = "https://${serverName}"; - enable-tree-linenumbers = 1; - strict-export = "git-daemon-export-ok"; - }; - gitHttpBackend = { - enable = true; - checkExportOkFiles = true; - }; - nginx = { - virtualHost = "${serverName}"; - }; - }; - - networking.domains.subDomains."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { }; - services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { - forceSSL = true; - enableACME = true; - }; -} diff --git a/nix/modules/conduit.nix b/nix/modules/conduit.nix deleted file mode 100644 index edc8e8b..0000000 --- a/nix/modules/conduit.nix +++ /dev/null @@ -1,212 +0,0 @@ -{ config, lib, ... }: -let - livekitListenPort = 8443; - # secrets.yaml - livekit_secret = "livekit_secret"; - conduit_secret = "conduit_secrets"; -in -{ - sops.secrets = lib.mkIf config.services.matrix-conduit.enable { - "${livekit_secret}" = lib.mkIf config.services.livekit.enable { - format = "yaml"; - mode = "0444"; - }; - - "${conduit_secret}" = { - format = "yaml"; - }; - }; - - services.matrix-conduit = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - secretFile = "/run/secrets/${conduit_secret}"; - settings.global = { - server_name = "matrix.${config.monorepo.vars.orgHost}"; - trusted_servers = [ - "matrix.org" - "nixos.org" - "conduit.rs" - ]; - address = "0.0.0.0"; - port = 6167; - allow_registration = false; - }; - }; - - - services.livekit = { - enable = lib.mkDefault (config.services.matrix-conduit.enable || config.services.matrix-synapse.enable); - keyFile = "/run/secrets/${livekit_secret}"; - settings = { - port = 7880; - turn = { - enabled = true; - domain = "livekit.${config.monorepo.vars.orgHost}"; - cert_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/fullchain.pem"; - key_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/key.pem"; - tls_port = 5349; - udp_port = 3478; - }; - - rtc = { - use_external_ip = true; - tcp_port = 7881; - udp_port = 7882; - port_range_start = 50000; - port_range_end = 60000; - }; - }; - }; - - services.lk-jwt-service = { - enable = lib.mkDefault config.services.livekit.enable; - port = 6495; - livekitUrl = "wss://livekit.${config.monorepo.vars.orgHost}"; - keyFile = "/run/secrets/${livekit_secret}"; - }; - - # TODO: split into conduit and livekit - networking.firewall.allowedTCPPorts = lib.mkIf config.services.matrix-conduit.enable [ 8448 7881 5349 livekitListenPort ]; - - # this is fine though - networking.firewall.allowedUDPPorts = lib.mkIf config.services.livekit.enable [ 7882 3478 ]; - networking.firewall.allowedUDPPortRanges = lib.mkIf config.services.livekit.enable [ - { from = 49152; to = 65535; } - ]; - - networking.domains.subDomains."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable { }; - networking.domains.subDomains."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable { }; - - services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable { - enableACME = lib.mkDefault config.monorepo.profiles.server.enable; - forceSSL = true; - listen = [ - { - addr = "0.0.0.0"; - port = 443; - ssl = true; - } - { - addr = "[::]"; - port = 443; - ssl = true; - } - { - addr = "0.0.0.0"; - port = 8448; - ssl = true; - } - { - addr = "[::]"; - port = 8448; - ssl = true; - } - ]; - locations."/_matrix/" = { - proxyPass = "http://127.0.0.1:${toString config.services.matrix-conduit.settings.global.port}"; - extraConfig = '' - proxy_set_header Host $host; - proxy_buffers 32 16k; - proxy_read_timeout 5m; - ''; - }; - - locations."= /.well-known/matrix/server" = { - extraConfig = '' - default_type application/json; - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - ''; - - return = ''200 '{"m.server": "matrix.${config.monorepo.vars.orgHost}:443"}' ''; - }; - - locations."/.well-known/matrix/client" = { - extraConfig = '' - default_type application/json; - add_header Access-Control-Allow-Origin *; - ''; - - return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.${config.monorepo.vars.orgHost}\"}, \"org.matrix.msc4143.rtc_foci\": [{\"type\": \"livekit\", \"livekit_service_url\": \"https://matrix.${config.monorepo.vars.orgHost}:${toString livekitListenPort}\"}]}'"; - }; - - extraConfig = '' - merge_slashes off; - ''; - }; - - - services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}-livekit" = lib.mkIf config.services.livekit.enable { - serverName = "matrix.${config.monorepo.vars.orgHost}"; - listen = [ - { - addr = "0.0.0.0"; - port = livekitListenPort; - ssl = true; - } - { - addr = "[::]"; - port = livekitListenPort; - ssl = true; - } - ]; - addSSL = true; - enableACME = false; - forceSSL = false; - useACMEHost = "matrix.${config.monorepo.vars.orgHost}"; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.lk-jwt-service.port}"; - proxyWebsockets = true; - extraConfig = '' - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - ''; - }; - }; - - services.nginx.virtualHosts."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.livekit.settings.port}"; - proxyWebsockets = true; - extraConfig = '' - proxy_read_timeout 3600s; - proxy_send_timeout 3600s; - - # Standard headers for LiveKit - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # --- CORS CONFIGURATION START --- - # 1. Allow all origins (including app.element.io) - add_header 'Access-Control-Allow-Origin' '*' always; - - # 2. Allow specific methods (POST is required for /sfu/get) - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always; - - # 3. Allow headers (Content-Type is crucial for JSON) - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always; - - # 4. Handle the OPTIONS preflight request immediately - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always; - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain; charset=utf-8'; - add_header 'Content-Length' 0; - return 204; - } - # --- CORS CONFIGURATION END --- - ''; - }; - }; -} diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix deleted file mode 100644 index bee737f..0000000 --- a/nix/modules/configuration.nix +++ /dev/null @@ -1,606 +0,0 @@ -{ config, pkgs, lib, ... }: -let - userGroups = [ - "nginx" - "git" - "ircd" - "ngircd" - "conduit" - "livekit" - "matterbridge" - "maddy" - "ntfy-sh" - "public-inbox" - "plugdev" - ]; - allDomains = - (lib.attrNames config.networking.domains.baseDomains) ++ - (lib.attrNames config.networking.domains.subDomains); - - # 2. Generate BOTH possible outcomes in advance - prodHosts = map (dom: "${config.monorepo.profiles.server.ipv4} ${dom}") allDomains; - vmHosts = map (dom: "127.0.0.1 ${dom}") allDomains; -in -{ - imports = [ - ./cgit.nix - ./public_inbox.nix - ./matterbridge.nix - ./mautrix.nix - ./xserver.nix - ./ssh.nix - ./pipewire.nix - ./tor.nix - ./kubo.nix - ./nvidia.nix - ./cuda.nix - ./nginx.nix - ./secrets.nix - ./git-daemon.nix - ./ollama.nix - ./i2pd.nix - ./conduit.nix - ./bitcoin.nix - ./murmur.nix - ./ngircd.nix - ./znc.nix - ./docker.nix - ./impermanence.nix - ./coturn.nix - ./maddy.nix - ./ntfy-sh.nix - ./fail2ban.nix - ]; - - environment.etc."wpa_supplicant.conf".text = '' - country=CA - ''; - systemd.tmpfiles.rules = [ - "d /srv/git 0755 git git -" - ]; - - zramSwap = lib.mkIf config.monorepo.profiles.desktop.enable { - enable = true; - algorithm = "zstd"; - memoryPercent = 50; - }; - - virtualisation.vmVariant = lib.mkIf config.monorepo.profiles.server.enable { - sops.validateSopsFiles = false; - disko.devices = lib.mkForce { }; - virtualisation.forwardPorts = [ - { from = "host"; host.port = 10443; guest.port = 443; } - { from = "host"; host.port = 9080; guest.port = 80; } - ]; - virtualisation.useNixStoreImage = false; - virtualisation.sharedDirectories.sops-keys = { - source = "/home/preston/.config/sops/age"; # Path to your host key - target = "/home/preston/.config/sops/age"; - }; - networking.extraHosts = lib.mkForce (lib.concatStringsSep "\n" vmHosts); - networking.defaultGateway = lib.mkForce null; - networking.interfaces."${config.monorepo.profiles.server.interface}".useDHCP = lib.mkForce true; - - fileSystems."/" = lib.mkForce { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - systemd.services.sops-nix = { - unitConfig.RequiresMountsFor = "/home/preston/.config/sops/age"; - }; - }; - - documentation = { - enable = lib.mkDefault config.monorepo.profiles.documentation.enable; - man.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; - dev.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; - }; - - environment = { - etc = { - securetty.text = '' - # /etc/securetty: list of terminals on which root is allowed to login. - # See securetty(5) and login(1). - ''; - }; - }; - - - systemd.network.enable = lib.mkDefault config.monorepo.profiles.server.enable; - systemd.network.networks."40-${config.monorepo.profiles.server.interface}" = lib.mkIf config.monorepo.profiles.server.enable { - matchConfig.Name = "${config.monorepo.profiles.server.interface}"; - networkConfig = { - IPv6AcceptRA = true; - IPv6PrivacyExtensions = false; - }; - ipv6AcceptRAConfig = { - UseAutonomousPrefix = false; - }; - }; - - systemd = { - services.NetworkManager-wait-online.enable = false; - coredump.enable = false; - network.config.networkConfig.IPv6PrivacyExtensions = "kernel"; - tmpfiles.settings = { - "restrictetcnixos"."/etc/nixos/*".Z = { - mode = "0000"; - user = "root"; - group = "root"; - }; - }; - }; - - - boot = { - supportedFilesystems = { - btrfs = true; - ext4 = true; - }; - - extraModprobeConfig = '' - options snd-usb-audio vid=0x1235 pid=0x8200 device_setup=1 - options rtw88_core disable_lps_deep=y power_save=0 disable_aspm_l1ss=y - options rtw88_pci disable_msi=y disable_aspm=y - options rtw_core disable_lps_deep=y - options rtw_pci disable_msi=y disable_aspm=y - options rtw89_core disable_ps_mode=y - options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y disable_clkreq=y - options iwlwifi 11n_disable=8 uapsd_disable=1 bt_coex_active=0 disable_11ax=1 power_save=0 - ''; - extraModulePackages = [ ]; - - initrd = { - availableKernelModules = [ - "xhci_pci" - "ahci" - "usb_storage" - "sd_mod" - "nvme" - "sd_mod" - "ehci_pci" - "rtsx_pci_sdmmc" - "usbhid" - ]; - - kernelModules = [ ]; - }; - - lanzaboote = { - enable = config.monorepo.profiles.secureBoot.enable; - pkiBundle = "/var/lib/sbctl"; - }; - - loader = { - systemd-boot.enable = lib.mkForce ((! config.monorepo.profiles.grub.enable) && (! config.monorepo.profiles.secureBoot.enable)); - efi.canTouchEfiVariables = lib.mkForce (! config.monorepo.profiles.grub.enable); - }; - - kernelModules = [ - "snd-seq" - "snd-rawmidi" - "xhci_hcd" - "kvm_intel" - "af_packet" - "ccm" - "ctr" - "cmac" - "arc4" - "ecb" - "michael_mic" - "gcm" - "sha256" - "sha384" - ]; - - kernelParams = [ - "cfg80211.reg_alpha2=CA" - "usbcore.autosuspend=-1" - "pcie_aspm=off" - "pci=noaer" - # "debugfs=off" - "page_alloc.shuffle=1" - "slab_nomerge" - # "page_poison=1" - - # madaidan - "pti=on" - "randomize_kstack_offset=on" - "vsyscall=none" - # "lockdown=confidentiality" - - # cpu - "spectre_v2=on" - "spec_store_bypass_disable=on" - "tsx=off" - "l1tf=full,force" - "kvm.nx_huge_pages=force" - - # hardened - "extra_latent_entropy" - - # mineral - # "init_on_alloc=1" - # "random.trust_bootloader=off" - # "init_on_free=1" - "quiet" - # "loglevel=0" - ]; - - blacklistedKernelModules = [ - "netrom" - "rose" - - "adfs" - "affs" - "bfs" - "befs" - "cramfs" - "efs" - "erofs" - "exofs" - "freevxfs" - "f2fs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "ntfs" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; - - kernel.sysctl = - if config.monorepo.profiles.server.enable then { - "net.ipv6.conf.${config.monorepo.profiles.server.interface}.autoconf" = 0; - "net.ipv6.conf.${config.monorepo.profiles.server.interface}.accept_ra" = 1; - } else { - "kernel.ftrace_enabled" = false; - "net.core.bpf_jit_enable" = false; - "kernel.kptr_restrict" = 2; - - # madaidan - "kernel.smtcontrol" = "on"; - "vm.swappiness" = 1; - "vm.unprivileged_userfaultfd" = 0; - "dev.tty.ldisc_autoload" = 0; - "kernel.kexec_load_disabled" = 1; - "kernel.sysrq" = 4; - "kernel.perf_event_paranoid" = 3; - - # net - "net.ipv4.ip_forward" = 1; - "net.ipv4.icmp_echo_ignore_broadcasts" = true; - # "net.ipv4.conf.all.accept_redirects" = false; - # "net.ipv4.conf.all.secure_redirects" = false; - # "net.ipv4.conf.default.accept_redirects" = false; - # "net.ipv4.conf.default.secure_redirects" = false; - # "net.ipv6.conf.all.accept_redirects" = false; - # "net.ipv6.conf.default.accept_redirects" = false; - }; - }; - - networking = { - interfaces = lib.mkIf config.monorepo.profiles.server.enable { - "${config.monorepo.profiles.server.interface}" = { - ipv4.addresses = [ - { - address = config.monorepo.profiles.server.ipv4; - prefixLength = 24; - } - ]; - ipv6.addresses = [ - { - address = config.monorepo.profiles.server.ipv6; - prefixLength = 64; - } - ]; - useDHCP = lib.mkForce false; - }; - }; - - defaultGateway = lib.mkIf config.monorepo.profiles.server.enable config.monorepo.profiles.server.gateway; - useDHCP = false; - tempAddresses = lib.mkIf config.monorepo.profiles.server.enable "disabled"; - extraHosts = lib.mkIf config.monorepo.profiles.server.enable (lib.concatStringsSep "\n" prodHosts); - - domains = lib.mkIf config.monorepo.profiles.server.enable { - enable = true; - baseDomains = { - "${config.monorepo.vars.remoteHost}" = { - a.data = config.monorepo.profiles.server.ipv4; - aaaa.data = config.monorepo.profiles.server.ipv6; - }; - "${config.monorepo.vars.orgHost}" = { - a.data = config.monorepo.profiles.server.ipv4; - aaaa.data = config.monorepo.profiles.server.ipv6; - txt = { - data = "v=spf1 ip4:${config.monorepo.profiles.server.ipv4} ip6:${config.monorepo.profiles.server.ipv6} -all"; - }; - }; - }; - }; - - - nameservers = [ "8.8.8.8" "1.1.1.1" ]; - dhcpcd.enable = (! config.monorepo.profiles.server.enable); - networkmanager = { - enable = lib.mkForce (! config.monorepo.profiles.server.enable); # rpis need network - wifi = { - powersave = false; - }; - ensureProfiles = { - profiles = { - home-wifi = { - connection = { - id = "TELUS6572"; - permissions = ""; - type = "wifi"; - }; - ipv4 = { - dns-search = ""; - method = "auto"; - }; - ipv6 = { - addr-gen-mode = "stable-privacy"; - dns-search = ""; - method = "auto"; - }; - wifi = { - mac-address-blacklist = ""; - mode = "infrastructure"; - ssid = "TELUS6572"; - }; - wifi-security = { - auth-alg = "open"; - key-mgmt = "wpa-psk"; - # when someone actually steals my internet then I will be concerned. - # This password only matters if you actually show up to my house in real life. - # That would perhaps allow for some nasty networking related shenanigans. - # I guess we'll cross that bridge when I get there. - psk = "b4xnrv6cG6GX"; - }; - }; - }; - }; - }; - firewall = { - allowedTCPPorts = [ 22 11434 ]; - allowedUDPPorts = [ ]; - }; - }; - - hardware = { - wirelessRegulatoryDatabase = true; - enableAllFirmware = true; - cpu.intel.updateMicrocode = true; - graphics.enable = ! config.monorepo.profiles.ttyonly.enable; - - bluetooth = { - enable = lib.mkDefault config.monorepo.profiles.desktop.enable; - powerOnBoot = lib.mkDefault config.monorepo.profiles.desktop.enable; - }; - }; - - services = { - pulseaudio.enable = ! config.monorepo.profiles.pipewire.enable; - chrony = { - enable = true; - enableNTS = true; - servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ]; - }; - - jitterentropy-rngd.enable = true; - resolved.settings.Resolve.DNSSEC = true; - # usbguard.enable = true; - usbguard.enable = false; - dbus.apparmor = "enabled"; - - # Misc. - udev = { - extraRules = ''''; - packages = - if config.monorepo.profiles.workstation.enable then with pkgs; [ - platformio-core - platformio-core.udev - openocd - ] else [ ]; - }; - - printing.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - udisks2.enable = (! config.monorepo.profiles.ttyonly.enable); - }; - - programs = { - nix-ld.enable = true; - zsh.enable = true; - light.enable = true; - ssh.enableAskPassword = false; - }; - - nixpkgs = { - hostPlatform = lib.mkDefault "x86_64-linux"; - config = { - allowUnfree = true; - cudaSupport = lib.mkDefault config.monorepo.profiles.cuda.enable; - }; - }; - - security = { - acme = { - acceptTerms = true; - defaults.email = "${config.monorepo.vars.internetName}@gmail.com"; - }; - apparmor = { - enable = true; - killUnconfinedConfinables = true; - packages = with pkgs; [ - apparmor-profiles - ]; - # policies = { - # firefox.path = "${pkgs.apparmor-profiles}/share/apparmor/extra-profiles/firefox"; - # }; - }; - - pam.loginLimits = [ - { domain = "*"; item = "nofile"; type = "-"; value = "32768"; } - { domain = "*"; item = "memlock"; type = "-"; value = "32768"; } - ]; - rtkit.enable = true; - - lockKernelModules = true; - protectKernelImage = true; - - allowSimultaneousMultithreading = true; - forcePageTableIsolation = true; - - tpm2 = { - enable = true; - pkcs11.enable = true; - tctiEnvironment.enable = true; - }; - - auditd.enable = true; - audit.enable = true; - chromiumSuidSandbox.enable = (! config.monorepo.profiles.ttyonly.enable); - sudo.enable = true; - }; - - xdg.portal = { - enable = (! config.monorepo.profiles.ttyonly.enable); - wlr.enable = (! config.monorepo.profiles.ttyonly.enable); - extraPortals = with pkgs; if (! config.monorepo.profiles.ttyonly.enable) then [ - xdg-desktop-portal-gtk - xdg-desktop-portal - xdg-desktop-portal-hyprland - ] else [ ]; - config.common.default = "*"; - }; - - environment.etc."gitconfig".text = '' - [init] - defaultBranch = main - ''; - environment.extraInit = '' - umask 0022 - ''; - environment.systemPackages = with pkgs; [ - restic - sbctl - gitFull - git-lfs - git-lfs-transfer - vim - curl - nmap - exiftool - (writeShellScriptBin "new-repo" - '' - #!/bin/bash - cd ${config.users.users.git.home} - git init --bare "$1" - vim "$1/description" - chown -R git:git "$1" - '' - ) - ]; - - users.groups = lib.genAttrs userGroups (name: lib.mkDefault { }); - - users.users = lib.genAttrs userGroups - (name: { - isSystemUser = lib.mkDefault true; - group = "${name}"; - extraGroups = [ "acme" "nginx" ]; - }) // { - conduit = { - isSystemUser = lib.mkDefault true; - group = "conduit"; - extraGroups = [ ]; - }; - matterbridge = { - isSystemUser = lib.mkDefault true; - group = "matterbridge"; - extraGroups = [ ]; - }; - - public-inbox = { - isSystemUser = lib.mkDefault true; - group = "public-inbox"; - - extraGroups = [ "acme" "nginx" "git" ]; - }; - - ircd = { - isSystemUser = lib.mkDefault true; - group = "ircd"; - home = "/home/ircd"; - }; - - nginx = { - group = "nginx"; - isSystemUser = lib.mkDefault true; - extraGroups = [ "acme" ]; - }; - - root.openssh.authorizedKeys.keys = [ - config.monorepo.vars.sshKey - ]; - - git = { - isSystemUser = true; - home = "/srv/git"; - shell = "/bin/sh"; - group = "git"; - openssh.authorizedKeys.keys = [ - config.monorepo.vars.sshKey - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIEF+mcL9nDkzVhCYyYWCIrP+b6oRiiaV509jywbD0Vq nix-on-droid@localhost" - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCedJm0yYB0qLah/Y7PqLVgNh6qp+yujssGtuR05KbZLzSnsLUjUMObMyjFB9xTKrSGDqyoMkNe2l5VXMBJ9wBKLbzqMWbkakAWOj7EC/qZ6dFWA075mniwAuWKY/Q8QYohAJbbeU4j0ObWrltd4ar2Ac9vsVyftYF5efg8PEqVdOxzrBn5taY1zCCRjee5ISeRDIovnBbq7x86jsx5VnXTjMN9FZCI2qmz992Sg/PPXpXat+O1YQlG0eBHEny2Ug9gaAYnGOVr6kZKE4lrjz47nrXVXO6lJsNXmuzTVnEgo30DAA3dV4fws/M5ptM5Pgg2qe94HyHWhhmtXOekWmGtP3YxpVe3M/SPl31UL570ZDuuCcpJTsbe90ZyXC3CiSJkLKbmFkfOgZ6DI2LT8KSp09/2NCtZYriLN/nXObn6gQzByGMxVyKNx2hh8ENt9hzTCAk5lYDK3g3wS8eLCY3EH/caEqT9mLZEZeRHtAhtfozo1VJL7sSZ0Zm7wiIxHylwOshh1sYI1gb1MgMqNnrr1t8+8UK+Q0NERQW3yiphG36HXWy/DdCG0EF+N850KbgH1FFur+m+3hZCZCFVp3tGCcOC+bxWMBT3+9yC6LARi5cFjLQaWLsNO5xEs4vqX3+s3QjJ0pAYDkgtoeY2Fbh+imN+JasWn/cSy5p3UdE4ZQ== andrei@kiss" - ]; - }; - "${config.monorepo.vars.userName}" = { - openssh.authorizedKeys.keys = [ - config.monorepo.vars.sshKey - ]; - - linger = true; - initialPassword = "${config.monorepo.vars.userName}"; - isNormalUser = true; - description = config.monorepo.vars.fullName; - extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" "docker" "plugdev" ]; - shell = pkgs.zsh; - packages = [ ]; - }; - }; - - nixpkgs.config.permittedInsecurePackages = [ - "python3.13-ecdsa-0.19.1" - "olm-3.2.16" - ]; - - nix = { - settings = { - keep-outputs = true; - keep-derivations = true; - auto-optimise-store = true; - max-jobs = 4; - cores = 0; - substituters = [ - "https://cache.nixos-cuda.org" - ]; - trusted-public-keys = [ - "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" - ]; - experimental-features = "nix-command flakes ca-derivations"; - trusted-users = [ "@wheel" ]; - }; - gc.automatic = true; - }; - time.timeZone = config.monorepo.vars.timeZone; - i18n.defaultLocale = "en_CA.UTF-8"; - system.stateVersion = "24.11"; -} diff --git a/nix/modules/coturn.nix b/nix/modules/coturn.nix deleted file mode 100644 index 3ceeac6..0000000 --- a/nix/modules/coturn.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ lib, config, ... }: -{ - services.coturn = { - enable = false; - use-auth-secret = true; - listening-ips = [ "0.0.0.0" ]; - cert = "/var/lib/acme/matrix.${config.monorepo.vars.orgHost}/fullchain.pem"; - static-auth-secret-file = "/run/secrets/coturn_secret"; - }; -} diff --git a/nix/modules/cuda.nix b/nix/modules/cuda.nix deleted file mode 100644 index d5d9b7c..0000000 --- a/nix/modules/cuda.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - environment.systemPackages = (if config.monorepo.profiles.cuda.enable then with pkgs; [ - cudatoolkit - cudaPackages.cudnn - cudaPackages.libcublas - linuxPackages.nvidia_x11 - ] else []); -} diff --git a/nix/modules/default.nix b/nix/modules/default.nix deleted file mode 100644 index 80c057f..0000000 --- a/nix/modules/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - imports = [ - ./configuration.nix - ./vars.nix - ]; - - options = { - monorepo = { - profiles = { - cuda.enable = lib.mkEnableOption "Enables CUDA support"; - documentation.enable = lib.mkEnableOption "Enables documentation on system."; - secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl."; - pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup"; - tor.enable = lib.mkEnableOption "Enables tor along with torsocks"; - - server = { - enable = lib.mkEnableOption "Enables server services"; - interface = lib.mkOption { type = lib.types.str; default = "eth0"; }; - ipv4 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - ipv6 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - gateway = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - }; - - ttyonly.enable = lib.mkEnableOption "TTY only, no xserver"; - grub.enable = lib.mkEnableOption "Enables grub instead of systemd-boot"; - workstation.enable = lib.mkEnableOption "Enables workstation services"; - desktop.enable = lib.mkEnableOption "Enables everything common to desktops"; - impermanence.enable = lib.mkEnableOption "Enables imperamanence"; - home.enable = lib.mkEnableOption "Enables home profiles"; - }; - }; - }; - - config = { - environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable ((with pkgs; [ - linux-manual - man-pages - man-pages-posix - iproute2 - silver-searcher - ripgrep - ]) ++ - (if (config.monorepo.vars.fileSystem == "btrfs") then with pkgs; [ - btrfs-progs - btrfs-snap - btrfs-list - btrfs-heatmap - ] else [ ])); - - boot.loader.grub = lib.mkIf config.monorepo.profiles.grub.enable { - enable = true; - }; - - assertions = [ - { - assertion = !(config.monorepo.profiles.workstation.enable && config.monorepo.profiles.server.enable); - message = '' - You can't enable both workstation and server profile together. Please select only one. - ''; - } - { - assertion = !(config.monorepo.profiles.desktop.enable && config.monorepo.profiles.server.enable); - message = '' - You can't enable both desktop and server profile together. Please select only one. - ''; - } - ]; - monorepo = { - profiles = { - desktop.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - documentation.enable = lib.mkDefault true; - pipewire.enable = lib.mkDefault true; - tor.enable = lib.mkDefault true; - impermanence.enable = lib.mkDefault false; - server.enable = lib.mkDefault false; - ttyonly.enable = lib.mkDefault config.monorepo.profiles.server.enable; - home.enable = lib.mkDefault config.monorepo.profiles.desktop.enable; - }; - }; - }; -} diff --git a/nix/modules/docker.nix b/nix/modules/docker.nix deleted file mode 100644 index 9eb18f5..0000000 --- a/nix/modules/docker.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, config, vars, ... }: -{ - # virtualisation = { - # oci-containers = { - # backend = "podman"; - # containers = {}; - # }; - # containers.enable = true; - # podman = { - # enable = true; - # dockerCompat = true; - # defaultNetwork.settings.dns_enabled = true; - # }; - # }; -} diff --git a/nix/modules/dovecot.nix b/nix/modules/dovecot.nix deleted file mode 100644 index 2921ad8..0000000 --- a/nix/modules/dovecot.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, ... }: -{ - services.dovecot2 = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - enableImap = true; - enablePop3 = true; - }; -} diff --git a/nix/modules/fail2ban.nix b/nix/modules/fail2ban.nix deleted file mode 100644 index 5d289a0..0000000 --- a/nix/modules/fail2ban.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, config, ... }: -{ - services.fail2ban = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - # Ban IP after 5 failures for 1 hour - maxretry = 5; - bantime = "1h"; - banaction = "iptables-allports"; - banaction-allports = "iptables-allports"; - }; -} diff --git a/nix/modules/firejail.nix b/nix/modules/firejail.nix deleted file mode 100644 index 054171a..0000000 --- a/nix/modules/firejail.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, lib, ... }: -{ - programs.firejail = { - enable = true; - wrappedBinaries = { - firefox = { - executable = "${lib.getBin pkgs.firefox-bin}/bin/firefox"; - profile = "${pkgs.firejail}/etc/firejail/firefox.profile"; - }; - emacs = { - executable = "${lib.getBin pkgs.emacs-pgtk}/bin/emacs"; - profile = "${pkgs.firejail}/etc/firejail/emacs.profile"; - }; - zathura = { - executable = "${lib.getBin pkgs.zathura}/bin/zathura"; - profile = "${pkgs.firejail}/etc/firejail/zathura.profile"; - }; - }; - }; -} diff --git a/nix/modules/git-daemon.nix b/nix/modules/git-daemon.nix deleted file mode 100644 index 972ab67..0000000 --- a/nix/modules/git-daemon.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, ... }: -{ - services.gitDaemon = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - exportAll = true; - basePath = "${config.users.users.git.home}"; - }; - networking.firewall.allowedTCPPorts = lib.mkIf config.services.gitDaemon.enable [ - 9418 - ]; -} diff --git a/nix/modules/gitolite.nix b/nix/modules/gitolite.nix deleted file mode 100644 index 33f647b..0000000 --- a/nix/modules/gitolite.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ lib, config, ... }: -{ - services.gitolite = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - description = "My Gitolite User"; - adminPubkey = config.monorepo.vars.sshKey; - }; -} diff --git a/nix/modules/gitweb.nix b/nix/modules/gitweb.nix deleted file mode 100644 index 69cb951..0000000 --- a/nix/modules/gitweb.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, config, ... }: -{ - services.gitweb = { - gitwebTheme = lib.mkDefault config.monorepo.profiles.server.enable; - projectroot = "/srv/git/"; - extraConfig = '' -our $export_ok = "git-daemon-export-ok"; -our $site_name = "NullRing Git Server"; -our $site_header = "NullRing Projects"; -''; - }; -} diff --git a/nix/modules/gotosocial.nix b/nix/modules/gotosocial.nix deleted file mode 100644 index b0a0c21..0000000 --- a/nix/modules/gotosocial.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, config, ... }: -{ - services.gotosocial = { - enable = lib.mkDefault false; - setupPostgresqlDB = true; - settings = { - application-name = "Nullring GoToSocial Instance"; - host = "gotosocial.${config.monorepo.vars.orgHost}"; - protocol = "https"; - bind-address = "127.0.0.1"; - port = 8080; - }; - }; -} diff --git a/nix/modules/heisenbridge.nix b/nix/modules/heisenbridge.nix deleted file mode 100644 index f3b88fc..0000000 --- a/nix/modules/heisenbridge.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, config, ... }: -{ - services.heisenbridge = { - enable = true; - registrationUrl = "http://localhost:6167"; - owner = "@ret2pop:matrix.nullring.xyz"; - homeserver = "http://localhost:6167"; - }; -} diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix deleted file mode 100644 index 80b28ee..0000000 --- a/nix/modules/home/default.nix +++ /dev/null @@ -1,219 +0,0 @@ -{ lib, config, pkgs, sops-nix, super, ... }: -{ - imports = [ - sops-nix.homeManagerModules.sops - ../vars.nix - ./fcitx.nix - ./emacs.nix - ./firefox.nix - ./git.nix - ./hyprland.nix - ./mpv.nix - ./yt-dlp.nix - ./wofi.nix - ./kitty.nix - ./waybar.nix - ./zsh.nix - ./mbsync.nix - ./msmtp.nix - ./gammastep.nix - ./mpd.nix - ./mako.nix - ./user.nix - ./gtk.nix - ./secrets.nix - ./pantalaimon.nix - ]; - - options = { - monorepo.profiles = { - enable = lib.mkEnableOption "Enables home manager desktop configuration"; - # Programs - graphics.enable = lib.mkEnableOption "Enables graphical programs for user"; - lang-c.enable = lib.mkEnableOption "Enables C language support"; - lang-sh.enable = lib.mkEnableOption "Enables sh language support"; - lang-rust.enable = lib.mkEnableOption "Enables Rust language support"; - lang-python.enable = lib.mkEnableOption "Enables python language support"; - lang-sol.enable = lib.mkEnableOption "Enables solidity language support"; - lang-openscad.enable = lib.mkEnableOption "Enables openscad language support"; - lang-js.enable = lib.mkEnableOption "Enables javascript language support"; - lang-nix.enable = lib.mkEnableOption "Enables nix language support"; - lang-idris.enable = lib.mkEnableOption "Enables idris language support"; - lang-agda.enable = lib.mkEnableOption "Enables agda language support"; - lang-coq.enable = lib.mkEnableOption "Enables coq language support"; - lang-lean.enable = lib.mkEnableOption "Enables lean language support"; - lang-haskell.enable = lib.mkEnableOption "Enables haskell language support"; - crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets"; - art.enable = lib.mkEnableOption "Enables various art programs"; - music.enable = lib.mkEnableOption "Enables mpd"; - workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)"; - cuda.enable = lib.mkEnableOption "Enables CUDA user package builds"; - hyprland.enable = lib.mkEnableOption "Enables hyprland"; - email.enable = lib.mkEnableOption "Enables email"; - }; - }; - - config = { - home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else [ ]) - ++ - (if config.monorepo.profiles.lang-c.enable then - (with pkgs; [ - autobuild - clang - gdb - gnumake - bear - clang-tools - autotools-language-server - ]) else [ ]) - ++ - (if config.monorepo.profiles.workstation.enable then - (with pkgs; [ - mumble - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-js.enable then - (with pkgs; [ - nodejs - bun - yarn - typescript - typescript-language-server - vscode-langservers-extracted - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-rust.enable then - (with pkgs; [ - cargo - rust-analyzer - rustfmt - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-python.enable then - (with pkgs; [ - poetry - python3 - python314Packages.python-lsp-server - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-sol.enable then - (with pkgs; [ - solc - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-openscad.enable then - (with pkgs; [ - openscad - openscad-lsp - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-sh.enable then - (with pkgs; [ - bash-language-server - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-haskell.enable then - (with pkgs; [ - haskell-language-server - haskellPackages.hlint - ghc - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-coq.enable then - (with pkgs; [ - coq - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-lean.enable then - (with pkgs; [ - lean4 - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-agda.enable then - (with pkgs; [ - agda - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-idris.enable then - (with pkgs; [ - idris - idris2Packages.idris2Lsp - ]) else [ ]) - ++ - (if config.monorepo.profiles.lang-nix.enable then - (with pkgs; [ - nil - nixd - nixfmt - nix-prefetch-scripts - ]) else [ ]) - ++ - (if config.monorepo.profiles.crypto.enable then - (with pkgs; [ - bitcoin - # electrum - monero-cli - monero-gui - ]) else [ ]) - ++ - (if config.monorepo.profiles.art.enable then - (with pkgs; [ - inkscape - # krita - ]) else [ ]) - ++ - (if config.monorepo.profiles.music.enable then - (with pkgs; [ - mpc - sox - ]) else [ ]) - ++ - (if config.monorepo.profiles.workstation.enable then - (with pkgs; [ - alsa-utils - alsa-scarlett-gui - ardour - audacity - # blender - foxdot - fluidsynth - qjackctl - qsynth - qpwgraph - imagemagick - supercollider - inkscape - # kdePackages.kdenlive - # kicad - murmur - ]) else [ ]); - - monorepo.profiles = { - enable = lib.mkDefault super.monorepo.profiles.home.enable; - music.enable = lib.mkDefault config.monorepo.profiles.enable; - email.enable = lib.mkDefault config.monorepo.profiles.enable; - cuda.enable = lib.mkDefault super.monorepo.profiles.cuda.enable; - - # Programming - graphics.enable = lib.mkDefault (! super.monorepo.profiles.ttyonly.enable); - hyprland.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - lang-c.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-rust.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-python.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-sol.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-sh.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-openscad.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-js.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-nix.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-coq.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-lean.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-haskell.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-idris.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-agda.enable = lib.mkDefault config.monorepo.profiles.enable; - - crypto.enable = lib.mkDefault config.monorepo.profiles.enable; - art.enable = lib.mkDefault config.monorepo.profiles.enable; - workstation.enable = lib.mkDefault super.monorepo.profiles.workstation.enable; - }; - }; -} diff --git a/nix/modules/home/emacs.nix b/nix/modules/home/emacs.nix deleted file mode 100644 index bc85177..0000000 --- a/nix/modules/home/emacs.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ lib, config, pkgs, super, ... }: -{ - programs.emacs = - { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.emacs-pgtk; - extraConfig = '' -(setq debug-on-error t) -(setq system-email "${super.monorepo.vars.email}") -(setq system-username "${super.monorepo.vars.internetName}") -(setq system-fullname "${super.monorepo.vars.fullName}") -(setq system-gpgkey "${super.monorepo.vars.gpgKey}") -(load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") -''; - - extraPackages = epkgs: [ - epkgs.agda2-mode - epkgs.all-the-icons - epkgs.auctex - epkgs.catppuccin-theme - epkgs.company - epkgs.company-solidity - epkgs.counsel - epkgs.centaur-tabs - epkgs.dashboard - epkgs.doom-themes - epkgs.doom-modeline - epkgs.elfeed - epkgs.elfeed-org - epkgs.elfeed-tube - epkgs.elfeed-tube-mpv - epkgs.elpher - epkgs.ement - epkgs.emmet-mode - epkgs.emms - epkgs.enwc - epkgs.evil - epkgs.evil-collection - epkgs.evil-commentary - epkgs.evil-org - epkgs.f - epkgs.flycheck - epkgs.general - epkgs.gptel - epkgs.gruvbox-theme - epkgs.haskell-mode - epkgs.htmlize - epkgs.idris-mode - epkgs.irony-eldoc - epkgs.ivy - epkgs.ivy-pass - epkgs.kiwix - epkgs.latex-preview-pane - epkgs.lsp-ivy - epkgs.lsp-mode - epkgs.lsp-haskell - epkgs.lyrics-fetcher - epkgs.mastodon - epkgs.magit - epkgs.magit-delta - epkgs.mu4e - epkgs.minuet - epkgs.nix-mode - epkgs.org-fragtog - epkgs.org-journal - epkgs.org-roam - epkgs.org-roam-ui - epkgs.org-superstar - epkgs.page-break-lines - epkgs.password-store - epkgs.pdf-tools - epkgs.pinentry - epkgs.platformio-mode - epkgs.projectile - epkgs.rustic - epkgs.scad-mode - epkgs.simple-httpd - epkgs.solidity-flycheck - epkgs.solidity-mode - epkgs.sudo-edit - epkgs.telega - epkgs.treemacs - epkgs.treemacs-evil - epkgs.treemacs-magit - epkgs.treemacs-projectile - epkgs.treesit-auto - epkgs.typescript-mode - epkgs.unicode-fonts - epkgs.use-package - epkgs.vterm - epkgs.wgrep - epkgs.web-mode - epkgs.websocket - epkgs.which-key - epkgs.writegood-mode - epkgs.writeroom-mode - epkgs.yaml-mode - epkgs.yasnippet - epkgs.yasnippet-snippets - ]; - }; -} diff --git a/nix/modules/home/fcitx.nix b/nix/modules/home/fcitx.nix deleted file mode 100644 index 1907590..0000000 --- a/nix/modules/home/fcitx.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - i18n.inputMethod = { - type = "fcitx5"; - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - fcitx5.addons = if config.monorepo.profiles.graphics.enable then (with pkgs; [ - fcitx5-gtk - qt6Packages.fcitx5-chinese-addons - qt6Packages.fcitx5-configtool - fcitx5-mozc - fcitx5-rime - ]) else []; - }; -} diff --git a/nix/modules/home/firefox.nix b/nix/modules/home/firefox.nix deleted file mode 100644 index d339ba8..0000000 --- a/nix/modules/home/firefox.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - programs.librewolf = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.librewolf; - profiles = { - default = { - id = 0; - name = "default"; - isDefault = true; - - extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - tree-style-tab - firefox-color - vimium - privacy-redirect - ] ++ (lib.optional config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); - settings = { - "privacy.resistFingerprinting.letterboxing" = true; - }; - }; - }; - }; -} diff --git a/nix/modules/home/gammastep.nix b/nix/modules/home/gammastep.nix deleted file mode 100644 index 208dda7..0000000 --- a/nix/modules/home/gammastep.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, config, ... }: -{ - services.gammastep = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - provider = "manual"; - latitude = 49.282730; - longitude = -123.120735; - - temperature = { - day = 5000; - night = 3000; - }; - - settings = { - general = { - adjustment-method = "wayland"; - }; - }; - }; -} diff --git a/nix/modules/home/git.nix b/nix/modules/home/git.nix deleted file mode 100644 index 4018a3b..0000000 --- a/nix/modules/home/git.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ pkgs, lib, config, super, ... }: -{ - programs.git = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.gitFull; - lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - userName = super.monorepo.vars.fullName; - userEmail = "${super.monorepo.vars.email}"; - signing = { - key = super.monorepo.vars.gpgKey; - signByDefault = true; - }; - - extraConfig = { - init.defaultBranch = "main"; - credential."mail.${super.monorepo.vars.orgHost}" = { - username = "${super.monorepo.vars.email}"; - helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; - }; - - sendemail = { - smtpserver = "mail.${super.monorepo.vars.orgHost}"; - smtpuser = "${super.monorepo.vars.email}"; - smtpserverport = 465; - smtpencryption = "ssl"; - }; - }; - - aliases = { - pl = "pull"; - ps = "push"; - co = "checkout"; - c = "commit"; - a = "add"; - st = "status"; - sw = "switch"; - b = "branch"; - }; - }; -} diff --git a/nix/modules/home/gtk.nix b/nix/modules/home/gtk.nix deleted file mode 100644 index 6283581..0000000 --- a/nix/modules/home/gtk.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, config, pkgs, ... }: -{ - config = lib.mkIf config.monorepo.profiles.graphics.enable { - gtk = { - theme = { - name = "catppuccin-mocha-pink-standard"; - package = pkgs.catppuccin-gtk.override { - variant = "mocha"; - accents = [ "pink" ]; - }; - }; - }; - xdg.configFile = { - "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; - "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; - "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; - - "gtk-3.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk.css"; - "gtk-3.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk-dark.css"; - "gtk-3.0/settings.ini".text = '' - [Settings] - gtk-theme-name=${config.gtk.theme.name} - gtk-application-prefer-dark-theme=1 - ''; - }; - }; -} diff --git a/nix/modules/home/home.nix b/nix/modules/home/home.nix deleted file mode 100644 index aa55550..0000000 --- a/nix/modules/home/home.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, sops-nix, ... }: -{ - home-manager = { - sharedModules = [ - sops-nix.homeManagerModules.sops - ]; - useGlobalPkgs = true; - useUserPackages = true; - users."${config.monorepo.vars.userName}" = import ./default.nix; - }; -} diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix deleted file mode 100644 index c836b81..0000000 --- a/nix/modules/home/hyprland.nix +++ /dev/null @@ -1,192 +0,0 @@ -{ lib, config, wallpapers, pkgs, scripts, ... }: -{ - wayland.windowManager.hyprland = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - package = pkgs.hyprland; - xwayland.enable = true; - systemd.enable = true; - settings = { - "$mod" = "SUPER"; - bezier = [ - "overshot, 0.05, 0.9, 0.1, 1.05" - ]; - animation = [ - # "workspaces, 1, 10, overshot" - "windows, 1, 2, default" - "workspaces, 1, 2, default, slidefade 20%" - ]; - exec-once = [ - "waybar" - "swww-daemon --format xrgb" - "sh -c 'swww img \"$(find ${wallpapers} -type f \\( -iname \"*.jpg\" -o -iname \"*.png\" \\) | shuf -n1)\"'" - "fcitx5-remote -r" - "fcitx5 -d --replace" - "fcitx5-remote -r" - "emacs" - "librewolf" - ]; - env = [ - "LIBVA_DRIVER_NAME,nvidia" - "XDG_SESSION_TYPE,wayland" - "GBM_BACKEND,nvidia-drm" - "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "ELECTRON_OZONE_PLATFORM_HINT,auto" - ]; - - monitor = [ - "DP-4,2560x1440@165.000000,0x0,1" - "Unknown-1,disable" - ]; - - layerrule = [ - { - name = "waybar blur"; - "match:namespace" = "waybar"; - blur = "on"; - } - ]; - - windowrule = [ - { - name = "emacs"; - "match:class" = "emacs"; - workspace = 1; - } - { - name = "librewolf"; - "match:class" = "librewolf"; - workspace = 2; - } - { - name = "chromium-browser"; - "match:class" = "chromium-browser"; - workspace = 2; - } - { - name = "signal"; - "match:class" = "signal"; - workspace = 3; - } - { - name = "Element"; - "match:class" = "Element"; - workspace = 3; - } - { - name = "pavucontrol"; - "match:class" = "pavucontrol"; - workspace = 4; - } - { - name = "qpwgraph"; - "match:class" = "qpwgraph"; - workspace = 4; - } - { - name = "mpv"; - "match:class" = "mpv"; - workspace = 4; - } - ]; - - bind = [ - "$mod, F, exec, librewolf" - "$mod, Return, exec, kitty" - "$mod, E, exec, emacs" - "$mod, B, exec, bitcoin-qt" - "$mod, S, exec, pavucontrol" - "$mod, M, exec, monero-wallet-gui" - "$mod, V, exec, element-desktop" - "$mod, C, exec, signal-desktop" - "$mod, D, exec, wofi --show run" - "$mod, P, exec, bash ${scripts}/powermenu.sh" - "$mod, Q, killactive" - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, L, movewindow, r" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, J, movewindow, d" - - "$mod SHIFT, T, togglefloating" - "$mod SHIFT, F, fullscreen" - - "$mod, H, movefocus, l" - "$mod, L, movefocus, r" - "$mod, K, movefocus, u" - "$mod, J, movefocus, d" - ", XF86AudioPlay, exec, mpc toggle" - ", Print, exec, grim" - - "$mod, right, resizeactive, 30 0" - "$mod, left, resizeactive, -30 0" - "$mod, up, resizeactive, 0 -30" - "$mod, down, resizeactive, 0 30" - ] - ++ ( - builtins.concatLists (builtins.genList - ( - x: - let - ws = - let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in - [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) - 10) - ); - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod ALT, mouse:272, resizewindow" - ]; - binde = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86AudioNext, exec, mpc next" - ", XF86AudioPrev, exec, mpc prev" - ", XF86MonBrightnessUp , exec, xbacklight -inc 10" - ", XF86MonBrightnessDown, exec, xbacklight -dec 10" - ]; - decoration = { - blur = { - enabled = true; - size = 9; - passes = 4; - contrast = 0.8; - brightness = 1.1; - noise = 0.02; - new_optimizations = true; - ignore_opacity = true; - xray = false; - }; - rounding = 5; - }; - input = { - scroll_method = "on_button_down"; - scroll_button = 276; - sensitivity = -0.5; - kb_options = "caps:swapescape"; - repeat_delay = 300; - repeat_rate = 50; - natural_scroll = false; - touchpad = { - natural_scroll = true; - disable_while_typing = true; - tap-to-click = true; - }; - }; - cursor = { - no_hardware_cursors = true; - }; - misc = { - force_default_wallpaper = 0; - disable_hyprland_logo = true; - }; - }; - }; -} diff --git a/nix/modules/home/kitty.nix b/nix/modules/home/kitty.nix deleted file mode 100644 index b3e6e33..0000000 --- a/nix/modules/home/kitty.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ lib, config, ... }: -{ - programs.kitty = { - enable = lib.mkDefault (config.monorepo.profiles.hyprland.enable && config.monorepo.profiles.graphics.enable); - settings = { - enable_audio_bell = false; - font_family = "Iosevka Nerd Font"; - font_size = 14; - confirm_os_window_close = 0; - background_opacity = "0.7"; - # Catppuccin theme - foreground = "#cdd6f4"; - background = "#1e1e2e"; - selection_foreground = "#1e1e2e"; - selection_background = "#f5e0dc"; - cursor = "#f5e0dc"; - cursor_text_color = "#1e1e2e"; - url_color = "#f5e0dc"; - active_border_color = "#B4BEFE"; - inactive_border_color = "#6C7086"; - bell_border_color = "#F9E2AF"; - wayland_titlebar_color = "#1E1E2E"; - macos_titlebar_color = "#1E1E2E"; - active_tab_foreground = "#11111B"; - active_tab_background = "#CBA6F7"; - inactive_tab_foreground = "#CDD6F4"; - inactive_tab_background = "#181825"; - tab_bar_background = "#11111B"; - mark1_foreground = "#1E1E2E"; - mark1_background = "#B4BEFE"; - mark2_foreground = "#1E1E2E"; - mark2_background = "#CBA6F7"; - mark3_foreground = "#1E1E2E"; - mark3_background = "#74C7EC"; - color0 = "#45475A"; - color8 = "#585B70"; - color1 = "#F38BA8"; - color9 = "#F38BA8"; - color2 = "#A6E3A1"; - color10 = "#A6E3A1"; - color3 = "#F9E2AF"; - color11 = "#F9E2AF"; - color4 = "#89B4FA"; - color12 = "#89B4FA"; - color5 = "#F5C2E7"; - color13 = "#F5C2E7"; - color6 = "#94E2D5"; - color14 = "#94E2D5"; - color7 = "#BAC2DE"; - color15 = "#A6ADC8"; - }; - }; -} diff --git a/nix/modules/home/mako.nix b/nix/modules/home/mako.nix deleted file mode 100644 index 14edde8..0000000 --- a/nix/modules/home/mako.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, config, sounds, ... }: -{ - services.mako = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - settings = { - on-notify = "exec mpv ${sounds}/polite.ogg --no-config --no-video"; - background-color = "#11111bf8"; - text-color = "#cdd6f4"; - border-color = "#89b4faff"; - border-radius = 1; - font = "Fira Code 10"; - default-timeout = 3000; - }; - }; -} diff --git a/nix/modules/home/mbsync.nix b/nix/modules/home/mbsync.nix deleted file mode 100644 index 893528e..0000000 --- a/nix/modules/home/mbsync.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, config, super, ... }: -{ - programs.mbsync = { - enable = lib.mkDefault config.monorepo.profiles.email.enable; - extraConfig = '' - IMAPAccount ${super.monorepo.vars.internetName} - Host mail.${super.monorepo.vars.orgHost} - User ${super.monorepo.vars.email} - PassCmd "cat ${config.sops.secrets.mail.path}" - Port 993 - TLSType IMAPS - AuthMechs * - CertificateFile /etc/ssl/certs/ca-certificates.crt - - IMAPStore ${super.monorepo.vars.internetName}-remote - Account ${super.monorepo.vars.internetName} - - MaildirStore ${super.monorepo.vars.internetName}-local - Path ~/email/${super.monorepo.vars.internetName}/ - Inbox ~/email/${super.monorepo.vars.internetName}/INBOX - SubFolders Verbatim - - Channel ${super.monorepo.vars.internetName} - Far :${super.monorepo.vars.internetName}-remote: - Near :${super.monorepo.vars.internetName}-local: - Patterns * - Create Near - Sync All - Expunge None - SyncState * - ''; - }; -} diff --git a/nix/modules/home/mpd.nix b/nix/modules/home/mpd.nix deleted file mode 100644 index b423a70..0000000 --- a/nix/modules/home/mpd.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, config, ... }: -{ - services.mpd = { - enable = lib.mkDefault config.monorepo.profiles.music.enable; - dbFile = "/home/${config.monorepo.vars.userName}/.config/mpd/db"; - dataDir = "/home/${config.monorepo.vars.userName}/.config/mpd/"; - network.port = 6600; - musicDirectory = "/home/${config.monorepo.vars.userName}/music"; - playlistDirectory = "/home/${config.monorepo.vars.userName}/.config/mpd/playlists"; - network.listenAddress = "0.0.0.0"; - extraConfig = '' - audio_output { - type "pipewire" - name "pipewire output" - } - - audio_output { - type "httpd" - name "Ret2pop's Music Stream" - encoder "opus" - port "8000" - bitrate "128000" - format "48000:16:1" - always_on "yes" - tags "yes" - } - - audio_output { - type "shout" - name "My VPS Stream" - host "127.0.0.1" - port "8888" - mount "/stream" - password "SuperSecretSourcePass" - bitrate "128" - format "44100:16:2" - protocol "icecast2" - user "source" - description "My MPD Stream" - genre "Mixed" - } - ''; - }; -} diff --git a/nix/modules/home/mpv.nix b/nix/modules/home/mpv.nix deleted file mode 100644 index 6dd7f4d..0000000 --- a/nix/modules/home/mpv.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, config, ... }: -{ - programs.mpv = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - config = { - profile = "gpu-hq"; - force-window = true; - ytdl-format = "bestvideo+bestaudio"; - cache-default = 4000000; - }; - }; -} diff --git a/nix/modules/home/msmtp.nix b/nix/modules/home/msmtp.nix deleted file mode 100644 index c1abd8f..0000000 --- a/nix/modules/home/msmtp.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, config, super, ... }: -{ - programs.msmtp = { - enable = lib.mkDefault config.monorepo.profiles.email.enable; - extraConfig = '' - # Set default values for all following accounts. - defaults - auth on - tls on - tls_trust_file /etc/ssl/certs/ca-certificates.crt - tls_certcheck off - logfile ~/.msmtp.log - - # Gmail - account ${super.monorepo.vars.internetName} - host mail.${super.monorepo.vars.orgHost} - port 587 - from ${super.monorepo.vars.email} - user ${super.monorepo.vars.email} - passwordeval "cat ${config.sops.secrets.mail.path}" - - - # Set a default account - account default : ${super.monorepo.vars.internetName} - ''; - }; -} diff --git a/nix/modules/home/pantalaimon.nix b/nix/modules/home/pantalaimon.nix deleted file mode 100644 index 35e72c3..0000000 --- a/nix/modules/home/pantalaimon.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib, config, ... }: -{ - services.pantalaimon = { - enable = lib.mkDefault false; - settings = { - Default = { - LogLevel = "Debug"; - SSL = true; - }; - - local-matrix = { - Homeserver = "https://matrix.nullring.xyz"; - ListenAddress = "127.0.0.1"; - ListenPort = 8008; - }; - }; - - }; -} diff --git a/nix/modules/home/personal_secrets.nix b/nix/modules/home/personal_secrets.nix deleted file mode 100644 index 9013de1..0000000 --- a/nix/modules/home/personal_secrets.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, config, ... }: -{ - config = lib.mkIf config.monorepo.profiles.graphics.enable { - sops.secrets = { - mail = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/mail"; - }; - cloudflare-dns = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/cloudflare-dns"; - }; - digikey = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/digikey"; - }; - dn42 = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/dn42"; - }; - }; - }; -} diff --git a/nix/modules/home/secrets.nix b/nix/modules/home/secrets.nix deleted file mode 100644 index 00be79b..0000000 --- a/nix/modules/home/secrets.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, super, ... }: -{ - sops = { - defaultSopsFile = - if config.monorepo.profiles.graphics.enable - then ../../secrets/secrets.yaml - else ../../secrets/vps_secrets.yaml; - - age = { - keyFile = "/home/${super.monorepo.vars.userName}/.config/sops/age/keys.txt"; - }; - - secrets = - if super.monorepo.profiles.desktop.enable then { - mail = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/mail"; - }; - cloudflare-dns = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/cloudflare-dns"; - }; - digikey = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/digikey"; - }; - dn42 = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/dn42"; - }; - } else { }; - defaultSymlinkPath = "/run/user/1000/secrets"; - defaultSecretsMountPoint = "/run/user/1000/secrets.d"; - }; -} diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix deleted file mode 100644 index d378fb6..0000000 --- a/nix/modules/home/user.nix +++ /dev/null @@ -1,202 +0,0 @@ -{ lib, config, super, pkgs, ... }: -{ - home = { - activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] '' - if [ ! -d "/home/${config.monorepo.vars.userName}/email/${config.monorepo.vars.internetName}/" ]; then - mkdir -p /home/${config.monorepo.vars.userName}/email/${config.monorepo.vars.internetName}/ - fi - - if [ ! -d "/home/${config.monorepo.vars.userName}/music" ]; then - mkdir -p /home/${config.monorepo.vars.userName}/music - fi - - if [ ! -d /home/${config.monorepo.vars.userName}/org ]; then - mkdir -p /home/${config.monorepo.vars.userName}/org - fi - - if [ ! -d /home/${config.monorepo.vars.userName}/src ]; then - mkdir -p /home/${config.monorepo.vars.userName}/src - fi - - touch /home/${config.monorepo.vars.userName}/org/agenda.org - touch /home/${config.monorepo.vars.userName}/org/notes.org - ''; - - enableNixpkgsReleaseCheck = false; - username = config.monorepo.vars.userName; - homeDirectory = "/home/${config.monorepo.vars.userName}"; - stateVersion = "24.11"; - - packages = with pkgs; (if config.monorepo.profiles.graphics.enable then [ - # wikipedia - # kiwix kiwix-tools - gnupg - unzip - mupdf - zathura - - fzf - # passwords - age - sops - - # formatting - ghostscript - texliveFull - pandoc - - # Emacs Deps - graphviz - jq - - # Apps - # octaveFull - grim - swww - vim - kotatogram-desktop - tg - qwen-code - element-desktop - signal-desktop - signal-cli - thunderbird - jami - - # Sound/media - pavucontrol - alsa-utils - imagemagick - ffmpeg - helvum - - # Net - curl - rsync - gitFull - iamb - ungoogled-chromium - - # Tor - torsocks - tor-browser - - # For transfering secrets onto new system - stow - - # fonts - nerd-fonts.iosevka - noto-fonts - noto-fonts-cjk-sans - noto-fonts-color-emoji - fira-code - font-awesome_6 - victor-mono - (aspellWithDicts - (dicts: with dicts; [ en en-computers en-science ])) - - # Misc. - pinentry-gnome3 - x11_ssh_askpass - xdg-utils - acpilight - pfetch - libnotify - htop - - (pkgs.writeShellScriptBin "help" - '' - #!/usr/bin/env sh - # Portable, colored, nicely aligned alias list - - # Generate uncolored alias pairs - aliases=$(cat <<'EOF' - ${let aliases = config.programs.zsh.shellAliases; - in lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value: - "${name} -> ${value}" - ) aliases)} - EOF - ) - - # Align and color using awk - echo "$aliases" | awk ' - BEGIN { - GREEN="\033[0;32m"; - YELLOW="\033[0;33m"; - RESET="\033[0m"; - maxlen=0; - } - { - # Split line on " -> " - split($0, parts, / -> /); - name[NR]=parts[1]; - cmd[NR]=parts[2]; - if(length(parts[1])>maxlen) maxlen=length(parts[1]); - } - END { - for(i=1;i<=NR;i++) { - # printf with fixed width for alias name - printf "%s%-*s%s -> %s%s%s\n", GREEN, maxlen, name[i], RESET, YELLOW, cmd[i], RESET; - } - }' - '') - - (writeShellScriptBin "remote-build" - '' - #!/bin/bash - nixos-rebuild --sudo --ask-sudo-password --target-host "$1" switch --flake $HOME/monorepo/nix#spontaneity - '' - ) - (writeShellScriptBin "install-vps" - '' - #!/bin/bash - nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config $HOME/monorepo/nix/systems/spontaneity/hardware-configuration.nix --flake $HOME/monorepo/nix#spontaneity --target-host "$1" - '') - (writeShellScriptBin "secrets" - '' - #!/bin/bash - cd "$HOME/secrets" - git pull # repo is over LAN - stow */ # manage secrets with gnu stow - cd "$HOME" - '') - (writeShellScriptBin "spontaneity-ci" - '' - #!/bin/bash - nixos-rebuild build-vm --flake $HOME/monorepo/nix#spontaneity && QEMU_OPTS="-serial stdio" ./result/bin/run-spontaneity-vm 2>&1 | tee vm-boot.log'') - ] else [ - pfetch - # net - curl - torsocks - rsync - ]); - }; - - services = { - gpg-agent = { - pinentry.package = pkgs.pinentry-emacs; - enable = true; - extraConfig = '' - allow-emacs-pinentry - allow-loopback-pinentry - ''; - }; - }; - xdg.mimeApps = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - defaultApplications = { - "x-scheme-handler/mailto" = "emacsclient-mail.desktop"; - "text/html" = "librewolf.desktop"; - "text/xml" = "librewolf.desktop"; - "application/xhtml+xml" = "librewolf.desktop"; - "x-scheme-handler/http" = "librewolf.desktop"; - "x-scheme-handler/https" = "librewolf.desktop"; - "x-scheme-handler/about" = "librewolf.desktop"; - "x-scheme-handler/unknown" = "librewolf.desktop"; - }; - }; - - programs.bash.enable = true; - fonts.fontconfig.enable = true; -} diff --git a/nix/modules/home/vps_secrets.nix b/nix/modules/home/vps_secrets.nix deleted file mode 100644 index df75a39..0000000 --- a/nix/modules/home/vps_secrets.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib, config, ... }: -{ - config = lib.mkIf (!config.monorepo.profiles.graphics.enable) { - sops.secrets = { - znc = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/znc"; - }; - znc_password_salt = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/znc_password_salt"; - }; - znc_password_hash = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/znc_password_hash"; - }; - matrix_bridge = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/matrix_bridge"; - }; - coturn_secret = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/coturn_secret"; - }; - livekit_secret = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/livekit_secret"; - }; - livekit = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/livekit"; - }; - conduit_secrets = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/conduit_secrets"; - }; - mautrix_env = { - format = "yaml"; - path = "${config.sops.defaultsymlinkpath}/mautrix_env"; - }; - }; - }; -} diff --git a/nix/modules/home/waybar.nix b/nix/modules/home/waybar.nix deleted file mode 100644 index 8e797a5..0000000 --- a/nix/modules/home/waybar.nix +++ /dev/null @@ -1,274 +0,0 @@ -{ lib, config, ... }: -{ - programs.waybar = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - style = '' - * { - border: none; - border-radius: 0px; - font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK; - font-size: 14px; - font-style: normal; - min-height: 0; - } - - window#waybar { - background: rgba(30, 30, 46, 0.5); - border-bottom: 1px solid #45475a; - color: #cdd6f4; - } - - #workspaces { - background: #45475a; - margin: 5px 5px 5px 5px; - padding: 0px 5px 0px 5px; - border-radius: 16px; - border: solid 0px #f4d9e1; - font-weight: normal; - font-style: normal; - } - #workspaces button { - padding: 0px 5px; - border-radius: 16px; - color: #a6adc8; - } - - #workspaces button.active { - color: #f4d9e1; - background-color: transparent; - border-radius: 16px; - } - - #workspaces button:hover { - background-color: #cdd6f4; - color: black; - border-radius: 16px; - } - - #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { - background: transparent; - padding: 5px 5px 5px 5px; - margin: 5px 5px 5px 5px; - border-radius: 8px; - border: solid 0px #f4d9e1; - } - - #custom-date { - color: #D3869B; - } - - #custom-power { - color: #24283b; - background-color: #db4b4b; - border-radius: 5px; - margin-right: 10px; - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - padding: 5px 10px; - } - - #tray { - background: #45475a; - margin: 5px 5px 5px 5px; - border-radius: 16px; - padding: 0px 5px; - /*border-right: solid 1px #282738;*/ - } - - #clock { - color: #cdd6f4; - background-color: #45475a; - border-radius: 0px 0px 0px 24px; - padding-left: 13px; - padding-right: 15px; - margin-right: 0px; - margin-left: 10px; - margin-top: 0px; - margin-bottom: 0px; - font-weight: bold; - /*border-left: solid 1px #282738;*/ - } - - #battery { - color: #89b4fa; - } - - #battery.charging { - color: #a6e3a1; - } - - #battery.warning:not(.charging) { - background-color: #f7768e; - color: #f38ba8; - border-radius: 5px 5px 5px 5px; - } - - #backlight { - background-color: #24283b; - color: #db4b4b; - border-radius: 0px 0px 0px 0px; - margin: 5px; - margin-left: 0px; - margin-right: 0px; - padding: 0px 0px; - } - - #network { - color: #f4d9e1; - border-radius: 8px; - margin-right: 5px; - } - - #pulseaudio { - color: #f4d9e1; - border-radius: 8px; - margin-left: 0px; - } - - #pulseaudio.muted { - background: transparent; - color: #928374; - border-radius: 8px; - margin-left: 0px; - } - - #custom-randwall { - color: #f4d9e1; - border-radius: 8px; - margin-right: 0px; - } - - #custom-launcher { - color: #e5809e; - background-color: #45475a; - border-radius: 0px 24px 0px 0px; - margin: 0px 0px 0px 0px; - padding: 0 20px 0 13px; - /*border-right: solid 1px #282738;*/ - font-size: 20px; - } - - #custom-launcher button:hover { - background-color: #FB4934; - color: transparent; - border-radius: 8px; - margin-right: -5px; - margin-left: 10px; - } - - #custom-playerctl { - background: #45475a; - padding-left: 15px; - padding-right: 14px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - font-weight: normal; - font-style: normal; - font-size: 16px; - } - - #custom-playerlabel { - background: transparent; - padding-left: 10px; - padding-right: 15px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - font-weight: normal; - font-style: normal; - } - - #window { - background: #45475a; - padding-left: 15px; - padding-right: 15px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - font-weight: normal; - font-style: normal; - } - - #custom-wf-recorder { - padding: 0 20px; - color: #e5809e; - background-color: #1E1E2E; - } - - #cpu { - background-color: #45475a; - /*color: #FABD2D;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } - - #memory { - background-color: #45475a; - /*color: #83A598;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } - - #disk { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } - - #custom-hyprpicker { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 11px 0px 9px; - font-weight: bold; - } - ''; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 50; - - output = config.monorepo.vars.monitors; - - modules-left = [ "hyprland/workspaces" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ "battery" "clock" ]; - - battery = { - format = "{icon} {capacity}%"; - format-icons = ["" "" "" "" "" ]; - }; - - clock = { - format = "⏰ {:%a %d, %b %H:%M}"; - }; - }; - }; - }; -} diff --git a/nix/modules/home/wofi.nix b/nix/modules/home/wofi.nix deleted file mode 100644 index ec2e3bc..0000000 --- a/nix/modules/home/wofi.nix +++ /dev/null @@ -1,188 +0,0 @@ -{ lib, config, ... }: -{ - programs.wofi = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - settings = { - location = "bottom-right"; - allow_markup = true; - show = "drun"; - width = 750; - height = 400; - always_parse_args = true; - show_all = false; - term = "kitty"; - hide_scroll = true; - print_command = true; - insensitive = true; - prompt = "Run what, Commander?"; - columns = 2; - }; - - style = '' - @define-color rosewater #f5e0dc; - @define-color rosewater-rgb rgb(245, 224, 220); - @define-color flamingo #f2cdcd; - @define-color flamingo-rgb rgb(242, 205, 205); - @define-color pink #f5c2e7; - @define-color pink-rgb rgb(245, 194, 231); - @define-color mauve #cba6f7; - @define-color mauve-rgb rgb(203, 166, 247); - @define-color red #f38ba8; - @define-color red-rgb rgb(243, 139, 168); - @define-color maroon #eba0ac; - @define-color maroon-rgb rgb(235, 160, 172); - @define-color peach #fab387; - @define-color peach-rgb rgb(250, 179, 135); - @define-color yellow #f9e2af; - @define-color yellow-rgb rgb(249, 226, 175); - @define-color green #a6e3a1; - @define-color green-rgb rgb(166, 227, 161); - @define-color teal #94e2d5; - @define-color teal-rgb rgb(148, 226, 213); - @define-color sky #89dceb; - @define-color sky-rgb rgb(137, 220, 235); - @define-color sapphire #74c7ec; - @define-color sapphire-rgb rgb(116, 199, 236); - @define-color blue #89b4fa; - @define-color blue-rgb rgb(137, 180, 250); - @define-color lavender #b4befe; - @define-color lavender-rgb rgb(180, 190, 254); - @define-color text #cdd6f4; - @define-color text-rgb rgb(205, 214, 244); - @define-color subtext1 #bac2de; - @define-color subtext1-rgb rgb(186, 194, 222); - @define-color subtext0 #a6adc8; - @define-color subtext0-rgb rgb(166, 173, 200); - @define-color overlay2 #9399b2; - @define-color overlay2-rgb rgb(147, 153, 178); - @define-color overlay1 #7f849c; - @define-color overlay1-rgb rgb(127, 132, 156); - @define-color overlay0 #6c7086; - @define-color overlay0-rgb rgb(108, 112, 134); - @define-color surface2 #585b70; - @define-color surface2-rgb rgb(88, 91, 112); - @define-color surface1 #45475a; - @define-color surface1-rgb rgb(69, 71, 90); - @define-color surface0 #313244; - @define-color surface0-rgb rgb(49, 50, 68); - @define-color base #1e1e2e; - @define-color base-rgb rgb(30, 30, 46); - @define-color mantle #181825; - @define-color mantle-rgb rgb(24, 24, 37); - @define-color crust #11111b; - @define-color crust-rgb rgb(17, 17, 27); - - * { - font-family: 'Iosevka Nerd Font', monospace; - font-size: 14px; - } - - /* Window */ - window { - margin: 0px; - padding: 10px; - border: 0.16em solid @lavender; - border-radius: 0.1em; - background-color: @base; - animation: slideIn 0.5s ease-in-out both; - } - - /* Slide In */ - @keyframes slideIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } - } - - /* Inner Box */ - #inner-box { - margin: 5px; - padding: 10px; - border: none; - background-color: @base; - animation: fadeIn 0.5s ease-in-out both; - } - - /* Fade In */ - @keyframes fadeIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } - } - - /* Outer Box */ - #outer-box { - margin: 5px; - padding: 10px; - border: none; - background-color: @base; - } - - /* Scroll */ - #scroll { - margin: 0px; - padding: 10px; - border: none; - background-color: @base; - } - - /* Input */ - #input { - margin: 5px 20px; - padding: 10px; - border: none; - border-radius: 0.1em; - color: @text; - background-color: @base; - animation: fadeIn 0.5s ease-in-out both; - } - - #input image { - border: none; - color: @red; - } - - #input * { - outline: 4px solid @red!important; - } - - /* Text */ - #text { - margin: 5px; - border: none; - color: @text; - animation: fadeIn 0.5s ease-in-out both; - } - - #entry { - background-color: @base; - } - - #entry arrow { - border: none; - color: @lavender; - } - - /* Selected Entry */ - #entry:selected { - border: 0.11em solid @lavender; - } - - #entry:selected #text { - color: @mauve; - } - - #entry:drop(active) { - background-color: @lavender!important; - } - ''; - }; -} diff --git a/nix/modules/home/yt-dlp.nix b/nix/modules/home/yt-dlp.nix deleted file mode 100644 index b9dd8e0..0000000 --- a/nix/modules/home/yt-dlp.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, config, ... }: -{ - programs.yt-dlp = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - settings = { - embed-thumbnail = true; - embed-subs = true; - sub-langs = "all"; - downloader = "aria2c"; - downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; - }; - }; -} diff --git a/nix/modules/home/zsh.nix b/nix/modules/home/zsh.nix deleted file mode 100644 index 62dcbd5..0000000 --- a/nix/modules/home/zsh.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, config, pkgs, systemHostName, ... }: -{ - programs.zsh = { - enable = true; - initContent = '' - umask 0022 - export EXTRA_CCFLAGS="-I/usr/include" - source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh - export QT_QPA_PLATFORM="wayland" - export OLLAMA_MODEL="qwen3:14b" - ''; - - localVariables = { - EDITOR = "emacsclient --create-frame --alternate-editor=vim"; - INPUT_METHOD = "fcitx"; - QT_IM_MODULE = "fcitx"; - GTK_IM_MODULE = "fcitx"; - XMODIFIERS = "@im=fcitx"; - XIM_SERVERS = "fcitx"; - WXSUPPRESS_SIZER_FLAGS_CHECK = "1"; - }; - - shellAliases = { - clone-secrets = "git clone ssh://\"$1\"/home/preston/secrets \"$HOME/secrets\""; - get-channel-id = "yt-dlp --print \"%(channel_id)s\" --playlist-end 1 \"$1\""; - se = "sops edit"; - f = "vim $(fzf)"; - e = "cd $(find . -type d -print | fzf)"; - c = "clear"; - g = "git"; - v = "vim"; - py = "python3"; - build-installer = "nix build $HOME/monorepo/nix#nixosConfigurations.installer.config.system.build.isoImage"; - rb = "sudo nixos-rebuild switch --flake $HOME/monorepo/nix#${systemHostName}"; - nfu = "cd ~/monorepo/nix && git add . && git commit -m \"new flake lock\" && nix flake update"; - usync = "rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${config.monorepo.vars.remoteHost}:/var/www/${config.monorepo.vars.internetName}-website/"; - usite - = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${config.monorepo.vars.remoteHost}:/var/www/${config.monorepo.vars.internetName}-website/"; - sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l"; - }; - loginExtra = '' - if [[ "$(tty)" = "/dev/tty1" ]]; then - exec Hyprland - fi - ''; - }; -} diff --git a/nix/modules/honk.nix b/nix/modules/honk.nix deleted file mode 100644 index 985a544..0000000 --- a/nix/modules/honk.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ lib, config, ... }: -{ - services.honk = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - servername = "ret2pop.net"; - username = "ret2pop"; - }; -} diff --git a/nix/modules/i2pd.nix b/nix/modules/i2pd.nix deleted file mode 100644 index 9e942fa..0000000 --- a/nix/modules/i2pd.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, ... }: -{ - services.i2pd = { - enable = lib.mkDefault false; - address = "0.0.0.0"; - inTunnels = { }; - outTunnels = { }; - }; -} diff --git a/nix/modules/icecast.nix b/nix/modules/icecast.nix deleted file mode 100644 index 7d3d88d..0000000 --- a/nix/modules/icecast.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, config, ... }: -{ - services.icecast = { - enable = lib.mkDefault false; - listen.address = "0.0.0.0"; - extraConfig = '' - - 0 - /stream.m3u - 3600 - - - -
- - - ''; - }; - admin.password = "changeme"; -} diff --git a/nix/modules/impermanence.nix b/nix/modules/impermanence.nix deleted file mode 100644 index 4fa886a..0000000 --- a/nix/modules/impermanence.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ lib, config, ... }: -{ - assertions = [ - { - assertion = (! (config.monorepo.profiles.impermanence.enable && (! (config.monorepo.vars.fileSystem == "btrfs")))); - message = "Impermanence requires btrfs filesystem."; - } - ]; - - boot.initrd.postResumeCommands = (if config.monorepo.profiles.impermanence.enable then lib.mkAfter '' - mkdir /btrfs_tmp - mount -t btrfs -n -o subvol=/ /dev/mapper/crypted /btrfs_tmp - if [[ -e /btrfs_tmp/root ]]; then - mkdir -p /btrfs_tmp/old_roots - timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") - mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" - fi - - delete_subvolume_recursively() { - IFS=$'\n' - for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do - delete_subvolume_recursively "/btrfs_tmp/$i" - done - btrfs subvolume delete "$1" - } - - for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do - delete_subvolume_recursively "$i" - done - - btrfs subvolume create /btrfs_tmp/root - umount -n /btrfs_tmp - '' else ""); - - boot.initrd.luks.devices = (if (config.monorepo.vars.fileSystem == "btrfs") then { - crypted = { - device = "/dev/disk/by-partlabel/disk-main-luks"; - }; - } else {}); - - fileSystems = if (config.monorepo.profiles.impermanence.enable) then { - "/persistent" = { - neededForBoot = true; - }; - "/home" = { - neededForBoot = true; - }; - } else {}; - - environment.persistence."/persistent" = { - enable = config.monorepo.profiles.impermanence.enable; - hideMounts = true; - directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/lib/nixos" - "/var/lib/systemd/coredump" - "/etc/NetworkManager/system-connections" - ]; - files = [ - "/etc/machine-id" - { file = "/var/keys/secret_file"; parentDirectory = { mode = "u=rwx,g=,o="; }; } - ]; - users."${config.monorepo.vars.userName}" = { - directories = [ - "Downloads" - "music" - "Pictures" - "Documents" - "Videos" - "Monero" - "org" - "monorepo" - "soundfont" - "website_html" - "ardour" - "audacity" - "img" - "email" - "projects" - "secrets" - - ".emacs.d" - ".elfeed" - ".electrum" - ".mozilla" - ".bitmonero" - ".config" - ".crypto" - { directory = ".gnupg"; mode = "0700"; } - { directory = ".ssh"; mode = "0700"; } - { directory = ".local/share/keyrings"; mode = "0700"; } - ".local/share/direnv" - ]; - files = [ - ".emacs" - ]; - }; - }; -} diff --git a/nix/modules/inspircd.nix b/nix/modules/inspircd.nix deleted file mode 100644 index bf3e9ba..0000000 --- a/nix/modules/inspircd.nix +++ /dev/null @@ -1,539 +0,0 @@ -{ lib, config, ... }: -{ - services.inspircd = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - modules = [ "ssl_openssl" ]; - config = '' - - - - - - - - - - - #hash="sha256" - - # diepass: Password for opers to use if they need to shutdown (die) - # a server. - diepass="" - - # restartpass: Password for opers to use if they need to restart - # a server. - restartpass=""> - - - - -#-#-#-#-#-#-#-#-#-#-#-#- CIDR CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#- -# # -# CIDR configuration allows detection of clones and applying of # -# throttle limits across a CIDR range. (A CIDR range is a group of # -# IPs, for example, the CIDR range 192.168.1.0-192.168.1.255 may be # -# represented as 192.168.1.0/24). This means that abuse across an ISP # -# is detected and curtailed much easier. Here is a good chart that # -# shows how many IPs the different CIDRs correspond to: # -# http://en.wikipedia.org/wiki/CIDR#Prefix_aggregation # -# # - - - - - -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# DNS SERVER -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# If these values are not defined, InspIRCd uses the default DNS resolver -# of your system. - - - -# An example of using an IPv6 nameserver -# - -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# PID FILE -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# # -# Define the path to the PID file here. The PID file can be used to # -# rehash the ircd from the shell or to terminate the ircd from the # -# shell using shell scripts, perl scripts, etc... and to monitor the # -# ircd's state via cron jobs. If this is a relative path, it will be # -# relative to the configuration directory, and if it is not defined, # -# the default of 'inspircd.pid' is used. # -# # - -# - -#-#-#-#-#-#-#-#-#-#-#-#-#- BANLIST LIMITS #-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# # -# Use these tags to customise the ban limits on a per channel basis. # -# The tags are read from top to bottom, and any tag found which # -# matches the channels name applies the banlimit to that channel. # -# It is advisable to put an entry with the channel as '*' at the # -# bottom of the list. If none are specified or no maxbans tag is # -# matched, the banlist size defaults to 64 entries. # -# # - - - - -#-#-#-#-#-#-#-#-#-#-#- DISABLED FEATURES -#-#-#-#-#-#-#-#-#-#-#-#-#-# -# # -# This tag is optional, and specifies one or more features which are # -# not available to non-operators. # -# # -# For example you may wish to disable NICK and prevent non-opers from # -# changing their nicknames. # -# Note that any disabled commands take effect only after the user has # -# 'registered' (e.g. after the initial USER/NICK/PASS on connection) # -# so for example disabling NICK will not cripple your network. # -# # -# You can also define if you want to disable any channelmodes # -# or usermodes from your users. # -# # -# `fakenonexistant' will make the ircd pretend that nonexistant # -# commands simply don't exist to non-opers ("no such command"). # -# # -# - - -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#- RTFM LINE -#-#-#-#-#-#-#-#-#-#-#-#-#-# -# # -# Just remove this... Its here to make you read ALL of the config # -# file options ;) # - -# - - - -#-#-#-#-#-#-#-#-#-#-#-#-#- SERVER OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-# -# # -# Settings to define which features are usable on your server. # -# # - - - - # suffixpart: What (if anything) users' part message - # should be suffixed with. - suffixpart=""" - - # fixedquit: Set all users' quit messages to this value. - #fixedquit="" - - # fixedpart: Set all users' part messages in all channels - # to this value. - #fixedpart="" - - # syntaxhints: If enabled, if a user fails to send the correct parameters - # for a command, the ircd will give back some help text of what - # the correct parameters are. - syntaxhints="no" - - # cyclehosts: If enabled, when a user gets a host set, it will cycle - # them in all their channels. If not, it will simply change their host - # without cycling them. - cyclehosts="yes" - - # cyclehostsfromuser: If enabled, the source of the mode change for - # cyclehosts will be the user who cycled. This can look nicer, but - # triggers anti-takeover mechanisms of some obsolete bots. - cyclehostsfromuser="no" - - # ircumsgprefix: Use undernet-style message prefixing for NOTICE and - # PRIVMSG. If enabled, it will add users' prefix to the line, if not, - # it will just message the user normally. - ircumsgprefix="no" - - # announcets: If set to yes, when the timestamp on a channel changes, all users - # in the channel will be sent a NOTICE about it. - announcets="yes" - - # allowmismatch: Setting this option to yes will allow servers to link even - # if they don't have the same "optionally common" modules loaded. Setting this to - # yes may introduce some desyncs and unwanted behaviour. - allowmismatch="no" - - # defaultbind: Sets the default for tags without an address. Choices are - # ipv4 or ipv6; if not specified, IPv6 will be used if your system has support, - # falling back to IPv4 otherwise. - defaultbind="auto" - - # hostintopic: If enabled, channels will show the host of the topic setter - # in the topic. If set to no, it will only show the nick of the topic setter. - hostintopic="yes" - - # pingwarning: If a server does not respond to a ping within x seconds, - # it will send a notice to opers with snomask +l informing that the server - # is about to ping timeout. - pingwarning="15" - - # serverpingfreq: How often pings are sent between servers (in seconds). - serverpingfreq="60" - - # defaultmodes: What modes are set on a empty channel when a user - # joins it and it is unregistered. - defaultmodes="nt" - - # moronbanner: This is the text that is sent to a user when they are - # banned from the server. - moronbanner="You're banned! Email abuse@example.com with the ERROR line below for help." - - # exemptchanops: exemptions for channel access restrictions based on prefix. - exemptchanops="nonick:v flood:o" - - # invitebypassmodes: This allows /invite to bypass other channel modes. - # (Such as +k, +j, +l, etc.) - invitebypassmodes="yes" - - # nosnoticestack: This prevents snotices from 'stacking' and giving you - # the message saying '(last message repeated X times)'. Defaults to no. - nosnoticestack="no" - - # welcomenotice: When turned on, this sends a NOTICE to connecting users - # with the text Welcome to ! after successful registration. - # Defaults to yes. - welcomenotice="yes"> - - -#-#-#-#-#-#-#-#-#-#-#-# PERFORMANCE CONFIGURATION #-#-#-#-#-#-#-#-#-#-# -# # - - - -#-#-#-#-#-#-#-#-#-#-#-# SECURITY CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-# -# # - -