mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 12:20:04 +00:00
feat(service): add Bluesky PDS
This commit is contained in:
parent
1c394ad2e3
commit
66c86213d9
2 changed files with 87 additions and 0 deletions
44
modules/nixos/services/bluesky/pds/default.nix
Normal file
44
modules/nixos/services/bluesky/pds/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
namespace,
|
||||
config,
|
||||
host,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.services.bluesky.pds;
|
||||
in {
|
||||
options.${namespace}.services.bluesky.pds = {
|
||||
enable = mkEnableOption "Enable the Bluesky PDS, your own ATproto home!";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
sops.secrets.bluesky-pds = {
|
||||
sopsFile = lib.snowfall.fs.get-file "secrets/bluesky-pds.service.env";
|
||||
format = "dotenv";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/containers/bluesky-pds 0700 root root -"
|
||||
];
|
||||
|
||||
virtualisation.oci-containers.containers.bluesky-pds = {
|
||||
image = "ghcr.io/bluesky-social/pds:0.4";
|
||||
autoStart = true;
|
||||
hostname = host;
|
||||
environmentFiles = [
|
||||
config.sops.secrets.bluesky-pds.path
|
||||
];
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.bluesky-pds.entrypoints" = "websecure";
|
||||
"traefik.http.routers.bluesky-pds.rule" = "Host(`bsky.thevoid.cafe`)";
|
||||
"traefik.http.services.bluesky-pds.loadbalancer.server.port" = "2583";
|
||||
};
|
||||
volumes = [
|
||||
"/var/lib/containers/bluesky-pds:/pds"
|
||||
];
|
||||
extraOptions = ["--network=proxy"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue