modules/upgrade: fix missing /dev/shm on upgrade from <21.11

Fixes: #162
This commit is contained in:
Alexander Sosedkin 2021-12-17 01:28:46 +01:00
parent 0beab12f8d
commit e87f42e3a2
2 changed files with 16 additions and 0 deletions

View file

@ -17,6 +17,7 @@
./home-manager.nix ./home-manager.nix
./nixpkgs/options.nix ./nixpkgs/options.nix
./time.nix ./time.nix
./upgrade.nix
./user.nix ./user.nix
./version.nix ./version.nix
(pkgs.path + "/nixos/modules/misc/assertions.nix") (pkgs.path + "/nixos/modules/misc/assertions.nix")

15
modules/upgrade.nix Normal file
View file

@ -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
'';
};
}