diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-05 16:26:30 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-05 16:26:30 -0400 |
| commit | 20a5f616bd4c8c3acc78bc64f20832ca4784b5c7 (patch) | |
| tree | 63d5ba44a57af99bfa47fa169876d5db9a6f6821 | |
| parent | 1428b1f276a65a3a3c5a881905458df8fe0e6f62 (diff) | |
less wonky (and working) implementation of defaultPanelFor
| -rw-r--r-- | joeyconfig.hs | 3 | ||||
| -rw-r--r-- | src/Propellor/Property/XFCE.hs | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/joeyconfig.hs b/joeyconfig.hs index ff16777c..f8b26a2b 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -110,9 +110,8 @@ darkstar = host "darkstar.kitenet.net" $ props `before` File.ownerGroup "/srv/propellor-disk.img" (User "joey") (Group "joey") demo :: Host -demo = host "demo.kitenet.net" $ props +demo = host "demo" $ props & osDebian Unstable X86_64 - & Hostname.setTo "demo" & Apt.installed ["linux-image-amd64"] & bootstrappedFrom GitRepoOutsideChroot & User.accountFor user diff --git a/src/Propellor/Property/XFCE.hs b/src/Propellor/Property/XFCE.hs index 4f3a152a..e3dd060e 100644 --- a/src/Propellor/Property/XFCE.hs +++ b/src/Propellor/Property/XFCE.hs @@ -1,7 +1,6 @@ module Propellor.Property.XFCE where import Propellor.Base -import Propellor.Types.Core (getSatisfy) import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File import qualified Propellor.Property.User as User @@ -22,10 +21,11 @@ installedMin = Apt.installedMin ["xfce4", "xfce4-terminal", "task-desktop"] -- If the user subsequently modifies their panel, their modifications will -- not be overwritten by this property. defaultPanelFor :: User -> Property DebianLike -defaultPanelFor u@(User username) = adjustPropertySatisfy baseprop $ \s -> do +defaultPanelFor u@(User username) = property' desc $ \w -> do home <- liftIO $ User.homedir u - s <> fromMaybe mempty (getSatisfy (go home)) + ensureProperty w (go home) where + desc = "default XFCE panel for " ++ username cf = ".config" </> "xfce4" </> "xfconf" </> "xfce-perchannel-xml" </> "xfce4-panel.xml" -- This location is probably Debian-specific. @@ -36,5 +36,3 @@ defaultPanelFor u@(User username) = adjustPropertySatisfy baseprop $ \s -> do `before` File.applyPath home cf (\f -> File.ownerGroup f u (userGroup u)) `requires` Apt.installed ["xfce4-panel"] - baseprop :: Property DebianLike - baseprop = doNothing `describe` ("default XFCE panel for " ++ username) |
