diff options
54 files changed, 798 insertions, 359 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..3f2f28d65 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,5 @@ +nix-shell test: + script: + - env + - nix-shell --pure --command 'true' -p stdenv && echo success + - nix-shell --pure --command 'false' -p stdenv || echo success 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 # authentication also applies to rtorrent.rutorrent enable = mkEnableOption "rtorrent nginx web RPC"; + addr = mkOption { + type = types.addr4; + default = "0.0.0.0"; + description = '' + the address to listen on + default is 0.0.0.0 + ''; + }; + port = mkOption { type = types.nullOr types.int; description ='' @@ -290,7 +299,7 @@ let services.nginx.enable = mkDefault true; services.nginx.virtualHosts.rtorrent = { default = mkDefault true; - inherit (webcfg) basicAuth port; + inherit (webcfg) basicAuth; root = optionalString rucfg.enable webdir; locations = { @@ -310,7 +319,15 @@ let include ${pkgs.nginx}/conf/fastcgi.conf; ''; } ); - }; + # workaround because upstream nginx api changed + # TODO remove when nobody uses 17.03 anymore + } // (if hasAttr "port" (head options.services.nginx.virtualHosts.type.getSubModules).submodule.options then { + port = webcfg.port; + } else { + listen = [ + { inherit (webcfg) addr port; } + ]; + }); }; rutorrent-imp = { diff --git a/krebs/5pkgs/simple/newsbot-js/default.nix b/krebs/5pkgs/simple/newsbot-js/default.nix index b52454ca4..fa39823d3 100644 --- a/krebs/5pkgs/simple/newsbot-js/default.nix +++ b/krebs/5pkgs/simple/newsbot-js/default.nix @@ -32,6 +32,7 @@ in np.buildNodePackage { phases = [ "unpackPhase" + "patchPhase" "installPhase" ]; diff --git a/krebs/5pkgs/simple/populate/default.nix b/krebs/5pkgs/simple/populate/default.nix index 1ed268cf0..3989585ab 100644 --- a/krebs/5pkgs/simple/populate/default.nix +++ b/krebs/5pkgs/simple/populate/default.nix @@ -13,12 +13,12 @@ in stdenv.mkDerivation rec { name = "populate"; - version = "1.2.3"; + version = "1.2.4"; src = fetchgit { url = http://cgit.ni.krebsco.de/populate; rev = "refs/tags/v${version}"; - sha256 = "14p9v28d5vcr5384qgycmgjh1angi2zx7qvi51651i7nd9qkjzmi"; + sha256 = "0az41vaxfwrh9l19z3cbc7in8pylrnyc0xkzk6773xg2nj4g8a28"; }; phases = [ diff --git a/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix b/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix new file mode 100644 index 000000000..963e6db8b --- /dev/null +++ b/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix @@ -0,0 +1 @@ +"lol" diff --git a/krebs/source.nix b/krebs/source.nix index 085f3c0d3..1aba3d7ff 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -14,6 +14,6 @@ in stockholm.file = toString <stockholm>; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "56da88a298a6f549701a10bb12072804a1ebfbd5"; # nixos-17.03 @ 2017-09-03 + ref = "8ed299faacbf8813fc47b4fca34f32b835d6481e"; # nixos-17.03 @ 2017-09-09 }; } diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index b3f547452..5983456b3 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -311,6 +311,22 @@ in { localAddress = "10.233.2.4"; }; } + { + #onondaga + containers.onondaga = { + config = { ... }: { + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [ + config.krebs.users.lass.pubkey + config.krebs.users.nin.pubkey + ]; + }; + enableTun = true; + privateNetwork = true; + hostAddress = "10.233.2.4"; + localAddress = "10.233.2.5"; + }; + } ]; krebs.build.host = config.krebs.hosts.prism; diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 61a352bde..7bce93ae1 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -38,6 +38,9 @@ let cgit.desc = "nixpkgs fork"; cgit.section = "configuration"; }; + populate = { + cgit.section = "software"; + }; stockholm = { cgit.desc = "take all the computers hostage, they'll love you!"; cgit.section = "configuration"; diff --git a/lass/source.nix b/lass/source.nix index 52b0d99f2..01631bef1 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -15,7 +15,7 @@ in # 87a4615 & 334ac4f # + acme permissions for groups # fd7a8f1 - ref = "fe46ffc"; + ref = "d151161"; }; secrets.file = getAttr builder { buildbot = toString <stockholm/lass/2configs/tests/dummy-secrets>; diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 110edc130..934bfa685 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -43,6 +43,7 @@ in { <stockholm/makefu/2configs/torrent.nix> <stockholm/makefu/2configs/iodined.nix> <stockholm/makefu/2configs/vpn/openvpn-server.nix> + <stockholm/makefu/2configs/dnscrypt/server.nix> ## Web <stockholm/makefu/2configs/nginx/share-download.nix> @@ -55,9 +56,7 @@ in { <stockholm/makefu/2configs/deployment/mycube.connector.one.nix> <stockholm/makefu/2configs/deployment/graphs.nix> <stockholm/makefu/2configs/deployment/owncloud.nix> - <stockholm/makefu/2configs/deployment/wiki-irc-bot> <stockholm/makefu/2configs/deployment/boot-euer.nix> - <stockholm/makefu/2configs/deployment/hound> { services.taskserver.enable = true; services.taskserver.fqdn = config.krebs.build.host.name; diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index 0df2ba6e6..4c93a7a3e 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -194,16 +194,6 @@ in { zramSwap.enable = true; - krebs.Reaktor.reaktor = { - nickname = "Reaktor|krebs"; - workdir = "/var/lib/Reaktor/krebs"; - channels = [ "#krebs" ]; - plugins = with pkgs.ReaktorPlugins;[ - stockholm-issue - nixos-version - sed-plugin - random-emoji ]; - }; krebs.Reaktor.reaktor-shack = { nickname = "Reaktor|shack"; workdir = "/var/lib/Reaktor/shack"; diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 8e8c8a736..faa29f3db 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -12,7 +12,7 @@ with import <stockholm/lib>; <stockholm/makefu/2configs/extra-fonts.nix> <stockholm/makefu/2configs/tools/all.nix> <stockholm/makefu/2configs/laptop-backup.nix> - <stockholm/makefu/2configs/dnscrypt.nix> + <stockholm/makefu/2configs/dnscrypt/client.nix> <stockholm/makefu/2configs/avahi.nix> # Debugging @@ -20,6 +20,7 @@ with import <stockholm/lib>; # Testing # <stockholm/makefu/2configs/deployment/gitlab.nix> + # <stockholm/makefu/2configs/deployment/wiki-irc-bot> # <stockholm/makefu/2configs/torrent.nix> # <stockholm/makefu/2configs/lanparty/lancache.nix> @@ -54,6 +55,7 @@ with import <stockholm/lib>; # Services <stockholm/makefu/2configs/git/brain-retiolum.nix> <stockholm/makefu/2configs/tor.nix> + <stockholm/makefu/2configs/vpn/vpngate.nix> <stockholm/makefu/2configs/steam.nix> # <stockholm/makefu/2configs/buildbot-standalone.nix> diff --git a/makefu/2configs/bepasty-dual.nix b/makefu/2configs/bepasty-dual.nix index ecf5f8a38..701bf5b1d 100644 --- a/makefu/2configs/bepasty-dual.nix +++ b/makefu/2configs/bepasty-dual.nix @@ -36,7 +36,6 @@ in { "${ext-dom}" = { nginx = { - enableSSL = true; forceSSL = true; enableACME = true; }; diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 547b73597..25f9f63bf 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -39,10 +39,10 @@ with import <stockholm/lib>; }; networking.hostName = config.krebs.build.host.name; - nix.maxJobs = config.krebs.build.host.cores; + nix.maxJobs = 2; + nix.buildCores = config.krebs.build.host.cores; time.timeZone = "Europe/Berlin"; - #nix.maxJobs = 1; programs.ssh = { startAgent = false; @@ -145,15 +145,6 @@ with import <stockholm/lib>; "net.ipv6.conf.default.use_tempaddr" = 2; }; - system.activationScripts.nix-defexpr = '' - (set -euf - for i in /home/makefu /root/;do - f="$i/.nix-defexpr" - rm -fr "$f" - ln -s /var/src/nixpkgs "$f" - done) - ''; - i18n = { consoleKeyMap = "us"; defaultLocale = "en_US.UTF-8"; diff --git a/makefu/2configs/deployment/boot-euer.nix b/makefu/2configs/deployment/boot-euer.nix index be24209bc..f890ea7ad 100644 --- a/makefu/2configs/deployment/boot-euer.nix +++ b/makefu/2configs/deployment/boot-euer.nix @@ -16,7 +16,6 @@ in { services.nginx = { enable = mkDefault true; virtualHosts."boot.euer.krebsco.de" = { - enableSSL = true; forceSSL = true; enableACME = true; locations."/" = { diff --git a/makefu/2configs/deployment/graphs.nix b/makefu/2configs/deployment/graphs.nix index b33ddece0..bde9892cd 100644 --- a/makefu/2configs/deployment/graphs.nix +++ b/makefu/2configs/deployment/graphs.nix @@ -28,7 +28,6 @@ in { ]; }; anonymous = { - enableSSL = true; forceSSL = true; enableACME = true; }; diff --git a/makefu/2configs/deployment/owncloud.nix b/makefu/2configs/deployment/owncloud.nix index 65ac5c184..3a9d57dbb 100644 --- a/makefu/2configs/deployment/owncloud.nix +++ b/makefu/2configs/deployment/owncloud.nix @@ -21,7 +21,6 @@ let services.nginx.virtualHosts."${domain}" = { forceSSL = true; enableACME = true; - enableSSL = true; serverAliases = domains; extraConfig = '' diff --git a/makefu/2configs/deployment/wiki-irc-bot/default.nix b/makefu/2configs/deployment/wiki-irc-bot/default.nix index 7ab31e698..12686efba 100644 --- a/makefu/2configs/deployment/wiki-irc-bot/default.nix +++ b/makefu/2configs/deployment/wiki-irc-bot/default.nix @@ -1,67 +1,19 @@ -{ pkgs, lib, ... }: +{ config, pkgs, ... }: -with lib; let - port = 18872; + pkg = pkgs.lib.overrideDerivation pkgs.newsbot-js (original: { + patches = [ ./wiki-output.patch ]; + }); + newsfile = pkgs.writeText "feeds" '' + nixoswiki-bot|https://nixos.wiki/api.php?days=7&limit=50&hidecategorization=1&action=feedrecentchanges&feedformat=rss|#krebs + ''; in { - nixpkgs.config.packageOverrides = pkgs: with pkgs; { - logstash = pkgs.stdenv.lib.overrideDerivation pkgs.logstash (old: { - patches = [ ./irc-out-notice.patch ]; }); - }; - services.logstash = { + krebs.newsbot-js = { enable = true; - inputConfig = '' - http { - port => ${toString port} - host => "127.0.0.1" - } - ''; - filterConfig = '' - if ([pages]) { - ruby { - code => ' - require "net/http" - require "net/https" - http = Net::HTTP.new("git.io", 443) - http.use_ssl = true - lines = [] - event["pages"].each {|p| - url = "#{p["html_url"]}/_compare/#{p["sha"]}" - short_url = begin - request = Net::HTTP::Post.new "/" - request.set_form_data ({"url" => url }) - response = http.request(request) - response["location"] - end - lines << "\"#{p["title"]}\" #{p["action"]} by #{event["sender"]["login"]} #{short_url}" - } - event["output"] = lines.join("\n") - ' - } - } - ''; - outputConfig = '' - file { path => "/tmp/logs.json" codec => "json_lines" } - if [output] { - irc { - channels => [ "#krebs", "#nixos" ] - host => "irc.freenode.net" - nick => "nixos-users-wiki" - format => "%{output}" - notice => true - } - } - ''; - plugins = [ ]; - }; - - services.nginx = { - enable = lib.mkDefault true; - virtualHosts."ghook.krebsco.de" = { - locations."/".proxyPass = "http://localhost:${toString port}/"; - enableSSL = true; - enableACME = true; - forceSSL = true; - }; + package = pkg; + ircServer = "chat.freenode.net"; + feeds = newsfile; + urlShortenerHost = "go"; + urlShortenerPort = "80"; }; } diff --git a/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch b/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch deleted file mode 100644 index 040643f81..000000000 --- a/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch +++ /dev/null @@ -1,26 +0,0 @@ -index b63339d..8c8c747 100644 ---- a/vendor/bundle/jruby/1.9/gems/logstash-output-irc-2.0.4/lib/logstash/outputs/irc.rb -+++ b/vendor/bundle/jruby/1.9/gems/logstash-output-irc-2.0.4/lib/logstash/outputs/irc.rb -@@ -48,6 +48,9 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base - # Static string after event - config :post_string, :validate => :string, :required => false - -+ # Set this to true to send messages as notice -+ config :notice, :validate => :boolean, :default => false -+ - public - - def inject_bot(bot) -@@ -90,9 +93,9 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base - - @bot.channels.each do |channel| - @logger.debug("Sending to...", :channel => channel, :text => text) -- channel.msg(pre_string) if !@pre_string.nil? -- channel.msg(text) -- channel.msg(post_string) if !@post_string.nil? -+ channel.send(pre_string, :notice => @notice) if !@pre_string.nil? -+ channel.send(text, :notice => @notice) -+ channel.send(post_string, :notice => @notice) if !@post_string.nil? - end # channels.each - end # def receive - end # class LogStash::Outputs::Irc diff --git a/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch b/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch new file mode 100644 index 000000000..6e1e27853 --- /dev/null +++ b/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch @@ -0,0 +1,45 @@ +diff --git a/newsbot.js b/newsbot.js +index 42d0666..a284011 100644 +--- a/newsbot.js ++++ b/newsbot.js +@@ -92,8 +92,9 @@ function create_feedbot (nick, uri, channels) { + } + + function broadcast_new_item (item) { ++ console.log('Broadcasting item ',item.link) + return getShortLink(item.link, function (error, shortlink) { +- return broadcast(item.title + ' ' + shortlink) ++ return broadcast('"'+ item.title + '" edited by ' + item.author + ' ' + shortlink) + }) + } + +@@ -152,15 +153,18 @@ function create_feedbot (nick, uri, channels) { + + if (client.lastItems) { + items.forEach(function (item) { +- if (!client.lastItems.hasOwnProperty(item.title)) { ++ ++ if (!client.lastItems.hasOwnProperty(item.guid)) { + broadcast_new_item(item) ++ }else { ++ console.log("Item already seen:",item.guid) + } + }) + } + + client.lastItems = {} + items.forEach(function (item) { +- client.lastItems[item.title] = true ++ client.lastItems[item.guid] = true + }) + + return continue_loop() +@@ -199,6 +203,8 @@ function run_command (methodname, params, callback) { + } + + function getShortLink (link, callback) { ++ callback(null,link) ++ return + var form = new FormData() + try { + form.append('uri', link) diff --git a/makefu/2configs/dnscrypt.nix b/makefu/2configs/dnscrypt.nix deleted file mode 100644 index 6e7ef0f82..000000000 --- a/makefu/2configs/dnscrypt.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - services.dnscrypt-proxy.enable = true; - services.dnscrypt-proxy.resolverName = "cs-de"; - networking.extraResolvconfConf = '' - name_servers='127.0.0.1' - ''; -} diff --git a/makefu/2configs/dnscrypt/client.nix b/makefu/2configs/dnscrypt/client.nix new file mode 100644 index 000000000..988fb4a7d --- /dev/null +++ b/makefu/2configs/dnscrypt/client.nix @@ -0,0 +1,19 @@ +{ config, ... }: +let + customResolver = { + # TODO: put this somewhere else + address = config.krebs.hosts.gum.nets.internet.ip4.addr; + port = 15251; + name = "2.dnscrypt-cert.euer.krebsco.de"; + # dnscrypt-wrapper --show-provider-publickey --provider-publickey-file public.key + key = "1AFC:E58D:F242:0FBB:9EE9:4E51:47F4:5373:D9AE:C2AB:DD96:8448:333D:5D79:272C:A44C"; + }; +in { + services.dnscrypt-proxy = { + enable = true; + inherit customResolver; + }; + networking.extraResolvconfConf = '' + name_servers='127.0.0.1' + ''; +} diff --git a/makefu/2configs/dnscrypt/server.nix b/makefu/2configs/dnscrypt/server.nix new file mode 100644 index 000000000..79305e727 --- /dev/null +++ b/makefu/2configs/dnscrypt/server.nix @@ -0,0 +1,26 @@ +{ config, ... }: +let + # TODO: dataDir is currently not provided by upstream + # data = config.services.dnscrypt-wrapper.dataDir; + data = "/var/lib/dnscrypt-wrapper"; + sec = toString <secrets>; + port = 15251; + user = "dnscrypt-wrapper"; +in { + services.dnscrypt-wrapper = { + enable = true; + address = "0.0.0.0"; + upstream.address = "8.8.8.8"; + providerName = "2.dnscrypt-cert.euer.krebsco.de"; + inherit port; + }; + networking.firewall.allowedUDPPorts = [ port ]; + systemd.services.prepare-dnscrypt-wrapper-keys = { + wantedBy = [ "dnscrypt-wrapper.service" ]; + before = [ "dnscrypt-wrapper.service" ]; + script = '' + install -m700 -o ${user} -v ${sec}/dnscrypt-public.key ${data}/public.key + install -m700 -o ${user} -v ${sec}/dnscrypt-secret.key ${data}/secret.key + ''; + }; +} diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix index b89bfadfd..30c0b0b87 100644 --- a/makefu/2configs/git/cgit-retiolum.nix +++ b/makefu/2configs/git/cgit-retiolum.nix @@ -22,6 +22,7 @@ let cgit.desc = "Build new Stockholm hosts"; }; cac-api = { }; + euer_blog = { }; ampel = { }; init-stockholm = { cgit.desc = "Init stuff for stockholm"; diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix index 02bd8bb01..81c4bf4c8 100644 --- a/makefu/2configs/hw/tp-x2x0.nix +++ b/makefu/2configs/hw/tp-x2x0.nix @@ -2,6 +2,9 @@ with import <stockholm/lib>; { + imports = [ + ./tpm.nix + ]; networking.wireless.enable = lib.mkDefault true; hardware.enableAllFirmware = true; diff --git a/makefu/2configs/hw/tpm.nix b/makefu/2configs/hw/tpm.nix new file mode 100644 index 000000000..29e19e916 --- /dev/null +++ b/makefu/2configs/hw/tpm.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + services.tcsd.enable = true; + # see https://wiki.archlinux.org/index.php/Trusted_Platform_Module + environment.systemPackages = with pkgs; [ opencryptoki tpm-tools ]; +} diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix index 3fb629394..65d36d9b6 100644 --- a/makefu/2configs/nginx/euer.blog.nix +++ b/makefu/2configs/nginx/euer.blog.nix @@ -33,7 +33,6 @@ in { virtualHosts = { "euer.krebsco.de" = { #serverAliases = [ "blog.euer.krebsco.de" "blog.${hostname}" ]; - enableSSL = true; enableACME = true; forceSSL = true; root = base-dir; diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix index fefdd6dc7..ef2c17c63 100644 --- a/makefu/2configs/nginx/euer.wiki.nix +++ b/makefu/2configs/nginx/euer.wiki.nix @@ -79,7 +79,6 @@ in { # "wiki.makefu.retiolum" # "wiki.makefu" #]; - enableSSL = true; forceSSL = true; enableACME = true; # recommendedGzipSettings = true; diff --git a/makefu/2configs/nginx/share-download.nix b/makefu/2configs/nginx/share-download.nix index 65c44b294..828a66a74 100644 --- a/makefu/2configs/nginx/share-download.nix +++ b/makefu/2configs/nginx/share-download.nix @@ -10,7 +10,6 @@ with import <stockholm/lib>; root = config.makefu.dl-dir; extraConfig = "autoindex on;"; forceSSL = true; - enableSSL = true; enableACME = true; basicAuth = import <secrets/dl.euer.krebsco.de-auth.nix>; }; diff --git a/makefu/2configs/tools/all.nix b/makefu/2configs/tools/all.nix index 31c959d47..c7a116918 100644 --- a/makefu/2configs/tools/all.nix +++ b/makefu/2configs/tools/all.nix @@ -8,5 +8,7 @@ ./games.nix ./media.nix ./sec.nix + ./sec-gui.nix + ./studio.nix ]; } diff --git a/makefu/2configs/tools/core-gui.nix b/makefu/2configs/tools/core-gui.nix index f409b68a2..0538647ae 100644 --- a/makefu/2configs/tools/core-gui.nix +++ b/makefu/2configs/tools/core-gui.nix @@ -20,6 +20,5 @@ xdotool xorg.xbacklight scrot - wireshark ]; } diff --git a/makefu/2configs/tools/sec-gui.nix b/makefu/2configs/tools/sec-gui.nix new file mode 100644 index 000000000..2db3e4391 --- /dev/null +++ b/makefu/2configs/tools/sec-gui.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + krebs.per-user.makefu.packages = with pkgs; [ + tpmmanager + wireshark + ]; +} diff --git a/makefu/2configs/tools/sec.nix b/makefu/2configs/tools/sec.nix index 5fb9a5fc8..817cd9ead 100644 --- a/makefu/2configs/tools/sec.nix +++ b/makefu/2configs/tools/sec.nix @@ -13,5 +13,6 @@ thc-hydra borgbackup ledger + u3_tool ]; } diff --git a/makefu/2configs/tools/studio.nix b/makefu/2configs/tools/studio.nix new file mode 100644 index 000000000..add021acd --- /dev/null +++ b/makefu/2configs/tools/studio.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + users.users.makefu.packages = with pkgs; [ + obs-studio + studio-link + audacity + owncloudclient + ]; +} diff --git a/makefu/2configs/vim.nix b/makefu/2configs/vim.nix index 524caf8f5..9f3a59717 100644 --- a/makefu/2configs/vim.nix +++ b/makefu/2configs/vim.nix @@ -22,7 +22,7 @@ in { set nocompatible syntax on set list - set listchars=tab:▸ + set listchars=tab:▸\ "set list listchars=tab:>-,trail:.,extends:> filetype off diff --git a/makefu/2configs/vpn/vpngate.nix b/makefu/2configs/vpn/vpngate.nix index bf3101b19..acf9e9cfe 100644 --- a/makefu/2configs/vpn/vpngate.nix +++ b/makefu/2configs/vpn/vpngate.nix @@ -1,5 +1,113 @@ { pkgs, ... }: { + services.openvpn.servers.vpngate-france = { + config = '' + dev tun + proto udp + remote coreeu1.opengw.net 1194 + cipher AES-128-CBC + auth SHA1 + resolv-retry infinite + nobind + persist-key + persist-tun + client + verb 3 + + <ca> + -----BEGIN CERTIFICATE----- + MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB + hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G + A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV + BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5 + MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT + EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR + Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh + dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR + 6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X + pz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC + 9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+5eNu/Nio5JIk2kNrYrhV + /erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pGx8cgoLEf + Zd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z + +pUX2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7w + qP/0uK3pN/u6uPQLOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZah + SL0896+1DSJMwBGB7FY79tOi4lu3sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVIC + u9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+CGCe01a60y1Dma/RMhnEw6abf + Fobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5WdYgGq/yapiq + crxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E + FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB + /wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvl + wFTPoCWOAvn9sKIN9SCYPBMtrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM + 4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV + 2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna + FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ + CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK + boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke + jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL + S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb + QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl + 0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB + NVOFBkpdn627G190 + -----END CERTIFICATE----- + + </ca> + + + <cert> + -----BEGIN CERTIFICATE----- + MIICxjCCAa4CAQAwDQYJKoZIhvcNAQEFBQAwKTEaMBgGA1UEAxMRVlBOR2F0ZUNs + aWVudENlcnQxCzAJBgNVBAYTAkpQMB4XDTEzMDIxMTAzNDk0OVoXDTM3MDExOTAz + MTQwN1owKTEaMBgGA1UEAxMRVlBOR2F0ZUNsaWVudENlcnQxCzAJBgNVBAYTAkpQ + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5h2lgQQYUjwoKYJbzVZA + 5VcIGd5otPc/qZRMt0KItCFA0s9RwReNVa9fDRFLRBhcITOlv3FBcW3E8h1Us7RD + 4W8GmJe8zapJnLsD39OSMRCzZJnczW4OCH1PZRZWKqDtjlNca9AF8a65jTmlDxCQ + CjntLIWk5OLLVkFt9/tScc1GDtci55ofhaNAYMPiH7V8+1g66pGHXAoWK6AQVH67 + XCKJnGB5nlQ+HsMYPV/O49Ld91ZN/2tHkcaLLyNtywxVPRSsRh480jju0fcCsv6h + p/0yXnTB//mWutBGpdUlIbwiITbAmrsbYnjigRvnPqX1RNJUbi9Fp6C2c/HIFJGD + ywIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQChO5hgcw/4oWfoEFLu9kBa1B//kxH8 + hQkChVNn8BRC7Y0URQitPl3DKEed9URBDdg2KOAz77bb6ENPiliD+a38UJHIRMqe + UBHhllOHIzvDhHFbaovALBQceeBzdkQxsKQESKmQmR832950UCovoyRB61UyAV7h + +mZhYPGRKXKSJI6s0Egg/Cri+Cwk4bjJfrb5hVse11yh4D9MHhwSfCOH+0z4hPUT + Fku7dGavURO5SVxMn/sL6En5D+oSeXkadHpDs+Airym2YHh15h0+jPSOoR6yiVp/ + 6zZeZkrN43kuS73KpKDFjfFPh8t4r1gOIjttkNcQqBccusnplQ7HJpsk + -----END CERTIFICATE----- + + </cert> + + <key> + -----BEGIN RSA PRIVATE KEY----- + MIIEpAIBAAKCAQEA5h2lgQQYUjwoKYJbzVZA5VcIGd5otPc/qZRMt0KItCFA0s9R + wReNVa9fDRFLRBhcITOlv3FBcW3E8h1Us7RD4W8GmJe8zapJnLsD39OSMRCzZJnc + zW4OCH1PZRZWKqDtjlNca9AF8a65jTmlDxCQCjntLIWk5OLLVkFt9/tScc1GDtci + 55ofhaNAYMPiH7V8+1g66pGHXAoWK6AQVH67XCKJnGB5nlQ+HsMYPV/O49Ld91ZN + /2tHkcaLLyNtywxVPRSsRh480jju0fcCsv6hp/0yXnTB//mWutBGpdUlIbwiITbA + mrsbYnjigRvnPqX1RNJUbi9Fp6C2c/HIFJGDywIDAQABAoIBAERV7X5AvxA8uRiK + k8SIpsD0dX1pJOMIwakUVyvc4EfN0DhKRNb4rYoSiEGTLyzLpyBc/A28Dlkm5eOY + fjzXfYkGtYi/Ftxkg3O9vcrMQ4+6i+uGHaIL2rL+s4MrfO8v1xv6+Wky33EEGCou + QiwVGRFQXnRoQ62NBCFbUNLhmXwdj1akZzLU4p5R4zA3QhdxwEIatVLt0+7owLQ3 + lP8sfXhppPOXjTqMD4QkYwzPAa8/zF7acn4kryrUP7Q6PAfd0zEVqNy9ZCZ9ffho + zXedFj486IFoc5gnTp2N6jsnVj4LCGIhlVHlYGozKKFqJcQVGsHCqq1oz2zjW6LS + oRYIHgECgYEA8zZrkCwNYSXJuODJ3m/hOLVxcxgJuwXoiErWd0E42vPanjjVMhnt + KY5l8qGMJ6FhK9LYx2qCrf/E0XtUAZ2wVq3ORTyGnsMWre9tLYs55X+ZN10Tc75z + 4hacbU0hqKN1HiDmsMRY3/2NaZHoy7MKnwJJBaG48l9CCTlVwMHocIECgYEA8jby + dGjxTH+6XHWNizb5SRbZxAnyEeJeRwTMh0gGzwGPpH/sZYGzyu0SySXWCnZh3Rgq + 5uLlNxtrXrljZlyi2nQdQgsq2YrWUs0+zgU+22uQsZpSAftmhVrtvet6MjVjbByY + DADciEVUdJYIXk+qnFUJyeroLIkTj7WYKZ6RjksCgYBoCFIwRDeg42oK89RFmnOr + LymNAq4+2oMhsWlVb4ejWIWeAk9nc+GXUfrXszRhS01mUnU5r5ygUvRcarV/T3U7 + TnMZ+I7Y4DgWRIDd51znhxIBtYV5j/C/t85HjqOkH+8b6RTkbchaX3mau7fpUfds + Fq0nhIq42fhEO8srfYYwgQKBgQCyhi1N/8taRwpk+3/IDEzQwjbfdzUkWWSDk9Xs + H/pkuRHWfTMP3flWqEYgW/LW40peW2HDq5imdV8+AgZxe/XMbaji9Lgwf1RY005n + KxaZQz7yqHupWlLGF68DPHxkZVVSagDnV/sztWX6SFsCqFVnxIXifXGC4cW5Nm9g + va8q4QKBgQCEhLVeUfdwKvkZ94g/GFz731Z2hrdVhgMZaU/u6t0V95+YezPNCQZB + wmE9Mmlbq1emDeROivjCfoGhR3kZXW1pTKlLh6ZMUQUOpptdXva8XxfoqQwa3enA + M7muBbF0XN7VO80iJPv+PmIZdEIAkpwKfi201YB+BafCIuGxIF50Vg== + -----END RSA PRIVATE KEY----- + + </key> + ''; + autoStart = false; + updateResolvConf = false; + }; services.openvpn.servers.vpngate-japan = { config = '' dev tun diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix index 7615f4c0c..f280fc852 100644 --- a/makefu/2configs/zsh-user.nix +++ b/makefu/2configs/zsh-user.nix @@ -88,7 +88,7 @@ in ''; }; - krebs.per-user.${mainUser}.packages = [ + users.users.${mainUser}.packages = [ pkgs.nix-zsh-completions pkgs.fzf ]; diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index 00df56bee..af0e81df5 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -15,6 +15,7 @@ _: ./torrent.nix ./udpt.nix ./umts.nix + ./wvdial.nix ]; } diff --git a/makefu/3modules/wvdial.nix b/makefu/3modules/wvdial.nix new file mode 100644 index 000000000..982f4a7db --- /dev/null +++ b/makefu/3modules/wvdial.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: +# from 17.03/nixos/modules/programs/wvdial.nix + +with lib; + +let + + configFile = '' + [Dialer Defaults] + PPPD PATH = ${pkgs.ppp}/sbin/pppd + ${config.environment.wvdial.dialerDefaults} + ''; + + cfg = config.environment.wvdial; + +in +{ + ###### interface + + options = { + + environment.wvdial = { + + dialerDefaults = mkOption { + default = ""; + type = types.str; + example = ''Init1 = AT+CGDCONT=1,"IP","internet.t-mobile"''; + description = '' + Contents of the "Dialer Defaults" section of + <filename>/etc/wvdial.conf</filename>. + ''; + }; + + pppDefaults = mkOption { + default = '' + noipdefault + usepeerdns + defaultroute + persist + noauth + ''; + type = types.str; + description = "Default ppp settings for wvdial."; + }; + + }; + + }; + + ###### implementation + + config = mkIf (cfg.dialerDefaults != "") { + + environment = { + + etc = + [ + { source = pkgs.writeText "wvdial.conf" configFile; + target = "wvdial.conf"; + } + { source = pkgs.writeText "wvdial" cfg.pppDefaults; + target = "ppp/peers/wvdial"; + } + ]; + + }; + + }; + +} diff --git a/makefu/5pkgs/drozer/default.nix b/makefu/5pkgs/drozer/default.nix index c63f1d0d8..f91d5b984 100644 --- a/makefu/5pkgs/drozer/default.nix +++ b/makefu/5pkgs/drozer/default.nix @@ -5,9 +5,10 @@ pythonPackages.buildPythonApplication rec { version = "2.4.3"; buildInputs = [ jdk7 ]; propagatedBuildInputs = with pythonPackages; [ - protobuf + protobuf3_2 pyopenssl pyyaml + ] ++ [ jre7 twisted ]; diff --git a/makefu/5pkgs/gen-oath-safe/default.nix b/makefu/5pkgs/gen-oath-safe/default.nix index 245e65174..344dc1a02 100644 --- a/makefu/5pkgs/gen-oath-safe/default.nix +++ b/makefu/5pkgs/gen-oath-safe/default.nix @@ -1,7 +1,8 @@ { coreutils, makeWrapper, openssl, libcaca, qrencode, fetchFromGitHub, yubikey-manager, python, stdenv, ... }: -stdenv.mkDerivation { - name = "geno-oath-safe-2017-06-30"; +builtins.trace "Warning: HTOP mode of gen-oath-safe is currently broken" + stdenv.mkDerivation { + name = "gen-oath-safe-2017-06-30"; src = fetchFromGitHub { owner = "mcepl"; repo = "gen-oath-safe"; @@ -23,7 +24,7 @@ stdenv.mkDerivation { coreutils openssl qrencode - yubikey-manager + #yubikey-manager libcaca python ]; diff --git a/makefu/5pkgs/u3_tool/default.nix b/makefu/5pkgs/u3_tool/default.nix new file mode 100644 index 000000000..e8c5573a8 --- /dev/null +++ b/makefu/5pkgs/u3_tool/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + proj = "u3-tool"; + name = "${proj}-${version}"; + version = "0.3"; + + enableParallelBuilding = true; + + src = fetchurl { + url = "mirror://sourceforge/${proj}/${name}.tar.gz"; + sha256 = "1p9c9kibd1pdbdfa0nd0i3n7bvzi3xg0chm38jg3xfl8gsn0390f"; + }; + + meta = { + description = "Tool for controlling the special features of a 'U3 smart drive' USB Flash disk."; + homepage = https://sourceforge.net/projects/u3-tool/ ; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ makefu ]; + }; +} diff --git a/makefu/source.nix b/makefu/source.nix index 31243c2fd..fdd367cba 100644 --- a/makefu/source.nix +++ b/makefu/source.nix @@ -11,10 +11,10 @@ let then "buildbot" else "makefu"; _file = <stockholm> + "/makefu/1systems/${name}/source.nix"; - ref = "9d4bd6b"; # unstable @ 2017-07-31 + ref = "c91346e"; # unstable @ 2017-09-04 # + graceful requests2 (a772c3aa) - # + libpurple bitlbee ( ce6fe1a, 65e38b7 ) - # + buildbot-runner ( f3cecc5 ) + # + mitmproxy fix (eee2d174) + # + tpm-tools fix (5cb9987) in evalSource (toString _file) [ diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 730b055a2..241a16b25 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -88,7 +88,15 @@ with import <stockholm/lib>; }; environment.variables = { - NIX_PATH = mkForce "secrets=/var/src/stockholm/null:/var/src"; + NIX_PATH = mkForce (concatStringsSep ":" [ + "secrets=/var/src/stockholm/null" + "nixpkgs-overlays=${pkgs.runCommand "nixpkgs-overlays" {} '' + mkdir $out + ln -s /home/tv/stockholm/krebs/5pkgs $out/krebs + ln -s /home/tv/stockholm/tv/5pkgs $out/tv + ''}" + "/var/src" + ]); }; } |