mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-22 16:10:32 +01:00
Adds syncthing and some other stuff
This commit is contained in:
parent
62d0696d84
commit
574494bf0c
|
@ -5,14 +5,17 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [./syncthing.nix];
|
||||||
#nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0" "electron-24.8.6"];
|
#nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0" "electron-24.8.6"];
|
||||||
networking.hosts = {
|
# networking.hosts = {
|
||||||
"192.168.178.35" = ["jellyfin.fritz.box" "grafana.fritz.box"];
|
# "192.168.178.35" = ["jellyfin.fritz.box" "grafana.fritz.box"];
|
||||||
};
|
# };
|
||||||
environment.systemPackages = with pkgs; [
|
# environment.systemPackages = with pkgs; [
|
||||||
xdg-desktop-portal-hyprland
|
# xdg-desktop-portal-hyprland
|
||||||
xdg-desktop-portal
|
# xdg-desktop-portal
|
||||||
];
|
# ];
|
||||||
|
networking.firewall.allowedTCPPorts = [8384 22000];
|
||||||
|
networking.firewall.allowedUDPPorts = [22000 21027];
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["xqtc"];
|
trusted-users = ["xqtc"];
|
||||||
substituters = [
|
substituters = [
|
||||||
|
|
19
common/syncthing.nix
Normal file
19
common/syncthing.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -43,7 +43,7 @@
|
||||||
pylsp.enable = true;
|
pylsp.enable = true;
|
||||||
bashls.enable = true;
|
bashls.enable = true;
|
||||||
lua-ls.enable = true;
|
lua-ls.enable = true;
|
||||||
gopls.enable = true;
|
gopls.enable = true;
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
clangd.enable = true;
|
clangd.enable = true;
|
||||||
svelte.enable = true;
|
svelte.enable = true;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
shellAliases = {ls = "eza -l --icons --header --git --group-directories-first";};
|
shellAliases = {ls = "eza -l --icons --header --git --group-directories-first";};
|
||||||
extraConfig = "maxfetch";
|
extraConfig = "maxfetch";
|
||||||
configFile = {
|
configFile = {
|
||||||
text = builtins.readFile ../config-files/config.nu;
|
text = builtins.readFile ../config-files/config.nu;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
carapace.enable = true;
|
carapace.enable = true;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{config, lib, ...}:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.calibre-web = {
|
services.calibre-web = {
|
||||||
enable = true;
|
enable = true;
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -14,32 +14,40 @@ with lib; {
|
||||||
./transmission.nix
|
./transmission.nix
|
||||||
./lanrarari.nix
|
./lanrarari.nix
|
||||||
../../gc.nix
|
../../gc.nix
|
||||||
|
../../../common
|
||||||
];
|
];
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "xqtc@tutanota.com";
|
email = "xqtc@tutanota.com";
|
||||||
configFile = pkgs.writeText "Caddyfile" ''
|
configFile = pkgs.writeText "Caddyfile" ''
|
||||||
heroin.trade {
|
heroin.trade {
|
||||||
root * /var/www/website/build/
|
root * /var/www/website/build/
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
demos.heroin.trade {
|
syncthing.heroin.trade {
|
||||||
root * /var/www/demos/
|
reverse_proxy http://localhost:8384 {
|
||||||
file_server browse
|
header_up Some-Header "localhost"
|
||||||
}
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
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.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
|
@ -69,6 +77,7 @@ with lib; {
|
||||||
];
|
];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
# TODO: Add remaining keys from https://meta.sr.ht/~xqrc.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 AAAAC3NzaC1lZDI1NTE5AAAAIN7UkcmSVo+SeB5Obevz3mf3UHruYxn0UHUzoOs2gDBy xqtc@asmodeus"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf3w5bHAssHthg9SPXVpG4w9v8m16X/0J3bjg08P6EA xqtc@seraphim"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf3w5bHAssHthg9SPXVpG4w9v8m16X/0J3bjg08P6EA xqtc@seraphim"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYa+LoHGGvu12iBufUcr3GD8tsq4LuJdwLjaDkTr0SL xqtc@lilith"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYa+LoHGGvu12iBufUcr3GD8tsq4LuJdwLjaDkTr0SL xqtc@lilith"
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{config, pkgs, lib, ...}:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.lanraragi.enable = true;
|
services.lanraragi.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{config, lib, ...}:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.transmission = {
|
services.transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [22 2234 8080 5173];
|
networking.firewall.allowedTCPPorts = [22 2234 8080 5173];
|
||||||
networking.firewall.allowedUDPPorts = [ 2234 ];
|
networking.firewall.allowedUDPPorts = [2234];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue