summaryrefslogtreecommitdiffstats
path: root/lass/2configs/hass/pyscript/default.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-03-25 13:43:44 +0100
committerlassulus <lassulus@lassul.us>2022-03-25 13:43:44 +0100
commitb14ccba40fdb228859f93ce349aa48905ecdf835 (patch)
tree482cfe2cb5781a350baf1047f868dcb7eec69d6f /lass/2configs/hass/pyscript/default.nix
parentd2556cf5c7d6cc03c12b4ec553e1411c90b3e00e (diff)
l hass: add pyscript dev environment
Diffstat (limited to 'lass/2configs/hass/pyscript/default.nix')
-rw-r--r--lass/2configs/hass/pyscript/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/lass/2configs/hass/pyscript/default.nix b/lass/2configs/hass/pyscript/default.nix
new file mode 100644
index 00000000..c56967e4
--- /dev/null
+++ b/lass/2configs/hass/pyscript/default.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+{
+ systemd.tmpfiles.rules = [
+ "L+ /var/lib/hass/custom_components/pyscript - - - - ${pkgs.fetchzip {
+ url = "https://github.com/custom-components/pyscript/releases/download/1.3.2/hass-custom-pyscript.zip";
+ sha256 = "0cqdjj46s5xp4mqxb0ic790jm1xp3z0zr2n9f7bsfl5zpvdshl8z";
+ stripRoot = false;
+ }}"
+ ];
+
+ services.home-assistant = {
+ package = (pkgs.home-assistant.overrideAttrs (old: {
+ doInstallCheck = false;
+ })).override {
+ extraPackages = pp: [ pp.croniter ];
+ };
+ config.pyscript = {
+ allow_all_imports = true;
+ hass_is_global = true;
+ };
+ };
+
+ networking.firewall.interfaces.retiolum.allowedTCPPortRanges = [
+ { from = 50321; to = 50341; } # for ipython interactive debugging
+ ];
+}