···1{ config, pkgs, lib, ... }:
23let
4- cfg = config.boot.initrd.systemd.repart;
056 writeDefinition = name: partitionConfig: pkgs.writeText
7 "${name}.conf"
···24 '';
25in
26{
27- options.boot.initrd.systemd.repart = {
28- enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
29 description = lib.mdDoc ''
30- Grow and add partitions to a partition table a boot time in the initrd.
31 systemd-repart only works with GPT partition tables.
00032 '';
33 };
3435- partitions = lib.mkOption {
36- type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
37- default = { };
38- example = {
39- "10-root" = {
40- Type = "root";
41- };
42- "20-home" = {
43- Type = "home";
44- SizeMinBytes = "512M";
45- SizeMaxBytes = "2G";
00000000000046 };
000000047 };
48- description = lib.mdDoc ''
49- Specify partitions as a set of the names of the definition files as the
50- key and the partition configuration as its value. The partition
51- configuration can use all upstream options. See <link
52- xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
53- for all available options.
54- '';
55 };
56 };
5758- config = lib.mkIf cfg.enable {
59- # Link the definitions into /etc so that they are included in the
60- # /nix/store of the sysroot. This also allows the user to run the
61- # systemd-repart binary after activation manually while automatically
62- # picking up the definition files.
63 environment.etc."repart.d".source = definitionsDirectory;
6465- boot.initrd.systemd = {
66 additionalUpstreamUnits = [
67 "systemd-repart.service"
68 ];
···7374 # Override defaults in upstream unit.
75 services.systemd-repart = {
76- # Unset the coniditions as they cannot be met before activation because
77 # the definition files are not stored in the expected locations.
78 unitConfig.ConditionDirectoryNotEmpty = [
79 " " # required to unset the previous value.
···97 after = [ "sysroot.mount" ];
98 };
99 };
000000100 };
0101}
···1{ config, pkgs, lib, ... }:
23let
4+ cfg = config.systemd.repart;
5+ initrdCfg = config.boot.initrd.systemd.repart;
67 writeDefinition = name: partitionConfig: pkgs.writeText
8 "${name}.conf"
···25 '';
26in
27{
28+ options = {
29+ boot.initrd.systemd.repart.enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
30 description = lib.mdDoc ''
31+ Grow and add partitions to a partition table at boot time in the initrd.
32 systemd-repart only works with GPT partition tables.
33+34+ To run systemd-repart after the initrd, see
35+ `options.systemd.repart.enable`.
36 '';
37 };
3839+ systemd.repart = {
40+ enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
41+ description = lib.mdDoc ''
42+ Grow and add partitions to a partition table.
43+ systemd-repart only works with GPT partition tables.
44+45+ To run systemd-repart while in the initrd, see
46+ `options.boot.initrd.systemd.repart.enable`.
47+ '';
48+ };
49+50+ partitions = lib.mkOption {
51+ type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
52+ default = { };
53+ example = {
54+ "10-root" = {
55+ Type = "root";
56+ };
57+ "20-home" = {
58+ Type = "home";
59+ SizeMinBytes = "512M";
60+ SizeMaxBytes = "2G";
61+ };
62 };
63+ description = lib.mdDoc ''
64+ Specify partitions as a set of the names of the definition files as the
65+ key and the partition configuration as its value. The partition
66+ configuration can use all upstream options. See <link
67+ xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
68+ for all available options.
69+ '';
70 };
000000071 };
72 };
7374+ config = lib.mkIf (cfg.enable || initrdCfg.enable) {
75+ # Always link the definitions into /etc so that they are also included in
76+ # the /nix/store of the sysroot during early userspace (i.e. while in the
77+ # initrd).
078 environment.etc."repart.d".source = definitionsDirectory;
7980+ boot.initrd.systemd = lib.mkIf initrdCfg.enable {
81 additionalUpstreamUnits = [
82 "systemd-repart.service"
83 ];
···8889 # Override defaults in upstream unit.
90 services.systemd-repart = {
91+ # Unset the conditions as they cannot be met before activation because
92 # the definition files are not stored in the expected locations.
93 unitConfig.ConditionDirectoryNotEmpty = [
94 " " # required to unset the previous value.
···112 after = [ "sysroot.mount" ];
113 };
114 };
115+116+ systemd = lib.mkIf cfg.enable {
117+ additionalUpstreamSystemUnits = [
118+ "systemd-repart.service"
119+ ];
120+ };
121 };
122+123}
+9-2
nixos/modules/virtualisation/podman/default.nix
···9 extraPackages = cfg.extraPackages
10 # setuid shadow
11 ++ [ "/run/wrappers" ]
12- # include pkgs.zfs by default in the wrapped podman used by the module so it is cached
13- ++ (if (builtins.elem "zfs" config.boot.supportedFilesystems) then [ config.boot.zfs.package ] else [ pkgs.zfs ]);
14 });
1516 # Provides a fake "docker" binary mapping to podman
···184185 systemd.packages = [ cfg.package ];
1860000187 systemd.services.podman-prune = {
188 description = "Prune podman resources";
189···203204 systemd.sockets.podman.wantedBy = [ "sockets.target" ];
205 systemd.sockets.podman.socketConfig.SocketGroup = "podman";
0000206207 systemd.user.sockets.podman.wantedBy = [ "sockets.target" ];
208
···52 };
53 };
5455- boot.initrd.systemd.enable = true;
56- boot.initrd.systemd.repart.enable = true;
57-58 # systemd-repart operates on disks with a partition table. The qemu module,
59 # however, creates separate filesystem images without a partition table, so
60 # we have to create a disk image manually.
···88 nodes.machine = { config, pkgs, ... }: {
89 imports = [ common ];
9091- boot.initrd.systemd.repart.partitions = {
00092 "10-root" = {
93 Type = "linux-generic";
94 };
···102 machine.wait_for_unit("multi-user.target")
103104 systemd_repart_logs = machine.succeed("journalctl --boot --unit systemd-repart.service")
00000000000000000000000000105 assert "Growing existing partition 1." in systemd_repart_logs
106 '';
107 };
···52 };
53 };
5400055 # systemd-repart operates on disks with a partition table. The qemu module,
56 # however, creates separate filesystem images without a partition table, so
57 # we have to create a disk image manually.
···85 nodes.machine = { config, pkgs, ... }: {
86 imports = [ common ];
8788+ boot.initrd.systemd.enable = true;
89+90+ boot.initrd.systemd.repart.enable = true;
91+ systemd.repart.partitions = {
92 "10-root" = {
93 Type = "linux-generic";
94 };
···102 machine.wait_for_unit("multi-user.target")
103104 systemd_repart_logs = machine.succeed("journalctl --boot --unit systemd-repart.service")
105+ assert "Growing existing partition 1." in systemd_repart_logs
106+ '';
107+ };
108+109+ after-initrd = makeTest {
110+ name = "systemd-repart-after-initrd";
111+ meta.maintainers = with maintainers; [ nikstur ];
112+113+ nodes.machine = { config, pkgs, ... }: {
114+ imports = [ common ];
115+116+ systemd.repart.enable = true;
117+ systemd.repart.partitions = {
118+ "10-root" = {
119+ Type = "linux-generic";
120+ };
121+ };
122+ };
123+124+ testScript = { nodes, ... }: ''
125+ ${useDiskImage nodes.machine}
126+127+ machine.start()
128+ machine.wait_for_unit("multi-user.target")
129+130+ systemd_repart_logs = machine.succeed("journalctl --unit systemd-repart.service")
131 assert "Growing existing partition 1." in systemd_repart_logs
132 '';
133 };
+7-6
pkgs/applications/audio/eartag/default.nix
···1{ stdenv
2, lib
3-, fetchFromGitHub
4, meson
5, ninja
6, pkg-config
···1819python3Packages.buildPythonApplication rec {
20 pname = "eartag";
21- version = "0.3.1";
22 format = "other";
2324- src = fetchFromGitHub {
025 owner = "knuxify";
26 repo = pname;
27- rev = "refs/tags/${version}";
28- sha256 = "sha256-gN3V5ZHlhHp52Jg/i+hDLEDpSvP8yFngujyw5ZncQQg=";
29 };
3031 postPatch = ''
···67 '';
6869 meta = with lib; {
70- homepage = "https://github.com/knuxify/eartag";
71 description = "Simple music tag editor";
72 # This seems to be using ICU license but we're flagging it to MIT license
73 # since ICU license is a modified version of MIT and to prevent it from
···1{ stdenv
2, lib
3+, fetchFromGitLab
4, meson
5, ninja
6, pkg-config
···1819python3Packages.buildPythonApplication rec {
20 pname = "eartag";
21+ version = "0.3.2";
22 format = "other";
2324+ src = fetchFromGitLab {
25+ domain = "gitlab.gnome.org";
26 owner = "knuxify";
27 repo = pname;
28+ rev = version;
29+ sha256 = "sha256-XvbfQtE8LsztQ2VByG2jLYND3qVpH6owdAgh3b//lI4=";
30 };
3132 postPatch = ''
···68 '';
6970 meta = with lib; {
71+ homepage = "https://gitlab.gnome.org/knuxify/eartag";
72 description = "Simple music tag editor";
73 # This seems to be using ICU license but we're flagging it to MIT license
74 # since ICU license is a modified version of MIT and to prevent it from
···91 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
92 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
93 garminconnect-ha = garminconnect; # added 2022-02-05
094 gigalixir = throw "gigalixir has been promoted to a top-level attribute"; # Added 2022-10-02
95 gitdb2 = throw "gitdb2 has been deprecated, use gitdb instead."; # added 2020-03-14
96 GitPython = gitpython; # added 2022-10-28
···91 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
92 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
93 garminconnect-ha = garminconnect; # added 2022-02-05
94+ gdtoolkit = throw "gdtoolkit has been promoted to a top-level attribute"; # added 2023-02-15
95 gigalixir = throw "gigalixir has been promoted to a top-level attribute"; # Added 2022-10-02
96 gitdb2 = throw "gitdb2 has been deprecated, use gitdb instead."; # added 2020-03-14
97 GitPython = gitpython; # added 2022-10-28