1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 10:07:44 +00:00
ncc/modules/darwin/system-config-primary-user.nix

5 lines
228 B
Nix

{ config, lib, ... }: let
inherit (lib) attrNames filterAttrs hasPrefix head;
in {
system.primaryUser = head <| attrNames <| filterAttrs (_: value: value.home != null && hasPrefix "/Users/" value.home) config.users.users;
}