ma bump-distrowatch: init

This commit is contained in:
makefu 2018-12-17 12:33:57 +01:00
parent 62e90729ac
commit 87c62a2650
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
4 changed files with 34 additions and 0 deletions

View File

@ -21,6 +21,7 @@ in {
];
};
}
<stockholm/makefu/2configs/support-nixos.nix>
# <stockholm/makefu/2configs/stats/client.nix>
<stockholm/makefu/2configs/stats/netdata-server.nix>

View File

@ -11,6 +11,7 @@ in {
./hw/omo.nix
#./hw/tsp.nix
<stockholm/makefu>
<stockholm/makefu/2configs/support-nixos.nix>
<stockholm/makefu/2configs/zsh-user.nix>
<stockholm/makefu/2configs/backup/state.nix>
<stockholm/makefu/2configs/exim-retiolum.nix>

View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
let
cfg = config.makefu.distrobump;
imp = {
systemd.services.distrobump = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.curl ];
restartIfChanged = false;
startAt = "daily";
serviceConfig = {
PrivateTmp = true;
Type = "oneshot";
ExecStart = pkgs.writeDash "bump-distrowatch" ''
set -euf
UA='Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0'
curl -Lvc /tmp/cookie.jar -A "$UA" 'https://distrowatch.com/' >/dev/null
sleep $(shuf -i 3-15 -n1).$(shuf -i 0-9 -n1)
curl -Lvc /tmp/cookie.jar -A "$UA" -e 'https://distrowatch.com/' 'https://distrowatch.com/nixos?frphr' >/dev/null
'';
RandomizedDelaySec = 28800;
};
};
};
in
{
options.makefu.distrobump.enable = lib.mkEnableOption "distrobump";
config = lib.mkIf cfg.enable imp;
}

View File

@ -3,6 +3,7 @@ _:
{
imports = [
./awesome-extra.nix
./bump-distrowatch.nix
./deluge.nix
./forward-journal.nix
./netdata.nix