feat(nixos): Use systemd instead of fileSystems for babeshare

This commit is contained in:
punkfairie 2025-01-10 17:30:04 -08:00
parent 8449c50d68
commit c7b4149047
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6

View file

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