Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 4d1abc44199c
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: b12c759f76fb
Choose a head ref
  • 9 commits
  • 6 files changed
  • 2 contributors

Commits on Sep 30, 2018

  1. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    f449242 View commit details
    Browse the repository at this point in the history
  2. 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.
    jameysharp committed Sep 30, 2018
    1 Configuration menu
    Copy the full SHA
    8d40083 View commit details
    Browse the repository at this point in the history
  3. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    10e8650 View commit details
    Browse the repository at this point in the history
  4. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    bbc0f6f View commit details
    Browse the repository at this point in the history
  5. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    ae3d3b0 View commit details
    Browse the repository at this point in the history
  6. 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).
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    dab5c63 View commit details
    Browse the repository at this point in the history
  7. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    188bdfb View commit details
    Browse the repository at this point in the history
  8. 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.
    jameysharp committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    b63f65a View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2018

  1. Merge pull request #47563 from jameysharp/unscripted

    Replace several activation script snippets with declarative configuration
    Mic92 committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    b12c759 View commit details
    Browse the repository at this point in the history