From b44323f868c845adb17d441f872ea3b192ae2aca Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 13 Feb 2024 16:03:54 -0500 Subject: Leftover weebnix configs (hard drive died?) --- hostnix/weebnix/Makefile | 7 +++++++ hostnix/weebnix/configuration.nix | 9 ++++++++- hostnix/weebnix/home-assistant.nix | 7 +++++++ hostnix/weebnix/syncthing.nix | 6 +++++- 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 hostnix/weebnix/Makefile (limited to 'hostnix/weebnix') diff --git a/hostnix/weebnix/Makefile b/hostnix/weebnix/Makefile new file mode 100644 index 0000000..90591a9 --- /dev/null +++ b/hostnix/weebnix/Makefile @@ -0,0 +1,7 @@ +push: + rsync --rsync-path='sudo rsync' *.nix weebnix.lan:/etc/nixos/ + +switch: push + ssh weebnix.lan sudo nixos-rebuild switch + +.PHONY: push switch diff --git a/hostnix/weebnix/configuration.nix b/hostnix/weebnix/configuration.nix index 14427f0..a0166f5 100644 --- a/hostnix/weebnix/configuration.nix +++ b/hostnix/weebnix/configuration.nix @@ -23,18 +23,25 @@ users.users.joe = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = [ "wheel" "syncthing" ]; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHcqQDnH0LcUWFV+cd9aABfM55+72UAn1ZY5x5bHwPL4IEgT1nagbi1X3FwCJkh2rEcDsHl4FflcNfh+IyU2VyuQfRIXl7CKP040ovXmPVzgU8JiEDrrRebpZ7aHCKk+4Q6cJ8dzAI1sRogVyYrV0hLB4yeMnVexkIcsQMt5pXQ1zodlzHfW1W7OWQDbKjIyh4pv1KJ/IIjiBIt7l+OCqi7wZK4ubmxyMhmZx1xpRC5mz2/29Mpt+1VgCmxC7Hv1SG7yu+U0s4eJ3kbzFKNcZ/bCYqFxK48dT66qhS3qZFg09omumG8IbEUcx+WqM1V7WhiJYig9x5ovmMToQXTJ5uxLtcovnxO/53IgwV7INvmr8+NhD+LlkQfSjjUAW09bhVj9sKIW2bbrIxlOT8z6CQY9zGXNXi8u1oxPt3Q7d3rMxoWhWnr2l3Ok7OIkWooOK3e0NdhgIAxZKlYJAmIYaX391sGTyiuwUy96mg5JcYsLYMfkEg/Sv+2vQp8kkvB0E= joe@sparky" ]; }; environment.systemPackages = with pkgs; [ + dig + file + gitFull + jq libraspberrypi + sqlite-interactive tmux + tree ]; programs.vim.defaultEditor = true; + programs.nano.enable = false; services.openssh.enable = true; diff --git a/hostnix/weebnix/home-assistant.nix b/hostnix/weebnix/home-assistant.nix index ad07d2b..77c7fa8 100644 --- a/hostnix/weebnix/home-assistant.nix +++ b/hostnix/weebnix/home-assistant.nix @@ -62,6 +62,7 @@ }; } ) + colorama ]; dontBuild = true; } @@ -103,6 +104,12 @@ proxy_buffering off; ''; }; + # Disable service worker caching that works improperly with reverse proxy. + # https://github.com/home-assistant/frontend/issues/14836 + # https://community.home-assistant.io/t/disabling-service-worker-reverse-proxy-auth-causes-issues/167082 + locations."/service_worker.js" = { + return = ''410 "Service worker disabled: https://github.com/home-assistant/frontend/issues/14836"''; + }; }; services.oauth2_proxy.nginx.virtualHosts = [ "ha.weebnix.mou.fo" ]; diff --git a/hostnix/weebnix/syncthing.nix b/hostnix/weebnix/syncthing.nix index ed87720..a0a09be 100644 --- a/hostnix/weebnix/syncthing.nix +++ b/hostnix/weebnix/syncthing.nix @@ -14,6 +14,10 @@ in "d /var/lib/syncthing 0775 syncthing syncthing" ]; + systemd.services.syncthing = { + serviceConfig.UMask = "0002"; + }; + services.syncthing = { enable = true; openDefaultPorts = true; @@ -112,7 +116,7 @@ in id = "qtzmu-fqdrs"; path = "~/iPad"; versioning = staggeredVersioning; - devices = [ "iPad" ]; + devices = [ "iPad" "weeber.mou.fo" ]; }; }; }; -- cgit v1.3.1