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jQKr51aQWU8JftZ5/8uck2j7vMi+mgwzpG45J7kv Q1I5decBOQKBgFq1sKotB/uBfdukY91KXYy+VzAuEUd2x3YG3kYufhz97+riZCGY NrN99cvrSBbNvHewMF5NBkzwRw3foob28vnN6dIbfVEFt6lUaSZwSYvsO9IdQOKj Wn2ma+TBaK/89Y7QuzLzWoGPS3bJipj83M4XRWP1RmpBtbCxZqWYctWBAoGAMZPi 16wGsffGHpsiO+CcnDilkafByypar6N5DBwjTC4PsrF6vC9QjPLiKkNk8CvOyVa8 q3lh5hw9vyFWq/pxOUldn/j6Iorw3KGa7MWrCLMEdPtxKwKvi7ydHRZE3Q+UFyT3 SNsH1HxHTz74Yk1k5yK0XQOduisK9XvVmBVjr+ECgYEAyoSbo/1cyLKWgrIr0K/f stiKL9SmBmYbaGaxtQToB5Hnqso7Hz5YEDlrcr8s1ukEFghgeNYuDYw3ZKKGGfZm yVQKAt8ouoO8rfkLrtt0H+/0uJgouhewDEqf/O+MfzwDnFcT89J5ZTEf+9n6pjry fuiQnuwEsPYGCCFuWWlrdHQ= -----END PRIVATE KEY----- ''; in (import ./lib.nix) { name = "idcoop-starts"; nodes = { # `self` here is set by using specialArgs in `lib.nix` node1 = { self, pkgs, ... }: { imports = [ self.nixosModules.idcoop ]; environment.systemPackages = [ pkgs.curl pkgs.jq ]; services.idcoop = { enable = true; settings = { oidc.rsa_keypair = builtins.toFile "rsa_keypair.pem" rsaKeypair; # TODO for some reason the default doesn't work ??? postgres.connect = "postgres://%2Frun%2fpostgresql"; }; }; services.postgresql = { enable = true; enableTCPIP = false; }; }; }; # This is the test code that will check if our service is running correctly: testScript = '' start_all() # wait for our service to start node1.wait_for_unit("idcoop") # wait for the port to open node1.wait_for_open_port(8072) # check the OpenID Connect discovery is served output = node1.succeed("curl http://localhost:8072/.well-known/openid-configuration | jq -e .") ''; }