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
|
||||
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";
|
||||
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"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue