From 01b313e06b3010ebe1a9385b7779dc49a7ebf74c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Feb 2017 16:24:04 -0400 Subject: ConfigurableValue instances for User, Group --- src/Propellor/Types/OS.hs | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3