support home-manager for configuring the workspace
home-manager may be a better fit for configuring the workspace than the current bespoke packages/env variables in dev.nix.
In addition to just providing support for adding packages to the environment, it includes easy configuration for a number of common software packages. For instance, I needed to enable the nix shell
command. With home-manager, I could have set nix.settings.extra-experimental-features = "nix-command flakes repl-flake"
, but instead I needed to set an environment variable by hand:
env = {
NIX_USER_CONF_FILES = pkgs.writeText "nix.conf" ''
extra-experimental-features = nix-command flakes repl-flake
'';
};
I got lucky in that Nix can be configured from an environment variable like that; for software that needs to be configured at fixed paths inside $HOME, I don't think there's currently any way to automate that with the knobs currently exposed in dev.nix
. For example, Git configuration, shell profiles, etc.
-
Debanjan Basu commented
Did you find a simple way to turn on flakes? @Quentin