Closed MichaelBergquistSuarez closed 4 years ago
Yeah, it should work. Did you also set xsession.enable = true;
? Without this the xsession would not be generated.
Thank you, I did manage to get it up and running!
The suggested option did have an effect (things looked a bit better, a background image showed up) but still no xmonad
Since it should have worked I continued with my throubleshooting
It was not a home-manager problem, so this issue can be closed, sorry for taking up time. I'll pay it back by explaining how I did if somebody from the future has similar problems:)
systemctl status home-manager-michael
told me that Home Manager Service failed to start with error messages such as collect2: ld terminated with signal 9 [Killed]
and compilation terminated
, which could indicate memory problems. dmesg
seemed to confirmed that with Out of memory: Kill process 1374 (ld) score 409 or sacrifice child
.free --mega
showed me that the VM had very little memory.This was my first Nixos VM build so I didn't know what the defaults were or how to change them. I then found options not very well documented in a chat: virtualisation.virtualisation
and virtualisation.memorySize
.
So I gave them a higher value, and then it simply worked, hooray
I'm using
home-manager
release-19.03
as a nixos module.But after
nixos-rebuild build-vm --fast && ./result/bin/run-*-vm
and logging in to my user, xmonad won't start.I'm not yet 100% sure how to troubleshoot it, but before I continue my troubleshooting journey I thought I'd ask:
Is the
xmonad
module this is expected to work withbuild-vm
?I am uncertain because in news.nix, 2018-02-06, it says:
But since then this have been added to the documentation:
Which I interpret as
build-vm
now is expected to work, but maybe I'm wrong? Or is it likely that there's something wrong with my setup?Notes
Any tips on how I can troubleshoot this is appreciated
nixos-rebuild test
andnixos-rebuild switch
works as expected, but I can't remember if I have made manual changes outside of myconfiguration.nix
.sudo systemctl status display-manager
shows active status.Related xmonad home-manager options
```nix { config, pkgs, ... }: { home = { packages = [ pkgs.haskellPackages.xmobar ]; }; xsession.windowManager.xmonad = { config = ./xmonad.hs; enable = true; enableContribAndExtras = true; extraPackages = haskellPackages: [ haskellPackages.taffybar haskellPackages.xmobar haskellPackages.xmonad haskellPackages.xmonad-contrib haskellPackages.xmonad-extras ]; }; } ```Related xmonad nixos options
```nix { imports = [ "${home-manager}/nixos" ]; home-manager = { useUserPackages = true; users.my-user = import ./home-manager-config; }; services = { xserver = { autorun = true; enable = true; displayManager = { slim.enable = false; lightdm.enable = true; }; windowManager = { default = "xmonad"; xmonad.enable = true; # Each user uses home manager to configure xmonad }; }; }; users.extraUsers.my-user = { description = "My user"; isNormalUser = true; extraGroups = [ "wheel" ]; } # I also do this in another `vm-config.nix` file used only by the vm. Could this affect somehow? users.extraUsers.my-user.initialPassword = "a-password"; } ```