summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/OS.hs
diff options
context:
space:
mode:
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