From 1615abd814f8436fe85579f9cca00dc8a1aba645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Fri, 29 Mar 2024 10:42:25 +0100 Subject: [PATCH 1/3] mpd/curacao: Can be controlled remotely --- curacao/default.nix | 1 + curacao/homeautomation/default.nix | 10 ++++++++++ hm/desktop/mpd/default.nix | 3 +-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 curacao/homeautomation/default.nix diff --git a/curacao/default.nix b/curacao/default.nix index e13ecea..e820e76 100644 --- a/curacao/default.nix +++ b/curacao/default.nix @@ -10,6 +10,7 @@ ./disko.nix ./features.nix ./hardware.nix + ./homeautomation ./webcam ]; } diff --git a/curacao/homeautomation/default.nix b/curacao/homeautomation/default.nix new file mode 100644 index 0000000..9a6cd00 --- /dev/null +++ b/curacao/homeautomation/default.nix @@ -0,0 +1,10 @@ +{ pkgs, lib, config, ... }: +{ + config = { + # Allow mpd control from home assistant and phone + networking.firewall.extraCommands = '' + iptables -A nixos-fw -p tcp -m tcp --dport 6600 -s 192.168.7.53 -j nixos-fw-accept + iptables -A nixos-fw -p tcp -m tcp --dport 6600 -s 192.168.7.92 -j nixos-fw-accept + ''; + }; +} diff --git a/hm/desktop/mpd/default.nix b/hm/desktop/mpd/default.nix index 10683ff..bea9ceb 100644 --- a/hm/desktop/mpd/default.nix +++ b/hm/desktop/mpd/default.nix @@ -14,8 +14,7 @@ services.mpd = { enable = true; network = { - listenAddress = "0.0.0.0"; # So it can be controlled from home - # TODO ... and whoever is the Wi-Fi network I'm using, which, not great + listenAddress = "0.0.0.0"; # Can be controlled remotely, determined with firewall startWhenNeeded = true; }; extraConfig = '' From a3999cc9b170a395abdc5a7228ed14b2a02091b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Mon, 1 Apr 2024 12:25:53 +0200 Subject: [PATCH 2/3] desktop: Wii pointer --- hm/desktop/cursor/default.nix | 30 ++++++++++++++++++++++++++++++ hm/desktop/default.nix | 1 + 2 files changed, 31 insertions(+) create mode 100644 hm/desktop/cursor/default.nix diff --git a/hm/desktop/cursor/default.nix b/hm/desktop/cursor/default.nix new file mode 100644 index 0000000..8fd1286 --- /dev/null +++ b/hm/desktop/cursor/default.nix @@ -0,0 +1,30 @@ +{ pkgs, lib, config, ... }: +{ + config = { + stylix.cursor = { + package = + pkgs.stdenv.mkDerivation { + pname = "wii-pointer"; + version = "unstable-2024-03-31"; + src = pkgs.runCommand "wii-pointer" { } '' + mkdir $out + cd $out + ${pkgs.p7zip}/bin/7z x ${pkgs.fetchurl { + url = "https://files.primm.gay/extras/cursors/Wii/Linux%20Cursors.7z"; + hash = "sha256-1lFJrLYEyT1STLgK1YOpy/g4tgGk/ENnri5QjR0dMzo="; + }} + ''; + + dontConfigure = true; + dontBuild = true; + dontFixup = true; + + installPhase = '' + mkdir -p $out/share/icons + cp -a Linux\ Cursor/Wii-Pointer $out/share/icons + ''; + }; + name = "Wii-Pointer"; + }; + }; +} diff --git a/hm/desktop/default.nix b/hm/desktop/default.nix index 7852207..3ff3a28 100644 --- a/hm/desktop/default.nix +++ b/hm/desktop/default.nix @@ -5,6 +5,7 @@ ./autorandr ./background ./browser + ./cursor ./frobar ./i3.nix ./lock From c319ee1394f3cea07f8410d37739459b10c4be64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Mon, 1 Apr 2024 12:26:30 +0200 Subject: [PATCH 3/3] Revert "desktop: Wii pointer" This reverts commit a3999cc9b170a395abdc5a7228ed14b2a02091b8. It's fun 5 minutes, but missing the I thing is a bit annoying :( --- hm/desktop/cursor/default.nix | 30 ------------------------------ hm/desktop/default.nix | 1 - 2 files changed, 31 deletions(-) delete mode 100644 hm/desktop/cursor/default.nix diff --git a/hm/desktop/cursor/default.nix b/hm/desktop/cursor/default.nix deleted file mode 100644 index 8fd1286..0000000 --- a/hm/desktop/cursor/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ pkgs, lib, config, ... }: -{ - config = { - stylix.cursor = { - package = - pkgs.stdenv.mkDerivation { - pname = "wii-pointer"; - version = "unstable-2024-03-31"; - src = pkgs.runCommand "wii-pointer" { } '' - mkdir $out - cd $out - ${pkgs.p7zip}/bin/7z x ${pkgs.fetchurl { - url = "https://files.primm.gay/extras/cursors/Wii/Linux%20Cursors.7z"; - hash = "sha256-1lFJrLYEyT1STLgK1YOpy/g4tgGk/ENnri5QjR0dMzo="; - }} - ''; - - dontConfigure = true; - dontBuild = true; - dontFixup = true; - - installPhase = '' - mkdir -p $out/share/icons - cp -a Linux\ Cursor/Wii-Pointer $out/share/icons - ''; - }; - name = "Wii-Pointer"; - }; - }; -} diff --git a/hm/desktop/default.nix b/hm/desktop/default.nix index 3ff3a28..7852207 100644 --- a/hm/desktop/default.nix +++ b/hm/desktop/default.nix @@ -5,7 +5,6 @@ ./autorandr ./background ./browser - ./cursor ./frobar ./i3.nix ./lock