From 2a1f9562271ca3987b4f18591cda13657620be63 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Fri, 12 May 2023 21:23:45 +1000 Subject: [PATCH] update microbin, add sxhkdrc command to paste clipboard to my bin --- home/profiles/desktop/bin/paste | 1 + home/profiles/desktop/default.nix | 1 + home/profiles/desktop/sxhkdrc | 3 +++ hosts/profiles/microbin/default.nix | 5 ++++- modules/nixos/microbin.nix | 9 +-------- 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100755 home/profiles/desktop/bin/paste diff --git a/home/profiles/desktop/bin/paste b/home/profiles/desktop/bin/paste new file mode 100755 index 00000000..2d2e69ef --- /dev/null +++ b/home/profiles/desktop/bin/paste @@ -0,0 +1 @@ +curl -F "content=$(xclip -o)" -X POST https://bin.sealight.xyz/upload diff --git a/home/profiles/desktop/default.nix b/home/profiles/desktop/default.nix index 6afe1bf1..e932f12d 100644 --- a/home/profiles/desktop/default.nix +++ b/home/profiles/desktop/default.nix @@ -113,6 +113,7 @@ in ''; # TODO hardcoded ".local/bin/passmenu".source = ./bin/passmenu; + ".local/bin/paste".source = ./bin/paste; ".local/bin/bluetoothmenu".source = ./bin/bluetoothmenu; ".local/bin/wifimenu".source = ./bin/wifimenu; ".local/bin/powermenu".source = ./bin/powermenu; diff --git a/home/profiles/desktop/sxhkdrc b/home/profiles/desktop/sxhkdrc index 18c90aec..0ffc225b 100644 --- a/home/profiles/desktop/sxhkdrc +++ b/home/profiles/desktop/sxhkdrc @@ -27,6 +27,9 @@ super + Tab super + e rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy +super + e + paste + super + p passmenu diff --git a/hosts/profiles/microbin/default.nix b/hosts/profiles/microbin/default.nix index 8fca359a..4aadc2cb 100644 --- a/hosts/profiles/microbin/default.nix +++ b/hosts/profiles/microbin/default.nix @@ -7,11 +7,14 @@ services.nginx.virtualHosts."bin.sealight.xyz" = { enableACME = true; forceSSL = true; + extraConfig = "client_max_body_size 20M;"; locations."/" = { extraConfig = '' proxy_pass http://localhost:4949/; - proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ''; }; }; diff --git a/modules/nixos/microbin.nix b/modules/nixos/microbin.nix index bad0f415..2244071f 100644 --- a/modules/nixos/microbin.nix +++ b/modules/nixos/microbin.nix @@ -45,14 +45,7 @@ in after = [ "remote-fs.target" "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = ''${pkgs.microbin}/bin/microbin --port ${builtins.toString cfg.port} - --public-path ${cfg.hostname} - --editable - --enable-burn-after - --private - --qr - --title=sealight - --highlightsyntax''; + ExecStart = "${pkgs.microbin}/bin/microbin -- --port ${builtins.toString cfg.port} --public-path ${cfg.hostname} --editable --enable-burn-after --private --qr --title=sealight --highlightsyntax"; WorkingDirectory = dataFolder; TimeoutStopSec = " 20 "; KillMode = " process ";