mirror of
https://github.com/oqyude/nixos.git
synced 2026-08-10 00:23:13 +03:00
Compare commits
2
Commits
fe391211c4
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e66bbef553 | ||
|
|
5b3da95fc2 |
@@ -5,6 +5,9 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
panel = "${xlib.dirs.services-nodes-folder}/${xlib.device.hostname}/3x-ui";
|
||||
in
|
||||
{
|
||||
virtualisation = {
|
||||
podman = {
|
||||
@@ -25,8 +28,8 @@
|
||||
"TZ" = "Europe/Moscow";
|
||||
};
|
||||
volumes = [
|
||||
"${xlib.dirs.services-mnt-folder}/containers/3x-ui/cert/:/root/cert:rw"
|
||||
"${xlib.dirs.services-mnt-folder}/containers/3x-ui/db/:/etc/x-ui:rw"
|
||||
"${panel}/cert/:/root/cert:rw"
|
||||
"${panel}/db/:/etc/x-ui:rw"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
@@ -97,13 +100,13 @@
|
||||
};
|
||||
# Folders
|
||||
tmpfiles.rules = [
|
||||
"d /mnt 0755 root root -"
|
||||
"d /mnt/services 0755 root root -"
|
||||
"d /mnt/services/containers 0755 root root -"
|
||||
"d /mnt/services/containers/3x-ui 0755 root root -"
|
||||
"d /mnt/services/containers/3x-ui/cert 0755 root root -"
|
||||
"d /mnt/services/containers/3x-ui/db 0755 root root -"
|
||||
"Z /mnt/services/containers/3x-ui 0755 root root -"
|
||||
"d ${xlib.dirs.services-mnt-folder} 0755 root root -"
|
||||
"d ${xlib.dirs.services-nodes-folder} 0755 root root -"
|
||||
"d ${xlib.dirs.services-nodes-folder}/${xlib.device.hostname} 0755 root root -"
|
||||
"d ${panel} 0755 root root -"
|
||||
"d ${panel}/db 0755 root root -"
|
||||
"d ${panel}/cert 0755 root root -"
|
||||
"Z ${panel} 0755 root root -"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -118,6 +118,11 @@
|
||||
default = "/mnt/services";
|
||||
description = "All services folder.";
|
||||
};
|
||||
services-nodes-folder = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${config.xlib.dirs.services-mnt-folder}/nodes";
|
||||
description = "All nodes folder.";
|
||||
};
|
||||
postgresql-folder = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${config.xlib.dirs.services-mnt-folder}/postgresql";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# server = "https://localhost:9000/acme/acme/directory";
|
||||
# listenHTTP = ":80";
|
||||
# dnsProvider = null;
|
||||
# };
|
||||
# };
|
||||
# # "turn.home.arpa" = {
|
||||
# # listenHTTP = "127.0.0.1:80";
|
||||
# # group = "turnserver";
|
||||
|
||||
@@ -13,7 +13,7 @@ in
|
||||
{
|
||||
services = {
|
||||
calibre-web = {
|
||||
package = stable.calibre-web;
|
||||
# package = stable.calibre-web;
|
||||
enable = true;
|
||||
# dataDir = "${xlib.dirs.services-mnt-folder}/calibre-web";
|
||||
options = {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../containers/3x-ui.nix
|
||||
../software/beets
|
||||
./acme.nix
|
||||
./bentopdf.nix
|
||||
@@ -23,9 +24,9 @@
|
||||
./postgresql.nix
|
||||
./power.nix
|
||||
./samba.nix
|
||||
# ./step-ca.nix
|
||||
./syncthing.nix
|
||||
./systemd.nix
|
||||
# ./step-ca.nix
|
||||
# ../containers/remnawave.nix
|
||||
# ./coturn.nix
|
||||
# ./mealie.nix
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
navidromeDir = "/var/lib/services/navidrome-point";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
navidrome = {
|
||||
@@ -15,8 +18,19 @@
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = 4533;
|
||||
MusicFolder = "/mnt/beets/music";
|
||||
MusicFolder = "${navidromeDir}";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${xlib.dirs.server-home}/Music";
|
||||
where = "${navidromeDir}";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -64,6 +64,28 @@ in
|
||||
client_max_body_size 5G;
|
||||
'';
|
||||
};
|
||||
"x.zeroq.su" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://${server}:2049";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/subs/" = {
|
||||
proxyPass = "http://${server}:2096";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/subsjs/" = {
|
||||
proxyPass = "http://${server}:2096";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/clash/" = {
|
||||
proxyPass = "http://${server}:2096";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# "pdf.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
|
||||
@@ -13,10 +13,4 @@
|
||||
power-profiles-daemon.enable = lib.mkForce false;
|
||||
throttled.enable = false;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
cpupower-gui
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ in
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts = {
|
||||
"x.zeroq.su" = {
|
||||
"pubray1.zeroq.su" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
@@ -45,7 +45,7 @@ in
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults = {
|
||||
email = "go.bin043120@gmail.com";
|
||||
email = "oqyude@gmail.com";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
let
|
||||
serviceName = "rsync-services-sync";
|
||||
serverAddress = "oqyude@100.64.0.0";
|
||||
serverDir = "/mnt/services/nodes/vds";
|
||||
nodeDir = "/mnt/services";
|
||||
serverDir = "${xlib.dirs.services-nodes-folder}/${xlib.device.hostname}";
|
||||
nodeDir = "${xlib.dirs.services-mnt-folder}";
|
||||
in
|
||||
{
|
||||
systemd = {
|
||||
|
||||
Reference in New Issue
Block a user