firefox: add default containers
This commit is contained in:
parent
70688f195a
commit
03958aff44
3 changed files with 60 additions and 1 deletions
|
|
@ -78,7 +78,24 @@ let
|
|||
version = 4;
|
||||
lastUserContextId =
|
||||
elemAt (mapAttrsToList (_: container: container.id) containers) 0;
|
||||
identities = mapAttrsToList containerToIdentity containers;
|
||||
identities = mapAttrsToList containerToIdentity containers ++ [
|
||||
{
|
||||
userContextId = 4294967294; # 2^32 - 2
|
||||
name = "userContextIdInternal.thumbnail";
|
||||
icon = "";
|
||||
color = "";
|
||||
accessKey = "";
|
||||
public = false;
|
||||
}
|
||||
{
|
||||
userContextId = 4294967295; # 2^32 - 1
|
||||
name = "userContextIdInternal.webextStorageLocal";
|
||||
icon = "";
|
||||
color = "";
|
||||
accessKey = "";
|
||||
public = false;
|
||||
}
|
||||
];
|
||||
}}
|
||||
'';
|
||||
|
||||
|
|
@ -677,6 +694,20 @@ in {
|
|||
(", namely " + concatStringsSep ", " defaults);
|
||||
})
|
||||
|
||||
(let
|
||||
getContainers = profiles:
|
||||
flatten
|
||||
(mapAttrsToList (_: value: (attrValues value.containers)) profiles);
|
||||
|
||||
findInvalidContainerIds = profiles:
|
||||
filter (container: container.id >= 4294967294)
|
||||
(getContainers profiles);
|
||||
in {
|
||||
assertion = cfg.profiles == { }
|
||||
|| length (findInvalidContainerIds cfg.profiles) == 0;
|
||||
message = "Container id must be smaller than 4294967294 (2^32 - 2)";
|
||||
})
|
||||
|
||||
(mkNoDuplicateAssertion cfg.profiles "profile")
|
||||
] ++ (mapAttrsToList
|
||||
(_: profile: mkNoDuplicateAssertion profile.containers "container")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue