From 6f2f650892f542abf7727c24bef59481d0ddeafe Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sun, 27 Apr 2025 21:47:04 +0800 Subject: [PATCH] feat(filesystems): add helios data smb share over tailscale --- hosts/nemesis.nix | 1 + modules/nixos/default.nix | 1 + modules/nixos/filesystems.nix | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 modules/nixos/filesystems.nix diff --git a/hosts/nemesis.nix b/hosts/nemesis.nix index 3ec8932..a6bbc88 100644 --- a/hosts/nemesis.nix +++ b/hosts/nemesis.nix @@ -9,4 +9,5 @@ hardware-config.cpu = "amd"; hardware-config.gpu = "nvidia"; gaming.steam.enable = true; + fs-config.mountHeliosData = true; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 5021abd..136ca10 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -13,6 +13,7 @@ in ./hardware.nix ./nix-config.nix ./gaming.nix + ./filesystems.nix ]; options = { diff --git a/modules/nixos/filesystems.nix b/modules/nixos/filesystems.nix new file mode 100644 index 0000000..3ab96b1 --- /dev/null +++ b/modules/nixos/filesystems.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + ... +}: +let + moduleName = "fs-config"; + cfg = config."${moduleName}"; +in +{ + options = { + "${moduleName}" = { + mountHeliosData = lib.mkEnableOption "Mount helios SMB share to /media/helios/data."; + }; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.mountHeliosData { + fileSystems."/media/helios/data" = { + device = "//helios/data"; + fsType = "cifs"; + }; + }) + ]; +}