diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..4ab1d17 --- /dev/null +++ b/TODO.md @@ -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 diff --git a/machines/services/media.nix b/machines/services/media.nix index 11a0712..8e55b5d 100644 --- a/machines/services/media.nix +++ b/machines/services/media.nix @@ -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"; diff --git a/machines/services/samba.nix b/machines/services/samba.nix index 33a07ca..c13c2b5 100644 --- a/machines/services/samba.nix +++ b/machines/services/samba.nix @@ -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 = { diff --git a/machines/utgard/filesystems.nix b/machines/utgard/filesystems.nix index 196f6e6..2ba9898 100644 --- a/machines/utgard/filesystems.nix +++ b/machines/utgard/filesystems.nix @@ -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; }; diff --git a/scripts/utgard-partitions b/scripts/utgard-partitions index ae46800..1fd6a20 100755 --- a/scripts/utgard-partitions +++ b/scripts/utgard-partitions @@ -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