Dawid Ciężarkiewicz aka `dpc`


#nix #nixos

Interesting part is that the time displayed in the prompt is always refreshed to when the command is issued, so I know at what time I issued the command, and not at what time the previous command finished.

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

  programs.starship = {
    enable = true;
    settings = {
      format = "$time$username$hostname$localip$shlvl$singularity$kubernetes$directory$vcsh$fossil_branch$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch$pijul_channel$docker_context$package$bun$c$cmake$cobol$daml$dart$deno$dotnet$elixir$elm$erlang$fennel$golang$gradle$haskell$haxe$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$opa$perl$php$pulumi$purescript$python$raku$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$buf$guix_shell$nix_shell$conda$meson$spack$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$battery$status$container$os$shell$character";
      add_newline = false;
      character.success_symbol = "[>](bold green)";
      character.error_symbol = "[>](bold red)";
      directory.truncate_to_repo = false;
      directory.truncation_symbol = "…";
      git_branch.always_show_remote = true;
      git_branch.format = "[$symbol$branch(:$remote_name/$remote_branch)]($style) ";
      time.format = "[$time]($style) ";
      time.disabled = false;

      rust.disabled = true;
      nix_shell.format = "[$symbol]($style) ";
      nix_shell.symbol = " ";

  programs.fish.interactiveShellInit = ''
    # function starship_transient_rprompt_func
    # end
    function starship_transient_prompt_func
      # redraw, just to refresh the time
      ${pkgs.starship}/bin/starship prompt

  environment.systemPackages = [

  fonts.fonts = with pkgs; [
    (nerdfonts.override { fonts = [ "FiraCode" ]; })

I am running my #Urbit ship on Digital Ocean using #NixOS .

Took me quite a bit of time to figure the actual settings to use for Nginx to forward HTTPS to the port 8080 that vere uses. For some reason, default settings were causing the whole UI to misbehave completely: keep showing nonsense, disconnect etc. I finally found a working setup by asking around, googling and just trail and error.

In case you're interested, here are the settings that worked for me. TLS is set up using Let's Encrypt, terminated in Nginx, HTTP is redirected to HTTPs and HTTPs goes to vere.

    services.nginx.enable = true;
    services.nginx.recommendedOptimisation = true;
    services.nginx.recommendedProxySettings = true;
    services.nginx.recommendedGzipSettings = true;
    services.nginx.recommendedTlsSettings = true;

    services.nginx.virtualHosts."napzod-dopzod.arvo.network" = {
        forceSSL = true;
        enableACME = true;
        http2 = false;
        locations."/" = {
            proxyWebsockets = true;
            proxyPass = "";
            extraConfig = ''
              # required when the target is also TLS server with multiple hosts
              proxy_ssl_server_name on;
              # required when the server wants to use HTTP Authentication
              proxy_pass_header Authorization;
              chunked_transfer_encoding off; 
              proxy_buffering off; 
              proxy_cache off; 
            '' + "proxy_set_header Connection '';"; 

    security.acme.certs = {
      "napzod-dopzod.arvo.network".email = "myemail@example.com";

I have not attempted to minimize these settings, so I don't know which ones are actually necessary.

I am still running vere in a lame way: by starting it in tmux session, since I don't have a working Nix recipe for it yet. If you do, make sure to submit a PR to Nixpkgs so we can all benefit.