mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-23 03:32:08 +01:00
fix: more fixes for various filesystems
This commit is contained in:
parent
ddfbf15a73
commit
c5bd86e5d7
13
TODO.md
Normal file
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";
|
group = "media";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
MainDir = "/var/lib/media/downloads";
|
MainDir = "/var/lib/downloads";
|
||||||
DestDir = "/var/lib/media/downloads/completed";
|
DestDir = "/var/lib/downloads/completed";
|
||||||
InterDir = "/var/lib/media/downloads/intermediate";
|
InterDir = "/var/lib/downloads/intermediate";
|
||||||
NzbDir = "/var/lib/media/downloads/nzb";
|
NzbDir = "/var/lib/downloads/nzb";
|
||||||
QueueDir = "/var/lib/media/downloads/queue";
|
QueueDir = "/var/lib/downloads/queue";
|
||||||
TempDir = "/var/lib/media/downloads/temp";
|
TempDir = "/var/lib/downloads/temp";
|
||||||
ScriptDir = "/var/lib/media/downloads/scripts";
|
ScriptDir = "/var/lib/downloads/scripts";
|
||||||
|
|
||||||
"Category1.Name" = "Movies";
|
"Category1.Name" = "Movies";
|
||||||
"Category1.Unpack" = "yes";
|
"Category1.Unpack" = "yes";
|
||||||
|
@ -49,10 +49,27 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
5357
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedUDPPorts = [
|
||||||
|
3702
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
samba = {
|
samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
securityType = "user";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
@ -60,6 +77,7 @@ in
|
|||||||
netbios name = Server
|
netbios name = Server
|
||||||
guest account = nobody
|
guest account = nobody
|
||||||
map to guest = bad user
|
map to guest = bad user
|
||||||
|
server min protocol = SMB2
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shares = {
|
shares = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cifsServer = "\\192.168.1.10";
|
cifsServer = "//192.168.1.10";
|
||||||
cifsOptions = [
|
cifsOptions = [
|
||||||
"x-systemd.automount"
|
"x-systemd.automount"
|
||||||
"noauto"
|
"noauto"
|
||||||
@ -8,8 +8,8 @@ let
|
|||||||
"x-systemd.device-timeout=5s"
|
"x-systemd.device-timeout=5s"
|
||||||
"x-systemd.mount-timeout=5s"
|
"x-systemd.mount-timeout=5s"
|
||||||
"credentials=${config.age.secrets."users/media/smbpasswd".path}"
|
"credentials=${config.age.secrets."users/media/smbpasswd".path}"
|
||||||
"uid=${config.users.users.media.uid}"
|
"uid=${toString config.users.users.media.uid}"
|
||||||
"gid=${config.users.groups.media.gid}"
|
"gid=${toString config.users.groups.media.gid}"
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
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" = {
|
fileSystems."/var/lib/downloads" = {
|
||||||
device = "/dev/disk/by-label/downloads";
|
device = "/dev/disk/by-label/downloads";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
@ -138,65 +147,29 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/lib/media/movies" = {
|
fileSystems."/var/lib/media/movies" = {
|
||||||
device = "/dev/disk/by-label/movies";
|
device = "${cifsServer}/movies";
|
||||||
fsType = "ext4";
|
fsType = "cifs";
|
||||||
options = [
|
options = cifsOptions;
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/var/lib/media/movies" = {
|
fileSystems."/var/lib/media/shows" = {
|
||||||
# device = "${cifsServer}/movies";
|
device = "${cifsServer}/shows";
|
||||||
# fsType = "cifs";
|
fsType = "cifs";
|
||||||
# options = cifsOptions;
|
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/books" = {
|
fileSystems."/var/lib/media/books" = {
|
||||||
device = "/dev/disk/by-label/books";
|
device = "${cifsServer}/books";
|
||||||
fsType = "ext4";
|
fsType = "cifs";
|
||||||
options = [
|
options = cifsOptions;
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/var/lib/media/books" = {
|
|
||||||
# device = "${cifsServer}/books";
|
|
||||||
# fsType = "cifs";
|
|
||||||
# options = cifsOptions;
|
|
||||||
# };
|
|
||||||
|
|
||||||
fileSystems."/var/lib/media/music" = {
|
fileSystems."/var/lib/media/music" = {
|
||||||
device = "/dev/disk/by-label/music";
|
device = "${cifsServer}/music";
|
||||||
fsType = "ext4";
|
fsType = "cifs";
|
||||||
options = [
|
options = cifsOptions;
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/var/lib/media/music" = {
|
|
||||||
# device = "${cifsServer}/music";
|
|
||||||
# fsType = "cifs";
|
|
||||||
# options = cifsOptions;
|
|
||||||
# };
|
|
||||||
|
|
||||||
age.secrets."users/media/smbpasswd" = {
|
age.secrets."users/media/smbpasswd" = {
|
||||||
file = ../../secrets/users/media/smbpasswd.age;
|
file = ../../secrets/users/media/smbpasswd.age;
|
||||||
};
|
};
|
||||||
|
@ -110,10 +110,10 @@ mkfs.ext4 -L downloads /dev/system/downloads
|
|||||||
|
|
||||||
echo "-----> Mount downloads filesystem"
|
echo "-----> Mount downloads filesystem"
|
||||||
mkdir -p /mnt/var/lib/downloads
|
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
|
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"
|
echo "-----> Create ${PARTITION} volume"
|
||||||
lvcreate -y --size 5G --name ${PARTITION} system
|
lvcreate -y --size 5G --name ${PARTITION} system
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user