summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-06-02 23:35:17 +0200
committertv <tv@krebsco.de>2020-06-02 23:35:17 +0200
commit09c9f8f7fb04be39390b6f65966789c1bf6333e5 (patch)
treeb0cb0f718b40517b0645a38169e67b1088566f64 /makefu
parent09e620c79b70e495e9651e8e5c1b160dd1b5fb8d (diff)
parent211e2ca6b9a1d8b4dd92071065b0b595123fe282 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu')
-rw-r--r--makefu/0tests/data/secrets/ebk-notify.yml0
-rw-r--r--makefu/1systems/gum/config.nix3
-rw-r--r--makefu/1systems/omo/config.nix24
-rw-r--r--makefu/1systems/x/config.nix8
-rw-r--r--makefu/2configs/bureautomation/default.nix1
-rw-r--r--makefu/2configs/default.nix6
-rw-r--r--makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix39
-rw-r--r--makefu/2configs/deployment/docker/template.md33
-rw-r--r--makefu/2configs/deployment/feed.euer.krebsco.de/default.nix52
-rw-r--r--makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml44
-rw-r--r--makefu/2configs/deployment/gecloudpad/default.nix5
-rw-r--r--makefu/2configs/deployment/owncloud.nix5
-rw-r--r--makefu/2configs/editor/vim.nix3
-rw-r--r--makefu/2configs/git/cgit-retiolum.nix1
-rw-r--r--makefu/2configs/gui/base.nix11
-rw-r--r--makefu/2configs/gui/urxvtd.nix2
-rw-r--r--makefu/2configs/gui/wbob-kiosk.nix9
-rw-r--r--makefu/2configs/ham/androidtv/adbshell.nix4
-rw-r--r--makefu/2configs/ham/androidtv/default.nix4
-rw-r--r--makefu/2configs/ham/androidtv/purepythonadb.nix6
-rw-r--r--makefu/2configs/ham/default.nix6
-rw-r--r--makefu/2configs/ham/multi/the_playlist.nix83
-rw-r--r--makefu/2configs/ham/zigbee2mqtt/default.nix1
-rw-r--r--makefu/2configs/home-manager/cli.nix9
-rw-r--r--makefu/2configs/home-manager/desktop.nix1
-rw-r--r--makefu/2configs/home-manager/zsh.nix12
-rw-r--r--makefu/2configs/hw/bluetooth.nix6
-rw-r--r--makefu/2configs/legacy_only.nix8
-rw-r--r--makefu/2configs/minimal.nix2
-rw-r--r--makefu/2configs/nur.nix4
-rw-r--r--makefu/2configs/share/omo.nix12
-rw-r--r--makefu/2configs/tools/dev.nix1
-rw-r--r--makefu/2configs/tools/extra-gui.nix2
-rw-r--r--makefu/2configs/tools/studio.nix3
-rw-r--r--makefu/5pkgs/tinymediamanager/default.nix38
-rw-r--r--makefu/krops.nix2
36 files changed, 390 insertions, 60 deletions
diff --git a/makefu/0tests/data/secrets/ebk-notify.yml b/makefu/0tests/data/secrets/ebk-notify.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/makefu/0tests/data/secrets/ebk-notify.yml
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index 8603d769..a38a671f 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -108,7 +108,6 @@ in {
## network
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
- <stockholm/makefu/2configs/dnscrypt/server.nix>
<stockholm/makefu/2configs/binary-cache/server.nix>
<stockholm/makefu/2configs/backup/server.nix>
<stockholm/makefu/2configs/iodined.nix>
@@ -137,9 +136,11 @@ in {
<stockholm/makefu/2configs/deployment/owncloud.nix>
<stockholm/makefu/2configs/deployment/board.euer.krebsco.de.nix>
<stockholm/makefu/2configs/deployment/rss.euer.krebsco.de.nix>
+ <stockholm/makefu/2configs/deployment/feed.euer.krebsco.de>
<stockholm/makefu/2configs/deployment/boot-euer.nix>
<stockholm/makefu/2configs/deployment/gecloudpad>
<stockholm/makefu/2configs/deployment/docker/archiveteam-warrior.nix>
+ <stockholm/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix>
<stockholm/makefu/2configs/shiori.nix>
<stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix>
diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix
index 37fb9128..cfe0d0a3 100644
--- a/makefu/1systems/omo/config.nix
+++ b/makefu/1systems/omo/config.nix
@@ -26,6 +26,10 @@ in {
# <stockholm/makefu/2configs/disable_v6.nix>
#<stockholm/makefu/2configs/graphite-standalone.nix>
#<stockholm/makefu/2configs/share-user-sftp.nix>
+
+ <stockholm/makefu/2configs/urlwatch>
+ <stockholm/makefu/2configs/legacy_only.nix>
+
<stockholm/makefu/2configs/share/omo.nix>
<stockholm/makefu/2configs/dcpp/airdcpp.nix>
{ krebs.airdcpp.dcpp.shares = let
@@ -125,16 +129,16 @@ in {
zramSwap.enable = true;
- krebs.Reaktor.reaktor-shack = {
- nickname = "Reaktor|shack";
- workdir = "/var/lib/Reaktor/shack";
- channels = [ "#shackspace" ];
- plugins = with pkgs.ReaktorPlugins;
- [ shack-correct
- # stockholm-issue
- sed-plugin
- random-emoji ];
- };
+ #krebs.Reaktor.reaktor-shack = {
+ # nickname = "Reaktor|shack";
+ # workdir = "/var/lib/Reaktor/shack";
+ # channels = [ "#shackspace" ];
+ # plugins = with pkgs.ReaktorPlugins;
+ # [ shack-correct
+ # # stockholm-issue
+ # sed-plugin
+ # random-emoji ];
+ #};
#krebs.Reaktor.reaktor-bgt = {
# nickname = "Reaktor|bgt";
# workdir = "/var/lib/Reaktor/bgt";
diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix
index 4c479875..4e6706b2 100644
--- a/makefu/1systems/x/config.nix
+++ b/makefu/1systems/x/config.nix
@@ -19,7 +19,9 @@
<stockholm/makefu/2configs/tools/all.nix>
{ programs.adb.enable = true; }
+ { systemd.services.docker.wantedBy = lib.mkForce []; }
<stockholm/makefu/2configs/dict.nix>
+ <stockholm/makefu/2configs/legacy_only.nix>
#<stockholm/makefu/3modules/netboot_server.nix>
#{
# netboot_server = {
@@ -162,7 +164,11 @@
krebs.tinc.retiolum.connectTo = [ "omo" "prism" "nextgum" "wbob" ];
# hard dependency because otherwise the device will not be unlocked
- boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; allowDiscards=true; }];
+ boot.initrd.luks.devices.luksroot =
+ {
+ device = "/dev/sda2";
+ allowDiscards = true;
+ };
# avoid full boot dir
boot.loader.grub.configurationLimit = 3;
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix
index 3c165955..c115bcb6 100644
--- a/makefu/2configs/bureautomation/default.nix
+++ b/makefu/2configs/bureautomation/default.nix
@@ -41,6 +41,7 @@ in {
};
autoExtraComponents = true;
config = {
+ config = {};
discovery = {};
homeassistant = {
name = "Bureautomation";
diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix
index 0cbb5efe..0219e9bb 100644
--- a/makefu/2configs/default.nix
+++ b/makefu/2configs/default.nix
@@ -30,7 +30,7 @@ with import <stockholm/lib>;
};
nix.trustedUsers = [ config.krebs.build.user.name ];
- boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
+ boot.kernelPackages = lib.mkDefault pkgs.linuxPackages;
nixpkgs.config.allowUnfreePredicate = pkg: packageName pkg == "unrar";
@@ -85,4 +85,8 @@ with import <stockholm/lib>;
RuntimeMaxUse=128M
'';
environment.pathsToLink = [ "/share" ];
+ security.acme = {
+ email = "letsencrypt@syntax-fehler.de";
+ acceptTerms = true;
+ };
}
diff --git a/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix b/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix
new file mode 100644
index 00000000..a01f924e
--- /dev/null
+++ b/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix
@@ -0,0 +1,39 @@
+{ lib, ... }:
+let
+ port = 19201;
+in {
+ #services.nginx.virtualHosts."euer.krebsco.de".serverAliases = [ "etherpad.euer.krebsco.de" ];
+ services.nginx.virtualHosts."etherpad.euer.krebsco.de" = {
+ # useACMEHost = "euer.krebsco.de";
+ enableACME = true;
+ forceSSL = true;
+ locations."/".proxyPass = "http://localhost:${toString port}";
+ };
+ docker-containers."etherpad-lite" = {
+ image = "makefoo/bgt-etherpad:2020-05-02.5";
+ ports = [ "127.0.0.1:${toString port}:9001" ];
+ volumes = [
+ "/var/src/secrets/etherpad/apikey:/opt/etherpad-lite/APIKEY.txt"
+ "etherpad_data:/opt/etherpad-lite/var" # persistent dirtydb
+ ];
+ # for postgres
+ #DB_TYPE=postgres
+ #DB_HOST=db.local
+ #DB_PORT=4321
+ #DB_NAME=etherpad
+ #DB_USER=dbusername
+ #DB_PASS=mypassword
+ environment = {
+ # ADMIN_PASSWORD = "auf jeden fall nicht das echte admin passwort";
+ SUPPRESS_ERRORS_IN_PAD_TEXT = "true";
+ TITLE = "Binärgewitter Etherpad";
+ SKIN_NAME = "no-skin";
+ DEFAULT_PAD_TEXT = builtins.replaceStrings ["\n"] ["\\n"] (builtins.readFile ./template.md);
+ PAD_OPTIONS_USE_MONOSPACE_FONT = "true";
+ PAD_OPTIONS_USER_NAME = "true";
+ PAD_OPTIONS_USER_COLOR = "true";
+ PAD_OPTIONS_CHAT_AND_USERS = "true";
+ PAD_OPTIONS_LANG = "en-US";
+ };
+ };
+}
diff --git a/makefu/2configs/deployment/docker/template.md b/makefu/2configs/deployment/docker/template.md
new file mode 100644
index 00000000..a26b2f04
--- /dev/null
+++ b/makefu/2configs/deployment/docker/template.md
@@ -0,0 +1,33 @@
+# BGT<NUMBER>
+
+1. studio-link aufnehmen drücken (wichtig)
+ - markus 6407eb63@studio-link.de
+ - Felix1 1f1021b2@studio-link.de
+ - L33tFelix 4d47a82a@studio-link.de
+ - Ingo 03b33b4a@studio-link.de
+2. audiocity starten, 48000Hz einstellen, Audio-Device checken und aufnehmen drücken (wichtig)
+3. obs starten und aufnehmen drücken (eher unwichtig)
+4. darkice starten (wichtig)
+4. klatschen
+5. Hallo und herzlich Willkommen
+
+## Vorschläge
+### Backlog von Picks und Lesefoo aus der letzten Woche
+
+---
+
+## Blast from the Past
+
+## Toter der Woche
+
+## Untoter der Woche
+
+## News
+
+## Themen
+
+## Mimimi der Woche
+
+## Lesefoo
+
+## Picks
diff --git a/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix b/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix
new file mode 100644
index 00000000..de072092
--- /dev/null
+++ b/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix
@@ -0,0 +1,52 @@
+{ config, lib, pkgs, ... }:
+let
+ filter-file = ./filter.yml;
+ pkg = with pkgs.python3Packages;buildPythonPackage rec {
+ version = "d16ce227dc68c9f60f6dd06e6835bab7cdfdf61b";
+ pname = "ebk-notify";
+ propagatedBuildInputs = [
+ docopt
+ pyyaml
+ requests
+ beautifulsoup4
+ dateutil
+ feedgen
+ ];
+ src = pkgs.fetchgit {
+ url = "http://cgit.euer.krebsco.de/ebk-notify";
+ rev = version;
+ sha256 = "15dlhp17alm01fw7mzdyh2z9zwz8psrs489lxs3hgg1p5wa0kzsp";
+ };
+ };
+ domain = "feed.euer.krebsco.de";
+ path = "/var/www/feed.euer.krebsco.de";
+in
+{
+ systemd.tmpfiles.rules = [
+ "d ${path} nginx nogroup - -"
+ ];
+ krebs.secret.files.ebknotify = {
+ path = "/etc/ebk-notify.yml";
+ owner.name = "nginx";
+ source-path = "${<secrets/ebk-notify.yml>}";
+ };
+ systemd.services.ebk-notify = {
+ startAt = "*:0/10";
+ serviceConfig = {
+ User = "nginx"; # TODO better permission setting
+ # PrivateTmp = true;
+ ExecStart = "${pkg}/bin/ebk-notify --atom --outdir ${path} --config /etc/ebk-notify.yml --cache /tmp/ebk-cache.json --filter ${filter-file} --wait 30";
+ };
+ };
+ systemd.timers.ebk-notify.timerConfig.RandomizedDelaySec = "120";
+ services.nginx = {
+ virtualHosts."${domain}" = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/" = {
+ root = path;
+ index = "root.atom";
+ };
+ };
+ };
+}
diff --git a/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml b/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml
new file mode 100644
index 00000000..50058f32
--- /dev/null
+++ b/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml
@@ -0,0 +1,44 @@
+- name: Free Stuff by Category
+ zipcode: 70378
+ distance: 2
+ categoryId: 192
+- name: Kies
+ zipcode: 70378
+ q: grobkies
+ distance: 2
+- name: pflanzkübel
+ zipcode: 70378
+ q: Pflanzkübel
+ distance: 3
+- name: Ikea Samla
+ zipcode: 70378
+ q: samla
+ distance: 5
+- name: Duplo
+ zipcode: 70378
+ q: Duplo
+ distance: 10
+- name: Baby Gummistiefel
+ zipcode: 70378
+ q: Gummistiefel
+ distance: 5
+- name: Werkbank
+ zipcode: 70378
+ q: Werkbank
+ distance: 5
+- name: Stirnthermometer
+ zipcode: 70378
+ q: Stirnthermometer
+ distance: 5
+- name: Ohrthermometer
+ zipcode: 70378
+ q: Ohrthermometer
+ distance: 5
+- name: Fieberthermometer
+ zipcode: 70378
+ q: Fieberthermometer
+ distance: 5
+- name: Einhell
+ zipcode: 70378
+ q: Einhell
+ distance: 5
diff --git a/makefu/2configs/deployment/gecloudpad/default.nix b/makefu/2configs/deployment/gecloudpad/default.nix
index e13ec6ae..8b88626a 100644
--- a/makefu/2configs/deployment/gecloudpad/default.nix
+++ b/makefu/2configs/deployment/gecloudpad/default.nix
@@ -4,12 +4,14 @@ let
wsgi-sock = "${workdir}/uwsgi-gecloudpad.sock";
workdir = config.services.uwsgi.runDir;
gecloudpad = pkgs.python3Packages.callPackage ./gecloudpad.nix {};
+ gecloudpad_settings = pkgs.writeText "gecloudpad_settings" ''
+ BASEURL = "https://etherpad.euer.krebsco.de"
+ '';
in {
services.uwsgi = {
enable = true;
user = "nginx";
- # runDir = "/var/lib/photostore";
plugins = [ "python3" ];
instance = {
type = "emperor";
@@ -18,6 +20,7 @@ in {
type = "normal";
pythonPackages = self: with self; [ gecloudpad ];
socket = wsgi-sock;
+ env = ["GECLOUDPAD_SETTINGS=${gecloudpad_settings}"];
};
};
};
diff --git a/makefu/2configs/deployment/owncloud.nix b/makefu/2configs/deployment/owncloud.nix
index ed3155ef..1cfda6fc 100644
--- a/makefu/2configs/deployment/owncloud.nix
+++ b/makefu/2configs/deployment/owncloud.nix
@@ -15,6 +15,7 @@ with lib;
let
# TODO: copy-paste from lass/2/websites/util.nix
+ nextcloud = pkgs.nextcloud18;
serveCloud = domains:
let
domain = head domains;
@@ -23,9 +24,9 @@ let
in {
system.activationScripts."prepare-nextcloud-${domain}" = ''
if test ! -e ${root} ;then
- echo "copying latest ${pkgs.nextcloud.name} release to ${root}"
+ echo "copying latest ${nextcloud.name} release to ${root}"
mkdir -p $(dirname "${root}")
- cp -r ${pkgs.nextcloud} "${root}"
+ cp -r ${nextcloud} "${root}"
chown -R nginx:nginx "${root}"
chmod 770 "${root}"
fi
diff --git a/makefu/2configs/editor/vim.nix b/makefu/2configs/editor/vim.nix
index 52ccd0dd..3954dc0f 100644
--- a/makefu/2configs/editor/vim.nix
+++ b/makefu/2configs/editor/vim.nix
@@ -22,7 +22,8 @@ in {
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [ "undotree"
- "YouCompleteMe" "UltiSnips"
+ "YouCompleteMe"
+ #"UltiSnips"
"vim-better-whitespace" ]; }
# vim-nix handles indentation better but does not perform sanity
{ names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; }
diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix
index 2a6e41ad..63999467 100644
--- a/makefu/2configs/git/cgit-retiolum.nix
+++ b/makefu/2configs/git/cgit-retiolum.nix
@@ -18,6 +18,7 @@ let
yacos-backend = {
cgit.desc = "Yet Another Check-Out System";
};
+ ebk-notify.cgit.desc = "Ebay Kleinanzeigen Notify";
};
krebs-repos = mapAttrs make-krebs-repo {
diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix
index 5b46c7e2..9c1d560a 100644
--- a/makefu/2configs/gui/base.nix
+++ b/makefu/2configs/gui/base.nix
@@ -29,24 +29,21 @@ in
awesome.enable = true;
awesome.noArgb = true;
awesome.luaModules = [ pkgs.luaPackages.vicious ];
- default = "awesome";
};
-
- displayManager.auto.enable = true;
- displayManager.auto.user = mainUser;
+ displayManager.defaultSession = lib.mkDefault "none+awesome";
+ displayManager.lightdm = { enable = true; autoLogin.enable = true; autoLogin.user = mainUser; };
desktopManager.xterm.enable = false;
};
environment.systemPackages = [ pkgs.gnome3.defaultIconTheme ];
# lid switch is handled via button presses
services.logind.lidSwitch = lib.mkDefault "ignore";
makefu.awesome.enable = true;
- i18n.consoleFont = "Lat2-Terminus16";
+ console.font = "Lat2-Terminus16";
fonts = {
- enableCoreFonts = true;
enableFontDir = true;
enableGhostscriptFonts = true;
- fonts = [ pkgs.terminus_font ];
+ fonts = [ pkgs.terminus_font pkgs.corefonts ];
};
users.users.${mainUser} = {
diff --git a/makefu/2configs/gui/urxvtd.nix b/makefu/2configs/gui/urxvtd.nix
index 286b87ab..cb6c2584 100644
--- a/makefu/2configs/gui/urxvtd.nix
+++ b/makefu/2configs/gui/urxvtd.nix
@@ -10,7 +10,7 @@ in {
serviceConfig = {
SyslogIdentifier = "urxvtd";
ExecReload = "${pkgs.coreutils}/bin/echo NOP";
- ExecStart = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtd";
+ ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd";
Restart = "always";
RestartSec = "2s";
StartLimitBurst = 0;
diff --git a/makefu/2configs/gui/wbob-kiosk.nix b/makefu/2configs/gui/wbob-kiosk.nix
index 6da1a37e..1a5e6d04 100644
--- a/makefu/2configs/gui/wbob-kiosk.nix
+++ b/makefu/2configs/gui/wbob-kiosk.nix
@@ -12,16 +12,15 @@
windowManager = lib.mkForce {
awesome.enable = false;
- default = "none";
};
desktopManager.xfce = {
- extraSessionCommands = ''
+ enable = true;
+ };
+ displayManager.defaultSession = "xfce";
+ displayManager.sessionCommands = ''
${pkgs.xlibs.xset}/bin/xset -display :0 s off -dpms
${pkgs.xlibs.xrandr}/bin/xrandr --output HDMI2 --right-of HDMI1
'';
- enable = true;
- };
-
# xrandrHeads = [ "HDMI1" "HDMI2" ];
# prevent screen from turning off, disable dpms
};
diff --git a/makefu/2configs/ham/androidtv/adbshell.nix b/makefu/2configs/ham/androidtv/adbshell.nix
index f5b96c85..0fadeeb0 100644
--- a/makefu/2configs/ham/androidtv/adbshell.nix
+++ b/makefu/2configs/ham/androidtv/adbshell.nix
@@ -9,11 +9,11 @@
buildPythonPackage rec {
pname = "adb_shell";
- version = "0.0.8";
+ version = "0.1.1";
src = fetchPypi {
inherit pname version;
- sha256 = "01f9jinhfyjldg9793gz2i7gcd9xyx0a62r7a5ijssklcnn2rwnm";
+ sha256 = "0a4mjrnw2lrhsakb1vjb5l6m3cr1ii7fibs7020nwv08cyx6pq6q";
};
propagatedBuildInputs = [
diff --git a/makefu/2configs/ham/androidtv/default.nix b/makefu/2configs/ham/androidtv/default.nix
index 8f3bdc1f..9899b2dd 100644
--- a/makefu/2configs/ham/androidtv/default.nix
+++ b/makefu/2configs/ham/androidtv/default.nix
@@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "androidtv";
- version = "0.0.34";
+ version = "0.0.39";
src = fetchPypi {
inherit pname version;
- sha256 = "13078i2a9hglpv4ldycph5n5485np21vs6z2qn830hybmx8kfxsw";
+ sha256 = "06lrjj74g2f3pkhsn3c8h13mkykgqqf4g9q6x5yv23z6ghjnk2dz";
};
propagatedBuildInputs = [
diff --git a/makefu/2configs/ham/androidtv/purepythonadb.nix b/makefu/2configs/ham/androidtv/purepythonadb.nix
index d4e763b7..c9b1ff5e 100644
--- a/makefu/2configs/ham/androidtv/purepythonadb.nix
+++ b/makefu/2configs/ham/androidtv/purepythonadb.nix
@@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "pure-python-adb";
- version = "0.2.3.dev0";
+ version = "0.2.2.dev0";
src = fetchPypi {
inherit pname version;
- sha256 = "88e5a4578435197799aa368fb1a5d87fe43e02a888cb7e85c2ad66173b383c89";
+ sha256 = "1xigv6c8xyb4g852nr3smz0137rnp81jvlikza071y7rc6pdzwza";
};
meta = with lib; {
@@ -18,4 +18,4 @@ buildPythonPackage rec {
license = licenses.mit;
# maintainers = [ maintainers. ];
};
-} \ No newline at end of file
+}
diff --git a/makefu/2configs/ham/default.nix b/makefu/2configs/ham/default.nix
index 53723299..2db4ad4d 100644
--- a/makefu/2configs/ham/default.nix
+++ b/makefu/2configs/ham/default.nix
@@ -14,6 +14,7 @@ let
#flurlicht = import ./multi/flurlicht.nix;
kurzzeitwecker = import ./multi/kurzzeitwecker.nix;
firetv_restart = import ./multi/firetv_restart.nix;
+ the_playlist = import ./multi/the_playlist.nix;
# switch
# automation
# binary_sensor
@@ -34,6 +35,7 @@ in {
];
};
config = {
+ config = {};
input_select = zigbee.input_select; # dict
timer = zigbee.timer // kurzzeitwecker.timer; # dict
homeassistant = {
@@ -49,6 +51,8 @@ in {
logger = {
default = "info";
};
+ rest_command = {}
+ // the_playlist.rest_command;
tts = [
{ platform = "google_translate";
language = "de";
@@ -131,6 +135,7 @@ in {
# https://www.home-assistant.io/cookbook/automation_for_rainy_days/
]
++ ((import ./sensor/outside.nix) {inherit lib;})
+ ++ the_playlist.sensor
++ zigbee.sensor ;
frontend = { };
# light = flurlicht.light;
@@ -140,6 +145,7 @@ in {
++ (import ./automation/firetv_restart.nix)
++ kurzzeitwecker.automation
#++ flurlicht.automation
+ ++ the_playlist.automation
++ zigbee.automation;
script =
{ }
diff --git a/makefu/2configs/ham/multi/the_playlist.nix b/makefu/2configs/ham/multi/the_playlist.nix
new file mode 100644
index 00000000..ad090938
--- /dev/null
+++ b/makefu/2configs/ham/multi/the_playlist.nix
@@ -0,0 +1,83 @@
+# Inputs:
+# binary_sensor.playlist_button_good
+# binary_sensor.playlist_button_bad
+
+# outputs
+# rest_command
+# automation
+# sensor
+{
+ rest_command = {
+ good_song = {
+ url = "http://prism.r:8001/good";
+ method = "POST";
+ };
+ bad_song = {
+ url = "http://prism.r:8001/skip";
+ method = "POST";
+ };
+ };
+ automation = [
+ {
+ alias = "playlist song publish";
+ trigger = {
+ #platform = "event";
+ #event_data.entity_id = "sensor.the_playlist_song";
+ platform = "state";
+ entity_id = "sensor.the_playlist_song";
+ };
+ action = {
+ service = "mqtt.publish";
+ data = {
+ topic = "/ham/the_playlist/song";
+ payload_template = "{{ states.sensor.the_playlist_song.state }}";
+ };
+ };
+ }
+ {
+ alias = "playlist upvote on button";
+ trigger = {
+ platform = "state";
+ entity_id = "binary_sensor.playlist_button_good";
+ from = "off";
+ to = "on";
+ };
+ action.service = "rest_command.good_song";
+ }
+ {
+ alias = "playlist downvote on button";
+ trigger = {
+ platform = "state";
+ entity_id = "binary_sensor.playlist_button_bad";
+ from = "off";
+ to = "on";
+ };
+ action.service = "rest_command.bad_song";
+ }
+ ];
+ sensor = [
+ { platform = "rest";
+ name = "pl";
+ resource = "http://prism.r:8001/current";
+ scan_interval = 30;
+ value_template = "1";
+ json_attributes = [ "name" "filename" "youtube" ];
+ }
+ { platform = "template";
+ sensors = {
+ the_playlist_song = {
+ friendly_name = "Current Song";
+ value_template = ''{{ states.sensor.pl.attributes['name'] }}'';
+ };
+ the_playlist_url = {
+ friendly_name = "Song Youtube URL";
+ value_template = ''{{ states.sensor.pl.attributes['youtube'] }}'';
+ };
+ the_playlist_filename = {
+ friendly_name = "Song Filename";
+ value_template = ''{{ states.sensor.pl.attributes['filename'] }}'';
+ };
+ };
+ }
+ ];
+}
diff --git a/makefu/2configs/ham/zigbee2mqtt/default.nix b/makefu/2configs/ham/zigbee2mqtt/default.nix
index 7c55326f..84d32c87 100644
--- a/makefu/2configs/ham/zigbee2mqtt/default.nix
+++ b/makefu/2configs/ham/zigbee2mqtt/default.nix
@@ -17,4 +17,5 @@
volumes = ["/var/lib/zigbee2mqtt:/app/data"];
};
state = [ "/var/lib/zigbee2mqtt/configuration.yaml" "/var/lib/zigbee2mqtt/state.json" ];
+ systemd.services.docker-zigbee2mqtt.after = [ "home-assistant.service" "docker.service" "network-online.target" ];
}
diff --git a/makefu/2configs/home-manager/cli.nix b/makefu/2configs/home-manager/cli.nix
index 6b5d2611..5d5673b8 100644
--- a/makefu/2configs/home-manager/cli.nix
+++ b/makefu/2configs/home-manager/cli.nix
@@ -1,15 +1,6 @@
{pkgs, ... }: {
imports = [ ./zsh.nix ];
home-manager.users.makefu = {
- services.gpg-agent = {
- enable = true;
- defaultCacheTtl = 900;
- maxCacheTtl = 7200;
- defaultCacheTtlSsh = 3600;
- maxCacheTtlSsh = 86400;
- enableSshSupport = true;
- enableScDaemon = true;
- };
programs.direnv = {
stdlib = ''
use_nix() {
diff --git a/makefu/2configs/home-manager/desktop.nix b/makefu/2configs/home-manager/desktop.nix
index 406f7f0d..cf20af1b 100644
--- a/makefu/2configs/home-manager/desktop.nix
+++ b/makefu/2configs/home-manager/desktop.nix
@@ -7,7 +7,6 @@
programs.browserpass = { browsers = [ "firefox" ] ; enable = true; };
programs.firefox = {
enable = true;
- enableIcedTea = true;
};
programs.obs-studio.enable = true;
xdg.enable = true;
diff --git a/makefu/2configs/home-manager/zsh.nix b/makefu/2configs/home-manager/zsh.nix
index 4cd9becc..f972e98b 100644
--- a/makefu/2configs/home-manager/zsh.nix
+++ b/makefu/2configs/home-manager/zsh.nix
@@ -1,5 +1,12 @@
{ pkgs, ... }:
{
+