flocon/modules/core/users.nix
Anthony Rodriguez 1a299516a3
shared/modules/hjem: update environment module to use ~/.profile instead
I decided to go with the simpler solution of using `~/.profile`, as that
is the only option that will ensure that the environment will be set
correctly. If you launch a more barebones compositor such as Hyprland
from your tty, since it won't be launched by systemd it will not inherit
the environment.
2025-02-13 16:42:58 +01:00

39 lines
844 B
Nix

{
inputs,
lib,
config,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.lists) singleton;
inherit (lib.filesystem) listFilesRecursive;
inherit (config.local.systemVars) username;
inherit (config.local.homeVars) fullName;
inherit (config.local.profiles) desktop;
in {
imports = [inputs.hjem.nixosModules.default];
users.users.${username} = {
isNormalUser = true;
description = fullName;
extraGroups = mkIf desktop.enable [
"networkmanager"
"audio"
"video"
"wheel"
"plugdev"
];
};
hjem = mkIf desktop.enable {
clobberByDefault = true;
users.${username} = {
enable = true;
directory = "/home/${username}";
user = "${username}";
};
extraModules = singleton {
imports = listFilesRecursive ../../shared/modules/hjem;
};
};
}