1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
Commit graph

52 commits

Author SHA1 Message Date
Michael Hoang
3712ff78cc users: change default shell to /usr/bin/false to match macOS 2024-10-27 21:26:19 +11:00
Michael Hoang
bd161d61d6 users: allow home to be managed by macOS 2024-10-27 21:26:19 +11:00
Michael Hoang
c9af5c2d13 users: update properties on known users 2024-10-27 21:26:19 +11:00
Emily
04193f188e
Merge pull request #1118 from Enzime/push-zvvxxryylwxt
users: ensure users' shells are installed
2024-10-24 09:05:00 +01:00
Michael Hoang
b089e7e726 users: switch back to using dscl for deleting users
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-24 18:33:05 +11:00
Michael Hoang
b702750226 users: ensure Full Disk Access is granted before trying to create users 2024-10-24 14:33:16 +11:00
Michael Hoang
2be05de06e users: add missing newlines for FDA prompt 2024-10-24 14:33:02 +11:00
Michael Hoang
467a0d3d0c users: prevent deleting the user calling darwin-rebuild
`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-24 14:33:02 +11:00
Michael Hoang
bbe1917238 users: ensure users' shells are installed 2024-10-24 14:18:31 +11:00
Michael Hoang
8c02940d70 users: ensure Full Disk Access is granted before trying to delete users 2024-10-23 01:29:01 +11:00
Michael Hoang
0a686597fa users: don't allow name to be empty 2024-10-22 22:54:04 +11:00
Michael Hoang
11c777c719 users: change default description to null 2024-10-22 22:54:04 +11:00
Michael Hoang
ac7932f9de users: use lib.escapeShellArg for group description 2024-10-22 19:43:18 +11:00
Michael Hoang
ea7e178ad4 users: use lib.escapeShellArg for createhomedir 2024-10-22 16:02:21 +11:00
Michael Hoang
8451125cf8 users: use lib.escapeShellArg for dscl paths 2024-10-22 16:02:21 +11:00
Michael Hoang
7bb6366f40 users: use lib.escapeShellArgs instead of custom version 2024-10-22 16:02:21 +11:00
Michael Hoang
26f7e45fb1 users: use lib.escapeShellArgs for sysadminctl -addUser 2024-10-22 16:02:21 +11:00
Michael Hoang
cb2e5fa6c5 users: use lib.escapeShellArg for sysadminctl -deleteUser 2024-10-22 16:02:21 +11:00
Michael Hoang
9a6b12b9ef users: use lib.escapeShellArg for id -u 2024-10-22 16:02:21 +11:00
Michael Hoang
5b873c48ac users: set default for users.users.<user>.name 2024-10-22 16:02:21 +11:00
Andrew Lubawy
2788e4fa98 Use sysadminctl instead of dscl
Co-authored-by: Michael Hoang <enzime@users.noreply.github.com>
2024-10-22 16:02:21 +11:00
Emily
97e0f72759 users: allow arbitrary group IDs
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-09-05 10:39:01 +01:00
Weijia Wang
def1e23be8 treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
Michael Hoang
e7d7a7f0c5
Merge pull request #821 from qowoz/users
users: fix `forceRecreate` bash comparison
2024-03-04 16:25:51 +11:00
Hraban Luyat
f1d47fc2dd fix: set shell for new users, and only known ones 2024-01-20 11:03:15 -05:00
Hraban Luyat
888533c35f fix: user shell path handling
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.
2024-01-20 11:03:15 -05:00
zowoq
0b638a97c0 users: fix forceRecreate bash comparison 2023-12-04 10:31:36 +10:00
Emily
e65131e69c treewide: convert all option docs to Markdown
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
2023-06-24 10:48:55 +01:00
Malo Bourgon
7e74c1c9fb Move build user options to nix module to improve overlap with NixOS
Also add `config.ids` like in NixOS.
2022-08-16 10:41:51 -07:00
Daiderd Jordan
44da835ac4
add forward compatibility for literalExample deprecation
Fixes #367
2021-10-23 15:06:42 +02:00
Daiderd Jordan
5c3146b75d
users: migrate nixbld -> _nixbld
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
2021-02-17 22:04:54 +01:00
Mario Rodas
a34dea283c Remove deprecated types.loaOf
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-09-02 04:20:00 +00:00
Daiderd Jordan
3d50598ae0
users: ensure uniqueness of gid/uid entries
Instead of a cryptic error during activation conflicting ids are now
caught during evaluation.

    error: The option `users.uids.30001' has conflicting definitions
2020-02-11 16:41:40 +01:00
Daiderd Jordan
267f50e63d
replace list values for types.loaOf
This type has been deprecated in nixpkgs, these options will be
replaced with types.attrsOf in the future.
2020-01-21 12:11:32 +01:00
Wael M. Nasreddine
41a00f14b4
users: gate the creation with an option, false by default and use createhomedir 2019-02-24 22:13:45 +01:00
Wael M. Nasreddine
7c68f69154
users: create/chown the home only when it is different than /var/empty 2019-02-24 22:06:45 +01:00
Wael M. Nasreddine
303c5fbb00
users: create the home-directory for a new user 2019-02-24 22:06:37 +01:00
Daiderd Jordan
6c6c8f2164
users.users: only extend profiles if packages are defined 2019-02-23 12:00:39 +01:00
Daiderd Jordan
ece03c592e
Merge pull request #127 from kalbasit/nix-darwin_user-packages
users: install user packages via users.users.<name?>.packages
2019-02-23 11:45:40 +01:00
Wael M. Nasreddine
5e6570c07c
order the environment 2019-02-21 15:57:51 -08:00
Daiderd Jordan
132a7f0a09 users: increase default nixbld users to 32 and set knownUsers by default
Since the users.nix.configureBuildUsers target nixbld users, don't require
them to be added to knownUsers explicitly.
2019-02-21 23:15:09 +01:00
Wael M. Nasreddine
4ffabd184a
users: install user packages via users.users.<name?>.packages 2019-02-20 08:20:32 -08:00
Daiderd Jordan
fa3f67966b
types.string -> types.str
These options unintentionally used the deprecated string type, the
important difference between these is the fact that string merges by
default (similar to eg. lines) while str can only have a single value.
2018-07-21 13:27:08 +02:00
Daiderd Jordan
c1a1ac273d
users: add forceRecreate option 2018-06-22 12:16:51 +02:00
Daiderd Jordan
055287cf98
users: update the description for knownGroups/knownUsers 2018-03-03 13:51:48 +01:00
Daiderd Jordan
4e0ddf3061
users: add option to configure nixbld users. 2018-01-14 16:58:09 +01:00
Daiderd Jordan
1ba19da50d
users: make users hidden by default 2018-01-14 16:45:43 +01:00
Daiderd Jordan
b1645201f1
users: add support for group members
Unlike user options this is updated if the group already exists.
2018-01-14 13:26:18 +01:00
Daiderd Jordan
5250bc0f69
users: remove enable option 2018-01-13 22:59:34 +01:00
Daiderd Jordan
3db35e87f0
users: move submodules to separate files 2018-01-13 13:52:30 +01:00