Commit graph

1104 commits

Author SHA1 Message Date
Bjørn Forsman fa8ace3618 nixos: don't implicitly map missing user groups to nogroup
Before: `users.users.user1.group = "group-not-defined-anywhere-else"`
would result in user1 having the primary group `nogroup`, assigned at
activation time and only with a (easy to miss) warning from the
activation script. This behaviour is a security issue becase no files
should be owned by `nogroup` and it allows for unrelated users (and
services) to accidentally have access to files they shouldn't have.

After: The configuration above results in this eval error:
  - The following users have a primary group that is undefined: user1
  Hint: Add this to your NixOS config:
    users.groups.group-not-defined-anywhere-else = {};
2023-10-06 19:33:01 +02:00
Sandro Jäckel 5b9cdda1c2
nixos/nano: add enable, package option, do not create /etc/nanorc by default
and remove nano from environment.defaultPackages. In addition also cleanup the file in general.

This is a follow up to #220481

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2023-09-29 00:24:34 +02:00
github-actions[bot] fc1f757bf6
Merge master into staging-next 2023-09-25 18:01:06 +00:00
Valentin Gagarin 370097ce86
remove the misleading warning on using nix-env for split outputs (#255947)
The text was originally added [0] following an apparently incomplete
research on how everything plays together. In fact, Nix propagates
`outputs` to the corresponding nested derivations, and there is some
messy behavior in Nixpkgs that only seems to propagate
`meta.outputsToInstall` in `buildEnv`[1].

This change moves the hints on how to use NixOS specifics to NixOS
module documentation (which is hopefully easier to find through
search.nixos.org), describes the default behavior in Nixpkgs (updating
a the link to the source), and removes the confusing mention of
`nix-env`.

the last of them should not be there to begin with. we don't want
beginners to use `nix-env`, as this is known to run them into trouble
eventually.

[0]: https://github.com/NixOS/nixpkgs/pull/76794
[1]: 1774d07242/pkgs/build-support/buildenv/default.nix (L66)
2023-09-25 16:23:01 +02:00
github-actions[bot] 680b13891d
Merge master into staging-next 2023-09-25 00:02:13 +00:00
Artturi 713af20167
Merge pull request #241518 from Gerg-L/use-xdg-base-directories 2023-09-25 00:45:31 +03:00
Fabián Heredia Montiel b2f85dbf28 Merge remote-tracking branch 'origin/master' into staging-next 2023-09-20 15:08:16 -06:00
nicoo 914bf58369 nixos/{sudo, terminfo}: Adjust defaults for compatibility with sudo-rs 2023-09-18 17:36:15 +00:00
nicoo 0365b05f13 nixos/terminfo: Add config option not to add extra sudo config
This will be necessary for compatibility with `sudo-rs`.
2023-09-18 17:35:06 +00:00
Alyssa Ross 4a027948f9
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/applications/radio/soapysdr/default.nix
2023-09-14 11:31:01 +00:00
Raito Bezarius 79c3740ee5 nixos/console: use systemd-vconsole-setup.service from upstream for sd initrd
This fixes a bug where the vconsole was not working as intended in systemd stage 1 with systemd v254.

udev rules are now starting with this service instead of whatever happened before.
2023-09-13 12:02:40 +02:00
rnhmjoj 205b56cffc
nixos/user-groups: fixup of 5666a378 2023-09-13 11:44:19 +02:00
Maciej Krüger 7163f125e5
Merge pull request #254149 from nbraud/noto-emoji 2023-09-12 16:27:58 +02:00
Maciej Krüger a4dde5a1a9
Merge pull request #253334 from nbraud/nixos/terminfo 2023-09-12 14:46:08 +02:00
nicoo c7423cd734 noto-fonts-emoji → noto-fonts-color-emoji
Clarify that the monochrome font is not included, per #221181.

The new name is also coherent with the name of the font,
according to `fontconfig`: Noto Color Emoji.
2023-09-12 12:38:07 +00:00
nicoo c5de4a5be3 yaft: Provide terminfo in separate output 2023-09-09 09:16:28 +00:00
nicoo a4116e9289 st: Provide terminfo in separate output 2023-09-09 09:16:28 +00:00
nicoo 91b8537619 contour: Provide terminfo in separate output 2023-09-09 09:16:07 +00:00
nicoo 150b2ff4d5 nixos/terminfo: Improve snippet generating the “all terminfo” list
- Avoid false-positives on package sets that contain a `terminfo` derivation,
  like `haskellPackages` and `sbclPackages`.
- Directly provide a list of names that can be used to update the NixOS module,
  rather than a list of derivations which is hard to read in the REPL.
2023-09-09 08:21:59 +00:00
rnhmjoj 5666a378cb
nixos/users-groups: rename passwordFile in hashedPasswordFile
This avoids the possible confusion with `passwordFile` being the file
version of `password`, while it should contain the password hash.

Fixes issue #165858.
2023-09-08 21:19:40 +02:00
nicoo 6fdc291d5a nixos/terminfo: Add terminfo outputs for rio & tmux 2023-09-04 23:06:37 +00:00
Ramses 76f8cf18d1 nixos/update-users-groups: no need to include extra package
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2023-09-03 11:26:37 +02:00
r-vdp d560a5e07d nixos/update-users-groups: fix cross compilation
Since #246772, cross compiled NixOS is broken because the DateTime perl
package that was used in the update-users-groups.pl script depends on
Testutf8 which does not cross compile (see #198548).

This PR drops the DateTime dependency in favour of TimePiece, which has
less dependencies and whose closure does cross compile.
2023-09-03 11:26:37 +02:00
Franz Pletz da37904672
Merge pull request #246772 from R-VdP/nixos-user-expiry
nixos/update-users-groups: add support for account expiry
2023-08-26 02:41:34 +02:00
Nick Cao 0814089e05
nixos/zram: use nixos/zram-generator as backing implementation 2023-08-13 15:38:40 +08:00
Franz Pletz cef068f3b3
Revert "nixos/malloc: add back maybe unnecessary line"
This reverts commit ed55524562.

Does not evaluate.
2023-08-10 03:02:39 +02:00
Lily Foster b367b9cf87
Merge pull request #241565 from SuperSandro2000/nox-python
nixos/no-x-libs: use pythonPackagesExtensions to construct python ove…
2023-08-07 10:56:27 -04:00
r-vdp 44a7059bf2
nixos/update-users-groups: set expiry correctly for new users 2023-08-02 13:51:41 +02:00
Sandro Jäckel 0d4c3913b2
nixos/no-x-libs: use pythonPackagesExtensions to construct python overlay
to construct it for all supported python package sets at the same time
2023-08-01 15:36:15 +02:00
Gabriel Fontes ff8b69941a
nixos/qt: install qt6gtk2 when using gtk2
Now qt6 apps are correctly themed when using platformTheme gtk2.
2023-07-27 15:39:30 -03:00
Sandro Jäckel 4c07356e3d
nixos/packages: fix typo preventing mkRenamedOptionModule from working 2023-07-25 14:43:40 +02:00
Robert Hensing c9f9df2f8e
Merge pull request #245038 from R-VdP/fix_nix_channel
nixos/nix-channel: only try to remove the nix-channel binary if it exists
2023-07-25 11:25:15 +02:00
Sandro Jäckel 83793ca898
nixos/fonts: rename fonts.enableDefaultFonts to fonts.enableDefaultPackages
to better fit the renamed fonts.packages
2023-07-25 00:55:25 +02:00
Sandro Jäckel f9fdeb2dbc
nixos/ghostscript: evaporate the extra whitespace 2023-07-24 17:34:39 +02:00
Sandro Jäckel b0c67b4b6e
treewide: rename fonts.fonts to fonts.packages 2023-07-24 17:34:39 +02:00
Sandro Jäckel 5162df3239
nixos/fonts: rename fonts.fonts option to fonts.packages, other cleanups
fonts.fonts is not a great name and this also resolves a TODO.
2023-07-24 17:34:37 +02:00
r-vdp b825f65c90
nixos/nix-channel: only try to remove the nix-channel binary if it exists
It may not be there if `system.disableInstallerTools = true`.
2023-07-24 10:34:48 +02:00
r-vdp 668e2dafb6
nixos/nix-channel: fix editorconfig warnings and apply nixpkgs-fmt 2023-07-23 15:39:32 +02:00
Gerg-L bf383adf0a nixos/user-groups: Add to $NIX_PROFILES paths 2023-07-18 23:33:18 -04:00
Robert Hensing 8ad59ed1b2
Merge pull request #242098 from hercules-ci/nixos-no-nix-channel
nixos: Disable nix-channel
2023-07-18 15:27:24 +02:00
github-actions[bot] a3b43106c9
Merge master into staging-next 2023-07-13 18:01:24 +00:00
Bjørn Forsman df1eee2aa6 nixos: show which files are related to "not applying GID/UID change"
I initially thought it was related to /var/lib/nixos/{gid-map,uid-map},
but it seems that to migrate GID/UID you have to edit
/etc/{group,passwd} (and update GID/UID in all files). So mention those
files in the warning messages.
2023-07-13 17:21:36 +02:00
Ramses 1bee79f9f7
nixos/swap: make sure all kernel modules are loaded before creating swap devices. (#239163)
Co-authored-by: iliana etaoin <iliana@buttslol.net>
2023-07-13 17:12:54 +02:00
Robert Hensing a1d0ee8c50
nixos/nix-channel: Apply suggestions from code review
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-07-08 20:49:37 +02:00
github-actions[bot] e949ec41bd
Merge master into staging-next 2023-07-08 18:01:04 +00:00
Joerie de Gram 1785fe6c01 nixos/i18n: correct defaultText for supportedLocales 2023-07-08 16:43:22 +02:00
Robert Hensing 61afc4d166 nixos/nix-channel: Take care of NIX_PATH's non-empty default when disabled 2023-07-07 23:12:39 +02:00
Robert Hensing d00e242b80 nixos: Add nixos.channel.enable
For those who wish to get rid of nix-channel.
2023-07-07 19:00:06 +02:00
github-actions[bot] da44aac0b1
Merge master into staging-next 2023-07-07 12:01:26 +00:00
Sandro Jäckel 88d7aa56e1
nixos/nix*: remove not necessary imports
We do not really declare module dependencies anywhere else and it would
a nousance to move any file if many other referenced it without being
necessary. Also most higher level modules depend on most of the lower
level ones.
So removing this because it can only potentially cause weird issues.
2023-07-07 11:01:12 +02:00