mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
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
1 changed files with 12 additions and 0 deletions
|
@ -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 {
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
|
@ -762,6 +773,7 @@ in {
|
|||
|
||||
"${profilesPath}/${profile.path}/containers.json" =
|
||||
mkIf (profile.containers != { }) {
|
||||
force = profile.containersForce;
|
||||
text = mkContainersJson profile.containers;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue