started refactoring

This commit is contained in:
kity 2024-12-23 14:39:18 +01:00
parent 729050b005
commit f61d2eedef
36 changed files with 12 additions and 10 deletions

View file

@ -9,8 +9,8 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./server-configuration.nix ./server-configuration.nix
../../features/server/default.nix ./features/server/default.nix
../../features/shared/ssh.nix ./features/shared/ssh.nix
]; ];
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.

View file

@ -79,7 +79,6 @@
]; ];
postgresql_databases = [ postgresql_databases = [
{ name = "nextcloud"; } { name = "nextcloud"; }
{ name = "matrix-synapse"; }
]; ];
exclude_patterns = [ "/home/*/.cache" ]; exclude_patterns = [ "/home/*/.cache" ];
encryption_passcommand = "${pkgs.coreutils}/bin/cat /run/secrets/borgRemoteServerPassword"; encryption_passcommand = "${pkgs.coreutils}/bin/cat /run/secrets/borgRemoteServerPassword";

View file

@ -1,6 +1,4 @@
{ config, lib, ... }: { config, lib, ... }:
with lib;
# TODO: add access to series and TV folders.
let let
cfg = config.samba; cfg = config.samba;
in in
@ -31,20 +29,20 @@ in
browseable = "yes"; browseable = "yes";
"read only" = "no"; "read only" = "no";
"create mask" = "0644"; "create mask" = "0644";
"directory mask" = "0755"; "directory mask" = "0655";
}; };
ebooks = { ebooks = {
path = "${cfg.dir}/Ebooks"; path = "${cfg.dir}/Ebooks";
browseable = "yes"; browseable = "yes";
"read only" = "no"; "read only" = "no";
"create mask" = "0644"; "create mask" = "0644";
"directory mask" = "0755"; "directory mask" = "0655";
}; };
movies = { movies = {
path = "${cfg.dir}/Films"; path = "${cfg.dir}/Films";
browseable = "yes"; browseable = "yes";
"create mask" = "0644"; "create mask" = "0644";
"directory mask" = "0755"; "directory mask" = "0655";
"read only" = "no"; "read only" = "no";
}; };
shows = { shows = {
@ -54,6 +52,12 @@ in
"directory mask" = "0755"; "directory mask" = "0755";
browseable = "yes"; browseable = "yes";
}; };
torrents = {
path = "${cfg.dir}/Torrents";
"read only" = "yes";
"create mask" = "644";
browseable = "yes";
};
}; };
}; };
}; };

View file

@ -38,8 +38,7 @@ in
allowedTCPPorts = [ allowedTCPPorts = [
22 # ssh 22 # ssh
80 # http 80 # http
8008 # matrix-synapse 443 # ssh
8448 # matrix-synapse
]; ];
allowedUDPPorts = [ ]; allowedUDPPorts = [ ];
}; };