summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess2016-04-05 11:39:25 -0400
committerJoey Hess2016-04-05 11:39:25 -0400
commit0bfd770ff2d8074cdfd7d3fac0c6dd55c1c15219 (patch)
tree3b9d27f3a97f1224a47aa2887f000469b04c97c4 /doc
parentd451d5f8f8be24d8e16459c85ebf53c152761610 (diff)
parent7070899c187a3d2c6be538b8497428a23ae096f3 (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/newbie_trying_to_set_up_NFS_mount.mdwn19
-rw-r--r--doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment30
-rw-r--r--doc/todo/merge_request:___96__propellor_--init__96___should_sometimes_run___96__cabal_sandbox_init__96__.mdwn3
3 files changed, 52 insertions, 0 deletions
diff --git a/doc/forum/newbie_trying_to_set_up_NFS_mount.mdwn b/doc/forum/newbie_trying_to_set_up_NFS_mount.mdwn
new file mode 100644
index 00000000..9a2cc33e
--- /dev/null
+++ b/doc/forum/newbie_trying_to_set_up_NFS_mount.mdwn
@@ -0,0 +1,19 @@
+I am checking out propellor to determine if it can make it easier to maintain a few personal machines. With no prior knowledge of Haskell, that may be a futile attempt.
+
+I am trying to understand [the Propellor.Property.Mount documentation](http://hackage.haskell.org/package/propellor-2.17.2/docs/Propellor-Property-Mount.html) and particularly how I would need to write the equivalent of
+
+ mount -t nfs 192.168.1.100:/mnt/usb1 /mnt/nfs
+
+I tried putting
+
+ & Mount.mounted
+ "nfs" "192.168.1.100:/mnt/usb1" "/mnt/nfs" ["defaults"]
+
+in config.hs, but that results in
+
+ Couldn't match expected type ‘Mount.MountOpts’
+ with actual type ‘\[[Char]]’
+ In the fourth argument of ‘Mount.mounted’, namely ‘["defaults"]’
+ In the second argument of ‘(&)’, namely
+ ‘Mount.mounted
+ "nfs" "192.168.1.100:/mnt/usb1" "/mnt/nfs" ["defaults"]’
diff --git a/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment b/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment
new file mode 100644
index 00000000..0a4367d9
--- /dev/null
+++ b/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment
@@ -0,0 +1,30 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-04-05T14:53:53Z"
+ content="""
+The easy way to translate your command to a property is:
+
+ cmdProperty "mount" ["-t", "nfs", "192.168.1.100:/mnt/usb1", "/mnt/nfs"]
+ `assume` MadeChange
+
+This has the benefit of working with any command you might want,
+and the drawback of not preventing eg, re-mounting an already
+mounted device.
+
+`mounted` takes a `MountOpts` which is a specialized data type.
+You can construct one with eg, `(MountOpts ["defaults"])`.
+
+But, since `MountOpts` is a `Monoid`, and "defaults" is the default of an
+empty `MountOpts`, you can more simply use `mempty` to get the default one:
+
+ Mount.mounted "nfs" "192.168.1.100:/mnt/usb1" "/mnt/nfs" mempty
+
+Propellor.Property.Mount was mostly written for use by some other
+properties, and so doesn't really target the end user as much. And, I
+notice, its `mounted` property doesn't check if the device is already
+mounted and so will try to re-mount unnecessarily.
+
+I'm not sure if manually driving the mount command makes the most sense;
+wouldn't it be better to have a property that updates /etc/fstab?
+"""]]
diff --git a/doc/todo/merge_request:___96__propellor_--init__96___should_sometimes_run___96__cabal_sandbox_init__96__.mdwn b/doc/todo/merge_request:___96__propellor_--init__96___should_sometimes_run___96__cabal_sandbox_init__96__.mdwn
new file mode 100644
index 00000000..483af4a6
--- /dev/null
+++ b/doc/todo/merge_request:___96__propellor_--init__96___should_sometimes_run___96__cabal_sandbox_init__96__.mdwn
@@ -0,0 +1,3 @@
+Please consider merging branch `fix-init-build` of repository `https://git.spwhitton.name/propellor`.
+
+`propellor --init` can fail if the build system is cabal and the user has `require-sandbox: True` in `~/.cabal/config`. This patch fixes that.