-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234877 from ElvishJerricco/auto-format-and-resize…
…-with-systemd Auto format and resize with systemd
- Loading branch information
Showing
8 changed files
with
47 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -588,6 +588,15 @@ in | |
systemd.services."systemd-backlight@".restartIfChanged = false; | ||
systemd.services."systemd-fsck@".restartIfChanged = false; | ||
systemd.services."systemd-fsck@".path = [ config.system.path ]; | ||
systemd.services."systemd-makefs@" = { | ||
restartIfChanged = false; | ||
path = [ pkgs.util-linux ] ++ config.system.fsPackages; | ||
# Since there is no /etc/systemd/system/[email protected] | ||
# file, the units generated in /run/systemd/generator would | ||
# override anything we put here. But by forcing the use of a | ||
# drop-in in /etc, it does apply. | ||
overrideStrategy = "asDropin"; | ||
}; | ||
systemd.services.systemd-random-seed.restartIfChanged = false; | ||
systemd.services.systemd-remount-fs.restartIfChanged = false; | ||
systemd.services.systemd-update-utmp.restartIfChanged = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,6 @@ let | |
"systemd-ask-password-console.path" | ||
"systemd-ask-password-console.service" | ||
"[email protected]" | ||
"[email protected]" | ||
"systemd-halt.service" | ||
"[email protected]" | ||
"systemd-journald-audit.socket" | ||
|
@@ -93,7 +92,6 @@ let | |
fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems; | ||
|
||
needMakefs = lib.any (fs: fs.autoFormat) fileSystems; | ||
needGrowfs = lib.any (fs: fs.autoResize) fileSystems; | ||
|
||
kernel-name = config.boot.kernelPackages.kernel.name or "kernel"; | ||
modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; }; | ||
|
@@ -400,7 +398,6 @@ in { | |
storePaths = [ | ||
# systemd tooling | ||
"${cfg.package}/lib/systemd/systemd-fsck" | ||
(lib.mkIf needGrowfs "${cfg.package}/lib/systemd/systemd-growfs") | ||
"${cfg.package}/lib/systemd/systemd-hibernate-resume" | ||
"${cfg.package}/lib/systemd/systemd-journald" | ||
(lib.mkIf needMakefs "${cfg.package}/lib/systemd/systemd-makefs") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ import ./make-test-python.nix { | |
else "fsck.ext4.*/dev/vda"}'") | ||
with subtest("mnt fs is fsckd"): | ||
machine.succeed("journalctl -b | grep 'fsck.*/dev/vdb.*clean'") | ||
machine.succeed("journalctl -b | grep 'fsck.*vdb.*clean'") | ||
machine.succeed( | ||
"grep '[email protected]' /run/systemd/generator/mnt.mount" | ||
) | ||
|