Commit graph

1444 commits

Author SHA1 Message Date
Philip Taron 8279ffe622
treewide: specify that mebibytes are used when it's ambiguous (#424169) 2025-07-11 12:29:33 -07:00
Axel Karjalainen 7159ab6f43 treewide: specify where mebibytes are used when it's ambiguous 2025-07-11 00:44:23 +03:00
DavHau 485b06a376 nixos/sysctl: sane inotify defaults globally
Currently, sane inotify limits are only set when graphical-desktop is enabled, but inotify is also used on servers by non-graphical applications
2025-06-17 18:47:31 +07:00
Moraxyc 069c640f76
nixos/getaddrinfo: init
This commit introduces a new NixOS module `networking.getaddrinfo` to allow
declarative configuration of `/etc/gai.conf`, which controls address
selection behavior for `getaddrinfo(3)` as defined in RFC 3484 and
RFC 6724.
2025-06-10 20:08:52 +08:00
Johannes Kirschbauer 6d8eca96ba
sysctl: remove unnecessary definition filtering 2025-05-30 22:45:46 +02:00
arcnmx 41725bb0f7 nixos/swap: require mkswap when encrypted
the mkswap service manages a dm/luks block device when randomEncryption
is enabled, and is not an optional dependency of the swap unit
2025-05-29 19:28:40 +05:30
Katalin Rebhan 6f7d7cf76f
nixos/users-groups: allow changing default home directory 2025-05-25 19:25:06 +02:00
Doron Behar 82dfbe95f5 nixos/i18n: Re-add special handling of LANGUAGE
This reverts commit 263297b4e5 while also
explaining in the docs where exactly LANGUAGE is ignored, and why.

Fixes #409306.
2025-05-23 09:13:29 +03:00
Doron Behar 263297b4e5 nixos/i18n: Remove special handling of LANGUAGE
Partially revert #179194 which first filtered
`extraLocaleSettings.LANGUAGE`. Indeed this environment variable is
given precedence according to:

https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html

So using it will simply make all other `extraLocaleSettings` be ignored
in practice, but the OS shouldn't ignore it when aggregating the locales
required in general, as this setup should still be legitimate, and it
may even be useful if you wish to set it by default and use `env -u
LANGUAGE` for some programs.
2025-05-19 18:09:27 +03:00
Doron Behar e8581078a1 i18n: Add charset related settings
Fixes #404758
2025-05-19 18:09:27 +03:00
nixpkgs-ci[bot] 6c6ee2d903
Merge master into staging-next 2025-05-03 18:04:30 +00:00
musjj b94a794a6e nixos/i18n: support "all" for extraLocales 2025-05-02 14:23:45 +07:00
nixpkgs-ci[bot] 57718699b1
Merge master into staging-next 2025-04-30 09:29:33 +00:00
Doron Behar 708480f836
nixos/i18n: add extraLocales option (#356477) 2025-04-30 12:06:27 +03:00
musjj 07dde5f4c4 nixos/i18n: refactor aggregated locales into a variable 2025-04-28 22:04:41 +07:00
musjj 0f13f78d02 nixos/i18n: warn when the user has a badly-configured supportedLocales 2025-04-28 22:04:41 +07:00
musjj 401ec59a17 nixos/i18n: hide supportedLocales from the manual 2025-04-28 22:04:41 +07:00
musjj 073e4bd689 nixos/i18n: add extraLocales option 2025-04-28 02:48:08 +07:00
nixpkgs-ci[bot] a821261015
Merge master into staging-next 2025-04-27 12:05:44 +00:00
Vladimír Čunát 22f5df0632
stub-ld: disable 32-bit stub ld on 64-bit systems (#398449) 2025-04-27 13:37:43 +02:00
nixpkgs-ci[bot] 032ce947b2
Merge staging-next into staging 2025-04-22 12:06:47 +00:00
Felix Stupp 012fdbe02c
nixos/nix-flakes: ref to man page about flake registry 2025-04-22 10:07:43 +02:00
mikitsu 374b2ed9f9
nixos/users-groups: add warning when changing subuid ranges 2025-04-21 21:09:02 +02:00
mikitsu 46600598f1
nixos/users-groups: don't allocate coinciding subuid ranges with autoSubUidGidRange
Previously, when adding a new user when at least two users already exist,
this new user was assigned the same subuid range as the second existing user.
2025-04-21 21:09:00 +02:00
Jörg Thalheim e9b95509b2 stub-ld: disable 32-bit stub ld on 64-bit systems
This pulls in another instance of nixpkgs including glibc.
This is both not great from a evaluation perspective and a dependency
closure.

So let's remove this part from nixpkgs again and re-enable it, when we
have slimmed down the build according to `environment.ldso32 = mkIf
pkgs.stdenv.hostPlatform.isx86_64 (mkDefault stub-ld32);`
2025-04-14 10:18:54 +02: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
Austin Horstman f62c664b16
qt: add "kde6" to qt.platformTheme (#384669) 2025-03-31 00:00:31 -05:00
Aleksana f42205ed7f
xdg/portals/lxqt: Fix documentation string indent (#391909) 2025-03-27 18:52:23 +08:00
Aleksana b4ded625bd
nixos/environment: make {sessionV,v}ariables items nullable (#354186) 2025-03-27 10:10:31 +08:00
Will Fancher eefd9323ae Revert "24.11 beta release"
This reverts commit f49e820fbc.

This should have only been on release-24.11, not master
2025-03-24 19:39:13 -04:00
Kovacsics Robert 357a75fda7
xdg/portals/lxqt: Fix documentation string indent
I just spotted this while browsing the code, but double checked and it
looks badly indented in the manpages and on the web too.
2025-03-21 17:43:48 +00:00
K900 b64ec1944e
nixos/fonts: ship fontconfig caches even for cross-compiled hosts (#391305) 2025-03-20 09:06:38 +03:00
Silvan Mosberger 4f6e508a09
nixos/users-groups: Enforce ASCII usernames and fix repeated doubling of activation script runtime (#385904) 2025-03-19 17:33:49 +01:00
Colin 9435a2b422 nixos/fonts: ship fontconfig caches even for cross-compiled hosts 2025-03-19 07:53:24 +00:00
NovaViper 841c9ff665
qt: add "kde6" to qt.platformTheme
Related issue: #260696
- Adds KDE Plasma 6 support, which fixes various issues with setting the
QT platform theme on the desktop environment
2025-03-10 20:26:45 -05:00
Sandro 74ee058fc3
nixos/sudo-rs: align sudo and sudo-rs config (#386423) 2025-03-10 16:51:43 +01:00
Jörg Thalheim 611bfa1dd4
make nix.settings.system-features default mergeable again (#383052) 2025-03-10 13:09:49 +01:00
Connor Baker 871cda0b06
testers.shellcheck: refactor, update docs, and simplify tests (#385940) 2025-03-07 20:53:33 -08:00
Connor Baker cd7df192e3 treewide: add name argument to calls to testers.shellcheck 2025-03-08 00:15:22 +00:00
Philip Taron f041d52e7b
nixos/users-groups: Add assert on null shells (#279431) 2025-03-07 12:54:52 -08:00
r-vdp 4e17c9546f
nixos/sudo-rs: align sudo and sudo-rs config
Since the latest release, sudo-rs supports all what we need
2025-03-02 17:42:18 +01:00
Silvan Mosberger b602f86829 nixos/users-groups: Catch invalid usernames early
Prevents running into the problem from the parent commit in the first
place.
2025-02-28 22:33:55 +01:00
Silvan Mosberger 8181d2a7c1 nixos/user-groups: Don't double-UTF8-encode subUidMapFile
Because with it only being single-UTF8-decoded, this lead to the file
~doubling in size whenever it contained any non-ascii characters!
2025-02-28 21:55:12 +01:00
Sandro d1c535f62a
nixos/user-groups: add a toggle for user account creation (#358646) 2025-02-27 23:47:20 +01:00
Michele Guerini Rocco d05074f981
nixos/getty: only include if config.console.enable == true (#363533) 2025-02-18 11:44:42 +01:00
Jörg Thalheim 7b912bcafe make nix.settings-system-features default mergeable again 2025-02-18 15:30:43 +07:00
Sandro 03b6a553eb
nixos/users-groups: split isSystemUser/isNormalUser and uid check into two (#357944) 2025-02-16 20:35:45 +01:00
Christian Kögler aa980ac71b
nixos/nix: restructure default for system-features (#372878) 2025-02-14 00:11:19 +01:00
Peder Bergebakken Sundt 18e12e5a85 nixos/*: cleanup code-escaped manpage urls
Done with

    rg '[a-zA-Z.-]+\([0-9]+\)' -tnix nixos/ -l | xe sd '`\{manpage\}`([a-zA-Z.-]+\([0-9]+\))``' '{manpage}`$1`'
2025-02-05 13:22:07 +01:00
NotAShelf 1dd23b5d74
nixos/user-groups: add a toggle for user account creation
Microscopic change that allows users to toggle user accounts, per user, conditionally.
2025-02-02 02:07:03 +03:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Christian Kögler ea9594ba15 nixos/nix: restructure default for system-features
Assign default for option system-features at the common place. It
allows use to re-use the default value in cause of setting the option.
2025-01-11 11:56:44 +01:00
misuzu 77351e03d8
nixos/fontdir: fix X11-fonts cross compilation (#366959) 2024-12-31 16:50:29 +02:00
nicoo 238b407862
nixos: hardware.pulseaudio → services.pulseaudio (#369391) 2024-12-30 13:46:50 +00:00
Jeffrey C. Ollie 3c6c6920b3
ghostty: init at 1.0.0 (#368404)
* maintainers: add jcollie

* ghostty: init at 1.0.0
2024-12-27 22:04:47 -05:00
Maximilian Bosch 601a97f671
Merge: Correct password option docs and add related tests (#310484) 2024-12-22 15:45:08 +01:00
Maximilian Bosch cb9b3fd788
nixos/modules: remove a few whitespaces from the pw override parts
Otherwise the evaluation warnings have a two or even three lines of
whitespace between paragraphs.
2024-12-22 15:32:56 +01:00
Jared Baur e9e1d145f6
nixos/fontdir: fix X11-fonts cross compilation 2024-12-20 15:50:01 -08:00
Adam Dinwoodie 3275a6b361 nixos/nix-remote-build: correct comment
This module potentially generates `/etc/nix/machines`. Correct an
existing comment to refer to that path rather than `/etc/machines`.
2024-12-20 10:55:08 +00:00
Moritz Sanft 7fb2f407c0
nixos/getty: only include if config.console.enable
This makes it so that the getty units are only included if
`config.console.enable` is set to `true`. Previously, they would be
included, but disabled in that case, which is unnecessary.
2024-12-16 08:45:10 +01:00
fidgetingbits 52ce5caf36
nixos/users-groups: Correct and refactor password override documentation
Testing showed that the existing documentation regarding password override
ordering was incorrect. This commit corrects the errors and refactors
the way the text is constructed to make updating future ordering
changes significantly easier.
2024-12-15 12:21:32 +08:00
Aly Raffauf 3de5332bba
nixos/qt: install kio when qt.platformTheme = "kde" (#364032) 2024-12-11 13:17:04 +02:00
Alyssa Ross e9eff47002 nixos/networking: don't add extra names to ::1
From hosts(5):

> For each host a single line should be present with the following
> information:
>
>               IP_address canonical_hostname [aliases...]

With lines like "::1 localhost ahost.adomin ahost", we were saying
that the canonical name for "ahost" was "localhost", the opposite of a
canonical name.  This is why a second loopback address (127.0.0.2) is
used for hostnames with IPv4 — if they were put after "localhost" on
the 127.0.0.1 line, the same thing would happen.  With IPv6 we can't
do the same thing as there's only a single loopback address, so
instead the right thing to do is to simply not list the hostnames in
/etc/hosts, and rely on the myhostname NSS plugin, which will handle
this correctly.

(Note that the examples in hosts(5) also do not include IPv6 FQDN or
hostname entries.)
2024-12-11 11:09:40 +01: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
Emil Thorsoe 92a4d1d60d enableAllTerminfo: re-add unbroken contour 2024-11-27 14:12:20 +02:00
Sandro Jäckel db0a0b1173
nixos/users-groups: split isSystemUser/isNormalUser and uid check into two
Before the error message only mentioned isSystemUser/isNormalUser which
lead to a confusing situation when setting isNormalUser and an uid like
500 which would generate an error like:

error:
Failed assertions:
- Exactly one of users.users.other.isSystemUser and users.users.other.isNormalUser must be set.

from which you cannot know that setting the uid to 500 *and* setting
isNormalUser is the actual problem.

With this patch the error looks like:

error:
Failed assertions:
- A user cannot have a users.users.fixme.uid set below 1000 and set users.users.fixme.isNormalUser.
Either users.users.fixme.isSystemUser must be set to true instead of users.users.fixme.isNormalUser
or users.users.fixme.uid must be changed to 1000 or above.
2024-11-22 15:46:00 +01:00
Tristan Ross f49e820fbc
24.11 beta release 2024-11-14 09:02:09 -08:00
Chuang Zhu 69f37ce6dc nixos/environment: make {sessionV,v}ariables items nullable 2024-11-07 17:53:02 +08:00
Philip Taron e50c6cab11
treewide: fix links to specifications.freedesktop.org (#350918) 2024-11-03 09:06:56 -08:00
Maximilian Bosch 9c9b193569
Merge: nixos/users-groups: dump values of password options if multiple options have definitions (#349308) 2024-10-31 10:17:47 +01:00
rnhmjoj 8fafc35158
resolvconf: reliably set group permissions
If `resolvconf` is invoked by a process not running with the resolvconf
group as primary group, other processes will run into trouble as files
or directories under /run/resolvconf won't have write permissions.

This ACL rule ensure that resolvconf files, include new files created by
any process, are always accessible by users of the resolvconf group.
2024-10-25 21:33:30 +02:00
Victor Duarte f2b58efde4 fix links to specifications.freedesktop.org 2024-10-24 13:00:55 +02:00
David McFarland 403604ca66 resolvconf: use correct output files when used with dnsmasq 2024-10-17 14:20:57 -03:00
Maximilian Bosch 7cb22a0acb
nixos/users-groups: dump values of password options if multiple options have definitions
This was suggested since it might make it a little easier to identify
the places where the definitions come from.

Retrieving the effective definitions from the module-system seems
non-trivial, especially for submodules though, hence only the values are
shown for now.

I'd argue that especially the `password` option are mostly a convenience
thing for test setups. If the password is an actual secret, it should be
treated as such, i.e. `hashedPasswordFile` should be used.

For the `shadow` VM test, the new section of the warning looks like
this:

    The values of these options are:
    * users.users."leo".hashedPassword: "$6$ymzs8WINZ5wGwQcV$VC2S0cQiX8NVukOLymysTPn4v1zJoJp3NGyhnqyv/dAf4NWZsBWYveQcj6gEJr4ZUjRBRjM0Pj1L8TCQ8hUUp0"
    * users.users."leo".hashedPasswordFile: null
    * users.users."leo".password: null
    * users.users."leo".initialHashedPassword: "!"
    * users.users."leo".initialPassword: null
2024-10-17 17:41:34 +02:00
rnhmjoj 52e2e7027d
dhcpcd: fix race between namespace setup and resolvconf
systemd requires paths in `ReadWritePaths=` to exist before setting up
the service sandbox, so dhcpcd should be ordered after resolvconf.
Making resolvconf a oneshot service ensure `After=resolvconf.service`
works correctly.
2024-10-14 08:02:46 +02:00
github-actions[bot] e9c8665026
Merge master into staging-next 2024-10-05 00:14:01 +00:00
jade f0ce0e71c3
Remove the revCount attribute from the generated flake registry (#316225) 2024-10-04 15:25:55 -07:00
github-actions[bot] 192fd67cc3
Merge master into staging-next 2024-10-03 18:04:30 +00:00
Christina Sørensen c911876981
nixos/terminfo: remove broken package contour
Contour was broken for aarch64 in #253334, and completely broke
in #344788 for all platforms.

This removes the broken package, and adds a notice to remove broken
packages in the future. aarch64 users have waited a year for this to be
fixed, so I think we should lean to be more eager to remove in general,
and then the fix can come when it is ready, instead of letting it block
this.

Resolves: #258515
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-10-02 05:56:13 +02:00
github-actions[bot] 8e5ca58e0a
Merge master into staging-next 2024-09-29 12:05:05 +00:00
K900 ce7068660a nixos/xdg/icons: add fallbackThemes option 2024-09-29 08:42:20 +03:00
Artturin f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Fabián Heredia Montiel 9b2a506736 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:

- pkgs/tools/package-management/nix/default.nix
2024-09-22 13:45:27 -06:00
rnhmjoj 19a494135a
nixos/resolvconf: add a resolvconf group
This group is useful to allow specific users to run resolvconf and
(and this modify /etc/resolv.conf) without root privileges.
2024-09-16 01:22:58 +02:00
Matt Moriarity 768db4009e nixos: remove environment.noXlibs 2024-09-15 07:51:45 -06:00
github-actions[bot] 563bb0fbc2
Merge master into staging-next 2024-09-04 18:04:23 +00:00
éclairevoyant f6306c0961
treewide: fix eval related to with lib; removal 2024-09-04 12:21:09 -04:00
Jan Tojnar e9179b4fa3 Merge branch 'master' into staging-next 2024-09-01 19:04:04 +02:00
Étienne Simon b5574c71be
Fix nested quotes in fontconfig.nix
A sed with nested double quotes is inserting malformed XML into /etc/fonts/fonts.conf, this commit put the sed command into single quotes to properly insert double quotes to enclose the XML attribute.
2024-09-01 15:55:12 +02:00
Jan Tojnar c2f1fa833e gnome-session: Move from gnome scope to top-level 2024-09-01 14:16:31 +02:00
github-actions[bot] 1fdf4b61a4
Merge staging-next into staging 2024-09-01 00:16:33 +00:00
Felix Bühler 7f62309646
nixos/fonts.fontconfig: remove with lib; (#338042) 2024-08-31 22:52:12 +02:00
github-actions[bot] fab50d5f8d
Merge staging-next into staging 2024-08-31 00:13:46 +00:00
github-actions[bot] dcad9b571a
Merge master into staging-next 2024-08-31 00:13:18 +00:00
Philip Taron 9916dc8728
treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
Felix Buehler 6db0587bdb nixos/sysctl: remove with lib; 2024-08-30 22:58:31 +02:00
Felix Buehler 3ff6eebd21 nixos/shells-environment: remove with lib; 2024-08-30 22:58:31 +02:00
Felix Buehler 0657aa5509 nixos/i18n: remove with lib; 2024-08-30 22:58:31 +02:00
K900 9729387a99 fontconfig: fix properly, remove NixOS module hack
This reverts 49d33d4a6b.
2024-08-30 10:16:01 +03:00