Adds syncthing and some other stuff

This commit is contained in:
xqtc161 2024-04-12 12:50:19 +02:00
parent 62d0696d84
commit 574494bf0c
9 changed files with 70 additions and 29 deletions

View file

@ -5,14 +5,17 @@
pkgs,
...
}: {
imports = [./syncthing.nix];
#nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0" "electron-24.8.6"];
networking.hosts = {
"192.168.178.35" = ["jellyfin.fritz.box" "grafana.fritz.box"];
};
environment.systemPackages = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal
];
# networking.hosts = {
# "192.168.178.35" = ["jellyfin.fritz.box" "grafana.fritz.box"];
# };
# environment.systemPackages = with pkgs; [
# xdg-desktop-portal-hyprland
# xdg-desktop-portal
# ];
networking.firewall.allowedTCPPorts = [8384 22000];
networking.firewall.allowedUDPPorts = [22000 21027];
nix.settings = {
trusted-users = ["xqtc"];
substituters = [

19
common/syncthing.nix Normal file
View file

@ -0,0 +1,19 @@
{
config,
lib,
inputs,
...
}: {
services.syncthing = {
enable = true;
user = "xqtc";
dataDir = "/home/xqtc/syncthing";
configDir = "${config.services.syncthing.dataDir}/.config/syncthing";
settings = {
gui = {
user = "xqtc";
# insecureSkipHostcheck = true;
};
};
};
}

View file

@ -43,7 +43,7 @@
pylsp.enable = true;
bashls.enable = true;
lua-ls.enable = true;
gopls.enable = true;
gopls.enable = true;
nushell.enable = true;
clangd.enable = true;
svelte.enable = true;

View file

@ -16,7 +16,7 @@
shellAliases = {ls = "eza -l --icons --header --git --group-directories-first";};
extraConfig = "maxfetch";
configFile = {
text = builtins.readFile ../config-files/config.nu;
text = builtins.readFile ../config-files/config.nu;
};
};
carapace.enable = true;

View file

@ -1,5 +1,8 @@
{config, lib, ...}:
{
config,
lib,
...
}: {
services.calibre-web = {
enable = true;
options = {

View file

@ -14,32 +14,40 @@ with lib; {
./transmission.nix
./lanrarari.nix
../../gc.nix
../../../common
];
services.caddy = {
enable = true;
email = "xqtc@tutanota.com";
configFile = pkgs.writeText "Caddyfile" ''
heroin.trade {
root * /var/www/website/build/
file_server
}
demos.heroin.trade {
root * /var/www/demos/
file_server browse
}
jellyfin.heroin.trade {
reverse_proxy http://127.0.0.1:8096
}
calibre.heroin.trade {
reverse_proxy http://localhost:3000
}
grafana.heroin.trade {
reverse_proxy http://127.0.0.1:2342
heroin.trade {
root * /var/www/website/build/
file_server
}
syncthing.heroin.trade {
reverse_proxy http://localhost:8384 {
header_up Some-Header "localhost"
}
}
demos.heroin.trade {
root * /var/www/demos/
file_server browse
}
jellyfin.heroin.trade {
reverse_proxy http://127.0.0.1:8096
}
calibre.heroin.trade {
reverse_proxy http://localhost:3000
}
grafana.heroin.trade {
reverse_proxy http://127.0.0.1:2342
}
'';
};
services.syncthing.settings.gui.insecureSkipHostcheck = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings = {
@ -69,6 +77,7 @@ with lib; {
];
openssh.authorizedKeys.keys = [
# TODO: Add remaining keys from https://meta.sr.ht/~xqrc.keys
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJTLJqIVwnqFO64rnc66d234TFOdFXpDS9fJUA4/f4in xqtc@alastor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7UkcmSVo+SeB5Obevz3mf3UHruYxn0UHUzoOs2gDBy xqtc@asmodeus"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf3w5bHAssHthg9SPXVpG4w9v8m16X/0J3bjg08P6EA xqtc@seraphim"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYa+LoHGGvu12iBufUcr3GD8tsq4LuJdwLjaDkTr0SL xqtc@lilith"

View file

@ -1,4 +1,8 @@
{config, pkgs, lib, ...}:
{
config,
pkgs,
lib,
...
}: {
services.lanraragi.enable = true;
}

View file

@ -1,5 +1,8 @@
{config, lib, ...}:
{
config,
lib,
...
}: {
services.transmission = {
enable = true;
};

View file

@ -200,7 +200,7 @@
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [22 2234 8080 5173];
networking.firewall.allowedUDPPorts = [ 2234 ];
networking.firewall.allowedUDPPorts = [2234];
# Or disable the firewall altogether.
# networking.firewall.enable = false;