Commit Graph

1562 Commits

Author SHA1 Message Date
Janne Heß
c465c8d719 nixos/systemd-initrd: Make emergency access more flexible 2022-04-01 11:58:31 +02:00
Janne Heß
b7c62b8238 nixos/systemd-initrd: Remove unit options that don't work 2022-04-01 11:58:30 +02:00
github-actions[bot]
5e1c018e60 Merge master into staging-next 2022-04-01 06:01:23 +00:00
Dominique Martinet
e92c05349c nixos/logrotate: convert to freeform
using freeform is the new standard way of using modules and should replace
extraConfig.
In particular, this will allow us to place a condition on mails
2022-04-01 07:09:26 +09:00
github-actions[bot]
be4f006d3c Merge master into staging-next 2022-03-31 18:01:13 +00:00
Silvan Mosberger
2da8e63ce8 Merge pull request #111595 from Luflosi/add-cherry-usb-kb-kernel-module
nixos/availableKernelModules: add cherry hid
2022-03-31 17:14:29 +02:00
madisetti
9dddd48c4c nixos/grub: added configuration option for entry options 2022-03-31 06:39:16 -04:00
Martin Weinelt
d0bfb3ccbb Merge remote-tracking branch 'origin/master' into staging-next 2022-03-31 03:49:37 +02:00
ajs124
35619ce1e5 Merge pull request #165453 from helsinki-systems/feat/systemd-manager-environment
nixos/systemd: Switch to ManagerEnvironment=
2022-03-31 01:35:09 +02:00
Janne Heß
a3e0698bf6 nixos/systemd: Switch to ManagerEnvironment=
This accomplishes multiple things:
- Allows us to start systemd without stage-2-init.sh. This was not
  possible before because the environment would have been wrong
- `systemctl daemon-reexec` also changes the environment, giving us
  newer tools for the fs packages
- Starts systemd in a fully clean environment, making everything more
  consistent and pure
2022-03-30 20:24:27 +02:00
Alyssa Ross
fd78240ac8 treewide: use lib.getLib for OpenSSL libraries
At some point, I'd like to make another attempt at
71f1f4884b ("openssl: stop static binaries referencing libs"), which
was reverted in 195c7da07d.  One problem with my previous attempt is
that I moved OpenSSL's libraries to a lib output, but many dependent
packages were hardcoding the out output as the location of the
libraries.  This patch fixes every such case I could find in the tree.
It won't have any effect immediately, but will mean these packages
will automatically use an OpenSSL lib output if it is reintroduced in
future.

This patch should cause very few rebuilds, because it shouldn't make
any change at all to most packages I'm touching.  The few rebuilds
that are introduced come from when I've changed a package builder not
to use variable names like openssl.out in scripts / substitution
patterns, which would be confusing since they don't hardcode the
output any more.

I started by making the following global replacements:

    ${pkgs.openssl.out}/lib -> ${lib.getLib pkgs.openssl}/lib
    ${openssl.out}/lib -> ${lib.getLib openssl}/lib

Then I removed the ".out" suffix when part of the argument to
lib.makeLibraryPath, since that function uses lib.getLib internally.

Then I fixed up cases where openssl was part of the -L flag to the
compiler/linker, since that unambigously is referring to libraries.

Then I manually investigated and fixed the following packages:

 - pycurl
 - citrix-workspace
 - ppp
 - wraith
 - unbound
 - gambit
 - acl2

I'm reasonably confindent in my fixes for all of them.

For acl2, since the openssl library paths are manually provided above
anyway, I don't think openssl is required separately as a build input
at all.  Removing it doesn't make a difference to the output size, the
file list, or the closure.

I've tested evaluation with the OfBorg meta checks, to protect against
introducing evaluation failures.
2022-03-30 15:10:00 +00:00
Naïm Favier
d113e4e06e nixos/networkd: add wait-online options 2022-03-29 10:14:26 +02:00
github-actions[bot]
df0f3ba49a Merge master into staging-next 2022-03-29 06:01:16 +00:00
Janne Heß
452102db8f nixos/stage-2-init: Clean up legacy commands
We can perform most of the mkdir/ln/rm using systemd-tmpfiles
instead which cleans up the script.

/bin and /home are created by their activation script snippets

usbfs is deprecated and unused.

hwclock seems to be automatically executed by systemd on startup.

The mkswap to prevent hibernation cycles seems to be executed by systemd
as well since the provided regression tests succeeds.
2022-03-27 13:51:02 +02:00
Janne Heß
158a2972eb nixos/filesystems: Move options into the fs module
This was probably forgotten during a refactoring. The module is where
the values of the options are actually used.
2022-03-27 13:23:44 +02:00
Florian Klink
e3083decc4 systemd-initrd, systemd-lib: drop initrdServiceToUnit
We can just use serviceToUnit here.
2022-03-24 18:57:16 +01:00
Florian Klink
74bae06748 systemd-initrd: use pkgs.fakeNss, document why we need libnss_files.so 2022-03-24 18:51:32 +01:00
Will Fancher
5bfe213315 Clarify suppressed units description 2022-03-22 21:28:51 -04:00
Will Fancher
213de9b108 systemd-initrd: autoFormat and autoResize in initrd 2022-03-22 21:28:51 -04:00
Will Fancher
1abf154179 systemd-initrd: Add PATH to everything 2022-03-22 21:28:50 -04:00
Will Fancher
2d4ebf1259 initrd: Optional systemd-based initrd 2022-03-22 21:28:43 -04:00
Will Fancher
25113740a5 nixos: systemd-lib: Make generateUnits general with default args 2022-03-22 07:02:23 -04:00
Will Fancher
52c98fc3e9 nixos: systemd: Split unit types into separate module 2022-03-21 10:25:27 -04:00
github-actions[bot]
de642acb2e Merge staging-next into staging 2022-03-21 12:10:50 +00:00
Florian Klink
9427a17ccb Merge pull request #164016 from bobvanderlinden/pr-refactor-systemd-module
nixos: systemd: split module up into multiple files
2022-03-21 13:03:55 +01:00
Bob van der Linden
397b8257a0 nixos: systemd-user: fix additionalUpstreamUserUnits description
Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
2022-03-21 12:30:37 +01:00
Bob van der Linden
92af44e04d nixos: systemd: remove unhelpful comments in additionalUpstreamSystemUnits
Co-authored-by: Janne Heß <janne@hess.ooo>
2022-03-20 16:14:13 +01:00
Bob van der Linden
6514bb4620 nixos: systemd-user: make additionalUpstreamUserUnits internal 2022-03-19 12:06:56 +01:00
Bob van der Linden
66759cea7d nixos: systemd-user: expand on additionalUpstreamUserUnits description 2022-03-19 12:06:43 +01:00
Bob van der Linden
753b911708 nixos: systemd-tmpfiles: use cfg shorthand 2022-03-17 23:16:38 +01:00
Bob van der Linden
38d043de9c nixos: systemd: split off systemd-tmpfiles into separate module 2022-03-17 23:16:37 +01:00
Bob van der Linden
0e665d1815 nixos: systemd-user: allow additional upstream user units
Currently it is only possible to add upstream _system_ units. The option
systemd.additionalUpstreamSystemUnits can be used for this.

However, this was not yet possible for systemd.user. In a similar
fashion this was added to systemd-user.nix.

This is intended to have other modules add upstream units.
2022-03-17 23:16:37 +01:00
Bob van der Linden
b6d50528dd nixos: systemd-user: use cfg shorthand 2022-03-17 23:16:37 +01:00
Bob van der Linden
022b4209a3 nixos: systemd: split off systemd-user into separate module 2022-03-17 23:16:37 +01:00
Bob van der Linden
cae8ef1232 nixos: systemd-coredump: use cfg shorthand 2022-03-17 23:16:30 +01:00
Bob van der Linden
ccfcb78a50 nixos: systemd: split off coredump into separate module 2022-03-17 23:15:49 +01:00
Bob van der Linden
7adc8ecac3 nixos: systemd-journald: use cfg shorthand 2022-03-17 23:13:36 +01:00
Bob van der Linden
fee1e24b3b nixos: systemd: split off journald into separate module 2022-03-17 23:13:36 +01:00
Bob van der Linden
e2cb8903da nixos: systemd-logind: use cfg shorthand 2022-03-17 23:13:27 +01:00
Bob van der Linden
c647002a94 nixos: systemd: split off logind into separate module 2022-03-17 23:12:00 +01:00
Bob van der Linden
0c94a512dd nixos: systemd: avoid using "with systemdUtils.lib" 2022-03-17 21:52:54 +01:00
Bob van der Linden
3420dba80a nixos: systemd: move systemd-nspawn to systemd/nspawn 2022-03-17 21:52:37 +01:00
github-actions[bot]
739cf04cb7 Merge staging-next into staging 2022-03-17 18:02:05 +00:00
Luflosi
47b699fe6c Revert "nixos/modprobe: add boot.initrd.extraModprobeConfig option"
This reverts commit 1c58cdbeed, since this change was made redundant by 3dc6fab5c9 and in https://github.com/NixOS/nixpkgs/pull/145013 we decided to revert this commit.
2022-03-17 12:56:02 +01:00
github-actions[bot]
2eac3106df Merge staging-next into staging 2022-03-17 00:02:45 +00:00
Robert Hensing
0395086d0c Merge pull request #162271 from Infinisil/warn-no-type
Throw an error for options without a type
2022-03-16 22:58:45 +01:00
Bob van der Linden
9bc093b30a nixos: systemd: split off helper functions into systemd-lib 2022-03-15 21:52:13 +01:00
Alyssa Ross
d7e181ff83 Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/development/compilers/ocaml/4.12.nix
	pkgs/development/python-modules/oci/default.nix
	pkgs/tools/admin/bubblewrap/default.nix
2022-03-14 12:33:16 +00:00
Maëlys Bras de fer
529b09a729 sdboot-builder: fix crash in exception handling 2022-03-13 14:38:01 +01:00
Luke Granger-Brown
c30918d419 nixos/networkd: add support for more WireGuard options (introduced in systemd v250)
As of systemd/systemd@e908434458,
systemd-networkd now automatically configures routes to addresses
specified in AllowedIPs unless explicitly disabled with
"RouteTable=off".
2022-03-13 04:13:03 +00:00