This commit is contained in:
nx2
2024-03-12 15:37:58 +01:00
parent 753123ec0f
commit 774e8f08ae
30 changed files with 1747 additions and 667 deletions

24
system-modules/users.nix Normal file
View File

@@ -0,0 +1,24 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users.nx2 = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" ];
useDefaultShell = true;
packages = with pkgs; []; # all in home.nix
};
programs = {
bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
};
}