feat(nixos): Use systemd instead of fileSystems for babeshare
This commit is contained in:
parent
8449c50d68
commit
c7b4149047
1 changed files with 28 additions and 9 deletions
|
@ -13,7 +13,7 @@
|
||||||
then user.uid
|
then user.uid
|
||||||
else 1000;
|
else 1000;
|
||||||
|
|
||||||
options = [
|
options = lib.concatStringsSep "," [
|
||||||
"username=marley"
|
"username=marley"
|
||||||
"password=granola chaos lend splendid"
|
"password=granola chaos lend splendid"
|
||||||
"uid=${toString uid}"
|
"uid=${toString uid}"
|
||||||
|
@ -24,16 +24,35 @@ in {
|
||||||
options.marleyos.mounts.babeshare.enable = mkEnableOption "babeshare";
|
options.marleyos.mounts.babeshare.enable = mkEnableOption "babeshare";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
fileSystems."/mnt/babeshare/babez" = {
|
boot.supportedFilesystems = {
|
||||||
device = "//truenas.blackcat.vip/babez";
|
cifs = true;
|
||||||
fsType = "cifs";
|
|
||||||
inherit options;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/babeshare/marley" = {
|
systemd = {
|
||||||
device = "//truenas.blackcat.vip/marley";
|
mounts = [
|
||||||
fsType = "cifs";
|
{
|
||||||
|
what = "//truenas.blackcat.vip/babez";
|
||||||
|
where = "/mnt/babeshare/babez";
|
||||||
|
type = "cifs";
|
||||||
inherit options;
|
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"];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue