about summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/xmonad.nix
AgeCommit message (Collapse)AuthorFilesLines
2022-07-30treewide: automatically md-convert option descriptionspennae1-11/+11
the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
2022-05-19nixos/xmonad: adjust example to reflect v0.17.0 update of xmonadDominik Xaver Hörl1-16/+17
2022-01-19nixos/xmonad: update example configivanbrennan1-6/+24
Update the example config to show a working example for xmonad 0.17.0, which added an argument to the `launch` function and adjusted the location of the recompiled binary.
2022-01-18nixos/xmonad: enableConfiguredRecompileivanbrennan1-6/+21
Commit 9a5b5d9fe858f33f7f5ce0870be2b8a38516a1d4 added Haskell dependencies (GHC and packages) to the xmonad binary's environment even if xmonad had been preconfigured (via the "config" option). The intent was to enable one-off recompiling using a local config file (e.g. ~/.config/xmonad/xmonad.hs), so the user can get quick feedback while developing their config. While this works, it may not be a common use-case, and it requires some careful crafting in xmonad.hs itself. On top of that, it significantly increases the size of the closure. Given all that, commit b69d9d3c23311ce8b8512a7032600a5f8d1595ca removed GHC and packages from the binary's environment. But there are still those among us who want to be able to recompile from a preconfigured xmonad, so let's provide a way to opt-into configured recompilation.
2021-12-07nixos/xmonad: Type the last optionJanne Heß1-0/+2
2021-10-30xmonad: Don't add ghc to the closure when 'config' is setJules Aguillon1-1/+2
When 'services.xserver.windowManager.xmonad.config' is not null, the restart feature won't work by default and is not desirable unless specific care is made, as explained by the documentation. I think it's reasonable to not include the haskell dependencies in the environment by default. That reduces the size of my system by 2GB.
2021-10-04nixos/doc: clean up defaults and examplesNaïm Favier1-5/+5
2021-02-01Revert "nixos/xmonad: add haskellPackages type"Fritz Otlinghaus1-1/+0
2021-01-31nixos/xmonad: add haskellPackages typeFritz Otlinghaus1-0/+1
2021-01-24nixos: use functionTo to prevent evaluation errors while mergingBas van Dijk1-0/+1
Without this patch merging options like services.xserver.windowManager.xmonad.extraPackages results in the evaluation error: error: value is a list while a set was expected, at nixpkgs/lib/options.nix:77:23 With this patch we get the desired merging behaviour that just concatenates the resulting package lists. (cherry picked from commit 6e99f9fdecb1f28308c8e0aed0fc851737354864) Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
2020-12-28XMonad: configured recompile (#107696)Ivan1-20/+38
* nixos/xmonad: xmonad config w/ghc+xmessage When the "config" option isn't set, we use xmonad-with-packages to provide xmonad with runtime access to an isolated ghc, ensuring it can recompile and exec a user's local config (e.g. $HOME/.xmonad/xmonad.hs) regardless of which ghc (if any) is on PATH. When the "config" option is set, however, we compile a configured xmonad executable upfront (during nixos-rebuild), and prior to this commit, it was not provided with runtime access to an isolated ghc. As a result, with the "config" option set, it was not possible to recompile and exec a user's local config unless there was a compatible version of ghc on PATH with the necessary packages (xmonad, xmonad-contrib, etc.) in its package database. Adding such a ghc to environment.systemPackages, e.g. (haskellPackages.ghcWithPackages (ps: with ps; [xmonad xmonad-contrib])) is problematic because it adds both ghc and an unconfigured xmonad to PATH, e.g. $ ls -l $(which xmonad ghc) lrwxrwxrwx ... /run/current-system/sw/bin/ghc -> /nix/store/...-ghc-8.10.2-with-packages/bin/ghc lrwxrwxrwx ... /run/current-system/sw/bin/xmonad -> /nix/store/...-ghc-8.10.2-with-packages/bin/xmonad Having the unconfigured xmonad on PATH is particularly bad because restarting xmonad will dump the user into the unconfigured version, and if no local config exists (e.g. in $HOME/.xmonad/xmonad.hs), they'll be left in this unconfigured state. In this commmit, we give the configured xmonad runtime access to ghc like xmonad-with-packages does for the unconfigured version. The aim is to allow the user to switch between the nixos module's config and a local config (e.g. $HOME/.xmonad/xmonad.hs) at will, so they can try out config changes without performing a nixos-rebuild. Since the xmonad on PATH is the configured executable, there's no danger a user could unwittingly restart into the unconfigured version, and because xmonad will refuse to recompile when no local config exists, there's no danger a user could unwittingly recompile into an unconfigured version. Given that a local config exists, the recompile/restart behavior depends on two factors: - which entry point is used * 'XMonad.xmonad' (default) * 'XMonad.launch' (recommended in "config" option description) - what operation is triggered (i.e. via mod+q) * `spawn "xmonad --recompile && xmonad --restart"` (default) * `restart "xmonad" True` * custom function If the default 'XMonad.xmonad' entrypoint and default mod+q operation are used, hitting mod+q will compile and exec the local config, which will remain in use until next time the display manager is restarted. If the entrypoint is changed to 'XMonad.launch' but mod+q left with its default operation, hitting mod+q will have no visible effect. The logs (as seen by running `journalctl --identifier xmonad --follow`) will show an error, X Error of failed request: BadAccess (attempt to access private resource denied) which indicates that the shell was unable to start xmonad because another window manager is already running (namely, the nixos-configured xmonad). https://wiki.haskell.org/Xmonad/Frequently_asked_questions#X_Error_of_failed_request:_BadAccess_.28attempt_to_access_private_resource_denied.29 Changing the mod+q operation to `restart "xmonad" True` (as recommended in the "config" option's description) will allow a restart of the nixos-configured xmonad to be triggeredy by hitting mod+q. Finally, if the entrypoint is 'XMonad.launch', mod+q has been bound to `restart "xmonad" True` and another key bound to a custom recompile/restart function (e.g. `compileRestart` as shown in the "config" option example), the user can switch between the nixos module's config and their local config, with the custom key switching to the local config and mod+q switching back. * nixos/xmonad: refactor let binding * nixos/xmonad: refactor (eliminate duplicate code) * nixos/xmonad: install man pages Prior to this commit, man pages were not installed if the "config" option was set. * nixos/xmonad: comment grammar fixups * nixos/xmonad: writeStateToFile in example config Calling writeStateToFile prior to recompiling and restarting allows state (workspaces, etc.) to be preserved across the restart. * nixos/xmonad: add ivanbrennan to maintainers * nixos/xmonad: adjust compileRestart example * nixos/xmonad: add missing import to example config
2020-10-12nixos/xmonad: add lassulus and xaverdh as maintainersDominik Xaver Hörl1-2/+3
2020-10-12nixos/xmonad: improve module docsDominik Xaver Hörl1-8/+39
2020-10-10xmonad: put the correct xmonad binary in PATHDominik Xaver Hörl1-6/+7
2020-09-07nixos/xmonad: allow passing compile time options to ghc invocationDominik Xaver Hörl1-0/+10
2020-09-07nixos/xmonad: allow passing command line argumentsDominik Xaver Hörl1-1/+10
2020-08-10nixos/xmonad: Fix behavior of config optKurt Robert Rudolph1-6/+5
Prior to this change, the `config` option (which allows you define the haskell configuration for xmonad in your configuration.nix instead of needing something in the home directory) prevents desktop manager resources from starting. This can be demonstrated by configuring the following: ``` services.xserver = { displayManager.defaultSession = "xfce+xmonad"; displayManager.lightdm.enable = true; desktopManager.xterm.enable = false; desktopManager.xfce.enable = true; desktopManager.xfce.enableXfwm = false; desktopManager.xfce.noDesktop = true; windowManager.xmonad = { enable = true; enableContribAndExtras = true; extraPackages = haskellPackages: [ haskellPackages.xmonad-contrib haskellPackages.xmonad-extras haskellPackages.xmonad ]; config = '' import XMonad import XMonad.Config.Xfce main = xmonad xfceConfig { terminal = "terminator" , modMask = mod4Mask } ''; }; }; ``` and after user log in, search for xfce processes `ps aux | grep xfce`. You will not find xfce processes running until after the xmonad process is killed. The bug prevents utilities included with the desktopManager, (e.g. powerManagement, session logout, etc.) from working as expected.
2019-10-19nixos/widnow-managers/xmonad: fix systemd identifier for xmonadft1-1/+1
2019-08-31nixos/modules: Remove all usages of types.stringSilvan Mosberger1-1/+1
And replace them with a more appropriate type Also fix up some minor module problems along the way
2018-12-15xmonad service: add .config optionlassulus1-1/+32
2017-08-08xmonad service: add defaultText to extraPackages to fix rendering in docsSilvan Mosberger1-0/+1
2017-03-17nixos/treewide: remove boolean examples for optionsFranz Pletz1-1/+0
They contain no useful information and increase the length of the autogenerated options documentation. See discussion in #18816.
2016-01-17types: remove references to new packageSetRobin Gloster1-1/+0
Reverts part of a04a7272aa38ada45e694281071b720d4abbd0df packageSet is slated to be introduced in #11866 but currently causes evalation errors. /cc @ts468
2016-01-17Add missing 'type', 'defaultText' and 'literalExample' in module definitionsThomas Strobel1-0/+1
- add missing types in module definitions - add missing 'defaultText' in module definitions - wrap example with 'literalExample' where necessary in module definitions
2015-12-04Fix evaluation after merge of #11450.Moritz Ulrich1-0/+1
2015-12-04Getting rid of mkOption in NixOS window manager modulesAndersonTorres1-6/+1
Now the default way to define NixOS window manager modules is to use mkEnableOption to describe the module itself. In this commit, all files on nixos/modules/services/x11/window-managers are changed.
2015-11-13fix: ihaskell's and xmonad's dependence on haskell-ngLengyel Balázs1-3/+3
2015-02-03nixos/xmonad: move to haskell-ng and make a wrapperNikolay Amiantov1-14/+15
2014-07-02Get all lib functions from lib, not pkgs.lib, in modulesShea Levy1-3/+3
2013-12-28windowManager.xmonad: Make it configurable and extensible.Moritz Ulrich1-8/+47
PR #1366 The previous windowManager.xmonad option only starts xmonad and doesn't make ghc available. This assumes that the user has GHC with access to the xmonad package in his PATH when using xmonad. Xmonad in Nix is now patched to accept the XMONAD_{GHC,XMESSAGE} environment variables which define the path to either ghc or xmessage. These are set automatically when using xmonad through windowManager.xmonad. My (or specific: @aristidb and my) changes make it possible to use Xmonad without adding GHC to any profile. This is useful if you want to add a different GHC to your profile. This commit introduces some options: - xmonad.haskellPackages: Controls which Haskell package set & GHC set is used to (re)build Xmonad - xmonad.extraPackages: Function returning a list of additional packages to make available to GHC when rebuilding Xmonad - xmonad.enableContribExtras: Boolean option to build xmonadContrib and xmonadExtras. Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-10-10Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra1-0/+30