diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/1systems/hotdog/config.nix | 1 | ||||
-rw-r--r-- | krebs/1systems/puyak/config.nix | 9 | ||||
-rw-r--r-- | krebs/2configs/default.nix | 8 | ||||
-rw-r--r-- | krebs/2configs/gitlab-runner-shackspace.nix | 34 | ||||
-rw-r--r-- | krebs/2configs/news-spam.nix | 167 | ||||
-rw-r--r-- | krebs/2configs/news.nix | 161 | ||||
-rw-r--r-- | krebs/3modules/announce-activation.nix | 60 | ||||
-rw-r--r-- | krebs/3modules/default.nix | 1 | ||||
-rw-r--r-- | krebs/3modules/lass/default.nix | 32 | ||||
-rw-r--r-- | krebs/3modules/newsbot-js.nix | 130 | ||||
-rw-r--r-- | krebs/3modules/rtorrent.nix | 23 | ||||
-rw-r--r-- | krebs/5pkgs/simple/newsbot-js/default.nix | 1 | ||||
-rw-r--r-- | krebs/5pkgs/simple/populate/default.nix | 4 | ||||
-rw-r--r-- | krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix | 1 | ||||
-rw-r--r-- | krebs/source.nix | 2 |
15 files changed, 412 insertions, 222 deletions
diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index 4807307ff..2ad22f49c 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -10,6 +10,7 @@ <stockholm/krebs/2configs> <stockholm/krebs/2configs/buildbot-all.nix> + <stockholm/krebs/2configs/gitlab-runner-shackspace.nix> <stockholm/krebs/2configs/binary-cache/nixos.nix> ]; diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix index 31cc024af..978bd18e0 100644 --- a/krebs/1systems/puyak/config.nix +++ b/krebs/1systems/puyak/config.nix @@ -14,6 +14,7 @@ <stockholm/krebs/2configs/go.nix> <stockholm/krebs/2configs/ircd.nix> <stockholm/krebs/2configs/news.nix> + <stockholm/krebs/2configs/news-spam.nix> ]; krebs.build.host = config.krebs.hosts.puyak; @@ -63,4 +64,12 @@ SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="et0" ''; + environment.systemPackages = [ pkgs.zsh ]; + boot.kernelModules = [ "kvm-intel" ]; + users.users.joerg = { + openssh.authorizedKeys.keys = [ config.krebs.users.Mic92.pubkey ]; + isNormalUser = true; + shell = "/run/current-system/sw/bin/zsh"; + }; + networking.firewall.allowedTCPPorts = [ 5901 ]; } diff --git a/krebs/2configs/default.nix b/krebs/2configs/default.nix index e7ece87b6..90aaa254a 100644 --- a/krebs/2configs/default.nix +++ b/krebs/2configs/default.nix @@ -4,7 +4,15 @@ with import <stockholm/lib>; { imports = [ ./backup.nix + (let ca-bundle = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; in { + environment.variables = { + CURL_CA_BUNDLE = ca-bundle; + GIT_SSL_CAINFO = ca-bundle; + SSL_CERT_FILE = ca-bundle; + }; + }) ]; + krebs.announce-activation.enable = true; krebs.enable = true; krebs.tinc.retiolum.enable = true; diff --git a/krebs/2configs/gitlab-runner-shackspace.nix b/krebs/2configs/gitlab-runner-shackspace.nix new file mode 100644 index 000000000..d9b4cd589 --- /dev/null +++ b/krebs/2configs/gitlab-runner-shackspace.nix @@ -0,0 +1,34 @@ +{ config, ... }: +let + url = "https://git.shackspace.de/"; + # generate token from CI-token via: + ## gitlab-runner register + ## cat /etc/gitlab-runner/config.toml + token = import <secrets/shackspace-gitlab-ci-token.nix> ; +in { + systemd.services.gitlab-runner.path = [ + "/run/wrappers" # /run/wrappers/bin/su + "/" # /bin/sh + ]; + systemd.services.gitlab-runner.serviceConfig.PrivateTmp = true; + virtualisation.docker.enable = true; + services.gitlab-runner = { + enable = true; + # configFile, configOptions and gracefulTimeout not yet in stable + # gracefulTimeout = "120min"; + configText = '' + concurrent = 1 + check_interval = 0 + + [[runners]] + name = "krebs-shell" + url = "${url}" + token = "${token}" + executor = "shell" + shell = "sh" + environment = ["PATH=/bin:/run/wrappers/bin:/etc/per-user/gitlab-runner/bin:/etc/per-user-pkgs/gitlab-runner/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"] + [runners.cache] + + ''; + }; +} diff --git a/krebs/2configs/news-spam.nix b/krebs/2configs/news-spam.nix new file mode 100644 index 000000000..63848c234 --- /dev/null +++ b/krebs/2configs/news-spam.nix @@ -0,0 +1,167 @@ +{ pkgs, ... }: + +{ + krebs.newsbot-js.news-spam = { + feeds = pkgs.writeText "feeds" '' + [SPAM]aje|http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989|#snews + [SPAM]allafrica|http://allafrica.com/tools/headlines/rdf/latest/headlines.rdf|#snews + [SPAM]antirez|http://antirez.com/rss|#snews + [SPAM]arbor|http://feeds2.feedburner.com/asert/|#snews + [SPAM]archlinux|http://www.archlinux.org/feeds/news/|#snews + [SPAM]ars|http://feeds.arstechnica.com/arstechnica/index?format=xml|#snews + [SPAM]augustl|http://augustl.com/atom.xml|#snews + [SPAM]bbc|http://feeds.bbci.co.uk/news/rss.xml|#snews + [SPAM]bdt_aktuelle_themen|http://www.bundestag.de/blueprint/servlet/service/de/14154/asFeed/index.rss|#snews + [SPAM]bdt_drucksachen|http://www.bundestag.de/dip21rss/bundestag_drucksachen.rss|#snews + [SPAM]bdt_plenarproto|http://www.bundestag.de/rss_feeds/plenarprotokolle.rss|#snews + [SPAM]bdt_pressemitteilungen|http://www.bundestag.de/blueprint/servlet/service/de/273112/asFeed/index.rss|#snews + [SPAM]bitcoinpakistan|https://bitcoinspakistan.com/feed/|#snews + [SPAM]cancer|http://feeds.feedburner.com/ncinewsreleases?format=xml|#snews + [SPAM]carta|http://feeds2.feedburner.com/carta-standard-rss|#snews + [SPAM]catholic_news|http://feeds.feedburner.com/catholicnewsagency/dailynews|#snews + [SPAM]cbc_busi|http://rss.cbc.ca/lineup/business.xml|#snews + [SPAM]cbc_offbeat|http://www.cbc.ca/cmlink/rss-offbeat|#snews + [SPAM]cbc_pol|http://rss.cbc.ca/lineup/politics.xml|#snews + [SPAM]cbc_tech|http://rss.cbc.ca/lineup/technology.xml|#snews + [SPAM]cbc_top|http://rss.cbc.ca/lineup/topstories.xml|#snews + [SPAM]ccc|http://www.ccc.de/rss/updates.rdf|#snews + [SPAM]chan_biz|http://boards.4chan.org/biz/index.rss|#snews + [SPAM]chan_g|http://boards.4chan.org/g/index.rss|#snews + [SPAM]chan_int|http://boards.4chan.org/int/index.rss|#snews + [SPAM]chan_sci|http://boards.4chan.org/sci/index.rss|#snews + [SPAM]chan_x|http://boards.4chan.org/x/index.rss|#snews + [SPAM]c|http://www.tempolimit-lichtgeschwindigkeit.de/news.xml|#snews + [SPAM]cryptogon|http://www.cryptogon.com/?feed=rss2|#snews + [SPAM]csm|http://rss.csmonitor.com/feeds/csm|#snews + [SPAM]csm_world|http://rss.csmonitor.com/feeds/world|#snews + [SPAM]danisch|http://www.danisch.de/blog/feed/|#snews + [SPAM]dod|http://www.defense.gov/news/afps2.xml|#snews + [SPAM]dwn|http://deutsche-wirtschafts-nachrichten.de/feed/customfeed/|#snews + [SPAM]ecat|http://ecat.com/feed|#snews + [SPAM]eia_press|http://www.eia.gov/rss/press_rss.xml|#snews + [SPAM]eia_today|http://www.eia.gov/rss/todayinenergy.xml|#snews + [SPAM]embargowatch|https://embargowatch.wordpress.com/feed/|#snews + [SPAM]ethereum-comments|http://blog.ethereum.org/comments/feed|#snews + [SPAM]ethereum|http://blog.ethereum.org/feed|#snews + [SPAM]europa_ric|http://ec.europa.eu/research/infocentre/rss/infocentre-rss.xml|#snews + [SPAM]eu_survei|http://www.eurosurveillance.org/public/RSSFeed/RSS.aspx|#snews + [SPAM]exploitdb|http://www.exploit-db.com/rss.xml|#snews + [SPAM]fars|http://www.farsnews.com/rss.php|#snews #test + [SPAM]faz_feui|http://www.faz.net/rss/aktuell/feuilleton/|#snews + [SPAM]faz_politik|http://www.faz.net/rss/aktuell/politik/|#snews + [SPAM]faz_wirtschaft|http://www.faz.net/rss/aktuell/wirtschaft/|#snews + [SPAM]fbi|https://www.fbi.gov/news/rss.xml|#snews + [SPAM]fedreserve|http://www.federalreserve.gov/feeds/press_all.xml|#snews + [SPAM]fefe|http://blog.fefe.de/rss.xml|#snews + [SPAM]forbes|http://www.forbes.com/forbes/feed2/|#snews + [SPAM]forbes_realtime|http://www.forbes.com/real-time/feed2/|#snews + [SPAM]fox|http://feeds.foxnews.com/foxnews/latest|#snews + [SPAM]geheimorganisation|http://geheimorganisation.org/feed/|#snews + [SPAM]GerForPol|http://www.german-foreign-policy.com/de/news/rss-2.0|#snews + [SPAM]gmanet|http://www.gmanetwork.com/news/rss/news|#snews + [SPAM]golem|http://rss.golem.de/rss.php|#snews + [SPAM]google|http://news.google.com/?output=rss|#snews + [SPAM]greenpeace|http://feeds.feedburner.com/GreenpeaceNews|#snews + [SPAM]guardian_uk|http://feeds.theguardian.com/theguardian/uk-news/rss|#snews + [SPAM]gulli|http://ticker.gulli.com/rss/|#snews + [SPAM]hackernews|https://news.ycombinator.com/rss|#snews + [SPAM]handelsblatt|http://www.handelsblatt.com/contentexport/feed/schlagzeilen|#snews + [SPAM]heise|https://www.heise.de/newsticker/heise-atom.xml|#snews + [SPAM]hindu_business|http://www.thehindubusinessline.com/?service=rss|#snews + [SPAM]hindu|http://www.thehindu.com/?service=rss|#snews + [SPAM]ign|http://feeds.ign.com/ign/all|#snews + [SPAM]independent|http://www.independent.com/rss/headlines/|#snews + [SPAM]indymedia|https://de.indymedia.org/rss.xml|#snews + [SPAM]info_libera|http://www.informationliberation.com/rss.xml|#snews + [SPAM]klagen-gegen-rundfuckbeitrag|http://klagen-gegen-rundfunkbeitrag.blogspot.com/feeds/posts/default|#snews + [SPAM]korea_herald|http://www.koreaherald.com/rss_xml.php|#snews + [SPAM]linuxinsider|http://www.linuxinsider.com/perl/syndication/rssfull.pl|#snews + [SPAM]lisp|http://planet.lisp.org/rss20.xml|#snews + [SPAM]liveleak|http://www.liveleak.com/rss|#snews + [SPAM]lolmythesis|http://lolmythesis.com/rss|#snews + [SPAM]LtU|http://lambda-the-ultimate.org/rss.xml|#snews + [SPAM]lukepalmer|http://lukepalmer.wordpress.com/feed/|#snews + [SPAM]mit|http://web.mit.edu/newsoffice/rss-feeds.feed?type=rss|#snews + [SPAM]mongrel2_master|https://github.com/zedshaw/mongrel2/commits/master.atom|#snews + [SPAM]nds|http://www.nachdenkseiten.de/?feed=atom|#snews + [SPAM]netzpolitik|https://netzpolitik.org/feed/|#snews + [SPAM]newsbtc|http://newsbtc.com/feed/|#snews + [SPAM]nnewsg|http://www.net-news-global.net/rss/rssfeed.xml|#snews + [SPAM]npr_busi|http://www.npr.org/rss/rss.php?id=1006|#snews + [SPAM]npr_headlines|http://www.npr.org/rss/rss.php?id=1001|#snews + [SPAM]npr_pol|http://www.npr.org/rss/rss.php?id=1012|#snews + [SPAM]npr_world|http://www.npr.org/rss/rss.php?id=1004|#snews + [SPAM]nsa|https://www.nsa.gov/rss.xml|#snews #bullerei + [SPAM]nytimes|http://rss.nytimes.com/services/xml/rss/nyt/World.xml|#snews + [SPAM]painload|https://github.com/krebscode/painload/commits/master.atom|#snews + [SPAM]phys|http://phys.org/rss-feed/|#snews + [SPAM]piraten|https://www.piratenpartei.de/feed/|#snews + [SPAM]polizei_berlin|http://www.berlin.de/polizei/presse-fahndung/_rss_presse.xml|#snews + [SPAM]presse_polizei|http://www.presseportal.de/rss/polizei.rss2|#snews + [SPAM]presseportal|http://www.presseportal.de/rss/presseportal.rss2|#snews + [SPAM]prisonplanet|http://prisonplanet.com/feed.rss|#snews + [SPAM]rawstory|http://www.rawstory.com/rs/feed/|#snews + [SPAM]reddit_4chan|http://www.reddit.com/r/4chan/new/.rss|#snews + [SPAM]reddit_anticonsum|http://www.reddit.com/r/Anticonsumption/new/.rss|#snews + [SPAM]reddit_btc|http://www.reddit.com/r/Bitcoin/new/.rss|#snews + [SPAM]reddit_consp|http://reddit.com/r/conspiracy/.rss|#snews + [SPAM]reddit_haskell|http://www.reddit.com/r/haskell/.rss|#snews + [SPAM]reddit_nix|http://www.reddit.com/r/nixos/.rss|#snews + [SPAM]reddit_prog|http://www.reddit.com/r/programming/new/.rss|#snews + [SPAM]reddit_sci|http://www.reddit.com/r/science/.rss|#snews + [SPAM]reddit_tech|http://www.reddit.com/r/technology/.rss|#snews + [SPAM]reddit_tpp|http://www.reddit.com/r/twitchplayspokemon/.rss|#snews + [SPAM]reddit_world|http://www.reddit.com/r/worldnews/.rss|#snews + [SPAM]r-ethereum|http://www.reddit.com/r/ethereum/.rss|#snews + [SPAM]reuters|http://feeds.reuters.com/Reuters/worldNews|#snews + [SPAM]reuters-odd|http://feeds.reuters.com/reuters/oddlyEnoughNews?format=xml|#snews + [SPAM]rt|http://rt.com/rss/news/|#snews + [SPAM]schallurauch|http://feeds.feedburner.com/SchallUndRauch|#snews + [SPAM]sciencemag|http://news.sciencemag.org/rss/current.xml|#snews + [SPAM]scmp|http://www.scmp.com/rss/91/feed|#snews + [SPAM]sec-db|http://feeds.security-database.com/SecurityDatabaseToolsWatch|#snews + [SPAM]shackspace|http://blog.shackspace.de/?feed=rss2|#snews + [SPAM]shz_news|http://www.shz.de/nachrichten/newsticker/rss|#snews + [SPAM]sky_busi|http://feeds.skynews.com/feeds/rss/business.xml|#snews + [SPAM]sky_pol|http://feeds.skynews.com/feeds/rss/politics.xml|#snews + [SPAM]sky_strange|http://feeds.skynews.com/feeds/rss/strange.xml|#snews + [SPAM]sky_tech|http://feeds.skynews.com/feeds/rss/technology.xml|#snews + [SPAM]sky_world|http://feeds.skynews.com/feeds/rss/world.xml|#snews + [SPAM]slashdot|http://rss.slashdot.org/Slashdot/slashdot|#snews + [SPAM]slate|http://feeds.slate.com/slate|#snews + [SPAM]spiegel_eil|http://www.spiegel.de/schlagzeilen/eilmeldungen/index.rss|#snews + [SPAM]spiegelfechter|http://feeds.feedburner.com/DerSpiegelfechter?format=xml|#snews + [SPAM]spiegel_top|http://www.spiegel.de/schlagzeilen/tops/index.rss|#snews + [SPAM]standardmedia_ke|http://www.standardmedia.co.ke/rss/headlines.php|#snews + [SPAM]stern|http://www.stern.de/feed/standard/all/|#snews + [SPAM]stz|http://www.stuttgarter-zeitung.de/rss/topthemen.rss.feed|#snews + [SPAM]sz_politik|http://rss.sueddeutsche.de/rss/Politik|#snews + [SPAM]sz_wirtschaft|http://rss.sueddeutsche.de/rss/Wirtschaft|#snews + [SPAM]sz_wissen|http://rss.sueddeutsche.de/rss/Wissen|#snews + [SPAM]tagesschau|http://www.tagesschau.de/newsticker.rdf|#snews + [SPAM]taz|http://taz.de/Themen-des-Tages/!p15;rss/|#snews + [SPAM]telegraph|http://www.telegraph.co.uk/rss.xml|#snews + [SPAM]telepolis|http://www.heise.de/tp/rss/news-atom.xml|#snews + [SPAM]the_insider|http://www.theinsider.org/rss/news/headlines-xml.asp|#snews + [SPAM]tigsource|http://www.tigsource.com/feed/|#snews + [SPAM]tinc|http://tinc-vpn.org/news/index.rss|#snews + [SPAM]topix_b|http://www.topix.com/rss/wire/de/berlin|#snews + [SPAM]torr_bits|http://feeds.feedburner.com/TorrentfreakBits|#snews + [SPAM]torrentfreak|http://feeds.feedburner.com/Torrentfreak|#snews + [SPAM]torr_news|http://feed.torrentfreak.com/Torrentfreak/|#snews + [SPAM]travel_warnings|http://feeds.travel.state.gov/ca/travelwarnings-alerts|#snews + [SPAM]un_afr|http://www.un.org/apps/news/rss/rss_africa.asp|#snews + [SPAM]un_am|http://www.un.org/apps/news/rss/rss_americas.asp|#snews + [SPAM]un_eu|http://www.un.org/apps/news/rss/rss_europe.asp|#snews + [SPAM]un_me|http://www.un.org/apps/news/rss/rss_mideast.asp|#snews + [SPAM]un_pac|http://www.un.org/apps/news/rss/rss_asiapac.asp|#snews + [SPAM]un_top|http://www.un.org/apps/news/rss/rss_top.asp|#snews + [SPAM]us_math_society|http://www.ams.org/cgi-bin/content/news_items.cgi?rss=1|#snews + [SPAM]vimperator|https://sites.google.com/a/vimperator.org/www/blog/posts.xml|#snews + [SPAM]weechat|http://dev.weechat.org/feed/atom|#snews + [SPAM]wp_world|http://feeds.washingtonpost.com/rss/rss_blogpost|#snews + [SPAM]xkcd|https://xkcd.com/rss.xml|#snews + [SPAM]zdnet|http://www.zdnet.com/news/rss.xml|#snews + ''; + }; +} diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index d9176c328..56395c166 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -1,176 +1,21 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: -let -in { - environment.systemPackages = [ - pkgs.newsbot-js - ]; - krebs.newsbot-js = { - enable = true; - ircServer = "localhost"; - urlShortenerHost = "go"; - urlShortenerPort = "80"; +{ + krebs.newsbot-js.news = { feeds = pkgs.writeText "feeds" '' - aje|http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989|#news - allafrica|http://allafrica.com/tools/headlines/rdf/latest/headlines.rdf|#news antirez|http://antirez.com/rss|#news - arbor|http://feeds2.feedburner.com/asert/|#news archlinux|http://www.archlinux.org/feeds/news/|#news - ars|http://feeds.arstechnica.com/arstechnica/index?format=xml|#news - augustl|http://augustl.com/atom.xml|#news - bbc|http://feeds.bbci.co.uk/news/rss.xml|#news - bdt_aktuelle_themen|http://www.bundestag.de/blueprint/servlet/service/de/14154/asFeed/index.rss|#news - bdt_drucksachen|http://www.bundestag.de/dip21rss/bundestag_drucksachen.rss|#news #bundestag - bdt_plenarproto|http://www.bundestag.de/rss_feeds/plenarprotokolle.rss|#news #bundestag - bdt_pressemitteilungen|http://www.bundestag.de/blueprint/servlet/service/de/273112/asFeed/index.rss|#news - bitcoinpakistan|https://bitcoinspakistan.com/feed/|#news #financial - cancer|http://feeds.feedburner.com/ncinewsreleases?format=xml|#news - carta|http://feeds2.feedburner.com/carta-standard-rss|#news - catholic_news|http://feeds.feedburner.com/catholicnewsagency/dailynews|#news - cbc_busi|http://rss.cbc.ca/lineup/business.xml|#news - cbc_offbeat|http://www.cbc.ca/cmlink/rss-offbeat|#news - cbc_pol|http://rss.cbc.ca/lineup/politics.xml|#news - cbc_tech|http://rss.cbc.ca/lineup/technology.xml|#news - cbc_top|http://rss.cbc.ca/lineup/topstories.xml|#news - ccc|http://www.ccc.de/rss/updates.rdf|#news - chan_b|https://boards.4chan.org/b/index.rss|#brainfuck - chan_biz|https://boards.4chan.org/biz/index.rss|#news #brainfuck - chan_g|https://boards.4chan.org/g/index.rss|#news - chan_int|https://boards.4chan.org/int/index.rss|#news #brainfuck - chan_sci|https://boards.4chan.org/sci/index.rss|#news - chan_x|https://boards.4chan.org/x/index.rss|#news - c|http://www.tempolimit-lichtgeschwindigkeit.de/news.xml|#news - cryptogon|http://www.cryptogon.com/?feed=rss2|#news - csm|http://rss.csmonitor.com/feeds/csm|#news - csm_world|http://rss.csmonitor.com/feeds/world|#news - danisch|http://www.danisch.de/blog/feed/|#news - dod|http://www.defense.gov/news/afps2.xml|#news - dwn|http://deutsche-wirtschafts-nachrichten.de/feed/customfeed/|#news - ecat|http://ecat.com/feed|#news - eia_press|http://www.eia.gov/rss/press_rss.xml|#news - eia_today|http://www.eia.gov/rss/todayinenergy.xml|#news - embargowatch|https://embargowatch.wordpress.com/feed/|#news - ethereum-comments|http://blog.ethereum.org/comments/feed|#news ethereum|http://blog.ethereum.org/feed|#news - europa_ric|http://ec.europa.eu/research/infocentre/rss/infocentre-rss.xml|#news - eu_survei|http://www.eurosurveillance.org/public/RSSFeed/RSS.aspx|#news - exploitdb|http://www.exploit-db.com/rss.xml|#news - fars|http://www.farsnews.com/rss.php|#news #test - faz_feui|http://www.faz.net/rss/aktuell/feuilleton/|#news - faz_politik|http://www.faz.net/rss/aktuell/politik/|#news - faz_wirtschaft|http://www.faz.net/rss/aktuell/wirtschaft/|#news - fbi|https://www.fbi.gov/news/rss.xml|#news - fedreserve|http://www.federalreserve.gov/feeds/press_all.xml|#news - fefe|http://blog.fefe.de/rss.xml|#news - forbes|http://www.forbes.com/forbes/feed2/|#news - forbes_realtime|http://www.forbes.com/real-time/feed2/|#news - fox|http://feeds.foxnews.com/foxnews/latest|#news - geheimorganisation|http://geheimorganisation.org/feed/|#news - GerForPol|http://www.german-foreign-policy.com/de/news/rss-2.0|#news - gmanet|http://www.gmanetwork.com/news/rss/news|#news - golem|https://rss.golem.de/rss.php|#news - google|http://news.google.com/?output=rss|#news - greenpeace|http://feeds.feedburner.com/GreenpeaceNews|#news - guardian_uk|http://feeds.theguardian.com/theguardian/uk-news/rss|#news - gulli|http://ticker.gulli.com/rss/|#news - hackernews|https://news.ycombinator.com/rss|#news - handelsblatt|http://www.handelsblatt.com/contentexport/feed/schlagzeilen|#news #financial - heise|https://www.heise.de/newsticker/heise-atom.xml|#news - hindu_business|http://www.thehindubusinessline.com/?service=rss|#news #financial - hindu|http://www.thehindu.com/?service=rss|#news - ign|http://feeds.ign.com/ign/all|#news - independent|http://www.independent.com/rss/headlines/|#news - indymedia|https://de.indymedia.org/rss.xml|#news - info_libera|http://www.informationliberation.com/rss.xml|#news - klagen-gegen-rundfuckbeitrag|http://klagen-gegen-rundfunkbeitrag.blogspot.com/feeds/posts/default|#news - korea_herald|http://www.koreaherald.com/rss_xml.php|#news - linuxinsider|http://www.linuxinsider.com/perl/syndication/rssfull.pl|#news - lisp|http://planet.lisp.org/rss20.xml|#news - liveleak|http://www.liveleak.com/rss|#news - lolmythesis|http://lolmythesis.com/rss|#news LtU|http://lambda-the-ultimate.org/rss.xml|#news - lukepalmer|http://lukepalmer.wordpress.com/feed/|#news - mit|http://web.mit.edu/newsoffice/rss-feeds.feed?type=rss|#news mongrel2_master|https://github.com/zedshaw/mongrel2/commits/master.atom|#news - nds|http://www.nachdenkseiten.de/?feed=atom|#news - netzpolitik|https://netzpolitik.org/feed/|#news - newsbtc|http://newsbtc.com/feed/|#news #financial - nnewsg|http://www.net-news-global.net/rss/rssfeed.xml|#news - npr_busi|http://www.npr.org/rss/rss.php?id=1006|#news - npr_headlines|http://www.npr.org/rss/rss.php?id=1001|#news - npr_pol|http://www.npr.org/rss/rss.php?id=1012|#news - npr_world|http://www.npr.org/rss/rss.php?id=1004|#news - nsa|https://www.nsa.gov/rss.xml|#news #bullerei - nytimes|http://rss.nytimes.com/services/xml/rss/nyt/World.xml|#news painload|https://github.com/krebscode/painload/commits/master.atom|#news - phys|http://phys.org/rss-feed/|#news - piraten|https://www.piratenpartei.de/feed/|#news - polizei_berlin|http://www.berlin.de/polizei/presse-fahndung/_rss_presse.xml|#news #bullerei - presse_polizei|http://www.presseportal.de/rss/polizei.rss2|#news #bullerei - presseportal|http://www.presseportal.de/rss/presseportal.rss2|#news - prisonplanet|http://prisonplanet.com/feed.rss|#news - rawstory|http://www.rawstory.com/rs/feed/|#news - reddit_4chan|http://www.reddit.com/r/4chan/new/.rss|#news #brainfuck - reddit_anticonsum|http://www.reddit.com/r/Anticonsumption/new/.rss|#news - reddit_btc|http://www.reddit.com/r/Bitcoin/new/.rss|#news #financial - reddit_consp|http://reddit.com/r/conspiracy/.rss|#news reddit_haskell|http://www.reddit.com/r/haskell/.rss|#news reddit_nix|http://www.reddit.com/r/nixos/.rss|#news - reddit_prog|http://www.reddit.com/r/programming/new/.rss|#news - reddit_sci|http://www.reddit.com/r/science/.rss|#news - reddit_tech|http://www.reddit.com/r/technology/.rss|#news - reddit_tpp|http://www.reddit.com/r/twitchplayspokemon/.rss|#news #tpp - reddit_world|http://www.reddit.com/r/worldnews/.rss|#news - r-ethereum|http://www.reddit.com/r/ethereum/.rss|#news - reuters|http://feeds.reuters.com/Reuters/worldNews|#news - reuters-odd|http://feeds.reuters.com/reuters/oddlyEnoughNews?format=xml|#news - rt|http://rt.com/rss/news/|#news - schallurauch|http://feeds.feedburner.com/SchallUndRauch|#news - sciencemag|http://news.sciencemag.org/rss/current.xml|#news - scmp|http://www.scmp.com/rss/91/feed|#news - sec-db|http://feeds.security-database.com/SecurityDatabaseToolsWatch|#news shackspace|http://blog.shackspace.de/?feed=rss2|#news - shz_news|http://www.shz.de/nachrichten/newsticker/rss|#news - sky_busi|http://feeds.skynews.com/feeds/rss/business.xml|#news - sky_pol|http://feeds.skynews.com/feeds/rss/politics.xml|#news - sky_strange|http://feeds.skynews.com/feeds/rss/strange.xml|#news - sky_tech|http://feeds.skynews.com/feeds/rss/technology.xml|#news - sky_world|http://feeds.skynews.com/feeds/rss/world.xml|#news - slashdot|http://rss.slashdot.org/Slashdot/slashdot|#news - slate|http://feeds.slate.com/slate|#news - spiegel_eil|http://www.spiegel.de/schlagzeilen/eilmeldungen/index.rss|#news - spiegelfechter|http://feeds.feedburner.com/DerSpiegelfechter?format=xml|#news - spiegel_top|http://www.spiegel.de/schlagzeilen/tops/index.rss|#news - standardmedia_ke|http://www.standardmedia.co.ke/rss/headlines.php|#news - stern|http://www.stern.de/feed/standard/all/|#news - stz|http://www.stuttgarter-zeitung.de/rss/topthemen.rss.feed|#news - sz_politik|http://rss.sueddeutsche.de/rss/Politik|#news - sz_wirtschaft|http://rss.sueddeutsche.de/rss/Wirtschaft|#news #financial - sz_wissen|http://rss.sueddeutsche.de/rss/Wissen|#news - tagesschau|http://www.tagesschau.de/newsticker.rdf|#news - taz|http://taz.de/Themen-des-Tages/!p15;rss/|#news - telegraph|http://www.telegraph.co.uk/rss.xml|#news - telepolis|http://www.heise.de/tp/rss/news-atom.xml|#news - the_insider|http://www.theinsider.org/rss/news/headlines-xml.asp|#news - tigsource|http://www.tigsource.com/feed/|#news tinc|http://tinc-vpn.org/news/index.rss|#news - topix_b|http://www.topix.com/rss/wire/de/berlin|#news - torr_bits|http://feeds.feedburner.com/TorrentfreakBits|#news - torrentfreak|http://feeds.feedburner.com/Torrentfreak|#news - torr_news|http://feed.torrentfreak.com/Torrentfreak/|#news - travel_warnings|http://feeds.travel.state.gov/ca/travelwarnings-alerts|#news - un_afr|http://www.un.org/apps/news/rss/rss_africa.asp|#news - un_am|http://www.un.org/apps/news/rss/rss_americas.asp|#news - un_eu|http://www.un.org/apps/news/rss/rss_europe.asp|#news - un_me|http://www.un.org/apps/news/rss/rss_mideast.asp|#news - un_pac|http://www.un.org/apps/news/rss/rss_asiapac.asp|#news - un_top|http://www.un.org/apps/news/rss/rss_top.asp|#news - us_math_society|http://www.ams.org/cgi-bin/content/news_items.cgi?rss=1|#news vimperator|https://sites.google.com/a/vimperator.org/www/blog/posts.xml|#news weechat|http://dev.weechat.org/feed/atom|#news - wp_world|http://feeds.washingtonpost.com/rss/rss_blogpost|#news xkcd|https://xkcd.com/rss.xml|#news - zdnet|http://www.zdnet.com/news/rss.xml|#news ''; }; } diff --git a/krebs/3modules/announce-activation.nix b/krebs/3modules/announce-activation.nix new file mode 100644 index 000000000..5a3a788c2 --- /dev/null +++ b/krebs/3modules/announce-activation.nix @@ -0,0 +1,60 @@ +with import <stockholm/lib>; +{ config, pkgs, ... }: let + cfg = config.krebs.announce-activation; + announce-activation = pkgs.writeDash "announce-activation" '' + set -efu + message=$(${cfg.get-message}) + exec ${pkgs.irc-announce}/bin/irc-announce \ + ${shell.escape cfg.irc.server} \ + ${shell.escape (toString cfg.irc.port)} \ + ${shell.escape cfg.irc.nick} \ + ${shell.escape cfg.irc.channel} \ + "$message" + ''; + default-get-message = pkgs.writeDash "announce-activation-get-message" '' + set -efu + PATH=${makeBinPath [ + pkgs.coreutils + pkgs.gawk + pkgs.gnused + pkgs.nix + ]} + profile=/nix/var/nix/profiles/system + gen_info=$(nix-env -p "$profile" --list-generations | tail -1) + gen_no=$(echo "$gen_info" | awk '{print$1}') + pretty_name=$(sed -n '/^PRETTY_NAME=/{s/.*="//;s/"$//;p}' /etc/os-release) + echo "activating generation $gen_no $pretty_name" + ''; +in { + options.krebs.announce-activation = { + enable = mkEnableOption "announce-activation"; + get-message = mkOption { + default = default-get-message; + type = types.package; + }; + irc = { + # TODO rename channel to target? + channel = mkOption { + default = "#retiolum"; + type = types.str; # TODO types.irc-channel + }; + nick = mkOption { + default = config.krebs.build.host.name; + type = types.label; + }; + port = mkOption { + default = 6667; + type = types.int; + }; + server = mkOption { + default = "ni.r"; + type = types.hostname; + }; + }; + }; + config = mkIf cfg.enable { + system.activationScripts.announce-activation = '' + ${announce-activation} + ''; + }; +} diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index abb3d37eb..42df3f053 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -6,6 +6,7 @@ let out = { imports = [ + ./announce-activation.nix ./apt-cacher-ng.nix ./backup.nix ./bepasty-server.nix diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 257268af2..4e2d6df99 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -321,6 +321,34 @@ with import <stockholm/lib>; }; }; }; + turingmachine = { + ci = false; + external = true; + nets = { + retiolum = { + ip4.addr = "10.243.29.168"; + ip6.addr = "42:4992:6a6d:600::1"; + aliases = [ + "turingmachine.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEAxh+5HD1oAFTvMWEra2pYrA3HF8T4EnkP917lIUiuN7xUj7sawu0C + t1/1IfIlH9dbxgFe5CD/gXvokxHdovPTGVH11L+thZgq6hg/xbYvZAl76yLxj7t9 + 6+Ocac08TQZYMqWKShz5jqTVE/DLz4Cdy0Qk9sMJ1++OmH8jsWgK5BkogF99Gwf8 + ZiI0t3n3lCZsm3v592lveDcVIh6hjuCIvFVxc+7cOj0MKm1LxLWbCHZlUIE3he4g + nZu4XiYaE4Y2LicMs8zKehnQkkXrP1amT56SqUfbSnWR+HZc2+KjwRDI5BPeTS06 + 5WHwkQs0ScOn7vFZci3rElIc7vilu2eKGF1VLce9kXw9SU2RFciqavaEUXbwPnwT + 1WF35Ct+qIOP0rXoObm6mrsj7hJnlBPlVpb58/kTxLHMSHPzqQRbFZ35f6tZodJ1 + gRMKKEnMX8/VWm6TqLUIpFCCTZ5PH1fxaAnulHCxksK03UyfUOvExCTU4x8KS9fl + DIoLlV9PFBlAW8mTuIgRKYtHacsc31/5Tehcx0If09NuMFT9Qfl2/Q3p6QJomRFL + W5SCP9wx2ONhvZUkRbeihBiTN5/h3DepjOeNWd1DvE6K0Ag8SXMyBGtyKfer4ykW + OR0iCiRQQ5QBmNuJrBLRUyfoPqFUXBATT1SrRj8vzXO1TjTmANEMFD0CAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; }; users = { lass = { @@ -357,5 +385,9 @@ with import <stockholm/lib>; wine-mors = { pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEKfTIKmbe1RjX1fjAn//08363zAsI0CijWnaYyAC842"; }; + Mic92 = { + pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbBp2dH2X3dcU1zh+xW3ZsdYROKpJd3n13ssOP092qE"; + mail = "joerg@higgsboson.tk"; + }; }; } diff --git a/krebs/3modules/newsbot-js.nix b/krebs/3modules/newsbot-js.nix index 2ff9a5ebb..d372081ee 100644 --- a/krebs/3modules/newsbot-js.nix +++ b/krebs/3modules/newsbot-js.nix @@ -6,46 +6,59 @@ let cfg = config.krebs.newsbot-js; + enable = cfg != {}; + out = { options.krebs.newsbot-js = api; - config = mkIf cfg.enable imp; + config = mkIf enable imp; }; - api = { - enable = mkEnableOption "Enable krebs newsbot"; - ircServer = mkOption { - type = types.str; - default = "echelon.retiolum"; - description = "to which server the bot should connect"; - }; - channel = mkOption { - type = types.str; - default = "#news"; - description = "post the news in this channel"; - }; - masterNick = mkOption { - type = types.str; - default = "knews"; - description = "nickname of the master bot"; - }; - feeds = mkOption { - type = types.path; - description = '' - file with feeds to post - format: - $nick|$feedURI - ''; - }; - urlShortenerHost = mkOption { - type = types.str; - default = "echelon"; - description = "what server to use for url shortening, host"; - }; - urlShortenerPort = mkOption { - type = types.str; - default = "80"; - description = "what server to use for url shortening, port"; - }; + api = mkOption { + type = types.attrsOf (types.submodule ({ config, ... }: { + options = { + enable = mkEnableOption "Enable krebs newsbot" // { default = true; }; + + channel = mkOption { + type = types.str; + default = "#${config._module.args.name}"; + description = "post the news in this channel"; + }; + feeds = mkOption { + type = types.path; + description = '' + file with feeds to post + format: + $nick|$feedURI + ''; + }; + ircServer = mkOption { + type = types.str; + default = "localhost"; + description = "to which server the bot should connect"; + }; + masterNick = mkOption { + type = types.str; + default = config._module.args.name; + description = "nickname of the master bot"; + }; + package = mkOption { + type = types.package; + default = pkgs.newsbot-js; + description = "newsbot package to use"; + }; + urlShortenerHost = mkOption { + type = types.str; + default = "go"; + description = "what server to use for url shortening, host"; + }; + urlShortenerPort = mkOption { + type = types.str; + default = "80"; + description = "what server to use for url shortening, port"; + }; + }; + })); + default = {}; }; imp = { @@ -56,32 +69,33 @@ let home = "/var/empty"; }; - systemd.services.newsbot-js = { - description = "krebs newsbot"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; + systemd.services = mapAttrs' (name: newsbot: + nameValuePair "newsbot-${name}" { + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ - newsbot-js - ]; + path = with pkgs; [ + newsbot-js + ]; - environment = { - irc_server = cfg.ircServer; - master_nick = cfg.masterNick; - news_channel = cfg.channel; - feeds_file = cfg.feeds; - url_shortener_host = cfg.urlShortenerHost; - url_shortener_port = cfg.urlShortenerPort; - }; + environment = { + irc_server = newsbot.ircServer; + master_nick = newsbot.masterNick; + news_channel = newsbot.channel; + feeds_file = newsbot.feeds; + url_shortener_host = newsbot.urlShortenerHost; + url_shortener_port = newsbot.urlShortenerPort; + }; - restartIfChanged = true; + restartIfChanged = true; - serviceConfig = { - User = "newsbot-js"; - Restart = "always"; - ExecStart = "${pkgs.newsbot-js}/bin/newsbot"; - }; - }; + serviceConfig = { + User = "newsbot-js"; + Restart = "always"; + ExecStart = "${newsbot.package}/bin/newsbot"; + }; + } + ) cfg; }; in out diff --git a/krebs/3modules/rtorrent.nix b/krebs/3modules/rtorrent.nix index d85518993..472accef9 100644 --- a/krebs/3modules/rtorrent.nix +++ b/krebs/3modules/rtorrent.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, options, ... }: with import <stockholm/lib>; let @@ -73,6 +73,15 @@ let |