From 87d244b5e2e128a6ae74505b6ab949ac8b617edf Mon Sep 17 00:00:00 2001 From: arunoruto Date: Sat, 2 Nov 2024 16:08:24 +0100 Subject: [PATCH] Make the shell options a bit easier to configure --- modules/nixos/user.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix index b21733a..95134f1 100644 --- a/modules/nixos/user.nix +++ b/modules/nixos/user.nix @@ -8,6 +8,9 @@ image, ... }: +let + shell = config.home-manager.users.${username}.shell; +in { sops.secrets."passwords/${username}".neededForUsers = true; @@ -17,10 +20,7 @@ isNormalUser = true; # hashedPasswordFile = config.sops.secrets."passwords/${username}".path; # shell = pkgs.${config.home-manager.users.${username}.shell}; - shell = - config.home-manager.users.${username}.programs.${ - config.home-manager.users.${username}.shell - }.package; + shell = config.home-manager.users.${username}.programs.${shell}.package; description = "Mirza"; extraGroups = [ "dialout" @@ -41,5 +41,10 @@ programs.zsh.enable = true; - environment.sessionVariables.FLAKE = "/home/${username}/.config/flake"; + environment = { + sessionVariables.FLAKE = "/home/${username}/.config/flake"; + shells = [ + config.users.users.${username}.shell + ]; + }; }