-
Notifications
You must be signed in to change notification settings - Fork 4
/
example.nix
64 lines (55 loc) · 1.9 KB
/
example.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Seance Discord bots.
#
# vim: et:ts=2:sw=2:
#
{ pkgs, config, ... }:
let
discordUserId = 123456789123456789;
telegramUsername = "telegramalice";
in {
# My secrets
# Age usage is optional, but due to flakes encluding the entire contents of the
# source repository into the world readable Nix store, you'll want to use some
# source that is either encrypted and thus safe to pull into the Nix store directly
# (which you'll need to have decrypted at runtime) or you'll want to point it at a
# preconfigured path using a string in the Séance options below these.
age.secrets.secureConfigHeather.file = ./secureConfigHeather.age;
age.secrets.secureConfigLily.file = ./secureConfigLily.age;
age.secrets.secureConfigHeatherTelegram.file = ./secureConfigHeather.age;
age.secrets.secureConfigLilyTelegram.file = ./secureConfigLily.age;
services.seance = {
enable = true;
#
# Discord.
#
discordUsers = {
heather = {
secureConfigFile = config.age.secrets.secureConfigHeather.path;
referenceUserId = discordUserId;
pattern = "^(?:([hH][.,;#])|([.,#;][hH]))(?P<content>.*)$";
prefix = "v";
};
lily = {
secureConfigFile = config.age.secrets.secureConfigLily.path;
referenceUserId = discordUserId;
pattern = "^(?:([lL][.,;#])|([.,#;][lL]))(?P<content>.*)$";
prefix = "l";
};
};
#
# Telegram.
#
telegramUsers = {
heather = {
secureConfigFile = config.age.secrets.secureConfigHeatherTelegram.path;
referenceUsername = telegramUsername;
pattern = "^(?:([hH][.,;#])|([.,#;][hH]))(?P<content>.*)$";
};
lily = {
secureConfigFile = config.age.secrets.secureConfigLilyTelegram.path;
referenceUsername = telegramUsername;
pattern = "^(?:([lL][.,;#])|([.,#;][lL]))(?P<content>.*)$";
};
};
};
}