summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-rw-r--r--makefu/2configs/bgt/download.binaergewitter.de.nix17
-rw-r--r--makefu/2configs/default.nix2
-rw-r--r--makefu/2configs/gui/look-up.nix18
-rw-r--r--makefu/2configs/home/3dprint.nix2
-rw-r--r--makefu/2configs/home/ham/automation/fenster_auf.nix2
-rw-r--r--makefu/2configs/home/ham/automation/find_phone.nix32
-rw-r--r--makefu/2configs/home/ham/automation/shutdown_button.nix3
-rw-r--r--makefu/2configs/home/ham/automation/urlaub.nix12
-rw-r--r--makefu/2configs/home/ham/default.nix13
-rw-r--r--makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix6
-rw-r--r--makefu/2configs/home/ham/multi/heizung.nix11
-rw-r--r--makefu/2configs/home/ham/sensor/dwd.nix2
-rw-r--r--makefu/2configs/home/ham/sensor/outside.nix9
-rw-r--r--makefu/2configs/home/music.nix10
-rw-r--r--makefu/2configs/main-laptop.nix12
-rw-r--r--makefu/2configs/security/hotfix.nix4
-rw-r--r--makefu/2configs/stats/telegraf/default.nix14
-rw-r--r--makefu/2configs/tools/all.nix2
-rw-r--r--makefu/2configs/tools/init-host/default.nix1
-rw-r--r--makefu/5pkgs/airsensor-py/default.nix6
-rw-r--r--makefu/5pkgs/pkgrename/default.nix8
-rw-r--r--makefu/5pkgs/ratt/default.nix2
-rw-r--r--makefu/krops.nix6
23 files changed, 128 insertions, 66 deletions
diff --git a/makefu/2configs/bgt/download.binaergewitter.de.nix b/makefu/2configs/bgt/download.binaergewitter.de.nix
index d49ad158b..31da31a71 100644
--- a/makefu/2configs/bgt/download.binaergewitter.de.nix
+++ b/makefu/2configs/bgt/download.binaergewitter.de.nix
@@ -43,16 +43,13 @@ in {
services.logrotate = {
enable = true;
- config = ''
- ${bgtaccess} ${bgterror} {
- rotate 5
- weekly
- create 600 nginx nginx
- postrotate
- ${pkgs.systemd}/bin/systemctl reload nginx
- endscript
- }
- '';
+ settings.bgt = {
+ files = [ bgtaccess bgterror ];
+ rotate = 5;
+ frequency = "weekly";
+ create = "600 nginx nginx";
+ postrotate = "${pkgs.systemd}/bin/systemctl reload nginx";
+ };
};
# 20.09 unharden nginx to write logs
diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix
index 66c77e1eb..9a08a4497 100644
--- a/makefu/2configs/default.nix
+++ b/makefu/2configs/default.nix
@@ -11,7 +11,7 @@ with import <stockholm/lib>;
./editor/vim.nix
./binary-cache/nixos.nix
./minimal.nix
- ./security/hotfix.nix
+ # ./security/hotfix.nix
];
# users are super important
diff --git a/makefu/2configs/gui/look-up.nix b/makefu/2configs/gui/look-up.nix
new file mode 100644
index 000000000..e04098cc2
--- /dev/null
+++ b/makefu/2configs/gui/look-up.nix
@@ -0,0 +1,18 @@
+{pkgs, config, ... }:
+let
+ user = config.krebs.build.user.name;
+ window-manager = "awesome";
+in
+ {
+ systemd.services.look-up = {
+ startAt = "*:30";
+ serviceConfig = {
+ ExecStart= pkgs.writeDash "look-up" ''
+ set -x
+ eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'"
+ ${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while'
+ '';
+ User = user;
+ };
+ };
+}
diff --git a/makefu/2configs/home/3dprint.nix b/makefu/2configs/home/3dprint.nix
index 859a18840..09f2ce6fd 100644
--- a/makefu/2configs/home/3dprint.nix
+++ b/makefu/2configs/home/3dprint.nix
@@ -9,7 +9,7 @@
# also ensure that the webcam always comes up under the same name
services.udev.extraRules = ''
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
- SUBSYSTEM=="video4linux", ATTR{name}=="UVC Camera (046d:0825)",SYMLINK+="web_cam", MODE="0666", GROUP="video"
+ KERNEL=="video*",ATTRS{vendor}=="0x046d", ATTRS{device}=="0x0825", GROUP="video", SYMLINK+="web_cam"
'';
systemd.services.octoprint = {
path = [ pkgs.libraspberrypi ];
diff --git a/makefu/2configs/home/ham/automation/fenster_auf.nix b/makefu/2configs/home/ham/automation/fenster_auf.nix
index b3682fe0c..698327ff4 100644
--- a/makefu/2configs/home/ham/automation/fenster_auf.nix
+++ b/makefu/2configs/home/ham/automation/fenster_auf.nix
@@ -88,7 +88,7 @@ in {
duschfenster_lang_offen.name = "Duschfenster lange offen";
ist_sommer = {
name = "Es ist Sommer";
- initial = true; # TODO
+ initial = false; # TODO
};
};
diff --git a/makefu/2configs/home/ham/automation/find_phone.nix b/makefu/2configs/home/ham/automation/find_phone.nix
new file mode 100644
index 000000000..d94942c9f
--- /dev/null
+++ b/makefu/2configs/home/ham/automation/find_phone.nix
@@ -0,0 +1,32 @@
+{
+ services.home-assistant.config.script = {
+ find_felix_phone.sequence = [
+ {
+ service = "notify.mobile_app_pixel_3a";
+ data = {
+ title= "Finde Mich!";
+ message= "Such Such Such";
+ data = {
+ ttl = 0;
+ priority = "high";
+ channel = "alarm_stream";
+ };
+ };
+ }
+ ];
+ find_tablet.sequence = [
+ {
+ service = "notify.mobile_app_nova3";
+ data = {
+ title = "Finde Mich!";
+ message = "Such Such Such";
+ data = {
+ ttl = 0;
+ priority = "high";
+ channel = "alarm_stream";
+ };
+ };
+ }
+ ];
+ };
+}
diff --git a/makefu/2configs/home/ham/automation/shutdown_button.nix b/makefu/2configs/home/ham/automation/shutdown_button.nix
index ec1a25567..ec84bbe94 100644
--- a/makefu/2configs/home/ham/automation/shutdown_button.nix
+++ b/makefu/2configs/home/ham/automation/shutdown_button.nix
@@ -47,6 +47,9 @@ in {
{ service = "media_player.media_stop";
target.entity_id = all_media_player;
}
+ { service = "script.turn_on";
+ target.entity_id = "script.alle_heizungen_aus";
+ }
];
}
];
diff --git a/makefu/2configs/home/ham/automation/urlaub.nix b/makefu/2configs/home/ham/automation/urlaub.nix
index 7f47c9da5..019e65d25 100644
--- a/makefu/2configs/home/ham/automation/urlaub.nix
+++ b/makefu/2configs/home/ham/automation/urlaub.nix
@@ -11,18 +11,6 @@ let
weihnachtslicht = "light.wohnzimmer_fenster_lichterkette_licht";
fernsehlicht = "light.wled";
- all_lights = [
- schranklicht weihnachtslicht fernsehlicht
- # extra lights to also turn off
- # wohnzimmer
- "light.wohnzimmer_komode_osram"
- "light.wohnzimmer_stehlampe_osram"
- # arbeitszimmer
- "light.wled_4"
- "light.arbeitszimmer_schrank_dimmer"
- "light.arbeitszimmer_pflanzenlicht"
- ];
-
final_off = "00:37";
turn_on = entity_id: offset:
diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix
index b08152935..ca5fcd17c 100644
--- a/makefu/2configs/home/ham/default.nix
+++ b/makefu/2configs/home/ham/default.nix
@@ -18,6 +18,7 @@ in {
# ./multi/flurlicht.nix
./multi/kurzzeitwecker.nix
./multi/the_playlist.nix
+ ./multi/heizung.nix
# ./multi/fliegen-couter.nix
./device_tracker/openwrt.nix
@@ -43,9 +44,10 @@ in {
./automation/wohnzimmer_rf_fernbedienung.nix
# ./automation/ladestecker_timer.nix
./automation/flurlicht.nix
- ./automation/giesskanne.nix
- ./automation/pflanzen_giessen_erinnerung.nix
- # ./automation/urlaub.nix
+ # ./automation/giesskanne.nix
+ # ./automation/pflanzen_giessen_erinnerung.nix
+ ./automation/find_phone.nix
+ ./automation/urlaub.nix
./automation/moodlight.nix
./automation/shutdown_button.nix
./automation/project_tracker.nix
@@ -192,5 +194,10 @@ in {
configDir = hassdir;
};
+ krebs.secret.files."hass-secrets" = {
+ source-path = toString <secrets> + "/hass/secrets.yaml";
+ path = "/var/lib/hass/secrets.yaml";
+ owner.name = "hass";
+ };
state = [ "/var/lib/hass/known_devices.yaml" ];
}
diff --git a/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix b/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix
index 26fec370f..11d13886e 100644
--- a/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix
+++ b/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix
@@ -63,6 +63,12 @@ in
(remote_action "b9" [ { service = "rest_command.good_song"; } ])
(remote_action "b10" [ { service = "rest_command.bad_song"; } ])
+ (remote_action "b11" [
+ {
+ service = "script.turn_on";
+ target.entity_id = "script.find_felix_phone";
+ }
+ ])
(remote_action "3"
((say "Starte Lass") ++ [
diff --git a/makefu/2configs/home/ham/multi/heizung.nix b/makefu/2configs/home/ham/multi/heizung.nix
new file mode 100644
index 000000000..73f90dfe0
--- /dev/null
+++ b/makefu/2configs/home/ham/multi/heizung.nix
@@ -0,0 +1,11 @@
+{
+ services.home-assistant.config =
+ {
+ # 18 Grad
+ script.alle_heizungen_aus.sequence = [{
+ service = "climate.set_temperature";
+ target.entity_id = [ "climate.wohnzimmer_heizung" ];
+ data.temperature = "18.0";
+ }];
+ };
+}
diff --git a/makefu/2configs/home/ham/sensor/dwd.nix b/makefu/2configs/home/ham/sensor/dwd.nix
index c1d55d03c..623f099a3 100644
--- a/makefu/2configs/home/ham/sensor/dwd.nix
+++ b/makefu/2configs/home/ham/sensor/dwd.nix
@@ -4,5 +4,7 @@
{ platform = "dwd_weather_warnings";
region_name = "Stadt Stuttgart";
}
+ { platform = "nina";
+ }
];
}
diff --git a/makefu/2configs/home/ham/sensor/outside.nix b/makefu/2configs/home/ham/sensor/outside.nix
index 332746be8..d05e8a1f6 100644
--- a/makefu/2configs/home/ham/sensor/outside.nix
+++ b/makefu/2configs/home/ham/sensor/outside.nix
@@ -4,8 +4,7 @@
services.home-assistant.config.sensor =
[
{ platform = "darksky";
- api_key = lib.removeSuffix "\n"
- (builtins.readFile <secrets/hass/darksky.apikey>);
+ api_key = "!secret darksky";
language = "de";
monitored_conditions = [
"summary" "icon"
@@ -21,5 +20,11 @@
units = "si" ;
scan_interval = "00:30:00";
}
+ {
+ platform = "open_meteo";
+ }
+ {
+ platform = "met";
+ }
];
}
diff --git a/makefu/2configs/home/music.nix b/makefu/2configs/home/music.nix
index 205b47fec..f3b9f50f1 100644
--- a/makefu/2configs/home/music.nix
+++ b/makefu/2configs/home/music.nix
@@ -9,7 +9,8 @@ in
MusicFolder = "/media/cryptX/music/kinder";
Address = "0.0.0.0";
};
- systemd.services.navidrome.after = [ "media-cryptX.mount" ];
+ systemd.services.navidrome.after = [ "media-cryptX.mount" "cryptsetup.target"
+"local-fs.target" "remote-fs.target" ];
state = [ "/var/lib/navidrome" ];
# networking.firewall.allowedTCPPorts = [ 4040 ];
@@ -27,4 +28,11 @@ in
locations."/".proxyWebsockets = true;
};
networking.firewall.allowedTCPPorts = [ port ];
+ # also configure dlna
+ services.minidlna.enable = true;
+ services.minidlna.settings = {
+ inotify = "yes";
+ friendly_name = "omo";
+ media_dir = [ "A,/media/cryptX/music" ];
+ };
}
diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix
index cb78c823f..a7181cfe9 100644
--- a/makefu/2configs/main-laptop.nix
+++ b/makefu/2configs/main-laptop.nix
@@ -12,6 +12,7 @@ let
in {
imports = [
./gui/base.nix
+ ./gui/look-up.nix
./fetchWallpaper.nix
./zsh-user.nix
./tools/core.nix
@@ -72,15 +73,4 @@ in {
location.latitude = 48.7;
location.longitude = 9.1;
- systemd.services.look-up = {
- startAt = "*:30";
- serviceConfig = {
- ExecStart= pkgs.writeDash "look-up" ''
- set -x
- eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'"
- ${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while'
- '';
- User = user;
- };
- };
}
diff --git a/makefu/2configs/security/hotfix.nix b/makefu/2configs/security/hotfix.nix
deleted file mode 100644
index fc52f21e6..000000000
--- a/makefu/2configs/security/hotfix.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ pkgs, lib,... }: {
- # https://github.com/berdav/CVE-2021-4034
- security.wrappers.pkexec.source = lib.mkForce (pkgs.writeText "pkexec" "");
-}
diff --git a/makefu/2configs/stats/telegraf/default.nix b/makefu/2configs/stats/telegraf/default.nix
index 5a81e2749..941685695 100644
--- a/makefu/2configs/stats/telegraf/default.nix
+++ b/makefu/2configs/stats/telegraf/default.nix
@@ -17,13 +17,13 @@ in {
# data_format = "influx";
#}];
- #mqtt = [{
- # servers = [ mqtt_server ];
- # topic_prefix = "/telegraf";
- # data_format = "json";
- # qos = 0;
- # batch = false;
- #}];
+ mqtt = [{
+ servers = [ mqtt_server ];
+ topic_prefix = "/telegraf";
+ data_format = "json";
+ qos = 0;
+ batch = false;
+ }];
};
};
};
diff --git a/makefu/2configs/tools/all.nix b/makefu/2configs/tools/all.nix
index 37673768a..3086a0bb2 100644
--- a/makefu/2configs/tools/all.nix
+++ b/makefu/2configs/tools/all.nix
@@ -1,6 +1,6 @@
{
imports = [
- ./android-pentest.nix
+ # ./android-pentest.nix
./consoles.nix
./core-gui.nix
./core.nix
diff --git a/makefu/2configs/tools/init-host/default.nix b/makefu/2configs/tools/init-host/default.nix
index d1d3f7195..84f8e7730 100644
--- a/makefu/2configs/tools/init-host/default.nix
+++ b/makefu/2configs/tools/init-host/default.nix
@@ -23,7 +23,6 @@ pkgs.writeDashBin "generate-secrets" ''
cat <<EOF
$HOSTNAME = {
- cores = 1;
owner = config.krebs.users.makefu;
nets = {
retiolum = {
diff --git a/makefu/5pkgs/airsensor-py/default.nix b/makefu/5pkgs/airsensor-py/default.nix
index 4eae26c0d..86ea22d8d 100644
--- a/makefu/5pkgs/airsensor-py/default.nix
+++ b/makefu/5pkgs/airsensor-py/default.nix
@@ -2,7 +2,7 @@
with pkgs.python3Packages;
buildPythonApplication rec {
name = "airsensor-py-${version}";
- version = "2017-12-05";
+ version = "1.0.0";
propagatedBuildInputs = [
pyusb
click
@@ -11,7 +11,7 @@ buildPythonApplication rec {
src = fetchFromGitHub {
owner = "makefu";
repo = "airsensor-py";
- rev = "7ac5f185dc848fca1b556e4c0396dd73f6a93995";
- sha256 = "0387b025y8kb0zml7916p70hmzc3y18kqh46b9xv5qayljxymq2w";
+ rev = "1.0.0";
+ sha256 = "1jpvvl965bg3ymvr58c433jyy0smczn65fnqsskxn7basznii5g8";
};
}
diff --git a/makefu/5pkgs/pkgrename/default.nix b/makefu/5pkgs/pkgrename/default.nix
index 5eeb161e7..1b5ecc486 100644
--- a/makefu/5pkgs/pkgrename/default.nix
+++ b/makefu/5pkgs/pkgrename/default.nix
@@ -2,19 +2,19 @@
}:
stdenv.mkDerivation rec {
name = "pkgrename";
- version = "1.03";
+ version = "1.05";
src = fetchFromGitHub {
owner = "hippie68";
repo = "pkgrename";
- rev = "c3e5c47ed9367273bd09577af46d3d9bf87b2a50";
- sha256 = "0cphxdpj04h1i0qf5mji3xqdsbyilvd5b4gwp4vx914r6k5f0xf3";
+ rev = "c7c95f0ea49324433db4a7df8db8b0905198e62e";
+ sha256 = "komFm9VRdH4DPxcnHzbm/sGVEWMbfcvFPLEFdbU/K5g=";
};
buildInputs = [ curl.dev ];
buildPhase = ''
cd pkgrename.c
- gcc pkgrename.c src/*.c -o pkgrename -lcurl -s -O1 $(curl-config --cflags --libs)
+ $CC pkgrename.c src/*.c -o pkgrename -s -O3 $(curl-config --cflags --libs) -Wl,--allow-multiple-definition
'';
installPhase = ''
install -D pkgrename $out/bin/pkgrename
diff --git a/makefu/5pkgs/ratt/default.nix b/makefu/5pkgs/ratt/default.nix
index 0ad94c55e..575a33f2b 100644
--- a/makefu/5pkgs/ratt/default.nix
+++ b/makefu/5pkgs/ratt/default.nix
@@ -11,7 +11,7 @@ buildGoModule rec {
};
proxyVendor = true;
- vendorSha256 = "sha256-AOtWR7Ew+0I7+TrMZOCxOKGCv+mlvcqy9s+gX2JKwnE=";
+ vendorSha256 = "sha256-tCSwyusVstEkz2pXYGX5JmS+VgqErSPtnh4LomaaFcE=";
# tests try to access the internet to scrape websites
doCheck = false;
diff --git a/makefu/krops.nix b/makefu/krops.nix
index d907c8e36..94677609e 100644
--- a/makefu/krops.nix
+++ b/makefu/krops.nix
@@ -75,20 +75,20 @@
(lib.mkIf ( host-src.hw ) {
nixos-hardware.git = {
url = https://github.com/nixos/nixos-hardware.git;
- ref = "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1";
+ ref = "9d87bc030a0bf3f00e953dbf095a7d8e852dab6b";
};
})
(lib.mkIf ( host-src.nix-ld ) {
nix-ld.git = {
url = https://github.com/Mic92/nix-ld.git;
- ref = "c25cc4b";
+ ref = "7d251c0c5adf6b9b003499243be257d0f130b3d6";
};
})
(lib.mkIf ( host-src.home-manager ) {
home-manager.git = {
url = https://github.com/rycee/home-manager;
- ref = "1de492f";
+ ref = "054d9e3187ca00479e8036dc0e92900a384f30fd";
};
})
];