Comparing changes
Open a pull request
base repository: NixOS/nixpkgs
base: 4d1abc44199c
head repository: NixOS/nixpkgs
compare: b12c759f76fb
- 9 commits
- 6 files changed
- 2 contributors
Commits on Sep 30, 2018
-
nixos/systemd: remove activation dependency
As far as I can tell, the systemd snippet hasn't depended on groups being initialized since 5d02c02 in 2015, when a `setfacl` call was removed.
Configuration menu - View commit details
-
Copy full SHA for f449242 - Browse repository at this point
Copy the full SHA f449242View commit details -
nixos/stage-2: create empty machine-id at boot
Previously, the activation script was responsible for ensuring that /etc/machine-id exists. However, the only time it could not already exist is during stage-2-init, not while switching configurations, because one of the first things systemd does when starting up as PID 1 is to create this file. So I've moved the initialization to stage-2-init. Furthermore, since systemd will do the equivalent of systemd-machine-id-setup if /etc/machine-id doesn't have valid contents, we don't need to do that ourselves. We _do_, however, want to ensure that the file at least exists, because systemd also uses the non-existence of this file to guess that this is a first-boot situation. In that case, systemd tries to create some symlinks in /etc/systemd/system according to its presets, which it can't do because we've already populated /etc according to the current NixOS configuration. This is not necessary for any other activation script snippets, so it's okay to do it after stage-2-init runs the activation script. None of them declare a dependency on the "systemd" snippet. Also, most of them only create files or directories in ways that obviously don't need the machine-id set.
1Configuration menu - View commit details
-
Copy full SHA for 8d40083 - Browse repository at this point
Copy the full SHA 8d40083View commit details -
nixos/systemd: let journald create /var/log/journal
The default value for journald's Storage option is "auto", which determines whether to log to /var/log/journal based on whether that directory already exists. So NixOS has been unconditionally creating that directory in activation scripts. However, we can get the same behavior by configuring journald.conf to set Storage to "persistent" instead. In that case, journald will create the directory itself if necessary.
Configuration menu - View commit details
-
Copy full SHA for 10e8650 - Browse repository at this point
Copy the full SHA 10e8650View commit details -
nixos/systemd: don't create /var/lib/udev
As far as I can tell, systemd has never used this directory, so I think this is a holdover from before udev merged into systemd.
Configuration menu - View commit details
-
Copy full SHA for bbc0f6f - Browse repository at this point
Copy the full SHA bbc0f6fView commit details -
nixos/polkit: use tmpfiles to clean old dirs
These don't need to get cleaned up during activation; that can wait until systemd-tmpfiles-setup runs.
Configuration menu - View commit details
-
Copy full SHA for ae3d3b0 - Browse repository at this point
Copy the full SHA ae3d3b0View commit details -
nixos/activation: don't create /run/nix
Nix 2.0 no longer uses these directories. /run/nix/current-load was moved to /nix/var/nix/current-load in 2017 (Nix commit d7653df). Anyway, src/build-remote/build-remote.cc will create the current-load directory if it doesn't exist already. /run/nix/remote-stores seems to have been deprecated since 2014 (Nix commit b1af336) when the documentation for $NIX_OTHER_STORES was removed, and support for it was dropped entirely in 2016 (Nix commit 4494000).
Configuration menu - View commit details
-
Copy full SHA for dab5c63 - Browse repository at this point
Copy the full SHA dab5c63View commit details -
nixos/opengl: create /run/opengl-driver using tmpfiles.d
Anything that uses OpenGL starts after sysinit.target, so systemd-tmpfiles runs before anything that needs these symlinks.
Configuration menu - View commit details
-
Copy full SHA for 188bdfb - Browse repository at this point
Copy the full SHA 188bdfbView commit details -
nixos/pam: create wtmp/lastlog iff using pam_lastlog
I think pam_lastlog is the only thing that writes to these files in practice on a modern Linux system, so in a configuration that doesn't use that module, we don't need to create these files. I used tmpfiles.d instead of activation snippets to create the logs. It's good enough for upstream and other distros; it's probably good enough for us.
Configuration menu - View commit details
-
Copy full SHA for b63f65a - Browse repository at this point
Copy the full SHA b63f65aView commit details
Commits on Oct 2, 2018
-
Merge pull request #47563 from jameysharp/unscripted
Replace several activation script snippets with declarative configuration
Configuration menu - View commit details
-
Copy full SHA for b12c759 - Browse repository at this point
Copy the full SHA b12c759View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 4d1abc44199c...b12c759f76fb