summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index e2acae33..e94aca00 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -1214,6 +1214,11 @@ cubieTruckOneWire =
-- My home networked attached storage server.
homeNAS :: Property DebianLike
homeNAS = propertyList "home NAS" $ props
+ & Apt.installed ["uhubctl"]
+ & "/etc/udev/rules.d/52-startech-hub.rules" `File.hasContent`
+ [ "# let users power control startech hub with uhubctl"
+ , "ATTR{idVendor}==\"0409\", ATTR{idProduct}==\"005a\", MODE=\"0666\""
+ ]
& autoMountDrive "archive-10" (USBHubPort 1) (Just "archive-older")
& autoMountDrive "archive-11" (USBHubPort 2) (Just "archive-old")
& autoMountDrive "archive-12" (USBHubPort 3) (Just "archive")
@@ -1227,9 +1232,8 @@ newtype USBHubPort = USBHubPort Int
--
-- The hub port is turned on and off automatically as needed, using
-- uhubctl.
-autoMountDrive :: Mount.Label -> USBHubPort -> Maybe FilePath -> Property DebianLike
+autoMountDrive :: Mount.Label -> USBHubPort -> Maybe FilePath -> Property Linux
autoMountDrive label (USBHubPort port) malias = propertyList desc $ props
- & Apt.installed ["uhubctl"]
& File.ownerGroup mountpoint (User "joey") (Group "joey")
& File.dirExists mountpoint
& case malias of