diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-04-20 16:18:12 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-04-20 16:18:12 -0400 |
| commit | 5d25e91ccd642a7522468e5a4b5c434d84a65917 (patch) | |
| tree | ebe52ed776407cab5f023648b9acee5cbc3d031e | |
| parent | 9f5579d2835c80c52b71fba1a97108590f547825 (diff) | |
| download | x-5d25e91ccd642a7522468e5a4b5c434d84a65917.tar.xz x-5d25e91ccd642a7522468e5a4b5c434d84a65917.zip | |
homelab automount
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | pkgs/home-automount-nas/mnt-itsuki.automount | 10 | ||||
| -rw-r--r-- | pkgs/home-automount-nas/mnt-itsuki.mount | 14 | ||||
| -rw-r--r-- | pkgs/home-automount-nas/var/.gitignore | 2 | ||||
| -rw-r--r-- | pkgs/home-automount-nas/yeetfile.js | 12 |
4 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/home-automount-nas/mnt-itsuki.automount b/pkgs/home-automount-nas/mnt-itsuki.automount new file mode 100644 index 0000000..09b496e --- /dev/null +++ b/pkgs/home-automount-nas/mnt-itsuki.automount @@ -0,0 +1,10 @@ +[Unit] +Requires=remote-fs-pre.target +After=remote-fs-pre.target + +[Automount] +Where=/mnt/itsuki +TimeoutIdleSec=0 + +[Install] +WantedBy=remote-fs.target
\ No newline at end of file diff --git a/pkgs/home-automount-nas/mnt-itsuki.mount b/pkgs/home-automount-nas/mnt-itsuki.mount new file mode 100644 index 0000000..2e4bc70 --- /dev/null +++ b/pkgs/home-automount-nas/mnt-itsuki.mount @@ -0,0 +1,14 @@ +[Unit] +Description=NAS SMB mount +Requires=network-online.target +After=network-online.target systemd-resolved.service +Wants=network-online.target systemd-resolved.service + +[Mount] +What=//192.168.2.241/data +Where=/mnt/itsuki +Type=cifs +Options=user=cadey,password=hunter2,rw,x-systemd.automount,uid=1000 + +[Install] +WantedBy=multi-user.target
\ No newline at end of file diff --git a/pkgs/home-automount-nas/var/.gitignore b/pkgs/home-automount-nas/var/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/pkgs/home-automount-nas/var/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore
\ No newline at end of file diff --git a/pkgs/home-automount-nas/yeetfile.js b/pkgs/home-automount-nas/yeetfile.js new file mode 100644 index 0000000..2b89868 --- /dev/null +++ b/pkgs/home-automount-nas/yeetfile.js @@ -0,0 +1,12 @@ +rpm.build({ + name: "home-automount-nas", + description: "Automount the NAS drive on boot", + homepage: "https://xeiaso.net", + license: "CC0", + goarch: "all", + + build: ({ systemd }) => { + file.install("./mnt-itsuki.automount", `${systemd}/mnt-itsuki.automount`); + file.install("./mnt-itsuki.mount", `${systemd}/mnt-itsuki.mount`); + }, +});
\ No newline at end of file |
