Merge remote-tracking branch 'ni/master'

This commit is contained in:
lassulus 2018-01-04 12:56:41 +01:00
commit 9c6deead88
8 changed files with 38 additions and 41 deletions

View File

@ -10,7 +10,6 @@ in
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
<stockholm/krebs/2configs/collectd-base.nix>
<stockholm/krebs/2configs/stats/wolf-client.nix>
<stockholm/krebs/2configs/save-diskspace.nix>
<stockholm/krebs/2configs/graphite.nix>
<stockholm/krebs/2configs/buildbot-krebs.nix>

View File

@ -201,24 +201,6 @@ with import <stockholm/lib>;
};
};
};
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;

View File

@ -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:

View File

@ -44,12 +44,6 @@ with import <stockholm/lib>;
};
};
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 = ''

View File

@ -1,6 +1,8 @@
with import <stockholm/lib>;
{ config, pkgs, ... }: {
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.tmpOnTmpfs = true;
krebs.enable = true;

View File

@ -1,8 +1,20 @@
with import <stockholm/lib>;
{ 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";
};
}

View File

@ -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 = {};

View File

@ -1,8 +1,10 @@
with import <stockholm/lib>;
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 = <stockholm> + "/tv/1systems/${name}/source.nix";
in
evalSource (toString _file) [