jakalx

joined 9 months ago
[–] jakalx@lemmy.ml 1 points 8 months ago

Hi, I didn't get a notification and then totally forgot to manually check :(

Thanks for your links, I'll check them out! My setup is quite similar to yours.

Another idea could be to extract the home/programs/xmonad thingy into its own flake somehow.

Currently I'm trying to figure out if direnv is able to load a particular devShell somehow (and then limim it to a particular host), but didn't make progress yet. My idea is to have a devShells entry that pulls in xmonad etc. but only gets activated if I enter the xmonad subdirectory... Mh maybe a simple shell.nix with manually managed pinning for nixpkgs could be a way forward.

I'm currently also doing the nixos-rebuild step to check the config.

12
submitted 9 months ago* (last edited 9 months ago) by jakalx@lemmy.ml to c/nix@programming.dev
 

Hi,

how would one create a development environment for #xmonad contained within my nixos system configuration?

My flake for my system sets up xmonad with a custom config.hs and I'd like to get a suitable dev environment when editing the config.hs. Usually when developing for haskell, I'll use a flake and setup a devShell which then gets loaded by direnv.

  • is there best practice?
  • my config.hs is in a subdirectory

My first attempt would be to just provide a shell.nix next to my config.hs - but that wouldn't load the exact same xmonad as the system one, since it's separate from the flake.