Skip to content

Commit 2f8260f

Browse files
committed
fix: remove bot references from options
1 parent e1759d5 commit 2f8260f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535
)
3636
// {
3737
# Overlay module
38-
nixosModules.rustina.bot = import ./module.nix self;
38+
nixosModules.rustina = import ./module.nix self;
3939
};
4040
}

module.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ flake: {
66
pkgs,
77
...
88
}: let
9-
cfg = config.services.rustina.bot;
9+
cfg = config.services.rustina;
1010
bot = flake.packages.${pkgs.stdenv.hostPlatform.system}.default;
1111

1212
genArgs = {cfg}: let
@@ -115,32 +115,32 @@ flake: {
115115
};
116116

117117
# preStart = ''
118-
# installedConfigFile="${config.services.rustina.bot.dataDir}/Config/options.json"
119-
# install -d -m750 ${config.services.rustina.bot.dataDir}/Config
118+
# installedConfigFile="${config.services.rustina.dataDir}/Config/options.json"
119+
# install -d -m750 ${config.services.rustina.dataDir}/Config
120120
# rm -f "$installedConfigFile" && install -m640 ${configFile} "$installedConfigFile"
121121
# '';
122122
};
123123
};
124124

125125
asserts = lib.mkIf cfg.enable {
126126
warnings = [
127-
(lib.mkIf (cfg.webhook.enable && cfg.webhook.domain == null) "services.rustina.bot.webhook.domain must be set in order to properly generate certificate!")
127+
(lib.mkIf (cfg.webhook.enable && cfg.webhook.domain == null) "services.rustina.webhook.domain must be set in order to properly generate certificate!")
128128
];
129129

130130
assertions = [
131131
{
132132
assertion = cfg.tokens.telegram != null;
133-
message = "services.rustina.bot.tokens.telegram must be set!";
133+
message = "services.rustina.tokens.telegram must be set!";
134134
}
135135
{
136136
assertion = cfg.tokens.github != null;
137-
message = "services.rustina.bot.tokens.github must be set!";
137+
message = "services.rustina.tokens.github must be set!";
138138
}
139139
];
140140
};
141141
in {
142142
options = with lib; {
143-
services.rustina.bot = {
143+
services.rustina = {
144144
enable = mkEnableOption ''
145145
Rustina Bot: Telegram bot made by Uzbek Rust team for Rust Uzbekistan community.
146146
'';

0 commit comments

Comments
 (0)