Home Manager: Difference between revisions
imported>DavidDudson m Missing Semicolon |
imported>Grxnola Adds how to use in a Flake |
||
| Line 47: | Line 47: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
It can either be incorporated in <code>/etc/nixos/configuration.nix</code> or be placed in a standalone file and imported in configuration.nix: <code>imports = [ ./thefile.nix ]</code>. | It can either be incorporated in <code>/etc/nixos/configuration.nix</code> or be placed in a standalone file and imported in configuration.nix: <code>imports = [ ./thefile.nix ]</code>. | ||
To use it inside nixosConfigurations in a Flake, put home-manager in your inputs and in your configuration modules import <code>home-manager.nixosModules.home-manager</code>, then you can use it as above. | |||
Whenever you change you home-manager configuration, you must rerun <code>nixos-rebuild switch</code>. With this method, changing the configuration of an unprivileged user requires to run a command as root. | Whenever you change you home-manager configuration, you must rerun <code>nixos-rebuild switch</code>. With this method, changing the configuration of an unprivileged user requires to run a command as root. | ||