Commit Graph

31 Commits

Author SHA1 Message Date
Shogo Takata
3fdfb983c7 nixosTests.pam-zfs-key: fix dataset mounting
The test created ZFS datasets with canmount=noauto, but pam_zfs_key's
mount_dataset() now checks canmount == ZFS_CANMOUNT_ON and skips
mounting otherwise (added in
https://github.com/openzfs/zfs/commit/387ed5ca41). Use the default
canmount=on and unmount before unloading the key to compensate for
the auto-mount that happens when the key is loaded during creation.
This also silences the warning for forceImportRoot.

Assisted-by: opencode with DeepSeek V4 Flash Free
2026-05-19 05:10:37 +09:00
Sandro
0046a994e9 nixos/pam: rename updateWtmp to lastlog.enable, add silent option (#501540) 2026-05-06 23:00:35 +00:00
andre4ik3
462c2bc5d6 nixos/tests/pam-lastlog: use user account instead of run0
Fixes the test, it has been broken for a while now on master.
2026-05-05 15:09:37 +00:00
andre4ik3
3b2061fddb nixos/pam: rename updateWtmp to lastlog.enable, add silent option 2026-05-05 15:09:34 +00:00
Michael Daniels
2e87c2f8f4 nixos/*: remove unused let bindings
Generated using deadnix (with some manual work); split from #514611.
2026-05-01 20:39:14 -04:00
Philip Taron
098b000a36 nixos/tests: add end-to-end pam_u2f and polkit sandbox tests
pam-u2f: Registers a U2F credential with pamu2fcfg against a virtual
FIDO device (QEMU u2f-emulated), then logs in as alice at a TTY —
the device authenticates her automatically with no password.

pam-u2f-polkit: Verifies the polkit-agent-helper@ sandbox fix by
showing that PrivateDevices=yes blocks hidraw access (the bug), the
module overrides are applied, and fido2-token/pamu2fcfg work inside
the full polkit sandbox (the fix).
2026-04-01 16:50:22 -07:00
Moraxyc
012275a219 nixosTests.pam-pgsql: init 2025-12-16 20:17:15 +08:00
Grimmauld
122c5aa7d9 nixos/tests/pam-lastlog: test legacy lastlog importer 2025-08-11 10:37:56 +02:00
Grimmauld
0efdf36544 nixos/tests/lastlog: init 2025-07-31 22:38:53 +02:00
Sizhe Zhao
f34483be5e nixosTests: handleTest -> runTest, batch 1
Reference: https://github.com/NixOS/nixpkgs/issues/386873
2025-05-26 20:40:17 +08:00
Shogo Takata
d04bf86381 nixos.tests.pam-file-contents: fix build failure
This fixes the test for pam file contents.
The pam file started using fully-qualified paths in the following
commit.
7306423158
2025-05-20 15:14:55 +09:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
novenary
fcccfb9e48 nixos/pam/u2f: implement RFC0042
This module has a lot of options, so it's a good candidate for freeform
settings.
2024-07-05 17:07:02 +03:00
Marco Rebhan
fed77d1705 nixos/krb5: move to security.krb5 2023-12-21 11:35:26 +01:00
Majiir Paktu
43f7cb4a95 nixos/pam: add order comment to each rule line 2023-10-10 21:11:35 -04:00
Majiir Paktu
5b8439f966 nixos/pam: add settings option for common argument styles
Adds easily overrideable settings for the most common PAM argument
styles. These are:

- Flag (e.g. "use_first_pass"): rendered for true boolean values. false
  values are ignored.

- Key-value (e.g. "action=validate"): rendered for non-null, non-boolean
  values.

Most PAM arguments can be configured this way. Others can still be
configured with the 'args' option.
2023-10-10 21:11:34 -04:00
Majiir Paktu
6eea7fb194 nixos/pam: extract args field
Module arguments have common escaping rules for all PAMs.
2023-10-09 23:17:37 -04:00
Nicola Squartini
56e894b0b1 nixos/pam: add test for ZFS home dataset unlocking 2023-05-15 09:22:42 +02:00
Martin Weinelt
4472cf44eb treewide: Make yescrypt the default algorithm for pam_unix.so
This ensures `passwd` will default to yescrypt for newly generated
passwords.
2023-03-13 07:54:27 +01:00
Robert Hensing
e260018f9c nixos/tests: Add names 2022-09-24 17:38:09 +01:00
Arian van Putten
55bd770662 Merge pull request #167514 from shimunn/pam_u2f_module
nixos/security/pam: added `origin` option to pamu2f
2022-07-16 10:56:26 +02:00
shimun
327d99c0ca nixos/security/pam: added origin option to pamu2f 2022-07-15 20:38:24 +02:00
Bobby Rong
906b0b2e87 nixos/tests: fix all tests that uses wait_until_tty_matches 2022-06-04 12:22:03 +08:00
Artturi
0b64a2d69a Merge pull request #167108 from aaronjheng/oath-toolkit
oath-toolkit: Rename from oathToolkit to oath-toolkit
2022-05-05 03:58:39 +03:00
Luke Granger-Brown
1be4ba01ac Merge pull request #164025 from lukegb/pam-ussh
pam-ussh: init at unstable-20210615
2022-04-11 01:25:45 +01:00
Aaron Jheng
f0c470f5eb oath-toolkit: Rename from oathToolkit to oath-toolkit 2022-04-04 01:11:06 +00:00
Robert Hensing
aa0f27abb0 treewide: machine -> nodes.machine 2022-03-28 14:11:58 +02:00
Luke Granger-Brown
1853015550 nixos/pam: add support for pam-ussh
pam-ussh allows authorizing using an SSH certificate stored in your
SSH agent, in a similar manner to pam-ssh-agent-auth, but for
certificates rather than raw public keys.
2022-03-13 17:31:46 +00:00
Victor Engmark
3b2e6e72fa tests: Move all PAM tests into a separate directory
As per
<https://github.com/NixOS/nixpkgs/pull/146467#issuecomment-972743535>.
2021-11-27 20:36:50 +02:00
Victor Engmark
595543a314 tests: Verify /etc/pam.d/chfn file contents 2021-11-27 15:55:46 +13:00