diff options
author | lassulus <lassulus@lassul.us> | 2020-05-25 16:08:23 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-05-25 16:08:23 +0200 |
commit | bf77db83651898c9e94f84ea5919d8acc15f185a (patch) | |
tree | c2b800c5a746fd2021b3621b9c1f83b310e253be /tv/2configs | |
parent | 6c8210f93ae6715cbf5aa2adfef8bfd6bfc908b2 (diff) | |
parent | a406f014ea148fe11eb2303a4d631678e41bcd6f (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/imgur.nix | 25 | ||||
-rw-r--r-- | tv/2configs/xserver/default.nix | 7 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix new file mode 100644 index 000000000..ba84fd2df --- /dev/null +++ b/tv/2configs/imgur.nix @@ -0,0 +1,25 @@ +with import <stockholm/lib>; +{ config, pkgs, ... }: { + + services.nginx.virtualHosts."ni.r" = { + locations."/image" = { + extraConfig = /* nginx */ '' + client_max_body_size 20M; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://127.0.0.1:${toString config.krebs.htgen.imgur.port}; + proxy_pass_header Server; + ''; + }; + }; + + krebs.htgen.imgur = { + port = 7771; + script = /* sh */ '' + (. ${pkgs.htgen-imgur}/bin/htgen-imgur) + ''; + }; +} diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 357744533..4e9e30741 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -108,6 +108,13 @@ in { }; path = [ config.tv.slock.package + (pkgs.flameshot-once.override { + config.imgur.enable = true; + config.imgur.createUrl = "http://ni.r/image"; + config.imgur.deleteUrl = "http://ni.r/image/delete/%1"; + config.imgur.xdg-open.browser = "/etc/profiles/per-user/tv/bin/cr"; + config.timeout = 200; + }) pkgs.fzmenu pkgs.pulseaudioLight.out pkgs.rxvt_unicode |