mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-09 18:41:06 +01:00
home-environment: fix undefined access eval
`uid` isn't guaranteed to be defined, have fallback logic in place to account for that. Even if we require it eventually, we can't show a proper assertion/warning without being able to eval. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
35545f71dd
commit
f16bfa59e3
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ let
|
|||
|
||||
modules = [
|
||||
(
|
||||
{ name, ... }:
|
||||
{ name, options, ... }:
|
||||
{
|
||||
imports =
|
||||
import ../modules/modules.nix {
|
||||
|
|
@ -53,7 +53,7 @@ let
|
|||
|
||||
home.username = config.users.users.${name}.name;
|
||||
home.homeDirectory = config.users.users.${name}.home;
|
||||
home.uid = mkIf (config.users.users.${name}.uid != null) config.users.users.${name}.uid;
|
||||
home.uid = mkIf (options.users.users.${name}.uid.isDefined or false) config.users.users.${name}.uid;
|
||||
|
||||
# Forward `nix.enable` from the OS configuration. The
|
||||
# conditional is to check whether nix-darwin is new enough
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue