add rustypaste module
This commit is contained in:
parent
1a6d282046
commit
eb3d5353a2
8 changed files with 301 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./rustypaste-cli.nix
|
||||
./atuin.nix
|
||||
./firefox.nix
|
||||
./shell
|
||||
|
|
|
|||
40
home/modules/programs/rustypaste-cli.nix
Normal file
40
home/modules/programs/rustypaste-cli.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.rustypaste-cli;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.rustypaste-cli = {
|
||||
enable = lib.mkEnableOption "rustypaste-cli";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.rustypaste-cli ];
|
||||
sops = {
|
||||
secrets = {
|
||||
"rustypaste/auth" = { };
|
||||
"rustypaste/delete" = { };
|
||||
};
|
||||
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue