Skip to content

Commit 51bc3c2

Browse files
committed
feat!: Remove support for DPKI
1 parent 438aad3 commit 51bc3c2

9 files changed

+14
-72
lines changed

README.md

+12-31
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,20 @@ as an input. Something like:
2020
}
2121
```
2222

23-
This flake attempts to provide Holochain for its upcoming and stable releases. Currently, this would be the 0.4
24-
development versions and the stable 0.3 version.
23+
This flake attempts to provide Holochain for its upcoming and stable releases. Currently, this would be the 0.5
24+
development versions, the 0.4 stable versions and the 0.3 maintenance versions.
2525

2626
There isn't necessarily a migration path between minor versions of Holochain, so please refer to Holochain documentation
2727
when upgrading. Just changing the version that you are consuming from this flake is unlikely to work.
2828

29-
For Holochain 0.4 onwards, before you can get started, you will need a seed bundle for DPKI. You can use the CLI provided
30-
by this project to generate one. For example:
31-
32-
```shell
33-
nix develop -c node ./seed-tool/index.js generate --out root.bundle
34-
# Provide a password
35-
36-
nix develop -c node ./seed-tool/index.js derive --root root.bundle --out mymachine.bundle
37-
# Provide the password from step 1 again
38-
# Provide a password for this device bundle
39-
````
40-
41-
Keep the `root.bundle` safe. It's the device bundle that you will need to deploy.
42-
4329
The following is a very rough, sample flake. It will get you up and running, but you likely want to make improvements.
4430

4531
```nix
4632
{
4733
inputs = {
4834
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
4935
hc-nixos = {
50-
url = "github:ThetaSinner/hc-nixos?ref=rework";
36+
url = "github:ThetaSinner/hc-nixos?ref=main";
5137
inputs.nixpkgs.follows = "nixpkgs";
5238
};
5339
};
@@ -58,27 +44,22 @@ The following is a very rough, sample flake. It will get you up and running, but
5844
modules = [
5945
./configuration.nix
6046
hc-nixos.nixosModules.hcCommon # Adds groups and users
61-
hc-nixos.nixosModules.lair-keystore-0_5 # Define the Lair service
47+
hc-nixos.nixosModules.lair-keystore-for-0_4 # Define the Lair service
6248
hc-nixos.nixosModules.conductor-0_4 # Define the Conductor service
6349
({ pkgs, ... }: {
64-
environment.etc."lair-myMachine/device.bundle".text = "<contents of mymachine.bundle>";
65-
66-
services.lair-keystore-0_5 = {
50+
services.lair-keystore-for-0_4 = {
6751
enable = true;
68-
id = "lair-05";
52+
id = "lair";
6953
package = hc-nixos.inputs.holonix-0_4.packages.x86_64-linux.lair-keystore;
7054
passphrase = "pass"; # Secret, conductor must launch with the same phrase
71-
deviceSeed = "myMachine-seed"; # Not secret, just a name
72-
seedPassphrase = "<chosen in step 2 above>"; # Secret
7355
};
7456
7557
services.conductor-0_4 = {
7658
enable = true;
77-
id = "conductor-04";
78-
lairId = "lair-05";
59+
id = "conductor";
60+
lairId = "lair";
7961
package = hc-nixos.inputs.holonix-0_4.packages.x86_64-linux.holochain;
8062
keystorePassphrase = "pass"; # Secret, see Lair
81-
deviceSeed = "myMachine-seed"; # Not secret, see Lair
8263
};
8364
8465
# Include the Holochain tools and sqlcipher which can be useful for debugging or fixing corrupted sqlite databases etc.
@@ -117,11 +98,11 @@ sudo nixos-rebuild switch
11798

11899
You are free to override the configuration, run with an embedded Lair keystore or even run multiple Holochain versions
119100
side by side. I've started adding NixOS tests to demonstrate some different ways of running Holochain and showing how
120-
to configure it. You may use the tests under `tests` as a reference if you want some hints on how to do this.
101+
to configure it. You may use the tests under `tests` as a reference if you want some hints about how to do this.
121102

122-
Please note that the tests are not intended to be secure or production ready. They are just a way to demonstrate how
123-
to configure Holochain in different ways. It's left to you to ensure that your Holochain configuration is appropriate
124-
for your use case.
103+
Please note that the tests are not intended to be secure or production ready. They are primarily for verification and
104+
to demonstrate how to configure Holochain in different ways. It's left to you to ensure that your Holochain
105+
configuration is appropriate for your use-case.
125106

126107
### Testing interactively with a VM
127108

flake.nix

-7
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,11 @@
161161
holonix-0_4.packages.${system}.holochain
162162
];
163163

164-
environment.etc."lair-test/device.bundle".text = builtins.readFile ./tests/sample-device-seed.bundle;
165-
166164
services.lair-keystore-for-0_4 = {
167165
enable = true;
168166
id = "test";
169167
package = holonix-0_4.packages.${system}.lair-keystore;
170168
passphrase = "password";
171-
deviceSeed = "test";
172-
seedPassphrase = "pass";
173169
};
174170

175171
services.conductor-0_4 = {
@@ -178,7 +174,6 @@
178174
lairId = "test";
179175
package = holonix-0_4.packages.${system}.holochain;
180176
keystorePassphrase = "password";
181-
deviceSeed = "test";
182177
};
183178
}
184179
self.nixosModules.hcCommon
@@ -198,8 +193,6 @@
198193
id = "test";
199194
package = holonix-0_5.packages.${system}.lair-keystore;
200195
passphrase = "password";
201-
deviceSeed = "test";
202-
seedPassphrase = "pass";
203196
};
204197

205198
services.conductor-0_5 = {

modules/conductor-0_4.nix

-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ in {
2626
type = lib.types.package;
2727
};
2828

29-
deviceSeed = mkOption {type = types.str;};
30-
3129
keystorePassphrase = mkOption {
3230
description = "The passphrase for Lair";
3331
type = types.str;
@@ -105,7 +103,6 @@ in {
105103
arc_clamping = "full";
106104
};
107105
};
108-
device_seed_lair_tag = cfg.deviceSeed;
109106
dpki = {
110107
no_dpki = true;
111108
network_seed = "deepkey-main";

modules/lair-keystore-for-0_4.nix

+1-7
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ in {
2222
};
2323

2424
passphrase = mkOption {type = types.str;};
25-
26-
deviceSeed = mkOption {type = types.str;};
27-
28-
seedPassphrase = mkOption {type = types.str;};
2925
};
3026

3127
config = mkIf cfg.enable {
@@ -56,9 +52,7 @@ in {
5652
exit 1
5753
fi
5854
59-
printf "${cfg.passphrase}\n${cfg.seedPassphrase}" | lair-keystore import-seed --piped ${cfg.deviceSeed} $(cat "/etc/lair-${cfg.id}/device.bundle")
60-
61-
echo "Lair initialised and seeded"
55+
echo "Lair initialised"
6256
'';
6357

6458
script = ''

modules/lair-keystore-for-0_5.nix

+1-7
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ in {
2222
};
2323

2424
passphrase = mkOption {type = types.str;};
25-
26-
deviceSeed = mkOption {type = types.str;};
27-
28-
seedPassphrase = mkOption {type = types.str;};
2925
};
3026

3127
config = mkIf cfg.enable {
@@ -56,9 +52,7 @@ in {
5652
exit 1
5753
fi
5854
59-
printf "${cfg.passphrase}\n${cfg.seedPassphrase}" | lair-keystore import-seed --piped ${cfg.deviceSeed} $(cat "/etc/lair-${cfg.id}/device.bundle")
60-
61-
echo "Lair initialised and seeded"
55+
echo "Lair initialised"
6256
'';
6357

6458
script = ''

tests/holochain-0_4-with-lair.nix

-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
self.outputs.nixosModules.conductor-0_4
1515
];
1616

17-
environment.etc."lair-test/device.bundle".text = builtins.readFile ./sample-device-seed.bundle;
18-
1917
services.lair-keystore-for-0_4 = {
2018
enable = true;
2119
id = "test";
2220
package = holonix.packages.${system}.lair-keystore;
2321
passphrase = "password";
24-
deviceSeed = "test";
25-
seedPassphrase = "pass";
2622
};
2723

2824
services.conductor-0_4 = {
@@ -31,7 +27,6 @@
3127
lairId = "test";
3228
package = holonix.packages.${system}.holochain;
3329
keystorePassphrase = "password";
34-
deviceSeed = "test";
3530
};
3631

3732
system.stateVersion = "24.11";

tests/holochain-0_5-with-lair.nix

-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
self.outputs.nixosModules.conductor-0_5
1515
];
1616

17-
environment.etc."lair-test/device.bundle".text = builtins.readFile ./sample-device-seed.bundle;
18-
1917
services.lair-keystore-for-0_5 = {
2018
enable = true;
2119
id = "test";
2220
package = holonix.packages.${system}.lair-keystore;
2321
passphrase = "password";
24-
deviceSeed = "test";
25-
seedPassphrase = "pass";
2622
};
2723

2824
services.conductor-0_5 = {

tests/holochain-and-lair-side-by-side.nix

-7
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,18 @@
5050
};
5151
};
5252

53-
environment.etc."lair-testB/device.bundle".text = builtins.readFile ./sample-device-seed.bundle;
54-
5553
services.lair-keystore-for-0_4 = {
5654
enable = true;
5755
id = "testB";
5856
package = holonix-0_4.packages.${system}.lair-keystore;
5957
passphrase = "passwordB";
60-
deviceSeed = "test";
61-
seedPassphrase = "pass";
6258
};
6359

6460
services.conductor-0_4 = {
6561
enable = true;
6662
id = "testB";
6763
lairId = "testB";
6864
package = holonix-0_4.packages.${system}.holochain;
69-
deviceSeed = "test";
7065
keystorePassphrase = "passwordB";
7166
config = {
7267
admin_interfaces = [
@@ -86,8 +81,6 @@
8681
id = "testC";
8782
package = holonix-0_4.packages.${system}.lair-keystore;
8883
passphrase = "passwordC";
89-
deviceSeed = "test";
90-
seedPassphrase = "pass";
9184
};
9285

9386
services.conductor-0_5 = {

tests/sample-device-seed.bundle

-1
This file was deleted.

0 commit comments

Comments
 (0)