diff --git a/flake.lock b/flake.lock index 4ede975..c4d12e4 100644 --- a/flake.lock +++ b/flake.lock @@ -133,11 +133,11 @@ "qmd": "qmd" }, "locked": { - "lastModified": 1781072789, - "narHash": "sha256-/F/4Kg7t7accuaAzc8khMyK+xXReXjpU9Tn4L0LrnyI=", + "lastModified": 1782864339, + "narHash": "sha256-SdFKlthFIoFNGkB/xNLOKtuoaoEKvDLMWu5hAIsH7zw=", "owner": "openclaw", "repo": "nix-openclaw", - "rev": "a60fb12d461edfdadb6dca65a3b72230e35014ad", + "rev": "910c1ce89e6a6c7574ab97d3935afbe5310b5db7", "type": "github" }, "original": { @@ -182,11 +182,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1780749050, - "narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=", + "lastModified": 1782959384, + "narHash": "sha256-xnJJk+ct+D2+wdRxj1wk36w5zV9RVESwRqcklPdt3fM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a799d3e3886da994fa307f817a6bc705ae538eeb", + "rev": "65179426c83bb3f6bc14898b42ea1c6f01d374b0", "type": "github" }, "original": { @@ -230,11 +230,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1780952837, - "narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=", + "lastModified": 1782847189, + "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe", + "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41", "type": "github" }, "original": { @@ -317,11 +317,11 @@ ] }, "locked": { - "lastModified": 1780637620, - "narHash": "sha256-ngPdHinPyF0AMxRr32qt+TZCv0sagmooBW14u6DfjSU=", + "lastModified": 1783063092, + "narHash": "sha256-H6lM+h8+ZT25uWJwmYkER5yj5RJ9DP2++n5um/XH3J0=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "8c62bc6a72ac5a5b8d1b41b2b88dfed9d9932c48", + "rev": "36b24209358c82e0ea5404ba003ae8dc37334c86", "type": "github" }, "original": { diff --git a/hosts/NixOracle/configuration.nix b/hosts/NixOracle/configuration.nix index 599d6e3..83a76c8 100644 --- a/hosts/NixOracle/configuration.nix +++ b/hosts/NixOracle/configuration.nix @@ -60,7 +60,15 @@ in { services.logrotate.checkConfig = false; boot.tmp.cleanOnBoot = true; - zramSwap.enable = true; + zramSwap = { + enable = true; + memoryPercent = 100; + }; + + systemd.coredump.extraConfig = '' + Storage=none + ProcessSizeMax=0 + ''; services.restic.backups.vps = { initialize = true; @@ -196,6 +204,12 @@ in { dbtype = "pgsql"; }; phpOptions."opcache.interned_strings_buffer" = "16"; + poolSettings = { + pm = "ondemand"; + "pm.max_children" = 4; + "pm.process_idle_timeout" = "20s"; + "pm.max_requests" = 200; + }; settings = { default_phone_region = "BR"; maintenance_window_start = 1; @@ -267,6 +281,9 @@ in { WorkingDirectory = "/home/${username}/notebooks"; Restart = "on-failure"; RestartSec = 5; + MemoryHigh = "320M"; + MemoryMax = "420M"; + MemorySwapMax = "256M"; ExecStart = "${jupyterEnv}/bin/jupyter-lab --config=/etc/jupyter/jupyter_server_config.py"; }; diff --git a/hosts/Nixos/configuration.nix b/hosts/Nixos/configuration.nix index adf617c..a623b36 100644 --- a/hosts/Nixos/configuration.nix +++ b/hosts/Nixos/configuration.nix @@ -1326,6 +1326,19 @@ in { services.home-assistant.lovelaceConfigFile = ../../configs/home-assistant/ui-lovelace.yaml; + systemd.services.home-assistant = { + wants = [ "tailscaled.service" ]; + after = [ "tailscaled.service" ]; + preStart = lib.mkAfter '' + for _ in $(${pkgs.coreutils}/bin/seq 1 60); do + if ${pkgs.glibc.bin}/bin/getent hosts api-aic.lgthinq.com >/dev/null; then + break + fi + ${pkgs.coreutils}/bin/sleep 1 + done + ''; + }; + environment.etc."home-assistant/ui-overview.yaml".source = ../../configs/home-assistant/ui-overview.yaml;