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