firefox: add containersForce flag
Firefox, upon exit, creates the default containers.json file in place of the one that home-manager created. This leads to errors when switching to a new profile, as home-manager is careful with overwriting existing files. The added option toggles that behaviour. Closes: https://github.com/nix-community/home-manager/issues/4989
This commit is contained in:
parent
b00d0e4fe9
commit
18f89ef74f
|
@ -573,6 +573,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
containersForce = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to force replace the existing containers
|
||||||
|
configuration. This is recommended since Firefox will
|
||||||
|
replace the symlink on every launch, but note that you'll
|
||||||
|
lose any existing configuration by enabling this.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
containers = mkOption {
|
containers = mkOption {
|
||||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
@ -762,6 +773,7 @@ in {
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/containers.json" =
|
"${profilesPath}/${profile.path}/containers.json" =
|
||||||
mkIf (profile.containers != { }) {
|
mkIf (profile.containers != { }) {
|
||||||
|
force = profile.containersForce;
|
||||||
text = mkContainersJson profile.containers;
|
text = mkContainersJson profile.containers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue