summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/3modules/fetchWallpaper.nix23
-rw-r--r--krebs/3modules/tinc_graphs.nix2
-rw-r--r--krebs/5pkgs/repo-sync/default.nix19
-rw-r--r--makefu/1systems/pornocauster.nix25
-rw-r--r--makefu/1systems/vbob.nix5
-rw-r--r--makefu/1systems/wbob.nix65
-rw-r--r--makefu/2configs/base-gui.nix2
-rw-r--r--makefu/2configs/default.nix3
-rw-r--r--makefu/2configs/fetchWallpaper.nix15
-rw-r--r--makefu/2configs/hw/tp-x220.nix14
-rw-r--r--makefu/2configs/hw/tp-x2x0.nix18
-rw-r--r--makefu/2configs/main-laptop.nix5
-rw-r--r--makefu/2configs/printer.nix4
-rw-r--r--makefu/3modules/umts.nix9
-rw-r--r--shared/2configs/base.nix2
-rw-r--r--shared/2configs/shared-buildbot.nix14
16 files changed, 134 insertions, 91 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix
index f320c750..225f0080 100644
--- a/krebs/3modules/fetchWallpaper.nix
+++ b/krebs/3modules/fetchWallpaper.nix
@@ -12,10 +12,6 @@ let
api = {
enable = mkEnableOption "fetch wallpaper";
- predicate = mkOption {
- type = with types; nullOr path;
- default = null;
- };
url = mkOption {
type = types.str;
};
@@ -33,16 +29,20 @@ let
type = types.str;
default = ":11";
};
+ unitConfig = mkOption {
+ type = types.attrsOf types.str;
+ description = "Extra unit configuration for fetchWallpaper to define conditions and assertions for the unit";
+ example = literalExample ''
+ # do not start when running on umts
+ { ConditionPathExists = "!/var/run/ppp0.pid"; }
+ '';
+ default = {};
+ };
};
fetchWallpaperScript = pkgs.writeScript "fetchWallpaper" ''
#! ${pkgs.bash}/bin/bash
- ${optionalString (cfg.predicate != null) ''
- if ! ${cfg.predicate}; then
- echo "predicate failed - will not fetch from remote"
- exit 0
- fi
- ''}
+
mkdir -p ${shell.escape cfg.stateDir}
curl -s -o ${shell.escape cfg.stateDir}/wallpaper -z ${shell.escape cfg.stateDir}/wallpaper ${shell.escape cfg.url}
feh --no-fehbg --bg-scale ${shell.escape cfg.stateDir}/wallpaper
@@ -76,7 +76,6 @@ let
URL = cfg.url;
DISPLAY = cfg.display;
};
-
restartIfChanged = true;
serviceConfig = {
@@ -84,6 +83,8 @@ let
ExecStart = fetchWallpaperScript;
User = "fetchWallpaper";
};
+
+ unitConfig = cfg.unitConfig;
};
};
in out
diff --git a/krebs/3modules/tinc_graphs.nix b/krebs/3modules/tinc_graphs.nix
index 1f32c2e5..dc0484a8 100644
--- a/krebs/3modules/tinc_graphs.nix
+++ b/krebs/3modules/tinc_graphs.nix
@@ -85,7 +85,7 @@ let
EXTERNAL_FOLDER = external_dir;
INTERNAL_FOLDER = internal_dir;
GEODB = cfg.geodbPath;
- TINC_HOSTPATH=config.krebs.retiolum.hosts;
+ TINC_HOSTPATH = config.krebs.retiolum.hostsPackage;
};
restartIfChanged = true;
diff --git a/krebs/5pkgs/repo-sync/default.nix b/krebs/5pkgs/repo-sync/default.nix
new file mode 100644
index 00000000..90f838de
--- /dev/null
+++ b/krebs/5pkgs/repo-sync/default.nix
@@ -0,0 +1,19 @@
+{ lib, pkgs, python3Packages, fetchurl, ... }:
+with python3Packages; buildPythonPackage rec {
+ name = "repo-sync-${version}";
+ version = "0.1.1";
+ disabled = isPy26 || isPy27;
+ propagatedBuildInputs = [
+ docopt
+ GitPython
+ ];
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/r/repo-sync/repo-sync-${version}.tar.gz";
+ sha256 = "01r30l2bbsld90ps13ip0zi2a41b53dv4q6fxrzvkfrprr64c0vv";
+ };
+ meta = {
+ homepage = http://github.com/makefu/repo-sync;
+ description = "Sync remotes to other remotes.";
+ license = lib.licenses.mit;
+ };
+}
diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix
index d7fa8edc..d8ccc584 100644
--- a/makefu/1systems/pornocauster.nix
+++ b/makefu/1systems/pornocauster.nix
@@ -18,7 +18,6 @@
../2configs/exim-retiolum.nix
../2configs/mail-client.nix
../2configs/printer.nix
- #../2configs/virtualization.nix
../2configs/virtualization.nix
../2configs/virtualization-virtualbox.nix
../2configs/wwan.nix
@@ -35,33 +34,13 @@
# ../2configs/mediawiki.nix
#../2configs/wordpress.nix
];
- hardware.sane.enable = true;
- hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ];
+
nixpkgs.config.packageOverrides = pkgs: {
tinc = pkgs.tinc_pre;
};
- krebs.Reaktor = {
- enable = false;
- nickname = "makefu|r";
- plugins = with pkgs.ReaktorPlugins; [ nixos-version random-emoji ];
- };
-
- # nix.binaryCaches = [ "http://acng.shack/nixos" "https://cache.nixos.org" ];
-
- environment.systemPackages = with pkgs;[
- get
- virtmanager
- gnome3.dconf
- krebspaste
- ];
-
- services.logind.extraConfig = "HandleLidSwitch=ignore";
# configure pulseAudio to provide a HDMI sink as well
- hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" ''
- ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"}
- load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI"'';
- networking.firewall.enable = false;
+ networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
25
];
diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix
index 20301795..2dee8372 100644
--- a/makefu/1systems/vbob.nix
+++ b/makefu/1systems/vbob.nix
@@ -17,8 +17,8 @@
tinc = pkgs.tinc_pre;
};
- krebs.build.source.nixpkgs = {
- # url = https://github.com/nixos/nixpkgs;
+ krebs.build.source.upstream-nixpkgs = {
+ url = https://github.com/makefu/nixpkgs;
# HTTP Everywhere + libredir
rev = "8239ac6";
};
@@ -38,7 +38,6 @@
buildbot
buildbot-slave
get
- genid
logstash
];
diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix
index d6916f00..8917e433 100644
--- a/makefu/1systems/wbob.nix
+++ b/makefu/1systems/wbob.nix
@@ -4,16 +4,57 @@
[ # Include the results of the hardware scan.
../2configs/main-laptop.nix
];
- krebs = {
- enable = true;
- retiolum.enable = true;
- build.host = config.krebs.hosts.wbob;
- };
- boot.loader.grub.device = "/dev/sda";
- boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" ];
- boot.kernelModules = [ "kvm-intel" ];
- fileSystems."/" = {
- device = "/dev/sda1";
- fsType = "ext4";
- };
+ krebs = {
+ enable = true;
+ retiolum.enable = true;
+ build.host = config.krebs.hosts.wbob;
+ };
+
+ # rt2870.bin wifi card, part of linux-unfree
+ hardware.enableAllFirmware = true;
+ nixpkgs.config.allowUnfree = true;
+ networking.wireless.enable = true;
+ # rt2870 with nonfree creates wlp2s0 from wlp0s20u2
+ # not explicitly setting the interface results in wpa_supplicant to crash
+ networking.wireless.interfaces = [ "wlp2s0" ];
+
+
+ # nuc hardware
+ boot.loader.grub.device = "/dev/sda";
+ hardware.cpu.intel.updateMicrocode = true;
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ fileSystems."/" = {
+ device = "/dev/sda1";
+ fsType = "ext4";
+ };
+
+ # DualHead on NUC
+ services.xserver = {
+ # xrandrHeads = [ "HDMI1" "HDMI2" ];
+ # prevent screen from turning off, disable dpms
+ displayManager.sessionCommands = ''
+ xset s off -dpms
+ xrandr --output HDMI2 --right-of HDMI1
+ '';
+ };
+ ## TODO Awesomecfg + autostart chrome
+ #
+ #local current_screen = 1
+ #awful.rules.rules = {
+ # { rule = { class = "chromium-browser" },
+ # callback = function()
+ # awful.client.movetotag(tags[current_screen][1],c)
+ # if (current_screen == 1) then
+ # current_screen = current_screen+1
+ # else
+ # current_screen = current_screen-1
+ # end
+ # end
+ # },
+ #}
+ #awful.util.spawn_with_shell("chromium --new-window --kiosk http://wolf:3000/dashboard/db/soc-critical-values")
+ # prevent Race Condition
+ #awful.util.spawn_with_shell("sleep 0.5;chromium --new-window --kiosk http://wolf:3000/dashboard/db/aralast")
+
}
diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix
index 1d675028..da3ad4af 100644
--- a/makefu/2configs/base-gui.nix
+++ b/makefu/2configs/base-gui.nix
@@ -44,6 +44,8 @@ in
displayManager.auto.user = mainUser;
desktopManager.xterm.enable = false;
};
+ # lid switch is handled via button presses
+ services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore";
nixpkgs.config.packageOverrides = pkgs: rec {
awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : {
postFixup = ''
diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix
index 2b4e3111..5acc7f0a 100644
--- a/makefu/2configs/default.nix
+++ b/makefu/2configs/default.nix
@@ -23,7 +23,7 @@ with lib;
source = mapAttrs (_: mkDefault) {
upstream-nixpkgs = {
url = https://github.com/nixos/nixpkgs;
- rev = "93d8671e2c6d1d25f126ed30e5e6f16764330119"; # unstable @ 2015-01-03, tested on filepimp
+ rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # unstable @ 2015-01-27, tested on wry
};
secrets = "/home/makefu/secrets/${config.krebs.build.host.name}/";
stockholm = "/home/makefu/stockholm";
@@ -87,6 +87,7 @@ with lib;
environment.systemPackages = with pkgs; [
jq
git
+ get
gnumake
rxvt_unicode.terminfo
htop
diff --git a/makefu/2configs/fetchWallpaper.nix b/makefu/2configs/fetchWallpaper.nix
index b071a128..786df6d4 100644
--- a/makefu/2configs/fetchWallpaper.nix
+++ b/makefu/2configs/fetchWallpaper.nix
@@ -1,24 +1,15 @@
{ config, pkgs, ... }:
-let
- # check if laptop runs on umts
- weaksauce-internet = with pkgs;writeScript "weaksauce-internet" ''
- #! /bin/sh
- if ${iproute}/bin/ip addr show dev ppp0 2>/dev/null \
- | ${gnugrep}/bin/grep -q inet;then
- exit 1
- fi
- '';
-
-in {
+{
krebs.fetchWallpaper = {
enable = true;
display = ":0";
- predicate = weaksauce-internet;
+ unitConfig.ConditionPathExists = "!/var/run/ppp0.pid";
timerConfig = {
OnCalendar = "*:0/30";
};
url = "http://echelon/wallpaper.png";
};
+
}
diff --git a/makefu/2configs/hw/tp-x220.nix b/makefu/2configs/hw/tp-x220.nix
index f0392215..0c90e6fd 100644
--- a/makefu/2configs/hw/tp-x220.nix
+++ b/makefu/2configs/hw/tp-x220.nix
@@ -16,10 +16,16 @@ with lib;
};
services.xserver.displayManager.sessionCommands =''
- xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
- xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
- xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
- # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
+ xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
+ xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
+ xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
+ # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
+ '';
+
+ # enable HDMI output switching with pulseaudio
+ hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" ''
+ ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"}
+ load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI"
'';
}
diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix
index ebc72a06..1033f69c 100644
--- a/makefu/2configs/hw/tp-x2x0.nix
+++ b/makefu/2configs/hw/tp-x2x0.nix
@@ -18,18 +18,18 @@ with lib;
sensitivity = 220;
speed = 220;
emulateWheel = true;
- };
+ };
services.tlp.enable = true;
services.tlp.extraConfig = ''
- START_CHARGE_THRESH_BAT0=80
-
- CPU_SCALING_GOVERNOR_ON_AC=performance
- CPU_SCALING_GOVERNOR_ON_BAT=ondemand
- CPU_MIN_PERF_ON_AC=0
- CPU_MAX_PERF_ON_AC=100
- CPU_MIN_PERF_ON_BAT=0
- CPU_MAX_PERF_ON_BAT=30
+ START_CHARGE_THRESH_BAT0=80
+
+ CPU_SCALING_GOVERNOR_ON_AC=performance
+ CPU_SCALING_GOVERNOR_ON_BAT=ondemand
+ CPU_MIN_PERF_ON_AC=0
+ CPU_MAX_PERF_ON_AC=100
+ CPU_MIN_PERF_ON_BAT=0
+ CPU_MAX_PERF_ON_BAT=30
'';
}
diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix
index b725f661..32f194e6 100644
--- a/makefu/2configs/main-laptop.nix
+++ b/makefu/2configs/main-laptop.nix
@@ -3,6 +3,7 @@
# stuff for the main laptop
# this is pretty much nice-to-have and does
# not fit into base-gui
+# TODO split generic desktop stuff and laptop-specifics like lidswitching
with lib;
{
@@ -17,8 +18,10 @@ with lib;
chromium
keepassx
ntfs3g
+ at_spi2_core
+ gnome3.dconf
virtmanager
- at_spi2_core # dep for virtmanager?
+ krebspaste
];
services.redshift = {
diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix
index 35ad54bd..d288748f 100644
--- a/makefu/2configs/printer.nix
+++ b/makefu/2configs/printer.nix
@@ -7,4 +7,8 @@
pkgs.samsungUnifiedLinuxDriver
];
};
+
+ # scanners are printers just in reverse anyway
+ hardware.sane.enable = true;
+ hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ];
}
diff --git a/makefu/3modules/umts.nix b/makefu/3modules/umts.nix
index d7be45f6..1bf3ba0b 100644
--- a/makefu/3modules/umts.nix
+++ b/makefu/3modules/umts.nix
@@ -56,19 +56,12 @@ let
environment.wvdial.dialerDefaults = wvdial-defaults;
- systemd.targets.network-umts = {
- description = "System is running on UMTS";
- unitConfig.StopWhenUnneeded = true;
- };
-
systemd.services.umts = {
description = "UMTS wvdial Service";
- before = [ "network-umts.target" ];
-
serviceConfig = {
Type = "simple";
Restart = "always";
- RestartSec = "4s";
+ RestartSec = "10s";
ExecStart = "${pkgs.wvdial}/bin/wvdial -n";
};
};
diff --git a/shared/2configs/base.nix b/shared/2configs/base.nix
index dd698ba9..715397ed 100644
--- a/shared/2configs/base.nix
+++ b/shared/2configs/base.nix
@@ -18,7 +18,7 @@ with lib;
krebs.build.source = {
upstream-nixpkgs = mkDefault {
url = https://github.com/NixOS/nixpkgs;
- rev = "d0e3cca";
+ rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # for urlwatch-minidb
};
secrets = mkDefault "${getEnv "HOME"}/secrets/krebs/${config.krebs.build.host.name}";
stockholm = mkDefault "${getEnv "HOME"}/stockholm";
diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix
index 50b27903..af877f5d 100644
--- a/shared/2configs/shared-buildbot.nix
+++ b/shared/2configs/shared-buildbot.nix
@@ -12,10 +12,10 @@
testslave = "krebspass";
};
change_source.stockholm = ''
- stockholm_repo = 'http://cgit.gum/stockholm'
+ stockholm_repo = 'http://cgit.wolf/stockholm-mirror'
cs.append(changes.GitPoller(
stockholm_repo,
- workdir='stockholm-poller', branch='master',
+ workdir='stockholm-poller', branches=True,
project='stockholm',
pollinterval=120))
'';
@@ -28,7 +28,9 @@
fast-tests-scheduler = ''
# test the master real quick
sched.append(schedulers.SingleBranchScheduler(
- change_filter=util.ChangeFilter(branch="master"),
+ ## all branches
+ change_filter=util.ChangeFilter(branch_re=".*"),
+ # change_filter=util.ChangeFilter(branch="master"),
treeStableTimer=10, #only test the latest push
name="fast-master-test",
builderNames=["fast-tests"]))
@@ -52,7 +54,6 @@
};
builder_pre = ''
# prepare grab_repo step for stockholm
- stockholm_repo = "http://cgit.gum.retiolum/stockholm"
grab_repo = steps.Git(repourl=stockholm_repo, mode='incremental')
env = {"LOGNAME": "shared", "NIX_REMOTE": "daemon"}
@@ -78,8 +79,11 @@
f.addStep(grab_repo)
for i in [ "test-centos7", "wolf", "test-failing" ]:
addShell(f,name="populate-{}".format(i),env=env,
- command=nixshell + ["set -o pipefail;{}( nix-instantiate --arg configuration shared/1systems/{}.nix --eval --readonly-mode --show-trace -A config.krebs.build.populate --strict | jq -r .)".format("!" if "failing" in i else "",i)])
+ command=nixshell + \
+ ["{}( make system={} eval.config.krebs.build.populate \
+ | jq -er .)".format("!" if "failing" in i else "",i)])
+ # XXX we must prepare ./retiolum.rsa_key.priv for secrets to work
addShell(f,name="instantiate-test-all-modules",env=env,
command=nixshell + \
["touch retiolum.rsa_key.priv; \