deploy-rs-online

This commit is contained in:
Aleksandr Lebedev 2025-08-11 17:01:02 +02:00
parent 8d71112976
commit 3b2e7a9d02
8 changed files with 265 additions and 92 deletions

267
flake.lock generated
View file

@ -7,11 +7,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1754152461,
"narHash": "sha256-UNPGhPvjMGond6bTq2JXPjH0yyUj0g6nhG/wjEH/Vfo=",
"lastModified": 1754845817,
"narHash": "sha256-F+vkNVd9N8kJ2gfygPLr6GLgT0FvmYbY9nC6XadVjXo=",
"owner": "nix-community",
"repo": "nixos-apple-silicon",
"rev": "9c936c2686017de6adec644880451bdf3c323306",
"rev": "a8afa7e2f467ae2ee547ce559eec79b99bb3f575",
"type": "github"
},
"original": {
@ -196,11 +196,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1754712381,
"narHash": "sha256-LbTalQDguSZ5xpfFihCEHMjm7xYF+QLQlHFfFTHpkj8=",
"lastModified": 1754907869,
"narHash": "sha256-tzshAAjt0xDjCc/aOgii6PSqePIc2rWYSXF8VnqEhIg=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "9c8c4ed6fab07590095105cb5bea98587955b3c4",
"rev": "b5f83e0d7bce67af178f6aaef95853fedf4c00a0",
"type": "github"
},
"original": {
@ -391,14 +391,15 @@
"nix-org-babel": "nix-org-babel",
"nixpkgs": [
"nixpkgs"
]
],
"snowfall-lib": "snowfall-lib"
},
"locked": {
"lastModified": 1754302052,
"narHash": "sha256-XVwqzre6O5aJlzvgVXzgo+tWT+VSo69Rdmw7EaL3meU=",
"lastModified": 1754922005,
"narHash": "sha256-mjf22/szOLUtm3IoMNFXrW7FbC4PUY8OfwegPonMe6Y=",
"owner": "kylekrein",
"repo": "emacs-config",
"rev": "9c10750e8d7b083233eb2611a93264469217b783",
"rev": "b7e878e6e8eff4865dc788189cff2933d4115ff1",
"type": "github"
},
"original": {
@ -419,11 +420,11 @@
]
},
"locked": {
"lastModified": 1753460825,
"narHash": "sha256-MNu9l5nukxFpT5LzsT7Q83BqmO36EByn6/o/xA7hu7I=",
"lastModified": 1754876903,
"narHash": "sha256-LOGFgg9as4+jCteUJQLSX+hApdRBM9bJYhS0DrmLmrA=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "07c08ea0037b2fd7e0b5416361586d4552ac8255",
"rev": "c9f73717ad385de42dc6b64b5a2de6f5a9916a10",
"type": "github"
},
"original": {
@ -473,11 +474,11 @@
},
"flake-compat": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
@ -487,6 +488,23 @@
}
},
"flake-compat_10": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"ref": "v1.0.1",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_11": {
"flake": false,
"locked": {
"lastModified": 1650374568,
@ -502,7 +520,7 @@
"type": "github"
}
},
"flake-compat_11": {
"flake-compat_12": {
"flake": false,
"locked": {
"lastModified": 1747046372,
@ -634,16 +652,15 @@
"flake-compat_9": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"ref": "v1.0.1",
"repo": "flake-compat",
"type": "github"
}
@ -738,11 +755,11 @@
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"lastModified": 1754487366,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
"type": "github"
},
"original": {
@ -807,7 +824,25 @@
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_3"
"flake-utils": "flake-utils_2"
},
"locked": {
"lastModified": 1738591040,
"narHash": "sha256-4WNeriUToshQ/L5J+dTSWC5OJIwT39SEP7V7oylndi8=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "afcb15b845e74ac5e998358709b2b5fe42a948d1",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
},
"flake-utils-plus_2": {
"inputs": {
"flake-utils": "flake-utils_4"
},
"locked": {
"lastModified": 1715533576,
@ -824,9 +859,9 @@
"type": "github"
}
},
"flake-utils-plus_2": {
"flake-utils-plus_3": {
"inputs": {
"flake-utils": "flake-utils_4"
"flake-utils": "flake-utils_5"
},
"locked": {
"lastModified": 1738591040,
@ -846,6 +881,24 @@
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
@ -860,7 +913,7 @@
"type": "github"
}
},
"flake-utils_3": {
"flake-utils_4": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
@ -875,9 +928,9 @@
"type": "github"
}
},
"flake-utils_4": {
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1694529238,
@ -1028,11 +1081,11 @@
]
},
"locked": {
"lastModified": 1754613544,
"narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=",
"lastModified": 1754886238,
"narHash": "sha256-LTQomWOwG70lZR+78ZYSZ9sYELWNq3HJ7/tdHzfif/s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f",
"rev": "0d492b89d1993579e63b9dbdaed17fd7824834da",
"type": "github"
},
"original": {
@ -1102,7 +1155,7 @@
"lanzaboote": {
"inputs": {
"crane": "crane_3",
"flake-compat": "flake-compat_6",
"flake-compat": "flake-compat_7",
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_9",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
@ -1157,11 +1210,11 @@
},
"master": {
"locked": {
"lastModified": 1754762869,
"narHash": "sha256-HMadV2f7wphTYk3CM5+g4Gkyfsiv76X4VJbAdQM6mg0=",
"lastModified": 1754921475,
"narHash": "sha256-Ep1MXNAtQ0ePw6N+Hu82SY5NqJqgf/0mWMI9ZwwTz48=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e3d9d8410cfcdf8f34cff4e0c46b4831b0145780",
"rev": "865725e5440817280b9dd72d4a3f5548dd8629c4",
"type": "github"
},
"original": {
@ -1245,11 +1298,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1754744872,
"narHash": "sha256-rcMHMs+dFWaDXev092gfxTfxHEWcUY/6SRV+cseNevQ=",
"lastModified": 1754901323,
"narHash": "sha256-G4/LiwFvBAKy6E0GqcegyCjmaJNjdl+9rFRxrOOjH30=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "346fc31bcc4d2dbcc3e8ce8dbb622e4255ff54b7",
"rev": "ed0fcb158e2ecf597a95dcc51facaf68557011a0",
"type": "github"
},
"original": {
@ -1278,11 +1331,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1754742008,
"narHash": "sha256-Tp0FG7VpLudVEC622d91z2hbdfPLCXxw0Nv43iNN4O0=",
"lastModified": 1754894368,
"narHash": "sha256-I7uSAOosX79BLVTWRHWHvT9z3Lv8rDYY3RogV/0Gne0=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "67361f88fd01974ebee4cf80f0e29c87d805cc39",
"rev": "0044578681cee50fd7ad49fcb8d1e2ea53d85fe4",
"type": "github"
},
"original": {
@ -1416,11 +1469,11 @@
"nixpkgs": "nixpkgs_12"
},
"locked": {
"lastModified": 1754619139,
"narHash": "sha256-NHLKP08ErgbyxKSmmZUC1WxbrH54pA65yxcif8FhRxY=",
"lastModified": 1754878336,
"narHash": "sha256-OtMtFQKl9OE4cbjK6nCDtjT76xljS02C1/5TN5ASCj8=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "b965a1aea2e22812a012f1a0fe7308912c6fcde0",
"rev": "e7c6ee625526dacbc9f449b153b0b61f03723ec2",
"type": "github"
},
"original": {
@ -1549,7 +1602,7 @@
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-compat": "flake-compat_8",
"nixpkgs": "nixpkgs_13"
},
"locked": {
@ -1569,11 +1622,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github"
},
"original": {
@ -1660,11 +1713,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1754689972,
"narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"lastModified": 1754767907,
"narHash": "sha256-8OnUzRQZkqtUol9vuUuQC30hzpMreKptNyET2T9lB6g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"rev": "c5f08b62ed75415439d48152c2a784e36909b1bc",
"type": "github"
},
"original": {
@ -1692,11 +1745,11 @@
},
"nixpkgs_11": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github"
},
"original": {
@ -1708,11 +1761,11 @@
},
"nixpkgs_12": {
"locked": {
"lastModified": 1754151594,
"narHash": "sha256-S30TWshtDmNlU30u842RidFUraKj1f2dd4nrKRHm3gE=",
"lastModified": 1754711617,
"narHash": "sha256-WrZ280bT6NzNbBo+CKeJA/NW1rhvN/RUPZczqCpu2mI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7b6929d8b900de3142638310f8bc40cff4f2c507",
"rev": "00b574b1ba8a352f0601c4dde4faff4b534ebb1e",
"type": "github"
},
"original": {
@ -1740,11 +1793,11 @@
},
"nixpkgs_14": {
"locked": {
"lastModified": 1754689972,
"narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"lastModified": 1754767907,
"narHash": "sha256-8OnUzRQZkqtUol9vuUuQC30hzpMreKptNyET2T9lB6g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"rev": "c5f08b62ed75415439d48152c2a784e36909b1bc",
"type": "github"
},
"original": {
@ -1804,11 +1857,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github"
},
"original": {
@ -1997,7 +2050,7 @@
"nvf": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"mnw": "mnw",
"nil": "nil",
"nixpkgs": "nixpkgs_10",
@ -2124,7 +2177,7 @@
"plugin-vim-repeat": "plugin-vim-repeat",
"plugin-vim-startify": "plugin-vim-startify",
"plugin-which-key": "plugin-which-key",
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1736795850,
@ -4096,7 +4149,7 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_8",
"flake-compat": "flake-compat_9",
"gitignore": "gitignore_3",
"nixpkgs": [
"nixpkgs"
@ -4184,7 +4237,7 @@
"nixpkgs": "nixpkgs_14",
"pre-commit-hooks": "pre-commit-hooks",
"snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2",
"snowfall-lib": "snowfall-lib_3",
"sops-nix": "sops-nix",
"stylix": "stylix",
"unstable": "unstable"
@ -4215,11 +4268,11 @@
]
},
"locked": {
"lastModified": 1754621349,
"narHash": "sha256-JkXUS/nBHyUqVTuL4EDCvUWauTHV78EYfk+WqiTAMQ4=",
"lastModified": 1754880555,
"narHash": "sha256-tG6l0wiX8V8IvG4HFYY8IYN5vpNAxQ+UWunjjpE6SqU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c448ab42002ac39d3337da10420c414fccfb1088",
"rev": "17c591a44e4eb77f05f27cd37e1cfc3f219c7fc4",
"type": "github"
},
"original": {
@ -4290,11 +4343,11 @@
},
"snowfall-flake": {
"inputs": {
"flake-compat": "flake-compat_9",
"flake-compat": "flake-compat_10",
"nixpkgs": [
"nixpkgs"
],
"snowfall-lib": "snowfall-lib"
"snowfall-lib": "snowfall-lib_2"
},
"locked": {
"lastModified": 1749330936,
@ -4312,8 +4365,31 @@
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_10",
"flake-compat": "flake-compat_6",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"emacs-kylekrein",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754782494,
"narHash": "sha256-pSvIyyYP9wprEYbHvkwishLIpmLRrMdgxi5r8q9Ie44=",
"owner": "KyleKrein",
"repo": "snowfall-lib",
"rev": "f0e35a78e9c874c6962fddc827965701c3f5ffd2",
"type": "github"
},
"original": {
"owner": "KyleKrein",
"repo": "snowfall-lib",
"type": "github"
}
},
"snowfall-lib_2": {
"inputs": {
"flake-compat": "flake-compat_11",
"flake-utils-plus": "flake-utils-plus_2",
"nixpkgs": [
"snowfall-flake",
"nixpkgs"
@ -4334,10 +4410,10 @@
"type": "github"
}
},
"snowfall-lib_2": {
"snowfall-lib_3": {
"inputs": {
"flake-compat": "flake-compat_11",
"flake-utils-plus": "flake-utils-plus_2",
"flake-compat": "flake-compat_12",
"flake-utils-plus": "flake-utils-plus_3",
"nixpkgs": [
"nixpkgs"
]
@ -4385,7 +4461,7 @@
"gnome-shell": "gnome-shell",
"nixpkgs": "nixpkgs_16",
"nur": "nur",
"systems": "systems_6",
"systems": "systems_7",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@ -4393,11 +4469,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1754599117,
"narHash": "sha256-AzAYdZlat002vCjCKWdFpGi2xUaiOU4DtIPnv1nomD8=",
"lastModified": 1754852587,
"narHash": "sha256-M+CDFvZ4ZuKK3mlbxv+37yAwL6X3tIklYgurqbhO7Q4=",
"owner": "danth",
"repo": "stylix",
"rev": "312dec38b2231b21f36903d1bdce96daa11548ff",
"rev": "61ffae2453d00cb63a133b750232804b209db4d1",
"type": "github"
},
"original": {
@ -4497,6 +4573,21 @@
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
@ -4586,11 +4677,11 @@
]
},
"locked": {
"lastModified": 1753006367,
"narHash": "sha256-tzbhc4XttkyEhswByk5R38l+ztN9UDbnj0cTcP6Hp9A=",
"lastModified": 1754492133,
"narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "421b56313c65a0815a52b424777f55acf0b56ddf",
"rev": "1298185c05a56bff66383a20be0b41a307f52228",
"type": "github"
},
"original": {
@ -4623,11 +4714,11 @@
},
"unstable": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github"
},
"original": {

View file

@ -113,6 +113,7 @@
};
overlays = with inputs; [
emacs-kylekrein.overlays.default
niri-flake.overlays.niri
snowfall-flake.overlays.default
];
@ -144,6 +145,7 @@
deploy = lib.mkDeploy {
inherit (inputs) self;
overrides = {
user = "root";
kylekrein-server.hostname = "kylekrein.com";
};
exclude = ["kylekrein-wsl-wm"];

View file

@ -7,7 +7,7 @@
config,
...
}: let
emacs = inputs.emacs-kylekrein.packages.${system}.with-lsps;
emacs = pkgs.kylekrein.nixmacs.override {withLsps = true;};
in {
programs.emacs = {
enable = osConfig.custom.presets.wayland.enable;

View file

@ -65,6 +65,9 @@ in {
#kde
kdePackages.gwenview
kdePackages.ark
deploy-rs
custom.deploy-rs-online
];
programs.kdeconnect.enable = true;
programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde;

View file

@ -36,7 +36,7 @@ in {
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "no";
#settings.PermitRootLogin = "no";
};
networking.firewall.allowedTCPPorts = [22];
networking.firewall.allowedUDPPorts = [22];

View file

@ -0,0 +1,75 @@
{
writeShellScriptBin,
lib,
jq,
deploy-rs,
...
}:
writeShellScriptBin "deploy-rs-online" ''
set -euo pipefail
# ANSI colors (safe form for bash inside Nix)
RED=$'\033[0;31m'
GREEN=$'\033[0;32m'
YELLOW=$'\033[0;33m'
NC=$'\033[0m'
# Flake path from first argument, default to "."
FLAKE_PATH="''${1:-.}"
shift || true
# Collect extra args after --
DEPLOY_ARGS=()
if [ "$#" -gt 0 ]; then
if [ "$1" = "--" ]; then
shift
DEPLOY_ARGS=("$@")
fi
fi
# Check if user provided --skip-checks or -s; if not, add -s
SKIP_CHECKS_SET=false
for arg in "''${DEPLOY_ARGS[@]}"; do
if [ "$arg" = "--skip-checks" ] || [ "$arg" = "-s" ]; then
SKIP_CHECKS_SET=true
break
fi
done
if ! $SKIP_CHECKS_SET; then
DEPLOY_ARGS+=("-s")
fi
# Run nix flake check first
echo "Running nix flake check on $FLAKE_PATH..."
if ! nix flake check "$FLAKE_PATH"; then
echo "$RED Flake check failed! Aborting deployment. $NC"
exit 1
fi
# Get node names
NODES=$(nix eval --json "$FLAKE_PATH#deploy.nodes" | ${lib.getExe jq} -r 'keys[]')
RESULTS=()
for node in $NODES; do
HOST=$(nix eval --raw "$FLAKE_PATH#deploy.nodes.$node.hostname")
echo -n "Checking $node ($HOST)... "
if ssh -o ConnectTimeout=3 -o BatchMode=yes "$HOST" true 2>/dev/null; then
echo "$GREEN ONLINE $NC deploying"
if ${lib.getExe deploy-rs} "$FLAKE_PATH#$node" "''${DEPLOY_ARGS[@]}"; then
RESULTS+=("$node: $GREEN OK $NC")
else
RESULTS+=("$node: $RED DEPLOY ERROR $NC")
fi
else
echo "$RED OFFLINE $NC skipping"
RESULTS+=("$node: $YELLOW OFFLINE $NC ")
fi
done
echo
echo "===== Deployment summary ====="
for r in "''${RESULTS[@]}"; do
echo -e "$r"
done
''

View file

@ -5,6 +5,7 @@
}:
mkShell {
packages = with pkgs; [
pkgs.deploy-rs
deploy-rs
custom.deploy-rs-online
];
}

View file

@ -24,7 +24,8 @@ with lib.custom; {
};
users.extraGroups.docker.members = ["nixos"];
environment.systemPackages = with pkgs; [
inputs.emacs-kylekrein.packages.${pkgs.system}.with-lsps-native
(kylekrein.nixmacs.override
{withLsps = true;})
nix-output-monitor
eza
fd