From f113b93aa8416b74cf6d2796913147893cc78e49 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 25 Jun 2017 16:15:18 +0200 Subject: tv: properly use symlinkJoin paths Because earlier entries override later ones. --- tv/2configs/htop.nix | 2 +- tv/2configs/vim.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/2configs/htop.nix b/tv/2configs/htop.nix index 5d7e0272b..d7d2d7bfd 100644 --- a/tv/2configs/htop.nix +++ b/tv/2configs/htop.nix @@ -7,7 +7,6 @@ with import ; htop = pkgs.symlinkJoin { name = "htop"; paths = [ - super.htop (pkgs.writeDashBin "htop" '' export HTOPRC=${pkgs.writeText "htoprc" '' fields=0 48 17 18 38 39 40 2 46 47 49 1 @@ -37,6 +36,7 @@ with import ; ''} exec ${super.htop}/bin/htop "$@" '') + super.htop ]; }; }; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 93ed46dc8..a3af93772 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -300,7 +300,6 @@ let { vim-wrapper = pkgs.symlinkJoin { name = "vim"; paths = [ - pkgs.vim_configurable (pkgs.writeDashBin "vim" '' set -efu (umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs}) @@ -310,6 +309,7 @@ let { # vim-orgmode needs Python, thus vim_configurable instead of just vim exec ${pkgs.vim_configurable}/bin/vim "$@" '') + pkgs.vim_configurable ]; }; -- cgit v1.2.3 From 74429f245d366e783ecbcfb0ebd83a7f57e78e6a Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 10:01:16 +0200 Subject: tv: add htop to default systemPackages --- tv/1systems/cd.nix | 1 - tv/1systems/wu.nix | 1 - tv/1systems/xu.nix | 1 - tv/1systems/zu.nix | 1 - tv/2configs/default.nix | 3 ++- 5 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tv') diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 108006f34..9f2cec574 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -25,7 +25,6 @@ with import ; }; environment.systemPackages = with pkgs; [ - htop iftop iotop iptables diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 60f9fa100..4b3bf8538 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -31,7 +31,6 @@ with import ; get gnupg1compat haskellPackages.hledger - htop jq mkpasswd netcat diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix index 3add01748..d82f45ac0 100644 --- a/tv/1systems/xu.nix +++ b/tv/1systems/xu.nix @@ -34,7 +34,6 @@ with import ; file gnupg1compat haskellPackages.hledger - htop jq krebszones mkpasswd diff --git a/tv/1systems/zu.nix b/tv/1systems/zu.nix index 5552ef065..4fae3ca75 100644 --- a/tv/1systems/zu.nix +++ b/tv/1systems/zu.nix @@ -36,7 +36,6 @@ with import ; file gnupg1compat haskellPackages.hledger - htop jq mkpasswd netcat diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 4a1247ef5..d248bf578 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -158,9 +158,10 @@ with import ; { environment.systemPackages = [ pkgs.get + pkgs.htop pkgs.krebspaste - pkgs.ovh-zone pkgs.nix-prefetch-scripts + pkgs.ovh-zone pkgs.push ]; } -- cgit v1.2.3 From 3789c7698b4e076d907e31ab8c0ba60597ee3721 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 19:55:49 +0200 Subject: tv alnus nixpkgs: e924319 -> 9b948ea --- tv/1systems/alnus.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/1systems/alnus.nix b/tv/1systems/alnus.nix index 4bc0318e8..ef2a0500f 100644 --- a/tv/1systems/alnus.nix +++ b/tv/1systems/alnus.nix @@ -58,7 +58,7 @@ with import ; krebs.build = { host = config.krebs.hosts.alnus; user = mkForce config.krebs.users.dv; - source.nixpkgs.git.ref = mkForce "e924319cb6c74aa2a9c943eddeb0caef79db01bc"; + source.nixpkgs.git.ref = mkForce "9b948ea439ddbaa26740ce35543e7e35d2aa6d18"; }; networking.networkmanager.enable = true; -- cgit v1.2.3 From ebb68ee1f89d9387402effe0726809831e6de9b6 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 21:30:05 +0200 Subject: tv mu: security.wrappers.slock.{slock => source} --- tv/1systems/mu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index fcd0a2178..cb8e7d97a 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -101,7 +101,7 @@ with import ; security.wrappers = { sendmail.source = "${pkgs.exim}/bin/sendmail"; # for cron - slock.slock = "${pkgs.slock}/bin/slock"; + slock.source = "${pkgs.slock}/bin/slock"; }; security.pam.loginLimits = [ -- cgit v1.2.3 From 24adece79e47af6602ce1fc48a2d5b772c225b61 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 21:30:22 +0200 Subject: tv mu: kde4 -> plasma5, maybe --- tv/1systems/mu.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tv') diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index cb8e7d97a..8e527b021 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -82,12 +82,9 @@ with import ; chromiumDev skype libreoffice - kde4.l10n.de - kde4.plasma-nm pidgin-with-plugins pidginotr - kde4.print_manager #foomatic_filters #gutenprint #cups_pdf_filter @@ -138,7 +135,9 @@ with import ; twoFingerScroll = true; }; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.desktopManager.plasma5 = { + enable = true; + }; services.xserver.displayManager.auto = { enable = true; user = "vv"; -- cgit v1.2.3 From 4fc9f53f7a44a52fafc4ba7e7d3bf8e3dd865dd5 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 22:29:46 +0200 Subject: tv mu: chromiumDev -> chromium --- tv/1systems/mu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index 8e527b021..3f3b2c2f4 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -79,7 +79,7 @@ with import ; gimp xsane firefoxWrapper - chromiumDev + chromium skype libreoffice pidgin-with-plugins -- cgit v1.2.3 From 954996f78fbd65f89d2e768d09e2bcc41c080d17 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 22:57:34 +0200 Subject: tv: configure stockholm for buildbot --- tv/2configs/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d248bf578..5d61cb941 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,20 +1,24 @@ -{ config, lib, pkgs, ... }: - with import ; - -{ +{ config, lib, pkgs, ... }: let + builder = if getEnv "dummy_secrets" == "true" + then "buildbot" + else "tv"; +in { krebs.enable = true; krebs.build = { user = config.krebs.users.tv; source = let inherit (config.krebs.build) host; in { nixos-config.symlink = "stockholm/tv/1systems/${host.name}.nix"; - secrets.file = - if getEnv "dummy_secrets" == "true" - then toString - else "/home/tv/secrets/${host.name}"; + secrets.file = getAttr builder { + buildbot = toString ; + tv = "/home/tv/secrets/${host.name}"; + }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = "/home/tv/stockholm"; + stockholm.file = getAttr builder { + buildbot = getEnv "PWD"; + tv = "/home/tv/stockholm"; + }; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3 From ee08824427c0a8dbc92aa2858300f7aae5d70df0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:40:38 +0200 Subject: tv: stockholm is really just --- tv/2configs/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 5d61cb941..aae7c5a1b 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -15,10 +15,7 @@ in { tv = "/home/tv/secrets/${host.name}"; }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = getAttr builder { - buildbot = getEnv "PWD"; - tv = "/home/tv/stockholm"; - }; + stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3 From 62e50105badbe23a3e448d8ca9f5770f7698b22b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:48:05 +0200 Subject: krebs.build.source: stockholm default is --- tv/2configs/default.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index aae7c5a1b..bab1c72b6 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -15,7 +15,6 @@ in { tv = "/home/tv/secrets/${host.name}"; }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3 From 4f1821f3971708a8f7d4db5f15b8c9651138518d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 2 Jul 2017 00:09:16 +0200 Subject: tv: turn pkgs into an overlay --- tv/5pkgs/default.nix | 88 ++++++++++++++++++++++++++++++---------------------- tv/default.nix | 4 +-- 2 files changed, 53 insertions(+), 39 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index ae47ab0f3..284e42a79 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,40 +1,54 @@ -{ config, pkgs, ... }: with import ; -{ - nixpkgs.config.packageOverrides = super: let - - # This callPackage will try to detect obsolete overrides. - callPackage = path: args: let - override = super.callPackage path args; - upstream = optionalAttrs (override ? "name") - (super.${(parseDrvName override.name).name} or {}); - in if upstream ? "name" && - override ? "name" && - compareVersions upstream.name override.name != -1 - then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override - else override; - - in {} - // mapAttrs (_: flip callPackage {}) - (filterAttrs (_: dir: pathExists (dir + "/default.nix")) - (subdirsOf ./.)) - // { - # TODO use XDG_RUNTIME_DIR? - cr = pkgs.writeDashBin "cr" '' - set -efu - export LC_TIME=de_DE.utf8 - exec ${pkgs.chromium}/bin/chromium \ - --ssl-version-min=tls1 \ - --disk-cache-dir=/tmp/chromium-disk-cache_"$LOGNAME" \ - --disk-cache-size=50000000 \ - "$@" - ''; - ejabberd = callPackage ./ejabberd { - erlang = pkgs.erlangR16; - }; - ff = pkgs.writeDashBin "ff" '' - exec ${pkgs.firefoxWrapper}/bin/firefox "$@" - ''; - gnupg = pkgs.gnupg21; +self: super: let + + # This callPackage will try to detect obsolete overrides. + callPackage = path: args: let + override = super.callPackage path args; + upstream = optionalAttrs (override ? "name") + (super.${(parseDrvName override.name).name} or {}); + in if upstream ? "name" && + override ? "name" && + compareVersions upstream.name override.name != -1 + then + trace + "Upstream `${upstream.name}' gets overridden by `${override.name}'." + override + else override; + +in { + + # TODO use XDG_RUNTIME_DIR? + cr = self.writeDashBin "cr" '' + set -efu + export LC_TIME=de_DE.utf8 + exec ${self.chromium}/bin/chromium \ + --ssl-version-min=tls1 \ + --disk-cache-dir=/tmp/chromium-disk-cache_"$LOGNAME" \ + --disk-cache-size=50000000 \ + "$@" + ''; + + ejabberd = callPackage ./ejabberd { + erlang = self.erlangR16; }; + + ff = self.writeDashBin "ff" '' + exec ${self.firefoxWrapper}/bin/firefox "$@" + ''; + + gnupg = self.gnupg21; + + # https://github.com/NixOS/nixpkgs/issues/16113 + wvdial = let + nixpkgs-1509 = import (self.fetchFromGitHub { + owner = "NixOS"; repo = "nixpkgs-channels"; + rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; + sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; + }) {}; + in nixpkgs-1509.wvdial; + } + +// mapAttrs (_: flip callPackage {}) + (filterAttrs (_: dir: pathExists (dir + "/default.nix")) + (subdirsOf ./.)) diff --git a/tv/default.nix b/tv/default.nix index b1c7c1be8..d077cc09f 100644 --- a/tv/default.nix +++ b/tv/default.nix @@ -1,9 +1,9 @@ -_: +{ pkgs, ... }: { imports = [ ../krebs ./2configs ./3modules - ./5pkgs ]; + nixpkgs.config.packageOverrides = import ./5pkgs pkgs; } -- cgit v1.2.3