mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-10 20:20:41 +03:00
123
This commit is contained in:
@@ -40,16 +40,6 @@ let
|
||||
# { 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 = {
|
||||
# External drive
|
||||
"${config.xlib.dirs.server-home}" = {
|
||||
@@ -97,19 +87,6 @@ let
|
||||
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 = {
|
||||
enable = true;
|
||||
allowSFTP = true;
|
||||
@@ -125,32 +102,6 @@ let
|
||||
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 = {
|
||||
|
||||
@@ -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 = {
|
||||
earlyoom.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
|
||||
#./open-webui.nix
|
||||
../software/beets
|
||||
./calibre-web.nix
|
||||
./immich.nix
|
||||
./mealie.nix
|
||||
./miniflux.nix
|
||||
@@ -14,7 +15,9 @@
|
||||
./nginx.nix
|
||||
./samba.nix
|
||||
./stirling-pdf.nix
|
||||
./syncthing.nix
|
||||
./systemd.nix
|
||||
./transmission.nix
|
||||
./zerotier.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,52 +3,50 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
services = {
|
||||
samba = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
"invalid users" = [ ];
|
||||
"passwd program" = "/run/wrappers/bin/passwd %u";
|
||||
security = "user";
|
||||
};
|
||||
nixos = {
|
||||
"path" = "/etc/nixos";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
"create mask" = 755;
|
||||
"directory mask" = 755;
|
||||
"force user" = "${config.xlib.device.username}";
|
||||
"force group" = "users";
|
||||
};
|
||||
root = {
|
||||
"path" = "/";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
#"create mask" = 0644;
|
||||
#"directory mask" = 0644;
|
||||
"force user" = "root";
|
||||
"force group" = "root";
|
||||
};
|
||||
"${config.xlib.device.username}" = {
|
||||
"path" = "${config.xlib.dirs.server-home}";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
"create mask" = 700;
|
||||
"directory mask" = 700;
|
||||
"force user" = "${config.xlib.device.username}";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.samba = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
"invalid users" = [ ];
|
||||
"passwd program" = "/run/wrappers/bin/passwd %u";
|
||||
security = "user";
|
||||
};
|
||||
nixos = {
|
||||
"path" = "/etc/nixos";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
"create mask" = 755;
|
||||
"directory mask" = 755;
|
||||
"force user" = "${config.xlib.device.username}";
|
||||
"force group" = "users";
|
||||
};
|
||||
root = {
|
||||
"path" = "/";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
#"create mask" = 0644;
|
||||
#"directory mask" = 0644;
|
||||
"force user" = "root";
|
||||
"force group" = "root";
|
||||
};
|
||||
"${config.xlib.device.username}" = {
|
||||
"path" = "${config.xlib.dirs.server-home}";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"valid users" = "${config.xlib.device.username}";
|
||||
"guest ok" = "no";
|
||||
"writable" = "yes";
|
||||
"create mask" = 700;
|
||||
"directory mask" = 700;
|
||||
"force user" = "${config.xlib.device.username}";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,27 +1,10 @@
|
||||
{
|
||||
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 = {
|
||||
enable = true;
|
||||
#package = customPackage;
|
||||
environment = {
|
||||
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"
|
||||
"immich"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user