init
This commit is contained in:
commit
132a109da8
15 changed files with 436 additions and 0 deletions
29
modules/user.nix
Normal file
29
modules/user.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue