NOflake/extras/uwuraid.nix

38 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-11 00:38:39 -07:00
{ ... }: {
services.rpcbind.enable = true;
2023-09-28 23:33:56 -07:00
systemd.mounts =
let
opts = {
type = "cifs";
mountConfig = { Options = "credentials=/etc/nixos/smb-secrets,noatime,uid=1000,gid=100"; };
};
in
2023-07-11 00:38:39 -07:00
[
2023-09-28 23:33:56 -07:00
(opts // { what = "//100.86.160.104/anime"; where = "/mnt/uwuraid/anime"; })
(opts // { what = "//100.86.160.104/backup"; where = "/mnt/uwuraid/backup"; })
(opts // { what = "//100.86.160.104/everything"; where = "/mnt/uwuraid/everything"; })
(opts // { what = "//100.86.160.104/movies"; where = "/mnt/uwuraid/movies"; })
(opts // { what = "//100.86.160.104/music"; where = "/mnt/uwuraid/music"; })
(opts // { what = "//100.86.160.104/photos"; where = "/mnt/uwuraid/photos"; })
(opts // { what = "//100.86.160.104/syncthing"; where = "/mnt/uwuraid/syncthing"; })
(opts // { what = "//100.86.160.104/television"; where = "/mnt/uwuraid/television"; })
2023-07-11 00:38:39 -07:00
];
2023-09-28 23:33:56 -07:00
systemd.automounts =
let
opts = {
wantedBy = [ "multi-user.target" ];
automountConfig = { TimeoutIdleSec = "60"; };
};
in
2023-07-11 00:38:39 -07:00
[
2023-09-28 23:33:56 -07:00
(opts // { where = "/mnt/uwuraid/anime"; })
(opts // { where = "/mnt/uwuraid/backup"; })
(opts // { where = "/mnt/uwuraid/everything"; })
(opts // { where = "/mnt/uwuraid/movies"; })
(opts // { where = "/mnt/uwuraid/music"; })
(opts // { where = "/mnt/uwuraid/photos"; })
(opts // { where = "/mnt/uwuraid/syncthing"; })
(opts // { where = "/mnt/uwuraid/television"; })
2023-07-11 00:38:39 -07:00
];
}