summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/bluetooth-mpd.nix17
-rw-r--r--makefu/2configs/git/cgit-retiolum.nix1
-rw-r--r--makefu/2configs/gui/automatic-diskmount.nix44
-rw-r--r--makefu/2configs/hw/bluetooth.nix39
-rw-r--r--makefu/2configs/hw/irtoy.nix15
-rw-r--r--makefu/2configs/hw/network-manager.nix3
-rw-r--r--makefu/2configs/hw/rad1o.nix (renamed from makefu/2configs/rad1o.nix)0
-rw-r--r--makefu/2configs/hydra/stockholm.nix1
-rw-r--r--makefu/2configs/main-laptop.nix1
-rw-r--r--makefu/2configs/nginx/euer.mon.nix26
-rw-r--r--makefu/2configs/nginx/misa-felix-hochzeit.ml.nix17
-rw-r--r--makefu/2configs/remote-build/master.nix14
-rw-r--r--makefu/2configs/stats/arafetch.nix19
-rw-r--r--makefu/2configs/tools/all.nix1
-rw-r--r--makefu/2configs/tools/core-gui.nix4
-rw-r--r--makefu/2configs/tools/core.nix9
-rw-r--r--makefu/2configs/tools/desktop.nix11
-rw-r--r--makefu/2configs/urlwatch/default.nix1
18 files changed, 182 insertions, 41 deletions
diff --git a/makefu/2configs/bluetooth-mpd.nix b/makefu/2configs/bluetooth-mpd.nix
index 226f5cf1f..b59d3ce10 100644
--- a/makefu/2configs/bluetooth-mpd.nix
+++ b/makefu/2configs/bluetooth-mpd.nix
@@ -34,7 +34,7 @@ in {
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
- # systemWide = true;
+ # systemWide = true;
support32Bit = true;
zeroconf.discovery.enable = true;
zeroconf.publish.enable = true;
@@ -42,12 +42,13 @@ in {
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
+ load-module module-native-protocol-unix auth-anonymous=1
load-module module-always-sink
load-module module-console-kit
load-module module-systemd-login
@@ -56,13 +57,15 @@ in {
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
+ # connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
hardware.bluetooth.enable = true;
- #hardware.bluetooth.extraConfig = ''
- # [general]
- # Enable=Source,Sink,Media,Socket
- #'';
+ # environment.etc."bluetooth/audio.conf".text = ''
+ # [General]
+ # Enable = Source,Sink,Media,Socket
+ # '';
};
}
diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix
index 30d90f9e3..c209b83f6 100644
--- a/makefu/2configs/git/cgit-retiolum.nix
+++ b/makefu/2configs/git/cgit-retiolum.nix
@@ -30,6 +30,7 @@ let
euer_blog = { };
ampel = { };
europastats = { };
+ arafetch = { };
init-stockholm = {
cgit.desc = "Init stuff for stockholm";
};
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/bluetooth.nix b/makefu/2configs/hw/bluetooth.nix
new file mode 100644
index 000000000..85c3190ff
--- /dev/null
+++ b/makefu/2configs/hw/bluetooth.nix
@@ -0,0 +1,39 @@
+{ pkgs, ... }:
+{ # bluetooth+pulse config
+# for blueman-applet
+ users.users.makefu.packages = [
+ pkgs.blueman
+ ];
+ hardware.pulseaudio = {
+ enable = true;
+ package = pkgs.pulseaudioFull;
+# systemWide = true;
+ support32Bit = true;
+ 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-switch-on-connect
+ load-module module-switch-on-port-available
+ '';
+ };
+
+# presumably a2dp Sink
+# Enable profile:
+## pacmd set-card-profile "$(pactl list cards short | egrep -o bluez_card[[:alnum:]._]+)" a2dp_sink
+ hardware.bluetooth.extraConfig = '';
+ [general]
+ Enable=Source,Sink,Media,Socket
+ '';
+
+# connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
+ hardware.bluetooth.enable = true;
+}
diff --git a/makefu/2configs/hw/irtoy.nix b/makefu/2configs/hw/irtoy.nix
new file mode 100644
index 000000000..688f1b2b9
--- /dev/null
+++ b/makefu/2configs/hw/irtoy.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, ... }:
+
+{
+
+ users.users.makefu.packages = with pkgs; [
+ lirc
+ ];
+
+ users.extraUsers.${config.krebs.build.user.name}.extraGroups = [ "dialout" ];
+
+ services.udev.extraRules = ''
+ SUBSYSTEMS=="usb", ATTRS{idProduct}=="fd08", ATTRS{idVendor}=="04d8", SYMLINK+="irtoy", MODE="0666", GROUP="dialout"
+ '';
+}
+
diff --git a/makefu/2configs/hw/network-manager.nix b/makefu/2configs/hw/network-manager.nix
index 7e29849b1..d322c683d 100644
--- a/makefu/2configs/hw/network-manager.nix
+++ b/makefu/2configs/hw/network-manager.nix
@@ -11,9 +11,8 @@
systemd.services.modemmanager = {
description = "ModemManager";
- after = [ "network-manager.service" ];
bindsTo = [ "network-manager.service" ];
- wantedBy = [ "network-manager.service" ];
+ wantedBy = [ "network-manager.service" "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.modemmanager}/bin/ModemManager";
PrivateTmp = true;
diff --git a/makefu/2configs/rad1o.nix b/makefu/2configs/hw/rad1o.nix
index 6eca69e0c..6eca69e0c 100644
--- a/makefu/2configs/rad1o.nix
+++ b/makefu/2configs/hw/rad1o.nix
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.mon.nix b/makefu/2configs/nginx/euer.mon.nix
new file mode 100644
index 000000000..c5a7e68af
--- /dev/null
+++ b/makefu/2configs/nginx/euer.mon.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+with import <stockholm/lib>;
+let
+ hostname = config.krebs.build.host.name;
+ user = config.services.nginx.user;
+ group = config.services.nginx.group;
+ external-ip = config.krebs.build.host.nets.internet.ip4.addr;
+ internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
+in {
+ services.nginx = {
+ enable = mkDefault true;
+ virtualHosts."mon.euer.krebsco.de" = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/" = {
+ proxyPass = "http://wbob.r:3000/";
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ '';
+ };
+ };
+ };
+}
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/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
index e04b12f9c..422676b24 100644
--- a/makefu/2configs/stats/arafetch.nix
+++ b/makefu/2configs/stats/arafetch.nix
@@ -3,7 +3,7 @@ with import <stockholm/lib>;
let
pkg = with pkgs.python3Packages;buildPythonPackage rec {
rev = "762d747";
- name = "europastats-${rev}";
+ name = "arafetch-${rev}";
propagatedBuildInputs = [
requests
docopt
@@ -25,12 +25,25 @@ in {
};
systemd.services.arafetch = {
- startAt = "Mon 09:15:00";
+ startAt = "Mon,Wed,Fri 09:15:00";
wantedBy = [ "multi-user.target" ];
environment = {
OUTDIR = home;
};
path = [ pkg pkgs.git pkgs.wget ];
- script = "${pkg}/bin/weekrun";
+ 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/all.nix b/makefu/2configs/tools/all.nix
index 2bb438f16..b6554e040 100644
--- a/makefu/2configs/tools/all.nix
+++ b/makefu/2configs/tools/all.nix
@@ -5,6 +5,7 @@
./core.nix
./core-gui.nix
./dev.nix
+ ./desktop.nix
./extra-gui.nix
./games.nix
./media.nix
diff --git a/makefu/2configs/tools/core-gui.nix b/makefu/2configs/tools/core-gui.nix
index 2f80b08c9..898bae10d 100644
--- a/makefu/2configs/tools/core-gui.nix
+++ b/makefu/2configs/tools/core-gui.nix
@@ -1,10 +1,6 @@
{ pkgs, ... }:
{
- nixpkgs.config.firefox = {
- enableAdobeFlash = true;
- };
-
krebs.per-user.makefu.packages = with pkgs; [
chromium
clipit
diff --git a/makefu/2configs/tools/core.nix b/makefu/2configs/tools/core.nix
index 7e9a459c3..604288904 100644
--- a/makefu/2configs/tools/core.nix
+++ b/makefu/2configs/tools/core.nix
@@ -24,7 +24,6 @@
# io
pv
- sshpass
usbutils
p7zip
hdparm
@@ -39,11 +38,6 @@
wol
iftop
- mkpasswd
- mutt
- weechat
- tmux
-
# stockholm
git
gnumake
@@ -55,8 +49,5 @@
rxvt_unicode.terminfo
krebspaste
- # TODO:
- taskwarrior
- pass
];
}
diff --git a/makefu/2configs/tools/desktop.nix b/makefu/2configs/tools/desktop.nix
new file mode 100644
index 000000000..1fe03e111
--- /dev/null
+++ b/makefu/2configs/tools/desktop.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ users.users.makefu.packages = with pkgs; [
+ taskwarrior
+ pass
+ mutt
+ weechat
+ tmux
+ ];
+}
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/