Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions nix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Nix

The flake exports the T3 Code package for `x86_64-linux`.

## NixOS user service

Add T3 Code to your flake inputs:

```nix
inputs.t3code.url = "github:tarik02-org/t3code";
```

Then add the package and user service to your NixOS configuration:

```nix
{ inputs, pkgs, ... }:

let
t3code = inputs.t3code.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
environment.systemPackages = [ t3code ];

systemd.user.services.t3code = {
description = "T3 Code server";
wantedBy = [ "default.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];

serviceConfig = {
Type = "simple";
ExecStart = "${t3code}/bin/t3 serve --host 0.0.0.0 --port 3773";
WorkingDirectory = "%h";
Environment = [ "T3CODE_NO_BROWSER=1" ];
Restart = "on-failure";
RestartSec = "5s";
OOMPolicy = "continue";
};
};
}
```
Loading