Allow to easily override the assertion for supported distros.
This commit is contained in:
parent
9278cc8be8
commit
84a4ddac1e
1 changed files with 3 additions and 1 deletions
|
|
@ -15,6 +15,8 @@
|
|||
default = [ ];
|
||||
};
|
||||
|
||||
allowAnyDistro = lib.mkEnableOption "the usage of system-manager on untested distributions";
|
||||
|
||||
preActivationAssertions = lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
|
@ -70,7 +72,7 @@
|
|||
supportedIds = [ "nixos" "ubuntu" ];
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
enable = !config.system-manager.allowAnyDistro;
|
||||
script = ''
|
||||
source /etc/os-release
|
||||
${lib.concatStringsSep "\n" (lib.flip map supportedIds (supportedId: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue