summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-05-19 19:18:55 +0200
committerGitHub <noreply@github.com>2022-05-19 19:18:55 +0200
commitf181d591ce5c36ba705ed8724e9e6cfdba6858ce (patch)
tree516d3ea049775f21ebb7ca405b3cadff0d2c3554 /nixos
parent161a60ceb7ff24a0e12c16a2976a12923214b12e (diff)
parent065085b340637fe4433c83dc4e055083867826df (diff)
Merge pull request #173623 from xaverdh/xmonad-fix-example
nixos/xmonad: adjust to reflect v0.17.0 update of xmonad
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2205.section.xml9
-rw-r--r--nixos/doc/manual/release-notes/rl-2205.section.md4
-rw-r--r--nixos/modules/services/x11/window-managers/xmonad.nix33
3 files changed, 30 insertions, 16 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index c0f36fcfd356..19aaf12f26a1 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -518,6 +518,15 @@
</listitem>
<listitem>
<para>
+ The update of the haskell package set brings with it a new
+ version of the <literal>xmonad</literal> module, which will
+ break your configuration if you use <literal>launch</literal>
+ as entrypoint. The example code the corresponding nixos module
+ was adjusted, you way want to have a look at it.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
The <literal>home-assistant</literal> module now requires
users that don’t want their configuration to be managed
declaratively to set
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index 5902957a5352..9261511e7b8c 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -163,6 +163,10 @@ In addition to numerous new and upgraded packages, this release has the followin
`useLLVM`. So instead of `(ghc.withPackages (p: [])).override { withLLVM = true; }`,
one needs to use `(ghc.withPackages.override { useLLVM = true; }) (p: [])`.
+- The update of the haskell package set brings with it a new version of the `xmonad`
+ module, which will break your configuration if you use `launch` as entrypoint. The
+ example code the corresponding nixos module was adjusted, you way want to have a look at it.
+
- The `home-assistant` module now requires users that don't want their
configuration to be managed declaratively to set
`services.home-assistant.config = null;`. This is required
diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix
index 68f97c2f504b..66d11131391f 100644
--- a/nixos/modules/services/x11/window-managers/xmonad.nix
+++ b/nixos/modules/services/x11/window-managers/xmonad.nix
@@ -128,33 +128,34 @@ in {
[ ( (mod4Mask,xK_r), compileRestart True)
, ( (mod4Mask,xK_q), restart "xmonad" True ) ]
+ compileRestart resume = do
+ dirs <- asks directories
+ whenX (recompile dirs True) $ do
+ when resume writeStateToFile
+ catchIO
+ ( do
+ args <- getArgs
+ executeFile (cacheDir dirs </> compiledConfig) False args Nothing
+ )
+
+ main = getDirectories >>= launch myConfig
+
--------------------------------------------
- {- version 0.17.0 -}
+ {- For versions before 0.17.0 use this instead -}
--------------------------------------------
-- compileRestart resume =
- -- dirs <- io getDirectories
- -- whenX (recompile dirs True) $
+ -- whenX (recompile True) $
-- when resume writeStateToFile
-- *> catchIO
-- ( do
+ -- dir <- getXMonadDataDir
-- args <- getArgs
- -- executeFile (cacheDir dirs </> compiledConfig) False args Nothing
+ -- executeFile (dir </> compiledConfig) False args Nothing
-- )
--
- -- main = getDirectories >>= launch myConfig
+ -- main = launch myConfig
--------------------------------------------
- compileRestart resume =
- whenX (recompile True) $
- when resume writeStateToFile
- *> catchIO
- ( do
- dir <- getXMonadDataDir
- args <- getArgs
- executeFile (dir </> compiledConfig) False args Nothing
- )
-
- main = launch myConfig
'';
};