mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-15 22:41:52 +03:00
123
This commit is contained in:
@@ -40,16 +40,6 @@ let
|
|||||||
# { device = "/dev/disk/by-partlabel/disk-main-swap"; }
|
# { device = "/dev/disk/by-partlabel/disk-main-swap"; }
|
||||||
# ];
|
# ];
|
||||||
|
|
||||||
users = {
|
|
||||||
users = {
|
|
||||||
"${config.xlib.device.username}" = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P root@sapphira"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
# External drive
|
# External drive
|
||||||
"${config.xlib.dirs.server-home}" = {
|
"${config.xlib.dirs.server-home}" = {
|
||||||
@@ -97,19 +87,6 @@ let
|
|||||||
SystemMaxUse=512M
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
calibre-web = {
|
|
||||||
enable = true;
|
|
||||||
group = "users";
|
|
||||||
user = "${config.xlib.device.username}";
|
|
||||||
options = {
|
|
||||||
calibreLibrary = "${config.xlib.dirs.calibre-library}";
|
|
||||||
enableBookUploading = true;
|
|
||||||
enableKepubify = false;
|
|
||||||
};
|
|
||||||
listen.ip = "0.0.0.0";
|
|
||||||
listen.port = 8083;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowSFTP = true;
|
allowSFTP = true;
|
||||||
@@ -125,32 +102,6 @@ let
|
|||||||
UsePAM = true;
|
UsePAM = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
transmission = {
|
|
||||||
enable = false;
|
|
||||||
credentialsFile = "${config.xlib.dirs.server-home}/server/transmission/settings.json";
|
|
||||||
openRPCPort = true;
|
|
||||||
package = pkgs.transmission_4;
|
|
||||||
user = "${config.xlib.device.username}";
|
|
||||||
group = "users";
|
|
||||||
settings = {
|
|
||||||
download-dir = "${config.xlib.dirs.server-home}/Downloads";
|
|
||||||
incomplete-dir = "${config.xlib.dirs.server-home}/Downloads/Temp";
|
|
||||||
incomplete-dir-enabled = true;
|
|
||||||
rpc-bind-address = "0.0.0.0";
|
|
||||||
rpc-port = 9091;
|
|
||||||
rpc-whitelist-enabled = false;
|
|
||||||
umask = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
syncthing = {
|
|
||||||
enable = true;
|
|
||||||
systemService = true;
|
|
||||||
guiAddress = "0.0.0.0:8384";
|
|
||||||
configDir = "${config.xlib.dirs.storage}/Syncthing/${config.xlib.device.hostname}";
|
|
||||||
dataDir = "${config.xlib.dirs.server-home}";
|
|
||||||
group = "users";
|
|
||||||
user = "${config.xlib.device.username}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
@@ -46,21 +46,6 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
|
||||||
users = {
|
|
||||||
root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"${config.xlib.device.username}" = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
earlyoom.enable = true;
|
earlyoom.enable = true;
|
||||||
preload.enable = true;
|
preload.enable = true;
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.calibre-web = {
|
||||||
|
enable = true;
|
||||||
|
group = "users";
|
||||||
|
user = "${config.xlib.device.username}";
|
||||||
|
options = {
|
||||||
|
calibreLibrary = "${config.xlib.dirs.calibre-library}";
|
||||||
|
enableBookUploading = true;
|
||||||
|
enableKepubify = false;
|
||||||
|
};
|
||||||
|
listen.ip = "0.0.0.0";
|
||||||
|
listen.port = 8083;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
#./cloudflared.nix
|
#./cloudflared.nix
|
||||||
#./open-webui.nix
|
#./open-webui.nix
|
||||||
../software/beets
|
../software/beets
|
||||||
|
./calibre-web.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
./mealie.nix
|
./mealie.nix
|
||||||
./miniflux.nix
|
./miniflux.nix
|
||||||
@@ -14,7 +15,9 @@
|
|||||||
./nginx.nix
|
./nginx.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./stirling-pdf.nix
|
./stirling-pdf.nix
|
||||||
|
./syncthing.nix
|
||||||
./systemd.nix
|
./systemd.nix
|
||||||
|
./transmission.nix
|
||||||
./zerotier.nix
|
./zerotier.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services = {
|
services.samba = {
|
||||||
samba = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
@@ -50,5 +49,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,10 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# let
|
|
||||||
# customPackage = pkgs.stirling-pdf.overrideAttrs (oldAttrs: {
|
|
||||||
# src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "Stirling-Tools";
|
|
||||||
# repo = "Stirling-PDF";
|
|
||||||
# rev = "v1.1.1";
|
|
||||||
# sha256 = "0sphh65fdccnajdby9idy5w4zhcnxzzppv2d7zdz203d0lqs6hky";
|
|
||||||
# };
|
|
||||||
# version = "1.1.1";
|
|
||||||
# });
|
|
||||||
# in
|
|
||||||
|
|
||||||
# lib.mkIf (config.xlib.device.type == "server")
|
|
||||||
|
|
||||||
{
|
{
|
||||||
services.stirling-pdf = {
|
services.stirling-pdf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#package = customPackage;
|
|
||||||
environment = {
|
environment = {
|
||||||
SERVER_PORT = 6060;
|
SERVER_PORT = 6060;
|
||||||
};
|
};
|
||||||
|
|||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
systemService = true;
|
||||||
|
guiAddress = "0.0.0.0:8384";
|
||||||
|
configDir = "${config.xlib.dirs.storage}/Syncthing/${config.xlib.device.hostname}";
|
||||||
|
dataDir = "${config.xlib.dirs.server-home}";
|
||||||
|
group = "users";
|
||||||
|
user = "${config.xlib.device.username}";
|
||||||
|
};
|
||||||
|
}
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.transmission = {
|
||||||
|
enable = false;
|
||||||
|
#credentialsFile = "${config.xlib.dirs.server-home}/server/transmission/settings.json";
|
||||||
|
openRPCPort = true;
|
||||||
|
package = pkgs.transmission_4;
|
||||||
|
user = "${config.xlib.device.username}";
|
||||||
|
group = "users";
|
||||||
|
settings = {
|
||||||
|
download-dir = "${config.xlib.dirs.server-home}/Downloads";
|
||||||
|
incomplete-dir = "${config.xlib.dirs.server-home}/Downloads/Temp";
|
||||||
|
incomplete-dir-enabled = true;
|
||||||
|
rpc-bind-address = "0.0.0.0";
|
||||||
|
rpc-port = 9091;
|
||||||
|
rpc-whitelist-enabled = false;
|
||||||
|
umask = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -24,6 +24,9 @@
|
|||||||
"wheel"
|
"wheel"
|
||||||
"immich"
|
"immich"
|
||||||
];
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user