···11{ config, pkgs, lib, ... }:
2233let
44- cfg = config.boot.initrd.systemd.repart;
44+ cfg = config.systemd.repart;
55+ initrdCfg = config.boot.initrd.systemd.repart;
5667 writeDefinition = name: partitionConfig: pkgs.writeText
78 "${name}.conf"
···2425 '';
2526in
2627{
2727- options.boot.initrd.systemd.repart = {
2828- enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
2828+ options = {
2929+ boot.initrd.systemd.repart.enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
2930 description = lib.mdDoc ''
3030- Grow and add partitions to a partition table a boot time in the initrd.
3131+ Grow and add partitions to a partition table at boot time in the initrd.
3132 systemd-repart only works with GPT partition tables.
3333+3434+ To run systemd-repart after the initrd, see
3535+ `options.systemd.repart.enable`.
3236 '';
3337 };
34383535- partitions = lib.mkOption {
3636- type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
3737- default = { };
3838- example = {
3939- "10-root" = {
4040- Type = "root";
4141- };
4242- "20-home" = {
4343- Type = "home";
4444- SizeMinBytes = "512M";
4545- SizeMaxBytes = "2G";
3939+ systemd.repart = {
4040+ enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
4141+ description = lib.mdDoc ''
4242+ Grow and add partitions to a partition table.
4343+ systemd-repart only works with GPT partition tables.
4444+4545+ To run systemd-repart while in the initrd, see
4646+ `options.boot.initrd.systemd.repart.enable`.
4747+ '';
4848+ };
4949+5050+ partitions = lib.mkOption {
5151+ type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
5252+ default = { };
5353+ example = {
5454+ "10-root" = {
5555+ Type = "root";
5656+ };
5757+ "20-home" = {
5858+ Type = "home";
5959+ SizeMinBytes = "512M";
6060+ SizeMaxBytes = "2G";
6161+ };
4662 };
6363+ description = lib.mdDoc ''
6464+ Specify partitions as a set of the names of the definition files as the
6565+ key and the partition configuration as its value. The partition
6666+ configuration can use all upstream options. See <link
6767+ xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
6868+ for all available options.
6969+ '';
4770 };
4848- description = lib.mdDoc ''
4949- Specify partitions as a set of the names of the definition files as the
5050- key and the partition configuration as its value. The partition
5151- configuration can use all upstream options. See <link
5252- xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
5353- for all available options.
5454- '';
5571 };
5672 };
57735858- config = lib.mkIf cfg.enable {
5959- # Link the definitions into /etc so that they are included in the
6060- # /nix/store of the sysroot. This also allows the user to run the
6161- # systemd-repart binary after activation manually while automatically
6262- # picking up the definition files.
7474+ config = lib.mkIf (cfg.enable || initrdCfg.enable) {
7575+ # Always link the definitions into /etc so that they are also included in
7676+ # the /nix/store of the sysroot during early userspace (i.e. while in the
7777+ # initrd).
6378 environment.etc."repart.d".source = definitionsDirectory;
64796565- boot.initrd.systemd = {
8080+ boot.initrd.systemd = lib.mkIf initrdCfg.enable {
6681 additionalUpstreamUnits = [
6782 "systemd-repart.service"
6883 ];
···73887489 # Override defaults in upstream unit.
7590 services.systemd-repart = {
7676- # Unset the coniditions as they cannot be met before activation because
9191+ # Unset the conditions as they cannot be met before activation because
7792 # the definition files are not stored in the expected locations.
7893 unitConfig.ConditionDirectoryNotEmpty = [
7994 " " # required to unset the previous value.
···97112 after = [ "sysroot.mount" ];
98113 };
99114 };
115115+116116+ systemd = lib.mkIf cfg.enable {
117117+ additionalUpstreamSystemUnits = [
118118+ "systemd-repart.service"
119119+ ];
120120+ };
100121 };
122122+101123}
+9-2
nixos/modules/virtualisation/podman/default.nix
···99 extraPackages = cfg.extraPackages
1010 # setuid shadow
1111 ++ [ "/run/wrappers" ]
1212- # include pkgs.zfs by default in the wrapped podman used by the module so it is cached
1313- ++ (if (builtins.elem "zfs" config.boot.supportedFilesystems) then [ config.boot.zfs.package ] else [ pkgs.zfs ]);
1212+ ++ lib.optional (builtins.elem "zfs" config.boot.supportedFilesystems) config.boot.zfs.package;
1413 });
15141615 # Provides a fake "docker" binary mapping to podman
···184183185184 systemd.packages = [ cfg.package ];
186185186186+ systemd.services.podman.serviceConfig = {
187187+ ExecStart = [ "" "${cfg.package}/bin/podman $LOGGING system service" ];
188188+ };
189189+187190 systemd.services.podman-prune = {
188191 description = "Prune podman resources";
189192···203206204207 systemd.sockets.podman.wantedBy = [ "sockets.target" ];
205208 systemd.sockets.podman.socketConfig.SocketGroup = "podman";
209209+210210+ systemd.user.services.podman.serviceConfig = {
211211+ ExecStart = [ "" "${cfg.package}/bin/podman $LOGGING system service" ];
212212+ };
206213207214 systemd.user.sockets.podman.wantedBy = [ "sockets.target" ];
208215
+30-4
nixos/tests/systemd-repart.nix
···5252 };
5353 };
54545555- boot.initrd.systemd.enable = true;
5656- boot.initrd.systemd.repart.enable = true;
5757-5855 # systemd-repart operates on disks with a partition table. The qemu module,
5956 # however, creates separate filesystem images without a partition table, so
6057 # we have to create a disk image manually.
···8885 nodes.machine = { config, pkgs, ... }: {
8986 imports = [ common ];
90879191- boot.initrd.systemd.repart.partitions = {
8888+ boot.initrd.systemd.enable = true;
8989+9090+ boot.initrd.systemd.repart.enable = true;
9191+ systemd.repart.partitions = {
9292 "10-root" = {
9393 Type = "linux-generic";
9494 };
···102102 machine.wait_for_unit("multi-user.target")
103103104104 systemd_repart_logs = machine.succeed("journalctl --boot --unit systemd-repart.service")
105105+ assert "Growing existing partition 1." in systemd_repart_logs
106106+ '';
107107+ };
108108+109109+ after-initrd = makeTest {
110110+ name = "systemd-repart-after-initrd";
111111+ meta.maintainers = with maintainers; [ nikstur ];
112112+113113+ nodes.machine = { config, pkgs, ... }: {
114114+ imports = [ common ];
115115+116116+ systemd.repart.enable = true;
117117+ systemd.repart.partitions = {
118118+ "10-root" = {
119119+ Type = "linux-generic";
120120+ };
121121+ };
122122+ };
123123+124124+ testScript = { nodes, ... }: ''
125125+ ${useDiskImage nodes.machine}
126126+127127+ machine.start()
128128+ machine.wait_for_unit("multi-user.target")
129129+130130+ systemd_repart_logs = machine.succeed("journalctl --unit systemd-repart.service")
105131 assert "Growing existing partition 1." in systemd_repart_logs
106132 '';
107133 };
+7-6
pkgs/applications/audio/eartag/default.nix
···11{ stdenv
22, lib
33-, fetchFromGitHub
33+, fetchFromGitLab
44, meson
55, ninja
66, pkg-config
···18181919python3Packages.buildPythonApplication rec {
2020 pname = "eartag";
2121- version = "0.3.1";
2121+ version = "0.3.2";
2222 format = "other";
23232424- src = fetchFromGitHub {
2424+ src = fetchFromGitLab {
2525+ domain = "gitlab.gnome.org";
2526 owner = "knuxify";
2627 repo = pname;
2727- rev = "refs/tags/${version}";
2828- sha256 = "sha256-gN3V5ZHlhHp52Jg/i+hDLEDpSvP8yFngujyw5ZncQQg=";
2828+ rev = version;
2929+ sha256 = "sha256-XvbfQtE8LsztQ2VByG2jLYND3qVpH6owdAgh3b//lI4=";
2930 };
30313132 postPatch = ''
···6768 '';
68696970 meta = with lib; {
7070- homepage = "https://github.com/knuxify/eartag";
7171+ homepage = "https://gitlab.gnome.org/knuxify/eartag";
7172 description = "Simple music tag editor";
7273 # This seems to be using ICU license but we're flagging it to MIT license
7374 # since ICU license is a modified version of MIT and to prevent it from
···9191 functorch = throw "functorch is now part of the torch package and has therefore been removed. See https://github.com/pytorch/functorch/releases/tag/v1.13.0 for more info."; # added 2022-12-01
9292 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
9393 garminconnect-ha = garminconnect; # added 2022-02-05
9494+ gdtoolkit = throw "gdtoolkit has been promoted to a top-level attribute"; # added 2023-02-15
9495 gigalixir = throw "gigalixir has been promoted to a top-level attribute"; # Added 2022-10-02
9596 gitdb2 = throw "gitdb2 has been deprecated, use gitdb instead."; # added 2020-03-14
9697 GitPython = gitpython; # added 2022-10-28