summaryrefslogtreecommitdiff
path: root/modules/users
AgeCommit message (Collapse)Author
2024-11-11users: warn users to use `pkgs.bashInteractive` instead of `pkgs.bash`Michael Hoang
2024-11-11users: assert that `programs.<shell>.enable = true;` for users' shellsMichael Hoang
Backport of https://github.com/NixOS/nixpkgs/pull/211603 and https://github.com/NixOS/nixpkgs/commit/093f354a1777e462bd80398c4fc624c4d383dc68
2024-11-11users: remove `lib.`Michael Hoang
2024-11-07users: don't generate `ensurePerms` when no users to manageMichael Hoang
2024-11-07users: replace runtime check to prevent deleting `root` with assertionMichael Hoang
This fixes SC2050 as `${name} == "root"` will be generated as a constant expression.
2024-11-07treewide: fix shellcheck warnings and errorsMichael Hoang
2024-11-02users: don't check home directory is correct before creating userMichael Hoang
2024-10-28users: create users with home directory `/var/empty` by defaultMichael Hoang
2024-10-28users: remove `users.forceRecreate` optionMichael Hoang
2024-10-28users: fix unclosed stringMichael Hoang
2024-10-28users: remove `with lib;`Michael Hoang
2024-10-28users: replace FDA check with more fine grained permissions checkMichael Hoang
2024-10-27users: ensure all users' home directories in the config are correctMichael Hoang
2024-10-27users: move checks to `system.checks`Michael Hoang
2024-10-27users: allow `shell` to be managed by macOSMichael Hoang
2024-10-27users: change default shell to `/usr/bin/false` to match macOSMichael Hoang
2024-10-27users: allow `home` to be managed by macOSMichael Hoang
2024-10-27users: update properties on known usersMichael Hoang
2024-10-24Merge pull request #1118 from Enzime/push-zvvxxryylwxtEmily
users: ensure users' shells are installed
2024-10-24users: switch back to using `dscl` for deleting usersMichael Hoang
The previous default behaviour when nix-darwin deletes users is that their home directories are left intact, however as the `-keepHome` flag for `sysadminctl -deleteUser` is broken, we'll need to switch back for now.
2024-10-24users: ensure Full Disk Access is granted before trying to create usersMichael Hoang
2024-10-24users: add missing newlines for FDA promptMichael Hoang
2024-10-24users: prevent deleting the user calling `darwin-rebuild`Michael Hoang
`sysadminctl -deleteUser` will only prevent you from deleting the current user if it's not the last admin and not the last secure token user, otherwise it will happily oblige.
2024-10-24users: ensure users' shells are installedMichael Hoang
2024-10-23users: ensure Full Disk Access is granted before trying to delete usersMichael Hoang
2024-10-22users: don't allow `name` to be emptyMichael Hoang
2024-10-22users: change default `description` to `null`Michael Hoang
2024-10-22users: use `lib.escapeShellArg` for group descriptionMichael Hoang
2024-10-22users: use `lib.escapeShellArg` for `createhomedir`Michael Hoang
2024-10-22users: use `lib.escapeShellArg` for `dscl` pathsMichael Hoang
2024-10-22users: use `lib.escapeShellArgs` instead of custom versionMichael Hoang
2024-10-22users: use `lib.escapeShellArgs` for `sysadminctl -addUser`Michael Hoang
2024-10-22users: use `lib.escapeShellArg` for `sysadminctl -deleteUser`Michael Hoang
2024-10-22users: use `lib.escapeShellArg` for `id -u`Michael Hoang
2024-10-22users: set `default` for `users.users.<user>.name`Michael Hoang
2024-10-22Use `sysadminctl` instead of `dscl`Andrew Lubawy
Co-authored-by: Michael Hoang <enzime@users.noreply.github.com>
2024-09-05users: allow arbitrary group IDsEmily
The upstream Nix UID/GID changes for Sequoia will require us to manage a group with GID 350. That will require more work on our end to ensure compatibility and a working migration path, but this is enough to allow hacking around it locally in system configurations for now.
2024-04-19treewide: remove lib.mdDocWeijia Wang
2024-03-04Merge pull request #821 from qowoz/usersMichael Hoang
users: fix `forceRecreate` bash comparison
2024-01-20fix: set shell for new users, and only known onesHraban Luyat
2024-01-20fix: user shell path handlingHraban Luyat
Properly detect the binary name (not just /nix/store/...-bash, but include the .../bin/bash), and use the symlinked name which also appears in /etc/shells.
2023-12-04users: fix `forceRecreate` bash comparisonzowoq
2023-06-24treewide: convert all option docs to MarkdownEmily
This process was automated by [my fork of `nix-doc-munge`]; thanks to @pennae for writing this tool! It automatically checks that the resulting documentation doesn't change, although my fork loosens this a little to ignore some irrelevant whitespace and typographical differences. As of this commit there is no DocBook remaining in the options documentation. You can play along at home if you want to reproduce this commit: $ NIX_PATH=nixpkgs=flake:nixpkgs/c1bca7fe84c646cfd4ebf3482c0e6317a0b13f22 \ nix shell nixpkgs#coreutils \ -c find . -name '*.nix' \ -exec nix run github:emilazy/nix-doc-munge/0a7190f600027bf7baf6cb7139e4d69ac2f51062 \ {} + [my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge
2022-08-16Move build user options to `nix` module to improve overlap with NixOSMalo Bourgon
Also add `config.ids` like in NixOS.
2021-10-23add forward compatibility for literalExample deprecationDaiderd Jordan
Fixes #367
2021-02-17users: migrate nixbld -> _nixbldDaiderd Jordan
According to some investigation creating "role" accounts avoids migration problems when upgrading to certain macOS versions, so create the build users to match that definition and remove the old ones if present. Role accounts require name starting with _ and UID in 200-400 range
2020-09-02Remove deprecated types.loaOfMario Rodas
types.loaOf has been deprecated for a long time and is now in the process of removal. See: https://github.com/NixOS/nixpkgs/pull/96042
2020-02-11users: ensure uniqueness of gid/uid entriesDaiderd Jordan
Instead of a cryptic error during activation conflicting ids are now caught during evaluation. error: The option `users.uids.30001' has conflicting definitions
2020-01-21replace list values for types.loaOfDaiderd Jordan
This type has been deprecated in nixpkgs, these options will be replaced with types.attrsOf in the future.
2019-02-24users: gate the creation with an option, false by default and use createhomedirWael M. Nasreddine