flake: Remove dependency on radicle-nix

This is too cumbersome to update, and also in the last two weeks two
people with Nixpkgs commit access got more interested in Radicle, thus
hopefully making turnaround quicker, obsoleting `radicle-nix`.
This commit is contained in:
Lorenz Leutgeb
2025-08-26 13:17:28 +02:00
parent 715b37429d
commit 10393fc636
5 changed files with 106 additions and 63 deletions
+17 -19
View File
@@ -4,25 +4,6 @@ Easing the deployment of Radicle seed nodes with the magic of Nix 🌱 ➕ ❄
## Deployment
Using `radicle-nix` (`rad:zTGn5tnYJgF8qd6KDuodURvUvwLe`) we can easily deploy
seed nodes to target hosts.
To update the version of `radicle-node` package, changes are made in
`radicle-nix`. To reflect those changes in `radicle-infra`, first update the
Flake input:
```
nix flake lock --update-input radicle
```
Then the following option should be changed in `os/host/seed/radicle.nix`:
```nix
{pkgs, ...}: {
services.radicle.package = pkgs.radicle-node-1_2;
}
```
Then to deploy to the target, for example `seed.radicle.xyz`, use the following
command. You might have to adjust the value of `$USER` if the username on your
local machine does not match the username of your account on the target machine.
@@ -32,6 +13,23 @@ Also, note that you may have to get permission to be added as a user first:
HOST=seed.radicle.xyz; nixos-rebuild switch --target-host "${USER}@${HOST}" --build-host "${USER}@${HOST}" --use-remote-sudo --flake .
```
### Overlays
To deploy a versions of packages that are not upstreamed (e.g. pre-releases),
use the overlays in `./overlay`.
Then the following option should be changed in `os/host/seed/radicle.nix`:
```nix
{pkgs, ...}: {
# Use Nixpkgs
services.radicle.package = pkgs.radicle-node;
# Use overlaid version.
services.radicle.package = pkgs.radicle-node-overlay;
}
```
## DNS
The radicle.xyz. zone is configured via [DNSControl].
Generated
+37 -28
View File
@@ -87,6 +87,7 @@
"crane": {
"inputs": {
"nixpkgs": [
"lorenz",
"radicle",
"radicle-tui",
"nixpkgs"
@@ -129,6 +130,7 @@
"dream2nix": {
"inputs": {
"nixpkgs": [
"lorenz",
"radicle",
"nixpkgs"
],
@@ -303,10 +305,8 @@
"pre-commit-hooks": [
"pre-commit-hooks"
],
"radicle": [
"radicle"
],
"rust-overlay": "rust-overlay",
"radicle": "radicle",
"rust-overlay": "rust-overlay_2",
"sbt": "sbt",
"sops": [
"sops"
@@ -474,6 +474,7 @@
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"lorenz",
"radicle",
"dream2nix",
"nixpkgs"
@@ -569,19 +570,24 @@
"inputs": {
"dream2nix": "dream2nix",
"flake-utils": [
"lorenz",
"utils"
],
"nixpkgs": [
"lorenz",
"nixpkgs"
],
"nixpkgs-stable": [
"lorenz",
"nixpkgs-stable"
],
"pre-commit-hooks": [
"lorenz",
"pre-commit-hooks"
],
"radicle-tui": "radicle-tui",
"sops-nix": [
"lorenz",
"sops"
],
"systems": "systems_2"
@@ -605,14 +611,16 @@
"advisory-db": "advisory-db",
"crane": "crane",
"flake-utils": [
"lorenz",
"radicle",
"flake-utils"
],
"nixpkgs": [
"lorenz",
"radicle",
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1744642603,
@@ -643,12 +651,34 @@
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"pre-commit-hooks": "pre-commit-hooks",
"radicle": "radicle",
"sops": "sops",
"utils": "utils"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"lorenz",
"radicle",
"radicle-tui",
"nixpkgs"
]
},
"locked": {
"lastModified": 1723170066,
"narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"lorenz",
@@ -669,28 +699,6 @@
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"radicle",
"radicle-tui",
"nixpkgs"
]
},
"locked": {
"lastModified": 1723170066,
"narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sbt": {
"inputs": {
"flake-utils": [
@@ -719,6 +727,7 @@
"slimlock": {
"inputs": {
"nixpkgs": [
"lorenz",
"radicle",
"dream2nix",
"purescript-overlay",
+1 -14
View File
@@ -24,17 +24,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
radicle = {
url = "github:radicle-nix/radicle-nix";
inputs = {
sops-nix.follows = "sops";
flake-utils.follows = "utils";
nixpkgs-stable.follows = "nixpkgs-stable";
nixpkgs.follows = "nixpkgs";
pre-commit-hooks.follows = "pre-commit-hooks";
};
};
compat.url = "github:edolstra/flake-compat";
sops = {
url = "github:Mic92/sops-nix";
@@ -64,7 +53,6 @@
compat.follows = "compat";
utils.follows = "utils";
pre-commit-hooks.follows = "pre-commit-hooks";
radicle.follows = "radicle";
};
};
};
@@ -78,7 +66,6 @@
nixpkgs,
nixpkgs-unstable,
pre-commit-hooks,
radicle,
sops,
...
}: let
@@ -142,7 +129,7 @@
};
nixpkgs = {
overlays = [
radicle.overlays.master
(import ./overlay/radicle-node.nix)
];
config.allowUnfree = true;
};
+1 -2
View File
@@ -6,7 +6,7 @@
}: {
services.radicle = {
enable = true;
package = pkgs.radicle-node-1_4_0-rc_1;
package = pkgs.radicle-node-overlay;
privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
settings = {
@@ -51,7 +51,6 @@
httpd = {
enable = true;
package = pkgs.radicle-httpd-master;
nginx = {
addSSL = true;
enableACME = true;
+50
View File
@@ -0,0 +1,50 @@
final: prev: (let
version = "1.4.0-rc.1";
overlayRustPackage = {
final,
prev,
old,
new ? old,
override,
}: {
${new} = final.callPackage prev.${old}.override {
rustPlatform =
final.rustPlatform
// {
buildRustPackage = args:
final.rustPlatform.buildRustPackage (
args
// (override args)
);
};
};
};
in
overlayRustPackage rec {
inherit final prev;
old = "radicle-node";
new = "${old}-overlay";
override = args: {
inherit version;
name = new;
env.RADICLE_VERSION = version;
src = final.fetchgit {
inherit (args.src) url;
tag = "releases/${version}";
hash = "sha256-jGh8ZZPmElmLCspWvR3gBAOQXX0vtXKsVAzqr32uWpQ=";
leaveDotGit = true;
postFetch = ''
git -C $out rev-parse HEAD > $out/.git_head
git -C $out log -1 --pretty=%ct HEAD > $out/.git_time
rm -rf $out/.git
'';
};
cargoHash = "sha256-64SDz0wHKcp/tPGDDOlCRFr3Z1q6cWOafhP0howSFhA=";
doCheck = false;
passthru = {};
};
})