this repo has no description
1{
2 nixpkgs,
3 system,
4 self,
5}:
6nixpkgs.lib.nixosSystem {
7 inherit system;
8 modules = [
9 self.nixosModules.knot
10 self.nixosModules.spindle
11 ({
12 config,
13 pkgs,
14 ...
15 }: {
16 virtualisation = {
17 memorySize = 2048;
18 diskSize = 10 * 1024;
19 cores = 2;
20 forwardPorts = [
21 # ssh
22 {
23 from = "host";
24 host.port = 2222;
25 guest.port = 22;
26 }
27 # knot
28 {
29 from = "host";
30 host.port = 6000;
31 guest.port = 6000;
32 }
33 # spindle
34 {
35 from = "host";
36 host.port = 6555;
37 guest.port = 6555;
38 }
39 ];
40 };
41 services.getty.autologinUser = "root";
42 environment.systemPackages = with pkgs; [curl vim git];
43 systemd.tmpfiles.rules = let
44 u = config.services.tangled-knot.gitUser;
45 g = config.services.tangled-knot.gitUser;
46 in [
47 "d /var/lib/knot 0770 ${u} ${g} - -" # Create the directory first
48 "f+ /var/lib/knot/secret 0660 ${u} ${g} - KNOT_SERVER_SECRET=168c426fa6d9829fcbe85c96bdf144e800fb9737d6ca87f21acc543b1aa3e440"
49 ];
50 services.tangled-knot = {
51 enable = true;
52 motd = "Welcome to the development knot!\n";
53 server = {
54 secretFile = "/var/lib/knot/secret";
55 hostname = "localhost:6000";
56 listenAddr = "0.0.0.0:6000";
57 };
58 };
59 services.tangled-spindle = {
60 enable = true;
61 server = {
62 owner = "did:plc:qfpnj4og54vl56wngdriaxug";
63 hostname = "localhost:6555";
64 listenAddr = "0.0.0.0:6555";
65 dev = true;
66 secrets = {
67 provider = "sqlite";
68 };
69 };
70 };
71 })
72 ];
73}