summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-05-04 20:31:12 +0200
committerlassulus <lassulus@lassul.us>2018-05-04 20:31:12 +0200
commit80cb62753405364cedb40f7591704dde56593de3 (patch)
tree6e87661cb86dc57f97ad4da9c2bbff31ab258e82
parent5fe30a149d649b24cb0c55e398064adfce51614c (diff)
l: add nichtparasoup module
-rw-r--r--lass/3modules/default.nix1
-rw-r--r--lass/3modules/nichtparasoup.nix48
2 files changed, 49 insertions, 0 deletions
diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix
index 5e7e6dff3..2cf6a66b9 100644
--- a/lass/3modules/default.nix
+++ b/lass/3modules/default.nix
@@ -7,6 +7,7 @@ _:
./hosts.nix
./mysql-backup.nix
./news.nix
+ ./nichtparasoup.nix
./pyload.nix
./restic.nix
./screenlock.nix
diff --git a/lass/3modules/nichtparasoup.nix b/lass/3modules/nichtparasoup.nix
new file mode 100644
index 000000000..dd1419f24
--- /dev/null
+++ b/lass/3modules/nichtparasoup.nix
@@ -0,0 +1,48 @@
+{ config, lib, pkgs, ... }:
+
+with import <stockholm/lib>;
+
+{
+ options.lass.nichtparasoup = {
+ enable = mkEnableOption "nichtparasoup funny image page";
+ config = mkOption {
+ type = types.str;
+ default = ''
+ [General]
+ Port: 5001
+ IP: 0.0.0.0
+ Useragent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25
+
+ [Cache]
+ Images_min_limit: 15
+
+ [Logging]
+ ;; possible destinations: file syslog
+ Destination: syslog
+ Verbosity: ERROR
+
+ [Sites]
+ SoupIO: everyone
+ Pr0gramm: new,top
+ Reddit: gifs,pics,aww,aww_gifs,reactiongifs,wtf,FoodPorn,cats,StarWars,ANormalDayInRussia,perfectloops,reallifedoodles
+ NineGag: geeky,wtf,hot,trending
+ Instagram: cats,animals,nerdy_gaming_art,nature,wtf
+ Fourchan: sci
+ '';
+ };
+ };
+
+ config = mkIf config.lass.nichtparasoup.enable {
+ systemd.services.nichtparasoup = {
+ description = "nichtparasoup";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ restartIfChanged = true;
+ serviceConfig = {
+ Restart = "always";
+ ExecStart = "${pkgs.nichtparasoup}/bin/nichtparasoup -c ${pkgs.writeText "config.ini"config.lass.nichtparasoup.config}";
+ };
+ };
+ };
+}