diff --git a/modules/module-list.nix b/modules/module-list.nix index bbd4269..511bcc3 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -17,6 +17,7 @@ ./home-manager.nix ./nixpkgs/options.nix ./time.nix + ./upgrade.nix ./user.nix ./version.nix (pkgs.path + "/nixos/modules/misc/assertions.nix") diff --git a/modules/upgrade.nix b/modules/upgrade.nix new file mode 100644 index 0000000..1a5a4ce --- /dev/null +++ b/modules/upgrade.nix @@ -0,0 +1,15 @@ +# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. + +{ config, lib, ... }: + +{ + config.build.activationAfter = + # TODO: remove when we stop supporting upgrades from <21.11 + # Setups upgraded to 21.11 don't have the /dev/shm directory bootstrapped: + # https://github.com/t184256/nix-on-droid/issues/162 + lib.mkIf (lib.versionOlder config.system.stateVersion "21.11") { + createDevShm = '' + mkdir -p ${config.build.installationDir}/dev/shm + ''; + }; +}