Skip to content

Commit

Permalink
kfbox: add wastebin
Browse files Browse the repository at this point in the history
  • Loading branch information
pinpox committed Apr 7, 2024
1 parent 9b890e8 commit 07cf8f7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 10 deletions.
19 changes: 10 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
};

lollypops = {
url = "github:pinpox/lollypops";
# url = "github:GeoffreyFrogeye/lollypops/use-nix-flake-archive";
url = "github:pinpox/lollypops/nix-flake-archive-fixes";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand Down
1 change: 1 addition & 0 deletions machines/kfbox/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
gitea.enable = true;
owncast.enable = true;
vikunja.enable = true;
wastebin.enable = true;
};

metrics.node.enable = true;
Expand Down
35 changes: 35 additions & 0 deletions modules/wastebin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ config, lib, ... }:
with lib;
let cfg = config.pinpox.services.wastebin;
in
{

options.pinpox.services.wastebin = {
enable = mkEnableOption "wastebin server";
};

config = mkIf cfg.enable {

# WASTEBIN_PASSWORD_SALT
# WASTEBIN_SIGNING_KEY
lollypops.secrets.files."wastebin/envfile" = { };

# Create system user and group
services.wastebin = {
enable = true;

secretFile = config.lollypops.secrets.files."wastebin/envfile".path;

settings = {
WASTEBIN_ADDRESS_PORT = "127.0.0.1:8088";
WASTEBIN_BASE_URL = "https://paste.0cx.de";
WASTEBIN_HTTP_TIMEOUT = 7;
WASTEBIN_MAX_BODY_SIZE = 1024;
WASTEBIN_TITLE = "wastebin";
RUST_LOG = "warning";
};
};
# TODO Reverse proxy
# TODO Backup?
};
}

0 comments on commit 07cf8f7

Please sign in to comment.