mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-09 03:56:06 +01:00
home-manager: remove support for 19.09 releases
This commit is contained in:
parent
1ad8c7ac48
commit
43fafe1736
1 changed files with 28 additions and 55 deletions
|
|
@ -7,11 +7,6 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.home-manager;
|
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;
|
extendedLib = import (home-manager.path + "/modules/lib/stdlib-extended.nix") pkgs.lib;
|
||||||
|
|
||||||
hmModule = types.submoduleWith {
|
hmModule = types.submoduleWith {
|
||||||
|
|
@ -54,10 +49,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
type =
|
type = types.nullOr hmModule;
|
||||||
if assertion
|
|
||||||
then types.nullOr hmModule
|
|
||||||
else types.unspecified;
|
|
||||||
default = null;
|
default = null;
|
||||||
description = "Home Manager configuration.";
|
description = "Home Manager configuration.";
|
||||||
};
|
};
|
||||||
|
|
@ -81,25 +73,7 @@ in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf (cfg.config != null) (mkMerge [
|
config = mkIf (cfg.config != null) {
|
||||||
|
|
||||||
{
|
|
||||||
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) {
|
|
||||||
|
|
||||||
inherit (cfg.config) assertions warnings;
|
inherit (cfg.config) assertions warnings;
|
||||||
|
|
||||||
|
|
@ -130,7 +104,6 @@ in
|
||||||
"profiles/per-user/${config.user.userName}".source =
|
"profiles/per-user/${config.user.userName}".source =
|
||||||
builtins.toPath "${config.user.home}/.nix-profile";
|
builtins.toPath "${config.user.home}/.nix-profile";
|
||||||
};
|
};
|
||||||
})
|
|
||||||
|
|
||||||
]);
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue