feat(nixos): Mount BabeShare

This commit is contained in:
punkfairie 2025-01-06 20:22:41 -08:00
parent 8c5d0e2dbd
commit fefab6e9f4
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6
2 changed files with 42 additions and 0 deletions

View file

@ -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;
};
};
}

View file

@ -30,5 +30,9 @@ in {
environment.systemPackages = [pkgs.vim pkgs.git];
marleyos = {
mounts.babeshare = enabled;
};
system.stateVersion = "24.05";
}