Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
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-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1655945eb7e0
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9638d85ff6b4
Choose a head ref

Commits on Jun 8, 2019

  1. nixos/desktop-managers/xterm: Defaults to xserver's state

    This enhances #61423, which removed the gating of desktop-managers from
    being linked to the xserver's state.
    
    This, though, brought in xterm into all systems, even those without X
    servers.
    
    This change sets the *default* of the xterm desktop-manager to the state
    of the xserver, keeping it enabled by default as a sane fallback.
    
    The xterm desktop-manager can still be enabled or disabled as needed,
    without it being affected by xserver's state.
    samueldr committed Jun 8, 2019
    Copy the full SHA
    fd0f8ad View commit details

Commits on Jun 15, 2019

  1. Copy the full SHA
    adc6290 View commit details
  2. sd-image-aarch64: Allows early modesetting for the Raspberry Pi

    This will reduce the confusion at boot, where the only thing visible is
    the last message from u-boot; where it looks like the Raspberry Pi is
    hung, while in reality it's likely resizing partitions.
    samueldr committed Jun 15, 2019
    Copy the full SHA
    390f207 View commit details
  3. sd-image-aarch64: Allows early modesetting for Allwinner boards

    This will reduce the confusion at boot, where the only thing visible is
    the last message from u-boot; where it looks like the board is
    hung, while in reality it's likely resizing partitions.
    samueldr committed Jun 15, 2019
    Copy the full SHA
    5d92d16 View commit details

Commits on Jun 16, 2019

  1. sd-image: Moves /boot into rootfs

    The current FAT32 partition is kept as it is required for the Raspberry
    Pi family of hardware. It is where the firmware is kept.
    
    The partition is kept bootable, and the boot files kept in there until
    the following commits, to keep all commits of this series individually
    bootable.
    samueldr committed Jun 16, 2019
    Copy the full SHA
    6e9e78b View commit details
  2. make-ext4-fs: Allows populating with custom files

    This will allow adding /boot files to the rootfs.
    samueldr committed Jun 16, 2019
    Copy the full SHA
    a0aff40 View commit details
  3. Copy the full SHA
    53884e1 View commit details
  4. Copy the full SHA
    8634d57 View commit details
  5. sd-image: Updates comments

    samueldr committed Jun 16, 2019
    Copy the full SHA
    1843e00 View commit details
  6. sd-image: Pull less slack in the image by accounting for slack

    The slack, seemingly, accounted for more than the minimum required for
    slack plus the two partitions.
    
    This change makes the gap a somewhat abstracted amount, but is not
    configurable within the derivation.
    samueldr committed Jun 16, 2019
    Copy the full SHA
    c113c09 View commit details
  7. sd-image: Adds removed options for removed options

    This will keep configuration configuring the size of the /boot partition
    still build, while showing the deprecation warning.
    
    In 99.9% of cases I assume ignoring the configuration is better, as the
    sd-image builder already is pretty opinionated in that matter.
    samueldr committed Jun 16, 2019
    Copy the full SHA
    288118c View commit details

Commits on Jun 17, 2019

  1. vulnix: 1.8.1 -> 1.8.2

    Christian Kauhaus committed Jun 17, 2019
    Copy the full SHA
    99bade5 View commit details
  2. python37Packages.cassandra-driver: 3.17.1 -> 3.18.0

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/python3.7-cassandra-driver/versions
    r-ryantm committed Jun 17, 2019
    Copy the full SHA
    c621f19 View commit details

Commits on Jun 18, 2019

  1. nixos/cassandra: use cassandra's default cluster name "Test Cluster"

    The change to "NixOS Test Cluster" in #59179 broke startup of existing clusters
    that used the previously-default cluster name "Test Cluster":
    
    ERROR 23:00:47 Fatal exception during initialization
    org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name NixOS Test Cluster
    
    Fixes #63388.
    ivan committed Jun 18, 2019
    Copy the full SHA
    a476b9b View commit details
  2. elmPackages.{elm-test,elm-analyse..}: tooling additions and fixes

    Extends the number of available tools for Elm language.
    
    1. fix and move "elm-test"
    Previously located in nodePackages.elm-test but broken (see binwrap info).
    Now fixed and located in elmPackages.elm-test
    
    2. add "elm-verify-examples"
    Generate tests from documentation examples
    
    3. add "elm-upgrade"
    upgrade assistant using statical analysis
    
    4. add "elm-analyse"
    static analysis for elm code (linter)
    
    5. move "elm-doc-preview"
    originally located in nodePackages.elm-upgrade - moved for consistency
    
    6. add "elmi-to-json"
    transforms elmi files to json - used by other tools like elm-test and
    elm-verify-examples
    
    Node.js based dependencies are defined the same way as nodePackages
    contaparts but are independent (has it's own packages.json)
    
    patch-binwrap.nix is used to as a replacement for binwrap package
    used by some nodejs dependencies that depends on Haskell binaries
    (elm-test and elm-verify-examples).
    
    BREAKING CHANGE
    ===============
    elm-doc-preview (as well as broken elm-test) is now commented
    in `node-packages-v10.json` and should be removed once new
    nix-expressions for node10 are generated (out of scope of this PR)
    
    There are still 2 outstanding elm related packages in nodePackages
    
    1. elm-oracle - legacy package which is not compatible with elm 0.19
    2. elm-live - should be moved in the future I think
    turboMaCk committed Jun 18, 2019
    Copy the full SHA
    a97986a View commit details
  3. linux_5_0: remove

    EOLed upstream.
    alyssais committed Jun 18, 2019
    Copy the full SHA
    d89ed88 View commit details

Commits on Jun 19, 2019

  1. drm_info: init at 2.1.0

    tadeokondrak committed Jun 19, 2019
    Copy the full SHA
    c932a4d View commit details
  2. Copy the full SHA
    bf36d56 View commit details

Commits on Jun 20, 2019

  1. samba: 4.10.4 -> 4.10.5

    Security release fixing CVE-2019-12435 & CVE-2019-12436
    risicle committed Jun 20, 2019
    Copy the full SHA
    cd24ce1 View commit details
  2. Copy the full SHA
    bc109b1 View commit details

Commits on Jun 21, 2019

  1. Copy the full SHA
    f8cf9de View commit details
  2. tomcat9: 9.0.13 -> 9.0.21

    Johan Thomsen committed Jun 21, 2019
    Copy the full SHA
    e62883d View commit details
  3. tomcat85: 8.5.35 -> 8.5.42

    Johan Thomsen committed Jun 21, 2019
    Copy the full SHA
    1fd9ac6 View commit details
  4. Copy the full SHA
    b40a38f View commit details
  5. vdr: 2.4.0 -> 2.4.1

    ck3d committed Jun 21, 2019
    Copy the full SHA
    5e26875 View commit details

Commits on Jun 22, 2019

  1. Revert "Remove amdadlsdk and amdappsdk."

    This reverts commit 08ea7c7.
    
    This was a part of #61823.
    
    Firstly, that commit removed those attributes without removing the files
    they refer to, which is strange.
    
    Secondly, I have a very old but GPGPU-capabale AMD card which doesn't work
    with newer OpenCL infrastructure and hence needs these packages to do GPGPU.
    oxij committed Jun 22, 2019
    Copy the full SHA
    c42f378 View commit details
  2. pythonPackages.hdbscan: fix build by removing upstream patch, adding …

    …joblib
    
    joblib is for the benefit of py27, whose scikitlearn doesn't include it.
    also move cython to nativeBuildInputs
    risicle committed Jun 22, 2019
    Copy the full SHA
    8008954 View commit details
  3. bazel: 0.26.1 -> 0.27.0

    - Fixs for newly introduced bin/bash hardcoded reference
    - Bazel now references `remote_java_tools_xxx` which contains prebuilt
      binaries. We prefetch them, fix them, and force bazel to use the
      fixed repository.
    
    It also closes #63096
    guibou committed Jun 22, 2019
    Copy the full SHA
    ba327a5 View commit details
  4. bazel: restore installCheckPhase

    All the dependencies of this phase are prefetched and provided to the
    bazel environment using --override_repository.
    guibou committed Jun 22, 2019
    Copy the full SHA
    7fed6ea View commit details
  5. bazel: Full switch to python3

    guibou committed Jun 22, 2019
    Copy the full SHA
    27d4ce7 View commit details
  6. acpilight: fix build error

    udevadm should not run as part of make install
    arcnmx committed Jun 22, 2019
    Copy the full SHA
    3f79ede View commit details

Commits on Jun 23, 2019

  1. qttools: patch qmlimportscanner for darwin builds

    This needs to be the full path for qtmacdeploy to work. We add
    ${qt5.qttools.dev}/bin/qmlimportscanner as the default.
    
    Fixes #63093
    matthewbauer committed Jun 23, 2019
    Copy the full SHA
    79c0e74 View commit details
  2. mosquitto: 1.6.2 -> 1.6.3

    peterhoeg committed Jun 23, 2019
    Copy the full SHA
    7c0c888 View commit details
  3. skim: 0.6.4 -> 0.6.8

    dywedir committed Jun 23, 2019
    Copy the full SHA
    d20379a View commit details
  4. Copy the full SHA
    0d461a7 View commit details
  5. megasync: init at 4.1.1.0

    Signed-off-by: Michal Minář <mic.liamg@gmail.com>
    michojel committed Jun 23, 2019
    Copy the full SHA
    5864dfb View commit details
  6. dpkg: fix cross compilation

    tobim committed Jun 23, 2019
    Copy the full SHA
    79d72cc View commit details
  7. Fix overrideCC invokations for cross builds

    `overrideCC` should always take a compiler for the build
    system, otherwise cross compilation is not possible.
    tobim committed Jun 23, 2019
    Copy the full SHA
    3a7bb25 View commit details
  8. lazygit: 0.7.2 -> 0.8

    marsam committed Jun 23, 2019
    Copy the full SHA
    0be4e0c View commit details
  9. Copy the full SHA
    6389a0a View commit details
  10. mkShell: compose shellHooks

    Running the following expression with nix-shell:
    
      let
        pkgs = import <nixpkgs> {};
    
        shell1 = pkgs.mkShell {
          shellHook = ''
            echo shell1
          '';
        };
    
        shell2 = pkgs.mkShell {
          shellHook = ''
            echo shell2
          '';
        };
    
        shell3 = pkgs.mkShell {
          inputsFrom = [ shell1 shell2 ];
          shellHook = ''
            echo shell3
          '';
        };
      in shell3
    
    Will now results in:
    shell2
    shell1
    shell3
    
    Note that packages in the front of inputsFrom have precedence over
    packages in the back. The outermost mkShell has precedence over all.
    basvandijk committed Jun 23, 2019
    Copy the full SHA
    76ef802 View commit details
  11. mkshell: improve mergeInputs

    mergeInputs is now simply defined in terms of `concatLists` and
    `catAttrs` instead of a more complicated `foldr`.
    
    Note that the order of PATH has also changed. For example running the
    following with nix-shell:
    
      let
        pkgs = import <nixpkgs> {};
    
        shell1 = pkgs.mkShell {
          buildInputs = [ pkgs.htop ];
        };
    
        shell2 = pkgs.mkShell {
          buildInputs = [ pkgs.hello ];
        };
    
        shell3 = pkgs.mkShell {
          inputsFrom = [ shell1 shell2 ];
          buildInputs = [ pkgs.tree ];
        };
    
      in shell3
    
    Results in the following PATH:
    
    $ echo $PATH
    ...
    /nix/store/yifq4bikf7m07160bpia7z48ciqddbfi-tree-1.8.0/bin:
    /nix/store/vhxqk81234ivqw1a7j200a1c69k8mywi-htop-2.2.0/bin:
    /nix/store/n9vm3m58y1n3rg3mlll17wanc9hln58k-hello-2.10/bin
    ...
    
    Previously the order was:
    
    /nix/store/n9vm3m58y1n3rg3mlll17wanc9hln58k-hello-2.10/bin
    /nix/store/vhxqk81234ivqw1a7j200a1c69k8mywi-htop-2.2.0/bin:
    /nix/store/yifq4bikf7m07160bpia7z48ciqddbfi-tree-1.8.0/bin:
    
    I think the new order makes more sense because it allows to override
    the PATH in the outermost mkShell.
    basvandijk committed Jun 23, 2019
    Copy the full SHA
    cee3573 View commit details
  12. ksonnet: remove package

    The team behind ksonnet was aquired by VMware, and they decided to end
    work on ksonnet:
    
    From https://blogs.vmware.com/cloudnative/2019/02/05/welcoming-heptio-open-source-projects-to-vmware:
    
    > Prior to the acquisition, Heptio had been shifting focus and resources
    > away from ksonnet; with the acquisition, we felt it was the right time
    > to rethink our investment in ksonnet. As a result, work on ksonnet will
    > end and the GitHub repositories will be archived. It’s extremely
    > difficult to step back from a project we have worked so hard on, but
    > we’re excited about our new ideas and vision for changing how developers
    > experience the Kubernetes and cloud native ecosystems.
    flokli committed Jun 23, 2019
    Copy the full SHA
    9635646 View commit details
  13. Merge pull request #63350 from r-ryantm/auto-update/python3.7-cassand…

    …ra-driver
    
    python37Packages.cassandra-driver: 3.17.1 -> 3.18.0
    ryantm authored Jun 23, 2019
    Copy the full SHA
    73d5c7e View commit details
  14. Copy the full SHA
    2933681 View commit details
  15. Merge pull request #63698 from tobim/overrideCC-buildPackages

    Fix misuses of overrideCC
    Ericson2314 authored Jun 23, 2019
    Copy the full SHA
    852d81d View commit details
  16. Copy the full SHA
    7720379 View commit details
  17. apple-sdk: add MetalKit

    matthewbauer committed Jun 23, 2019
    Copy the full SHA
    4e22fe4 View commit details
  18. qt5.12: patch to work on x86_64-darwin

    unfortunately, some private headers making the logging hard to handle.
    Specifically, os/activity.h that is included does not match what Qt5
    is expected. This removes the activity logging (while keeping the
    other logging methods) on macOS.
    
    Fixes #63528
    matthewbauer committed Jun 23, 2019
    Copy the full SHA
    4c3e09b View commit details
  19. Copy the full SHA
    758712c View commit details
Showing with 7,870 additions and 615 deletions.
  1. +10 −0 maintainers/maintainer-list.nix
  2. +1 −1 maintainers/scripts/luarocks-packages.csv
  3. +20 −5 nixos/lib/make-ext4-fs.nix
  4. +15 −5 nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
  5. +9 −6 nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
  6. +8 −5 nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
  7. +62 −32 nixos/modules/installer/cd-dvd/sd-image.nix
  8. +1 −0 nixos/modules/module-list.nix
  9. +16 −2 nixos/modules/services/backup/duplicati.nix
  10. +1 −1 nixos/modules/services/databases/cassandra.nix
  11. +1 −1 nixos/modules/services/hardware/udev.nix
  12. +3 −1 nixos/modules/services/x11/desktop-managers/xterm.nix
  13. +1 −1 nixos/modules/virtualisation/containers.nix
  14. +3 −5 pkgs/applications/gis/saga/default.nix
  15. +0 −55 pkgs/applications/gis/saga/finite-6.3.0.patch
  16. +125 −0 pkgs/applications/misc/megasync/default.nix
  17. +21 −0 pkgs/applications/misc/megasync/install-megasync.patch
  18. +13 −0 pkgs/applications/misc/megasync/noinstall-distro-version.patch
  19. +2 −2 pkgs/applications/misc/rofi/default.nix
  20. +4 −4 pkgs/applications/misc/xastir/default.nix
  21. +2 −2 pkgs/applications/networking/browsers/vivaldi/default.nix
  22. +0 −23 pkgs/applications/networking/cluster/ksonnet/default.nix
  23. +2 −2 pkgs/applications/networking/cluster/terraform/default.nix
  24. +2 −2 pkgs/applications/networking/instant-messengers/rambox/bare.nix
  25. +3 −6 pkgs/applications/networking/instant-messengers/rambox/default.nix
  26. +2 −2 pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
  27. +55 −0 pkgs/applications/science/logic/fast-downward/default.nix
  28. +5 −0 pkgs/applications/science/math/cplex/default.nix
  29. +7 −3 pkgs/applications/science/math/gurobi/default.nix
  30. +4 −4 pkgs/applications/video/vdr/default.nix
  31. +4 −3 pkgs/applications/window-managers/weston/default.nix
  32. +6 −7 pkgs/build-support/mkshell/default.nix
  33. +45 −9 pkgs/development/compilers/crystal/default.nix
  34. +27 −5 pkgs/development/compilers/elm/default.nix
  35. +25 −0 pkgs/development/compilers/elm/packages/README.md
  36. +27 −0 pkgs/development/compilers/elm/packages/elmi-to-json.nix
  37. +7 −0 pkgs/development/compilers/elm/packages/generate-node-packages.sh
  38. +17 −0 pkgs/development/compilers/elm/packages/node-composition.nix
  39. +542 −0 pkgs/development/compilers/elm/packages/node-env.nix
  40. +7 −0 pkgs/development/compilers/elm/packages/node-packages.json
  41. +5,422 −0 pkgs/development/compilers/elm/packages/node-packages.nix
  42. +30 −0 pkgs/development/compilers/elm/packages/patch-binwrap.nix
  43. +3 −1 pkgs/development/interpreters/lua-5/build-lua-package.nix
  44. +15 −0 pkgs/development/libraries/qt-5/5.11/qttools.patch
  45. +1 −0 pkgs/development/libraries/qt-5/5.12/default.nix
  46. +60 −0 pkgs/development/libraries/qt-5/5.12/qtbase.patch
  47. +15 −0 pkgs/development/libraries/qt-5/5.12/qttools.patch
  48. +1 −1 pkgs/development/libraries/qt-5/modules/qtbase.nix
  49. +4 −1 pkgs/development/libraries/qt-5/modules/qttools.nix
  50. +42 −0 pkgs/development/libraries/science/math/osi/default.nix
  51. +90 −12 pkgs/development/libraries/wxwidgets/3.1/default.nix
  52. +5 −5 pkgs/development/lua-modules/generated-packages.nix
  53. +0 −2 pkgs/development/node-packages/node-packages-v10.json
  54. +4 −0 pkgs/development/python-modules/black/default.nix
  55. +2 −2 pkgs/development/python-modules/cassandra-driver/default.nix
  56. +3 −11 pkgs/development/python-modules/hdbscan/default.nix
  57. +6 −3 pkgs/development/python-modules/hidapi/default.nix
  58. +24 −0 pkgs/development/python-modules/mlrose/default.nix
  59. +6 −10 pkgs/development/python-modules/msrest/default.nix
  60. +23 −6 pkgs/development/python-modules/msrestazure/default.nix
  61. +35 −0 pkgs/development/python-modules/pycategories/default.nix
  62. +23 −0 pkgs/development/python-modules/pycategories/infix.nix
  63. +29 −0 pkgs/development/python-modules/rig/default.nix
  64. +17 −0 pkgs/development/python-modules/sentinel/default.nix
  65. +2 −2 pkgs/development/tools/analysis/flow/default.nix
  66. +7 −7 pkgs/development/tools/analysis/radare2/default.nix
  67. +81 −18 pkgs/development/tools/build-managers/bazel/default.nix
  68. +23 −16 pkgs/development/tools/build-managers/bazel/src-deps.json
  69. +2 −2 pkgs/development/tools/build-managers/shards/default.nix
  70. +27 −0 pkgs/development/tools/drm_info/default.nix
  71. +12 −3 pkgs/development/tools/electron/default.nix
  72. +8 −11 pkgs/development/tools/lazygit/default.nix
  73. +4 −3 pkgs/development/tools/rust/bindgen/default.nix
  74. +2 −1 pkgs/development/tools/rust/cargo-expand/default.nix
  75. +5 −4 pkgs/development/tools/scry/default.nix
  76. +20 −0 pkgs/development/tools/scry/fix_for_crystal_0_28_and_above.patch
  77. +28 −0 pkgs/development/tools/yj/default.nix
  78. +30 −0 pkgs/development/tools/yj/deps.nix
  79. +30 −17 pkgs/games/freeciv/default.nix
  80. +5 −4 pkgs/misc/acpilight/default.nix
  81. +30 −30 pkgs/misc/vim-plugins/generated.nix
  82. +2 −2 pkgs/misc/vim-plugins/overrides.nix
  83. +7 −0 pkgs/os-specific/darwin/apple-sdk/default.nix
  84. +2 −0 pkgs/os-specific/darwin/apple-sdk/frameworks.nix
  85. +3 −0 pkgs/os-specific/linux/kernel/common-config.nix
  86. +2 −2 pkgs/os-specific/linux/kernel/linux-4.14.nix
  87. +2 −2 pkgs/os-specific/linux/kernel/linux-4.19.nix
  88. +0 −18 pkgs/os-specific/linux/kernel/linux-5.0.nix
  89. +2 −2 pkgs/os-specific/linux/kernel/linux-5.1.nix
  90. +0 −47 pkgs/os-specific/linux/kernel/linux-mptcp-93.nix
  91. +26 −0 pkgs/os-specific/linux/kernel/linux-mptcp-94.nix
  92. +27 −0 pkgs/os-specific/linux/kernel/linux-mptcp-95.nix
  93. +0 −49 pkgs/os-specific/linux/kernel/linux-mptcp.nix
  94. +28 −0 pkgs/os-specific/linux/kernel/mptcp-config.nix
  95. +2 −3 pkgs/servers/couchpotato/default.nix
  96. +2 −2 pkgs/servers/documize-community/default.nix
  97. +4 −4 pkgs/servers/http/tomcat/default.nix
  98. +2 −2 pkgs/servers/mqtt/mosquitto/default.nix
  99. +2 −2 pkgs/servers/samba/4.x.nix
  100. +21 −22 pkgs/tools/X11/xtrace/default.nix
  101. +14 −9 pkgs/tools/archivers/unp/default.nix
  102. +3 −3 pkgs/tools/misc/skim/default.nix
  103. +297 −0 pkgs/tools/package-management/cargo-license/add-Cargo.lock.patch
  104. +24 −0 pkgs/tools/package-management/cargo-license/default.nix
  105. +1 −1 pkgs/tools/package-management/dpkg/default.nix
  106. +2 −2 pkgs/tools/security/vulnix/default.nix
  107. +2 −2 pkgs/tools/text/vale/default.nix
  108. +104 −75 pkgs/top-level/all-packages.nix
  109. +8 −0 pkgs/top-level/python-packages.nix
10 changes: 10 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -3278,6 +3278,11 @@
github = "michelk";
name = "Michel Kuhlmann";
};
michojel = {
email = "mic.liamg@gmail.com";
github = "michojel";
name = "Michal Minář";
};
mickours = {
email = "mickours@gmail.com<";
github = "mickours";
@@ -5747,4 +5752,9 @@
github = "zzamboni";
name = "Diego Zamboni";
};
turbomack = {
email = "marek.faj@gmail.com";
github = "turboMaCk";
name = "Marek Fajkus";
};
}
2 changes: 1 addition & 1 deletion maintainers/scripts/luarocks-packages.csv
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ luadbi-mysql,,,,,
luadbi-postgresql,,,,,
luadbi-sqlite3,,,,,
luaevent,,,,,
luaexpat,,,,,flosse
luaexpat,,,1.3.0-1,,arobyn flosse
luaffi,,http://luarocks.org/dev,,,
luafilesystem,,,1.7.0-2,,flosse vcunat
luaossl,,,,lua5_1,vcunat
25 changes: 20 additions & 5 deletions nixos/lib/make-ext4-fs.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Builds an ext4 image containing a populated /nix/store with the closure
# of store paths passed in the storePaths parameter. The generated image
# is sized to only fit its contents, with the expectation that a script
# resizes the filesystem at boot time.
# of store paths passed in the storePaths parameter, in addition to the
# contents of a directory that can be populated with commands. The
# generated image is sized to only fit its contents, with the expectation
# that a script resizes the filesystem at boot time.
{ pkgs
# List of derivations to be included
, storePaths
# Shell commands to populate the ./files directory.
# All files in that directory are copied to the root of the FS.
, populateImageCommands ? ""
, volumeLabel
, uuid ? "44444444-4444-4444-8888-888888888888"
, e2fsprogs
@@ -23,13 +28,17 @@ pkgs.stdenv.mkDerivation {

buildCommand =
''
(
mkdir -p ./files
${populateImageCommands}
)
# Add the closures of the top-level store objects.
storePaths=$(cat ${sdClosureInfo}/store-paths)
# Make a crude approximation of the size of the target image.
# If the script starts failing, increase the fudge factors here.
numInodes=$(find $storePaths | wc -l)
numDataBlocks=$(du -c -B 4096 --apparent-size $storePaths | awk '$2 == "total" { print int($1 * 1.03) }')
numInodes=$(find $storePaths ./files | wc -l)
numDataBlocks=$(du -s -c -B 4096 --apparent-size $storePaths ./files | tail -1 | awk '{ print int($1 * 1.03) }')
bytes=$((2 * 4096 * $numInodes + 4096 * $numDataBlocks))
echo "Creating an EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks)"
@@ -47,6 +56,12 @@ pkgs.stdenv.mkDerivation {
echo "copying store paths to image..."
cptofs -t ext4 -i $out $storePaths /nix/store/
(
echo "copying files to image..."
cd ./files
cptofs -t ext4 -i $out ./* /
)
# I have ended up with corrupted images sometimes, I suspect that happens when the build machine's disk gets full during the build.
if ! fsck.ext4 -n -f $out; then
echo "--- Fsck failed for EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks) ---"
20 changes: 15 additions & 5 deletions nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
Original file line number Diff line number Diff line change
@@ -26,8 +26,15 @@ in
# Also increase the amount of CMA to ensure the virtual console on the RPi3 works.
boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0"];

boot.initrd.availableKernelModules = [
# Allows early (earlier) modesetting for the Raspberry Pi
"vc4" "bcm2835_dma" "i2c_bcm2835"
# Allows early (earlier) modesetting for Allwinner SoCs
"sun4i_drm" "sun8i_drm_hdmi" "sun8i_mixer"
];

sdImage = {
populateBootCommands = let
populateFirmwareCommands = let
configTxt = pkgs.writeText "config.txt" ''
kernel=u-boot-rpi3.bin
@@ -43,10 +50,13 @@ in
avoid_warnings=1
'';
in ''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin boot/u-boot-rpi3.bin
cp ${configTxt} boot/config.txt
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin
cp ${configTxt} firmware/config.txt
'';
populateRootCommands = ''
mkdir -p ./files/boot
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
}
15 changes: 9 additions & 6 deletions nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ in
boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=ttyO0,115200n8" "console=ttySAC2,115200n8" "console=tty0"];

sdImage = {
populateBootCommands = let
populateFirmwareCommands = let
configTxt = pkgs.writeText "config.txt" ''
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
# when attempting to show low-voltage or overtemperature warnings.
@@ -46,11 +46,14 @@ in
enable_uart=1
'';
in ''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
cp ${pkgs.ubootRaspberryPi2}/u-boot.bin boot/u-boot-rpi2.bin
cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin boot/u-boot-rpi3.bin
cp ${configTxt} boot/config.txt
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
cp ${pkgs.ubootRaspberryPi2}/u-boot.bin firmware/u-boot-rpi2.bin
cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin firmware/u-boot-rpi3.bin
cp ${configTxt} firmware/config.txt
'';
populateRootCommands = ''
mkdir -p ./files/boot
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
}
13 changes: 8 additions & 5 deletions nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
Original file line number Diff line number Diff line change
@@ -35,11 +35,14 @@ in
kernel=u-boot-rpi1.bin
'';
in ''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin boot/u-boot-rpi0.bin
cp ${pkgs.ubootRaspberryPi}/u-boot.bin boot/u-boot-rpi1.bin
cp ${configTxt} boot/config.txt
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin firmware/u-boot-rpi0.bin
cp ${pkgs.ubootRaspberryPi}/u-boot.bin firmware/u-boot-rpi1.bin
cp ${configTxt} firmware/config.txt
'';
populateRootCommands = ''
mkdir -p ./files/boot
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot
'';
};
}
94 changes: 62 additions & 32 deletions nixos/modules/installer/cd-dvd/sd-image.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# This module creates a bootable SD card image containing the given NixOS
# configuration. The generated image is MBR partitioned, with a FAT /boot
# partition, and ext4 root partition. The generated image is sized to fit
# its contents, and a boot script automatically resizes the root partition
# to fit the device on the first boot.
# configuration. The generated image is MBR partitioned, with a FAT
# /boot/firmware partition, and ext4 root partition. The generated image
# is sized to fit its contents, and a boot script automatically resizes
# the root partition to fit the device on the first boot.
#
# The firmware partition is built with expectation to hold the Raspberry
# Pi firmware and bootloader, and be removed and replaced with a firmware
# build for the target SoC for other board families.
#
# The derivation for the SD image will be placed in
# config.system.build.sdImage
@@ -14,12 +18,18 @@ with lib;
let
rootfsImage = pkgs.callPackage ../../../lib/make-ext4-fs.nix ({
inherit (config.sdImage) storePaths;
populateImageCommands = config.sdImage.populateRootCommands;
volumeLabel = "NIXOS_SD";
} // optionalAttrs (config.sdImage.rootPartitionUUID != null) {
uuid = config.sdImage.rootPartitionUUID;
});
in
{
imports = [
(mkRemovedOptionModule [ "sdImage" "bootPartitionID" ] "The FAT partition for SD image now only holds the Raspberry Pi firmware files. Use firmwarePartitionID to configure that partition's ID.")
(mkRemovedOptionModule [ "sdImage" "bootSize" ] "The boot files for SD image have been moved to the main ext4 partition. The FAT partition now only holds the Raspberry Pi firmware files. Changing its size may not be required.")
];

options.sdImage = {
imageName = mkOption {
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img";
@@ -43,12 +53,12 @@ in
'';
};

bootPartitionID = mkOption {
firmwarePartitionID = mkOption {
type = types.string;
default = "0x2178694e";
description = ''
Volume ID for the /boot partition on the SD card. This value must be a
32-bit hexadecimal number.
Volume ID for the /boot/firmware partition on the SD card. This value
must be a 32-bit hexadecimal number.
'';
};

@@ -61,29 +71,44 @@ in
'';
};

bootSize = mkOption {
firmwareSize = mkOption {
type = types.int;
default = 120;
# As of 2019-05-31 the Raspberry pi firmware + u-bot takes ~13MiB
default = 20;
description = ''
Size of the /boot/firmware partition, in megabytes.
'';
};

populateFirmwareCommands = mkOption {
example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
description = ''
Size of the /boot partition, in megabytes.
Shell commands to populate the ./firmware directory.
All files in that directory are copied to the
/boot/firmware partition on the SD image.
'';
};

populateBootCommands = mkOption {
example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin boot/ ''";
populateRootCommands = mkOption {
example = literalExample "''\${extlinux-conf-builder} -t 3 -c \${config.system.build.toplevel} -d ./files/boot''";
description = ''
Shell commands to populate the ./boot directory.
Shell commands to populate the ./files directory.
All files in that directory are copied to the
/boot partition on the SD image.
root (/) partition on the SD image. Use this to
populate the ./files/boot (/boot) directory.
'';
};
};

config = {
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/NIXOS_BOOT";
"/boot/firmware" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
# Alternatively, this could be removed from the configuration.
# The filesystem is not needed at runtime, it could be treated
# as an opaque blob instead of a discrete FAT32 filesystem.
options = [ "nofail" "noauto" ];
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
@@ -105,39 +130,44 @@ in
echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system
echo "file sd-image $img" >> $out/nix-support/hydra-build-products
# Create the image file sized to fit /boot and /, plus 20M of slack
# Gap in front of the first partition, in MiB
gap=8
# Create the image file sized to fit /boot/firmware and /, plus slack for the gap.
rootSizeBlocks=$(du -B 512 --apparent-size ${rootfsImage} | awk '{ print $1 }')
bootSizeBlocks=$((${toString config.sdImage.bootSize} * 1024 * 1024 / 512))
imageSize=$((rootSizeBlocks * 512 + bootSizeBlocks * 512 + 20 * 1024 * 1024))
firmwareSizeBlocks=$((${toString config.sdImage.firmwareSize} * 1024 * 1024 / 512))
imageSize=$((rootSizeBlocks * 512 + firmwareSizeBlocks * 512 + gap * 1024 * 1024))
truncate -s $imageSize $img
# type=b is 'W95 FAT32', type=83 is 'Linux'.
# The "bootable" partition is where u-boot will look file for the bootloader
# information (dtbs, extlinux.conf file).
sfdisk $img <<EOF
label: dos
label-id: ${config.sdImage.bootPartitionID}
label-id: ${config.sdImage.firmwarePartitionID}
start=8M, size=$bootSizeBlocks, type=b, bootable
start=${toString (8 + config.sdImage.bootSize)}M, type=83
start=''${gap}M, size=$firmwareSizeBlocks, type=b
start=$((gap + ${toString config.sdImage.firmwareSize}))M, type=83, bootable
EOF
# Copy the rootfs into the SD image
eval $(partx $img -o START,SECTORS --nr 2 --pairs)
dd conv=notrunc if=${rootfsImage} of=$img seek=$START count=$SECTORS
# Create a FAT32 /boot partition of suitable size into bootpart.img
# Create a FAT32 /boot/firmware partition of suitable size into firmware_part.img
eval $(partx $img -o START,SECTORS --nr 1 --pairs)
truncate -s $((SECTORS * 512)) bootpart.img
faketime "1970-01-01 00:00:00" mkfs.vfat -i ${config.sdImage.bootPartitionID} -n NIXOS_BOOT bootpart.img
truncate -s $((SECTORS * 512)) firmware_part.img
faketime "1970-01-01 00:00:00" mkfs.vfat -i ${config.sdImage.firmwarePartitionID} -n FIRMWARE firmware_part.img
# Populate the files intended for /boot
mkdir boot
${config.sdImage.populateBootCommands}
# Populate the files intended for /boot/firmware
mkdir firmware
${config.sdImage.populateFirmwareCommands}
# Copy the populated /boot into the SD image
(cd boot; mcopy -psvm -i ../bootpart.img ./* ::)
# Copy the populated /boot/firmware into the SD image
(cd firmware; mcopy -psvm -i ../firmware_part.img ./* ::)
# Verify the FAT partition before copying it.
fsck.vfat -vn bootpart.img
dd conv=notrunc if=bootpart.img of=$img seek=$START count=$SECTORS
fsck.vfat -vn firmware_part.img
dd conv=notrunc if=firmware_part.img of=$img seek=$START count=$SECTORS
'';
}) {};

1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@
./hardware/logitech.nix
./hardware/mcelog.nix
./hardware/network/b43.nix
./hardware/network/intel-2200bg.nix
./hardware/nitrokey.nix
./hardware/opengl.nix
./hardware/pcmcia.nix
18 changes: 16 additions & 2 deletions nixos/modules/services/backup/duplicati.nix
Original file line number Diff line number Diff line change
@@ -26,6 +26,15 @@ in
Set it to "any" to listen on all available interfaces
'';
};

user = mkOption {
default = "duplicati";
type = types.str;
description = ''
Duplicati runs as it's own user. It will only be able to backup world-readable files.
Run as root with special care.
'';
};
};
};

@@ -37,14 +46,19 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "duplicati";
User = cfg.user;
PermissionsStartOnly = true;
Group = "duplicati";
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati";
Restart = "on-failure";
};
preStart = ''
mkdir -p /var/lib/duplicati
chown -R ${cfg.user}:duplicati /var/lib/duplicati
'';
};

users.users.duplicati = {
users.users.duplicati = lib.optionalAttrs (cfg.user == "duplicati") {
uid = config.ids.uids.duplicati;
home = "/var/lib/duplicati";
createHome = true;
2 changes: 1 addition & 1 deletion nixos/modules/services/databases/cassandra.nix
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ in {
'';
clusterName = mkOption {
type = types.str;
default = "NixOS Test Cluster";
default = "Test Cluster";
description = ''
The name of the cluster.
This setting prevents nodes in one logical cluster from joining
2 changes: 1 addition & 1 deletion nixos/modules/services/hardware/udev.nix
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ let
for i in $import_progs $run_progs; do
if [[ ! -x $i ]]; then
echo "FAIL"
echo "$i is called in udev rules but not installed by udev"
echo "$i is called in udev rules but is not executable or does not exist"
exit 1
fi
done
Loading