feat(amd): add rialo user with shared home config
Creates a second normal user `rialo` (uid 1001) on the amd system, member of wheel/docker/dialout/tss and listed in nix.settings.trusted-users so they can manage the Nix daemon. The home config imports harald@amd and replicates the bash→fish auto-exec snippet (which lives in the NixOS user module and only fires for the primary metacfg user).
This commit is contained in:
parent
db94498799
commit
169828ca08
3 changed files with 35 additions and 0 deletions
16
homes/x86_64-linux/rialo@amd/default.nix
Normal file
16
homes/x86_64-linux/rialo@amd/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ (../. + "/harald@amd") ];
|
||||
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
programs.bash.initExtra = ''
|
||||
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=""
|
||||
SHELL=/run/current-system/sw/bin/fish exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
else
|
||||
[[ $SHELL == *fish ]] && SHELL=/run/current-system/sw/bin/bash
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ with lib.metacfg;
|
|||
./acme.nix
|
||||
./nginx.nix
|
||||
./opencode.nix
|
||||
./rialo.nix
|
||||
];
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
|
|
|||
18
systems/x86_64-linux/amd/rialo.nix
Normal file
18
systems/x86_64-linux/amd/rialo.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.rialo = {
|
||||
isNormalUser = true;
|
||||
home = "/home/rialo";
|
||||
group = "users";
|
||||
shell = pkgs.bash;
|
||||
uid = 1001;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
"dialout"
|
||||
"tss"
|
||||
];
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "rialo" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue