summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-rw-r--r--makefu/1systems/drop/source.nix1
-rw-r--r--makefu/1systems/fileleech/source.nix3
-rw-r--r--makefu/1systems/gum/config.nix6
-rw-r--r--makefu/1systems/omo/config.nix9
-rw-r--r--makefu/1systems/wbob/config.nix65
-rw-r--r--makefu/1systems/x/config.nix18
-rw-r--r--makefu/1systems/x/source.nix2
-rw-r--r--makefu/2configs/bluetooth-mpd.nix71
-rw-r--r--makefu/2configs/deployment/bureautomation/hass.nix75
-rw-r--r--makefu/2configs/deployment/photostore.krebsco.de.nix1
-rw-r--r--makefu/2configs/git/cgit-retiolum.nix14
-rw-r--r--makefu/2configs/gui/automatic-diskmount.nix44
-rw-r--r--makefu/2configs/hw/tp-x2x0.nix2
-rw-r--r--makefu/2configs/hydra/stockholm.nix1
-rw-r--r--makefu/2configs/main-laptop.nix1
-rw-r--r--makefu/2configs/nginx/euer.wiki.nix4
-rw-r--r--makefu/2configs/nginx/misa-felix-hochzeit.ml.nix17
-rw-r--r--makefu/2configs/printer.nix1
-rw-r--r--makefu/2configs/remote-build/master.nix14
-rw-r--r--makefu/2configs/stats/arafetch.nix49
-rw-r--r--makefu/2configs/tools/mic92.nix9
-rw-r--r--makefu/2configs/urlwatch/default.nix1
-rw-r--r--makefu/3modules/awesome-extra.nix4
-rw-r--r--makefu/5pkgs/ampel/default.nix6
-rw-r--r--makefu/5pkgs/awesomecfg/default.nix6
-rw-r--r--makefu/5pkgs/awesomecfg/full.cfg37
-rw-r--r--makefu/5pkgs/awesomecfg/kiosk.lua4
-rw-r--r--makefu/5pkgs/devpi/default.nix13
-rw-r--r--makefu/5pkgs/nodemcu-uploader/default.nix19
-rw-r--r--makefu/5pkgs/python-firetv/default.nix40
-rw-r--r--makefu/5pkgs/zj-58/default.nix30
-rw-r--r--makefu/6tests/data/secrets/torrent-secrets/auth.nix1
-rw-r--r--makefu/source.nix43
33 files changed, 460 insertions, 151 deletions
diff --git a/makefu/1systems/drop/source.nix b/makefu/1systems/drop/source.nix
index 74de846c0..45bd6f97e 100644
--- a/makefu/1systems/drop/source.nix
+++ b/makefu/1systems/drop/source.nix
@@ -1,3 +1,4 @@
import <stockholm/makefu/source.nix> {
name="drop";
+ torrent = true;
}
diff --git a/makefu/1systems/fileleech/source.nix b/makefu/1systems/fileleech/source.nix
index 699267e21..caca1fbcb 100644
--- a/makefu/1systems/fileleech/source.nix
+++ b/makefu/1systems/fileleech/source.nix
@@ -1,3 +1,4 @@
import <stockholm/makefu/source.nix> {
- name="fileleech";
+ name = "fileleech";
+ torrent = true;
}
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index b859efc94..578e4add8 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -52,7 +52,7 @@ in {
# network
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
- <stockholm/makefu/2configs/vpn/vpnws/server.nix>
+ # <stockholm/makefu/2configs/vpn/vpnws/server.nix>
<stockholm/makefu/2configs/dnscrypt/server.nix>
<stockholm/makefu/2configs/iodined.nix>
@@ -64,8 +64,10 @@ in {
<stockholm/makefu/2configs/nginx/euer.test.nix>
<stockholm/makefu/2configs/nginx/euer.wiki.nix>
<stockholm/makefu/2configs/nginx/euer.blog.nix>
+ # <stockholm/makefu/2configs/nginx/gum.krebsco.de.nix>
<stockholm/makefu/2configs/nginx/public_html.nix>
<stockholm/makefu/2configs/nginx/update.connector.one.nix>
+ <stockholm/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix>
<stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
<stockholm/makefu/2configs/deployment/graphs.nix>
@@ -222,6 +224,8 @@ in {
25
# http
80 443
+ # httptunnel
+ 8080 8443
# tinc
655
# tinc-shack
diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix
index 01438397e..bed6ae9fd 100644
--- a/makefu/1systems/omo/config.nix
+++ b/makefu/1systems/omo/config.nix
@@ -9,7 +9,7 @@ let
keyFile = byid "usb-Verbatim_STORE_N_GO_070B3CEE0B223954-0:0";
rootDisk = byid "ata-SanDisk_SD8SNAT128G1122_162099420904";
rootPartition = byid "ata-SanDisk_SD8SNAT128G1122_162099420904-part2";
- primaryInterface = "enp1s0";
+ primaryInterface = "enp2s0";
# cryptsetup luksFormat $dev --cipher aes-xts-plain64 -s 512 -h sha512
# cryptsetup luksAddKey $dev tmpkey
# cryptsetup luksOpen $dev crypt0 --key-file tmpkey --keyfile-size=4096
@@ -54,6 +54,7 @@ in {
#<stockholm/makefu/2configs/graphite-standalone.nix>
#<stockholm/makefu/2configs/share-user-sftp.nix>
<stockholm/makefu/2configs/share/omo.nix>
+ # <stockholm/makefu/2configs/share/omo-timemachine.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
@@ -65,6 +66,7 @@ in {
<stockholm/makefu/2configs/stats/external/aralast.nix>
<stockholm/makefu/2configs/stats/telegraf>
<stockholm/makefu/2configs/stats/telegraf/europastats.nix>
+ <stockholm/makefu/2configs/stats/arafetch.nix>
# services
<stockholm/makefu/2configs/syncthing.nix>
@@ -72,6 +74,11 @@ in {
<stockholm/makefu/2configs/remote-build/slave.nix>
<stockholm/makefu/2configs/deployment/google-muell.nix>
<stockholm/makefu/2configs/virtualisation/docker.nix>
+ <stockholm/makefu/2configs/bluetooth-mpd.nix>
+ {
+ hardware.pulseaudio.systemWide = true;
+ makefu.mpd.musicDirectory = "/media/cryptX/music";
+ }
# security
diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix
index 637d8e2d8..42f3bddb1 100644
--- a/makefu/1systems/wbob/config.nix
+++ b/makefu/1systems/wbob/config.nix
@@ -32,66 +32,10 @@ in {
<stockholm/makefu/2configs/hydra/stockholm.nix>
<stockholm/makefu/2configs/share/wbob.nix>
- (let
- musicDirectory = "/data/music";
- in {
- services.mpd = {
- enable = true;
- inherit musicDirectory;
- # dataDir = "/home/anders/.mpd";
- network.listenAddress = "any";
- extraConfig = ''
- audio_output {
- type "pulse"
- name "Local MPD"
- server "127.0.0.1"
- }
- '';
- };
- # open because of truestedInterfaces
- # networking.firewall.allowedTCPPorts = [ 6600 4713 ];
- services.samba.shares.music = {
- path = musicDirectory;
- "read only" = "no";
- browseable = "yes";
- "guest ok" = "yes";
- };
-
- sound.enable = true;
- hardware.pulseaudio = {
- enable = true;
- package = pkgs.pulseaudioFull;
- # systemWide = true;
- support32Bit = true;
- zeroconf.discovery.enable = true;
- zeroconf.publish.enable = true;
- tcp = {
- enable = true;
- anonymousClients.allowAll = true;
- anonymousClients.allowedIpRanges = [ "127.0.0.1" "192.168.8.0/24" ];
- };
- configFile = pkgs.writeText "default.pa" ''
- load-module module-udev-detect
- load-module module-bluetooth-policy
- load-module module-bluetooth-discover
- load-module module-native-protocol-unix
- load-module module-always-sink
- load-module module-console-kit
- load-module module-systemd-login
- load-module module-intended-roles
- load-module module-position-event-sounds
- load-module module-filter-heuristics
- load-module module-filter-apply
- load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
- load-module module-switch-on-connect
- # may be required for "system-wide" pulse to connect to bluetooth
- #module-bluez5-device
- #module-bluez5-discover
- '';
- };
- # connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
- hardware.bluetooth.enable = true;
- })
+ <stockholm/makefu/2configs/bluetooth-mpd.nix>
+ {
+ users.users.makefu.extraGroups = [ "pulse" ];
+ }
# Sensors
<stockholm/makefu/2configs/stats/telegraf>
@@ -180,6 +124,7 @@ in {
networking.firewall.allowedTCPPorts = [
655
8081 #smokeping
+ 8086 #influx
49152
];
networking.firewall.trustedInterfaces = [ "enp0s25" ];
diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix
index ad2ad8779..93bb27efe 100644
--- a/makefu/1systems/x/config.nix
+++ b/makefu/1systems/x/config.nix
@@ -11,6 +11,8 @@ with import <stockholm/lib>;
<stockholm/makefu/2configs/main-laptop.nix>
<stockholm/makefu/2configs/extra-fonts.nix>
<stockholm/makefu/2configs/tools/all.nix>
+ <stockholm/makefu/2configs/tools/mic92.nix>
+
<stockholm/makefu/2configs/laptop-backup.nix>
<stockholm/makefu/2configs/dnscrypt/client.nix>
<stockholm/makefu/2configs/avahi.nix>
@@ -27,6 +29,8 @@ with import <stockholm/lib>;
# <stockholm/makefu/2configs/vncserver.nix>
# <stockholm/makefu/2configs/deployment/led-fader>
# <stockholm/makefu/2configs/deployment/hound>
+ # <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
+ # <stockholm/makefu/2configs/deployment/bureautomation/hass.nix>
# Krebs
<stockholm/makefu/2configs/tinc/retiolum.nix>
@@ -40,7 +44,7 @@ with import <stockholm/lib>;
# Virtualization
<stockholm/makefu/2configs/virtualisation/libvirt.nix>
<stockholm/makefu/2configs/virtualisation/docker.nix>
- # <stockholm/makefu/2configs/virtualisation/virtualbox.nix>
+ <stockholm/makefu/2configs/virtualisation/virtualbox.nix>
{
networking.firewall.allowedTCPPorts = [ 8080 ];
networking.nat = {
@@ -78,7 +82,6 @@ with import <stockholm/lib>;
# <stockholm/makefu/2configs/lanparty/lancache-dns.nix>
# <stockholm/makefu/2configs/lanparty/samba.nix>
# <stockholm/makefu/2configs/lanparty/mumble-server.nix>
- # <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
{
networking.wireguard.interfaces.wg0 = {
@@ -123,6 +126,7 @@ with import <stockholm/lib>;
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-switch-on-connect
+ load-module module-switch-on-port-available
'';
};
@@ -137,15 +141,6 @@ with import <stockholm/lib>;
# connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
hardware.bluetooth.enable = true;
}
- { # auto-mounting
- services.udisks2.enable = true;
- services.devmon.enable = true;
- # services.gnome3.gvfs.enable = true;
- users.users.makefu.packages = with pkgs;[
- gvfs pcmanfm lxmenu-data
- ];
- environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ];
- }
];
@@ -166,6 +161,7 @@ with import <stockholm/lib>;
networking.extraHosts = ''
192.168.1.11 omo.local
+ 80.92.65.53 www.wifionice.de wifionice.de
'';
# hard dependency because otherwise the device will not be unlocked
boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; allowDiscards=true; }];
diff --git a/makefu/1systems/x/source.nix b/makefu/1systems/x/source.nix
index 6278877c3..ab6429dc1 100644
--- a/makefu/1systems/x/source.nix
+++ b/makefu/1systems/x/source.nix
@@ -3,5 +3,7 @@ import <stockholm/makefu/source.nix> {
full = true;
python = true;
hw = true;
+ unstable = true;
+ mic92 = true;
# torrent = true;
}
diff --git a/makefu/2configs/bluetooth-mpd.nix b/makefu/2configs/bluetooth-mpd.nix
new file mode 100644
index 000000000..b59d3ce10
--- /dev/null
+++ b/makefu/2configs/bluetooth-mpd.nix
@@ -0,0 +1,71 @@
+{ pkgs, config, lib, ... }:
+
+let
+ cfg = config.makefu.mpd;
+in {
+ options.makefu.mpd.musicDirectory = lib.mkOption {
+ description = "music Directory";
+ default = "/data/music";
+ type = lib.types.str;
+ };
+ config = {
+ services.mpd = {
+ enable = true;
+ inherit (cfg) musicDirectory;
+ network.listenAddress = "0.0.0.0";
+ extraConfig = ''
+ audio_output {
+ type "pulse"
+ name "Local MPD"
+ server "127.0.0.1"
+ }
+ '';
+ };
+ # open because of truestedInterfaces
+ # networking.firewall.allowedTCPPorts = [ 6600 4713 ];
+ services.samba.shares.music = {
+ path = cfg.musicDirectory;
+ "read only" = "no";
+ browseable = "yes";
+ "guest ok" = "yes";
+ };
+
+ sound.enable = true;
+ hardware.pulseaudio = {
+ enable = true;
+ package = pkgs.pulseaudioFull;
+ # systemWide = true;
+ support32Bit = true;
+ zeroconf.discovery.enable = true;
+ zeroconf.publish.enable = true;
+ tcp = {
+ enable = true;
+ # PULSE_SERVER=192.168.1.11 pavucontrol
+ anonymousClients.allowAll = true;
+ anonymousClients.allowedIpRanges = [ "127.0.0.1" "192.168.0.0/16" ];
+ };
+ configFile = pkgs.writeText "default.pa" ''
+ load-module module-udev-detect
+ load-module module-bluetooth-policy
+ load-module module-bluetooth-discover
+ load-module module-native-protocol-unix auth-anonymous=1
+ load-module module-always-sink
+ load-module module-console-kit
+ load-module module-systemd-login
+ load-module module-intended-roles
+ load-module module-position-event-sounds
+ load-module module-filter-heuristics
+ load-module module-filter-apply
+ load-module module-switch-on-connect
+ #load-module module-bluez5-device
+ #load-module module-bluez5-discover
+ '';
+ };
+ # connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
+ hardware.bluetooth.enable = true;
+ # environment.etc."bluetooth/audio.conf".text = ''
+ # [General]
+ # Enable = Source,Sink,Media,Socket
+ # '';
+ };
+}
diff --git a/makefu/2configs/deployment/bureautomation/hass.nix b/makefu/2configs/deployment/bureautomation/hass.nix
new file mode 100644
index 000000000..b62f37bdb
--- /dev/null
+++ b/makefu/2configs/deployment/bureautomation/hass.nix
@@ -0,0 +1,75 @@
+{ pkgs, lib, ... }:
+let
+ firetv = "192.168.1.238";
+in {
+ imports = [
+ <nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
+ ];
+ systemd.services.firetv = {
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ User = "nobody";
+ ExecStart = "${pkgs.python-firetv}/bin/firetv-server -d ${firetv}:5555";
+ };
+ };
+ nixpkgs.config.packageOverrides = oldpkgs: {
+ home-assistant = (import <nixpkgs-unstable> {}).home-assistant;
+ };
+ ids.uids.hass = 286;
+ ids.gids.hass = 286;
+ services.home-assistant = {
+ #panel_iframe:
+ #configurator:
+ # title: Configurator
+ # icon: mdi:wrench
+ # url: http://hassio.local:3218
+ # sensor:
+ # - platform: random
+ enable = true;
+ config = {
+ homeassistant = {
+ name = "Bureautomation";
+ time_zone = "Europe/Berlin";
+ };
+ panel_iframe = {
+ euer_blog = {
+ title = "Euer Blog";
+ icon = "mdi:wrench";
+ url = "https://euer.krebsco.de";
+ };
+ };
+ media_player = [
+ { platform = "kodi";
+ host = firetv;
+ }
+ { platform = "firetv";
+ # assumes python-firetv running
+ }
+ ];
+ sensor = [
+ {
+ platform = "luftdaten";
+ name = "Shack 1";
+ sensorid = "50";
+ monitored_conditions = [ "P1" "P2" ];
+ }
+ {
+ platform = "luftdaten";
+ name = "Shack 2";
+ sensorid = "658";
+ monitored_conditions = [ "P1" "P2" ];
+ }
+ {
+ platform = "luftdaten";
+ name = "Ditzingen";
+ sensorid = "5341";
+ monitored_conditions = [ "P1" "P2" ];
+ }
+ { platform = "random"; }
+ ];
+ frontend = { };
+ http = { };
+ feedreader.urls = [ "https://nixos.org/blogs.xml" ];
+ };
+ };
+}
diff --git a/makefu/2configs/deployment/photostore.krebsco.de.nix b/makefu/2configs/deployment/photostore.krebsco.de.nix
index ecbca9ea3..19a8df235 100644
--- a/makefu/2configs/deployment/photostore.krebsco.de.nix
+++ b/makefu/2configs/deployment/photostore.krebsco.de.nix
@@ -30,6 +30,7 @@ in {
forceSSL = true;
locations = {
"/".extraConfig = ''
+ expires -1;
uwsgi_pass unix://${wsgi-sock};
uwsgi_param UWSGI_CHDIR ${workdir};
uwsgi_param UWSGI_MODULE cuserver.main;
diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix
index 1109e2519..c209b83f6 100644
--- a/makefu/2configs/git/cgit-retiolum.nix
+++ b/makefu/2configs/git/cgit-retiolum.nix
@@ -3,10 +3,15 @@
with import <stockholm/lib>;
let
- repos = priv-repos // krebs-repos // connector-repos ;
+ repos = priv-repos // krebs-repos // connector-repos // krebsroot-repos;
rules = concatMap krebs-rules (attrValues krebs-repos)
++ concatMap priv-rules (attrValues priv-repos)
- ++ concatMap connector-rules (attrValues connector-repos);
+ ++ concatMap connector-rules (attrValues connector-repos)
+ ++ concatMap krebsroot-rules (attrValues krebsroot-repos);
+
+ krebsroot-repos = mapAttrs make-krebs-repo {
+ hydra-stockholm = { };
+ };
krebs-repos = mapAttrs make-krebs-repo {
stockholm = {
@@ -25,10 +30,10 @@ let
euer_blog = { };
ampel = { };
europastats = { };
+ arafetch = { };
init-stockholm = {
cgit.desc = "Init stuff for stockholm";
};
- hydra-stockholm = { };
};
priv-repos = mapAttrs make-priv-repo {
@@ -70,6 +75,9 @@ let
krebs-rules = repo:
set-owners repo all-makefu ++ set-ro-access repo krebsminister;
+ krebsroot-rules = repo:
+ set-owners repo (all-makefu ++ krebsminister);
+
set-ro-access = with git; repo: user:
optional repo.public {
inherit user;
diff --git a/makefu/2configs/gui/automatic-diskmount.nix b/makefu/2configs/gui/automatic-diskmount.nix
new file mode 100644
index 000000000..19933111a
--- /dev/null
+++ b/makefu/2configs/gui/automatic-diskmount.nix
@@ -0,0 +1,44 @@
+{ pkgs, ... }:
+with import <stockholm/lib>; #genid
+{ # auto-mounting via polkit
+ services.udisks2.enable = true;
+## automount all disks:
+# services.devmon.enable = true;
+# services.gnome3.gvfs.enable = true;
+ users.groups.storage = {
+ gid = genid "storage";
+ members = [ "makefu" ];
+ };
+ users.users.makefu.packages = with pkgs;[
+ gvfs pcmanfm lxmenu-data
+ ];
+ environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ];
+
+## allow users in group "storage" to mount disk
+# https://github.com/coldfix/udiskie/wiki/Permissions
+ security.polkit.extraConfig =
+ ''
+ polkit.addRule(function(action, subject) {
+ var YES = polkit.Result.YES;
+ var permission = {
+ "org.freedesktop.udisks.filesystem-mount": YES,
+ "org.freedesktop.udisks.luks-unlock": YES,
+ "org.freedesktop.udisks.drive-eject": YES,
+ "org.freedesktop.udisks.drive-detach": YES,
+ "org.freedesktop.udisks2.filesystem-mount": YES,
+ "org.freedesktop.udisks2.encrypted-unlock": YES,
+ "org.freedesktop.udisks2.eject-media": YES,
+ "org.freedesktop.udisks2.power-off-drive": YES,
+ "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
+ "org.freedesktop.udisks2.filesystem-unmount-others": YES,
+ "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
+ "org.freedesktop.udisks2.eject-media-other-seat": YES,
+ "org.freedesktop.udisks2.power-off-drive-other-seat": YES
+ };
+ if (subject.isInGroup("storage")) {
+ return permission[action.id];
+ }
+ });
+ '';
+
+}
diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix
index f33c12a8f..98fe30daf 100644
--- a/makefu/2configs/hw/tp-x2x0.nix
+++ b/makefu/2configs/hw/tp-x2x0.nix
@@ -38,7 +38,7 @@ with import <stockholm/lib>;
services.tlp.enable = true;
services.tlp.extraConfig = ''
# BUG: http://linrunner.de/en/tlp/docs/tlp-faq.html#erratic-battery
- START_CHARGE_THRESH_BAT0=67
+ START_CHARGE_THRESH_BAT0=95
STOP_CHARGE_THRESH_BAT0=100
diff --git a/makefu/2configs/hydra/stockholm.nix b/makefu/2configs/hydra/stockholm.nix
index 4bdb09213..35999ae57 100644
--- a/makefu/2configs/hydra/stockholm.nix
+++ b/makefu/2configs/hydra/stockholm.nix
@@ -5,7 +5,6 @@
{
# TODO postgres backup
- services.postgresql.enable = true;
services.hydra = {
enable = true;
diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix
index 827da0c8d..315fc4706 100644
--- a/makefu/2configs/main-laptop.nix
+++ b/makefu/2configs/main-laptop.nix
@@ -16,6 +16,7 @@ in {
./zsh-user.nix
./tools/core.nix
./tools/core-gui.nix
+ ./gui/automatic-diskmount.nix
];
users.users.${config.krebs.build.user.name}.extraGroups = [ "dialout" ];
diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix
index 08bc5659f..99533b25c 100644
--- a/makefu/2configs/nginx/euer.wiki.nix
+++ b/makefu/2configs/nginx/euer.wiki.nix
@@ -17,6 +17,7 @@ let
# contains:
# user1 = pass1
# userN = passN
+ # afterwards put /var/www/<ext-dom>/user1.html as tiddlywiki
tw-pass-file = "${sec}/tw-pass.ini";
in {
@@ -45,7 +46,7 @@ in {
systemd.services.prepare-tw = {
wantedBy = [ "local-fs.target" ];
- before = [ "phpfpm.service" ];
+ before = [ "phpfpm.service" "nginx.service" ];
serviceConfig = {
ExecStart = pkgs.writeScript "prepare-tw-service" ''
#!/bin/sh
@@ -92,6 +93,7 @@ in {
locations = {
"/" = {
root = wiki-dir;
+ index = "makefu.html";
extraConfig = ''
expires -1;
autoindex on;
diff --git a/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix b/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix
new file mode 100644
index 000000000..d0881a934
--- /dev/null
+++ b/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix
@@ -0,0 +1,17 @@
+{ config, lib, pkgs, ... }:
+{
+ services.nginx = {
+ enable = lib.mkDefault true;
+ virtualHosts."misa-felix-hochzeit.ml" = {
+ serverAliases = [ "www.misa-felix-hochzeit.ml" "misa-felix.ml" "www.misa-felix.ml" ];
+ forceSSL = true;
+ enableACME = true;
+ locations = {
+ "/" = {
+ index = "index.html";
+ root = "/var/www/misa-felix-hochzeit.ml";
+ };
+ };
+ };
+ };
+}
diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix
index 51e69d8b7..d5fa65ef9 100644
--- a/makefu/2configs/printer.nix
+++ b/makefu/2configs/printer.nix
@@ -9,6 +9,7 @@ in {
pkgs.samsungUnifiedLinuxDriver
pkgs.cups-dymo # dymo labelwriter
pkgs.foo2zjs # magicolor 1690mf
+ pkgs.zj-58
];
};
diff --git a/makefu/2configs/remote-build/master.nix b/makefu/2configs/remote-build/master.nix
deleted file mode 100644
index 2a2c68119..000000000
--- a/makefu/2configs/remote-build/master.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ pkgs, ...}:
-let
- sshKey = (toString <secrets>) + "/id_nixBuild";
-in {
- nix.distributedBuilds = true;
- # TODO: iterate over krebs.hosts
- nix.buildMachines = map ( hostName:
- { inherit hostName sshKey;
- sshUser = "nixBuild";
- system = "x86_64-linux";
- maxJobs = 8;
- }) [ "hotdog.r" ];
- # puyak.r "wbob.r" "omo.r" "gum.r" "latte.r"
-}
diff --git a/makefu/2configs/stats/arafetch.nix b/makefu/2configs/stats/arafetch.nix
new file mode 100644
index 000000000..422676b24
--- /dev/null
+++ b/makefu/2configs/stats/arafetch.nix
@@ -0,0 +1,49 @@
+{ pkgs, lib, ...}:
+with import <stockholm/lib>;
+let
+ pkg = with pkgs.python3Packages;buildPythonPackage rec {
+ rev = "762d747";
+ name = "arafetch-${rev}";
+ propagatedBuildInputs = [
+ requests
+ docopt
+ influxdb
+ beautifulsoup4
+ ];
+ src = pkgs.fetchgit {
+ url = "http://cgit.euer.krebsco.de/arafetch";
+ inherit rev;
+ sha256 = "164xiqbrr914lz0nh3i1dxz8iwg6vm2af3i3803cd3242nznw0ws";
+ };
+ };
+ home = "/var/lib/arafetch";
+in {
+ users.users.arafetch = {
+ uid = genid "arafetch";
+ inherit home;
+ createHome = true;
+ };
+
+ systemd.services.arafetch = {
+ startAt = "Mon,Wed,Fri 09:15:00";
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ OUTDIR = home;
+ };
+ path = [ pkg pkgs.git pkgs.wget ];
+ serviceConfig = {
+ User = "arafetch";
+ WorkingDirectory = home;
+ PrivateTmp = true;
+ ExecStart = pkgs.writeDash "start-weekrun" ''
+ set -x
+ weekrun || echo "weekrun failed!"
+ find $OUTDIR/db -name \*.json | while read path;do
+ file=''${path##*/}
+ cantine=''${file%%.json}
+ ara2influx $path --cantine $cantine --host wbob.r
+ done
+ '';
+ };
+ };
+}
diff --git a/makefu/2configs/tools/mic92.nix b/makefu/2configs/tools/mic92.nix
new file mode 100644
index 000000000..176e461c7
--- /dev/null
+++ b/makefu/2configs/tools/mic92.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+{
+ nixpkgs.overlays = [
+ (import <mic92/nixos/overlays/mypackages>)
+ ];
+ users.users.makefu.packages = [
+ pkgs.nix-review
+ ];
+}
diff --git a/makefu/2configs/urlwatch/default.nix b/makefu/2configs/urlwatch/default.nix
index d0fb4fe41..f93d47caa 100644
--- a/makefu/2configs/urlwatch/default.nix
+++ b/makefu/2configs/urlwatch/default.nix
@@ -25,7 +25,6 @@ in {
# pypi
https://pypi.python.org/simple/bepasty/
https://pypi.python.org/simple/devpi-client/
- https://pypi.python.org/simple/oslo.config/
https://pypi.python.org/simple/sqlalchemy_migrate/
https://pypi.python.org/simple/xstatic/
https://pypi.python.org/simple/pyserial/
diff --git a/makefu/3modules/awesome-extra.nix b/makefu/3modules/awesome-extra.nix
index e4a79aa87..6f19f8f72 100644
--- a/makefu/3modules/awesome-extra.nix
+++ b/makefu/3modules/awesome-extra.nix
@@ -21,7 +21,9 @@ let
This module will use substituteAll to replace strings before writing to
/etc/xdg/awesome/rc.lua
'';
- default = pkgs.awesomecfg.full;
+ default = pkgs.awesomecfg.full.override {
+ locker = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper";
+ };
};
};
imp = {
diff --git a/makefu/5pkgs/ampel/default.nix b/makefu/5pkgs/ampel/default.nix
index 86518b9b8..9792c2c59 100644
--- a/makefu/5pkgs/ampel/default.nix
+++ b/makefu/5pkgs/ampel/default.nix
@@ -2,7 +2,7 @@
with pkgs.python3Packages;buildPythonPackage rec {
name = "ampel-${version}";
- version = "0.2";
+ version = "0.2.1";
propagatedBuildInputs = [
docopt
@@ -16,8 +16,8 @@ with pkgs.python3Packages;buildPythonPackage rec {
src = pkgs.fetchgit {
url = "http://cgit.euer.krebsco.de/ampel";
- rev = "d8a0250";
- sha256 = "0n36lc17ca5db6pl6dswdqd5w9f881rfqck9yc4w33a5qpsxj85f";
+ rev = "92321d7";
+ sha256 = "0mvpbpf1rx8sc589qjb73gl8z6fir2zs3gl3br1pbhg5jgn0ij4n";
};
meta = {
homepage = http://cgit.euer.krebsco.de/ampel;
diff --git a/makefu/5pkgs/awesomecfg/default.nix b/makefu/5pkgs/awesomecfg/default.nix
index 7e9724ec8..e5f62e910 100644
--- a/makefu/5pkgs/awesomecfg/default.nix
+++ b/makefu/5pkgs/awesomecfg/default.nix
@@ -1,23 +1,23 @@
{ pkgs
, lib
, alsaUtils
-, xlockmore
, xbacklight
, modkey?"Mod4"
+, locker? "${pkgs.xlock}/bin/xlock -mode blank"
, ... }:
{
# replace: @alsaUtils@ @xlockmore@ @xbacklight@ @modkey@
full = lib.makeOverridable pkgs.substituteAll {
name = "awesome_full_config";
- inherit alsaUtils xlockmore xbacklight modkey;
+ inherit alsaUtils locker xbacklight modkey;
isExecutable = false;
src = ./full.cfg;
};
kiosk = lib.makeOverridable pkgs.substituteAll {
name = "awesome_kiosk_config";
- inherit alsaUtils xlockmore xbacklight modkey;
+ inherit alsaUtils locker xbacklight modkey;
isExecutable = false;
src = ./kiosk.lua;
};
diff --git a/makefu/5pkgs/awesomecfg/full.cfg b/makefu/5pkgs/awesomecfg/full.cfg
index 3488d0102..e49a88697 100644
--- a/makefu/5pkgs/awesomecfg/full.cfg
+++ b/makefu/5pkgs/awesomecfg/full.cfg
@@ -243,7 +243,7 @@ awful.screen.connect_for_each_screen(function(s)
set_wallpaper(s)
-- Each screen has its own tag table.
- awful.tag({ "tmp", "news", "www", "im", "work1","work2","net","misc","remote" }, s, awful.layout.layouts[1])
+ awful.tag({ "tmp", "news", "www", "im", "work1","work2","net","misc","remote" }, s, awful.layout.layouts[1])
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
@@ -277,10 +277,10 @@ awful.screen.connect_for_each_screen(function(s)
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
- mailwidget,
+ mailwidget,
wibox.widget.systray(),
- cpuwidget,
- batwidget,
+ cpuwidget,
+ batwidget,
mytextclock,
s.mylayoutbox,
},
@@ -379,19 +379,19 @@ globalkeys = awful.util.table.join(
-- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}),
- awful.key({ modkey,"Control" }, "BackSpace", function () awful.util.spawn("@xlockmore@/bin/xlock -mode blank") end),
- awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("@xlockmore@/bin/xlock -mode blank") end),
-
- awful.key({ modkey }, "x",
- function ()
- awful.prompt.run {
- prompt = "Run Lua code: ",
- textbox = awful.screen.focused().mypromptbox.widget,
- exe_callback = awful.util.eval,
- history_path = awful.util.get_cache_dir() .. "/history_eval"
- }
- end,
- {description = "lua execute prompt", group = "awesome"}),
+ awful.key({ modkey,"Control" }, "BackSpace", function () awful.util.spawn("@locker@") end),
+ awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("@locker@") end),
+
+ awful.key({ modkey }, "x",
+ function ()
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = awful.util.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end)
@@ -412,8 +412,7 @@ clientkeys = awful.util.table.join(
end),
awful.key({ modkey, }, "m",
function (c)
- c.maximized_horizontal = not c.maximized_horizontal
- c.maximized_vertical = not c.maximized_vertical
+ c.maximized = not c.maximized
end)
)
diff --git a/makefu/5pkgs/awesomecfg/kiosk.lua b/makefu/5pkgs/awesomecfg/kiosk.lua
index ec255a8af..d0261f798 100644
--- a/makefu/5pkgs/awesomecfg/kiosk.lua
+++ b/makefu/5pkgs/awesomecfg/kiosk.lua
@@ -331,8 +331,8 @@ globalkeys = awful.util.table.join(
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
-- awful.key({ modkey }, "r", function () awful.util.spawn( "dmenu_run" ) end ),
- awful.key({ modkey,"Control" }, "BackSpace", function () awful.util.spawn("xlock -mode blank") end),
- awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("xlock -mode blank") end),
+ awful.key({ modkey,"Control" }, "BackSpace", function () awful.util.spawn("@locker@") end),
+ awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("@locker@") end),
awful.key({ modkey }, "x",
function ()
diff --git a/makefu/5pkgs/devpi/default.nix b/makefu/5pkgs/devpi/default.nix
index 3ddcd9641..6515ea3d1 100644
--- a/makefu/5pkgs/devpi/default.nix
+++ b/makefu/5pkgs/devpi/default.nix
@@ -16,16 +16,17 @@ let
};
devpi-web = pkgs.python3Packages.buildPythonPackage rec {
name = "devpi-web";
- version = "3.1.1";
+ version = "3.2.2";
src = pkgs.fetchurl {
url = "mirror://pypi/d/devpi-web/devpi-web-${version}.tar.gz";
- sha256 = "0bvqv52jmasfm4sdyccwsgvk9a663d3grj7zjw8r9x7xm7l3svqv";
+ sha256 = "1mwg2fcw88rn47ypnhg5f4s1r066129z922113shyinwrwfddhay";
};
- propagatedBuildInputs = with pkgs.python3Packages;
- [ pkgs.devpi-server pyramid_chameleon beautifulsoup4 defusedxml readme-renderer ];
+ propagatedBuildInputs = with pkgs.python3Packages; builtins.trace pkgs.devpi-server.version
+ [ pkgs.devpi-server pyramid_chameleon pygments docutils devpi-common
+ whoosh beautifulsoup4 defusedxml readme-renderer ];
meta = {
homepage = https://bitbucket.org/hpk42/devpi;
@@ -37,6 +38,6 @@ let
in {
devpi-web = pkgs.python3.buildEnv.override {
- extraLibs = [ devpi-web devpi-server ];
- };
+ extraLibs = [ devpi-web pkgs.devpi-server ];
+ };
}
diff --git a/makefu/5pkgs/nodemcu-uploader/default.nix b/makefu/5pkgs/nodemcu-uploader/default.nix
index 64476be6e..f3e47be55 100644
--- a/makefu/5pkgs/nodemcu-uploader/default.nix
+++ b/makefu/5pkgs/nodemcu-uploader/default.nix
@@ -1,19 +1,22 @@
-{ lib, pkgs, pythonPackages, fetchurl, ... }:
+{ lib, pkgs, pythonPackages, ... }:
with pythonPackages; buildPythonPackage rec {
name = "nodemcu-uploader-${version}";
- version = "0.2.2";
- disabled = isPy3k || isPyPy;
+ version = "0.4.1";
propagatedBuildInputs = [
pyserial
+ wrapt
];
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/n/nodemcu-uploader/nodemcu-uploader-${version}.tar.gz";
- sha256 = "090giz84y9y3idgifp0yh80qqyv2czv6h3y55wyrlgf7qfbwbrvn";
+
+ src = pkgs.fetchFromGitHub {
+ owner = "kmpm";
+ repo = "nodemcu-uploader";
+ rev = "v${version}";
+ sha256 = "055pvlg544vb97kaqnnq51fs9f9g75vwgbazc293f3g1sk263gmn";
};
- # ImportError: No module named tests
- # not sure what to do here
+
doCheck = false;
+
meta = {
homepage = https://github.com/kmpm/nodemcu-uploader;
description = "tool for uploading files to NodeMCU filesystem";
diff --git a/makefu/5pkgs/python-firetv/default.nix b/makefu/5pkgs/python-firetv/default.nix
new file mode 100644
index 000000000..1fb772f1f
--- /dev/null
+++ b/makefu/5pkgs/python-firetv/default.nix
@@ -0,0 +1,40 @@
+{ lib, pkgs, python2Packages, ... }:
+# requires libusb1 from unstable
+with (import <nixpkgs-unstable> {}).python2Packages; let
+
+ python-adb = buildPythonPackage rec {
+ pname = "adb";
+ version = "1.2.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0v4my47ikgkbq04gdllpx6kql5cfh7dnpq2fk72x03z74mqri7v8";
+ };
+
+ propagatedBuildInputs = [ libusb1 m2crypto ];
+ meta = {
+ homepage = https://github.com/google/python-adb;
+ description = "Python ADB + Fastboot implementation";
+ license = lib.licenses.asl20;
+ };
+ };
+in
+ buildPythonPackage rec {
+ name = "python-firetv-${version}";
+ version = "1.0.5";
+
+ src = pkgs.fetchFromGitHub {
+ owner = "happyleavesaoc";
+ repo = "python-firetv";
+ # rev = version;
+ rev = "55406c6";
+ sha256 = "1r2yighilchs0jvcvbngkjxkk7gp588ikcl64x7afqzxc6zxv7wp";
+ };
+
+ propagatedBuildInputs = [ python-adb flask pyyaml ];
+ meta = {
+ homepage = https://github.com/happyleavesaoc/python-firetv;
+ description = "provides state informations and some control of an amazon firetv";
+ license = lib.licenses.mit;
+ };
+}
diff --git a/makefu/5pkgs/zj-58/default.nix b/makefu/5pkgs/zj-58/default.nix
new file mode 100644
index 000000000..6eda84959
--- /dev/null
+++ b/makefu/5pkgs/zj-58/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchFromGitHub, cups}:
+
+stdenv.mkDerivation rec {
+ name = "cups-zj58-2018-02-22";
+
+ src = fetchFromGitHub {
+ owner = "klirichek";
+ repo = "zj-58";
+ rev = "e4212cd";
+ sha256 = "1w2qkspm4qqg5h8n6gmakzhiww7gag64chvy9kf89xsl3wsyp6pi";
+ };
+
+ buildInputs = [cups];
+
+ installPhase = ''
+ mkdir -p $out/lib/cups/filter
+
+ cp rastertozj $out/lib/cups/filter
+
+
+ mkdir -p $out/share/cups/model/zjiang
+ cp ZJ-58.ppd $out/share/cups/model/zjiang/
+ '';
+
+ meta = {
+ description = "CUPS filter for thermal printer Zjiang ZJ-58";
+ homepage = https://github.com/klirichek/zj-58;
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/makefu/6tests/data/secrets/torrent-secrets/auth.nix b/makefu/6tests/data/secrets/torrent-secrets/auth.nix
deleted file mode 100644
index 0967ef424..000000000
--- a/makefu/6tests/data/secrets/torrent-secrets/auth.nix
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/makefu/source.nix b/makefu/source.nix
index 79a2c535f..bcdb66a66 100644
--- a/makefu/source.nix
+++ b/makefu/source.nix
@@ -1,12 +1,14 @@
with import <stockholm/lib>;
host@{ name,
- override ? {},
- secure ? false,
- full ? false,
- torrent ? false,
- hw ? false,
- musnix ? false,
- python ? false
+ override ? {}
+, secure ? false
+, full ? false
+, torrent ? false
+, hw ? false
+, musnix ? false
+, python ? false
+, unstable ? false #unstable channel checked out
+, mic92 ? false
}:
let
builder = if getEnv "dummy_secrets" == "true"
@@ -19,9 +21,8 @@ let
];
};
# TODO: automate updating of this ref + cherry-picks
- ref = "51810e0"; # nixos-17.09 @ 2018-02-14
- # + do_sqlite3 ruby: 55a952be5b5
- # + signal: 0f19beef3
+ ref = "a09afbfb8a4"; # nixos-18.03 @ 2018-04-04
+ # + do_sqlite3 ruby: 55a952be5b5
in
evalSource (toString _file) [
@@ -52,28 +53,44 @@ in
(mkIf ( musnix ) {
musnix.git = {
url = https://github.com/musnix/musnix.git;
- ref = "d8b989f";
+ ref = "master"; # follow the musnix channel, lets see how this works out
};
})
(mkIf ( hw ) {
nixos-hardware.git = {
url = https://github.com/nixos/nixos-hardware.git;
- ref = "8a05dc9";
+ ref = "30fdd53";
};
})
(mkIf ( python ) {
python.git = {
url = https://github.com/garbas/nixpkgs-python;
- ref = "cac319b";
+ ref = "cac319b7";
};
})
+
(mkIf ( torrent ) {
torrent-secrets.file = getAttr builder {
buildbot = toString <stockholm/makefu/6tests/data/secrets>;
makefu = "/home/makefu/secrets/torrent" ;
};
})
+
+ (mkIf ( unstable ) {
+ nixpkgs-unstable.git = {
+ url = https://github.com/nixos/nixpkgs-channels;
+ ref = "nixos-unstable";
+ };
+ })
+
+ (mkIf ( mic92 ) {
+ mic92.git = {
+ url = https://github.com/Mic92/dotfiles/;
+ ref = "48a1f49";
+ };
+ })
+
override
]
[cgit] Unable to lock slot /tmp/cgit/2f000000.lock: Permission denied (13)