jollheef / appvm

Nix-based app VMs
GNU General Public License v3.0
245 stars 19 forks source link

Update defaultSession to a new format #18

Closed msm-code closed 4 years ago

msm-code commented 4 years ago

My journey to this commit was long. At first, I've suddenly got this:

trace: Default graphical session, 'xmonad', not found.
Valid names for 'services.xserver.displayManager.defaultSession' are:
  none+xmonad

error: The option value `services.xserver.displayManager.defaultSession' ...
(use '--show-trace' to show detailed location information)
2020/04/01 03:22:15 <nil> [] []
2020/04/01 03:22:15 ret code: 1, out: [], err: []

So I've added this:

--- a/base.nix.go
+++ b/base.nix.go
@@ -16,6 +16,7 @@ var base_nix = `
   services.xserver = {
     enable = true;
     desktopManager.xterm.enable = false;
+    desktopManager.default = "none";
     displayManager.lightdm = {
       enable = true;
       autoLogin = {

But:

trace: warning: The following options are deprecated:
  - services.xserver.desktopManager.default
  - services.xserver.windowManager.default
Please use
  services.xserver.displayManager.defaultSession = "none+xmonad";
instead.

So that's what I did (and removed old option because "You cannot use both services.xserver.displayManager.defaultSession option and legacy options").

Does it make sense? It certainly helps in my case.

msm-code commented 4 years ago

Hi,

sorry about the force pushes, I forgot to configure gpg before commiting.

Another tiny PR. I'm still learning/playing with the system a bit, so maybe in the future I'll have something bigger to share.

jollheef commented 4 years ago

Hello,

Thank you for participating!

It's a known issue on the unstable nixpkgs channel. Was planned to change after the release of NixOS 20.03. See #12.

I found out that if there's only one session that exists then we don't need to specify it explicitly at all, so I end up with a 6e26754cec8443cb9e473c8a2286168404157f25.

msm-code commented 4 years ago

Makes sense, thanks!

Weird, I tried to find issue about this but missed the one that you linked. Both workarounds (using nixpkgs stable and 6e26754) work fine.