universe/modules/options.nix
Infinidoge 1e3547c2c2 modules/options: define shortcuts to primary user
The primary user gets defined in the user files through `user.name`,
which is reused elsewhere.
2023-03-30 12:29:47 -04:00

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;
};
}