The primary user gets defined in the user files through `user.name`, which is reused elsewhere.
15 lines
434 B
Nix
15 lines
434 B
Nix
# Heavily inspired by hlissner: https://github.com/hlissner/dotfiles/blob/master/modules/options.nix
|
|
{ config, options, lib, home-manager, ... }:
|
|
with lib;
|
|
with lib.hlissner;
|
|
{
|
|
options = with types; {
|
|
user = mkOpt attrs { };
|
|
home = mkOpt attrs { };
|
|
};
|
|
|
|
config = {
|
|
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
|
home-manager.users.${config.user.name} = mkAliasDefinitions options.home;
|
|
};
|
|
}
|