nixos/home/modules/programs/rustypaste-cli.nix

39 lines
864 B
Nix
Raw Normal View History

2025-02-04 16:17:25 +08:00
{
config,
lib,
pkgs,
...
}: let
2025-02-04 16:17:25 +08:00
cfg = config.youthlic.programs.rustypaste-cli;
in {
2025-02-04 16:17:25 +08:00
options = {
youthlic.programs.rustypaste-cli = {
enable = lib.mkEnableOption "rustypaste-cli";
};
};
config = lib.mkIf cfg.enable {
home.packages = [pkgs.rustypaste-cli];
2025-02-04 16:17:25 +08:00
sops = {
secrets = {
"rustypaste/auth" = {};
"rustypaste/delete" = {};
2025-02-04 16:17:25 +08:00
};
templates."rustypaste-config.toml" = {
path = "${config.xdg.configHome}/rustypaste/config.toml";
content = ''
[server]
address = "https://paste.youthlic.fun"
auth_token = "${config.sops.placeholder."rustypaste/auth"}"
delete_token = "${config.sops.placeholder."rustypaste/delete"}"
[paste]
oneshot = false
[style]
prettify = true
'';
};
};
};
}