From 2f607e07f3ac7e53541120536708e824acccfaa8 Mon Sep 17 00:00:00 2001 From: rodrigovillarbello Date: Sat, 2 Nov 2024 03:43:32 +0100 Subject: [PATCH 01/21] docs: home.sessionVariable clarification Closes: https://github.com/nix-community/home-manager/issues/6027 --- modules/home-environment.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 59497ec4a..2673d1711 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -280,8 +280,9 @@ in }; ``` may not work as expected. If you need to reference another - session variable, then do so inside Nix instead. The above - example then becomes + session variable (even if it is declared by using other options + like [](#opt-xdg.configHome)), then do so inside Nix instead. + The above example then becomes ```nix home.sessionVariables = { FOO = "Hello"; From 73090072715c823dd19478a58ba4f241d27a577f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:38:24 +0100 Subject: [PATCH 02/21] news: fix typo --- modules/misc/news.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/misc/news.nix b/modules/misc/news.nix index aeec8f9a0..32394f335 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1810,7 +1810,7 @@ in { NixGL solve the "OpenGL" problem with nix. The 'nixGL' module provides integration of NixGL into Home Manager. See the "GPU on non-NixOS - systems" section in the Home Manager mantual for more. + systems" section in the Home Manager manual for more. ''; } From 60bb110917844d354f3c18e05450606a435d2d10 Mon Sep 17 00:00:00 2001 From: Milo Moisson Date: Sun, 10 Nov 2024 11:42:08 +0100 Subject: [PATCH 03/21] helix: fix wrapping of extraPackages This makes extraPackages the default, but they do not shadow the env so you can still have packages (e.g. LSPs) with a different version than the global one in you local env like nix's shells. --- modules/programs/helix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 01af7b14e..840f5d82f 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -188,7 +188,7 @@ in { nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/hx \ - --prefix PATH : ${lib.makeBinPath cfg.extraPackages} + --suffix PATH : ${lib.makeBinPath cfg.extraPackages} ''; }) ] From 149a48da315988e36a6e12a82c49667a90d8031f Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:50:06 +0100 Subject: [PATCH 04/21] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/807e9154dcb16384b1b765ebe9cd2bba2ac287fd?narHash=sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU%3D' (2024-10-29) → 'github:NixOS/nixpkgs/76612b17c0ce71689921ca12d9ffdc9c23ce40b2?narHash=sha256-IigrKK3vYRpUu%2BHEjPL/phrfh7Ox881er1UEsZvw9Q4%3D' (2024-11-09) Co-authored-by: github-actions[bot] --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index b9e8c1d0d..2f5f887cb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "lastModified": 1731139594, + "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", "type": "github" }, "original": { From 40746b5c77e9ab3fc2196802b637676574aaeb48 Mon Sep 17 00:00:00 2001 From: RedEtherbloom Date: Wed, 6 Nov 2024 23:29:13 +0100 Subject: [PATCH 05/21] alacritty: fix test for nixpkgs update Recent nixpkgs update made a small change to how TOML is generated, causing the test toml to be out of date. --- tests/modules/programs/alacritty/settings-toml-expected.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/programs/alacritty/settings-toml-expected.toml b/tests/modules/programs/alacritty/settings-toml-expected.toml index 018881bcd..986c92f91 100644 --- a/tests/modules/programs/alacritty/settings-toml-expected.toml +++ b/tests/modules/programs/alacritty/settings-toml-expected.toml @@ -1,4 +1,3 @@ -[font] [font.bold] family = "SFMono" From 7e42a37bf7dffd7fe4c2b14e42161433d7182d66 Mon Sep 17 00:00:00 2001 From: RedEtherbloom Date: Wed, 6 Nov 2024 23:32:10 +0100 Subject: [PATCH 06/21] spotify-player: fix test for nixpkgs update Recent nixpkgs update made a small change to how TOML is generated, causing the test toml to be out of date. --- tests/modules/programs/spotify-player/theme.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/programs/spotify-player/theme.toml b/tests/modules/programs/spotify-player/theme.toml index cb5fa99d4..f963e707d 100644 --- a/tests/modules/programs/spotify-player/theme.toml +++ b/tests/modules/programs/spotify-player/theme.toml @@ -1,7 +1,6 @@ [[themes]] name = "default2" -[themes.component_style] [themes.component_style.block_title] fg = "Magenta" From ee8ff6d53fca9adec60238f63eb632300d0dffa0 Mon Sep 17 00:00:00 2001 From: RedEtherbloom Date: Wed, 6 Nov 2024 23:35:57 +0100 Subject: [PATCH 07/21] espanso: fix test for nixpkgs update Recent nixpkgs update made a small change how YAML is generated, causing the test YAML to be out of date. The replacement match is also an exact example from the espanso wiki https://espanso.org/docs/matches/basics/#multi-line-expansions. --- tests/modules/services/espanso/basic-matches.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/modules/services/espanso/basic-matches.yaml b/tests/modules/services/espanso/basic-matches.yaml index 3cf98c989..ba9f8ef84 100644 --- a/tests/modules/services/espanso/basic-matches.yaml +++ b/tests/modules/services/espanso/basic-matches.yaml @@ -10,9 +10,7 @@ global_vars: matches: - replace: It's {{currentdate}} {{currenttime}} trigger: :now -- replace: 'line1 - - line2' +- replace: "line1\nline2" trigger: :hello - regex: :hi(?P.*)\. replace: Hi {{person}}! From cd21d2e61b2da9cc5b96f848ac6fd3c4dc377a1b Mon Sep 17 00:00:00 2001 From: RedEtherbloom Date: Thu, 31 Oct 2024 21:55:36 +0100 Subject: [PATCH 08/21] git-sync: fix crash when whitespace in path systemd rejects the service unit due to whitespace in the environment variable assignment, pointing to the repo path, being invalid for systemd's unit format. See https://github.com/nix-community/home-manager/issues/6023 for details. The git-sync variable should also be escaped due to similar issues with e.g. local git urls. --- modules/services/git-sync.nix | 4 +- tests/modules/services/git-sync/basic.nix | 2 +- tests/modules/services/git-sync/default.nix | 5 ++- .../modules/services/git-sync/whitespace.nix | 42 +++++++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 tests/modules/services/git-sync/whitespace.nix diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index 2d90d6331..4bc2381b2 100644 --- a/modules/services/git-sync.nix +++ b/modules/services/git-sync.nix @@ -16,9 +16,9 @@ let "PATH=${ lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages) }" - "GIT_SYNC_DIRECTORY=${repo.path}" + "GIT_SYNC_DIRECTORY=${strings.escapeShellArg repo.path}" "GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync" - "GIT_SYNC_REPOSITORY=${repo.uri}" + "GIT_SYNC_REPOSITORY=${strings.escapeShellArg repo.uri}" "GIT_SYNC_INTERVAL=${toString repo.interval}" ]; ExecStart = "${cfg.package}/bin/git-sync-on-inotify"; diff --git a/tests/modules/services/git-sync/basic.nix b/tests/modules/services/git-sync/basic.nix index a82e9a4b1..0412f93b1 100644 --- a/tests/modules/services/git-sync/basic.nix +++ b/tests/modules/services/git-sync/basic.nix @@ -27,7 +27,7 @@ Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin Environment=GIT_SYNC_DIRECTORY=/a/path Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync - Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git + Environment=GIT_SYNC_REPOSITORY='git+ssh://user@example.com:/~user/path/to/repo.git' Environment=GIT_SYNC_INTERVAL=500 ExecStart=@git-sync@/bin/git-sync-on-inotify Restart=on-abort diff --git a/tests/modules/services/git-sync/default.nix b/tests/modules/services/git-sync/default.nix index 0e9db79d0..7a2000a3e 100644 --- a/tests/modules/services/git-sync/default.nix +++ b/tests/modules/services/git-sync/default.nix @@ -1 +1,4 @@ -{ git-sync = ./basic.nix; } +{ + git-sync = ./basic.nix; + git-sync-with-whitespace = ./whitespace.nix; +} diff --git a/tests/modules/services/git-sync/whitespace.nix b/tests/modules/services/git-sync/whitespace.nix new file mode 100644 index 000000000..871843553 --- /dev/null +++ b/tests/modules/services/git-sync/whitespace.nix @@ -0,0 +1,42 @@ +{ config, ... }: + +{ + services.git-sync = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@git-sync@"; }; + repositories = { + testWithWhitespace = { + path = "/a path"; + uri = "git+ssh://user@example.com:/~user/path to/repo.git"; + }; + }; + }; + + test.stubs.openssh = { name = "openssh"; }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/git-sync-testWithWhitespace.service + + assertFileExists $serviceFile + + serviceFile=$(normalizeStorePaths $serviceFile) + assertFileContent $serviceFile ${ + builtins.toFile "expected" '' + [Install] + WantedBy=default.target + + [Service] + Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin + Environment=GIT_SYNC_DIRECTORY='/a path' + Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync + Environment=GIT_SYNC_REPOSITORY='git+ssh://user@example.com:/~user/path to/repo.git' + Environment=GIT_SYNC_INTERVAL=500 + ExecStart=@git-sync@/bin/git-sync-on-inotify + Restart=on-abort + + [Unit] + Description=Git Sync testWithWhitespace + '' + } + ''; +} From 3c044aefe610ceeec9cf3e83e55fa62715df27e2 Mon Sep 17 00:00:00 2001 From: RedEtherbloom Date: Thu, 31 Oct 2024 22:22:16 +0100 Subject: [PATCH 09/21] git-sync: add example to repository option --- modules/services/git-sync.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index 4bc2381b2..ba16085b3 100644 --- a/modules/services/git-sync.nix +++ b/modules/services/git-sync.nix @@ -112,6 +112,15 @@ in { description = '' The repositories that should be synchronized. ''; + example = literalExpression '' + { + xyz = { + path = "''${config.home.homeDirectory}/foo/home-manager"; + uri = "git@github.com:nix-community/home-manager.git"; + interval = 1000; + }; + } + ''; }; }; }; From 35b055009afd0107b69c286fca34d2ad98940d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Wed, 13 Nov 2024 23:07:20 +0100 Subject: [PATCH 10/21] kanshi: add package to home.packages --- modules/services/kanshi.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/services/kanshi.nix b/modules/services/kanshi.nix index 3b1bdf2cf..2eda74876 100644 --- a/modules/services/kanshi.nix +++ b/modules/services/kanshi.nix @@ -330,6 +330,8 @@ in { }) { + home.packages = [ cfg.package ]; + xdg.configFile."kanshi/config".text = if cfg.profiles == { } && cfg.extraConfig == "" then directivesStr From 1d0862ee2d7c6f6cd720d6f32213fa425004be10 Mon Sep 17 00:00:00 2001 From: gmvar Date: Thu, 14 Nov 2024 09:16:21 -0800 Subject: [PATCH 11/21] feh: add themes option (#6074) - added themes option - added themes test - updated broken man page links --- modules/programs/feh.nix | 40 ++++++++++++++++++- tests/modules/programs/feh/default.nix | 1 + .../programs/feh/feh-empty-settings.nix | 1 + .../modules/programs/feh/feh-themes-expected | 6 +++ tests/modules/programs/feh/feh-themes.nix | 32 +++++++++++++++ 5 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/modules/programs/feh/feh-themes-expected create mode 100644 tests/modules/programs/feh/feh-themes.nix diff --git a/modules/programs/feh.nix b/modules/programs/feh.nix index f44f184a3..bef9caac3 100644 --- a/modules/programs/feh.nix +++ b/modules/programs/feh.nix @@ -8,6 +8,12 @@ let bindingsOf = t: with types; attrsOf (nullOr (either t (listOf t))); + renderThemes = options: + let + render = + mapAttrsToList (theme: options: "${theme} ${escapeShellArgs options}"); + in concatStringsSep "\n" (render options); + renderBindings = bindings: let enabled = filterAttrs (n: v: v != null) bindings; @@ -41,7 +47,7 @@ in { Override feh's default mouse button mapping. If you want to disable an action, set its value to null. If you want to bind multiple buttons to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; @@ -58,10 +64,37 @@ in { Override feh's default keybindings. If you want to disable a keybinding set its value to null. If you want to bind multiple keys to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; + + themes = mkOption { + default = { }; + type = with types; attrsOf (listOf str); + example = { + feh = [ "--image-bg" "black" ]; + webcam = [ "--multiwindow" "--reload" "20" ]; + present = [ "--full-screen" "--sort" "name" "--hide-pointer" ]; + booth = [ "--full-screen" "--hide-pointer" "--slideshow-delay" "20" ]; + imagemap = [ + "-rVq" + "--thumb-width" + "40" + "--thumb-height" + "30" + "--index-info" + "%n\\n%wx%h" + ]; + example = [ "--info" "foo bar" ]; + }; + description = '' + Define themes for feh. + See for + important guidelines and limitations related to theme configuration. + ''; + }; + }; config = mkIf cfg.enable { @@ -79,5 +112,8 @@ in { xdg.configFile."feh/keys" = mkIf (cfg.keybindings != { }) { text = renderBindings cfg.keybindings + "\n"; }; + + xdg.configFile."feh/themes" = + mkIf (cfg.themes != { }) { text = renderThemes cfg.themes + "\n"; }; }; } diff --git a/tests/modules/programs/feh/default.nix b/tests/modules/programs/feh/default.nix index 48bab8ab6..e1051adcd 100644 --- a/tests/modules/programs/feh/default.nix +++ b/tests/modules/programs/feh/default.nix @@ -1,4 +1,5 @@ { feh-empty-config = ./feh-empty-settings.nix; feh-bindings = ./feh-bindings.nix; + feh-themes = ./feh-themes.nix; } diff --git a/tests/modules/programs/feh/feh-empty-settings.nix b/tests/modules/programs/feh/feh-empty-settings.nix index 62feb8230..9a50e20bf 100644 --- a/tests/modules/programs/feh/feh-empty-settings.nix +++ b/tests/modules/programs/feh/feh-empty-settings.nix @@ -9,6 +9,7 @@ nmt.script = '' assertPathNotExists home-files/.config/feh/buttons assertPathNotExists home-files/.config/feh/keys + assertPathNotExists home-files/.config/feh/themes ''; }; } diff --git a/tests/modules/programs/feh/feh-themes-expected b/tests/modules/programs/feh/feh-themes-expected new file mode 100644 index 000000000..5dce2792d --- /dev/null +++ b/tests/modules/programs/feh/feh-themes-expected @@ -0,0 +1,6 @@ +booth --full-screen --hide-pointer --slideshow-delay 20 +example --info 'foo bar' +feh --image-bg black +imagemap -rVq --thumb-width 40 --thumb-height 30 --index-info '%n\n%wx%h' +present --full-screen --sort name --hide-pointer +webcam --multiwindow --reload 20 diff --git a/tests/modules/programs/feh/feh-themes.nix b/tests/modules/programs/feh/feh-themes.nix new file mode 100644 index 000000000..f06ea0716 --- /dev/null +++ b/tests/modules/programs/feh/feh-themes.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: + +{ + config = { + programs.feh.enable = true; + + programs.feh.themes = { + feh = [ "--image-bg" "black" ]; + webcam = [ "--multiwindow" "--reload" "20" ]; + present = [ "--full-screen" "--sort" "name" "--hide-pointer" ]; + booth = [ "--full-screen" "--hide-pointer" "--slideshow-delay" "20" ]; + imagemap = [ + "-rVq" + "--thumb-width" + "40" + "--thumb-height" + "30" + "--index-info" + "%n\\n%wx%h" + ]; + example = [ "--info" "foo bar" ]; + }; + + test.stubs.feh = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/feh/themes \ + ${./feh-themes-expected} + ''; + }; +} From 400e3c0152793ece616081870f979a2081a04f63 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sat, 16 Nov 2024 17:25:31 +0000 Subject: [PATCH 12/21] nixos: always run home-manager on NixOS activation (#5780) Currently, the home-manager systemd service will only get restarted when the home-manager configuration changes. This can lead to issues in users' home directories not getting corrected for a while. $ rm ~/.zshrc $ sudo nixos-rebuild switch $ ls ~/.zshrc ls: cannot access '/home/enzime/.zshrc': No such file or directory --- nixos/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/default.nix b/nixos/default.nix index 95d5943fc..2b542238a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -48,7 +48,6 @@ in { serviceConfig = { User = usercfg.home.username; Type = "oneshot"; - RemainAfterExit = "yes"; TimeoutStartSec = "5m"; SyslogIdentifier = "hm-activate-${username}"; From 192f123e4b5a4605c30566409ccacffc416e45c4 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sat, 16 Nov 2024 17:31:16 +0000 Subject: [PATCH 13/21] nixos: add `key` to shared module to allow disabling it (#6017) By adding `key`, this allows users to disable this shared module or they can choose to not disable this shared module (by filtering by key before disabling) This means users can disable all shared modules if all modules are paths or attrsets with a key: `configuration.nix`: ```nix { config, ... }: { home-manager.users.enzime = { ... }: { disabledModules = config.home-manager.sharedModules; }; } ``` Or disabling just this module specifically: ```nix { ... }: { home-manager.users.enzime = { ... }: { disabledModules = [ { key = "home-manager#nixos-shared-module"; } ]; }; } ``` Or disabling all modules when you have modules you can't disable (like lambdas): ```nix { ... }: { home-manager.users.enzime = { ... }: { disabledModules = lib.filter (v: lib.isString v || lib.isPath v || (lib.isAttrs v && v ? key)) config.home-manager.sharedModules; }; } ``` https://nixos.org/manual/nixos/unstable/#sec-replace-modules --- nixos/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index 2b542238a..4484d28f8 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -19,13 +19,17 @@ in { extraSpecialArgs.nixosConfig = config; sharedModules = [{ - # The per-user directory inside /etc/profiles is not known by - # fontconfig by default. - fonts.fontconfig.enable = lib.mkDefault - (cfg.useUserPackages && config.fonts.fontconfig.enable); + key = "home-manager#nixos-shared-module"; - # Inherit glibcLocales setting from NixOS. - i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales; + config = { + # The per-user directory inside /etc/profiles is not known by + # fontconfig by default. + fonts.fontconfig.enable = lib.mkDefault + (cfg.useUserPackages && config.fonts.fontconfig.enable); + + # Inherit glibcLocales setting from NixOS. + i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales; + }; }]; }; } From d154a557da07645aaea3b3375317c234cf2eed82 Mon Sep 17 00:00:00 2001 From: Jany <127505435+janydoe@users.noreply.github.com> Date: Sat, 16 Nov 2024 17:38:16 +0000 Subject: [PATCH 14/21] aerc: add support of account gpg config (#5298) --- modules/programs/aerc-accounts.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/programs/aerc-accounts.nix b/modules/programs/aerc-accounts.nix index 6a6153e5e..04f0165a0 100644 --- a/modules/programs/aerc-accounts.nix +++ b/modules/programs/aerc-accounts.nix @@ -230,8 +230,15 @@ in { else { }; + gpgCfg = account: + optionalAttrs (account.gpg != null) { + pgp-key-id = account.gpg.key; + pgp-auto-sign = account.gpg.signByDefault; + pgp-opportunistic-encrypt = account.gpg.encryptByDefault; + }; + in (basicCfg account) // (sourceCfg account) // (outgoingCfg account) - // account.aerc.extraAccounts; + // (gpgCfg account) // account.aerc.extraAccounts; mkAccountConfig = name: account: mapAttrNames (addAccountName name) account.aerc.extraConfig; From c7c251761235282acfc681accf8d3deea6681cc0 Mon Sep 17 00:00:00 2001 From: Nanotwerp Date: Sat, 16 Nov 2024 13:36:13 -0500 Subject: [PATCH 15/21] {gtk, dunst}: replace `pkgs.gnome.adwaita-icon-theme` with `pkgs.adwaita-icon-theme` in the examples (#5712) `adwaita-icon-theme` has been moved out of the `gnome` scope and into the top level with https://github.com/NixOS/nixpkgs/pull/319659 --- modules/misc/gtk.nix | 2 +- modules/services/dunst.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index e1ae250fd..65ed1de2f 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -53,7 +53,7 @@ let package = mkOption { type = types.nullOr types.package; default = null; - example = literalExpression "pkgs.gnome.adwaita-icon-theme"; + example = literalExpression "pkgs.adwaita-icon-theme"; description = '' Package providing the icon theme. This package will be installed to your profile. If `null` then the theme diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 5bd82a399..6b2727b3f 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -25,7 +25,7 @@ let options = { package = mkOption { type = types.package; - example = literalExpression "pkgs.gnome.adwaita-icon-theme"; + example = literalExpression "pkgs.adwaita-icon-theme"; description = "Package providing the theme."; }; From 1bd5616e33c0c54d7a5b37db94160635a9b27aeb Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 16 Nov 2024 14:54:20 -0500 Subject: [PATCH 16/21] lib/file-type: Make `force` option visible (#6003) This is something that is useful, we should not hide it from the docs. --- modules/lib/file-type.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix index 3fb51fd56..48ff00f1b 100644 --- a/modules/lib/file-type.nix +++ b/modules/lib/file-type.nix @@ -99,7 +99,6 @@ in { force = mkOption { type = types.bool; default = false; - visible = false; description = '' Whether the target path should be unconditionally replaced by the managed file source. Warning, this will silently From 5056a1cf0ce7c2a08ab50713b6c4af77975f6111 Mon Sep 17 00:00:00 2001 From: Juanjo Presa Date: Sun, 17 Nov 2024 09:34:39 +0100 Subject: [PATCH 17/21] version: allow 25.05 as state version Nixpkgs updated upstream: https://github.com/NixOS/nixpkgs/commit/90fcf3aa7eba70f18dad15b634e9336b997d25ac --- modules/misc/version.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/misc/version.nix b/modules/misc/version.nix index d068a3869..176901f3e 100644 --- a/modules/misc/version.nix +++ b/modules/misc/version.nix @@ -22,6 +22,7 @@ in { "23.11" "24.05" "24.11" + "25.05" ]; description = '' It is occasionally necessary for Home Manager to change From aecd341dfead1c3ef7a3c15468ecd71e8343b7c6 Mon Sep 17 00:00:00 2001 From: Kacper Koniuszy <120419423+kkoniuszy@users.noreply.github.com> Date: Sat, 27 Jul 2024 10:55:09 +0200 Subject: [PATCH 18/21] firefox: improve search engine disclaimer generation Using a fixed application name in the salt for the search engine name hash can break with minor branding changes. For example, LibreWolf 127 used the application name "LibreWolf", but in version 128 it is "Firefox". The proper name can be found in about:support -> Application Basics. Because it doesn't have to be related to the product name visible in most of the browser (for example in the window title and help menus), we shouldn't rely on cfg.name for that. The application name can be read from lib/*/application.ini and we can use that if the browser was installed via Home Manager. If not, we can fall back to cfg.name. --- modules/programs/firefox/mkFirefoxModule.nix | 1 + modules/programs/firefox/profiles/search.nix | 24 +++++++++++++++++--- modules/programs/thunderbird.nix | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/modules/programs/firefox/mkFirefoxModule.nix b/modules/programs/firefox/mkFirefoxModule.nix index 8ef3f12d3..da7c96722 100644 --- a/modules/programs/firefox/mkFirefoxModule.nix +++ b/modules/programs/firefox/mkFirefoxModule.nix @@ -553,6 +553,7 @@ in { inherit (args) config; inherit lib pkgs; appName = cfg.name; + package = cfg.finalPackage; modulePath = modulePath ++ [ "profiles" name "search" ]; profilePath = config.path; }); diff --git a/modules/programs/firefox/profiles/search.nix b/modules/programs/firefox/profiles/search.nix index 69b771aa4..99a226744 100644 --- a/modules/programs/firefox/profiles/search.nix +++ b/modules/programs/firefox/profiles/search.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, appName, modulePath, profilePath }: +{ config, lib, pkgs, appName, package, modulePath, profilePath }: with lib; @@ -108,10 +108,10 @@ let # a claim by Mozilla to remove this would be very anti-user, and # is unlikely to be an issue for our use case. disclaimer = "By modifying this file, I agree that I am doing so " - + "only within ${appName} itself, using official, user-driven search " + + "only within @appName@ itself, using official, user-driven search " + "engine selection processes, and in a way which does not circumvent " + "user consent. I acknowledge that any attempt to change this file " - + "from outside of ${appName} is a malicious act, and will be responded " + + "from outside of @appName@ is a malicious act, and will be responded " + "to accordingly."; salt = if config.default != null then @@ -124,11 +124,29 @@ let else null; + appNameVariable = if package == null then + "appName=${lib.escapeShellArg appName}" + else '' + applicationIni="$(find ${lib.escapeShellArg package} -maxdepth 3 -path ${ + lib.escapeShellArg package + }'/lib/*/application.ini' -print -quit)" + if test -n "$applicationIni"; then + appName="$(sed -n 's/^Name=\(.*\)$/\1/p' "$applicationIni" | head -n1)" + else + appName=${lib.escapeShellArg appName} + fi + ''; + file = pkgs.runCommand "search.json.mozlz4" { nativeBuildInputs = with pkgs; [ mozlz4a openssl ]; json = builtins.toJSON settings; inherit salt privateSalt; } '' + ${appNameVariable} + + salt=''${salt//@appName@/"$appName"} + privateSalt=''${privateSalt//@appName@/"$appName"} + if [[ -n $salt ]]; then export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64) diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index ad7a1360f..b3713f655 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -232,6 +232,7 @@ in { inherit (args) config; inherit lib pkgs; appName = "Thunderbird"; + package = cfg.package; modulePath = [ "programs" "thunderbird" "profiles" name "search" ]; profilePath = name; From 0918bb02385a6897e7a0180d23ee4587491eb0d4 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 17 Nov 2024 23:31:31 +0100 Subject: [PATCH 19/21] ci: make dependabot consider release-24.11 --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2aea2da27..b34df60ea 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,3 +15,11 @@ updates: interval: "weekly" commit-message: prefix: "ci:" + + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "release-24.11" + schedule: + interval: "weekly" + commit-message: + prefix: "ci:" From 05d3b6215afa733fed6f025a59a562f98330acc3 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 17 Nov 2024 23:39:12 +0100 Subject: [PATCH 20/21] home-manager: prepare 25.05-pre --- docs/manual/manual.md | 2 +- docs/release-notes/release-notes.md | 1 + docs/release-notes/rl-2505.md | 18 ++++++++++++++++++ home-manager/home-manager | 2 +- release.json | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 docs/release-notes/rl-2505.md diff --git a/docs/manual/manual.md b/docs/manual/manual.md index 0f81642f7..2aa6024ae 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -1,6 +1,6 @@ # Home Manager Manual {#home-manager-manual} -## Version 24.05 (unstable) +## Version 25.05 (unstable) ```{=include=} preface diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index dabeba0c9..b7d1b4380 100644 --- a/docs/release-notes/release-notes.md +++ b/docs/release-notes/release-notes.md @@ -4,6 +4,7 @@ This section lists the release notes for stable versions of Home Manager and the current unstable version. ```{=include=} chapters +rl-2505.md rl-2411.md rl-2405.md rl-2311.md diff --git a/docs/release-notes/rl-2505.md b/docs/release-notes/rl-2505.md new file mode 100644 index 000000000..dec0f2131 --- /dev/null +++ b/docs/release-notes/rl-2505.md @@ -0,0 +1,18 @@ +# Release 25.05 {#sec-release-25.05} + +This is the current unstable branch and the information in this +section is therefore not final. + +## Highlights {#sec-release-25.05-highlights} + +This release has the following notable changes: + +- No changes. + +## State Version Changes {#sec-release-25.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"25.05\" or later. + +- No changes. diff --git a/home-manager/home-manager b/home-manager/home-manager index 5bf796b47..71b982f40 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -1044,7 +1044,7 @@ while [[ $# -gt 0 ]]; do export VERBOSE=1 ;; --version) - echo 24.11-pre + echo 25.05-pre exit 0 ;; *) diff --git a/release.json b/release.json index e5d3102cf..1d2863a09 100644 --- a/release.json +++ b/release.json @@ -1,4 +1,4 @@ { - "release": "24.11", + "release": "25.05", "isReleaseBranch": false } From f3a2ff69586f3a54b461526e5702b1a2f81e740a Mon Sep 17 00:00:00 2001 From: Ilham AM Date: Mon, 18 Nov 2024 06:44:26 +0700 Subject: [PATCH 21/21] zsh-abbr: update source path (#6084) --- modules/programs/zsh/zsh-abbr.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/zsh/zsh-abbr.nix b/modules/programs/zsh/zsh-abbr.nix index 8b6189c52..47f29f211 100644 --- a/modules/programs/zsh/zsh-abbr.nix +++ b/modules/programs/zsh/zsh-abbr.nix @@ -28,7 +28,7 @@ in { programs.zsh.plugins = [{ name = "zsh-abbr"; src = pkgs.zsh-abbr; - file = "/share/zsh/zsh-abbr/abbr.plugin.zsh"; + file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh"; }]; xdg.configFile = {