mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-02 23:19:41 +00:00
nix: format with alejandra
This commit is contained in:
parent
d5cad148da
commit
95eb4b71e0
118 changed files with 1291 additions and 1703 deletions
|
|
@ -3,19 +3,12 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
cfg = config.services.typst-bot;
|
||||
t = lib.types;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
in {
|
||||
options = {
|
||||
|
||||
services.typst-bot = {
|
||||
|
||||
enable = lib.mkEnableOption "typst-bot";
|
||||
|
||||
dataDir = lib.mkOption {
|
||||
|
|
@ -28,18 +21,15 @@ in
|
|||
description = "Path to an environment file, you can set the token there";
|
||||
type = t.path;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
users.users."typst-bot" = {
|
||||
group = "typst-bot";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups."typst-bot" = { };
|
||||
users.groups."typst-bot" = {};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.dataDir}/cache 700 typst-bot typst-bot - -"
|
||||
|
|
@ -48,15 +38,15 @@ in
|
|||
|
||||
systemd.services."typst-bot" = {
|
||||
description = "A discord bot to render Typst code";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
preStart = ''
|
||||
touch ${cfg.dataDir}/sqlite/db.sqlite
|
||||
'';
|
||||
|
||||
# Don't pollute the global path
|
||||
path = [ pkgs.myPkgs.typst-bot ];
|
||||
path = [pkgs.myPkgs.typst-bot];
|
||||
script = "typst-bot";
|
||||
|
||||
serviceConfig = {
|
||||
|
|
@ -71,9 +61,6 @@ in
|
|||
cfg.environmentFile
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue