mirror of
https://github.com/oqyude/nixos.git
synced 2026-08-10 08:33:12 +03:00
Compare commits
3
Commits
fe391211c4
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc12ab5bba | ||
|
|
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";
|
||||
|
||||
@@ -6,18 +6,21 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
stable = import inputs.nixpkgs-previous {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
# stable = import inputs.nixpkgs-previous {
|
||||
# system = "x86_64-linux";
|
||||
# };
|
||||
libraryDir = "${xlib.dirs.services-mnt-folder}/calibre-web-library";
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/calibre-web";
|
||||
targetDir = "/var/lib/calibre-web";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
calibre-web = {
|
||||
package = stable.calibre-web;
|
||||
# package = stable.calibre-web;
|
||||
enable = true;
|
||||
# dataDir = "${xlib.dirs.services-mnt-folder}/calibre-web";
|
||||
options = {
|
||||
calibreLibrary = "${xlib.dirs.services-mnt-folder}/calibre-web-library";
|
||||
calibreLibrary = "${libraryDir}";
|
||||
enableBookUploading = true;
|
||||
enableKepubify = true;
|
||||
enableBookConversion = false;
|
||||
@@ -40,13 +43,15 @@ in
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${xlib.dirs.services-mnt-folder}/calibre-web 0755 calibre-web calibre-web -"
|
||||
"d ${xlib.dirs.services-mnt-folder}/calibre-web-library 0755 calibre-web calibre-web -"
|
||||
"d ${libraryDir} 0755 calibre-web calibre-web -"
|
||||
"d ${sourceDir} 0755 calibre-web calibre-web -"
|
||||
"Z ${libraryDir} 0755 calibre-web calibre-web -"
|
||||
"Z ${sourceDir} 0755 calibre-web calibre-web -"
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/var/lib/calibre-web" = {
|
||||
device = "${xlib.dirs.services-mnt-folder}/calibre-web";
|
||||
"${targetDir}" = {
|
||||
device = "${sourceDir}";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../containers/3x-ui.nix
|
||||
../software/beets
|
||||
./acme.nix
|
||||
./bentopdf.nix
|
||||
@@ -23,9 +25,9 @@
|
||||
./postgresql.nix
|
||||
./power.nix
|
||||
./samba.nix
|
||||
# ./step-ca.nix
|
||||
./syncthing.nix
|
||||
./systemd.nix
|
||||
./uptime-kuma.nix
|
||||
# ../containers/remnawave.nix
|
||||
# ./coturn.nix
|
||||
# ./mealie.nix
|
||||
@@ -33,13 +35,16 @@
|
||||
# ./n8n.nix
|
||||
# ./netdata.nix
|
||||
# ./nfs.nix
|
||||
# ./node-red.nix
|
||||
# ./open-webui.nix
|
||||
# ./rsync.nix
|
||||
# ./step-ca.nix
|
||||
# ./stirling-pdf.nix
|
||||
# ./transmission.nix
|
||||
# ./trilium.nix
|
||||
# ./uptime-kuma.nix
|
||||
# ./zerotier.nix
|
||||
];
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt 0755 root root -"
|
||||
"d ${xlib.dirs.services-mnt-folder} 0755 root root -"
|
||||
];
|
||||
}
|
||||
|
||||
+22
-20
@@ -5,8 +5,8 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
configDir = "${xlib.dirs.services-mnt-folder}/homebox";
|
||||
varDir = "/var/lib/homebox";
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/homebox";
|
||||
targetDir = "/var/lib/homebox";
|
||||
in
|
||||
{
|
||||
services.homebox = {
|
||||
@@ -14,31 +14,33 @@ in
|
||||
settings = {
|
||||
HBOX_WEB_HOST = "0.0.0.0";
|
||||
HBOX_WEB_PORT = "7745";
|
||||
HBOX_STORAGE_CONN_STRING = "file://${varDir}";
|
||||
HBOX_STORAGE_CONN_STRING = "file://${targetDir}";
|
||||
HBOX_STORAGE_PREFIX_PATH = "data";
|
||||
HBOX_DATABASE_DRIVER = "sqlite3";
|
||||
HBOX_DATABASE_SQLITE_PATH = "${varDir}/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1";
|
||||
HBOX_DATABASE_SQLITE_PATH = "${targetDir}/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1";
|
||||
HBOX_OPTIONS_ALLOW_REGISTRATION = "true";
|
||||
HBOX_OPTIONS_GITHUB_RELEASE_CHECK = "false";
|
||||
HBOX_MODE = "production";
|
||||
HOME = "${varDir}";
|
||||
TMPDIR = "${varDir}/tmp";
|
||||
HOME = "${targetDir}";
|
||||
TMPDIR = "${targetDir}/tmp";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${configDir} 0755 homebox homebox -"
|
||||
"z ${configDir} 0755 homebox homebox -"
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"${varDir}" = {
|
||||
device = "${configDir}";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0755 homebox homebox -"
|
||||
"z ${sourceDir} 0755 homebox homebox -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
CLEANUP_FREQUENCY = 48;
|
||||
LISTEN_ADDR = "0.0.0.0:6061";
|
||||
};
|
||||
# adminCredentialsFile = "${inputs.zeroq-credentials}/services/miniflux/admin-pass.txt";
|
||||
adminCredentialsFile = config.sops.secrets.minifluxenv.path;
|
||||
};
|
||||
|
||||
|
||||
+18
-14
@@ -7,31 +7,35 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
configDir = "${xlib.dirs.services-mnt-folder}/n8n";
|
||||
varDir = "/var/lib/n8n";
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/n8n";
|
||||
targetDir = "/var/lib/n8n";
|
||||
in
|
||||
{
|
||||
services.n8n = {
|
||||
enable = false;
|
||||
environment = {
|
||||
# N8N_USER_FOLDER = lib.mkForce "${configDir}";
|
||||
# N8N_USER_FOLDER = lib.mkForce "${sourceDir}";
|
||||
N8N_SECURE_COOKIE = "false";
|
||||
N8N_PORT = 5678;
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${configDir} 0755 nobody nogroup -"
|
||||
"z ${configDir} 0755 nobody nogroup -"
|
||||
];
|
||||
|
||||
fileSystems.${varDir} = {
|
||||
device = "${configDir}";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
"nofail"
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0755 nobody nogroup -"
|
||||
"z ${sourceDir} 0755 nobody nogroup -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pointDir = "/var/lib/services/navidrome-point";
|
||||
libraryDir = "${xlib.dirs.server-home}/Music";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
navidrome = {
|
||||
@@ -15,8 +19,19 @@
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = 4533;
|
||||
MusicFolder = "/mnt/beets/music";
|
||||
MusicFolder = "${pointDir}";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${libraryDir}";
|
||||
where = "${pointDir}";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
+34
-63
@@ -64,47 +64,29 @@ in
|
||||
client_max_body_size 5G;
|
||||
'';
|
||||
};
|
||||
# "pdf.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations = {
|
||||
# "/" = {
|
||||
# proxyPass = "http://127.0.0.1:8446";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# };
|
||||
# extraConfig = ''
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "homebox.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations = {
|
||||
# "/" = {
|
||||
# proxyPass = "http://127.0.0.1:7745";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# "nextcloud.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations = {
|
||||
# "/" = {
|
||||
# proxyPass = "http://127.0.0.1:10000";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# "/whiteboard" = {
|
||||
# proxyPass = "http://127.0.0.1:3002";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# };
|
||||
# extraConfig = ''
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "talk.home.arpa" = {
|
||||
"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;
|
||||
};
|
||||
};
|
||||
};
|
||||
# "talk.zeroq.su" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# # locations = {
|
||||
@@ -117,7 +99,7 @@ in
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "turn.home.arpa" = {
|
||||
# "turn.zeroq.su" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations = {
|
||||
@@ -130,7 +112,7 @@ in
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "ca.zeroq.su" = {
|
||||
# "ca.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
@@ -141,18 +123,7 @@ in
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "git.home.arpa" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://127.0.0.1:3000";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# extraConfig = ''
|
||||
# client_max_body_size 5G;
|
||||
# '';
|
||||
# };
|
||||
# "n8n.home.arpa" = {
|
||||
# "n8n.zeroq.su" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
@@ -317,14 +288,14 @@ in
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
"n8n.zeroq.su" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${server}:5678";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
# "n8n.zeroq.su" = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://${server}:5678";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# };
|
||||
# "office.zeroq.su" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
xlib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.node-red = {
|
||||
enable = false;
|
||||
port = 1880;
|
||||
openFirewall = true;
|
||||
userDir = "${xlib.dirs.services-mnt-folder}/node-red";
|
||||
configFile = "${inputs.zeroq-credentials}/configs/node-red/settings.js";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"z ${config.services.node-red.userDir} 0750 node-red node-red -"
|
||||
];
|
||||
}
|
||||
@@ -7,11 +7,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
previous = import inputs.nixpkgs-master {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
config.allowUnfreePredicate = true;
|
||||
};
|
||||
# previous = import inputs.nixpkgs-master {
|
||||
# system = "x86_64-linux";
|
||||
# config.allowUnfree = true;
|
||||
# config.allowUnfreePredicate = true;
|
||||
# };
|
||||
in
|
||||
{
|
||||
services.onlyoffice = {
|
||||
|
||||
@@ -6,27 +6,34 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/postgresql";
|
||||
targetDir = "/var/lib/postgresql";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_17;
|
||||
# dataDir = "${xlib.dirs.services-mnt-folder}/postgresql";
|
||||
};
|
||||
# postgresqlBackup.enable = true;
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/postgresql" = {
|
||||
device = "${xlib.dirs.services-mnt-folder}/postgresql";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
"nofail"
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0760 postgres postgres -"
|
||||
"z ${sourceDir} 0760 postgres postgres -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"z ${xlib.dirs.services-mnt-folder}/postgresql 0760 postgres postgres -"
|
||||
# "z ${config.services.postgresql.dataDir} 0760 postgres postgres -"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -13,10 +13,4 @@
|
||||
power-profiles-daemon.enable = lib.mkForce false;
|
||||
throttled.enable = false;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
cpupower-gui
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
+20
-14
@@ -5,6 +5,10 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/samba";
|
||||
targetDir = "/var/lib/samba";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
samba-wsdd = {
|
||||
@@ -65,19 +69,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${xlib.dirs.services-mnt-folder}/samba 0755 root root -"
|
||||
"z ${xlib.dirs.services-mnt-folder}/samba 0755 root root -"
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/var/lib/samba" = {
|
||||
device = "${xlib.dirs.services-mnt-folder}/samba";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0755 root root -"
|
||||
"z ${sourceDir} 0755 root root -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
+11
-11
@@ -6,8 +6,8 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
configDir = "${xlib.dirs.services-mnt-folder}/step-ca";
|
||||
varDir = "/var/lib/step-ca";
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/step-ca";
|
||||
targetDir = "/var/lib/step-ca";
|
||||
in
|
||||
{
|
||||
services.step-ca = {
|
||||
@@ -17,9 +17,9 @@ in
|
||||
openFirewall = true;
|
||||
intermediatePasswordFile = config.sops.secrets.intermediate-password.path;
|
||||
settings = {
|
||||
root = "${varDir}/certs/root_ca.crt";
|
||||
crt = "${varDir}/certs/intermediate_ca.crt";
|
||||
key = "${varDir}/secrets/intermediate_ca_key";
|
||||
root = "${targetDir}/certs/root_ca.crt";
|
||||
crt = "${targetDir}/certs/intermediate_ca.crt";
|
||||
key = "${targetDir}/secrets/intermediate_ca_key";
|
||||
# address = "0.0.0.0:9000";
|
||||
dnsNames = [
|
||||
"*.zeroq.su"
|
||||
@@ -28,7 +28,7 @@ in
|
||||
];
|
||||
db = {
|
||||
type = "badgerv2";
|
||||
dataSource = "${varDir}/db";
|
||||
dataSource = "${targetDir}/db";
|
||||
};
|
||||
authority = {
|
||||
claims = {
|
||||
@@ -69,8 +69,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."${varDir}" = {
|
||||
device = "${configDir}";
|
||||
fileSystems."${targetDir}" = {
|
||||
device = "${sourceDir}";
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
@@ -85,9 +85,9 @@ in
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${configDir} 0755 nobody nogroup -"
|
||||
"z ${configDir} 0755 nobody nogroup -"
|
||||
"Z ${configDir}/ 0700 nobody nogroup -"
|
||||
"d ${sourceDir} 0755 nobody nogroup -"
|
||||
"z ${sourceDir} 0755 nobody nogroup -"
|
||||
"Z ${sourceDir}/ 0700 nobody nogroup -"
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
# package = master.syncthing;
|
||||
systemService = true;
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
configDir = "${xlib.dirs.storage}/persist/Syncthing/${xlib.device.hostname}";
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/trilium";
|
||||
in
|
||||
{
|
||||
services.trilium-server = {
|
||||
enable = false;
|
||||
@@ -11,10 +14,10 @@
|
||||
hostName = "trilium";
|
||||
};
|
||||
host = "0.0.0.0";
|
||||
dataDir = "/mnt/services/trilium";
|
||||
dataDir = "${sourceDir}";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"z /mnt/services/trilium 0750 trilium trilium -"
|
||||
"z ${sourceDir} 0750 trilium trilium -"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
targetDir = "/var/lib/private/uptime-kuma";
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/uptime-kuma";
|
||||
in
|
||||
{
|
||||
services.uptime-kuma = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
settings = {
|
||||
PORT = "4001";
|
||||
HOST = "0.0.0.0";
|
||||
@@ -19,7 +23,7 @@
|
||||
"z ${xlib.dirs.services-mnt-folder}/uptime-kuma 0755 nobody nogroup -"
|
||||
];
|
||||
|
||||
fileSystems."/var/lib/private/uptime-kuma" = {
|
||||
fileSystems."${targetDir}" = {
|
||||
device = "${xlib.dirs.services-mnt-folder}/uptime-kuma";
|
||||
fsType = "none";
|
||||
options = [
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
];
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt 0755 root root -"
|
||||
"d /mnt/services 0755 root root -"
|
||||
"d /mnt/services/containers 0755 root root -"
|
||||
"d ${xlib.dirs.services-mnt-folder} 0755 root root -"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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