From 84fdbeba2ceee152a128f5e9013043c172c07ecf Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 2 Jan 2018 20:22:44 +0100 Subject: tv source: turn dummy_secrets into an argument --- tv/source.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tv/source.nix b/tv/source.nix index 31308fc99..b5e3f7cd7 100644 --- a/tv/source.nix +++ b/tv/source.nix @@ -1,8 +1,10 @@ with import ; -host@{ name, secure ? false, override ? {} }: let - builder = if getEnv "dummy_secrets" == "true" - then "buildbot" - else "tv"; +{ name +, dummy_secrets ? getEnv "dummy_secrets" == "true" +, override ? {} +, secure ? false +}@host: let + builder = if dummy_secrets then "buildbot" else "tv"; _file = + "/tv/1systems/${name}/source.nix"; in evalSource (toString _file) [ -- cgit v1.2.3 From 68733092391f43d0fd9e04f095cdad826e2d54e8 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 2 Jan 2018 21:18:51 +0100 Subject: stockholm: {shell => cmds}.get-version --- krebs/5pkgs/simple/stockholm/default.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/krebs/5pkgs/simple/stockholm/default.nix b/krebs/5pkgs/simple/stockholm/default.nix index 5705f086d..53c1ca5ba 100644 --- a/krebs/5pkgs/simple/stockholm/default.nix +++ b/krebs/5pkgs/simple/stockholm/default.nix @@ -92,6 +92,17 @@ -I "$target_path" ''); + cmds.get-version = pkgs.writeDash "get-version" '' + set -efu + hostname=''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} + version=git.$(${pkgs.git}/bin/git describe --always --dirty) + case $version in (*-dirty) + version=$version@$hostname + esac + date=$(${pkgs.coreutils}/bin/date +%y.%m) + echo "$date.$version" + ''; + cmds.install = pkgs.withGetopt { force-populate = { default = /* sh */ "false"; switch = true; }; quiet = { default = /* sh */ "false"; switch = true; }; @@ -205,7 +216,7 @@ init.env = pkgs.writeText "init.env" /* sh */ '' export HOSTNAME="$(${pkgs.nettools}/bin/hostname)" - export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${shell.get-version})}" + export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${cmds.get-version})}" export quiet export system @@ -274,16 +285,6 @@ fi ''; - shell.get-version = pkgs.writeDash "stockholm.get-version" '' - set -efu - version=git.$(${pkgs.git}/bin/git describe --always --dirty) - case $version in (*-dirty) - version=$version@$HOSTNAME - esac - date=$(${pkgs.coreutils}/bin/date +%y.%m) - echo "$date.$version" - ''; - in pkgs.writeOut "stockholm" (lib.mapAttrs' (name: link: -- cgit v1.2.3 From 593ca08de18e8e5a20ef23ec0ef950a5572156a9 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Jan 2018 02:19:22 +0100 Subject: wolf: don't use gone save-diskspace --- krebs/1systems/wolf/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 0b21c0b6c..9d6955e7e 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -10,7 +10,6 @@ in - -- cgit v1.2.3 From 5dc8b8b3f3203d32653eb27c7c0dff6f29afca73 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Jan 2018 02:28:44 +0100 Subject: tv wu: move video driver stuff to w110er --- tv/1systems/wu/config.nix | 6 ------ tv/2configs/hw/w110er.nix | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix index 5c593894a..b3e084fe2 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -44,12 +44,6 @@ with import ; }; }; - krebs.nixpkgs.allowUnfreePredicate = pkg: hasPrefix "nvidia-x11-" pkg.name; - hardware.bumblebee.enable = true; - hardware.bumblebee.group = "video"; - hardware.enableRedistributableFirmware= true; - hardware.opengl.driSupport32Bit = true; - services.printing.enable = true; services.udev.extraRules = '' diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 787bfc6e9..55e9482d4 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -1,8 +1,20 @@ +with import ; { pkgs, ... }: { imports = [ ../smartd.nix + { + # nvidia doesn't build despite + # https://github.com/NixOS/nixpkgs/issues/33284 + #hardware.bumblebee.enable = true; + #hardware.bumblebee.group = "video"; + #hardware.enableRedistributableFirmware= true; + #krebs.nixpkgs.allowUnfreePredicate = pkg: + # hasPrefix "nvidia-x11-" pkg.name || + # hasPrefix "nvidia-persistenced-" pkg.name || + # hasPrefix "nvidia-settings-" pkg.name; + } ]; boot.extraModprobeConfig = '' @@ -15,6 +27,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = [ pkgs.vaapiIntel ]; networking.wireless.enable = true; @@ -41,4 +54,8 @@ echo auto > $i/power/control # defaults to 'on' done) ''; + + services.xserver = { + videoDriver = "intel"; + }; } -- cgit v1.2.3 From 98aedda77da37071ff6b9a2e989fac1e6b1e2270 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Jan 2018 02:31:27 +0100 Subject: tv vim: sh.extraStart add writeAsh --- tv/2configs/vim.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 8a27b606a..59619f9b5 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -233,7 +233,7 @@ let { lua = {}; sed.extraStart = ''writeSed[^ \t\r\n]*[ \t\r\n]*"[^"]*"''; sh.extraStart = concatStringsSep ''\|'' [ - ''write\(Ba\|Da\)sh[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)'' + ''write\(A\|Ba\|Da\)sh[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)'' ''[a-z]*Phase[ \t\r\n]*='' ]; yaml = {}; -- cgit v1.2.3 From 8bf0916f1e1ffbf233564726bb07ead1f33b19c0 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Jan 2018 02:35:11 +0100 Subject: tv: use pkgs.linuxPackages_latest --- tv/2configs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 280552fe4..2ccab3d09 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,6 +1,8 @@ with import ; { config, pkgs, ... }: { + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.tmpOnTmpfs = true; krebs.enable = true; -- cgit v1.2.3 From 1f85655f52ebeaf32d615aae72231c8449604b89 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Jan 2018 02:40:36 +0100 Subject: tv: RIP schnabel* --- krebs/3modules/tv/default.nix | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index 98145274c..ce01be5f3 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -201,24 +201,6 @@ with import ; }; }; }; - schnabeldrucker = { - external = true; - nets = { - gg23 = { - ip4.addr = "10.23.1.21"; - aliases = ["schnabeldrucker.gg23"]; - }; - }; - }; - schnabelscanner = { - external = true; - nets = { - gg23 = { - ip4.addr = "10.23.1.22"; - aliases = ["schnabelscanner.gg23"]; - }; - }; - }; wu = { ci = true; cores = 4; -- cgit v1.2.3