Skip to content

Commit 42e1e9a

Browse files
authored
chore(hm-module): leave xdg migration stage (#277)
1 parent 944201a commit 42e1e9a

File tree

4 files changed

+7
-33
lines changed

4 files changed

+7
-33
lines changed

hm-module/default.nix

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
lib,
99
...
1010
}: let
11-
inherit (lib) getAttrFromPath mkIf mkOption setAttrByPath;
11+
inherit (lib) getAttrFromPath mkIf;
1212

1313
modulePath = [
1414
"programs"
@@ -61,34 +61,15 @@ in {
6161
(import ./mods.nix)
6262
(import ./sine.nix {inherit mkSinePack;})
6363
(import ./default-browser.nix {inherit name;})
64+
(lib.mkRemovedOptionModule [
65+
"programs"
66+
"zen-browser"
67+
"suppressXdgMigrationWarning"
68+
] "The XDG migration stage has ended.")
6469
];
6570

66-
options = setAttrByPath modulePath {
67-
suppressXdgMigrationWarning = mkOption {
68-
type = lib.types.bool;
69-
default = false;
70-
description = ''
71-
Set to true to suppress the XDG config directory migration warning.
72-
'';
73-
};
74-
};
75-
7671
config = mkIf cfg.enable {
7772
warnings = let
78-
migrationWarning =
79-
if pkgs.stdenv.isLinux && !cfg.suppressXdgMigrationWarning
80-
then ''
81-
[Zen Browser] Starting from release 18.18.6b, the configuration directory
82-
has changed from ~/.zen to ~/.config/zen.
83-
84-
If you haven't migrated yet, please follow the migration guide:
85-
https://github.com/0xc000022070/zen-browser-flake#missing-configuration-after-update
86-
87-
To suppress this warning after completing the migration, set:
88-
programs.zen-browser.suppressXdgMigrationWarning = true;
89-
''
90-
else null;
91-
9273
essentialPinsWarning = let
9374
hasIssue = lib.any (
9475
profile:
@@ -107,7 +88,6 @@ in {
10788
else null;
10889
in
10990
lib.filter (w: w != null) [
110-
migrationWarning
11191
essentialPinsWarning
11292
];
11393

tests/default-browser.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
programs.zen-browser = {
66
enable = true;
7-
suppressXdgMigrationWarning = true;
87
setAsDefaultBrowser = true;
98
};
109

tests/enable-beta.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
homeModule = {
33
imports = [zen-browser-flake.homeModules.beta];
44

5-
programs.zen-browser = {
6-
enable = true;
7-
suppressXdgMigrationWarning = true;
8-
};
5+
programs.zen-browser.enable = true;
96
};
107

118
testScript = '' # python

tests/pins-persistent.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
programs.zen-browser = {
1010
enable = true;
11-
suppressXdgMigrationWarning = true;
12-
1311
profiles.default = {
1412
pins = {
1513
"Test Pin" = {

0 commit comments

Comments
 (0)