summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-07-17 19:38:46 +0200
committerjeschli <jeschli@gmail.com>2018-07-17 19:38:46 +0200
commit113a6cb4192693d06651d8e51626c681accfc28b (patch)
tree80c00b9a158e2b57039ae49799a9f04b1ebc6228
parent8abbda9061c7fc3f04ca580a7435085cab8a8c83 (diff)
parent74698c904460db569a3c6c8355c0b25a94c98800 (diff)
Merge remote-tracking branch 'origin/master'
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix25
-rw-r--r--krebs/krops.nix2
-rw-r--r--lass/1systems/helios/config.nix3
-rw-r--r--lass/1systems/mors/config.nix4
-rw-r--r--lass/1systems/prism/config.nix19
-rw-r--r--lass/2configs/browsers.nix2
-rw-r--r--lass/2configs/dcso-dev.nix9
-rw-r--r--lass/2configs/exim-smarthost.nix1
-rw-r--r--lass/2configs/git.nix8
-rw-r--r--lass/2configs/vim.nix28
-rw-r--r--lass/2configs/websites/domsen.nix8
-rw-r--r--makefu/1systems/nextgum/config.nix3
12 files changed, 76 insertions, 36 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix
index 96e0af2d7..db578c457 100644
--- a/krebs/5pkgs/simple/Reaktor/plugins.nix
+++ b/krebs/5pkgs/simple/Reaktor/plugins.nix
@@ -121,21 +121,26 @@ rec {
pattern = "^.*(?P<args>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$";
path = with pkgs; [ curl perl ];
script = pkgs.writePython3 "url-title" [ "beautifulsoup4" "lxml" ] ''
+ import cgi
import sys
import urllib.request
from bs4 import BeautifulSoup
try:
- soup = BeautifulSoup(urllib.request.urlopen(sys.argv[1]), "lxml")
- title = soup.find('title').string
-
- if title:
- if len(title) > 512:
- print('message to long, skipped')
- elif len(title.split('\n')) > 5:
- print('to many lines, skipped')
- else:
- print(title)
+ req = urllib.request.Request(sys.argv[1])
+ req.add_header('user-agent', 'Reaktor-url-title')
+ resp = urllib.request.urlopen(req)
+ if resp.headers['content-type'].find('text/html') >= 0:
+ soup = BeautifulSoup(resp.read(16000), "lxml")
+ title = soup.find('title').string
+
+ if len(title.split('\n')) > 5:
+ title = '\n'.join(title.split('\n')[:5])
+
+ print(title[:450])
+ else:
+ cd_header = resp.headers['content-disposition']
+ print(cgi.parse_header(cd_header)[1]['filename'])
except: # noqa: E722
pass
'';
diff --git a/krebs/krops.nix b/krebs/krops.nix
index 6a8a05726..861f2d323 100644
--- a/krebs/krops.nix
+++ b/krebs/krops.nix
@@ -12,7 +12,7 @@
krebs-source = {
nixpkgs.git = {
- ref = "91b286c8935b8c5df4a99302715200d3bd561977";
+ ref = "56fad146a12a6f934d1d5ef875eb729be1b19129";
url = https://github.com/NixOS/nixpkgs;
};
stockholm.file = toString ../.;
diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix
index bd7f75c3e..5657742a6 100644
--- a/lass/1systems/helios/config.nix
+++ b/lass/1systems/helios/config.nix
@@ -71,6 +71,9 @@ with import <stockholm/lib>;
hashPassword
thunderbird
dpass
+
+ # we want tensorflow! (with GPU acceleration)
+ python3Packages.tensorflowWithCuda
];
users.users = {
diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix
index 065ab2396..ad4f8a504 100644
--- a/lass/1systems/mors/config.nix
+++ b/lass/1systems/mors/config.nix
@@ -55,6 +55,7 @@ with import <stockholm/lib>;
services.nginx = {
enable = true;
virtualHosts.default = {
+ default = true;
serverAliases = [
"localhost"
"${config.krebs.build.host.name}"
@@ -80,9 +81,6 @@ with import <stockholm/lib>;
client.enable = true;
};
}
- {
- services.mongodb.enable = true;
- }
];
krebs.build.host = config.krebs.hosts.mors;
diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix
index 2626ebf33..6be45d38d 100644
--- a/lass/1systems/prism/config.nix
+++ b/lass/1systems/prism/config.nix
@@ -315,21 +315,6 @@ with import <stockholm/lib>;
};
};
}
- { #weechat port forwarding to blue
- krebs.iptables.tables.filter.INPUT.rules = [
- { predicate = "-p tcp --dport 9998"; target = "ACCEPT";}
- ];
- krebs.iptables.tables.nat.PREROUTING.rules = [
- { v6 = false; precedence = 1000; predicate = "-d ${config.krebs.hosts.prism.nets.internet.ip4.addr} -p tcp --dport 9998"; target = "DNAT --to-destination ${config.krebs.hosts.blue.nets.retiolum.ip4.addr}:9999"; }
- ];
- krebs.iptables.tables.filter.FORWARD.rules = [
- { v6 = false; precedence = 1000; predicate = "-d ${config.krebs.hosts.blue.nets.retiolum.ip4.addr} -p tcp --dport 9999"; target = "ACCEPT"; }
- { v6 = false; precedence = 1000; predicate = "-s ${config.krebs.hosts.blue.nets.retiolum.ip4.addr}"; target = "ACCEPT"; }
- ];
- krebs.iptables.tables.nat.POSTROUTING.rules = [
- { v6 = false; predicate = "-d ${config.krebs.hosts.blue.nets.retiolum.ip4.addr} -p tcp --dport 9999"; target = "MASQUERADE"; }
- ];
- }
{
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p udp --dport 51820"; target = "ACCEPT"; }
@@ -376,4 +361,8 @@ with import <stockholm/lib>;
krebs.build.host = config.krebs.hosts.prism;
# workaround because grub store paths are broken
boot.copyKernels = true;
+ services.earlyoom = {
+ enable = true;
+ freeMemThreshold = 5;
+ };
}
diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix
index 3030d8faf..272169e92 100644
--- a/lass/2configs/browsers.nix
+++ b/lass/2configs/browsers.nix
@@ -90,7 +90,7 @@ in {
}
( createQuteUser "qb" [ "audio" ] 20 )
( createFirefoxUser "ff" [ "audio" ] 10 )
- ( createChromiumUser "cr" [ "audio" ] 9 )
+ ( createChromiumUser "cr" [ "audio" "video" ] 9 )
( createChromiumUser "gm" [ "video" "audio" ] 8 )
( createChromiumUser "wk" [ "audio" ] 0 )
( createChromiumUser "fb" [ "audio" ] 0 )
diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix
index 0996d21c1..4d8d308fb 100644
--- a/lass/2configs/dcso-dev.nix
+++ b/lass/2configs/dcso-dev.nix
@@ -17,6 +17,7 @@ in {
openssh.authorizedKeys.keys = [
config.krebs.users.lass.pubkey
config.krebs.users.lass-android.pubkey
+ config.krebs.users.lass-mors.pubkey
config.krebs.users.jeschli-bln.pubkey
config.krebs.users.jeschli-brauerei.pubkey
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1T5+2epslFARSnETdr4wdolA6ocJaD4H9tmz6BZFQKXlwIq+OMp+sSEdwYwW3Lu9+mNbBHPxVVJDWg/We9DXB0ezXPM5Bs1+FcehmkoGwkmgKaFCDt0sL+CfSnog/3wEkN21O/rQxVFqMmiJ7WUDGci6IKCFZ5ZjOsmmfHg5p3LYxU9xv33fNr2v+XauhrGbFtQ7eDz4kSywxN/aw73LN4d8em0V0UV8VPI3Qkw7MamDFwefA+K1TfK8pBzMeruU6N7HLuNkpkAp7kS+K4Zzd72aQtR37a5qMiFUbOxQ9B7iFypuPx0iu6ZwY1s/sM8t3kLmcDJ9O4FOTzlbpneet3as6iJ+Ckr/TlfKor2Tl5pWcXh2FXHoG8VUu5bYmIViJBrKihAlAQfQN0mJ9fdFTnCXVTtbYTy11s4eEVHgUlb7oSpgBnx5bnBONgApbsOX9zyoo8wz8KkZBcf1SQpkV5br8uUAHCcZtHuY6I3kKlv+8lJmgUipiYzMdTi7+dHa49gVEcEKL4ZnJ0msQkl4XT7JjKETLvumC4/TIqVuRu48wuYalkCR9OzxCsTXQ/msBJBztPdYLrEOXVb2HfzuCT+43UuMQ5rP/EoPy0TWQO9BaqfEXqvbOvWjVxj/GMvglQ2ChZTwHxwwTKB8qRVvJLnbZQwizQiSrkzjb6hRJfQ== u0_a165@localhost"
@@ -63,4 +64,12 @@ in {
networking.interfaces.et0.ipv4.addresses = [
{ address = "10.99.23.1"; prefixLength = 24; }
];
+ virtualisation.docker.enable = true;
+ environment.etc."docker/daemon.json".source = pkgs.writeText "daemon.json" ''
+ {
+ "bip": "172.25.0.1/16"
+ }
+ '';
+ services.rabbitmq.enable = true;
+ services.postgresql.enable = true;
}
diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix
index 371f20885..db6bda005 100644
--- a/lass/2configs/exim-smarthost.nix
+++ b/lass/2configs/exim-smarthost.nix
@@ -83,6 +83,7 @@ with import <stockholm/lib>;
{ from = "elitedangerous@lassul.us"; to = lass.mail; }
{ from = "boardgamegeek@lassul.us"; to = lass.mail; }
{ from = "qwertee@lassul.us"; to = lass.mail; }
+ { from = "zazzle@lassul.us"; to = lass.mail; }
];
system-aliases = [
{ from = "mailer-daemon"; to = "postmaster"; }
diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix
index 707796dd9..829e62269 100644
--- a/lass/2configs/git.nix
+++ b/lass/2configs/git.nix
@@ -30,6 +30,14 @@ let
rules = concatMap make-rules (attrValues repos);
public-repos = mapAttrs make-public-repo {
+ cholerab = {
+ cgit.desc = "krebs thesauron & enterprise-patterns";
+ cgit.section = "documentation";
+ };
+ disko = {
+ cgit.desc = "take a description of your disk layout and produce a format script";
+ cgit.section = "software";
+ };
news = {
cgit.desc = "take a rss feed and a timeout and print it to stdout";
cgit.section = "software";
diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix
index 6014fd082..823d9a8ca 100644
--- a/lass/2configs/vim.nix
+++ b/lass/2configs/vim.nix
@@ -2,6 +2,12 @@
with import <stockholm/lib>;
let
+ unstable_nixpkgs = import (pkgs.fetchFromGitHub {
+ owner = "NixOS";
+ repo = "nixpkgs";
+ rev = "a8c71037e041725d40fbf2f3047347b6833b1703";
+ sha256 = "1z4cchcw7qgjhy0x6mnz7iqvpswc2nfjpdynxc54zpm66khfrjqw";
+ }) {};
out = {
environment.systemPackages = [
(hiPrio vim)
@@ -9,6 +15,10 @@ let
(pkgs.writeDashBin "govet" ''
go vet "$@"
'')
+ (hiPrio (unstable_nixpkgs.python3.withPackages (ps: [
+ ps.python-language-server
+ ps.pyls-isort
+ ])))
];
environment.etc.vimrc.source = vimrc;
@@ -68,11 +78,17 @@ let
au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile
"Syntastic config
- let g:syntastic_python_checkers=['flake8']
- let g:syntastic_python_flake8_post_args='--ignore=E501'
+ "let g:syntastic_python_checkers=['flake8']
+ "let g:syntastic_python_flake8_post_args='--ignore=E501'
- let g:go_metalinter_autosave = 1
- let g:go_metalinter_deadline = "10s"
+ nnoremap <F5> :call LanguageClient_contextMenu()<CR>
+ set hidden
+ let g:LanguageClient_serverCommands = {
+ \ 'python': ['pyls'],
+ \ 'go': ['~/go/bin/go-langserver']
+ \ }
+
+ let g:LanguageClient_diagnosticsDisplay = { 2: { "signText": "W" } }
nmap <esc>q :buffer
nmap <M-q> :buffer
@@ -115,9 +131,11 @@ let
extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [
pkgs.vimPlugins.ack-vim
pkgs.vimPlugins.Gundo
- pkgs.vimPlugins.Syntastic
+ #pkgs.vimPlugins.Syntastic
pkgs.vimPlugins.undotree
pkgs.vimPlugins.vim-go
+ pkgs.vimPlugins.fzf-vim
+ unstable_nixpkgs.vimPlugins.LanguageClient-neovim
(pkgs.vimUtils.buildVimPlugin {
name = "file-line-1.0";
src = pkgs.fetchFromGitHub {
diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index e4f50e2d1..d19f534fe 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -119,6 +119,7 @@ in {
{ from = "ms@ubikmedia.eu"; to = "ms"; }
{ from = "ubik@ubikmedia.eu"; to = "domsen, jms, ms"; }
{ from = "akayguen@freemonkey.art"; to ="akayguen"; }
+ { from = "bui@freemonkey.art"; to ="bui"; }
{ from = "testuser@lassul.us"; to = "testuser"; }
{ from = "testuser@ubikmedia.eu"; to = "testuser"; }
@@ -183,5 +184,12 @@ in {
createHome = true;
};
+ users.users.bui = {
+ uid = genid_signed "bui";
+ home = "/home/bui";
+ useDefaultShell = true;
+ createHome = true;
+ };
+
}
diff --git a/makefu/1systems/nextgum/config.nix b/makefu/1systems/nextgum/config.nix
index a23ccf7b2..93171d23a 100644
--- a/makefu/1systems/nextgum/config.nix
+++ b/makefu/1systems/nextgum/config.nix
@@ -52,7 +52,7 @@ in {
<stockholm/makefu/2configs/iodined.nix>
## buildbot
- #<stockholm/makefu/2configs/remote-build/slave.nix>
+ <stockholm/makefu/2configs/remote-build/slave.nix>
# Removed until move: no extra mails
# <stockholm/makefu/2configs/urlwatch>
@@ -94,6 +94,7 @@ in {
## Temporary:
# <stockholm/makefu/2configs/temp/rst-issue.nix>
<stockholm/makefu/2configs/virtualisation/docker.nix>
+ <stockholm/makefu/2configs/virtualisation/libvirt.nix>
#{
# services.dockerRegistry.enable = true;