summaryrefslogtreecommitdiff
path: root/src/Propellor/Types
diff options
context:
space:
mode:
authorJoey Hess2017-02-26 16:24:04 -0400
committerJoey Hess2017-02-26 16:24:04 -0400
commit01b313e06b3010ebe1a9385b7779dc49a7ebf74c (patch)
tree7f263f36599f4c0dd7aad7f0bae146c8f936d51a /src/Propellor/Types
parent16f42138605ebd7466c29a582d91fbd0c1df5c70 (diff)
ConfigurableValue instances for User, Group
Diffstat (limited to 'src/Propellor/Types')
-rw-r--r--src/Propellor/Types/OS.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Propellor/Types/OS.hs b/src/Propellor/Types/OS.hs
index 8d7f1ba3..41f839f1 100644
--- a/src/Propellor/Types/OS.hs
+++ b/src/Propellor/Types/OS.hs
@@ -142,9 +142,15 @@ type UserName = String
newtype User = User UserName
deriving (Eq, Ord, Show)
+instance ConfigurableValue User where
+ val (User n) = n
+
newtype Group = Group String
deriving (Eq, Ord, Show)
+instance ConfigurableValue Group where
+ val (Group n) = n
+
-- | Makes a Group with the same name as the User.
userGroup :: User -> Group
userGroup (User u) = Group u