1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
Commit graph

1198 commits

Author SHA1 Message Date
edef 725bb4e48c lib: add xor
This gets clumsily reimplemented in various places, to no useful end.
2024-04-04 19:46:58 +00:00
Adam Stephens 790fb86a7f
nixos/users-groups: move linger to oneshot and add nixos test 2024-03-21 19:51:05 -04:00
Adam Stephens 564c3749d9
nixos/users-groups: fix broken linger 2024-03-21 13:47:15 -04:00
Silvan Mosberger 308671dbe8 nixos/nix: Fix example for nix.settings option
Attribute sets aren't valid option values, needs to be a list
2024-03-19 22:55:19 +01:00
Guillaume Girol 1f26e67560
Merge pull request #278064 from symphorien/nix_config_extra
nixos/nix: add workaround for https://github.com/NixOS/nix/issues/9487
2024-03-15 22:46:51 +01:00
Janik H. fc060cc3cb nixos/resolvconf: add ::1 as local dns resolver 2024-03-15 19:31:37 +01:00
Sandro c86e8fd7a0
Merge pull request #133542 from fpletz/refactor/pinentry-remove-multiple-outputs
pinentry: remove multiple outputs
2024-03-09 23:57:27 +01:00
Jordan Williams 8558d7b1ce
nixos/users-groups: Fix the update-lingering activation script failing
The update-lingering activation script currently fails during rebuilds.
This happens when removing a user with linger enabled.
The call to loginctl disable-linger runs for the non-existent user.
This returns an error code which causes the failure.

To mitigate this, this PR removes any residual linger files.
These are files named for the user in /var/lib/systemd/linger.
A simple check for user existence determines whether to delete the file.
This happens before the call to disable-linger to avoid any errors.

Fixes #283769.
2024-03-03 12:00:25 -06:00
Guillaume Girol 5b274d5f01 nixos/nix: add workaround for https://github.com/NixOS/nix/issues/9487
Nix has a suprising behavior where if the option `extra-foo` is set before `foo`, then setting `foo` overwrites the setting for `extra-foo`. This is reported as https://github.com/NixOS/nix/issues/9487, and will likely not be fixed any time soon.

This works around this issue by always putting `extra-*` settings after non-extra ones in the nixos-generated `/etc/nix.conf`.
2024-03-03 17:03:46 +01:00
Franz Pletz 764d15f59f
pinentry: remove multiple outputs package
fixes #133156 #124753
2024-03-02 17:16:53 +01:00
github-actions[bot] a3e2b0de90
Merge master into staging-next 2024-02-24 12:01:15 +00:00
Colin a65967a12c nixos/nix: documentation: fix outdated reference to /etc/nix.conf 2024-02-24 21:29:38 +11:00
github-actions[bot] 2ad339408a
Merge staging-next into staging 2024-02-18 00:02:44 +00:00
Sandro d12bb5b983
Merge pull request #213783 from SuperSandro2000/nox-vte
nixos/vte: use vte without any GUI dependencies; nixos/no-x-libs: add vte
2024-02-17 20:55:54 +01:00
github-actions[bot] 8bc9edd60d
Merge staging-next into staging 2024-02-17 18:01:24 +00:00
Jan Tojnar f896ce73af
Merge pull request #268197 from jtojnar/xdp-variable-changes
xdg-desktop-portal: Use custom variable for finding portals
2024-02-17 14:18:55 +01:00
github-actions[bot] daaa4e1653
Merge staging-next into staging 2024-02-17 00:02:47 +00:00
Linus Heckemann 5863c27340
Merge pull request #287506 from Ma27/warn-user-password-options
nixos/users-groups: warn on ambiguous password settings
2024-02-16 22:20:38 +01:00
Izorkin fdf77d10cb
nixos/no-x-libs: build pipewire without vulkan support 2024-02-16 09:21:00 +03:00
Jonas Chevalier c3ef726ee1
nixos/ldso: avoid instance of nixpkgs (#288509)
Follow-up to #269551

Avoid creating a new instance of nixpkgs to access two variables.
`pkgs.pkgsi686Linux` was being accessed whenever the feature is being
used or not.

A second instance of nixpkgs is being created in
`nixos/modules/config/stub-ld.nix` and can be disabled by setting
`environment.ldso32 = null` or `environment.stub-ld.enable = false`.

Both combined fixes this error:

    error: attribute 'i686-linux' missing
2024-02-15 13:01:03 +01:00
Jan Tojnar fe40e99020 nixos/xdg/portal: Use systemPackage instead of buildEnv
Portals are global so we can just link them globally.

There might, in theory, be some unexpected system-path contamination
(e.g. when a portal package installs its executables to `/bin`)
but I think the risk is relatively minor compared to the added complexity.

While at it, let’s point the environment variable to system-path.
That will allow changes to installed portals to apply without having to re-log in.
2024-02-11 03:32:47 +01:00
Jan Tojnar 3b2f55e89f xdg-desktop-portal: Use custom variable for finding portals
x-d-p only looks for portal definitions in one of two places:
- datadir (which we cannot install anything to, since Nix packages are immutable)
- when `XDG_DESKTOP_PORTAL_DIR` environment variable is set, the path specified therein
  (meant for tests, disables looking for portal configuration anywhere else)

Let’s introduce our own `NIX_XDG_DESKTOP_PORTAL_DIR` environment variable
that will only control the portal definitions lookup.
We will not use it for searching for configuration
because it would require looking in the parent directory
and `XDG_CONFIG_DIRS` variable is sufficient for us.
2024-02-11 03:21:55 +01:00
Maximilian Bosch f6954309e8
nixos/users-groups: warn on ambiguous password settings
After 4b128008c5 it took me a while in a
test setup to find out why `root` didn't have the password anymore I
declared in my config.

Because of that I got reminded how the order of preference works for the
password options:

    hashedPassword > password > hashedPasswordFile

If the user is new, initialPassword & initialHashedPassword are also
relevant. Also, the override is silent in contrast to any other
conflicting definition in NixOS.

To make this less surprising I decided to warn in such a case -
assertions would probably break too much that technically works as
intended.

Also removed the `initialHashedPassword` for `root`. This would cause a
warning whenever you set something in your own config and a `!` is added
automatically by `users-groups.pl`.

`systemd-sysusers` also seems to implement these precedence rules, so
having the warning for that case also seems useful.
2024-02-09 16:44:35 +01:00
Izorkin 15dfbbd4c3
fastfetch: add vulkanSupport option 2024-02-05 01:32:05 +03:00
Izorkin 69206539d4
fastfetch: add waylandSupport option 2024-02-05 01:32:04 +03:00
Izorkin 556b8c7b6f
fastfetch: add x11Support option 2024-02-05 01:32:03 +03:00
Izorkin fd21b17628
nixos/no-x-libs: add gpg-tui 2024-01-29 12:35:22 +03:00
Linus Heckemann 18e5176621
Merge pull request #270727 from nikstur/nixos-perlless-activation
Perlless Activation
2024-01-22 10:11:44 +01:00
nikstur eec1845744 nixos/systemd-sysusers: init 2024-01-18 23:08:14 +01:00
Victor Engmark d516870f42
nixos/modules: Split recursive mkdir with permissions
Detected by ShellCheck as violating
<https://github.com/koalaman/shellcheck/wiki/SC2174>.
2024-01-16 08:36:08 +13:00
Peder Bergebakken Sundt dff635f38d
Merge pull request #243169 from 2xsaiko/outgoing/krb5
nixos/krb5: cleanup, fix and RFC42-ify
2024-01-10 21:06:15 +01:00
Sandro Jäckel 6b73be0ca5
nixos/no-x-libs: add gjs 2024-01-08 23:54:58 +01:00
Nick Cao fb6f005181
Merge pull request #272552 from SuperSandro2000/ghostscript-nox
nixos/no-x-libs: add ghostscript
2023-12-30 13:23:42 -05:00
nikstur 0ebd39b541 nixos/nix-channel: remove unused stringAfter 2023-12-29 03:41:45 +01:00
nikstur 994df434ba nixos/ldap: replace activationScript
Replace with a dedicated systemd service.
2023-12-29 03:20:28 +01:00
Luflosi 8cdabf9cf8
nixos/sysctl: cleanup
- Use `options = {` instead of repeating `options` for every option
- Change the description of "net.core.rmem_max" slightly to match the kernel documentation
2023-12-28 17:38:33 +01:00
nikstur c9569af3e0
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
2023-12-27 08:33:26 +01:00
Nick Cao 5cfba53fc6
Merge pull request #258812 from Izorkin/fix-noxlibs
nixos/no-x-libs: fix build packages
2023-12-26 13:09:23 -05:00
Nick Cao 7d54909829
Merge pull request #253263 from SuperSandro2000/nox-intel-vaapi-driver
nixos/no-x-libs: add intel-vaapi-driver
2023-12-25 17:16:15 -05:00
Izorkin 2e14d8ba72
nixos/no-x-libs: build qtbase without qt translation 2023-12-25 23:31:25 +03:00
Marco Rebhan fed77d1705
nixos/krb5: move to security.krb5 2023-12-21 11:35:26 +01:00
Marco Rebhan 92a541c0ed
nixos/krb5: cleanup, fix and RFC42-ify
This replaces the krb5 module's options with RFC 42-style krb5.settings
option, while greatly simplifying the code and fixing a few bugs,
namely:

- #243068 krb5: Configuration silently gets ignored when set by
  multiple modules
- not being able to use mkIf etc. inside subattributes of
  krb5.libdefaults, e.g. krb5.libdefaults.default_realm = mkIf ...

See #144575.
Closes #243068.

Co-authored-by: h7x4 <h7x4@nani.wtf>
2023-12-21 11:34:59 +01:00
Peder Bergebakken Sundt 0f92e92565
Merge pull request #263661 from SuperSandro2000/pulseaudio-no-avahi
nixos/pulseaudio: don't create config file or enable avahi when pulse…
2023-12-18 00:10:29 +01:00
K900 1950eec4aa nixos/ldso: remove string context from linker soname
Unbreaks installer tests that otherwise start depending on i686-glibc
2023-12-15 12:39:26 +03:00
Lin Jian 73b3a1450f
Merge pull request #274110 from networkException/sysctl-net.core.wmem_max
nixos/{sysctl,caddy}: improvements for net.core.wmem_max
2023-12-14 23:14:17 -06:00
networkException 439350753e
nixos/sysctl: use highest value on conflict for net.core.wmem_max
we previously defined a custom type for `boot.kernel.sysctl."net.core.rmem_max"`
to resolve to the highest value set. this patch adds the same behavior to
`"net.core.wmem_max"`.

as this changes the type from a string to an integer, which is a breaking
change this patch also includes a release note and updates the transmission
module to use a number for `wmem_max`.
2023-12-15 04:43:57 +01:00
Alyssa Ross 59dc10b5a6 nixos/users-groups: fix confusing error message
If we include users with unset groups, we get this very confusing
message, with invalid Nix code:

       - The following users have a primary group that is undefined: qyliss
       Hint: Add this to your NixOS configuration:
         users.groups. = {};

We don't need to include such users in this check, since they'll be
caught anyway by this one:

       - users.users.qyliss.group is unset. This used to default to
       nogroup, but this is unsafe. For example you can create a group
       for this user with:
       users.users.qyliss.group = "qyliss";
       users.groups.qyliss = {};
2023-12-14 02:08:16 +01:00
Robert Hensing bef10a5ace
Merge pull request #269551 from tejing1/nixos-stub-ld
nixos/stub-ld: init module
2023-12-13 22:36:30 +01:00
Lin Yinfeng b21e84ea8d
nixos/iproute2: use rt_tables.d to avoid IFD 2023-12-12 23:31:25 +08:00
Sandro Jäckel cbc8f4164b
nixos/pulseaudio: don't create config file or enable avahi when pulse is disabled 2023-12-11 14:38:18 +01:00