My Nix Configuration

Compare changes

Choose any two refs to compare.

-2
TODO.md
···
- [ ] Move all Docker containers to using native versions of databases, redis, etc.
- Ensures higher performance and reduces the number of running containers.
- https://github.com/felschr/nixos-config/blob/main/services/immich.nix for an example of how to do it
-
- [ ] Add Archivebox service(needs custom module)
-
- [ ] Add Immich service
## Zaphod
···
- [ ] Move all Docker containers to using native versions of databases, redis, etc.
- Ensures higher performance and reduces the number of running containers.
- https://github.com/felschr/nixos-config/blob/main/services/immich.nix for an example of how to do it
## Zaphod
+7 -3
devShells/default/default.nix
···
}:
pkgs.mkShellNoCC {
packages = [
pkgs.deadnix
pkgs.just
pkgs.nil
pkgs.nix-tree
pkgs.nixd
-
pkgs.nix-output-monitor
pkgs.nixfmt-rfc-style
-
pkgs.statix
pkgs.nvd
-
pkgs.nixos-rebuild-ng
];
}
···
}:
pkgs.mkShellNoCC {
packages = [
+
# keep-sorted start
pkgs.deadnix
pkgs.just
pkgs.nil
+
pkgs.nix-output-monitor
pkgs.nix-tree
+
pkgs.nix-update
pkgs.nixd
pkgs.nixfmt-rfc-style
+
pkgs.nixos-rebuild-ng
pkgs.nvd
+
pkgs.statix
+
pkgs.tokei
+
# keep-sorted endd
];
}
+41 -41
flake.lock
···
]
},
"locked": {
-
"lastModified": 1763974329,
-
"narHash": "sha256-8bljTh08KrIzTwzJEM8rGCg56hGtIH6/oT0LctCPTOQ=",
"owner": "caelestia-dots",
"repo": "shell",
-
"rev": "11282f6abe32f9671dc0a7ce49d64bc4f2d79e6b",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1763517499,
-
"narHash": "sha256-N5y55DwDNT+0kLFck2sy1+DcnLOZ/N05UEvZ2R5pmWo=",
"owner": "caelestia-dots",
"repo": "cli",
-
"rev": "1cfd405eaa74e66f33e7790c5c6586676f03a395",
"type": "github"
},
"original": {
···
"nixpkgs": "nixpkgs"
},
"locked": {
-
"lastModified": 1763974424,
-
"narHash": "sha256-jPpxBhrBOAKrXPxdrdXnq4w7x3UIkUZjarNLNYkb7Zo=",
"owner": "catppuccin",
"repo": "nix",
-
"rev": "931c6465c3eac4709684dbc320bca243252927df",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1764100979,
-
"narHash": "sha256-Z/XgP+Lt4NnMELhQkLIfYsjwSXQQH5xLYuL/5fRZ/Sw=",
"owner": "AvengeMedia",
"repo": "DankMaterialShell",
-
"rev": "08641790856d293a11c7647dcb940b05c184abbb",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1763574204,
-
"narHash": "sha256-rZimVCGH7w2NX+G1BpLQZC09nrS3clhmUTv2PO3TQhg=",
"owner": "pyrox0",
"repo": "dn43.nix",
-
"rev": "20d58bc84b9c73f2b309fa37e6237584f4ee345d",
"type": "github"
},
"original": {
···
"systems": "systems_4"
},
"locked": {
-
"lastModified": 1760925941,
-
"narHash": "sha256-M+EJsr6z05heKk6iuh3RWZS+9gAMBwG9IyryACVpOy0=",
"owner": "tailscale",
"repo": "golink",
-
"rev": "42765dea97afa9f9f5ea167fb0df6f5372d78481",
"type": "github"
},
"original": {
···
},
"hardware": {
"locked": {
-
"lastModified": 1764080039,
-
"narHash": "sha256-b1MtLQsQc4Ji1u08f+C6g5XrmLPkJQ1fhNkCt+0AERQ=",
"owner": "nixos",
"repo": "nixos-hardware",
-
"rev": "da17006633ca9cda369be82893ae36824a2ddf1a",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1764075860,
-
"narHash": "sha256-KYEIHCBBw+/lwKsJNRNoUxBB4ZY2LK0G0T8f+0i65q0=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "295d90e22d557ccc3049dc92460b82f372cd3892",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1763870992,
-
"narHash": "sha256-NPyc76Wxmv/vAsXJ8F+/8fXECHYcv2YGSqdiSHp/F/A=",
"owner": "Mic92",
"repo": "nix-index-database",
-
"rev": "d7423982c7a26586aa237d130b14c8b302c7a367",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1763421233,
-
"narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648",
"type": "github"
},
"original": {
···
},
"nixpkgs_2": {
"locked": {
-
"lastModified": 1763934636,
-
"narHash": "sha256-C1ZBijVfDnXQxVjITn2omp5rSP4TyENKyFsxozcYFzo=",
-
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
"type": "tarball",
-
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre901289.ee09932cedce/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
···
]
},
"locked": {
-
"lastModified": 1764045583,
-
"narHash": "sha256-W24ReyRrhOKTKIsuAMkY5hnVlCufGoONM79sjUoyQkk=",
"owner": "quickshell-mirror",
"repo": "quickshell",
-
"rev": "e9bad67619ee9937a1bbecfc6ad3b4231d2ecdc3",
"type": "github"
},
"original": {
···
"sqlite-lib-src": "sqlite-lib-src"
},
"locked": {
-
"lastModified": 1764005195,
-
"narHash": "sha256-PzuWiW/nMxwQTX0i1bHwGazQF4ptLNI9OGwpmhDb9i0=",
"ref": "refs/heads/master",
-
"rev": "7358ec6edfa4d17b8b8f543d99e83a4705901148",
-
"revCount": 1687,
"type": "git",
"url": "https://tangled.org/@tangled.org/core"
},
···
]
},
"locked": {
+
"lastModified": 1764466211,
+
"narHash": "sha256-rBK+usqfAP9ZuEthw9wMCwTKQgKUMmziuzrrkpDZdzY=",
"owner": "caelestia-dots",
"repo": "shell",
+
"rev": "40813e520582c5df11f6d4c870a31900fe171cce",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1764381410,
+
"narHash": "sha256-WR/oQQjveFqQxo8oHngZuOVgBQINDgPe+lCXLeNhAAg=",
"owner": "caelestia-dots",
"repo": "cli",
+
"rev": "ed12d4cb82600872a82feb577711be1148c7af35",
"type": "github"
},
"original": {
···
"nixpkgs": "nixpkgs"
},
"locked": {
+
"lastModified": 1764325801,
+
"narHash": "sha256-LQ7tsrXs1wuB6KBwUctL3JlUsG/FWI2pCI6NkoO52dk=",
"owner": "catppuccin",
"repo": "nix",
+
"rev": "a696fed6b9b6aa89ef495842cdca3fc2a7cef0de",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1764553800,
+
"narHash": "sha256-kHlx3E3K2UNWI1Hpbyl5zieoOVevZfwz8P/OcyViDHY=",
"owner": "AvengeMedia",
"repo": "DankMaterialShell",
+
"rev": "7959a795753d9f646cfb9e21cfb778adf7e5c933",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1764646680,
+
"narHash": "sha256-HEVzGL23bev8CuZXbLgDZRWy+mD/qPZhRBpjag7G/dU=",
"owner": "pyrox0",
"repo": "dn43.nix",
+
"rev": "c8b68602cf1ef696e6a9f9c25e8c177d4101331b",
"type": "github"
},
"original": {
···
"systems": "systems_4"
},
"locked": {
+
"lastModified": 1764170522,
+
"narHash": "sha256-4c9jCOfkKNRHJLXgOIcVcNSaw/XaiVaqesaLJn86wGA=",
"owner": "tailscale",
"repo": "golink",
+
"rev": "6821994de926c565d3ef9fbf3cb0e0fcb780f4be",
"type": "github"
},
"original": {
···
},
"hardware": {
"locked": {
+
"lastModified": 1764440730,
+
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "nixos",
"repo": "nixos-hardware",
+
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1764544324,
+
"narHash": "sha256-GVBGjO7UsmzLrlOJV8NlKSxukHaHencrJqWkCA6FkqI=",
"owner": "nix-community",
"repo": "home-manager",
+
"rev": "e4e25a8c310fa45f2a8339c7972dc43d2845a612",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1764475780,
+
"narHash": "sha256-77jL5H5x51ksLiOUDjY0ZK8e2T4ZXLhj3ap8ETvknWI=",
"owner": "Mic92",
"repo": "nix-index-database",
+
"rev": "5a3ff8c1a09003f399f43d5742d893c0b1ab8af0",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
+
"lastModified": 1763966396,
+
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
"owner": "NixOS",
"repo": "nixpkgs",
+
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
"type": "github"
},
"original": {
···
},
"nixpkgs_2": {
"locked": {
+
"lastModified": 1764527385,
+
"narHash": "sha256-gpwyCnyi2or0InBXe+4I9YeED3Uly3EGH58qvVnchBY=",
+
"rev": "23258e03aaa49b3a68597e3e50eb0cbce7e42e9d",
"type": "tarball",
+
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre904683.23258e03aaa4/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
···
]
},
"locked": {
+
"lastModified": 1764482797,
+
"narHash": "sha256-ynV90KoBrPe38YFlKAHtPFk4Ee3IANUsIFGxRaq7H/s=",
"owner": "quickshell-mirror",
"repo": "quickshell",
+
"rev": "d24e8e9736287d01ee73ef9d573d2bc316a62d5c",
"type": "github"
},
"original": {
···
"sqlite-lib-src": "sqlite-lib-src"
},
"locked": {
+
"lastModified": 1764494836,
+
"narHash": "sha256-u1i7aMo0fTQ6WVdOZhG2fo/gEx2Fq8+3URmuqEBZGWI=",
"ref": "refs/heads/master",
+
"rev": "d37f774fb8c60aa2bd0cb965c9884457d0afb660",
+
"revCount": 1689,
"type": "git",
"url": "https://tangled.org/@tangled.org/core"
},
+1 -1
homeModules/profiles/base/default.nix
···
{
options.py.profiles.base.enable = lib.mkEnableOption "Base Home Profile";
config = lib.mkIf cfg.enable {
-
home.stateVersion = "25.11";
home.language = {
base = "en_US.utf8";
};
···
{
options.py.profiles.base.enable = lib.mkEnableOption "Base Home Profile";
config = lib.mkIf cfg.enable {
+
home.stateVersion = "26.05";
home.language = {
base = "en_US.utf8";
};
-1
hosts/default.nix
···
"vps"
];
modules = [
-
inputs.self.nixosModules.dn42Wireguard
inputs.dn42.nixosModules.default
];
};
···
"vps"
];
modules = [
inputs.dn42.nixosModules.default
];
};
+1
hosts/marvin/default.nix
···
./services/git.nix
./services/golink.nix
./services/grafana.nix
./services/jellyfin.nix
./services/matrix.nix
./services/miniflux.nix
···
./services/git.nix
./services/golink.nix
./services/grafana.nix
+
./services/immich.nix
./services/jellyfin.nix
./services/matrix.nix
./services/miniflux.nix
+2
hosts/marvin/services/anubis.nix
···
{
config,
...
}:
{
···
ED25519_PRIVATE_KEY_HEX_FILE = config.age.secrets.anubis-key.path;
OG_PASSTHROUGH = true;
OG_CACHE_CONSIDER_HOST = true;
};
};
age.secrets.anubis-key = {
···
{
config,
+
self',
...
}:
{
···
ED25519_PRIVATE_KEY_HEX_FILE = config.age.secrets.anubis-key.path;
OG_PASSTHROUGH = true;
OG_CACHE_CONSIDER_HOST = true;
+
POLICY_FNAME = "${self'.packages.anubis-files}/policies/default.yaml";
};
};
age.secrets.anubis-key = {
+5 -5
hosts/marvin/services/git.nix
···
};
settings = {
DEFAULT = {
-
APP_NAME = "PyroNet Git";
RUN_MODE = "prod";
};
attachment = {
MAX_SIZE = 200;
};
-
log."logger.router.MODE" = "";
mailer = {
ENABLED = true;
-
FROM = "PyroNet Git <git@pyrox.dev>";
PROTOCOL = "smtps";
SMTP_ADDR = "mail.pyrox.dev";
SMTP_PORT = 465;
···
};
"ui.meta" = {
AUTHOR = "dish";
-
DESCRIPTION = "PyroNet Git Services";
};
metrics = {
ENABLED = true;
···
ISSUE_INDEXER_PATH = "indexers/issues.bleve";
# Enable repo indexing
REPO_INDEXER_ENABLED = true;
-
REPO_INDEXER_REPO_TYPES = "sources,forks,templates,mirrors";
REPO_INDEXER_TYPE = "bleve";
REPO_INDEXER_PATH = "indexers/repos.bleve";
};
···
};
settings = {
DEFAULT = {
+
APP_NAME = "dishNet Git";
RUN_MODE = "prod";
};
attachment = {
MAX_SIZE = 200;
};
+
log.LOGGER_ROUTER_MODE = "";
mailer = {
ENABLED = true;
+
FROM = "dishNet Git <git@pyrox.dev>";
PROTOCOL = "smtps";
SMTP_ADDR = "mail.pyrox.dev";
SMTP_PORT = 465;
···
};
"ui.meta" = {
AUTHOR = "dish";
+
DESCRIPTION = "dishNet Git Services";
};
metrics = {
ENABLED = true;
···
ISSUE_INDEXER_PATH = "indexers/issues.bleve";
# Enable repo indexing
REPO_INDEXER_ENABLED = true;
+
REPO_INDEXER_REPO_TYPES = "sources,forks";
REPO_INDEXER_TYPE = "bleve";
REPO_INDEXER_PATH = "indexers/repos.bleve";
};
+4 -4
hosts/marvin/services/grafana.nix
···
};
smtp = {
enabled = true;
-
user = "grafana@thehedgehog.me";
-
from_address = "grafana@thehedgehog.me";
-
host = "smtp.migadu.com:465";
password = "$__file{${config.age.secrets.grafana-smtp-password.path}}";
};
};
···
services.anubis.instances.grafana = {
settings = {
BIND = ":${toString d.anubis}";
-
POLICY_FNAME = "${self'.packages.anubis-files}/policies/grafana.yaml";
TARGET = "http://localhost:${toString d.port}";
};
};
···
};
smtp = {
enabled = true;
+
user = "grafana@pyrox.dev";
+
from_address = "grafana@pyrox.dev";
+
host = "mail.pyrox.dev:465";
password = "$__file{${config.age.secrets.grafana-smtp-password.path}}";
};
};
···
services.anubis.instances.grafana = {
settings = {
BIND = ":${toString d.anubis}";
+
POLICY_FNAME = "${self'.packages.anubis-files}/policies/default.yaml";
TARGET = "http://localhost:${toString d.port}";
};
};
+223
hosts/marvin/services/immich-config.json
···
···
+
{
+
"backup": {
+
"database": {
+
"cronExpression": "0 02 * * *",
+
"enabled": true,
+
"keepLastAmount": 14
+
}
+
},
+
"ffmpeg": {
+
"accel": "vaapi",
+
"accelDecode": true,
+
"acceptedAudioCodecs": ["aac", "mp3", "libopus"],
+
"acceptedContainers": ["mov", "ogg", "webm"],
+
"acceptedVideoCodecs": ["h264"],
+
"bframes": -1,
+
"cqMode": "auto",
+
"crf": 23,
+
"gopSize": 0,
+
"maxBitrate": "0",
+
"preferredHwDevice": "auto",
+
"preset": "veryfast",
+
"refs": 0,
+
"targetAudioCodec": "aac",
+
"targetResolution": "720",
+
"targetVideoCodec": "h264",
+
"temporalAQ": false,
+
"threads": 0,
+
"tonemap": "hable",
+
"transcode": "required",
+
"twoPass": false
+
},
+
"image": {
+
"colorspace": "p3",
+
"extractEmbedded": false,
+
"fullsize": {
+
"enabled": false,
+
"format": "jpeg",
+
"quality": 80
+
},
+
"preview": {
+
"format": "jpeg",
+
"quality": 80,
+
"size": 1440
+
},
+
"thumbnail": {
+
"format": "webp",
+
"quality": 80,
+
"size": 250
+
}
+
},
+
"job": {
+
"backgroundTask": {
+
"concurrency": 5
+
},
+
"faceDetection": {
+
"concurrency": 2
+
},
+
"library": {
+
"concurrency": 5
+
},
+
"metadataExtraction": {
+
"concurrency": 5
+
},
+
"migration": {
+
"concurrency": 5
+
},
+
"notifications": {
+
"concurrency": 5
+
},
+
"ocr": {
+
"concurrency": 1
+
},
+
"search": {
+
"concurrency": 5
+
},
+
"sidecar": {
+
"concurrency": 5
+
},
+
"smartSearch": {
+
"concurrency": 2
+
},
+
"thumbnailGeneration": {
+
"concurrency": 3
+
},
+
"videoConversion": {
+
"concurrency": 1
+
},
+
"workflow": {
+
"concurrency": 5
+
}
+
},
+
"library": {
+
"scan": {
+
"cronExpression": "0 0 * * *",
+
"enabled": true
+
},
+
"watch": {
+
"enabled": false
+
}
+
},
+
"logging": {
+
"enabled": true,
+
"level": "log"
+
},
+
"machineLearning": {
+
"availabilityChecks": {
+
"enabled": true,
+
"interval": 30000,
+
"timeout": 2000
+
},
+
"clip": {
+
"enabled": true,
+
"modelName": "ViT-B-16-SigLIP2__webli"
+
},
+
"duplicateDetection": {
+
"enabled": true,
+
"maxDistance": 0.01
+
},
+
"enabled": true,
+
"facialRecognition": {
+
"enabled": true,
+
"maxDistance": 0.5,
+
"minFaces": 7,
+
"minScore": 0.7,
+
"modelName": "buffalo_l"
+
},
+
"ocr": {
+
"enabled": true,
+
"maxResolution": 736,
+
"minDetectionScore": 0.5,
+
"minRecognitionScore": 0.8,
+
"modelName": "EN__PP-OCRv5_mobile"
+
},
+
"urls": ["http://localhost:3003"]
+
},
+
"map": {
+
"darkStyle": "https://tiles.immich.cloud/v1/style/dark.json",
+
"enabled": true,
+
"lightStyle": "https://tiles.immich.cloud/v1/style/light.json"
+
},
+
"metadata": {
+
"faces": {
+
"import": false
+
}
+
},
+
"newVersionCheck": {
+
"enabled": false
+
},
+
"nightlyTasks": {
+
"clusterNewFaces": true,
+
"databaseCleanup": true,
+
"generateMemories": true,
+
"missingThumbnails": true,
+
"startTime": "00:00",
+
"syncQuotaUsage": true
+
},
+
"notifications": {
+
"smtp": {
+
"enabled": true,
+
"from": "dishNet Photos <immich@pyrox.dev>",
+
"replyTo": "",
+
"transport": {
+
"host": "mail.pyrox.dev",
+
"ignoreCert": false,
+
"port": 25,
+
"secure": true,
+
"username": "immich@pyrox.dev"
+
}
+
}
+
},
+
"oauth": {
+
"autoLaunch": false,
+
"autoRegister": true,
+
"buttonText": "Login with Pocket-ID",
+
"clientId": "f1312240-d9fc-4336-aca6-b98316867848",
+
"defaultStorageQuota": null,
+
"enabled": true,
+
"issuerUrl": "https://auth.pyrox.dev",
+
"mobileOverrideEnabled": false,
+
"mobileRedirectUri": "",
+
"profileSigningAlgorithm": "none",
+
"roleClaim": "immich_role",
+
"scope": "openid email profile immich_role",
+
"signingAlgorithm": "RS256",
+
"storageLabelClaim": "preferred_username",
+
"storageQuotaClaim": "immich_quota",
+
"timeout": 30000,
+
"tokenEndpointAuthMethod": "client_secret_post"
+
},
+
"passwordLogin": {
+
"enabled": true
+
},
+
"reverseGeocoding": {
+
"enabled": true
+
},
+
"server": {
+
"externalDomain": "https://img.pyrox.dev",
+
"loginPageMessage": "",
+
"publicUsers": true
+
},
+
"storageTemplate": {
+
"enabled": false,
+
"hashVerificationEnabled": true,
+
"template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
+
},
+
"templates": {
+
"email": {
+
"albumInviteTemplate": "",
+
"albumUpdateTemplate": "",
+
"welcomeTemplate": ""
+
}
+
},
+
"theme": {
+
"customCss": ""
+
},
+
"trash": {
+
"days": 30,
+
"enabled": true
+
},
+
"user": {
+
"deleteDelay": 7
+
}
+
}
+51
hosts/marvin/services/immich.nix
···
···
+
{
+
self,
+
config,
+
lib,
+
...
+
}:
+
let
+
d = self.lib.data.services.immich;
+
in
+
{
+
services = {
+
immich = {
+
inherit (d) port;
+
enable = true;
+
host = "0.0.0.0";
+
redis.enable = true;
+
mediaLocation = "/var/media/photos/";
+
accelerationDevices = [ "/dev/dri/renderD128" ];
+
settings = lib.recursiveUpdate (builtins.fromJSON (builtins.readFile ./immich-config.json)) {
+
oauth.clientSecret._secret = config.age.secrets.immich-oauth-secret.path;
+
notifications.smtp.transport.password._secret = config.age.secrets.immich-mail-pw.path;
+
server.externalDomain = "https://${d.extUrl}";
+
};
+
};
+
immich-public-proxy = {
+
enable = true;
+
port = d.pubProxy;
+
immichUrl = "http://localhost:${toString d.port}";
+
settings.ipp = {
+
downloadedFilename = 1;
+
};
+
};
+
};
+
systemd.services.immich-public-proxy.environment.PUBLIC_BASE_URL = "https://${d.extUrl}";
+
users.users.immich.extraGroups = [
+
"video"
+
"render"
+
];
+
age.secrets = {
+
immich-oauth-secret = {
+
file = ./secrets/immich/oauth-secret.age;
+
owner = "immich";
+
group = "immich";
+
};
+
immich-mail-pw = {
+
file = ./secrets/immich/mail-pw.age;
+
owner = "immich";
+
group = "immich";
+
};
+
};
+
}
-2
hosts/marvin/services/miniflux.nix
···
{
config,
-
self',
self,
...
}:
···
services.anubis.instances.miniflux = {
settings = {
BIND = ":${toString d.anubis}";
-
POLICY_FNAME = "${self'.packages.anubis-files}/policies/miniflux.yaml";
TARGET = "http://localhost:${toString d.port}";
};
};
···
{
config,
self,
...
}:
···
services.anubis.instances.miniflux = {
settings = {
BIND = ":${toString d.anubis}";
TARGET = "http://localhost:${toString d.port}";
};
};
+97 -34
hosts/marvin/services/planka.nix
···
{
config,
self',
-
self,
...
}:
let
-
dataDir = "/var/lib/planka";
d = self.lib.data.services.planka;
in
{
-
virtualisation.oci-containers.containers = {
-
planka-server = {
-
image = "ghcr.io/plankanban/planka:2.0.0-rc.4";
-
ports = [ "${toString d.port}:1337" ];
-
environment = {
-
BASE_URL = "https://${d.extUrl}";
-
DATABASE_URL = "postgresql://planka@planka-db/planka";
-
# Default Admin
-
DEFAULT_ADMIN_EMAIL = "pyrox@pyrox.dev";
-
DEFAULT_ADMIN_USERNAME = "pyrox";
-
TRUST_PROXY = "true";
-
DEFAULT_LANGUAGE = "en-US";
};
-
environmentFiles = [ config.age.secrets.planka-env.path ];
-
volumes = [
-
"${dataDir}/user-avatars:/app/public/user-avatars"
-
"${dataDir}/project-background-images:/app/public/project-background-images"
-
"${dataDir}/attachments:/app/private/attachments"
-
"${dataDir}/favicons:/app/public/favicons"
-
"${dataDir}/background-images:/app/public/background-images"
-
];
-
extraOptions = [ "--network=planka" ];
};
-
planka-db = {
-
image = "postgres:16-alpine";
-
volumes = [ "${dataDir}/db:/var/lib/postgresql/data" ];
-
environment = {
-
POSTGRES_USER = "planka";
-
POSTGRES_DB = "planka";
-
POSTGRES_HOST_AUTH_METHOD = "trust";
};
-
extraOptions = [ "--network=planka" ];
};
};
age.secrets.planka-env = {
file = ./secrets/planka-env.age;
-
owner = "thehedgehog";
-
group = "misc";
};
services.anubis.instances.planka = {
settings = {
COOKIE_DOMAIN = ".cs2a.club";
BIND = ":${toString d.anubis}";
-
POLICY_FNAME = "${self'.packages.anubis-files}/policies/planka.yaml";
TARGET = "http://localhost:${toString d.port}";
};
};
···
{
+
lib,
config,
+
self,
self',
+
pkgs,
...
}:
let
d = self.lib.data.services.planka;
+
+
commonServiceConfig = {
+
EnvironmentFile = config.age.secrets.planka-env.path;
+
StateDirectory = "planka";
+
WorkingDirectory = "/var/lib/planka";
+
User = "planka";
+
Group = "planka";
+
+
# Hardening
+
LockPersonality = true;
+
NoNewPrivileges = true;
+
PrivateDevices = true;
+
PrivateMounts = true;
+
PrivateTmp = true;
+
PrivateUsers = true;
+
ProtectClock = true;
+
ProtectControlGroups = true;
+
ProtectHome = true;
+
ProtectHostname = true;
+
ProtectKernelLogs = true;
+
ProtectKernelModules = true;
+
ProtectKernelTunables = true;
+
ProtectProc = "invisible";
+
RemoveIPC = true;
+
RestrictRealtime = true;
+
RestrictSUIDSGID = true;
+
UMask = "0660";
+
RestrictAddressFamilies = [
+
"AF_UNIX"
+
"AF_INET"
+
"AF_INET6"
+
];
+
};
in
{
+
systemd = {
+
tmpfiles.settings = {
+
"10-planka"."/var/lib/planka".d = {
+
group = "planka";
+
user = "planka";
+
mode = "0755";
};
};
+
services = {
+
planka-init-db = {
+
wantedBy = [ "multi-user.target" ];
+
after = [ "postgres.target" ];
+
description = "Planka Kanban Database Init Script";
+
path = [
+
pkgs.nodejs
+
];
+
script = ''
+
if [ ! -f /var/lib/planka/db-init-ran ]; then
+
node run ${self'.packages.planka}/lib/node_modules/planka/db/init.js && \
+
touch /var/lib/planka/db-init-ran
+
fi
+
'';
+
serviceConfig = commonServiceConfig // {
+
Type = "oneshot";
+
SyslogIdentifier = "planka-init-db";
+
};
+
};
+
planka-server = {
+
after = [ "planka-init-db.service" ];
+
wantedBy = [ "multi-user.target" ];
+
description = "Planka Kanban Server";
+
documentation = [ "https://docs.planka.cloud" ];
+
environment = {
+
DATABASE_URL = "postgresql://%2Frun%2Fpostgresql/planka";
+
DEFAULT_ADMIN_EMAIL = "pyrox@pyrox.dev";
+
DEFAULT_ADMIN_USERNAME = "pyrox";
+
TRUST_PROXY = "true";
+
DEFAULT_LANGUAGE = "en-US";
+
BASE_URL = "https://${d.extUrl}";
+
NODE_ENV = "production";
+
};
+
serviceConfig = commonServiceConfig // {
+
Type = "simple";
+
ExecStart = "${lib.getExe self'.packages.planka} --port ${toString d.port}";
+
SyslogIdentifier = "planka";
+
};
};
};
};
+
users.users.planka = {
+
isSystemUser = true;
+
group = "planka";
+
};
+
users.groups.planka = { };
+
services.postgresql = {
+
ensureUsers = [
+
{
+
name = "planka";
+
ensureDBOwnership = true;
+
ensureClauses.login = true;
+
}
+
];
+
ensureDatabases = [ "planka" ];
+
};
age.secrets.planka-env = {
file = ./secrets/planka-env.age;
+
owner = "planka";
+
group = "planka";
};
services.anubis.instances.planka = {
settings = {
COOKIE_DOMAIN = ".cs2a.club";
BIND = ":${toString d.anubis}";
TARGET = "http://localhost:${toString d.port}";
};
};
-2
hosts/marvin/services/pocket-id.nix
···
{
config,
-
self',
self,
...
}:
···
pocket-id = {
settings = {
BIND = ":${toString d.anubis}";
-
POLICY_FNAME = "${self'.packages.anubis-files}/policies/pocket-id.yaml";
TARGET = "http://localhost:${toString d.port}";
};
};
···
{
config,
self,
...
}:
···
pocket-id = {
settings = {
BIND = ":${toString d.anubis}";
TARGET = "http://localhost:${toString d.port}";
};
};
+23 -23
hosts/marvin/services/postgres.nix
···
-
{ pkgs, config, ... }:
-
let
-
cfg = config.services.postgresql;
-
in
{
services.postgresql = {
enable = true;
···
max_parallel_maintenance_workers = 4;
};
};
-
systemd.timers.pg-autovacuum = {
-
description = "Timer for Postgres Autovacuum";
-
timerConfig = {
-
OnCalendar = "*-*-* 01:00:00";
-
Unit = "pg-autovacuum.service";
-
};
-
};
-
systemd.services.pg-autovacuum = {
-
description = "Vacuum all Postgres databases.";
-
requisite = [ "postgresql.service" ];
-
wantedBy = [ "multi-user.target" ];
-
serviceConfig = {
-
Type = "oneshot";
-
User = "postgres";
-
Group = "postgres";
-
SyslogIdentifier = "pg-autovacuum";
-
ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
-
};
-
};
}
···
+
{ pkgs, ... }:
+
# let
+
# cfg = config.services.postgresql;
+
# in
{
services.postgresql = {
enable = true;
···
max_parallel_maintenance_workers = 4;
};
};
+
# systemd.timers.pg-autovacuum = {
+
# description = "Timer for Postgres Autovacuum";
+
# timerConfig = {
+
# OnCalendar = "*-*-* 01:00:00";
+
# Unit = "pg-autovacuum.service";
+
# };
+
# };
+
# systemd.services.pg-autovacuum = {
+
# description = "Vacuum all Postgres databases.";
+
# requisite = [ "postgresql.service" ];
+
# wantedBy = [ "multi-user.target" ];
+
# serviceConfig = {
+
# Type = "oneshot";
+
# User = "postgres";
+
# Group = "postgres";
+
# SyslogIdentifier = "pg-autovacuum";
+
# ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
+
# };
+
# };
}
-23
hosts/marvin/services/secrets/iceshrimp-db-password.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 iqBxIA g+DkjSGDd+i/sdqRCuU2I2Qzmq4Q+FI7wSyfkdM9q0Q
-
cG52xAS/VPjCNgHdky0/jbMvF5tF+cB8BxFNCHYlf2s
-
-> ssh-rsa fFaiTA
-
r5mQer6QBi+HdSS16OLHfv/oh0hbug5drdX/BuQHMORogiDfHEM03K6pmg9064Ep
-
CJgl6z3IS9hlLX7cSq2kVSvP9gk+l5AmI+pMZkJyT9ED43g6wtRI7yiy1ALO0rqB
-
z/CPaoLkFNFlt7sDg5rijAB+t6DNAxULfFj8KR3b+NvGrrW6Vbaio+T5mg1A2PTd
-
60eEfuqdn9dHVI82FQFmai1LwoyButrUNn3UiP8aIdvFUueixcqsAXSK1zjPJZ5B
-
VeAkshwhB9+HKMH1cyRa6LUbzJYxAQBhkgTFqS/r64h3ZAYHTc0lY44VtVhbnEQI
-
76PBEOcQXXjvPR6yvbcVZfpqCkqfo9hb7wogPfJiRMjKM/qlpR19KOf21T0hsV6q
-
b7nYf01yBscx6GKXREkZoxgpo6iLLzVQqU5SzQgs7nxW089JdJ62WoZvJwTxv2G8
-
AdzImnsw73q55MgOYtv/A3hGM8O1Jw4Q4UfMSS43xB+cuvtlEmSqi5mFh0gPbqQR
-
LN8+OcDLz0SR8U6xHj9ufXfhHc4nwO8iZpzav5nZXMEb3Gmva3k8U+nnmuPKqsrL
-
VxFmGNxqmWPfxO0FJC/cxLKME/Lj2MU9r6KT8RQ00BjHUfoDgbFzHVLqIEbIE+Vr
-
/Glcmz/Ecrt3kTwfAhEDpj6g0XVNHt7HA+r4SDWjI00
-
-> ssh-ed25519 wpmdHA LUF/UncaQTEMQepVAhEqFm345dICeW3d3QGhiflTSH8
-
ImxpR4innOw1jMSF4gvmOGRDl0BzqAhOyz+GFstsJG4
-
-> Cg-grease k7q9
-
MLRf60C4nbEc9XHo26cg7UYySbZtOMP2kZtZmvLiS1XFeIqQaR0RgRcUOoTblYzo
-
KQ
-
--- PV6HHY8kDdpFcgNu83K/cwz4qQCW38jcHkTOkCunxrk
-
�*ǜ�lq��^��fʀ���l�� R��C}Մ�ɧ���F�ĩ�&�~h�
-
̟�r��6ʞac,����lc� >
···
hosts/marvin/services/secrets/iceshrimp-secret-config.age

This is a binary file and will not be displayed.

+19
hosts/marvin/services/secrets/immich/mail-pw.age
···
···
+
age-encryption.org/v1
+
-> ssh-ed25519 iqBxIA 3PVJMF6BgxuDxN9NAEYqcZaYEUhK9TB5XprRyW13Kx0
+
AIQQG+4/9SVPcfq9ZtL/JsWDmLvW03UiAJaJ1nHSckQ
+
-> ssh-rsa fFaiTA
+
ZPBI1w2a48Md+Rt92ssVcfxN26zTLCEalT+jG8SJBv07ouOzd4ibPq65m6uOQU/+
+
EEgHe23fGsPP4oISWDUgVFxesLA3wjsTWmbVrkrBzGQNeNnevIRMcJu7vWDtby/+
+
dVxPQIoXH0jPlcDQCm2lwOGD+du+Nb4PnVseRPDaXRypKKmx+J057FQemYBk4OWx
+
yUfbKV2gHHcuRTVUQG6XAQwWvhh4e25fyc+MzKZNPUK4c/SVibjAsUH+Edd+NaV5
+
yxku5k4TFZkU69sl2zCdgWfYVTowTGYGyf4Kf+I/kl9m13zIk9vRpocgt4APaJnv
+
p+KxJvbYRiprWl+IzZg6TwXY5mA1IbvlppR4aak1pwaIE76CgF5mGNDGkviGndtP
+
+eCMIocp6lk2U0dJEYkBtmjNbxFh3dxOcirgdNDypYPlZTSGvSRGhpL4nUJRsR+l
+
A7rJ5aHH2B4Vi93zgSV0PWiWSA7899bzgN1kQKKIgYln6Tl8UxQSNt5L3L4VajuW
+
3UqCltyGWt/926BMS+GrDZSWCEtVsDs5XQqDKEx6D+iviHZJXniI+RhH/eM7FLjp
+
iXgCRkBIALo2lOiScpr2rtfGDViq3Nh64cIslEPiewjVFTCxkxH+LuQ1stukrNki
+
IF0+pZ65rgatMAdnZRFXfRxmywKD99z4WRHAxvYloXc
+
-> ssh-ed25519 wpmdHA SQlzD3yqbnoF0JHqPFFDUugbm8jlBsdntLzF/WlJbjo
+
FggpB1k5xbq62QNlwkocwjiWhEqNjHAxR/GwoPhXbC8
+
--- 1g4f2OQbS5iXm/cqBamEWuapvZHorxfX7wHizfPcYsc
+
�z�92�LN=9���$O���fP���E���~�.��}7�eڰq��y�N�I�L����"%�V�lz'�أ�
+19
hosts/marvin/services/secrets/immich/oauth-secret.age
···
···
+
age-encryption.org/v1
+
-> ssh-ed25519 iqBxIA 4osfKV5/wFT7mCdc4TjP7pJHdD8wzV7VKKiBSGRqImk
+
wU6RSxJh8SBbXbiwCl4lXD/m1THoAg5n1Y7pyKFPiec
+
-> ssh-rsa fFaiTA
+
RTHaBLsBWbDEmY80LktVL/C6CeFinLm3/4t/hoWmbzLLoElBL86EGVdrE5ovjUYl
+
j5+ZacmqahwjCtF/ZGBt8MFkWOK9u90YDfLp+kb2ILVy/E+CcQ3xPpH9bf83pPl/
+
aZmttaRlhnhSDYVXB0lHx3u/cCrYhTf6TjEoVGZ/XrLW0BRmO6GSwcmTrachZzdJ
+
je+pf2ug//mnAJR0y4MxjGlNPD/Vaj/UiaFQjPT+7ZvUUSkbv/QpPqyhhosFA11e
+
1EGp21ppwUnJSNdYh2vulpQGurB5bPlv6Y8FpcFKivq/qKmA4ydyER3NcCca5Ly+
+
01jQ1HRqWylYJj7K4hnxSjnNlOXCrJATuPJYoNdt2U1DnolUAqL6JIP/qNmYx8Fb
+
ZrfFINBmPsNc9XJn14T4J+VB6e68ODBOvZdbzoBQOWAObnP5OH+zLYCB3II+aLPp
+
Zo5WsNBBdZih4EbO0Y9PNWBjyCzxqs7zXPg1PjjDVHN/tIpSGnqoCqCPGuePhgRV
+
h1gnP/lqOW2U1oL004hi3etsUsk3kXHjr35GXMVBeay+3uGXkZqhNYYSluQnJSrs
+
rzahZZ8/q0FDdlUixWHb2uQjL1XMTqUcw8wPsUak8shkx8s7GPKNxtEKFcK46jk4
+
ac9TCyee4HzPC/SWkLGFl0bt9s9lGTBSNQrVzogY/sg
+
-> ssh-ed25519 wpmdHA C6npqn5aqimGJlo+UlvYOoqXSu/hW1JVNAmBPP1Vvjk
+
gWzXqL92jI83iqSr3dydJo+UAz5OGBo6kw6QC4KRWgM
+
--- ltHFDmeAbJsQtyY4CKFEz8OGAkPkue/8upHNOOQgn5I
+
��O�ӌ#&`���P�IZ�#�[��+�tdeG�ui�����?n"��(��b� ]s� y줔���
-20
hosts/marvin/services/secrets/pingvin-secrets.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 iqBxIA HdZwcvp9cLpqrUp0M7sK7ipTslMxK0EYqFfS8xtYeDk
-
Ud7ismLtRG4RlugV3P5wRNjRe8HcJW0rAz/adadWCNc
-
-> ssh-rsa fFaiTA
-
KwjETLhUBpq8Hfp41rg3++syweOB+yNIIdd0KeS2YjxjbDfgwzRVoM+wlB/C3b4X
-
W0561y9+wsnB5A6k/peXLASfVodw30vI9LdW+nHejQr9v/UooXPztoJNrfgaKUow
-
PsLbLUj+M8Y4i22GRKrY6rrCfJk8F4a+2b0PzDc1EqUcZOjMV7aE+fQ4U7+FD1jv
-
xGmrKNRXNUL1j5GpPAi7E7YXuGj2SxjZOiisKqyep5KTEFyIJ04lrN/rtbi2vkEJ
-
ejAFg2jIvxAWiEzEUbjOLFzeIdpb8pPqQJ3OUF4U0crT/r5dxmJKxB0J7ktS6eEY
-
NZ4/CtY/kLXjo9sWc6G2UtWAm+myXKsxETxFtp/RQ6LXMjS+3xbzGvkAoY/fzVMt
-
zLGdOV0X/paLb1jGl9CHkflq7qrpkdgqc6I5nmsOCRLHrsiVWLaCVCvu2T1fpjCh
-
tP+Mwdjv5ONXduoGUOxjCT8IVv7ceTt93S/9cZakpDIFJ38I1XymrjuFLfbhLMVK
-
VMfo9cLhWyz2/DAKA4gKnmagUhnYO2vdNBzzM9dg0/ysrLoX71ujEcxB0tx21pkE
-
eB3LEfFH94Izzn9crNJ1YMUFCpFayedN2uQjv89LN2oHx+mUKemXCdl+AV2sLP7P
-
pi4/UDjKOcIeK8cSvqJtsemjUn7QJdOamH4/IpgFh5o
-
-> ssh-ed25519 wpmdHA X+4vtGSjMeIuSearcEfYA8Mv5kmghhItcE1n5BPWLSo
-
uYkj1VkPXs8mJu99J4GFth6LyqhWymEH5fsN0+5TDsw
-
--- Ql8rRuZH0kS1eDQ9EYB7mW+GvcHtjXcW/Wu1ZGhjpKI
-
虌d0dj̭�ھ�f����� g�D�+�q��W��d������%5��1�?�U��)�tܫ��[
-
S�DV�+��U�".� q�i�,g{}#y�@���3O/M~��CЎBV�š� }�=����*#�7�?Q��
···
+2 -3
hosts/marvin/services/secrets/secrets.nix
···
"golink-authkey.age".publicKeys = marvinDefault;
"grafana-admin-password.age".publicKeys = marvinDefault;
"grafana-smtp-password.age".publicKeys = marvinDefault;
-
"iceshrimp-secret-config.age".publicKeys = marvinDefault;
-
"iceshrimp-db-password.age".publicKeys = marvinDefault;
"jellyfin-exporter-config.age".publicKeys = marvinDefault;
"minio-root.age".publicKeys = marvinDefault;
"miniflux-admin.age".publicKeys = marvinDefault;
"../nextcloud/nextcloud-admin-pw.age".publicKeys = marvinDefault;
"nix-serve-priv.age".publicKeys = marvinDefault;
"pinchflat-secrets.age".publicKeys = marvinDefault;
-
"pingvin-secrets.age".publicKeys = marvinDefault;
"planka-env.age".publicKeys = marvinDefault;
"pocket-id-secrets.age".publicKeys = marvinDefault;
"vaultwarden-vars.age".publicKeys = marvinDefault;
···
"golink-authkey.age".publicKeys = marvinDefault;
"grafana-admin-password.age".publicKeys = marvinDefault;
"grafana-smtp-password.age".publicKeys = marvinDefault;
+
"immich/oauth-secret.age".publicKeys = marvinDefault;
+
"immich/mail-pw.age".publicKeys = marvinDefault;
"jellyfin-exporter-config.age".publicKeys = marvinDefault;
"minio-root.age".publicKeys = marvinDefault;
"miniflux-admin.age".publicKeys = marvinDefault;
"../nextcloud/nextcloud-admin-pw.age".publicKeys = marvinDefault;
"nix-serve-priv.age".publicKeys = marvinDefault;
"pinchflat-secrets.age".publicKeys = marvinDefault;
"planka-env.age".publicKeys = marvinDefault;
"pocket-id-secrets.age".publicKeys = marvinDefault;
"vaultwarden-vars.age".publicKeys = marvinDefault;
+2 -23
hosts/marvin/services/vaultwarden.nix
···
rocketAddress = "0.0.0.0";
rocketCliColors = false;
rocketPort = d.port;
-
websocketEnabled = true;
-
ipHeader = "X-Real-IP";
reloadTemplates = false;
logTimestampFormat = "%Y-%m-%d %H:%M:%S.%3f";
# # Ratelimiting
···
# Logging
useSyslog = true;
-
logLevel = "info";
extendedLogging = true;
# Features
···
# Invitations
invitationsAllowed = true;
-
invitationOrgName = "PyroNet Vault";
invitationExpirationHours = 168;
# Database
···
# Signups
signupsAllowed = false;
signupsVerify = true;
-
signupsVerifyResendTime = 3600;
-
signupsVerifyResendLimit = 5;
signupsDomainWhitelist = "pyrox.dev";
# Passwords
···
# Mail
smtpFrom = "vault@pyrox.dev";
-
smtpFromName = "PyroNet Vault <vault@pyrox.dev>";
smtpUsername = "vault@pyrox.dev";
smtpSecurity = "force_tls";
smtpPort = 465;
···
smtpTimeout = 20;
smtpEmbedImages = true;
useSendmail = false;
-
smtpDebug = false;
-
smtpAcceptInvalidCerts = false;
-
smtpAcceptInvalidHostnames = false;
# Authentication
-
authenticatorDisableTimeDrift = false;
-
disable2faRemember = false;
incomplete2faTimeLimit = 5;
# # Email 2FA
-
emailAttemptsLimit = 3;
emailExpirationTime = 180;
emailTokenSize = 7;
requireDeviceEmail = true;
-
-
# Icons
-
disableIconDownload = false;
-
iconService = "internal";
-
iconRedirectCode = 302;
-
iconDownloadTimeout = 10;
-
iconBlacklistNonGlobalIps = true;
-
# # 30 Day TTL
-
iconCacheTtl = 30 * 24 * 60 * 60;
-
iconCacheNegttl = 30 * 24 * 60 * 60;
# Misc Settings
trashAutoDeleteDays = 14;
···
rocketAddress = "0.0.0.0";
rocketCliColors = false;
rocketPort = d.port;
reloadTemplates = false;
logTimestampFormat = "%Y-%m-%d %H:%M:%S.%3f";
# # Ratelimiting
···
# Logging
useSyslog = true;
extendedLogging = true;
# Features
···
# Invitations
invitationsAllowed = true;
+
invitationOrgName = "dishNet Vault";
invitationExpirationHours = 168;
# Database
···
# Signups
signupsAllowed = false;
signupsVerify = true;
signupsDomainWhitelist = "pyrox.dev";
# Passwords
···
# Mail
smtpFrom = "vault@pyrox.dev";
+
smtpFromName = "dishNet Vault <vault@pyrox.dev>";
smtpUsername = "vault@pyrox.dev";
smtpSecurity = "force_tls";
smtpPort = 465;
···
smtpTimeout = 20;
smtpEmbedImages = true;
useSendmail = false;
# Authentication
incomplete2faTimeLimit = 5;
# # Email 2FA
emailExpirationTime = 180;
emailTokenSize = 7;
requireDeviceEmail = true;
# Misc Settings
trashAutoDeleteDays = 14;
+7 -4
hosts/prefect/dn42/default.nix
···
{ pkgs, config, ... }:
let
-
cfg42 = config.networking.dn42;
in
{
imports = [
···
tcpdump
wireguard-tools
];
-
networking.dn42 = {
enable = true;
# ASN corresponding to DN42 PYRONET
as = 4242422459;
# Communities config
# https://dn42.dev/howto/BGP-communities
-
geo = 42;
country = 1840;
routerId = cfg42.addr.v4;
# Primary IP Addresses
···
v4 = [ "172.20.43.96/27" ];
v6 = [ "fd21:1500:66b0::/48" ];
};
-
# Enable StayRTR
# https://github.com/bgp/stayrtr
stayrtr.enable = true;
wg.tunnelDefaults = {
privateKeyFile = "/run/agenix/dn42-privkey";
localAddrs.v4 = cfg42.addr.v4;
···
{ pkgs, config, ... }:
let
+
cfg42 = config.dn42;
in
{
imports = [
···
tcpdump
wireguard-tools
];
+
dn42 = {
enable = true;
# ASN corresponding to DN42 PYRONET
as = 4242422459;
# Communities config
# https://dn42.dev/howto/BGP-communities
+
region = 42;
country = 1840;
routerId = cfg42.addr.v4;
# Primary IP Addresses
···
v4 = [ "172.20.43.96/27" ];
v6 = [ "fd21:1500:66b0::/48" ];
};
# Enable StayRTR
# https://github.com/bgp/stayrtr
stayrtr.enable = true;
+
# Peer with GRC
+
# https://dn42.dev/services/Route-Collector
+
collector.enable = true;
+
wg.tunnelDefaults = {
privateKeyFile = "/run/agenix/dn42-privkey";
localAddrs.v4 = cfg42.addr.v4;
+1 -1
hosts/prefect/dn42/peers/bandura.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.bandura = {
as = 4242422923;
addr.v6 = "fe80::2926";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.bandura = {
as = 4242422923;
addr.v6 = "fe80::2926";
+1 -1
hosts/prefect/dn42/peers/catgirls.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.catgirls = {
as = 4242421411;
addr.v6 = "fe80::2189:124";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.catgirls = {
as = 4242421411;
addr.v6 = "fe80::2189:124";
+1 -1
hosts/prefect/dn42/peers/chrismoos.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.chrismoos = {
as = 4242421588;
addr.v6 = "fe80::1588";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.chrismoos = {
as = 4242421588;
addr.v6 = "fe80::1588";
+1 -1
hosts/prefect/dn42/peers/darkpoint.nix
···
localv6 = "fe80::113";
in
{
-
config.networking.dn42 = {
peers.darkpoint = {
as = 4242420150;
addr.v6 = peerv6;
···
localv6 = "fe80::113";
in
{
+
config.dn42 = {
peers.darkpoint = {
as = 4242420150;
addr.v6 = peerv6;
+1
hosts/prefect/dn42/peers/default.nix
···
(import ./kioubit.nix { inherit dn42Types; })
(import ./lare.nix { inherit dn42Types; })
(import ./potato.nix { inherit dn42Types; })
(import ./routedbits.nix { inherit dn42Types; })
(import ./sunnet.nix { inherit dn42Types; })
(import ./uffsalot.nix { inherit dn42Types; })
···
(import ./kioubit.nix { inherit dn42Types; })
(import ./lare.nix { inherit dn42Types; })
(import ./potato.nix { inherit dn42Types; })
+
(import ./prefixlabs.nix { inherit dn42Types; })
(import ./routedbits.nix { inherit dn42Types; })
(import ./sunnet.nix { inherit dn42Types; })
(import ./uffsalot.nix { inherit dn42Types; })
+1 -1
hosts/prefect/dn42/peers/iedon.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.iedon = {
as = 4242422189;
addr.v6 = "fe80::2189:124";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.iedon = {
as = 4242422189;
addr.v6 = "fe80::2189:124";
+1 -1
hosts/prefect/dn42/peers/kioubit.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.kioubit = {
as = 4242423914;
addr.v6 = "fe80::ade0";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.kioubit = {
as = 4242423914;
addr.v6 = "fe80::ade0";
+1 -1
hosts/prefect/dn42/peers/lare.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.lare = {
as = 4242423035;
addr.v6 = "fe80::3035:137";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.lare = {
as = 4242423035;
addr.v6 = "fe80::3035:137";
+1 -1
hosts/prefect/dn42/peers/potato.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.potato = {
as = 4242421816;
addr.v6 = "fe80::1816";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.potato = {
as = 4242421816;
addr.v6 = "fe80::1816";
+26
hosts/prefect/dn42/peers/prefixlabs.nix
···
···
+
{ dn42Types, ... }:
+
{
+
config.dn42 = {
+
peers.prefixlabs = {
+
as = 4242421240;
+
addr.v6 = "fe80::1240:2";
+
interface = "wg42_prefixlabs";
+
extendedNextHop = true;
+
# My side
+
srcAddr.v6 = "fe80::240";
+
# Communities
+
crypto = dn42Types.crypto.safePFS;
+
latency = dn42Types.latency."7.3ms";
+
bandwidth = dn42Types.bandwidth."1000mb";
+
transit = true;
+
};
+
wg.tunnels.prefixlabs = {
+
listenPort = 43240;
+
peerPubKey = "uRYzFGi+/B6pD0FR2SW3G/OzC5LPJXePNIt0s+nJfW0=";
+
peerEndpoint = "us-01.prefixlabs.net:22459";
+
peerAddrs.v4 = "172.20.209.11";
+
peerAddrs.v6 = "fe80::1240:2";
+
localAddrs.v6 = "fe80::240";
+
};
+
};
+
}
+1 -1
hosts/prefect/dn42/peers/routedbits.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.routedbits = {
as = 4242420207;
addr.v6 = "fe80::207";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.routedbits = {
as = 4242420207;
addr.v6 = "fe80::207";
+1 -1
hosts/prefect/dn42/peers/sunnet.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.sunnet = {
as = 4242423088;
addr.v6 = "fe80::3088:193";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.sunnet = {
as = 4242423088;
addr.v6 = "fe80::3088:193";
+1 -1
hosts/prefect/dn42/peers/uffsalot.nix
···
{ dn42Types, ... }:
{
-
config.networking.dn42 = {
peers.uffsalot = {
as = 4242420780;
addr.v6 = "fe80::780";
···
{ dn42Types, ... }:
{
+
config.dn42 = {
peers.uffsalot = {
as = 4242420780;
addr.v6 = "fe80::780";
+8 -13
hosts/prefect/services/caddy.nix
···
# Authentication
${pns.pocket-id.extUrl} = {
extraConfig = ''
-
reverse_proxy / ${marvin}:${toString pns.pocket-id.port} {
-
header_up X-Real-IP {remote_host}
-
header_up X-Http-Version {http.request.proto}
-
}
'';
};
···
'';
};
-
# Pingvin Share
-
${pns.pingvin-share.extUrl} = {
extraConfig = ''
-
reverse_proxy /api/* ${marvin}:${toString pns.pingvin-share.be-anubis} {
-
header_up X-Real-IP {remote_host}
-
header_up X-Http-Version {http.request.proto}
-
}
-
reverse_proxy /* ${marvin}:${toString pns.pingvin-share.anubis} {
-
header_up X-Real-IP {remote_host}
-
header_up X-Http-Version {http.request.proto}
}
'';
};
# Tangled Services
${pns.tangled-knot.extUrl} = {
extraConfig = ''
···
# Authentication
${pns.pocket-id.extUrl} = {
extraConfig = ''
+
reverse_proxy ${marvin}:${toString pns.pocket-id.port}
'';
};
···
'';
};
+
# Immich
+
${pns.immich.extUrl} = {
extraConfig = ''
+
@public path /share /share/*
+
handle @public {
+
reverse_proxy ${marvin}:${toString pns.immich.pubProxy}
}
+
reverse_proxy ${marvin}:${toString pns.immich.port}
'';
};
+
# Tangled Services
${pns.tangled-knot.extUrl} = {
extraConfig = ''
+7
lib/data/services.toml
···
# anubis: What port the anubis service for this domain will use, int
# tsHost: (optional) What Tailscale host this service will run on, for services only available via Tailscale.
# # Should only be set if this is available externally, if at all, since TS-only services aren't able to be scraped.
[authentik]
port = 6908
host = "marvin"
···
port = 6923
host = "marvin"
extUrl = "soc.pyrox.dev"
[jellyfin]
port = 8096
···
# anubis: What port the anubis service for this domain will use, int
# tsHost: (optional) What Tailscale host this service will run on, for services only available via Tailscale.
# # Should only be set if this is available externally, if at all, since TS-only services aren't able to be scraped.
+
# Current lowest unassigned port: 6938
[authentik]
port = 6908
host = "marvin"
···
port = 6923
host = "marvin"
extUrl = "soc.pyrox.dev"
+
+
[immich]
+
port = 6936
+
host = "marvin"
+
extUrl = "img.pyrox.dev"
+
pubProxy = 6937
[jellyfin]
port = 8096
+1 -1
nixosModules/default-config/default.nix
···
./users.nix
];
system = {
-
stateVersion = "25.05";
disableInstallerTools = true;
tools.nixos-rebuild.enable = true;
};
···
./users.nix
];
system = {
+
stateVersion = "26.05";
disableInstallerTools = true;
tools.nixos-rebuild.enable = true;
};
+2 -4
nixosModules/default-config/nixConfig.nix
···
{
nix = {
enable = true;
-
# We use `nh.clean` instead, so this is disabled
-
gc.automatic = false;
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
settings = {
# Don't auto-accept flake-defined nix settings, they're a CVE waiting to happen.
···
keep-going = true;
# More direnv gc root stuff
keep-outputs = true;
-
# Show fewer log lines from failed builds since I get them from nh
-
log-lines = 10;
# Limit the max amount of builds
max-jobs = lib.mkDefault 4;
# Extra system features
···
{
nix = {
enable = true;
+
gc.automatic = true;
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
settings = {
# Don't auto-accept flake-defined nix settings, they're a CVE waiting to happen.
···
keep-going = true;
# More direnv gc root stuff
keep-outputs = true;
+
log-lines = 20;
# Limit the max amount of builds
max-jobs = lib.mkDefault 4;
# Extra system features
-1
nixosModules/default-config/programs/default.nix
···
{
imports = [
./ssh.nix
-
./nh.nix
];
programs.fish.enable = true;
}
···
{
imports = [
./ssh.nix
];
programs.fish.enable = true;
}
-7
nixosModules/default-config/programs/nh.nix
···
-
_: {
-
programs.nh = {
-
enable = true;
-
clean.enable = true;
-
clean.extraArgs = "-k 5";
-
};
-
}
···
+1 -1
nixosModules/homes/pyrox/default.nix
···
inputs.self.homeModules.allModules
{
home.username = "pyrox";
-
home.stateVersion = "25.11";
py.profiles.server.enable = lib.mkDefault true;
py.profiles.desktop.enable = lib.mkDefault false;
}
···
inputs.self.homeModules.allModules
{
home.username = "pyrox";
+
home.stateVersion = "26.05";
py.profiles.server.enable = lib.mkDefault true;
py.profiles.desktop.enable = lib.mkDefault false;
}
+1 -1
nixosModules/homes/thehedgehog/default.nix
···
inputs.self.homeModules.allModules
{
home.username = "thehedgehog";
-
home.stateVersion = "25.11";
py.profiles.server.enable = lib.mkDefault true;
py.profiles.desktop.enable = lib.mkDefault false;
}
···
inputs.self.homeModules.allModules
{
home.username = "thehedgehog";
+
home.stateVersion = "26.05";
py.profiles.server.enable = lib.mkDefault true;
py.profiles.desktop.enable = lib.mkDefault false;
}
-2
nixosModules/services/forgejo-runner/default.nix
···
};
cache = {
enabled = true;
-
dir = "/var/lib/forgejo/runners/cache/";
-
host = "";
port = 0;
};
container = {
···
};
cache = {
enabled = true;
port = 0;
};
container = {
+1 -1
packages/anubis-files/package.nix
···
buildPhase = ''
substituteInPlace policies/*.yaml \
-
--replace-fail "CUSTOM" $out/rules
'';
installPhase = ''
···
buildPhase = ''
substituteInPlace policies/*.yaml \
+
--replace-fail "CUSTOM" $out
'';
installPhase = ''
+56
packages/anubis-files/src/policies/default.yaml
···
···
+
bots:
+
- import: CUSTOM/policies/meta/base.yaml
+
dnsbl: false
+
openGraph:
+
enabled: true
+
considerHost: false
+
ttl: 24h
+
status_codes:
+
CHALLENGE: 200
+
DENY: 200
+
thresholds:
+
- name: minimal-suspicion
+
expression: weight <= 0
+
action: ALLOW
+
- name: mild-suspicion
+
expression:
+
all:
+
- weight > 0
+
- weight < 10
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
+
algorithm: metarefresh
+
difficulty: 1
+
report_as: 1
+
- name: moderate-suspicion
+
expression:
+
all:
+
- weight >= 10
+
- weight < 20
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 2 # two leading zeros, very fast for most clients
+
report_as: 2
+
- name: mild-proof-of-work
+
expression:
+
all:
+
- weight >= 20
+
- weight < 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 4
+
report_as: 4
+
# For clients that are browser like and have gained many points from custom rules
+
- name: extreme-suspicion
+
expression: weight >= 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 6
+
report_as: 5
+60 -6
packages/anubis-files/src/policies/forgejo.yaml
···
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
- import: (data)/clients/git.yaml
-
- import: (data)/common/keep-internet-working.yaml
- import: (data)/apps/gitea-rss-feeds.yaml
-
- import: (data)/crawlers/internet-archive.yaml
-
- import: (data)/crawlers/kagibot.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
dnsbl: false
···
bots:
+
- import: CUSTOM/policies/meta/base.yaml
- import: (data)/clients/git.yaml
- import: (data)/apps/gitea-rss-feeds.yaml
+
+
# Allow forgejo runner connections from localhost and tailscale
+
- name: forgejo-runner
+
user_agent_regex: connect-go
+
action: ALLOW
+
dnsbl: false
+
openGraph:
+
enabled: true
+
considerHost: false
+
ttl: 24h
+
status_codes:
+
CHALLENGE: 200
+
DENY: 200
+
thresholds:
+
- name: minimal-suspicion
+
expression: weight <= 0
+
action: ALLOW
+
- name: mild-suspicion
+
expression:
+
all:
+
- weight > 0
+
- weight < 10
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
+
algorithm: metarefresh
+
difficulty: 1
+
report_as: 1
+
- name: moderate-suspicion
+
expression:
+
all:
+
- weight >= 10
+
- weight < 20
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 2 # two leading zeros, very fast for most clients
+
report_as: 2
+
- name: mild-proof-of-work
+
expression:
+
all:
+
- weight >= 20
+
- weight < 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 4
+
report_as: 4
+
# For clients that are browser like and have gained many points from custom rules
+
- name: extreme-suspicion
+
expression: weight >= 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 6
+
report_as: 5
-6
packages/anubis-files/src/policies/grafana.yaml
···
-
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
-
dnsbl: false
···
+54
packages/anubis-files/src/policies/meta/base.yaml
···
···
+
# keep-sorted start
+
- import: (data)/bots/_deny-pathological.yaml
+
- import: (data)/bots/aggressive-brazilian-scrapers.yaml
+
- import: (data)/clients/x-firefox-ai.yaml
+
- import: (data)/common/keep-internet-working.yaml
+
- import: (data)/common/rfc-violations.yaml
+
- import: (data)/crawlers/_allow-good.yaml
+
- import: (data)/meta/ai-block-aggressive.yaml
+
# keep-sorted end
+
- name: realistic-browser-catchall
+
expression:
+
all:
+
- '"User-Agent" in headers'
+
- '( userAgent.contains("Firefox") ) || ( userAgent.contains("Chrome") ) || ( userAgent.contains("Safari") )'
+
- '"Accept" in headers'
+
- '"Sec-Fetch-Dest" in headers'
+
- '"Sec-Fetch-Mode" in headers'
+
- '"Sec-Fetch-Site" in headers'
+
- '"Accept-Encoding" in headers'
+
- '( headers["Accept-Encoding"].contains("zstd") || headers["Accept-Encoding"].contains("br") )'
+
- '"Accept-Language" in headers'
+
action: WEIGH
+
weight:
+
adjust: -10
+
# The Upgrade-Insecure-Requests header is typically sent by browsers, but not always
+
- name: upgrade-insecure-requests
+
expression: '"Upgrade-Insecure-Requests" in headers'
+
action: WEIGH
+
weight:
+
adjust: -2
+
# Chrome should behave like Chrome
+
- name: chrome-is-proper
+
expression:
+
all:
+
- userAgent.contains("Chrome")
+
- '"Sec-Ch-Ua" in headers'
+
- 'headers["Sec-Ch-Ua"].contains("Chromium")'
+
- '"Sec-Ch-Ua-Mobile" in headers'
+
- '"Sec-Ch-Ua-Platform" in headers'
+
action: WEIGH
+
weight:
+
adjust: -5
+
- name: should-have-accept
+
expression: '!("Accept" in headers)'
+
action: WEIGH
+
weight:
+
adjust: 5
+
# Generic catchall rule
+
- name: generic-browser
+
user_agent_regex: >-
+
Mozilla|Opera|Chrome|Chromium
+
action: WEIGH
+
weight:
+
adjust: 10
packages/anubis-files/src/policies/meta/openGraph.yaml

This is a binary file and will not be displayed.

-6
packages/anubis-files/src/policies/miniflux.yaml
···
-
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
-
dnsbl: false
···
+50 -4
packages/anubis-files/src/policies/nextcloud-office.yaml
···
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
# Allow requests from the nextcloud server to bypass checks
- name: allow-nextcloud-server
user_agent_regex: ^Nextcloud Server / richdocuments$
action: ALLOW
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
dnsbl: false
···
bots:
+
- import: CUSTOM/policies/meta/base.yaml
# Allow requests from the nextcloud server to bypass checks
- name: allow-nextcloud-server
user_agent_regex: ^Nextcloud Server / richdocuments$
action: ALLOW
dnsbl: false
+
status_codes:
+
CHALLENGE: 200
+
DENY: 200
+
thresholds:
+
- name: minimal-suspicion
+
expression: weight <= 0
+
action: ALLOW
+
- name: mild-suspicion
+
expression:
+
all:
+
- weight > 0
+
- weight < 10
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
+
algorithm: metarefresh
+
difficulty: 1
+
report_as: 1
+
- name: moderate-suspicion
+
expression:
+
all:
+
- weight >= 10
+
- weight < 20
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 2 # two leading zeros, very fast for most clients
+
report_as: 2
+
- name: mild-proof-of-work
+
expression:
+
all:
+
- weight >= 20
+
- weight < 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 4
+
report_as: 4
+
# For clients that are browser like and have gained many points from custom rules
+
- name: extreme-suspicion
+
expression: weight >= 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 6
+
report_as: 5
+54 -5
packages/anubis-files/src/policies/nextcloud.yaml
···
bots:
-
# Block scrapers and abusive cloud providers
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
# Allow android apps that I use
- name: allow-android-apps
user_agent_regex: Nextcloud-android|DAVx5|ICSx5
···
- 'path.startsWith("/apps/theming/")'
# Public DAV endpoint
- 'path.startsWith("/public.php/dav/files/")'
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
dnsbl: false
···
bots:
+
- import: CUSTOM/policies/meta/base.yaml
# Allow android apps that I use
- name: allow-android-apps
user_agent_regex: Nextcloud-android|DAVx5|ICSx5
···
- 'path.startsWith("/apps/theming/")'
# Public DAV endpoint
- 'path.startsWith("/public.php/dav/files/")'
dnsbl: false
+
openGraph:
+
enabled: true
+
considerHost: false
+
ttl: 24h
+
status_codes:
+
CHALLENGE: 200
+
DENY: 200
+
thresholds:
+
- name: minimal-suspicion
+
expression: weight <= 0
+
action: ALLOW
+
- name: mild-suspicion
+
expression:
+
all:
+
- weight > 0
+
- weight < 10
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
+
algorithm: metarefresh
+
difficulty: 1
+
report_as: 1
+
- name: moderate-suspicion
+
expression:
+
all:
+
- weight >= 10
+
- weight < 20
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 2 # two leading zeros, very fast for most clients
+
report_as: 2
+
- name: mild-proof-of-work
+
expression:
+
all:
+
- weight >= 20
+
- weight < 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 4
+
report_as: 4
+
# For clients that are browser like and have gained many points from custom rules
+
- name: extreme-suspicion
+
expression: weight >= 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 6
+
report_as: 5
-6
packages/anubis-files/src/policies/pingvin-share.yaml
···
-
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
-
dnsbl: false
···
-6
packages/anubis-files/src/policies/planka.yaml
···
-
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
-
dnsbl: false
···
-6
packages/anubis-files/src/policies/pocket-id.yaml
···
-
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
-
dnsbl: false
···
+54 -4
packages/anubis-files/src/policies/vaultwarden.yaml
···
bots:
-
- import: (data)/bots/ai-robots-txt.yaml
-
- import: CUSTOM/block/alibaba-cloud.yaml
# Allow bitwarden apps
- name: allow-bitwarden-mobile
user_agent_regex: Bitwarden_Mobile
···
- name: allow-bitwarden-webext
user_agent_regex: Mozilla
action: ALLOW
-
- import: (data)/common/keep-internet-working.yaml
-
- import: CUSTOM/challenge/generic-browser.yaml
dnsbl: false
···
bots:
+
- import: CUSTOM/policies/meta/base.yaml
# Allow bitwarden apps
- name: allow-bitwarden-mobile
user_agent_regex: Bitwarden_Mobile
···
- name: allow-bitwarden-webext
user_agent_regex: Mozilla
action: ALLOW
dnsbl: false
+
openGraph:
+
enabled: true
+
considerHost: false
+
ttl: 24h
+
status_codes:
+
CHALLENGE: 200
+
DENY: 200
+
thresholds:
+
- name: minimal-suspicion
+
expression: weight <= 0
+
action: ALLOW
+
- name: mild-suspicion
+
expression:
+
all:
+
- weight > 0
+
- weight < 10
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
+
algorithm: metarefresh
+
difficulty: 1
+
report_as: 1
+
- name: moderate-suspicion
+
expression:
+
all:
+
- weight >= 10
+
- weight < 20
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 2 # two leading zeros, very fast for most clients
+
report_as: 2
+
- name: mild-proof-of-work
+
expression:
+
all:
+
- weight >= 20
+
- weight < 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 4
+
report_as: 4
+
# For clients that are browser like and have gained many points from custom rules
+
- name: extreme-suspicion
+
expression: weight >= 30
+
action: CHALLENGE
+
challenge:
+
# https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
+
algorithm: fast
+
difficulty: 6
+
report_as: 5
-3
packages/anubis-files/src/rules/block/alibaba-cloud.yaml
···
-
- name: alibaba-cloud
-
action: DENY
-
remote_addresses: ["45.196.28.0/24", "161.117.128.0/17", "8.209.42.0/23", "47.89.125.0/24", "8.222.48.0/20", "47.79.16.0/21", "149.129.16.0/23", "8.212.0.0/17", "47.89.0.0/19", "47.240.128.0/17", "8.213.176.0/20", "47.77.8.0/22", "47.79.96.0/19", "47.246.198.0/23", "47.91.128.0/17", "47.89.104.0/21", "47.89.102.0/24", "8.222.96.0/19", "170.33.31.0/24", "8.215.168.0/24", "8.222.40.0/21", "47.235.1.0/24", "240b:400f::/32", "170.33.32.0/24", "8.208.0.0/18", "47.79.24.0/21", "47.91.16.0/20", "47.252.0.0/17", "8.213.176.0/21", "8.212.0.0/18", "8.211.192.0/18", "47.79.54.0/23", "47.235.18.0/24", "47.88.0.0/17", "43.96.21.0/24", "47.235.22.0/24", "240b:4001::/33", "47.79.64.0/20", "139.95.4.0/23", "47.254.128.0/19", "47.81.64.0/18", "47.77.128.0/18", "240b:4009::/33", "47.246.90.0/23", "47.89.32.0/19", "205.204.125.0/24", "47.79.56.0/23", "240b:400c:100::/41", "47.235.26.0/23", "8.209.64.0/19", "8.222.16.0/20", "47.235.12.0/23", "116.251.64.0/18", "139.95.64.0/24", "47.235.31.0/24", "8.208.32.0/19", "240b:400c:f00::/48", "47.235.6.0/24", "47.246.160.0/21", "47.246.196.0/22", "2404:2280:3000::/37", "47.74.0.0/21", "240b:4007:8000::/33", "47.91.0.0/20", "2400:3200:baba::/48", "198.11.137.0/24", "47.84.168.0/21", "240b:4006:1020::/44", "149.129.192.0/18", "8.219.40.0/21", "43.96.3.0/24", "240b:4004::/32", "47.77.64.0/20", "47.83.48.0/21", "47.77.104.0/21", "240b:4001:8000::/33", "43.96.5.0/24", "240b:400c:180::/41", "43.96.25.0/24", "47.77.96.0/21", "8.211.160.0/19", "47.245.32.0/19", "8.215.0.0/16", "47.79.32.0/20", "8.213.160.0/21", "47.74.0.0/19", "43.96.4.0/24", "170.33.75.0/24", "8.211.128.0/18", "8.217.0.0/16", "47.81.0.0/19", "47.82.96.0/19", "47.83.56.0/21", "203.107.64.0/24", "240b:4006:1020::/45", "240b:4004::/33", "47.242.0.0/15", "47.80.128.0/17", "8.215.0.0/17", "240b:4000::/32", "47.246.192.0/23", "47.246.176.0/21", "8.212.224.0/19", "47.90.0.0/17", "170.33.107.0/24", "47.237.32.0/20", "47.240.0.0/16", "47.253.0.0/16", "161.117.0.0/16", "47.77.12.0/22", "47.88.128.0/17", "8.220.147.0/24", "47.236.0.0/16", "149.129.192.0/19", "170.33.73.0/24", "47.87.160.0/19", "47.79.0.0/20", "47.246.153.0/24", "47.235.29.0/24", "47.81.128.0/18", "43.96.35.0/24", "8.212.128.0/18", "8.219.0.0/16", "47.246.155.0/24", "8.216.64.0/18", "8.213.253.0/24", "8.220.116.0/24", "8.222.128.0/18", "240b:400e:8000::/33", "43.96.33.0/24", "47.77.192.0/18", "47.81.32.0/19", "47.77.8.0/21", "47.79.16.0/20", "240b:400f:8000::/33", "47.246.145.0/24", "47.88.128.0/18", "170.33.104.0/24", "8.219.0.0/17", "47.82.0.0/18", "139.95.10.0/23", "47.238.0.0/16", "240b:4006:1002::/47", "8.221.188.0/22", "8.213.251.0/24", "47.254.192.0/19", "47.79.32.0/21", "8.212.128.0/19", "47.246.83.0/24", "47.87.64.0/19", "8.222.192.0/18", "170.33.68.0/24", "240b:400c:f01::/48", "170.33.136.0/24", "2400:b200:4101::/48", "2401:8680:4100::/48", "240b:400c::/32", "47.89.92.0/22", "8.223.128.0/18", "47.89.124.0/23", "47.74.32.0/19", "47.244.0.0/17", "43.96.80.0/24", "8.211.104.0/21", "8.213.224.0/19", "47.86.0.0/17", "8.222.64.0/21", "240b:400e::/33", "161.117.143.0/24", "47.246.152.0/23", "47.246.93.0/24", "240b:4006:1010::/45", "47.254.224.0/19", "8.209.40.0/22", "149.129.64.0/18", "43.96.20.0/24", "240b:4000:8000::/33", "47.251.0.0/16", "240b:4002::/32", "8.222.16.0/21", "203.107.66.0/24", "8.222.24.0/21", "47.89.128.0/19", "240b:400c:8000::/33", "8.218.128.0/17", "8.216.128.0/17", "47.91.128.0/18", "8.221.64.0/18", "2404:2280:4000::/36", "8.211.80.0/21", "8.217.128.0/17", "8.220.229.0/24", "170.33.66.0/24", "47.237.0.0/16", "47.235.28.0/23", "170.33.74.0/24", "47.90.64.0/18", "47.246.82.0/23", "8.209.38.0/23", "240b:4005:8000::/33", "8.220.128.0/18", "139.95.14.0/23", "8.216.192.0/18", "8.218.0.0/16", "47.91.192.0/18", "8.221.48.0/21", "149.129.8.0/21", "43.91.0.0/16", "8.223.64.0/18", "8.216.148.0/24", "8.222.80.0/21", "2401:b180:4100::/48", "47.91.0.0/19", "47.246.154.0/24", "47.246.152.0/24", "47.250.64.0/18", "8.216.128.0/18", "170.33.72.0/24", "139.95.12.0/23", "240b:400c::/40", "8.221.128.0/18", "43.96.32.0/24", "47.90.128.0/17", "47.251.0.0/17", "43.96.34.0/24", "47.245.0.0/18", "47.85.112.0/23", "8.209.56.0/21", "8.213.252.0/24", "47.77.128.0/17", "139.95.2.0/23", "43.96.69.0/24", "161.117.126.0/24", "47.75.0.0/16", "47.89.82.0/23", "47.89.224.0/19", "8.209.0.0/20", "47.246.128.0/22", "8.221.0.0/21", "139.95.8.0/23", "47.253.128.0/17", "156.236.12.0/24", "203.107.65.0/24", "47.241.128.0/17", "8.222.88.0/21", "47.87.128.0/18", "47.254.128.0/18", "8.221.192.0/18", "240b:4001::/32", "47.235.16.0/24", "240b:4007::/32", "47.235.13.0/24", "47.235.24.0/23", "47.91.80.0/20", "43.96.11.0/24", "47.235.5.0/24", "8.209.160.0/19", "47.246.88.0/23", "47.77.4.0/22", "156.236.17.0/24", "8.209.224.0/19", "14.1.115.0/24", "149.129.96.0/19", "47.254.192.0/18", "47.245.192.0/18", "8.208.0.0/16", "47.83.0.0/16", "47.87.96.0/19", "47.252.64.0/18", "47.89.192.0/18", "47.89.122.0/24", "47.85.114.0/23", "2404:2280:1000::/36", "47.81.128.0/17", "47.246.147.0/24", "47.87.64.0/18", "47.235.9.0/24", "47.52.0.0/17", "47.246.156.0/22", "47.246.96.0/22", "47.74.0.0/18", "8.214.0.0/17", "47.246.192.0/22", "47.246.150.0/24", "43.91.0.0/17", "170.33.138.0/24", "8.213.0.0/18", "47.90.192.0/18", "47.85.0.0/16", "47.235.24.0/22", "47.235.16.0/23", "47.85.128.0/17", "103.81.186.0/23", "8.221.0.0/18", "43.96.7.0/24", "47.79.56.0/21", "240b:4013::/32", "47.89.108.0/22", "47.235.28.0/24", "47.246.82.0/24", "47.91.48.0/20", "185.78.106.0/23", "47.84.160.0/21", "140.205.1.0/24", "47.88.43.0/24", "47.83.32.0/21", "47.91.64.0/19", "43.96.100.0/24", "43.96.72.0/24", "47.87.0.0/18", "8.210.0.0/16", "47.88.192.0/18", "47.88.42.0/24", "170.33.92.0/24", "149.129.32.0/19", "47.52.128.0/17", "47.246.108.0/22", "8.221.56.0/21", "47.253.0.0/17", "110.76.23.0/24", "170.33.65.0/24", "240b:4006::/48", "47.245.0.0/19", "47.77.64.0/19", "8.209.39.0/24", "47.77.96.0/20", "47.80.128.0/18", "170.33.83.0/24", "47.77.32.0/19", "8.212.64.0/18", "43.96.40.0/24", "2400:b200:4102::/48", "43.96.81.0/24", "8.214.0.0/16", "161.117.128.0/24", "43.96.75.0/24", "8.215.160.0/24", "47.77.0.0/22", "47.239.0.0/16", "47.89.76.0/22", "47.82.14.0/23", "43.91.128.0/17", "47.89.88.0/22", "47.79.8.0/21", "240b:4004:8000::/33", "47.246.140.0/22", "43.96.74.0/24", "161.117.127.0/24", "8.212.192.0/19", "240b:4006:1000::/44", "47.80.192.0/18", "47.79.48.0/21", "47.254.64.0/18", "47.246.144.0/23", "47.246.92.0/24", "47.246.66.0/24", "47.246.150.0/23", "47.91.96.0/20", "47.89.98.0/23", "47.77.80.0/20", "8.210.240.0/24", "8.213.0.0/17", "47.250.99.0/24", "47.88.41.0/24", "47.80.32.0/19", "47.250.0.0/17", "43.96.8.0/24", "14.1.112.0/22", "240b:4006:1008::/45", "8.211.224.0/19", "47.84.144.0/21", "47.88.109.0/24", "2400:3200::/48", "47.56.0.0/16", "8.220.192.0/18", "8.223.0.0/17", "8.222.72.0/21", "47.246.69.0/24", "240b:4002:8000::/33", "43.96.66.0/24", "47.246.92.0/23", "47.246.136.0/22", "205.204.117.0/24", "8.222.80.0/20", "47.85.112.0/22", "47.79.128.0/19", "240b:400d:8000::/33", "170.33.64.0/24", "8.222.56.0/21", "240b:400d::/33", "8.222.64.0/20", "47.75.128.0/17", "8.209.48.0/21", "47.57.0.0/16", "139.95.0.0/23", "47.79.192.0/18", "170.33.30.0/24", "47.77.152.0/21", "8.212.192.0/18", "8.213.128.0/19", "47.77.6.0/23", "47.246.32.0/22", "140.205.122.0/24", "47.244.0.0/16", "47.246.158.0/23", "8.209.192.0/19", "170.33.77.0/24", "8.216.69.0/24", "8.213.192.0/19", "47.77.16.0/22", "47.235.10.0/24", "202.144.199.0/24", "47.254.0.0/17", "43.98.128.0/17", "240b:400c::/41", "47.250.128.0/17", "47.89.101.0/24", "47.90.128.0/18", "240b:4013:8000::/33", "8.209.44.0/23", "240b:400c:80::/41", "161.117.129.0/24", "47.91.64.0/20", "8.209.36.0/24", "8.221.8.0/21", "47.82.32.0/19", "47.77.4.0/23", "47.79.72.0/21", "8.212.160.0/19", "170.33.80.0/24", "47.246.156.0/23", "8.220.192.0/19", "47.246.68.0/24", "47.254.160.0/19", "47.82.56.0/21", "8.223.128.0/17", "47.74.128.0/18", "47.77.24.0/23", "170.33.93.0/24", "47.89.72.0/23", "47.84.152.0/21", "240b:400e::/32", "149.129.224.0/19", "2400:b200:4103::/48", "47.87.32.0/19", "47.86.0.0/16", "47.235.4.0/24", "139.95.6.0/23", "47.252.67.0/24", "47.246.123.0/24", "47.81.96.0/19", "43.96.10.0/24", "8.223.0.0/18", "240b:4005::/32", "47.246.130.0/23", "47.91.96.0/19", "240b:400b::/33", "47.246.132.0/23", "8.213.184.0/21", "47.246.124.0/24", "8.209.64.0/18", "2404:2280:3000::/36", "47.89.78.0/23", "47.250.128.0/18", "47.79.128.0/20", "240b:4011::/33", "47.244.128.0/17", "47.246.151.0/24", "8.211.226.0/24", "47.88.135.0/24", "47.80.0.0/18", "43.96.88.0/24", "47.235.6.0/23", "205.204.111.0/24", "240b:4006:1000::/45", "47.250.0.0/18", "47.89.76.0/23", "47.89.99.0/24", "8.211.0.0/17", "47.89.123.0/24", "8.209.128.0/19", "47.246.160.0/20", "43.99.0.0/16", "47.236.0.0/15", "240b:400e:fffe::/48", "47.80.96.0/19", "47.246.184.0/21", "47.235.8.0/24", "8.222.48.0/21", "47.89.94.0/23", "47.245.64.0/18", "47.77.128.0/21", "47.74.192.0/18", "2404:2280:4000::/37", "8.211.88.0/21", "8.213.192.0/18", "8.223.192.0/18", "240b:4002::/33", "149.129.64.0/19", "47.241.0.0/16", "240b:4006:1018::/45", "8.216.0.0/17", "149.129.0.0/21", "47.254.0.0/18", "8.220.64.0/18", "43.96.22.0/24", "170.33.33.0/24", "47.91.32.0/19", "47.246.76.0/22", "47.246.68.0/23", "47.246.146.0/23", "47.254.113.0/24", "47.89.128.0/18", "47.77.144.0/21", "47.89.104.0/22", "8.211.96.0/21", "47.80.0.0/19", "47.246.104.0/22", "47.80.64.0/18", "161.117.0.0/17", "170.33.88.0/24", "47.77.2.0/23", "47.241.0.0/17", "47.79.224.0/19", "170.33.105.0/24", "47.82.12.0/23", "47.246.146.0/24", "8.213.144.0/20", "43.99.0.0/17", "47.89.88.0/23", "8.220.64.0/19", "47.89.90.0/23", "47.235.19.0/24", "8.215.128.0/17", "47.235.21.0/24", "47.81.192.0/18", "8.211.0.0/18", "47.246.72.0/22", "8.211.64.0/18", "203.107.68.0/24", "59.82.136.0/23", "8.209.44.0/22", "8.209.36.0/23", "47.89.0.0/18", "8.216.0.0/18", "47.246.104.0/21", "240b:400b::/32", "47.246.72.0/21", "8.214.128.0/17", "8.209.48.0/20", "170.33.86.0/24", "110.76.21.0/24", "8.209.128.0/18", "8.222.96.0/20", "47.89.100.0/24", "47.89.192.0/19", "8.213.128.0/20", "2400:b200:4100::/48", "8.208.0.0/17", "170.33.90.0/24", "47.83.0.0/17", "240b:400c:100::/40", "170.33.82.0/24", "8.222.32.0/21", "47.246.86.0/23", "47.52.0.0/16", "47.79.192.0/19", "2404:2280:1800::/37", "8.222.112.0/20", "170.33.24.0/24", "47.89.92.0/23", "47.78.0.0/17", "47.84.0.0/16", "240b:400b:8000::/33", "8.209.38.0/24", "47.235.7.0/24", "47.235.23.0/24", "47.237.34.0/24", "47.79.144.0/20", "43.96.71.0/24", "5.181.224.0/23", "47.246.88.0/22", "47.246.96.0/21", "47.82.0.0/19", "8.209.40.0/23", "47.77.48.0/20", "8.209.16.0/20", "240b:4009::/32", "47.246.176.0/20", "47.250.192.0/18", "47.246.168.0/21", "47.89.160.0/19", "8.222.32.0/20", "223.5.5.0/24", "47.81.0.0/18", "47.89.96.0/24", "47.77.0.0/23", "43.96.24.0/24", "8.221.128.0/17", "47.246.144.0/24", "47.246.125.0/24", "240b:400e:ffff::/48", "47.84.0.0/17", "170.33.106.0/24", "156.227.20.0/24", "170.33.35.0/24", "240b:4006:1028::/45", "170.33.78.0/24", "198.11.128.0/18", "8.210.0.0/17", "47.83.40.0/21", "47.89.80.0/23", "43.98.0.0/16", "47.88.0.0/18", "47.89.74.0/23", "43.96.67.0/24", "47.79.48.0/20", "2404:2280:3800::/37", "47.235.11.0/24", "8.220.160.0/19", "43.96.84.0/24", "8.221.208.0/21", "139.95.18.0/23", "47.246.84.0/22", "47.77.16.0/21", "170.33.69.0/24", "47.78.128.0/17", "8.220.96.0/19", "8.209.0.0/19", "240b:400d::/32", "205.204.102.0/23", "47.87.128.0/19", "47.83.128.0/17", "8.218.0.0/17", "47.235.10.0/23", "8.208.128.0/17", "170.33.137.0/24", "8.209.37.0/24", "8.220.128.0/19", "47.79.112.0/20", "47.243.0.0/16", "47.246.196.0/23", "170.33.79.0/24", "47.252.0.0/18", "47.87.0.0/19", "2404:2280:2000::/36", "47.79.58.0/23", "170.33.34.0/24", "47.246.132.0/22", "240b:4012::/48", "47.91.112.0/20", "47.77.32.0/20", "240b:4005::/33", "8.222.8.0/21", "47.246.194.0/23", "2404:2280:1000::/37", "8.221.200.0/21", "43.96.23.0/24", "47.82.64.0/18", "147.139.128.0/17", "8.211.192.0/19", "47.251.128.0/17", "240b:4011::/32", "8.222.0.0/20", "47.235.12.0/24", "43.99.128.0/17", "47.246.80.0/24", "47.246.67.0/24", "47.246.122.0/24", "156.245.1.0/24", "8.210.128.0/17", "8.213.64.0/18", "45.199.179.0/24", "47.235.0.0/22", "47.246.136.0/21", "8.213.164.0/22", "8.209.192.0/18", "47.77.24.0/22", "47.82.64.0/19", "47.244.73.0/24", "47.89.72.0/22", "47.76.128.0/17", "47.76.0.0/16", "47.245.128.0/17", "47.75.0.0/17", "47.245.96.0/19", "47.235.20.0/24", "47.79.52.0/23", "47.79.80.0/20", "47.82.32.0/21", "47.251.224.0/22", "47.74.128.0/17", "223.6.6.0/24", "47.246.128.0/23", "147.139.128.0/18", "47.246.84.0/23", "240b:4007::/33", "170.33.85.0/24", "43.96.102.0/24", "43.98.0.0/17", "203.107.67.0/24", "8.222.0.0/21", "2404:2280:2800::/37", "43.96.101.0/24", "170.33.84.0/24", "8.219.128.0/17", "47.80.64.0/19", "43.96.85.0/24", "43.96.96.0/24", "43.96.73.0/24", "47.246.100.0/22", "47.79.60.0/23", "47.77.26.0/23", "8.222.128.0/17", "161.117.138.0/24", "47.235.18.0/23", "47.235.0.0/23", "240b:4006:1010::/44", "47.76.0.0/17", "8.221.216.0/21", "47.82.8.0/23", "2404:2280:4800::/37", "170.33.29.0/24", "47.245.128.0/18", "47.79.80.0/21", "47.89.221.0/24", "198.11.184.0/21", "240b:4009:8000::/33", "8.215.162.0/23", "8.211.128.0/19", "47.79.83.0/24", "2408:4009:500::/48", "47.81.64.0/19", "8.208.0.0/19", "47.240.0.0/17", "47.79.64.0/21", "47.90.0.0/18", "43.96.70.0/24", "149.129.0.0/20", "240b:400c::/33", "2408:4000:1000::/48", "170.33.76.0/24", "205.204.96.0/19", "47.88.64.0/18", "8.209.96.0/19", "47.79.104.0/21", "47.82.10.0/23", "47.79.88.0/21", "47.245.64.0/19", "139.95.16.0/23", "47.77.20.0/22", "240b:400f::/33", "47.235.2.0/23", "8.221.0.0/17", "8.213.160.0/22", "8.215.169.0/24", "170.33.81.0/24", "47.89.124.0/24", "47.235.30.0/24", "47.79.62.0/23", "43.96.68.0/24", "47.246.120.0/24", "8.221.192.0/21", "8.221.184.0/22", "47.77.136.0/21", "8.220.224.0/19", "156.240.76.0/23", "8.208.141.0/24", "2404:2280:2000::/37", "47.84.128.0/17", "47.85.0.0/17", "8.217.0.0/17", "47.89.84.0/24", "47.238.0.0/15", "47.86.128.0/17", "240b:4011:8000::/33", "240b:4006:1000::/47", "47.246.134.0/23", "47.79.96.0/20", "47.79.0.0/21", "47.89.103.0/24", "47.89.97.0/24", "240b:4000::/33", "47.242.0.0/16", "47.56.0.0/15", "47.91.32.0/20", "147.139.192.0/18", "240b:4013::/33", "47.79.40.0/21", "8.209.46.0/23", "47.82.48.0/21", "47.82.40.0/21", "47.87.192.0/22", "47.87.192.0/23", "47.87.194.0/23", "47.87.196.0/22", "47.87.196.0/23", "47.87.198.0/23", "240b:400c:ffff::/48", "47.87.208.0/23", "47.87.210.0/23", "47.87.208.0/22", "47.87.222.0/23", "47.87.216.0/23", "47.87.200.0/23", "47.87.220.0/23", "47.87.216.0/22", "47.87.224.0/22", "47.87.204.0/22", "47.87.212.0/23", "47.87.226.0/23", "47.87.200.0/22", "47.87.206.0/23", "43.100.0.0/16", "47.87.212.0/22", "47.87.218.0/23", "47.87.214.0/23", "43.100.0.0/15", "47.87.204.0/23", "47.87.220.0/22", "43.101.0.0/16", "47.87.224.0/23", "47.87.202.0/23"]
···
-4
packages/anubis-files/src/rules/challenge/generic-browser.yaml
···
-
- name: generic-browser
-
user_agent_regex: >-
-
Mozilla|Opera
-
action: CHALLENGE
···
+26
packages/bgutil-pot-server/librusty_v8.nix
···
···
+
# COPIED FROM nixpkgs/pkgs/by-name/router
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
}:
+
+
let
+
fetch_librusty_v8 =
+
args:
+
fetchurl {
+
name = "librusty_v8-${args.version}";
+
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a";
+
sha256 = args.shas.${stdenv.hostPlatform.system};
+
meta = {
+
inherit (args) version;
+
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+
};
+
};
+
in
+
fetch_librusty_v8 {
+
version = "130.0.7";
+
shas = {
+
x86_64-linux = "sha256-pkdsuU6bAkcIHEZUJOt5PXdzK424CEgTLXjLtQ80t10=";
+
};
+
}
+49
packages/bgutil-pot-server/package.nix
···
···
+
{
+
lib,
+
callPackage,
+
rustPlatform,
+
fetchFromGitHub,
+
pkg-config,
+
openssl,
+
_experimental-update-script-combinators,
+
nix-update-script,
+
}:
+
rustPlatform.buildRustPackage (finalAttrs: {
+
pname = "bgutil-pot-server";
+
version = "0.6.0";
+
+
src = fetchFromGitHub {
+
owner = "jim60105";
+
repo = "bgutil-ytdlp-pot-provider-rs";
+
tag = "v${finalAttrs.version}";
+
hash = "sha256-kEu5WqOymH8yAyMhGKtVPOq3qlTRpFU/FO71uWEX/e8=";
+
};
+
+
cargoHash = "sha256-fJZeyIsFUfpWeC1MWsU1hANb6cqC9xHQOnhcohEMTeM=";
+
+
nativeBuildInputs = [
+
pkg-config
+
];
+
+
buildInputs = [
+
openssl
+
];
+
+
env.RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
+
+
doCheck = false;
+
+
passthru.updateScript = _experimental-update-script-combinators.sequence [
+
(nix-update-script { })
+
./update-librusty.sh
+
];
+
+
meta = {
+
changelog = "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/releases/tag/v${finalAttrs.version}";
+
description = "Proof-of-origin token provider plugin for yt-dlp in Rust";
+
homepage = "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs";
+
license = lib.licenses.gpl3Plus;
+
maintainers = with lib.maintainers; [ pyrox0 ];
+
mainProgram = "bgutil-pot";
+
};
+
})
+45
packages/bgutil-pot-server/update-librusty.sh
···
···
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p gnugrep gnused nix jq
+
# shellcheck shell=bash
+
# COPIED FROM nixpkgs/pkgs/by-name/wi/windmill
+
+
set -eu -o pipefail
+
+
echo "librusty_v8: UPDATING"
+
+
BGUTIL_LATEST_VERSION=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://api.github.com/repos/jim60105/bgutil-ytdlp-pot-provider-rs/releases/latest" | jq --raw-output .tag_name)
+
CARGO_LOCK=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/raw/$BGUTIL_LATEST_VERSION/Cargo.lock")
+
+
PACKAGE_DIR=$(dirname "$(readlink --canonicalize-existing "${BASH_SOURCE[0]}")")
+
OUTPUT_FILE="$PACKAGE_DIR/librusty_v8.nix"
+
NEW_VERSION=$(echo "$CARGO_LOCK" | grep --after-context 5 'name = "v8"' | grep 'version =' | sed -E 's/version = "//;s/"//')
+
+
CURRENT_VERSION=""
+
if [ -f "$OUTPUT_FILE" ]; then
+
CURRENT_VERSION="$(grep 'version =' "$OUTPUT_FILE" | sed -E 's/version = "//;s/"//')"
+
fi
+
+
if [ "$CURRENT_VERSION" == "$NEW_VERSION" ]; then
+
echo "No update needed, $CURRENT_VERSION is already latest"
+
exit 0
+
fi
+
+
x86Hash="$(nix-prefetch-url --type sha256 https://github.com/denoland/rusty_v8/releases/download/v"$NEW_V")"
+
TEMP_FILE="$OUTPUT_FILE.tmp"
+
cat >"$TEMP_FILE" <<EOF
+
# COPIED FROM nixpkgs/pkgs/by-name/wi/windmill
+
# auto-generated file -- DO NOT EDIT!
+
{ fetchLibrustyV8 }:
+
+
fetchLibrustyV8 {
+
version = "$NEW_VERSION";
+
shas = {
+
# NOTE; Follows supported platforms of package (see meta.platforms attribute)!
+
x86_64-linux = "$(nix hash convert --hash-algo sha256 --from nix32 "$x86Hash")";
+
};
+
}
+
EOF
+
+
mv "$TEMP_FILE" "$OUTPUT_FILE"
+
+
echo "librusty_v8: UPDATE DONE"
+6 -6
packages/glide-browser-bin/package.nix
···
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glide-browser";
-
version = "0.1.54a";
src = fetchurl {
url = "https://github.com/glide-browser/glide/releases/download/${finalAttrs.version}/glide.linux-x86_64.tar.xz";
-
hash = "sha256-Rw85b+9eaiM9szWpYZiF7FqJY7OpliOwt09/c8UWlGk=";
};
nativeBuildInputs = [
···
buildInputs = [
# keep-sorted start
-
gtk3
adwaita-icon-theme
-
hicolor-icon-theme
alsa-lib
dbus-glib
libXtst
# keep-sorted end
];
···
runtimeDependencies = [
# keep-sorted start
curl
-
pciutils
libva.out
# keep-sorted end
];
···
for i in 16 32 48 64 128; do
iconSizeDir="$iconDir/''${i}x$i/apps"
mkdir -p $iconSizeDir
-
cp $browserIcons/default$i.png $iconSizeDir/glide-brower.png
done
···
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glide-browser";
+
version = "0.1.55a";
src = fetchurl {
url = "https://github.com/glide-browser/glide/releases/download/${finalAttrs.version}/glide.linux-x86_64.tar.xz";
+
hash = "sha256-mjk8KmB/T5ZpB9AMQw1mtb9VbMXVX2VV4N+hWpWkSYI=";
};
nativeBuildInputs = [
···
buildInputs = [
# keep-sorted start
adwaita-icon-theme
alsa-lib
dbus-glib
+
gtk3
+
hicolor-icon-theme
libXtst
# keep-sorted end
];
···
runtimeDependencies = [
# keep-sorted start
curl
libva.out
+
pciutils
# keep-sorted end
];
···
for i in 16 32 48 64 128; do
iconSizeDir="$iconDir/''${i}x$i/apps"
mkdir -p $iconSizeDir
+
cp $browserIcons/default$i.png $iconSizeDir/glide-browser.png
done
+4 -1
packages/planka/package.nix
···
in
stdenv.mkDerivation (finalAttrs: {
pname = "planka";
-
inherit version src meta;
sourceRoot = "${finalAttrs.src.name}/server";
···
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--version=unstable" ]; };
})
···
in
stdenv.mkDerivation (finalAttrs: {
pname = "planka";
+
inherit version src;
sourceRoot = "${finalAttrs.src.name}/server";
···
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--version=unstable" ]; };
+
meta = meta // {
+
mainProgram = "planka";
+
};
})