summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/OS.hs
diff options
context:
space:
mode:
authorJoey Hess2015-04-22 13:50:16 -0400
committerJoey Hess2015-04-22 13:50:16 -0400
commit66a8012a1a1086dd15c18e48fd95b27687d10c87 (patch)
tree6e911e3dcaa1bb18528d22a190d8016f7a9e3d0e /src/Propellor/Types/OS.hs
parent0fc926934a8e5c736219d0a53790de2fd1e2b87c (diff)
parent4bd933118d9ecb711b19a6db7b94f24c2733d1a2 (diff)
Merge branch 'joeyconfig'
Conflicts: privdata.joey/privdata.gpg
Diffstat (limited to 'src/Propellor/Types/OS.hs')
-rw-r--r--src/Propellor/Types/OS.hs19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/Propellor/Types/OS.hs b/src/Propellor/Types/OS.hs
index 2bb41446..58bd809a 100644
--- a/src/Propellor/Types/OS.hs
+++ b/src/Propellor/Types/OS.hs
@@ -1,20 +1,19 @@
module Propellor.Types.OS (
- HostName,
- UserName,
- GroupName,
System(..),
Distribution(..),
DebianSuite(..),
isStable,
Release,
Architecture,
+ HostName,
+ UserName,
+ User(..),
+ Group(..),
+ userGroup,
) where
import Network.BSD (HostName)
-type UserName = String
-type GroupName = String
-
-- | High level description of a operating system.
data System = System Distribution Architecture
deriving (Show, Eq)
@@ -35,3 +34,11 @@ isStable _ = False
type Release = String
type Architecture = String
+
+type UserName = String
+newtype User = User UserName
+newtype Group = Group String
+
+-- | Makes a Group with the same name as the User.
+userGroup :: User -> Group
+userGroup (User u) = Group u