t4t.gratis main website and app portal
  • Rust 77%
  • SCSS 17.2%
  • Nix 5.8%
Find a file
exa 7a5c6dbe88
Some checks failed
test / test (push) Failing after 2s
Remove flake section (its not true)
2026-10-08 10:54:53 +02:00
.forgejo/workflows Update .forgejo/workflows/deploy.yml 2026-09-23 11:13:16 +02:00
assets Initial commit 2026-09-18 13:50:08 +02:00
docs Move screenshot 2026-09-23 11:03:40 +02:00
public friends :D 2026-10-08 10:47:31 +02:00
src Remove flake section (its not true) 2026-10-08 10:54:53 +02:00
styles friends :D 2026-10-08 10:47:31 +02:00
.env.example Add port env 2026-09-18 17:30:26 +02:00
.envrc Initial commit 2026-09-18 13:50:08 +02:00
.gitignore OMG I FORGIT 2026-09-20 12:04:18 +02:00
build.rs Big update :3 2026-09-22 23:57:51 +02:00
Cargo.lock Big update :3 2026-09-22 23:57:51 +02:00
Cargo.toml Big update :3 2026-09-22 23:57:51 +02:00
flake.lock Properly embed pubic files 2026-09-18 17:59:16 +02:00
flake.nix Update flake.nix 2026-09-23 02:06:27 +02:00
LICENSE Add LICENSE 2026-09-23 10:42:04 +02:00
README.md Update README.md 2026-09-23 11:07:47 +02:00
shell.nix Initial commit 2026-09-18 13:50:08 +02:00

Screenshot

t4t.gratis main website and app portal.

How 2 run :3

Fill out your .env file with the necessary variables.

PORT=                     # the port you wanna run home-screen at
OAUTH_CLIENT_ID=          # the client id you got from your oauth provider
OAUTH_CLIENT_SECRET=      # the client secret you got from your oauth provider
OAUTH_PRIVATE_COOKIE_KEY= # generate one with: nix run nixpkgs#openssl -- rand -base64 64

Run it

cargo run # (--release for Release builds)

How 2 flake :3333

Add this repo to your flake inputs.

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
    home-screen = {
      url = "git+https://git.t4t.gratis/infra/home-screen";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # moar inputz...
  };
  outputs = { self, nixpkgs, home-manager, nixos-mailserver, agenix, home-screen, nix-minecraft, stump, ... }@inputs: {
    nixosConfigurations."t4t" = nixpkgs.lib.nixosSystem {
      modules = [
        home-screen.nixosModules.default

        ./configuration.nix
        # moar modulez...
      ];
    };
  };
}

In your configuration.nix, or any other module, add:

{ config, pkgs, lib, ... }:
{
  services.home-screen = {
    enable = true;
    port =            /* the port you wanna run home-screen at */;
    oauth_client_id = /* the client id you got from your oauth provider */;
    environmentFile = /* SOMEWHERE SAFE! Use agenix if you don't know what to do here. */;
  };
}

environmentFile should point to a file containing:

OAUTH_CLIENT_SECRET=      # the client secret you got from your oauth provider
OAUTH_PRIVATE_COOKIE_KEY= # generate one with: nix run nixpkgs#openssl -- rand -base64 64

Then, port-forward it. Here we used caddy but anything else works too. For example, this is how to forward port 1337 using caddy.

{ config, pkgs, lib, ... }:
{
  services.caddy.virtualHosts."${domain}" = {
    extraConfig = /*Caddyfile*/''
      reverse_proxy 127.0.0.1:1337
    '';
  };
  services.home-screen = {
    enable = /* ... */;
    port = 1337;
    oauth_client_id = /* ... */;
    environmentFile = /* ... */;
  };
}