diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-05-20 11:48:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 11:48:23 +0200 |
commit | 604120a374dd23c57b5aed75e7e8958ec4895a06 (patch) | |
tree | 4fa21837a770988948190fa999b5785ad029488b /nixos | |
parent | d39d933474c8a192195c9a583658d8055c79f756 (diff) | |
parent | 0520dda5ece08406e9e1c468ca292950b7177e3e (diff) |
Merge pull request #173576 from sternenseemann/xmonad-tests
[haskell-updates] release-haskell.nix: include nixos tests for xmonad
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/xmonad.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/nixos/tests/xmonad.nix b/nixos/tests/xmonad.nix index aa55f0e3ca6f2..ec48c3e112750 100644 --- a/nixos/tests/xmonad.nix +++ b/nixos/tests/xmonad.nix @@ -13,7 +13,9 @@ let import System.Environment (getArgs) import System.FilePath ((</>)) - main = launch $ def { startupHook = startup } `additionalKeysP` myKeys + main = do + dirs <- getDirectories + launch (def { startupHook = startup } `additionalKeysP` myKeys) dirs startup = isSessionStart >>= \sessInit -> spawn "touch /tmp/${name}" @@ -23,14 +25,15 @@ let compiledConfig = printf "xmonad-%s-%s" arch os - compileRestart resume = - whenX (recompile True) $ + compileRestart resume = do + dirs <- asks directories + + whenX (recompile dirs True) $ when resume writeStateToFile *> catchIO ( do - dir <- getXMonadDataDir args <- getArgs - executeFile (dir </> compiledConfig) False args Nothing + executeFile (cacheDir dirs </> compiledConfig) False args Nothing ) ''; @@ -94,7 +97,7 @@ in { # set up the new config machine.succeed("mkdir -p ${user.home}/.xmonad") - machine.copy_from_host("${newConfig}", "${user.home}/.xmonad/xmonad.hs") + machine.copy_from_host("${newConfig}", "${user.home}/.config/xmonad/xmonad.hs") # recompile xmonad using the new config machine.send_key("alt-ctrl-q") |