Michael Hoang
9cd3976486
users: ensure all users' home directories in the config are correct
2024-10-27 21:52:41 +11:00
Michael Hoang
55be3e1a5f
users: move checks to system.checks
2024-10-27 21:52:41 +11:00
Michael Hoang
dc6f754fe5
users: allow shell
to be managed by macOS
2024-10-27 21:52:41 +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
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
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
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
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
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
Wael M. Nasreddine
5e6570c07c
order the environment
2019-02-21 15:57:51 -08:00
Wael M. Nasreddine
4ffabd184a
users: install user packages via users.users.<name?>.packages
2019-02-20 08:20:32 -08: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
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
3db35e87f0
users: move submodules to separate files
2018-01-13 13:52:30 +01:00