summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
authormakefu <makefu@nixos.dev>2016-01-18 12:50:20 +0100
committermakefu <makefu@nixos.dev>2016-01-18 12:50:20 +0100
commitf4754010336a1d7c876bc6797a44f30e3d4b4ead (patch)
treede4dff5340b76d970cc404146e688726e4446e0f /makefu
parentb86daca11669019d3c2218e623bfb57b5a8033d7 (diff)
parentde891cf43181d28cbc9526993df4e55022d230da (diff)
Merge branch 'master' of gum:stockholm
Diffstat (limited to 'makefu')
-rw-r--r--makefu/1systems/filepimp.nix25
-rw-r--r--makefu/1systems/gum.nix11
-rw-r--r--makefu/1systems/omo.nix98
-rw-r--r--makefu/1systems/pnp.nix67
-rw-r--r--makefu/1systems/pornocauster.nix16
-rw-r--r--makefu/1systems/vbob.nix1
-rw-r--r--makefu/1systems/wry.nix20
-rw-r--r--makefu/2configs/Reaktor/full.nix18
-rw-r--r--makefu/2configs/Reaktor/random-emoji.nix26
-rw-r--r--makefu/2configs/Reaktor/random-emoji.sh6
-rw-r--r--makefu/2configs/Reaktor/random-issue.sh20
-rw-r--r--makefu/2configs/Reaktor/sed-plugin.nix18
-rw-r--r--makefu/2configs/Reaktor/sed-plugin.py53
-rw-r--r--makefu/2configs/Reaktor/shack-correct.nix20
-rw-r--r--makefu/2configs/Reaktor/shack-correct.sh6
-rw-r--r--makefu/2configs/Reaktor/simpleExtend.nix19
-rw-r--r--makefu/2configs/Reaktor/stockholmLentil.nix27
-rw-r--r--makefu/2configs/Reaktor/titlebot.nix38
-rw-r--r--makefu/2configs/default.nix13
-rw-r--r--makefu/2configs/hw/tp-x2x0.nix7
-rw-r--r--makefu/2configs/mail-client.nix2
-rw-r--r--makefu/2configs/nginx/omo-share.nix34
-rw-r--r--makefu/2configs/share-user-sftp.nix21
-rw-r--r--makefu/2configs/smart-monitor.nix18
-rw-r--r--makefu/2configs/urlwatch.nix20
-rw-r--r--makefu/2configs/vim.nix2
-rw-r--r--makefu/2configs/virtualization.nix1
-rw-r--r--makefu/2configs/wwan.nix36
-rw-r--r--makefu/2configs/zsh-user.nix3
-rw-r--r--makefu/3modules/buildbot/master.nix263
-rw-r--r--makefu/3modules/buildbot/slave.nix185
-rw-r--r--makefu/3modules/default.nix4
-rw-r--r--makefu/3modules/snapraid.nix125
-rw-r--r--makefu/3modules/umts.nix76
34 files changed, 485 insertions, 814 deletions
diff --git a/makefu/1systems/filepimp.nix b/makefu/1systems/filepimp.nix
index 66ea2ce90..2d008cee6 100644
--- a/makefu/1systems/filepimp.nix
+++ b/makefu/1systems/filepimp.nix
@@ -9,28 +9,35 @@
[ # Include the results of the hardware scan.
../2configs/fs/single-partition-ext4.nix
../2configs/tinc-basic-retiolum.nix
+ ../2configs/smart-monitor.nix
];
krebs.build.host = config.krebs.hosts.filepimp;
-
+ services.smartd.devices = [
+ { device = "/dev/sda"; }
+ { device = "/dev/sdb"; }
+ { device = "/dev/sdc"; }
+ { device = "/dev/sdd"; }
+ { device = "/dev/sde"; }
+ ];
# AMD N54L
boot = {
- loader.grub.device = "/dev/sda";
+ loader.grub.device = "/dev/sde";
initrd.availableKernelModules = [
- "usb_storage"
"ahci"
- "xhci_hcd"
- "ata_piix"
- "uhci_hcd"
+ "ohci_pci"
"ehci_pci"
+ "pata_atiixp"
+ "usb_storage"
+ "usbhid"
];
- kernelModules = [ ];
+ kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
-
hardware.enableAllFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
- networking.firewall.allowPing = true;
+ zramSwap.enable = true;
+ zramSwap.numDevices = 2;
}
diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix
index 417a020fa..ac7524506 100644
--- a/makefu/1systems/gum.nix
+++ b/makefu/1systems/gum.nix
@@ -6,18 +6,22 @@ let
internal-ip = head config.krebs.build.host.nets.retiolum.addrs4;
in {
imports = [
- # TODO: copy this config or move to krebs
../2configs/tinc-basic-retiolum.nix
../2configs/headless.nix
../2configs/fs/simple-swap.nix
../2configs/fs/single-partition-ext4.nix
+ ../2configs/smart-monitor.nix
# ../2configs/iodined.nix
../2configs/git/cgit-retiolum.nix
../2configs/mattermost-docker.nix
../2configs/nginx/euer.test.nix
- ];
+ ../2configs/exim-retiolum.nix
+ ../2configs/urlwatch.nix
+
+ ];
+ services.smartd.devices = [ { device = "/dev/sda";} ];
nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; };
###### stable
@@ -28,6 +32,9 @@ in {
ListenAddress = ${external-ip} 655
ListenAddress = ${external-ip} 21031
'';
+ krebs.nginx.servers.cgit.server-names = [
+ "cgit.euer.krebsco.de"
+ ];
# Chat
environment.systemPackages = with pkgs;[
diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix
index 6ae79398a..552af4e4f 100644
--- a/makefu/1systems/omo.nix
+++ b/makefu/1systems/omo.nix
@@ -2,36 +2,110 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
-{ config, pkgs, ... }:
-
-{
+{ config, pkgs, lib, ... }:
+let
+ byid = dev: "/dev/disk/by-id/" + dev;
+ keyFile = "/dev/disk/by-id/usb-Verbatim_STORE_N_GO_070B3CEE0B223954-0:0";
+ rootDisk = byid "ata-INTEL_SSDSA2M080G2GC_CVPO003402PB080BGN";
+ homePartition = byid "ata-INTEL_SSDSA2M080G2GC_CVPO003402PB080BGN-part3";
+ # cryptsetup luksFormat $dev --cipher aes-xts-plain64 -s 512 -h sha512
+ # cryptsetup luksAddKey $dev tmpkey
+ # cryptsetup luksOpen $dev crypt0
+ # mkfs.xfs /dev/mapper/crypt0 -L crypt0
+ cryptDisk0 = byid "ata-ST2000DM001-1CH164_Z240XTT6";
+ cryptDisk1 = byid "ata-TP02000GB_TPW151006050068";
+ cryptDisk2 = byid "ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5548487";
+ # all physical disks
+ allDisks = [ rootDisk cryptDisk0 cryptDisk1 cryptDisk2 ];
+in {
imports =
- [ # Include the results of the hardware scan.
+ [
+ # TODO: unlock home partition via ssh
../2configs/fs/single-partition-ext4.nix
../2configs/tinc-basic-retiolum.nix
+ ../2configs/zsh-user.nix
../2configs/exim-retiolum.nix
+ ../2configs/smart-monitor.nix
+ ../2configs/mail-client.nix
+ ../2configs/share-user-sftp.nix
+ ../2configs/nginx/omo-share.nix
+ ../3modules
];
+ # services.openssh.allowSFTP = false;
krebs.build.host = config.krebs.hosts.omo;
+ krebs.build.source.git.nixpkgs.rev = "d0e3cca04edd5d1b3d61f188b4a5f61f35cdf1ce";
+
+ # copy config from <secrets/sabnzbd.ini> to /var/lib/sabnzbd/
+ services.sabnzbd.enable = true;
+ systemd.services.sabnzbd.environment.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+
+ # HDD Array stuff
+ services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
+
+ makefu.snapraid = let
+ toMapper = id: "/media/crypt${builtins.toString id}";
+ in {
+ enable = true;
+ disks = map toMapper [ 0 1 ];
+ parity = toMapper 2;
+ };
+ fileSystems = let
+ cryptMount = name:
+ { "/media/${name}" = { device = "/dev/mapper/${name}"; fsType = "xfs"; };};
+ in {
+ "/home" = {
+ device = "/dev/mapper/home";
+ fsType = "ext4";
+ };
+ } // cryptMount "crypt0"
+ // cryptMount "crypt1"
+ // cryptMount "crypt2";
+
+ powerManagement.powerUpCommands = lib.concatStrings (map (disk: ''
+ ${pkgs.hdparm}/sbin/hdparm -S 100 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -B 127 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -y ${disk}
+ '') allDisks);
- # AMD E350
boot = {
- loader.grub.device = "/dev/sda";
+ initrd.luks = {
+ devices = let
+ usbkey = name: device: {
+ inherit name device keyFile;
+ keyFileSize = 4096;
+ };
+ in [
+ (usbkey "home" homePartition)
+ (usbkey "crypt0" cryptDisk0)
+ (usbkey "crypt1" cryptDisk1)
+ (usbkey "crypt2" cryptDisk2)
+ ];
+ };
+ loader.grub.device = rootDisk;
initrd.availableKernelModules = [
- "usb_storage"
"ahci"
- "xhci_hcd"
- "ata_piix"
- "uhci_hcd"
+ "ohci_pci"
"ehci_pci"
+ "pata_atiixp"
+ "firewire_ohci"
+ "usb_storage"
+ "usbhid"
];
- kernelModules = [ ];
+ kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
+ networking.firewall.allowedUDPPorts = [ 655 ];
+ # 8080: sabnzbd
+ networking.firewall.allowedTCPPorts = [ 80 655 8080 ];
+
hardware.enableAllFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
- networking.firewall.allowPing = true;
+ zramSwap.enable = true;
+ zramSwap.numDevices = 2;
+
+
}
diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix
index 161bfa3e9..51c124bbe 100644
--- a/makefu/1systems/pnp.nix
+++ b/makefu/1systems/pnp.nix
@@ -1,62 +1,51 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page
-# and in the NixOS manual (accessible by running ‘nixos-help’).
-
+# Usage:
+# NIX_PATH=secrets=/home/makefu/secrets/wry:nixpkgs=/var/src/nixpkgs nix-build -A users.makefu.pnp.config.system.build.vm
+# result/bin/run-pnp-vm -virtfs local,path=/home/makefu/secrets/pnp,security_model=none,mount_tag=secrets
{ config, pkgs, ... }:
{
imports =
- [ # Include the results of the hardware scan.
- # Base
+ [
../2configs/tinc-basic-retiolum.nix
../2configs/headless.nix
+ ../../krebs/3modules/Reaktor.nix
- # HW/FS
-
- # enables virtio kernel modules in initrd
+ # these will be overwritten by qemu-vm.nix but will be used if the system
+ # is directly deployed
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/fs/vm-single-partition.nix
- # Services
- ../2configs/git/cgit-retiolum.nix
-
- ## Reaktor
- ## \/ are only plugins, must enable Reaktor explicitly
- ../2configs/Reaktor/stockholmLentil.nix
- ../2configs/Reaktor/simpleExtend.nix
- ../2configs/Reaktor/random-emoji.nix
- ../2configs/Reaktor/titlebot.nix
- ../2configs/Reaktor/shack-correct.nix
-
- ../2configs/exim-retiolum.nix
- ../2configs/urlwatch.nix
-
- # ../2configs/graphite-standalone.nix
+ # config.system.build.vm
+ <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
];
- krebs.urlwatch.verbose = true;
- krebs.Reaktor.enable = true;
- krebs.Reaktor.debug = true;
- krebs.Reaktor.nickname = "Reaktor|bot";
- krebs.Reaktor.extraEnviron = {
- REAKTOR_CHANNELS = "#krebs,#binaergewitter,#shackspace";
+ virtualisation.graphics = false;
+ # also export secrets, see Usage above
+ fileSystems = pkgs.lib.mkVMOverride {
+ "${builtins.toString <secrets>}" =
+ { device = "secrets";
+ fsType = "9p";
+ options = "trans=virtio,version=9p2000.L,cache=loose";
+ neededForBoot = true;
+ };
+ };
+
+ krebs.Reaktor = {
+ enable = true;
+ debug = true;
+ extraEnviron = {
+ REAKTOR_HOST = "cd.retiolum";
+ };
+ plugins = with pkgs.ReaktorPlugins; [ stockholm-issue nixos-version sed-plugin ];
+ channels = [ "#retiolum" ];
};
krebs.build.host = config.krebs.hosts.pnp;
nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; };
-
networking.firewall.allowedTCPPorts = [
- # nginx runs on 80
- 80
- # graphite-web runs on 8080, carbon cache runs on 2003 tcp and udp
- # 8080 2003
-
- # smtp
25
];
- # networking.firewall.allowedUDPPorts = [ 2003 ];
-
}
diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix
index 28b77d330..d7fa8edc5 100644
--- a/makefu/1systems/pornocauster.nix
+++ b/makefu/1systems/pornocauster.nix
@@ -26,6 +26,7 @@
# services
../2configs/git/brain-retiolum.nix
../2configs/tor.nix
+ # ../2configs/buildbot-standalone.nix
# hardware specifics are in here
../2configs/hw/tp-x220.nix
@@ -34,16 +35,18 @@
# ../2configs/mediawiki.nix
#../2configs/wordpress.nix
];
+ hardware.sane.enable = true;
+ hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ];
nixpkgs.config.packageOverrides = pkgs: {
tinc = pkgs.tinc_pre;
- buildbot = let
- pkgs1509 = import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) {};
- in pkgs1509.buildbot;
};
- makefu.buildbot.master.enable = true;
- #krebs.Reaktor.enable = true;
- #krebs.Reaktor.nickname = "makefu|r";
+ 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;[
@@ -58,6 +61,7 @@
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.allowedTCPPorts = [
25
];
diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix
index a24cefd0d..b8c02cb67 100644
--- a/makefu/1systems/vbob.nix
+++ b/makefu/1systems/vbob.nix
@@ -59,7 +59,6 @@ in {
buildbot
buildbot-slave
get
- genid
];
networking.firewall.allowedTCPPorts = [
diff --git a/makefu/1systems/wry.nix b/makefu/1systems/wry.nix
index cd2b3f657..f022311c9 100644
--- a/makefu/1systems/wry.nix
+++ b/makefu/1systems/wry.nix
@@ -18,8 +18,6 @@ in {
../2configs/iodined.nix
- # Reaktor
- ../2configs/Reaktor/simpleExtend.nix
# other nginx
../2configs/nginx/euer.wiki.nix
@@ -29,9 +27,21 @@ in {
# collectd
../2configs/collectd/collectd-base.nix
];
+
krebs.build.host = config.krebs.hosts.wry;
- krebs.Reaktor.enable = true;
+ krebs.Reaktor = {
+ nickname = "Reaktor|bot";
+ channels = [ "#krebs" "#shackspace" "#binaergewitter" ];
+ enable = true;
+ plugins = with pkgs.ReaktorPlugins;[
+ titlebot
+ # stockholm-issue
+ nixos-version
+ shack-correct
+ sed-plugin
+ random-emoji ];
+ };
# bepasty to listen only on the correct interfaces
krebs.bepasty.servers.internal.nginx.listen = [ "${internal-ip}:80" ];
@@ -59,11 +69,11 @@ in {
};
networking = {
- firewall = {
+ firewall = {
allowPing = true;
logRefusedConnections = false;
allowedTCPPorts = [ 53 80 443 ];
- allowedUDPPorts = [ 655 ];
+ allowedUDPPorts = [ 655 53 ];
};
interfaces.enp2s1.ip4 = [{
address = external-ip;
diff --git a/makefu/2configs/Reaktor/full.nix b/makefu/2configs/Reaktor/full.nix
deleted file mode 100644
index 50620890f..000000000
--- a/makefu/2configs/Reaktor/full.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-_:
-{
- # implementation of the complete Reaktor bot
- imports = [
- #./stockholmLentil.nix
- ./simpleExtend.nix
- ./random-emoji.nix
- ./titlebot.nix
- ./shack-correct.nix
- ./sed-plugin.nix
- ];
- krebs.Reaktor.nickname = "Reaktor|bot";
- krebs.Reaktor.enable = true;
-
- krebs.Reaktor.extraEnviron = {
- REAKTOR_CHANNELS = "#krebs,#binaergewitter,#shackspace";
- };
-}
diff --git a/makefu/2configs/Reaktor/random-emoji.nix b/makefu/2configs/Reaktor/random-emoji.nix
deleted file mode 100644
index 3113a826b..000000000
--- a/makefu/2configs/Reaktor/random-emoji.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with pkgs;
-let
- rpkg = pkgs.substituteAll( {
- name="random-emoji";
- dir= "bin";
- isExecutable=true;
- src= ./random-emoji.sh;
- });
- rpkg-path = lib.makeSearchPath "bin" (with pkgs; [
- coreutils
- gnused
- gnugrep
- xmlstarlet
- curl]);
-in {
- # TODO: make origin a variable, <- module is generic enough to handle different origins, not only stockholm
- krebs.Reaktor.extraConfig = ''
- public_commands.insert(0,{
- 'capname' : "emoji",
- 'pattern' : indirect_pattern.format("emoji"),
- 'argv' : ["${rpkg}/bin/random-emoji"],
- 'env' : { 'PATH':'${rpkg-path}' } })
- '';
-}
diff --git a/makefu/2configs/Reaktor/random-emoji.sh b/makefu/2configs/Reaktor/random-emoji.sh
deleted file mode 100644
index 386aa68b9..000000000
--- a/makefu/2configs/Reaktor/random-emoji.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-curl http://emojicons.com/random -s | \
- grep data-text | \
- sed -n 's/.*>\(.*\)<\/textarea>/\1/p' | \
- head -n 1 | \
- xmlstarlet unesc
diff --git a/makefu/2configs/Reaktor/random-issue.sh b/makefu/2configs/Reaktor/random-issue.sh
deleted file mode 100644
index 5c47c6156..000000000
--- a/makefu/2configs/Reaktor/random-issue.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-set -eu
-# requires env:
-# $state_dir
-# $origin
-
-# in PATH: git,lentil,coreutils
-subdir=`echo "$1" | tr -dc "[:alnum:]"`
-name=`echo "$origin" | tr -dc "[:alnum:]"`
-track="$state_dir/$name-checkout"
-(if test -e "$track" ;then
- cd "$track"
- git fetch origin master
- git reset --hard origin/master
-else
- git clone "$origin" "$track"
-fi) >&2
-
-cd "$track"
-lentil "${subdir:-.}" -f csv | sed 1d | shuf | head -1
diff --git a/makefu/2configs/Reaktor/sed-plugin.nix b/makefu/2configs/Reaktor/sed-plugin.nix
deleted file mode 100644
index a451e0d3e..000000000
--- a/makefu/2configs/Reaktor/sed-plugin.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with pkgs;
-let
- script = ./sed-plugin.py;
-in {
- #TODO: this will eat up the last regex, fix Reaktor
- krebs.Reaktor.extraConfig = ''
- public_commands.append({
- 'capname' : "sed-plugin",
- # only support s///gi
- 'pattern' : '^(?P<args>.*)$$',
- 'argv' : ["${pkgs.python3}/bin/python3","${script}"],
- 'env' : { 'state_dir' : workdir,
- 'PATH':'${lib.makeSearchPath "bin" [pkgs.gnused]}' }})
- '';
-}
-
diff --git a/makefu/2configs/Reaktor/sed-plugin.py b/makefu/2configs/Reaktor/sed-plugin.py
deleted file mode 100644
index 8103c9585..000000000
--- a/makefu/2configs/Reaktor/sed-plugin.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python3
-
-# Usage:
-# _from=krebs state_dir=. python sed-plugin.py 'dick butt'
-# _from=krebs state_dir=. python sed-plugin.py 's/t/l/g'
-## dick bull
-import shelve
-from os import environ
-from os.path import join
-from sys import argv
-d = shelve.open(join(environ['state_dir'],'sed-plugin.shelve'),writeback=True)
-usr = environ['_from']
-import re
-
-def is_regex(line):
- myre = re.compile(r'^s/((?:\\/|[^/])+)/((?:\\/|[^/])*)/([ig]*)$')
- return myre.match(line)
-
-line = argv[1]
-m = is_regex(line)
-
-if m:
- f,t,flagstr = m.groups()
- fn = f.replace('\/','/')
- tn = t.replace('\/','/')
- flags = 0
- count = 1
- if flagstr:
- if 'i' in flagstr:
- flags = re.IGNORECASE
- if 'g' in flagstr:
- count = 0
- else:
- flagstr = ''
- last = d.get(usr,None)
- if last:
- #print(re.sub(fn,tn,last,count=count,flags=flags))
- from subprocess import Popen,PIPE
- p = Popen(['sed','s/{}/{}/{}'.format(f,t,flagstr)],stdin=PIPE,stdout=PIPE )
- so,se = p.communicate(bytes("{}\n".format(last),"UTF-8"))
- if p.returncode:
- print("something went wrong when trying to process your regex: {}".format(se.decode()))
- ret = so.decode()
- print("\x1b[1m{}\x1b[0m meinte: {}".format(usr,ret.strip()))
- if ret:
- d[usr] = ret
-
- else:
- print("no last message")
-else:
- d[usr] = line
-
-d.close()
diff --git a/makefu/2configs/Reaktor/shack-correct.nix b/makefu/2configs/Reaktor/shack-correct.nix
deleted file mode 100644
index 8f30807f1..000000000
--- a/makefu/2configs/Reaktor/shack-correct.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with pkgs;
-let
- script = pkgs.substituteAll ( {
- name="shack-correct";
- isExecutable=true;
- dir = "";
- src = ./shack-correct.sh;
- });
-in {
- krebs.Reaktor.extraConfig = ''
- public_commands.insert(0,{
- 'capname' : "shack-correct",
- 'pattern' : '^(?P<args>.*Shack.*)$$',
- 'argv' : ["${script}"],
- 'env' : { }})
- '';
-}
-
diff --git a/makefu/2configs/Reaktor/shack-correct.sh b/makefu/2configs/Reaktor/shack-correct.sh
deleted file mode 100644
index 3b4d04f80..000000000
--- a/makefu/2configs/Reaktor/shack-correct.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-set -eu
-printf "Sie meinten wohl \""
-echo -n $@ | sed 's/Shack/shack/g'
-echo "\""
-echo "${_from}--"
diff --git a/makefu/2configs/Reaktor/simpleExtend.nix b/makefu/2configs/Reaktor/simpleExtend.nix
deleted file mode 100644
index 95175a4e0..000000000
--- a/makefu/2configs/Reaktor/simpleExtend.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with pkgs;
-let
- nixos-version-script = pkgs.writeScript "nix-version" ''
- #! /bin/sh
- . /etc/os-release
- echo "$PRETTY_NAME"
- '';
-in {
- krebs.Reaktor.extraConfig = ''
- public_commands.insert(0,{
- 'capname' : "nixos-version",
- 'pattern' : indirect_pattern.format("nixos-version"),
- 'argv' : ["${nixos-version-script}"],
- 'env' : { 'state_dir': workdir } })
- '';
-}
-
diff --git a/makefu/2configs/Reaktor/stockholmLentil.nix b/makefu/2configs/Reaktor/stockholmLentil.nix
deleted file mode 100644
index 21f0305fb..000000000
--- a/makefu/2configs/Reaktor/stockholmLentil.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with pkgs;
-let
- random-issue = pkgs.substituteAll( {
- name="random-issue";
- dir= "bin";
- isExecutable=true;
- src= ./random-issue.sh;
- });
- random-issue-path = lib.makeSearchPath "bin" (with pkgs; [
- coreutils
- git
- gnused
- lentil]);
-in {
- # TODO: make origin a variable, <- module is generic enough to handle different origins, not only stockholm
- krebs.Reaktor.extraConfig = ''
- public_commands.insert(0,{
- 'capname' : "stockholm-issue",
- 'pattern' : indirect_pattern.format("stockholm-issue"),
- 'argv' : ["${random-issue}/bin/random-issue"],
- 'env' : { 'state_dir': workdir,
- 'PATH':'${random-issue-path}',
- 'origin':'http://cgit.pnp/stockholm' } })
- '';
-}
diff --git a/makefu/2configs/Reaktor/titlebot.nix b/makefu/2configs/Reaktor/titlebot.nix
deleted file mode 100644
index 9ef02548b..000000000
--- a/makefu/2configs/Reaktor/titlebot.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ stdenv,config, lib, pkgs, ... }:
-
-with pkgs;
-let
- pypkgs = pkgs.python3Packages;
- titlebot_cmds = pypkgs.buildPythonPackage {
- name = "titlebot_cmds";
- propagatedBuildInputs = with pypkgs; [ setuptools ];
- src = fetchurl {
- # https://github.com/makefu/reaktor-titlebot tag 2.1.0
- url = "https://github.com/makefu/reaktor-titlebot/archive/2.1.0.tar.gz";
- sha256 = "0wvf09wmk8b52f9j65qrw81nwrhs9pfhijwrlkzp5l7l2q8cjkp6";
- };
- };
- pub_cmds = ["up" "help" "list" "top" "highest" "undo" ];
- priv_cmds = [ "clear" ];
-in {
- # TODO: write identify file in
- # {config.users.extraUsers.Reaktor.home}/state/admin.lst
- krebs.Reaktor.extraConfig = ''
- def titlebot_cmd(cmd):
- return {
- 'capname': cmd,
- 'env': {
- 'TITLEDB':
- '${config.users.extraUsers.Reaktor.home}/suggestions.json'
- },
- 'pattern': '^\\.' + cmd + '\\s*(?:\\s+(?P<args>.*))?$$',
- 'argv': [ '${titlebot_cmds}/bin/' + cmd ] }
- # TODO: for each element in ${titlebot_cmds}/bin/*
- public_commands.insert(0,titlebot_cmd('up'))
- public_commands.insert(0,titlebot_cmd('help'))
- public_commands.insert(0,titlebot_cmd('list'))
- public_commands.insert(0,titlebot_cmd('top'))
- public_commands.insert(0,titlebot_cmd('new'))
- commands.insert(0,titlebot_cmd('clear'))
- '';
-}
diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix
index a0b49edaf..ec1100582 100644
--- a/makefu/2configs/default.nix
+++ b/makefu/2configs/default.nix
@@ -13,7 +13,7 @@ with lib;
./vim.nix
];
-
+ nixpkgs.config.allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "unrar-" pkg.name);
krebs = {
enable = true;
search-domain = "retiolum";
@@ -23,8 +23,8 @@ with lib;
source = {
git.nixpkgs = {
#url = https://github.com/NixOS/nixpkgs;
- url = mkDefault https://github.com/makefu/nixpkgs;
- rev = mkDefault "3fd2c24685f604edc925f73ed56600b8c66236b3"; # nixos-15.09 + cherry-picking
+ url = mkDefault https://github.com/nixos/nixpkgs;
+ rev = mkDefault "93d8671e2c6d1d25f126ed30e5e6f16764330119"; # unstable @ 2015-01-03, tested on filepimp
target-path = "/var/src/nixpkgs";
};
@@ -65,7 +65,12 @@ with lib;
time.timeZone = "Europe/Berlin";
#nix.maxJobs = 1;
- programs.ssh.startAgent = false;
+ programs.ssh = {
+ startAgent = false;
+ extraConfig = ''
+ UseRoaming no
+ '';
+ };
services.openssh.enable = true;
nix.useChroot = true;
diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix
index 047895ce6..ebc72a06e 100644
--- a/makefu/2configs/hw/tp-x2x0.nix
+++ b/makefu/2configs/hw/tp-x2x0.nix
@@ -24,5 +24,12 @@ with lib;
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
'';
}
diff --git a/makefu/2configs/mail-client.nix b/makefu/2configs/mail-client.nix
index a6ae33d2f..bda21e9d0 100644
--- a/