1
0
Fork 0
mirror of https://git.sr.ht/~ehmry/syndicate-flake synced 2024-11-05 23:16:55 +00:00
Find a file
2021-11-07 11:39:41 +01:00
nixos nixos: trim flags cruft 2021-09-03 12:07:33 +02:00
preserves-nim preserves-nim: 1.1.0 -> 2.0.0 2021-10-17 14:25:51 +02:00
preserves-tools preserves-tools: init at 1.0.0 2021-09-03 13:57:18 +02:00
syndicate-rs syndicate-rs: add meta 2021-09-03 13:57:17 +02:00
.gitignore Add lib.generators.toPreserves 2021-09-02 22:12:54 +02:00
flake.lock Update preserves-nim 2021-09-25 14:35:19 +02:00
flake.nix Move nixpkgs input to master branch 2021-09-23 10:56:04 +02:00
lib.nix Add record support to lib.generators.toPreserves 2021-09-03 09:59:30 +02:00
README.md Correct URLs in README 2021-11-07 11:39:41 +01:00

Syndicate Nix flake

To add to your local flake registry:

nix registry add syndicate "git+https://git.syndicate-lang.org/ehmry/syndicate-flake?ref=trunk"

NixOS service

Importing

To import the NixOS module:

{
  # /etc/nixos/flake.nix
  inputs.syndicate.url = "git+https://git.syndicate-lang.org/ehmry/syndicate-flake?ref=trunk";

  outputs = { self, nixpkgs, syndicate }: {

    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./configuration.nix
        syndicate.nixosModules.syndicate-server
      ];
    };

  };

}

If /etc/nixos is not a flake then you may be able to use the getFlake builtin to retrieve the module.

{ config, lib, pkgs, ... }:

{
  imports = [ (builtins.getFlake "syndicate").nixosModules.syndicate-server ];
}

Configuration

{ config, lib, pkgs, ... }:

{
  services.syndicate-server = {
    enable = true;
    # A socket at /run/syndicate/ds is enable by default.
    tcpListeners = [{
      address = "127.0.0.1";
      port = 3232;
    }];
  };

}