From 46a55ac545232be86588ce15fd3e40a83da9f008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 20 Apr 2019 09:18:16 +0200 Subject: [PATCH] save-space, make telegram-bots want network-online --- configs/save-space.nix | 9 +++++++++ modules/telegram-bot.nix | 2 +- systems/catullus/configuration.nix | 12 +++--------- 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 configs/save-space.nix diff --git a/configs/save-space.nix b/configs/save-space.nix new file mode 100644 index 0000000..b8afc08 --- /dev/null +++ b/configs/save-space.nix @@ -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; +} diff --git a/modules/telegram-bot.nix b/modules/telegram-bot.nix index eddfbf5..130c304 100644 --- a/modules/telegram-bot.nix +++ b/modules/telegram-bot.nix @@ -7,7 +7,7 @@ let enable = bot.enable; startAt = bot.time; serviceConfig.Type = "oneshot"; - wantedBy = [ "network-online.target" ]; + wants = [ "network-online.target" ]; script = '' ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ -d chat_id="${bot.chatId}" \ diff --git a/systems/catullus/configuration.nix b/systems/catullus/configuration.nix index 05b3060..80a9934 100644 --- a/systems/catullus/configuration.nix +++ b/systems/catullus/configuration.nix @@ -6,8 +6,9 @@ let }; in { imports = [ - + ./hardware-configuration.nix + { @@ -26,13 +27,6 @@ in { 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: { @@ -56,7 +50,7 @@ in { environment.variables.HTOPRC = toString ; programs.tmux.enable = true; - environment.systemPackages = with pkgs; [ git vim htop ]; + environment.systemPackages = with pkgs; [ git vim htop wget ]; users.mutableUsers = false;