mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nixos: move parrot, typst-bot to common
This commit is contained in:
parent
ec8d003744
commit
7644f50a1f
2 changed files with 0 additions and 0 deletions
|
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.parrot;
|
||||
t = lib.types;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
services.parrot = {
|
||||
|
||||
enable = lib.mkEnableOption "parrot";
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
description = "Path to an environment file, you can set the token there";
|
||||
type = t.path;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
users.users."parrot" = {
|
||||
group = "parrot";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups."parrot" = { };
|
||||
|
||||
systemd.services."parrot" = {
|
||||
description = " A hassle-free, highly performant, self-hosted Discord music bot with YouTube and Spotify support. Powered by yt-dlp.";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "parrot";
|
||||
Group = "parrot";
|
||||
|
||||
EnvironmentFile = cfg.environmentFile;
|
||||
|
||||
ExecStart = "${lib.getExe pkgs.parrot}";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue