Commit graph

1395 commits

Author SHA1 Message Date
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
K900 49d33d4a6b [staging-next] nixos/fontconfig: hack to put everyone's fonts back 2024-08-30 08:53:39 +03:00
Philip Taron 117f3ceb51
treewide/nixos: remove with lib; part 1 (#335603) 2024-08-29 15:42:04 -07:00
Felix Buehler 413bd7cb81 nixos/xdg.sounds: remove with lib; 2024-08-29 23:48:10 +02:00
Felix Buehler 352763b440 nixos/xdg.portal.wlr: remove with lib; 2024-08-29 23:48:09 +02:00
Felix Buehler f3fff00d96 nixos/xdg.portal.lxqt: remove with lib; 2024-08-29 23:48:09 +02:00
Felix Buehler 62782850ea nixos/xdg.mime: remove with lib; 2024-08-29 23:48:09 +02:00
Felix Buehler 56adb6a6b2 nixos/xdg.menus: remove with lib; 2024-08-29 23:48:09 +02:00
Felix Buehler 1da2c43254 nixos/xdg.icons: remove with lib; 2024-08-29 23:48:09 +02:00
Felix Buehler 7f5a38f100 nixos/xdg.autostart: remove with lib; 2024-08-29 23:48:08 +02:00
Felix Buehler e50a74b6f9 nixos/vte: remove with lib; 2024-08-29 23:48:08 +02:00
Felix Buehler a39c4671d8 nixos/environment.unix-odbc-drivers.nix: remove with lib; 2024-08-29 23:48:08 +02:00
Felix Buehler 6232911ef5 nixos/environment.terminfo: remove with lib; 2024-08-29 23:48:08 +02:00
Felix Buehler d666633846 nixos/environment.paths: remove with lib; 2024-08-29 23:48:07 +02:00
Felix Buehler 21d7a61b1a nixos/environment: remove with lib; 2024-08-29 23:45:31 +02:00
Felix Buehler c39ad44462 nixos/networking.resolvconf: remove with lib; 2024-08-29 23:45:31 +02:00
Felix Buehler 58258bd170 nixos/powerManagement: remove with lib; 2024-08-29 23:45:31 +02:00
Felix Buehler d65b7dbb29 nixos/system.nss*: remove with lib; 2024-08-29 23:45:31 +02:00
Felix Buehler 87c8da00fa nixos/environment.noXlibs: remove with lib; 2024-08-29 23:45:31 +02:00
Felix Buehler b5b0edaf37 nixos/networking: remove with lib; 2024-08-29 23:45:30 +02:00
Felix Buehler dd7e20e16a nixos/environment.memoryAllocator: remove with lib; 2024-08-29 23:45:30 +02:00
Felix Buehler 88e6e9d4ac nixos/time: remove with lib; 2024-08-29 23:45:30 +02:00
Felix Buehler e514851c46 nixos/networking.iproute2: remove with lib; 2024-08-29 23:45:30 +02:00
Felix Buehler 6b9c5be4a6 nixos/gtk.iconCache: remove with lib; 2024-08-29 23:45:29 +02:00
Felix Buehler 7fece7e8ca nixos/fonts.enableGhostscriptFonts: remove with lib; 2024-08-29 23:45:29 +02:00
Felix Buehler 58baef7c2c nixos/fonts.fontDir: remove with lib; 2024-08-29 23:45:29 +02:00
Felix Buehler 3ad0220687 debug-info: remove with lib; 2024-08-29 23:45:29 +02:00
Felix Buehler 9da369764a nixos/console: remove with lib; 2024-08-29 23:45:29 +02:00
Felix Buehler 624f590fba nixos/appstream: remove with lib; 2024-08-29 23:45:28 +02:00
Philip Taron 958348782d
nixos/users.mysql: remove with lib; (#338043) 2024-08-29 14:41:10 -07:00
Felix Buehler 15b6c50fa9 nixos/users.mysql: remove with lib; 2024-08-29 23:35:25 +02:00
Philip Taron ae92f312bf
treewide: use a consistent meta.priority default 2024-08-29 09:04:57 -07:00
Felix Buehler 7c7e3d1810 nixos/fonts.fontconfig: remove with lib; 2024-08-29 00:16:54 +02:00
Felix Buehler 18485b25ad nixos/hardware.pulseaudio: remove with lib; 2024-08-26 21:28:10 +02:00
Philip Taron 04a8c1e764
Merge pull request #328030 from Wulfsta/swap-status 2024-08-13 07:05:46 -07:00
Sandro b67ad15b55
Merge pull request #318635 from SuperSandro2000/nix-trusted-user 2024-08-06 11:40:00 +02:00
Naxdy 632da75711
nixos/xdg/portal: remove deprecated option gtkUsePortal 2024-07-31 11:27:11 +02:00
Sandro Jäckel 280e9a5ca4
nixos/nix: move trusted-user to config
This avoids having to define root when trying to add another user as
trusted user, similar to the other options.
2024-07-30 18:18:57 +02:00
Vladimír Čunát a5b2fe7374
Merge #328673: staging-next 2024-07-20 2024-07-28 13:45:55 +02:00
Robert Hensing 4ca52fdf5f
Merge pull request #323613 from CyberShadow/fix-nix-path-without-channels-v2
nix-channel: do not set empty nix-path when disabling channels
2024-07-28 13:31:10 +02:00
Vladimír Čunát 64c6a981fe
Merge branch 'master' into staging-next 2024-07-27 09:18:58 +02:00
nicoo 9587ddd261
nixos/nix-channel: don't set nix-path (#327683)
Otherwise, the empty path in `nix.conf` takes precedence over `NIX_PATH`,
and by extension the `nix.nixPath` configuration option.

Introduced in 61afc4d166.
2024-07-26 19:19:38 +00:00
github-actions[bot] a6c20a7387
Merge staging-next into staging 2024-07-19 12:01:49 +00:00
Philip Taron c67ed48869
nixos/ldap: avoid top-level with expression (#327992) 2024-07-19 11:19:51 +02:00
Martin Weinelt 983077457f
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
-	pkgs/development/python-modules/uvcclient/default.nix
-	pkgs/development/tools/rust/rust-analyzer/default.nix
2024-07-18 12:35:33 +02:00
Wulfsta f2f8f302fd nixos/swap: add progress to swapfile creation 2024-07-17 17:33:03 -04:00
Artturin 20cf80e167 Merge branch 'staging-next' into staging 2024-07-17 21:29:37 +03:00
Philip Taron 33a4732e46
nixos/swap: avoid top-level with expressions (#327991) 2024-07-17 20:23:14 +02:00
Philip Taron 1438803fb5
nixos/users-groups: avoid top level with lib; use lib before builtins (#327757) 2024-07-17 20:00:54 +02:00
Robert Hensing 2d9a686483 nixos/nix-channel.nix: shellcheck and fix the activation check 2024-07-16 22:09:33 +02:00