From 2a0cd63387049350f6de73f609a32a0bf4e49253 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Dec 2015 20:21:06 +0100 Subject: l 2 baseX: add pkgs.dmenu --- lass/2configs/baseX.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 0596682df..ede1c7b7b 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -31,6 +31,7 @@ in { environment.systemPackages = with pkgs; [ + dmenu gitAndTools.qgit mpv much -- cgit v1.2.3 From 35902b25e35b75f64a8ac01a6b5d0baea2d4154e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Dec 2015 02:04:43 +0100 Subject: l 2 base: checkout nixpkgs to /var/src/ --- lass/2configs/base.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 66e12b262..4685e1713 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -51,6 +51,7 @@ with lib; git.nixpkgs = { url = https://github.com/Lassulus/nixpkgs; rev = "93d8671e2c6d1d25f126ed30e5e6f16764330119"; + target-path = "/var/src/nixpkgs"; }; dir.secrets = { host = config.krebs.hosts.mors; -- cgit v1.2.3 From 83555272fdcb6ab5ce968b08a90199c8aaeb460b Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Dec 2015 02:05:14 +0100 Subject: l 2: add buildbot-standalone --- lass/2configs/buildbot-standalone.nix | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lass/2configs/buildbot-standalone.nix (limited to 'lass/2configs') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix new file mode 100644 index 000000000..4d02fb97a --- /dev/null +++ b/lass/2configs/buildbot-standalone.nix @@ -0,0 +1,78 @@ +{ lib, config, pkgs, ... }: +{ + #networking.firewall.allowedTCPPorts = [ 8010 9989 ]; + krebs.buildbot.master = { + slaves = { + testslave = "lasspass"; + }; + change_source.stockholm = '' + stockholm_repo = 'http://cgit.mors/stockholm' + cs.append(changes.GitPoller( + stockholm_repo, + workdir='stockholm-poller', branch='master', + project='stockholm', + pollinterval=120)) + ''; + scheduler = { + force-scheduler = '' + sched.append(schedulers.ForceScheduler( + name="force", + builderNames=["fast-tests"])) + ''; + fast-tests-scheduler = '' + # test the master real quick + sched.append(schedulers.SingleBranchScheduler( + change_filter=util.ChangeFilter(branch="master"), + name="fast-master-test", + builderNames=["fast-tests"])) + ''; + }; + builder_pre = '' + # prepare grab_repo step for stockholm + grab_repo = steps.Git(repourl=stockholm_repo, mode='incremental') + + env = {"LOGNAME": "lass", "NIX_REMOTE": "daemon"} + + # prepare nix-shell + # the dependencies which are used by the test script + deps = [ "gnumake", "jq","nix","rsync" ] + # TODO: --pure , prepare ENV in nix-shell command: + # SSL_CERT_FILE,LOGNAME,NIX_REMOTE + nixshell = ["nix-shell", "-I", "stockholm=.", "-p" ] + deps + [ "--run" ] + + # prepare addShell function + def addShell(factory,**kwargs): + factory.addStep(steps.ShellCommand(**kwargs)) + ''; + builder = { + fast-tests = '' + f = util.BuildFactory() + f.addStep(grab_repo) + addShell(f,name="mors-eval",env=env, + command=nixshell + ["make -s eval get=krebs.deploy filter=json system=mors"]) + + bu.append(util.BuilderConfig(name="fast-tests", + slavenames=slavenames, + factory=f)) + ''; + }; + enable = true; + web.enable = true; + irc = { + enable = true; + nick = "lass-buildbot"; + server = "cd.retiolum"; + channels = [ "retiolum" ]; + allowForce = true; + }; + }; + + krebs.buildbot.slave = { + enable = true; + masterhost = "localhost"; + username = "testslave"; + password = "lasspass"; + packages = with pkgs;[ git nix ]; + extraEnviron = { NIX_PATH="nixpkgs=${toString }"; }; + }; +} -- cgit v1.2.3 From 4ce4b0053fde81608a8f2e3ecb2888a71203801b Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 17 Jan 2016 13:09:10 +0100 Subject: l 2 base: nixpkgs rev 93d8671 -> d0e3cca --- lass/2configs/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 4685e1713..eca3becd6 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -50,7 +50,7 @@ with lib; source = { git.nixpkgs = { url = https://github.com/Lassulus/nixpkgs; - rev = "93d8671e2c6d1d25f126ed30e5e6f16764330119"; + rev = "d0e3cca04edd5d1b3d61f188b4a5f61f35cdf1ce"; target-path = "/var/src/nixpkgs"; }; dir.secrets = { -- cgit v1.2.3 From c6cec0234b5543d23e2b8afe9b2340395de8184c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 17 Jan 2016 13:10:14 +0100 Subject: l 2 base: CVE-2016-0778 workaround --- lass/2configs/base.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index eca3becd6..ab7cda7d3 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -177,4 +177,10 @@ with lib; noipv4ll ''; + #CVE-2016-0777 and CVE-2016-0778 workaround + #https://www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-0778/openssh-cve-2016-0777-cve-2016-0778.txt + programs.ssh.extraConfig = '' + UseRoaming no + ''; + } -- cgit v1.2.3 From 688db8b46d0d6c697ed8970a018a94dd9cfb41fe Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 17 Jan 2016 13:11:10 +0100 Subject: l 2 git: add miefda to allowed users --- lass/2configs/git.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 16ecaefec..10e54074c 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -74,7 +74,7 @@ let perm = push "refs/*" [ non-fast-forward create delete merge ]; } ++ optional repo.public { - user = [ tv makefu uriel ]; + user = [ tv makefu miefda uriel ]; repo = [ repo ]; perm = fetch; } ++ -- cgit v1.2.3 From 186d5cc95a7430136da3107734409511c64d7080 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 19 Jan 2016 19:59:53 +0100 Subject: l 2 bitcoin: add sudo config --- lass/2configs/bitcoin.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/bitcoin.nix b/lass/2configs/bitcoin.nix index d3bccbf5c..2f4cd5710 100644 --- a/lass/2configs/bitcoin.nix +++ b/lass/2configs/bitcoin.nix @@ -1,6 +1,8 @@ { config, pkgs, ... }: -{ +let + mainUser = config.users.extraUsers.mainUser; +in { environment.systemPackages = with pkgs; [ electrum ]; @@ -14,4 +16,7 @@ createHome = true; }; }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(bitcoin) NOPASSWD: ALL + ''; } -- cgit v1.2.3 From e3806dfa40d61eb70b543ba34758b1c8a4d11aef Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 15:54:43 +0100 Subject: l 2: give helios & uriel more access --- lass/2configs/base.nix | 5 +++-- lass/2configs/git.nix | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index ab7cda7d3..5505da67f 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -17,7 +17,8 @@ with lib; root = { openssh.authorizedKeys.keys = [ config.krebs.users.lass.pubkey - config.krebs.users.uriel.pubkey + config.krebs.users.lass_uriel.pubkey + config.krebs.users.lass_helios.pubkey ]; }; mainUser = { @@ -31,7 +32,7 @@ with lib; ]; openssh.authorizedKeys.keys = [ config.krebs.users.lass.pubkey - config.krebs.users.uriel.pubkey + config.krebs.users.lass_uriel.pubkey ]; }; }; diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 10e54074c..2d8ee95dd 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -69,12 +69,12 @@ let with git // config.krebs.users; repo: singleton { - user = lass; + user = [ lass lass_helios lass_uriel ]; repo = [ repo ]; perm = push "refs/*" [ non-fast-forward create delete merge ]; } ++ optional repo.public { - user = [ tv makefu miefda uriel ]; + user = [ tv makefu miefda ]; repo = [ repo ]; perm = fetch; } ++ -- cgit v1.2.3 From 8efbd093537de1e419b0c193b6aa2a262ae1f4c3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 15:57:54 +0100 Subject: l 2 buildbot-sta..: change name to buildbot-lass --- lass/2configs/buildbot-standalone.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index 4d02fb97a..8c71553fe 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -60,7 +60,7 @@ web.enable = true; irc = { enable = true; - nick = "lass-buildbot"; + nick = "buildbot-lass"; server = "cd.retiolum"; channels = [ "retiolum" ]; allowForce = true; -- cgit v1.2.3 From cebb19ca9e412cd355638d0fbf028eba3b721bfa Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 15:58:35 +0100 Subject: l 2 websites wohnprojekt: add laura user --- lass/2configs/websites/wohnprojekt-rhh.de.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/websites/wohnprojekt-rhh.de.nix b/lass/2configs/websites/wohnprojekt-rhh.de.nix index cd31450c5..ac784d4c7 100644 --- a/lass/2configs/websites/wohnprojekt-rhh.de.nix +++ b/lass/2configs/websites/wohnprojekt-rhh.de.nix @@ -8,5 +8,11 @@ lass.staticPage = { "wohnprojekt-rhh.de" = {}; }; + + users.users.laura = { + home = "/srv/http/wohnprojekt-rhh.de"; + createHome = true; + useDefaultShell = true; + }; } -- cgit v1.2.3 From 77eaa656683dbe84bd66c4e7bc84670d836ed379 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 15:58:53 +0100 Subject: l 2 newsbot-js: disable truther feed --- lass/2configs/newsbot-js.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/newsbot-js.nix b/lass/2configs/newsbot-js.nix index 74d09b7fa..4482c4e9d 100644 --- a/lass/2configs/newsbot-js.nix +++ b/lass/2configs/newsbot-js.nix @@ -161,7 +161,7 @@ let 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 - truther|http://truthernews.wordpress.com/feed/|#news + #truther|http://truthernews.wordpress.com/feed/|#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 -- cgit v1.2.3 From 7d6d0a46643f66b18aa9480df6bb88391924f262 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 16:01:48 +0100 Subject: l 2 xserver: copy default.nix from tv --- lass/2configs/xserver/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/xserver/default.nix b/lass/2configs/xserver/default.nix index 04d14c7ce..d351fcf19 100644 --- a/lass/2configs/xserver/default.nix +++ b/lass/2configs/xserver/default.nix @@ -44,7 +44,7 @@ let "slock" ]; - systemd.services.display-manager = mkForce {}; + systemd.services.display-manager.enable = false; services.xserver.enable = true; @@ -93,9 +93,10 @@ let xmonad-start = pkgs.writeScriptBin "xmonad" '' #! ${pkgs.bash}/bin/bash set -efu - export PATH; PATH=${makeSearchPath "bin" ([ + export PATH; PATH=${makeSearchPath "bin" [ + pkgs.alsaUtils pkgs.rxvt_unicode - ] ++ config.environment.systemPackages)}:/var/setuid-wrappers + ]}:/var/setuid-wrappers settle() {( # Use PATH for a clean journal command=''${1##*/} -- cgit v1.2.3 From 8beca9b31177183bfec031c6d0a947a1c99fc497 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 1 Feb 2016 16:04:05 +0100 Subject: l: add fritz websites to dishfire --- lass/2configs/websites/fritz.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lass/2configs/websites/fritz.nix (limited to 'lass/2configs') diff --git a/lass/2configs/websites/fritz.nix b/lass/2configs/websites/fritz.nix new file mode 100644 index 000000000..073f3de14 --- /dev/null +++ b/lass/2configs/websites/fritz.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: + +{ + + imports = [ + ../../3modules/static_nginx.nix + ../../3modules/owncloud_nginx.nix + ../../3modules/wordpress_nginx.nix + ]; + + lass.staticPage = { + "biostase.de" = {}; + "gs-maubach.de" = {}; + "spielwaren-kern.de" = {}; + "societyofsimtech.de" = {}; + "ttf-kleinaspach.de" = {}; + "edsn.de" = {}; + "eab.berkeley.edu" = {}; + "habsys.de" = {}; + }; + + #lass.owncloud = { + # "o.ubikmedia.de" = { + # instanceid = "oc8n8ddbftgh"; + # }; + #}; + + #services.mysql = { + # enable = true; + # package = pkgs.mariadb; + # rootPassword = toString (); + #}; +} -- cgit v1.2.3 From f73feaccd7a28d06d1d62d08795574b232f0c8b9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 6 Feb 2016 19:28:07 +0100 Subject: l 2 base: krebs.source adapt to api change --- lass/2configs/base.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 5505da67f..6dceace18 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -48,21 +48,21 @@ with lib; exim-retiolum.enable = true; build = { user = config.krebs.users.lass; - source = { - git.nixpkgs = { + source = mapAttrs (_: mkDefault) ({ + nixos-config = "symlink:stockholm/lass/1systems/${config.krebs.build.host.name}.nix"; + nixpkgs = symlink:stockholm/nixpkgs; + secrets = "/home/lass/secrets/${config.krebs.build.host.name}"; + #secrets-common = "/home/lass/secrets/common"; + stockholm = "/home/lass/stockholm"; + stockholm-user = "symlink:stockholm/lass"; + upstream-nixpkgs = { url = https://github.com/Lassulus/nixpkgs; rev = "d0e3cca04edd5d1b3d61f188b4a5f61f35cdf1ce"; - target-path = "/var/src/nixpkgs"; + dev = "/home/lass/src/nixpkgs"; }; - dir.secrets = { - host = config.krebs.hosts.mors; - path = "/home/lass/secrets/${config.krebs.build.host.name}"; - }; - dir.stockholm = { - host = config.krebs.hosts.mors; - path = "/home/lass/stockholm"; - }; - }; + } // optionalAttrs config.krebs.build.host.secure { + #secrets-master = "/home/lass/secrets/master"; + }); }; }; -- cgit v1.2.3 From d98a8c0be822655da317e101e26f2063a20b910c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 6 Feb 2016 19:28:56 +0100 Subject: l 2 base: require pkgs.proot for stockholm --- lass/2configs/base.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 6dceace18..7212698bb 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -91,6 +91,7 @@ with lib; git jq parallel + proot #style most -- cgit v1.2.3 From 3dacf4626f12c32a100ee032a14ad72f98fe6a70 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 6 Feb 2016 19:29:21 +0100 Subject: l 2 browsers: don't import per-user.nix --- lass/2configs/browsers.nix | 2 -- 1 file changed, 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index d36801863..61016fed0 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -54,8 +54,6 @@ in { ]; imports = [ - ../3modules/per-user.nix - ] ++ [ ( createFirefoxUser "ff" [ "audio" ] [ ] ) ( createChromiumUser "cr" [ "audio" ] [ pkgs.chromium ] ) ( createChromiumUser "fb" [ ] [ pkgs.chromium ] ) -- cgit v1.2.3 From 5856d240888e89dbed141087c9580026f52dff59 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 6 Feb 2016 19:32:34 +0100 Subject: l 2 xserver: add pulseaudio to xserver deps --- lass/2configs/xserver/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/xserver/default.nix b/lass/2configs/xserver/default.nix index d351fcf19..c407bb59e 100644 --- a/lass/2configs/xserver/default.nix +++ b/lass/2configs/xserver/default.nix @@ -95,6 +95,7 @@ let set -efu export PATH; PATH=${makeSearchPath "bin" [ pkgs.alsaUtils + pkgs.pulseaudioLight pkgs.rxvt_unicode ]}:/var/setuid-wrappers settle() {( -- cgit v1.2.3