diff options
author | makefu <github@syntax-fehler.de> | 2018-12-17 12:33:57 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-12-17 12:34:00 +0100 |
commit | 87c62a2650c987f215dd979676c8d3426a47db72 (patch) | |
tree | 00e73b140fbbc3a61cd655f4df6aa612208240c1 /makefu | |
parent | 62e90729acb11b9b9eeee373048f9b338fe86a0e (diff) |
ma bump-distrowatch: init
Diffstat (limited to 'makefu')
-rw-r--r-- | makefu/1systems/gum/config.nix | 1 | ||||
-rw-r--r-- | makefu/1systems/omo/config.nix | 1 | ||||
-rw-r--r-- | makefu/3modules/bump-distrowatch.nix | 31 | ||||
-rw-r--r-- | makefu/3modules/default.nix | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index dcfa3d0e5..7bc7e668c 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -21,6 +21,7 @@ in { ]; }; } + <stockholm/makefu/2configs/support-nixos.nix> # <stockholm/makefu/2configs/stats/client.nix> <stockholm/makefu/2configs/stats/netdata-server.nix> diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index 81b1e0ea1..ac2677b7f 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -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> diff --git a/makefu/3modules/bump-distrowatch.nix b/makefu/3modules/bump-distrowatch.nix new file mode 100644 index 000000000..18426cdcc --- /dev/null +++ b/makefu/3modules/bump-distrowatch.nix @@ -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; +} diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index 65b5a6afd..c6d8fccc3 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -3,6 +3,7 @@ _: { imports = [ ./awesome-extra.nix + ./bump-distrowatch.nix ./deluge.nix ./forward-journal.nix ./netdata.nix |