reorganization
This commit is contained in:
parent
2ad77494b2
commit
b6afba390b
24 changed files with 144 additions and 128 deletions
43
modules/core/user.nix
Normal file
43
modules/core/user.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, lib, options, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
{
|
||||
options = {
|
||||
user = mkOpt types.attrs {};
|
||||
};
|
||||
|
||||
config = {
|
||||
user = rec {
|
||||
name = "reidlab";
|
||||
description = "reid";
|
||||
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;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
hm.home.username = config.user.name;
|
||||
hm.home.homeDirectory = lib.mkForce config.user.home;
|
||||
|
||||
nix.settings = let
|
||||
users = ["root" config.user.name];
|
||||
in {
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
};
|
||||
|
||||
users.users.root = {
|
||||
packages = [ pkgs.shadow ];
|
||||
shell = pkgs.shadow;
|
||||
hashedPassword = "!";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue