home-manager: remove support for 19.09 releases

This commit is contained in:
Tobias Happ 2021-12-10 19:04:36 +01:00 committed by Alexander Sosedkin
parent 1ad8c7ac48
commit 43fafe1736

View file

@ -7,11 +7,6 @@ with lib;
let
cfg = config.home-manager;
tryEval = builtins.tryEval (home-manager.path + "/modules/modules.nix");
assertionNixpkgs = types ? submoduleWith;
assertionHomeManager = tryEval.success && builtins.functionArgs (import tryEval.value) ? useNixpkgsModule;
assertion = assertionNixpkgs && assertionHomeManager;
extendedLib = import (home-manager.path + "/modules/lib/stdlib-extended.nix") pkgs.lib;
hmModule = types.submoduleWith {
@ -54,10 +49,7 @@ in
};
config = mkOption {
type =
if assertion
then types.nullOr hmModule
else types.unspecified;
type = types.nullOr hmModule;
default = null;
description = "Home Manager configuration.";
};
@ -81,25 +73,7 @@ in
###### implementation
config = mkIf (cfg.config != null) (mkMerge [
{
assertions = [
{
assertion = assertionNixpkgs;
message = "You are currently using release-19.09 branch or older of nixpkgs, you need "
+ "to update to the release-20.03 channel or newer.";
}
{
assertion = assertionHomeManager;
message = "You are currently using release-19.09 branch or older of home-manager, you need "
+ "to update to the release-20.03 channel or newer.";
}
];
}
# hack to determine if cfg.config is a valid home-manager config
(mkIf (cfg.config ? home && cfg.config.home ? activationPackage) {
config = mkIf (cfg.config != null) {
inherit (cfg.config) assertions warnings;
@ -130,7 +104,6 @@ in
"profiles/per-user/${config.user.userName}".source =
builtins.toPath "${config.user.home}/.nix-profile";
};
})
]);
};
}