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/hydra/stockholm.nix1
-rw-r--r--makefu/2configs/main-laptop.nix1
-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/urlwatch/default.nix1
9 files changed, 89 insertions, 26 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/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/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/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/