updates and microbin and stuff
This commit is contained in:
parent
eb18a56149
commit
96d0947cd3
4 changed files with 50 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./mumble.nix
|
./mumble.nix
|
||||||
|
./microbin.nix
|
||||||
../modules/neovim.nix
|
../modules/neovim.nix
|
||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
];
|
];
|
||||||
|
|
38
schrottserver/microbin.nix
Normal file
38
schrottserver/microbin.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
microbin = pkgs.rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "microbin";
|
||||||
|
version = "1.2.0";
|
||||||
|
|
||||||
|
# GitHub sources do not have Cargo.lock
|
||||||
|
src = pkgs.fetchCrate {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-dZClslUTUchx+sOJzFG8wiAgyW/0RcCKfKYklKfVrzM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "sha256-fBbChu5iy/2H/8IYCwd1OwxplGPZAmkd8z8xD7Uc0vo=";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
environment.systemPackages = with pkgs; [ microbin ];
|
||||||
|
systemd.services.microbin = {
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
environment = {
|
||||||
|
MICROBIN_AUTH_USERNAME = "jade";
|
||||||
|
MICROBIN_AUTH_PASSWORD = builtins.readFile ../secret-data/mb-pass;
|
||||||
|
MICROBIN_HASH_IDS = "";
|
||||||
|
MICROBIN_EDITABLE = "";
|
||||||
|
MICROBIN_PRIVATE = "";
|
||||||
|
MICROBIN_HIGHLIGHTSYNTAX = "";
|
||||||
|
MICROBIN_PUBLIC_PATH = "https://s10e.de";
|
||||||
|
MICROBIN_QR = "";
|
||||||
|
};
|
||||||
|
script = "${pkgs.microbin}/bin/microbin";
|
||||||
|
#scriptArgs = "--auth-password ${builtins.readFile ../secret-data/mb-pass} --auth-username jade --editable --hash-ids --no-listing --highlightsyntax --public-path https://s10e.de --qr";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
RootDirectory="/";
|
||||||
|
WorkingDirectory = "/microbin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -16,6 +16,10 @@
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
keyType = "rsa2048";
|
keyType = "rsa2048";
|
||||||
};
|
};
|
||||||
|
"s10e.de" = {
|
||||||
|
group = "nginx";
|
||||||
|
keyType = "rsa2048";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,6 +59,13 @@
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
};
|
};
|
||||||
|
"s10e.de" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8080$request_uri";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
secret-data/mb-pass
Normal file
BIN
secret-data/mb-pass
Normal file
Binary file not shown.
Loading…
Reference in a new issue