From a2878180cf72ab1fbf39fbda7209e5816511b874 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Wed, 22 Oct 2025 00:41:33 +0200 Subject: [PATCH] Update + remote build for some deploys --- flake.lock | 54 +++++++------------ flake.nix | 20 ++++++- lib/deploy/default.nix | 4 ++ .../x86_64-linux/stargate/services/nginx.nix | 5 +- 4 files changed, 45 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index 4281d17..412927b 100644 --- a/flake.lock +++ b/flake.lock @@ -451,11 +451,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1760960573, - "narHash": "sha256-gfx0Nr3DinMMOmQLrmRchJpGULMrxSoK263RkeyHyv8=", + "lastModified": 1761039988, + "narHash": "sha256-+3D+UvjXbNJFeei8ST5oNQaNUqO56K/HmGX+KU0Zmqk=", "ref": "refs/heads/master", - "rev": "afe0269ecafaaf10f3662c280ecd21700048afe1", - "revCount": 148, + "rev": "063666c5a2f2a41b06ea3a393eb7c2998df51c95", + "revCount": 151, "type": "git", "url": "https://git.kylekrein.com/kylekrein/emacs-config" }, @@ -560,22 +560,6 @@ "type": "github" } }, - "flake-compat_11": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-compat_2": { "flake": false, "locked": { @@ -878,6 +862,7 @@ }, "original": { "owner": "gytis-ivaskevicius", + "ref": "master", "repo": "flake-utils-plus", "type": "github" } @@ -1202,11 +1187,11 @@ }, "master": { "locked": { - "lastModified": 1760986326, - "narHash": "sha256-QBvURjr4CnOgCxCtkHT9Eslh+v5gNsPIA/AbgvsN5HM=", + "lastModified": 1761082581, + "narHash": "sha256-2MjpIfwSXomwup67MTRdi2LrEkoYKnl1mT+Z3lxidg4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "373ac7ddf180c86a355b37ce7503579d11e387db", + "rev": "7d08a8522f8fd5feb0f694bd1da07f2e51be7d11", "type": "github" }, "original": { @@ -1409,11 +1394,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1756491981, - "narHash": "sha256-lXyDAWPw/UngVtQfgQ8/nrubs2r+waGEYIba5UX62+k=", + "lastModified": 1761056547, + "narHash": "sha256-j3T1QDLK/VPUFLyFHDjhCKrEUVIKOrTYKm2mkempK8M=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "c1b29520945d3e148cd96618c8a0d1f850965d8c", + "rev": "98434bad207101657df2491af88f625d2e82b7d7", "type": "github" }, "original": { @@ -1944,22 +1929,21 @@ }, "snowfall-lib_3": { "inputs": { - "flake-compat": "flake-compat_11", "flake-utils-plus": "flake-utils-plus_3", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1754782494, - "narHash": "sha256-pSvIyyYP9wprEYbHvkwishLIpmLRrMdgxi5r8q9Ie44=", - "owner": "KyleKrein", + "lastModified": 1759988077, + "narHash": "sha256-LUel3DQ6WoHwkb9R88awz9tGzGwBGrJJyQjn81qgeuM=", + "owner": "anntnzrb", "repo": "snowfall-lib", - "rev": "f0e35a78e9c874c6962fddc827965701c3f5ffd2", + "rev": "1e41848ba9a198bd3cf9fda4603894e23d1da9a2", "type": "github" }, "original": { - "owner": "KyleKrein", + "owner": "anntnzrb", "repo": "snowfall-lib", "type": "github" } @@ -1969,11 +1953,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1760845571, - "narHash": "sha256-PwGzU3EOU65Ef1VvuNnVLie+l+P0g/fzf/PGUG82KbM=", + "lastModified": 1760998189, + "narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "9c9a9798be331ed3f4b2902933d7677d0659ee61", + "rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a2cf191..764782f 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ # The name "snowfall-lib" is required due to how Snowfall Lib processes your # flake's inputs. snowfall-lib = { - url = "github:KyleKrein/snowfall-lib"; #"git+file:///home/kylekrein/Git/snowfall-lib"; + url = "github:anntnzrb/snowfall-lib"; #"git+file:///home/kylekrein/Git/snowfall-lib"; inputs.nixpkgs.follows = "nixpkgs"; }; snowfall-flake = { @@ -125,6 +125,18 @@ "olm-3.2.16" ]; }; + # Per-channel config + channels = { + nixpkgs-cuda = { + config = { + allowUnfree = true; + cudaSupport = true; + }; + input = inputs.nixpkgs; + }; + }; + # Use custom channel for specific host + #systems.hosts.kylekrein-framework12.channelName = "nixpkgs-x86_64-v4"; overlays = with inputs; [ emacs-kylekrein.overlays.default @@ -163,7 +175,11 @@ inherit (inputs) self; overrides = { user = "root"; - stargate.hostname = "kylekrein.com"; + stargate = { + hostname = "kylekrein.com"; + remoteBuild = true; + }; + kylekrein-homepc.remoteBuild = true; }; exclude = ["kylekrein-wsl-wm" "kylekrein-server"]; }; diff --git a/lib/deploy/default.nix b/lib/deploy/default.nix index b1d4096..c08dac3 100644 --- a/lib/deploy/default.nix +++ b/lib/deploy/default.nix @@ -31,6 +31,7 @@ in rec { result: name: let host = hosts.${name}; user = overrides.user or null; + remoteBuild = overrides.remoteBuild or null; inherit (host.pkgs) system; in result @@ -51,6 +52,9 @@ in rec { // lib.optionalAttrs (user != null) { sshUser = user; } + // lib.optionalAttrs (remoteBuild != null) { + inherit remoteBuild; + } // lib.optionalAttrs (host.config.system.security.doas.enable or false) { sudo = "doas -u"; }; diff --git a/systems/x86_64-linux/stargate/services/nginx.nix b/systems/x86_64-linux/stargate/services/nginx.nix index 327f831..f1d71a0 100644 --- a/systems/x86_64-linux/stargate/services/nginx.nix +++ b/systems/x86_64-linux/stargate/services/nginx.nix @@ -144,7 +144,10 @@ in { locations."/" = { proxyPass = "http://${config.services.open-webui.host}:${builtins.toString config.services.open-webui.port}"; proxyWebsockets = true; - #extraConfig = "proxy_buffering off;"; + extraConfig = '' + proxy_send_timeout 7200; + proxy_read_timeout 7200; + ''; }; }; "smart-home.kylekrein.com" = {