From 169828ca08b06bcfc0a380f295403456e300916e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 22 May 2026 10:51:28 +0200 Subject: [PATCH] feat(amd): add rialo user with shared home config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- homes/x86_64-linux/rialo@amd/default.nix | 16 ++++++++++++++++ systems/x86_64-linux/amd/default.nix | 1 + systems/x86_64-linux/amd/rialo.nix | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 homes/x86_64-linux/rialo@amd/default.nix create mode 100644 systems/x86_64-linux/amd/rialo.nix diff --git a/homes/x86_64-linux/rialo@amd/default.nix b/homes/x86_64-linux/rialo@amd/default.nix new file mode 100644 index 0000000..29d0ff7 --- /dev/null +++ b/homes/x86_64-linux/rialo@amd/default.nix @@ -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 + ''; +} diff --git a/systems/x86_64-linux/amd/default.nix b/systems/x86_64-linux/amd/default.nix index 239e4cb..d55a514 100644 --- a/systems/x86_64-linux/amd/default.nix +++ b/systems/x86_64-linux/amd/default.nix @@ -13,6 +13,7 @@ with lib.metacfg; ./acme.nix ./nginx.nix ./opencode.nix + ./rialo.nix ]; powerManagement.cpuFreqGovernor = "performance"; diff --git a/systems/x86_64-linux/amd/rialo.nix b/systems/x86_64-linux/amd/rialo.nix new file mode 100644 index 0000000..56a4e3d --- /dev/null +++ b/systems/x86_64-linux/amd/rialo.nix @@ -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" ]; +}