29 lines
624 B
Nix
29 lines
624 B
Nix
{ config, pkgs, lib, options, ... }:
|
|
|
|
with lib;
|
|
with lib.my;
|
|
{
|
|
options = {
|
|
user = mkOpt types.attrs {};
|
|
};
|
|
|
|
config = {
|
|
user = rec {
|
|
name = "reidlab";
|
|
description = "awesome guy";
|
|
extraGroups = ["wheel" "input" "audio" "video" "storage"];
|
|
isNormalUser = true;
|
|
home = "/home/${name}";
|
|
group = name;
|
|
uid = 1000;
|
|
};
|
|
users.groups.${config.user.group} = {};
|
|
|
|
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
hm.home.username = config.user.name;
|
|
hm.home.homeDirectory = lib.mkForce config.user.home;
|
|
};
|
|
}
|