diff --git a/modules/nixos/mounts/babeshare/default.nix b/modules/nixos/mounts/babeshare/default.nix index 2aa4d12..80ea9f6 100644 --- a/modules/nixos/mounts/babeshare/default.nix +++ b/modules/nixos/mounts/babeshare/default.nix @@ -13,7 +13,7 @@ then user.uid else 1000; - options = [ + options = lib.concatStringsSep "," [ "username=marley" "password=granola chaos lend splendid" "uid=${toString uid}" @@ -24,16 +24,35 @@ in { options.marleyos.mounts.babeshare.enable = mkEnableOption "babeshare"; config = mkIf cfg.enable { - fileSystems."/mnt/babeshare/babez" = { - device = "//truenas.blackcat.vip/babez"; - fsType = "cifs"; - inherit options; + boot.supportedFilesystems = { + cifs = true; }; - fileSystems."/mnt/babeshare/marley" = { - device = "//truenas.blackcat.vip/marley"; - fsType = "cifs"; - inherit options; + systemd = { + mounts = [ + { + what = "//truenas.blackcat.vip/babez"; + where = "/mnt/babeshare/babez"; + type = "cifs"; + inherit options; + } + { + what = "//truenas.blackcat.vip/marley"; + where = "/mnt/babeshare/marley"; + type = "cifs"; + inherit options; + } + ]; + automounts = [ + { + where = "/mnt/babeshare/babez"; + wantedBy = ["multi-user.target"]; + } + { + where = "/mnt/babeshare/marley"; + wantedBy = ["multi-user.target"]; + } + ]; }; }; }