+1
-1
flake.nix
+1
-1
flake.nix
···
252
rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1)
253
cd "$rootDir"
254
255
-
rm api/tangled/*
256
lexgen --build-file lexicon-build-config.json lexicons
257
sed -i.bak 's/\tutil/\/\/\tutil/' api/tangled/*
258
${pkgs.gotools}/bin/goimports -w api/tangled/*
···
252
rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1)
253
cd "$rootDir"
254
255
+
rm -f api/tangled/*
256
lexgen --build-file lexicon-build-config.json lexicons
257
sed -i.bak 's/\tutil/\/\/\tutil/' api/tangled/*
258
${pkgs.gotools}/bin/goimports -w api/tangled/*
+7
nix/modules/knot.nix
+7
nix/modules/knot.nix
···
93
description = "Internal address for inter-service communication";
94
};
95
96
secretFile = mkOption {
97
type = lib.types.path;
98
example = "KNOT_SERVER_SECRET=<hash>";
···
199
"KNOT_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}"
200
"KNOT_SERVER_DB_PATH=${cfg.server.dbPath}"
201
"KNOT_SERVER_HOSTNAME=${cfg.server.hostname}"
202
];
203
EnvironmentFile = cfg.server.secretFile;
204
ExecStart = "${cfg.package}/bin/knot server";
···
93
description = "Internal address for inter-service communication";
94
};
95
96
+
owner = mkOption {
97
+
type = types.str;
98
+
example = "did:plc:qfpnj4og54vl56wngdriaxug";
99
+
description = "DID of owner (required)";
100
+
};
101
+
102
secretFile = mkOption {
103
type = lib.types.path;
104
example = "KNOT_SERVER_SECRET=<hash>";
···
205
"KNOT_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}"
206
"KNOT_SERVER_DB_PATH=${cfg.server.dbPath}"
207
"KNOT_SERVER_HOSTNAME=${cfg.server.hostname}"
208
+
"KNOT_SERVER_OWNER=${cfg.server.owner}"
209
];
210
EnvironmentFile = cfg.server.secretFile;
211
ExecStart = "${cfg.package}/bin/knot server";
+2
-1
nix/vm.nix
+2
-1
nix/vm.nix
···
70
};
71
# This is fine because any and all ports that are forwarded to host are explicitly marked above, we don't need a separate guest firewall
72
networking.firewall.enable = false;
73
services.getty.autologinUser = "root";
74
environment.systemPackages = with pkgs; [curl vim git sqlite litecli];
75
services.tangled-knot = {
76
enable = true;
77
motd = "Welcome to the development knot!\n";
78
server = {
79
-
secretFile = builtins.toFile "knot-secret" ("KNOT_SERVER_SECRET=" + (envVar "TANGLED_VM_KNOT_SECRET"));
80
hostname = "localhost:6000";
81
listenAddr = "0.0.0.0:6000";
82
};
···
70
};
71
# This is fine because any and all ports that are forwarded to host are explicitly marked above, we don't need a separate guest firewall
72
networking.firewall.enable = false;
73
+
time.timeZone = "Europe/London";
74
services.getty.autologinUser = "root";
75
environment.systemPackages = with pkgs; [curl vim git sqlite litecli];
76
services.tangled-knot = {
77
enable = true;
78
motd = "Welcome to the development knot!\n";
79
server = {
80
+
owner = envVar "TANGLED_VM_KNOT_OWNER";
81
hostname = "localhost:6000";
82
listenAddr = "0.0.0.0:6000";
83
};