diff --git a/modules/nixos/mounts/babeshare/default.nix b/modules/nixos/mounts/babeshare/default.nix new file mode 100644 index 0000000..c667695 --- /dev/null +++ b/modules/nixos/mounts/babeshare/default.nix @@ -0,0 +1,38 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + + cfg = config.marleyos.mounts.babeshare; + + user = config.users.users."${config.marleyos.my.name}"; + uid = + if user.uid != null + then user.uid + else 1000; + + options = [ + "username=marley" + "password=granola chaos lend splendid" + "uid=${toString uid}" + "gid=${toString config.users.groups."wheel".gid}" + ]; +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; + }; + + fileSystems."/mnt/babeshare/marley" = { + device = "//truenas.blackcat.vip/marley"; + fsType = "cifs"; + inherit options; + }; + }; +} diff --git a/systems/x86_64-linux/nyx/default.nix b/systems/x86_64-linux/nyx/default.nix index 02609d9..aa50c35 100644 --- a/systems/x86_64-linux/nyx/default.nix +++ b/systems/x86_64-linux/nyx/default.nix @@ -30,5 +30,9 @@ in { environment.systemPackages = [pkgs.vim pkgs.git]; + marleyos = { + mounts.babeshare = enabled; + }; + system.stateVersion = "24.05"; }