2025-01-19 09:06:27 +03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
secret,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.user;
|
2025-01-19 10:19:16 +03:00
|
|
|
purpose = config.module.purpose;
|
2025-01-19 09:06:27 +03:00
|
|
|
in
|
|
|
|
{
|
2025-01-19 10:19:16 +03:00
|
|
|
options.user.live = lib.mkEnableOption "live user." // {
|
|
|
|
default = purpose.live;
|
|
|
|
};
|
2025-01-19 09:06:27 +03:00
|
|
|
|
|
|
|
config = lib.mkIf cfg.live {
|
|
|
|
home.nixos.users = [
|
|
|
|
{
|
|
|
|
homeDirectory = "/home/live";
|
|
|
|
username = "live";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
users.users.live = {
|
|
|
|
createHome = true;
|
|
|
|
description = "Live User";
|
|
|
|
hashedPassword = secret.password.live;
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1022;
|
|
|
|
extraGroups = [
|
|
|
|
"input"
|
|
|
|
"keyd"
|
|
|
|
"libvirtd"
|
|
|
|
"networkmanager"
|
|
|
|
"video"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|