1
0
mirror of https://github.com/tboerger/nixos-config synced 2024-11-22 18:21:58 +01:00

fix: more fixes for various filesystems

This commit is contained in:
Thomas Boerger 2022-10-30 17:59:33 +01:00
parent ddfbf15a73
commit c5bd86e5d7
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
5 changed files with 65 additions and 61 deletions

13
TODO.md Normal file

@ -0,0 +1,13 @@
# Todo
## desktop
* clickup (package https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools)
* curseforge (package)
* mail (thunderbird / mailspring / prospect-mail)
* assign windows to right desktop
* autostart standard tools on desktops
## server
* coredns for private domain names

@ -44,13 +44,13 @@ in
group = "media";
settings = {
MainDir = "/var/lib/media/downloads";
DestDir = "/var/lib/media/downloads/completed";
InterDir = "/var/lib/media/downloads/intermediate";
NzbDir = "/var/lib/media/downloads/nzb";
QueueDir = "/var/lib/media/downloads/queue";
TempDir = "/var/lib/media/downloads/temp";
ScriptDir = "/var/lib/media/downloads/scripts";
MainDir = "/var/lib/downloads";
DestDir = "/var/lib/downloads/completed";
InterDir = "/var/lib/downloads/intermediate";
NzbDir = "/var/lib/downloads/nzb";
QueueDir = "/var/lib/downloads/queue";
TempDir = "/var/lib/downloads/temp";
ScriptDir = "/var/lib/downloads/scripts";
"Category1.Name" = "Movies";
"Category1.Unpack" = "yes";

@ -49,10 +49,27 @@ in
};
};
networking = {
firewall = {
allowedTCPPorts = [
5357
];
allowedUDPPorts = [
3702
];
};
};
services = {
samba-wsdd = {
enable = true;
};
samba = {
enable = true;
openFirewall = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
@ -60,6 +77,7 @@ in
netbios name = Server
guest account = nobody
map to guest = bad user
server min protocol = SMB2
'';
shares = {

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
let
cifsServer = "\\192.168.1.10";
cifsServer = "//192.168.1.10";
cifsOptions = [
"x-systemd.automount"
"noauto"
@ -8,8 +8,8 @@ let
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"credentials=${config.age.secrets."users/media/smbpasswd".path}"
"uid=${config.users.users.media.uid}"
"gid=${config.users.groups.media.gid}"
"uid=${toString config.users.users.media.uid}"
"gid=${toString config.users.groups.media.gid}"
];
in
@ -128,6 +128,15 @@ in
];
};
fileSystems."/var/lib/hass" = {
device = "/dev/disk/by-label/hass";
fsType = "ext4";
options = [
"noatime"
"discard"
];
};
fileSystems."/var/lib/downloads" = {
device = "/dev/disk/by-label/downloads";
fsType = "ext4";
@ -138,65 +147,29 @@ in
};
fileSystems."/var/lib/media/movies" = {
device = "/dev/disk/by-label/movies";
fsType = "ext4";
options = [
"noatime"
"discard"
];
device = "${cifsServer}/movies";
fsType = "cifs";
options = cifsOptions;
};
# fileSystems."/var/lib/media/movies" = {
# device = "${cifsServer}/movies";
# fsType = "cifs";
# options = cifsOptions;
# };
fileSystems."/var/lib/media/series" = {
device = "/dev/disk/by-label/series";
fsType = "ext4";
options = [
"noatime"
"discard"
];
fileSystems."/var/lib/media/shows" = {
device = "${cifsServer}/shows";
fsType = "cifs";
options = cifsOptions;
};
# fileSystems."/var/lib/media/shows" = {
# device = "${cifsServer}/shows";
# fsType = "cifs";
# options = cifsOptions;
# };
fileSystems."/var/lib/media/books" = {
device = "/dev/disk/by-label/books";
fsType = "ext4";
options = [
"noatime"
"discard"
];
device = "${cifsServer}/books";
fsType = "cifs";
options = cifsOptions;
};
# fileSystems."/var/lib/media/books" = {
# device = "${cifsServer}/books";
# fsType = "cifs";
# options = cifsOptions;
# };
fileSystems."/var/lib/media/music" = {
device = "/dev/disk/by-label/music";
fsType = "ext4";
options = [
"noatime"
"discard"
];
device = "${cifsServer}/music";
fsType = "cifs";
options = cifsOptions;
};
# fileSystems."/var/lib/media/music" = {
# device = "${cifsServer}/music";
# fsType = "cifs";
# options = cifsOptions;
# };
age.secrets."users/media/smbpasswd" = {
file = ../../secrets/users/media/smbpasswd.age;
};

@ -110,10 +110,10 @@ mkfs.ext4 -L downloads /dev/system/downloads
echo "-----> Mount downloads filesystem"
mkdir -p /mnt/var/lib/downloads
mount -t ext4 /dev/tank/downloads /mnt/var/lib/downloads
mount -t ext4 /dev/system/downloads /mnt/var/lib/downloads
chown 20000:20000 /mnt/var/lib/downloads
for PARTITION in acme nzbget jellyfin bazarr lidarr prowlarr radarr readarr sonarr; do
for PARTITION in acme nzbget jellyfin bazarr lidarr prowlarr radarr readarr sonarr hass; do
echo "-----> Create ${PARTITION} volume"
lvcreate -y --size 5G --name ${PARTITION} system