diff --git a/lib/modules/users.nix b/lib/modules/users.nix index 337dff7c..b3f9f2f2 100644 --- a/lib/modules/users.nix +++ b/lib/modules/users.nix @@ -8,6 +8,22 @@ cfg = config.valhalla; capitalize = (import ../text.nix { inherit lib; }).capitalize; + linuxOptions = { + defaultShell = mkOption { + type = types.nullOr types.str; + description = "The default shell of the user."; + default = null; + }; + + rclone = { + configurations = mkOption { + type = types.attrsOf syncType; + description = "The configurations of the rclone mounts."; + default = {}; + }; + }; + }; + syncType = types.submodule ( { ... }: { options = { @@ -46,25 +62,13 @@ default = []; }; - defaultShell = mkOption { - type = types.nullOr types.str; - description = "The default shell of the user."; - default = null; - }; - - rclone = { - configurations = mkOption { - type = types.attrsOf syncType; - description = "The configurations of the rclone mounts."; - default = {}; - }; - }; - git = (import ./git/options.nix) { inherit lib; }; } // options; })); - userType = mkUserType { options = {}; }; + userType = mkUserType { + options = linuxOptions; + }; winUserType = mkUserType { options = { @@ -88,9 +92,12 @@ type = types.attrsOf winUserType; description = "The users to create on the Windows machine."; default = lib.attrsets.concatMapAttrs ( - name: options: { - ${capitalize name} = options; - }) cfg.users; + name: options: + if builtins.elem name (builtins.attrNames linuxOptions) + then {} + else { + ${capitalize name} = options; + }) cfg.users; }; }; }; diff --git a/profiles/DerGeret/config.nix b/profiles/DerGeret/config.nix index b6d929cb..8dc098f2 100644 --- a/profiles/DerGeret/config.nix +++ b/profiles/DerGeret/config.nix @@ -10,6 +10,10 @@ enable = true; linuxPercentage = 70; # better safe than sorry }; + + users.Manuel = { + microsoftAccount = true; + }; }; partition.os.partitions = {