diff --git a/home/common/optional/desktop/common/default.nix b/home/common/optional/desktop/common/default.nix index f02ce34..1c0bbad 100644 --- a/home/common/optional/desktop/common/default.nix +++ b/home/common/optional/desktop/common/default.nix @@ -26,7 +26,6 @@ pkgs.hunspellDicts.en_US pkgs.set_wm_class pkgs.xorg.xkill - pkgs.krita pkgs.R pkgs.gimp pkgs.gajim diff --git a/hosts/citadel/default.nix b/hosts/citadel/default.nix index f59ac7d..6f3d799 100644 --- a/hosts/citadel/default.nix +++ b/hosts/citadel/default.nix @@ -48,9 +48,11 @@ in { ../common/optional/pipewire.nix ../common/optional/openssh.nix ../common/optional/dwm.nix - ../common/optional/nfs-mounts/media.nix - ../common/optional/nfs-mounts/homeshare.nix - ../common/optional/nfs-mounts/photos.nix + + # ../common/optional/fileserver/media.nix + # ../common/optional/fileserver/homeshare.nix + # ../common/optional/fileserver/photos.nix + ../common/optional/printing.nix ../common/optional/backlight.nix ../common/optional/xmodmap-arrow-remaps.nix diff --git a/hosts/common/optional/fileserver/bind-mounts/media.nix b/hosts/common/optional/fileserver/bind-mounts/media.nix new file mode 100644 index 0000000..39be6e6 --- /dev/null +++ b/hosts/common/optional/fileserver/bind-mounts/media.nix @@ -0,0 +1,13 @@ +{configVars, ...}: let + homeshareDataLocation = configVars.locations.homeshareDataLocation; +in +{ + fileSystems."/media/media" = { + device = "${homeshareDataLocation}/media"; + fsType = "none"; + options = [ "bind" ]; + }; +} + + + diff --git a/hosts/common/optional/fileserver/bind-mounts/personal.nix b/hosts/common/optional/fileserver/bind-mounts/personal.nix new file mode 100644 index 0000000..7222550 --- /dev/null +++ b/hosts/common/optional/fileserver/bind-mounts/personal.nix @@ -0,0 +1,13 @@ +{configVars, ...}: let + homeshareDataLocation = configVars.locations.homeshareDataLocation; +in +{ + fileSystems."/media/personal" = { + device = "${homeshareDataLocation}/personal"; + fsType = "none"; + options = [ "bind" ]; + }; +} + + + diff --git a/hosts/common/optional/fileserver/bind-mounts/photos.nix b/hosts/common/optional/fileserver/bind-mounts/photos.nix new file mode 100644 index 0000000..932e54a --- /dev/null +++ b/hosts/common/optional/fileserver/bind-mounts/photos.nix @@ -0,0 +1,13 @@ +{configVars, ...}: let + homeshareDataLocation = configVars.locations.homeshareDataLocation; +in +{ + fileSystems."/media/photos" = { + device = "${homeshareDataLocation}/photos"; + fsType = "none"; + options = [ "bind" ]; + }; +} + + + diff --git a/hosts/common/optional/nfs-mounts/homeshare.nix b/hosts/common/optional/fileserver/nfs-client/homeshare.nix similarity index 100% rename from hosts/common/optional/nfs-mounts/homeshare.nix rename to hosts/common/optional/fileserver/nfs-client/homeshare.nix diff --git a/hosts/common/optional/nfs-mounts/media.nix b/hosts/common/optional/fileserver/nfs-client/media.nix similarity index 100% rename from hosts/common/optional/nfs-mounts/media.nix rename to hosts/common/optional/fileserver/nfs-client/media.nix diff --git a/hosts/common/optional/nfs-mounts/photos.nix b/hosts/common/optional/fileserver/nfs-client/photos.nix similarity index 100% rename from hosts/common/optional/nfs-mounts/photos.nix rename to hosts/common/optional/fileserver/nfs-client/photos.nix diff --git a/hosts/common/optional/fileserver/nfs-server/homeshare.nix b/hosts/common/optional/fileserver/nfs-server/homeshare.nix new file mode 100644 index 0000000..902fe04 --- /dev/null +++ b/hosts/common/optional/fileserver/nfs-server/homeshare.nix @@ -0,0 +1,9 @@ +{ + fileSystems."/media/homeshare" = { + device = "10.0.10.30:/mnt/homeshare"; + fsType = "nfs"; + options = [ "noatime" "_netdev" ]; + }; +} + + diff --git a/hosts/common/optional/fileserver/nfs-server/media.nix b/hosts/common/optional/fileserver/nfs-server/media.nix new file mode 100644 index 0000000..7375f95 --- /dev/null +++ b/hosts/common/optional/fileserver/nfs-server/media.nix @@ -0,0 +1,9 @@ +{configVars, ...}: let + mediaDataMountPoint = configVars.locations.mediaDataMountPoint; +in { + fileSystems.${mediaDataMountPoint} = { + device = "10.0.10.30:/mnt/media"; + fsType = "nfs"; + options = ["noatime" "_netdev"]; + }; +} diff --git a/hosts/common/optional/fileserver/nfs-server/photos.nix b/hosts/common/optional/fileserver/nfs-server/photos.nix new file mode 100644 index 0000000..13cad9f --- /dev/null +++ b/hosts/common/optional/fileserver/nfs-server/photos.nix @@ -0,0 +1,9 @@ +{configVars, ...}: let + photosDataMountPoint = configVars.locations.photosDataMountPoint; +in { + fileSystems.${photosDataMountPoint} = { + device = "10.0.10.30:/mnt/photos"; + fsType = "nfs"; + options = ["noatime" "_netdev" "ro"]; + }; +} diff --git a/hosts/common/optional/nixos-containers/pihole.nix b/hosts/common/optional/nixos-containers/pihole.nix index 457ede4..6d9fcc2 100644 --- a/hosts/common/optional/nixos-containers/pihole.nix +++ b/hosts/common/optional/nixos-containers/pihole.nix @@ -78,7 +78,7 @@ in { useHostResolvConf = lib.mkForce false; }; - services.resolved.enable = true; + services.resolved.enable = false; imports = [ arion.nixosModules.arion @@ -89,6 +89,7 @@ in { pkgs.vim pkgs.git pkgs.arion + pkgs.lsof ]; virtualisation = { diff --git a/hosts/semita/default.nix b/hosts/semita/default.nix index dbf696e..4e434e9 100644 --- a/hosts/semita/default.nix +++ b/hosts/semita/default.nix @@ -54,10 +54,10 @@ in { ../common/optional/gaming.nix ../common/optional/restic-backup.nix - # nfs mounts - ../common/optional/nfs-mounts/media.nix - ../common/optional/nfs-mounts/homeshare.nix - ../common/optional/nfs-mounts/photos.nix + # bind mounts + ../common/optional/fileserver/bind-mounts/media.nix + ../common/optional/fileserver/bind-mounts/personal.nix + ../common/optional/fileserver/bind-mounts/photos.nix # nixos-containers ../common/optional/nixos-containers/nix-bitcoin.nix @@ -66,7 +66,7 @@ in { ../common/optional/nixos-containers/semitamaps-worker.nix ../common/optional/nixos-containers/backup-server.nix ../common/optional/nixos-containers/docker.nix - # ../common/optional/nixos-containers/pihole.nix + ../common/optional/nixos-containers/pihole.nix ../common/optional/nixos-containers/metrics-server.nix # # Build nix derivations on remote machine diff --git a/hosts/sparky/default.nix b/hosts/sparky/default.nix index cd84569..5c76883 100644 --- a/hosts/sparky/default.nix +++ b/hosts/sparky/default.nix @@ -44,7 +44,7 @@ in { # Import optional options ../common/optional/openssh.nix ../common/optional/persistence.nix - ../common/optional/nfs-mounts/media.nix + # ../common/optional/fileserver/media.nix ../common/optional/gaming.nix ../common/optional/printing.nix outputs.nixosModules.nixosAutoUpgrade diff --git a/vars/default.nix b/vars/default.nix index 70892b7..9563d7e 100644 --- a/vars/default.nix +++ b/vars/default.nix @@ -7,6 +7,8 @@ locations = { mediaDataMountPoint = "/media/media"; photosDataMountPoint = "/media/photos"; + personalDataMountPoint = "/media/personal"; + homeshareDataLocation = "/mnt/main-ssd/homeshare"; metricsServerContainerData = "/mnt/main-ssd/metrics-server"; dockerContainerData = "/mnt/main-ssd/docker";