mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
save-space, make telegram-bots want network-online
This commit is contained in:
9
configs/save-space.nix
Normal file
9
configs/save-space.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
documentation.doc.enable = false;
|
||||||
|
documentation.enable = false;
|
||||||
|
documentation.info.enable = false;
|
||||||
|
documentation.man.enable = false;
|
||||||
|
fonts.fontconfig.enable = false;
|
||||||
|
nix.gc.automatic = true;
|
||||||
|
nix.optimise.automatic = true;
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ let
|
|||||||
enable = bot.enable;
|
enable = bot.enable;
|
||||||
startAt = bot.time;
|
startAt = bot.time;
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
wantedBy = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||||
-d chat_id="${bot.chatId}" \
|
-d chat_id="${bot.chatId}" \
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ let
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<system/hardware-configuration.nix>
|
./hardware-configuration.nix
|
||||||
<system/containers.nix>
|
<system/containers.nix>
|
||||||
|
<configs/save-space.nix>
|
||||||
<modules/retiolum.nix>
|
<modules/retiolum.nix>
|
||||||
<modules/telegram-bot.nix>
|
<modules/telegram-bot.nix>
|
||||||
{
|
{
|
||||||
@@ -26,13 +27,6 @@ in {
|
|||||||
|
|
||||||
users.users.root.extraGroups = [ "audio" ];
|
users.users.root.extraGroups = [ "audio" ];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
documentation.enable = false;
|
|
||||||
documentation.doc.enable = false;
|
|
||||||
documentation.man.enable = false;
|
|
||||||
documentation.info.enable = false;
|
|
||||||
fonts.fontconfig.enable = false;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
@@ -56,7 +50,7 @@ in {
|
|||||||
environment.variables.HTOPRC = toString <dot/htoprc>;
|
environment.variables.HTOPRC = toString <dot/htoprc>;
|
||||||
|
|
||||||
programs.tmux.enable = true;
|
programs.tmux.enable = true;
|
||||||
environment.systemPackages = with pkgs; [ git vim htop ];
|
environment.systemPackages = with pkgs; [ git vim htop wget ];
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user