Compare commits

..

2 commits

Author SHA1 Message Date
uku
3f5c5c8d1b
WIP MADDY 2025-01-04 00:05:03 +01:00
uku
15b0781bee
feat(vesuvio): add acme certificates 2025-01-04 00:05:03 +01:00
7 changed files with 6 additions and 61 deletions

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ pkgs, config, ... }:
{
imports = [
./common.nix
@ -15,7 +15,8 @@
nixd
];
variables.SSH_ASKPASS_REQUIRE = "prefer";
# fix for wsl, `prefer` does not work if your SSH_ASKPASS is empty/unset
variables.SSH_ASKPASS_REQUIRE = if config.programs.ssh.enableAskPassword then "prefer" else "never";
};
networking = {
@ -29,11 +30,7 @@
programs = {
nix-ld.enable = true;
ssh = {
startAgent = true;
enableAskPassword = true;
askPassword = lib.mkDefault "${pkgs.curses-ssh-askpass}"; # see exprs/curses-ssh-askpass.nix
};
ssh.startAgent = true;
};
virtualisation.docker.enable = true;

View file

@ -1,15 +0,0 @@
{
lib,
pinentry-curses,
writeShellScript,
}:
writeShellScript "curses-ssh-askpass" ''
if [ -z ''${1+x} ]; then
prompt="GETPIN"
else
prompt="SETDESC $1\nGETPIN"
fi
pin=$(echo -e "$prompt" | ${lib.getExe pinentry-curses} -T /dev/pts/0 | grep D | tr -d '\n')
echo "''${pin:2}"
''

View file

@ -1,6 +1,5 @@
inputs: final: prev: {
idea-ultimate-fixed = prev.callPackage ./idea-fixed.nix { };
curses-ssh-askpass = prev.callPackage ./curses-ssh-askpass.nix { };
vencord = prev.vencord.overrideAttrs (old: rec {
version = "${old.version}+git.${inputs.vencord.shortRev}";

View file

@ -84,16 +84,4 @@
systemd.services."${backend}-mc-${name}".serviceConfig.TimeoutSec = "300";
};
mkFrpPassthrough = name: port: {
services.frp.settings.proxies = [
{
inherit name;
type = "tcp";
localIp = "localhost";
localPort = port;
remotePort = port;
}
];
};
}

View file

@ -1,9 +1,6 @@
{ config, _utils, ... }:
let
frp = _utils.mkFrpPassthrough "immich" config.services.immich.port;
in
{ config, ... }:
{
imports = [ frp ];
cfTunnels."im.uku.moe" = "http://localhost:${builtins.toString config.services.immich.port}";
services.immich = {
enable = true;

View file

@ -4,7 +4,6 @@
./certificates.nix
./frp.nix
./hetzner.nix
./nginx.nix
];
environment.systemPackages = with pkgs; [

View file

@ -1,20 +0,0 @@
{
services.nginx.virtualHosts = {
# immich
"im.uku.moe" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:2283";
proxyWebsockets = true;
};
extraConfig = ''
client_max_body_size 5000M;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
};
}