Configure the mutable systemd unit path when required

This commit is contained in:
Sander van der Burg 2021-06-09 23:44:03 +02:00 committed by Sander van der Burg
parent 6def8584c6
commit 52f7ec87ae
3 changed files with 9 additions and 1 deletions

View File

@ -16,7 +16,8 @@ in
{
inherit (profileSettings) params;
nixosModules = pkgs.lib.optional profileSettings.params.forceDisableUserChange ./xserver-autologin-module.nix;
nixosModules = pkgs.lib.optional profileSettings.params.forceDisableUserChange ./xserver-autologin-module.nix
++ pkgs.lib.optional (!profileSettings.params.forceDisableUserChange) ./systemd-path.nix;
systemPackages = [
tools.systemd

View File

@ -0,0 +1,5 @@
{...}:
{
boot.extraSystemdUnitPaths = [ "/etc/systemd-mutable/system" ];
}

View File

@ -44,6 +44,8 @@ makeTest {
virtualisation.writableStore = true;
virtualisation.memorySize = 1024;
boot.extraSystemdUnitPaths = [ "/etc/systemd-mutable/system" ];
# We can't download any substitutes in a test environment. To make tests
# faster, we disable substitutes so that Nix does not waste any time by
# attempting to download them.