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:" 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/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": { 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/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"; 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 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/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. ''; } 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 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; 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/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/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} ''; }) ] 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; 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 = { 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."; }; diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index 2d90d6331..ba16085b3 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"; @@ -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; + }; + } + ''; }; }; }; 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 diff --git a/nixos/default.nix b/nixos/default.nix index 95d5943fc..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; + }; }]; }; } @@ -48,7 +52,6 @@ in { serviceConfig = { User = usercfg.home.username; Type = "oneshot"; - RemainAfterExit = "yes"; TimeoutStartSec = "5m"; SyslogIdentifier = "hm-activate-${username}"; 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 } 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" 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} + ''; + }; +} 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" 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}}! 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 + '' + } + ''; +}