attempting to add NAS drive connection as automount systemd service
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Fetch NAS credentials from 1Password
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment="DISPLAY=:0"
|
||||
Environment="WAYLAND_DISPLAY=wayland-0"
|
||||
Environment="OP_BIOMETRIC_UNLOCK_ENABLED=true"
|
||||
ExecStart=sudo -u sammieo -E /home/sammieo/.local/bin/fetch-nas-credentials.sh
|
||||
ExecStartPost=sudo -u sammieo /usr/bin/systemctl start nas-mounts.target
|
||||
RemainAfterExit=yes
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=1Password CLI SignIn
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment="DISPLAY=:0"
|
||||
Environment="WAYLAND_DISPLAY=wayland-0"
|
||||
Environment="OP_BIOMETRIC_UNLOCK_ENABLED=true"
|
||||
ExecStart=/bin/sh op signin
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Automount NAS Docker Share
|
||||
|
||||
[Automount]
|
||||
Where=/mnt/nas/docker
|
||||
TimeoutIdleSec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=nas-mounts.target
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=NAS SMB Mount (Docker)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Mount]
|
||||
What=//192.168.68.77/docker/
|
||||
Where=/mnt/nas/docker/
|
||||
Type=cifs
|
||||
Options=credentials=/home/sammieo/.nas/.smbcredentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755
|
||||
TimeoutSec=30
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Automount NAS Docker Share
|
||||
|
||||
[Automount]
|
||||
Where=/mnt/nas/media
|
||||
TimeoutIdleSec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=nas-mounts.target
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=NAS SMB Mount (Media)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Mount]
|
||||
What=//192.168.68.77/Partition_1/media/
|
||||
Where=/mnt/nas/media/
|
||||
Type=cifs
|
||||
Options=credentials=/home/sammieo/.nas/.smbcredentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755
|
||||
TimeoutSec=30
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=All NAS Network Mounts
|
||||
StopWhenUnneeded=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user