Homes
To create a new home, add a new directory to your homes
directory.
Now create the Nix file for the home at homes/x86_64-linux/user@my-home/default.nix
.
This home will be made available on your flake’s homeConfigurations
output with the same
name as the directory that you created.
Homes can have additional specialArgs
and modules
configured within your call to mkFlake
.
See the following for an example which adds a Home Manager module to a specific host and sets a
custom value in specialArgs
.
Options
For convenience, Snowfall Lib adds an additional set of configuration with context about the current user. These values can be used to avoid having to hard code them or duplicate the things that Snowfall Lib already knows about.
snowfallorg.user.enable
This option determines whether the user’s common, required options are automatically set.
The default value is false
when used outside of Snowfall Lib, but is set to true when
you use a system or home created by Snowfall Lib.
Type: Boolean
Default: false
(unless used in a system or home created by Snowfall Lib)
Example:
snowfallorg.user.name
The name of the user. This value is provided to home-manager’s home.username
option during
automatic configuration. This option does not have a default value, but one is set automatically
by Snowfall Lib for each user. Most commonly this value can be accessed by other modules with
config.snowfallorg.user.name
to get the current user’s name;
Type: String
Example:
snowfallorg.user.home
By default, the user’s home directory will be calculated based on the platform and provided username. However, this can still be customized if your user’s home directory is in a non-standard location.
Type: String
Default: /home/${config.snowfallorg.user.name}
(Linux), /Users/${config.snowfallorg.user.name}
(macOS)
Example: