From 25dedb0d52c20448f6a63cc346df1adbd6ef417e Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 23 May 2024 09:07:00 +0200 Subject: [PATCH 01/96] version: allow 24.11 as state version --- modules/misc/version.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/misc/version.nix b/modules/misc/version.nix index 048f784a..d068a386 100644 --- a/modules/misc/version.nix +++ b/modules/misc/version.nix @@ -21,6 +21,7 @@ in { "23.05" "23.11" "24.05" + "24.11" ]; description = '' It is occasionally necessary for Home Manager to change From 850cb322046ef1a268449cf1ceda5fd24d930b05 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 23 May 2024 11:45:08 +0200 Subject: [PATCH 02/96] ci: make dependabot consider the release-24.05 Also remove 23.05 from dependabot. --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 76b9adfa..6ba7256d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.05" + target-branch: "release-23.11" schedule: interval: "weekly" commit-message: @@ -18,7 +18,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.11" + target-branch: "release-24.05" schedule: interval: "weekly" commit-message: From 548ba194d0676849424657cc41c59ab57d94b344 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 24 May 2024 17:29:26 +0200 Subject: [PATCH 03/96] home-manager: prepare release 24.05 --- README.md | 4 ++-- docs/manual/installation/nix-darwin.md | 6 +++--- docs/manual/installation/nixos.md | 6 +++--- docs/manual/installation/standalone.md | 4 ++-- docs/manual/nix-flakes/standalone.md | 6 +++--- docs/manual/usage/configuration.md | 4 ++-- docs/release-notes/rl-2405.md | 5 ++--- home-manager/home-manager | 4 ++-- modules/misc/uninstall.nix | 2 +- tests/integration/nixos/basics.nix | 2 +- tests/integration/standalone/alice-home-init.nix | 2 +- tests/integration/standalone/alice-home-next.nix | 2 +- 12 files changed, 23 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4444fbbd..075ccaae 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Releases Home Manager is developed against `nixpkgs-unstable` branch, which often causes it to contain tweaks for changes/packages not yet released in stable [NixOS][]. To avoid breaking users' configurations, Home Manager is released in branches -corresponding to NixOS releases (e.g. `release-23.11`). These branches get +corresponding to NixOS releases (e.g. `release-24.05`). These branches get fixes, but usually not new modules. If you need a module to be backported, then feel free to open an issue. @@ -49,7 +49,7 @@ dconf store and cannot tell whether a configuration that it is about to be overwritten was from a previous Home Manager generation or from manual configuration. -Home Manager targets [NixOS][] unstable and NixOS version 23.11 (the current +Home Manager targets [NixOS][] unstable and NixOS version 24.05 (the current stable version), it may or may not work on other Linux distributions and NixOS versions. diff --git a/docs/manual/installation/nix-darwin.md b/docs/manual/installation/nix-darwin.md index afa93e8f..f1025306 100644 --- a/docs/manual/installation/nix-darwin.md +++ b/docs/manual/installation/nix-darwin.md @@ -15,10 +15,10 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master $ nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.05 channel, you can run ``` shell -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager +$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ nix-channel --update ``` @@ -45,7 +45,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; }; ``` diff --git a/docs/manual/installation/nixos.md b/docs/manual/installation/nixos.md index 18a60e96..d432a54b 100644 --- a/docs/manual/installation/nixos.md +++ b/docs/manual/installation/nixos.md @@ -17,10 +17,10 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m $ sudo nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.05 channel, you can run ``` shell -$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager +$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ sudo nix-channel --update ``` @@ -44,7 +44,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; }; ``` diff --git a/docs/manual/installation/standalone.md b/docs/manual/installation/standalone.md index 7ca38ef6..4afb7f34 100644 --- a/docs/manual/installation/standalone.md +++ b/docs/manual/installation/standalone.md @@ -19,10 +19,10 @@ $ nix-channel --update ``` - and if you follow a Nixpkgs version 23.11 channel you can run + and if you follow a Nixpkgs version 24.05 channel you can run ``` shell - $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager + $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ nix-channel --update ``` diff --git a/docs/manual/nix-flakes/standalone.md b/docs/manual/nix-flakes/standalone.md index 4ee8278a..fc967f46 100644 --- a/docs/manual/nix-flakes/standalone.md +++ b/docs/manual/nix-flakes/standalone.md @@ -11,10 +11,10 @@ then to generate and activate a basic configuration run the command $ nix run home-manager/master -- init --switch ``` -For Nixpkgs or NixOS version 23.11 run +For Nixpkgs or NixOS version 24.05 run ``` shell -$ nix run home-manager/release-23.11 -- init --switch +$ nix run home-manager/release-24.05 -- init --switch ``` This will generate a `flake.nix` and a `home.nix` file in @@ -30,7 +30,7 @@ $ # Edit files in ~/.config/home-manager $ nix run home-manager/$branch -- init --switch ``` -Where `$branch` is one of `master` or `release-23.11`. +Where `$branch` is one of `master` or `release-24.05`. After the initial activation has completed successfully then building and activating your flake-based configuration is as simple as diff --git a/docs/manual/usage/configuration.md b/docs/manual/usage/configuration.md index d611ec18..deb046a6 100644 --- a/docs/manual/usage/configuration.md +++ b/docs/manual/usage/configuration.md @@ -20,7 +20,7 @@ A fresh install of Home Manager will generate a minimal # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -65,7 +65,7 @@ follows: # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/docs/release-notes/rl-2405.md b/docs/release-notes/rl-2405.md index b69b34fe..9bb629f7 100644 --- a/docs/release-notes/rl-2405.md +++ b/docs/release-notes/rl-2405.md @@ -1,7 +1,6 @@ # Release 24.05 {#sec-release-24.05} -This is the current unstable branch and the information in this section -is therefore not final. +The 24.05 release branch became stable in May, 2024. ## Highlights {#sec-release-24.05-highlights} @@ -89,4 +88,4 @@ The state version in this release includes the changes below. These changes are only active if the `home.stateVersion` option is set to \"24.05\" or later. -- Nothing, yet. +- There was no state version change in this release. diff --git a/home-manager/home-manager b/home-manager/home-manager index 630fe39a..192ad072 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -359,7 +359,7 @@ $xdgVars # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. + home.stateVersion = "24.05"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. @@ -857,7 +857,7 @@ function doUninstall() { uninstall = true; home.username = "$USER"; home.homeDirectory = "$HOME"; - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; } EOF # shellcheck disable=2064 diff --git a/modules/misc/uninstall.nix b/modules/misc/uninstall.nix index d12bde43..b34732b0 100644 --- a/modules/misc/uninstall.nix +++ b/modules/misc/uninstall.nix @@ -21,7 +21,7 @@ in { config = mkIf config.uninstall { home.packages = lib.mkForce [ ]; home.file = lib.mkForce { }; - home.stateVersion = lib.mkForce "23.11"; + home.stateVersion = lib.mkForce "24.05"; home.enableNixpkgsReleaseCheck = lib.mkForce false; manual.manpages.enable = lib.mkForce false; news.display = lib.mkForce "silent"; diff --git a/tests/integration/nixos/basics.nix b/tests/integration/nixos/basics.nix index 022f066e..001623ca 100644 --- a/tests/integration/nixos/basics.nix +++ b/tests/integration/nixos/basics.nix @@ -15,7 +15,7 @@ }; home-manager.users.alice = { ... }: { - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; home.file.test.text = "testfile"; # Enable a light-weight systemd service. services.pueue.enable = true; diff --git a/tests/integration/standalone/alice-home-init.nix b/tests/integration/standalone/alice-home-init.nix index 3aab1897..ab9786f8 100644 --- a/tests/integration/standalone/alice-home-init.nix +++ b/tests/integration/standalone/alice-home-init.nix @@ -13,7 +13,7 @@ # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. + home.stateVersion = "24.05"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. diff --git a/tests/integration/standalone/alice-home-next.nix b/tests/integration/standalone/alice-home-next.nix index 04c713d8..6f948b0b 100644 --- a/tests/integration/standalone/alice-home-next.nix +++ b/tests/integration/standalone/alice-home-next.nix @@ -3,7 +3,7 @@ { home.username = "alice"; home.homeDirectory = "/home/alice"; - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; home.packages = [ pkgs.hello ]; home.file.test.text = "test"; home.sessionVariables.EDITOR = "emacs"; From d179da4e81bcd4227e8abf4b62b92c4ae214ae39 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 24 May 2024 17:30:26 +0200 Subject: [PATCH 04/96] home-manager: prepare 24.11-pre --- docs/release-notes/release-notes.md | 1 + docs/release-notes/rl-2411.md | 18 ++++++++++++++++++ home-manager/home-manager | 2 +- release.json | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/rl-2411.md diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index 91fc2ed5..dabeba0c 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-2411.md rl-2405.md rl-2311.md rl-2305.md diff --git a/docs/release-notes/rl-2411.md b/docs/release-notes/rl-2411.md new file mode 100644 index 00000000..85eae034 --- /dev/null +++ b/docs/release-notes/rl-2411.md @@ -0,0 +1,18 @@ +# Release 24.11 {#sec-release-24.11} + +This is the current unstable branch and the information in this section +is therefore not final. + +## Highlights {#sec-release-24.11-highlights} + +This release has the following notable changes: + +- No changes. + +## State Version Changes {#sec-release-24.11-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 +\"24.11\" or later. + +- No changes. diff --git a/home-manager/home-manager b/home-manager/home-manager index 192ad072..1c3b87f0 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.05-pre + echo 24.11-pre exit 0 ;; *) diff --git a/release.json b/release.json index c5b5ecfd..e5d3102c 100644 --- a/release.json +++ b/release.json @@ -1,4 +1,4 @@ { - "release": "24.05", + "release": "24.11", "isReleaseBranch": false } From e4611630c3cc8ed618b48d92f6291f65be9f7913 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 26 May 2024 01:25:03 +0200 Subject: [PATCH 05/96] ci: fix manual build in sourcehut build --- .builds/manual.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.builds/manual.yml b/.builds/manual.yml index af257412..4072e5a4 100644 --- a/.builds/manual.yml +++ b/.builds/manual.yml @@ -9,6 +9,7 @@ environment: NIX_CONFIG: "experimental-features = nix-command flakes" packages: - nixos.cachix + - nixos.jq tasks: - setup: | cachix use rycee @@ -26,7 +27,7 @@ tasks: if [[ $gitBranch == master ]]; then dirName="unstable" else - dirName="$(cat .release)" + dirName="$(jq -r .release < release.json)" fi rsync --delete -r --info=stats \ From 6a35d1969e4626a0f8d285e60b6cfd331e2687a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 26 May 2024 10:13:35 +0200 Subject: [PATCH 06/96] ci: bump cachix/cachix-action from 13 to 15 Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 13 to 15. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v13...v15) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/github_pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 32e670e8..2dee0786 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -14,7 +14,7 @@ jobs: - uses: cachix/install-nix-action@v23 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v13 + - uses: cachix/cachix-action@v15 with: name: nix-community authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' From fb7feac55b2b95692b58e388a608fc326ec66608 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Sat, 25 May 2024 13:09:11 +0200 Subject: [PATCH 07/96] Translate using Weblate (Chinese (Simplified)) Currently translated at 100.0% (37 of 37 strings) Co-authored-by: Zexin Yuan Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/zh_Hans/ Translation: Home Manager/Home Manager CLI --- home-manager/po/zh_Hans.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home-manager/po/zh_Hans.po b/home-manager/po/zh_Hans.po index 3ab325c7..6e773fca 100644 --- a/home-manager/po/zh_Hans.po +++ b/home-manager/po/zh_Hans.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-03-03 06:24+0000\n" -"Last-Translator: immwind \n" +"PO-Revision-Date: 2024-05-13 10:00+0000\n" +"Last-Translator: Zexin Yuan \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_Hans\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.5-dev\n" +"X-Generator: Weblate 5.5.5-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s:缺少参数 %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" From 943f1e97fc171476f0235d7657448f9315465f18 Mon Sep 17 00:00:00 2001 From: halbGefressen Date: Sat, 25 May 2024 13:09:11 +0200 Subject: [PATCH 08/96] Translate using Weblate (German) Currently translated at 100.0% (37 of 37 strings) Co-authored-by: halbGefressen Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/de/ Translation: Home Manager/Home Manager CLI --- home-manager/po/de.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home-manager/po/de.po b/home-manager/po/de.po index a8109ee5..dddccb37 100644 --- a/home-manager/po/de.po +++ b/home-manager/po/de.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-03-04 18:50+0000\n" -"Last-Translator: Robert Helgesson \n" +"PO-Revision-Date: 2024-05-21 18:02+0000\n" +"Last-Translator: halbGefressen \n" "Language-Team: German \n" "Language: de\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.5-dev\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: Fehlendes Argument für %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" From cd29501b799c2621276376fb714cd2532fb2f0f7 Mon Sep 17 00:00:00 2001 From: Narazaki Shuji Date: Sat, 25 May 2024 13:09:11 +0200 Subject: [PATCH 09/96] Translate using Weblate (Japanese) Currently translated at 94.5% (35 of 37 strings) Co-authored-by: Narazaki Shuji Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/ Translation: Home Manager/Home Manager CLI --- home-manager/po/ja.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/home-manager/po/ja.po b/home-manager/po/ja.po index 17af07a8..9d3bee09 100644 --- a/home-manager/po/ja.po +++ b/home-manager/po/ja.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-04-29 18:07+0000\n" -"Last-Translator: Kento Okamoto \n" +"PO-Revision-Date: 2024-05-23 07:09+0000\n" +"Last-Translator: Narazaki Shuji \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.5.2\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 @@ -45,7 +45,7 @@ msgstr "設定ファイルがありません。ファイルを %s に作って #: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "%s にHome Managerが見つかりません。" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:115 @@ -168,7 +168,7 @@ msgstr "\"news.display\"に\"%s\"という設定は存在しません。" #: home-manager/home-manager:594 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" -msgstr "" +msgstr "環境変数 $EDITOR または $VISUAL を設定してください" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" From 517682ed21a19c193f09f043ecd8dc4002a962c3 Mon Sep 17 00:00:00 2001 From: TANIGUCHI Kohei Date: Sat, 25 May 2024 13:09:11 +0200 Subject: [PATCH 10/96] Translate using Weblate (Japanese) Currently translated at 100.0% (37 of 37 strings) Co-authored-by: TANIGUCHI Kohei Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/ Translation: Home Manager/Home Manager CLI --- home-manager/po/ja.po | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/home-manager/po/ja.po b/home-manager/po/ja.po index 9d3bee09..5a558d36 100644 --- a/home-manager/po/ja.po +++ b/home-manager/po/ja.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-05-23 07:09+0000\n" -"Last-Translator: Narazaki Shuji \n" +"PO-Revision-Date: 2024-05-25 11:09+0000\n" +"Last-Translator: TANIGUCHI Kohei \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -52,7 +52,8 @@ msgstr "%s にHome Managerが見つかりません。" msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." -msgstr "" +msgstr "フォールバックの Home Manager のパス %s " +"は非推奨ですが、そこにファイルまたはディレクトリがあります。" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:118 @@ -75,6 +76,24 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"この警告が表示されないようにするには、以下のどれかを行ってください。\n" +"\n" +"1. Home Manager にそのパスを使うよう伝えます。例えば\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" を設定に追加します。\n" +"\n" +" もし Home Manager を直接インポートしているのであれば、 Home Manager " +"パッケージを呼び出すときに `path` パラメーターを使って\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" のようにできます。\n" +"\n" +"2. 非推奨のパスにあるものを削除します。\n" +"\n" +" $ rm -r \"%s\"" #: home-manager/home-manager:146 msgid "Sanity checking Nix" From 05e6ba83eb3585ce0aff7b41e4bd0e317d05ad4a Mon Sep 17 00:00:00 2001 From: DeeKahy Date: Sat, 25 May 2024 13:09:12 +0200 Subject: [PATCH 11/96] Translate using Weblate (Danish) Currently translated at 100.0% (37 of 37 strings) Co-authored-by: DeeKahy Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/da/ Translation: Home Manager/Home Manager CLI --- home-manager/po/da.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/home-manager/po/da.po b/home-manager/po/da.po index c49a76fd..b05d5c23 100644 --- a/home-manager/po/da.po +++ b/home-manager/po/da.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-02-16 22:01+0000\n" -"Last-Translator: Robert Helgesson \n" +"PO-Revision-Date: 2024-05-25 11:09+0000\n" +"Last-Translator: DeeKahy \n" "Language-Team: Danish \n" "Language: da\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.4\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: manglende argument for %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" @@ -36,8 +36,8 @@ msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -"At have din Home Manager %s i %s er forældet,\n" -"flyt den venligst til %s" +"Det er forældet at holde Home Manager %s i %s,\n" +"ryk den venligst til %s" #: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" @@ -45,7 +45,7 @@ msgstr "Ingen konfigurationsfiler fundet. Venligst lav en ved %s" #: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "Home Manager kan ikke findes under %s." +msgstr "Home Manager blev ikke fundet ved %s." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:115 @@ -53,8 +53,8 @@ msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" -"Fallback-stien til Home Manager %s er blevet forældet, og en fil/mappe blev " -"fundet der." +"Det er forældet at bruge fallback Home Manager path %s og der blev fundet en " +"fil/mappe der." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:118 @@ -120,7 +120,7 @@ msgstr "Kør '%s --help' for brugsvejledning" #: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." -msgstr "Filen %s findes allerede, lader den være uændret..." +msgstr "Filen %s eksisterer allerede, efterlader den uændret…" #: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." @@ -189,7 +189,7 @@ msgstr "Ubekændt \"news.display\" indstilling \"%s\"." #: home-manager/home-manager:594 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" -msgstr "" +msgstr "Indstil venligst miljøvariablen $EDITOR eller $VISUAL" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" From b2a4ddf657e6ad87569665545ffaf7dd5e9a02af Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Sun, 26 May 2024 17:15:27 +0200 Subject: [PATCH 12/96] 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/f1010e0469db743d14519a1efd37e23f8513d714' (2024-05-09) → 'github:NixOS/nixpkgs/bfb7a882678e518398ce9a31a881538679f6f092' (2024-05-24) 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 3213b2ad..d89cf352 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1716509168, + "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "bfb7a882678e518398ce9a31a881538679f6f092", "type": "github" }, "original": { From 5d151429e1e79107acf6d06dcc5ace4e642ec239 Mon Sep 17 00:00:00 2001 From: nurelin Date: Sun, 26 May 2024 17:19:20 +0200 Subject: [PATCH 13/96] kanshi: fix configuration example --- modules/services/kanshi.nix | 84 +++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/modules/services/kanshi.nix b/modules/services/kanshi.nix index 1e695030..b503ffc7 100644 --- a/modules/services/kanshi.nix +++ b/modules/services/kanshi.nix @@ -209,24 +209,26 @@ in { Attribute set of profiles. ''; example = literalExpression '' - undocked = { - outputs = [ - { - criteria = "eDP-1"; - } - ]; - }; - docked = { - outputs = [ - { - criteria = "eDP-1"; - } - { - criteria = "Some Company ASDF 4242"; - transform = "90"; - } - ]; - }; + { + undocked = { + outputs = [ + { + criteria = "eDP-1"; + } + ]; + }; + docked = { + outputs = [ + { + criteria = "eDP-1"; + } + { + criteria = "Some Company ASDF 4242"; + transform = "90"; + } + ]; + }; + } ''; }; @@ -247,28 +249,30 @@ in { See kanshi(5) for informations. ''; example = literalExpression '' - { include = "path/to/included/files"; } - { output.criteria = "eDP-1"; - output.scale = 2; - } - { profile.name = "undocked"; - profile.outputs = [ - { - criteria = "eDP-1"; - } - ]; - } - { profile.name = "docked"; - profile.outputs = [ - { - criteria = "eDP-1"; - } - { - criteria = "Some Company ASDF 4242"; - transform = "90"; - } - ]; - } + [ + { include = "path/to/included/files"; } + { output.criteria = "eDP-1"; + output.scale = 2; + } + { profile.name = "undocked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + ]; + } + { profile.name = "docked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + { + criteria = "Some Company ASDF 4242"; + transform = "90"; + } + ]; + } + ] ''; }; From 8f8eb15c6d66afa7eef0dd6357bbb41c3aeb1099 Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Tue, 28 May 2024 00:49:28 +0300 Subject: [PATCH 14/96] fd: don't create shell aliases with empty args --- modules/programs/fd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/fd.nix b/modules/programs/fd.nix index bc5b709d..f8f59eb5 100644 --- a/modules/programs/fd.nix +++ b/modules/programs/fd.nix @@ -38,7 +38,7 @@ with lib; { args = escapeShellArgs (optional cfg.hidden "--hidden" ++ cfg.extraOptions); - optionsAlias = { fd = "fd ${args}"; }; + optionsAlias = optionalAttrs (args != "") { fd = "fd ${args}"; }; in mkIf cfg.enable { home.packages = [ cfg.package ]; From 65e0f5aa25619ee992e1eb3ad69f227a46b0a1b1 Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Tue, 28 May 2024 00:50:09 +0300 Subject: [PATCH 15/96] eza: don't create shell aliases with empty args --- modules/programs/eza.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/eza.nix b/modules/programs/eza.nix index 2a297b25..7e002a12 100644 --- a/modules/programs/eza.nix +++ b/modules/programs/eza.nix @@ -73,7 +73,7 @@ with lib; args = escapeShellArgs (optional cfg.icons "--icons" ++ optional cfg.git "--git" ++ cfg.extraOptions); - optionsAlias = { eza = "eza ${args}"; }; + optionsAlias = optionalAttrs (args != "") { eza = "eza ${args}"; }; aliases = builtins.mapAttrs (_name: value: lib.mkDefault value) { ls = "eza"; From e8482a798fd85d6316dcf42387ad30b3a079585e Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 27 May 2024 16:50:57 -0500 Subject: [PATCH 16/96] yazi: use builtin cd cd conflicts with aliases that dont support -- syntax --- modules/programs/yazi.nix | 4 ++-- tests/modules/programs/yazi/bash-integration-enabled.nix | 2 +- tests/modules/programs/yazi/fish-integration-enabled.nix | 2 +- tests/modules/programs/yazi/zsh-integration-enabled.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index c4534227..7ae8acd6 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -11,7 +11,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } @@ -22,7 +22,7 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix index ff9bc2f2..ac2e4979 100644 --- a/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -6,7 +6,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix index 02506b26..6d2b9fa3 100644 --- a/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -6,7 +6,7 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix index c8744146..d5090a6a 100644 --- a/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -6,7 +6,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } From 0cf552f39f1f8567a8e76e14c90e2843634182b5 Mon Sep 17 00:00:00 2001 From: RoadRoller01 <76426234+RoadRoller01@users.noreply.github.com> Date: Sun, 12 May 2024 23:33:36 +0300 Subject: [PATCH 17/96] bash: add missing 'ignoreboth' to historyControl Reference: https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-HISTCONTROL --- modules/programs/bash.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 5e7a44b5..5a328ecd 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -67,8 +67,8 @@ in { }; historyControl = mkOption { - type = - types.listOf (types.enum [ "erasedups" "ignoredups" "ignorespace" ]); + type = types.listOf + (types.enum [ "erasedups" "ignoredups" "ignorespace" "ignoreboth" ]); default = [ ]; description = "Controlling how commands are saved on the history list."; }; From 7ac529c22129ee9fb024744ede18f73e6b148ede Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Wed, 22 May 2024 21:39:43 -0300 Subject: [PATCH 18/96] hyprland: onChange: check XDG_RUNTIME_DIR as well The previous check false negatives in Hyprland >= 0.40.0 --- modules/services/window-managers/hyprland.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index ff162fb3..ef41d85e 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -237,7 +237,8 @@ in { onChange = lib.mkIf (cfg.package != null) '' ( # Execute in subshell so we don't poision environment with vars - if [[ -d "/tmp/hypr" ]]; then + XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} + if [[ -d "/tmp/hypr" || -d "$XDG_RUNTIME_DIR/hypr" ]]; then for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do ${cfg.finalPackage}/bin/hyprctl -i "$i" reload config-only done From 7e769959e8ec80333bb262d685333003bf013c1b Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Fri, 24 May 2024 17:26:52 -0300 Subject: [PATCH 19/96] hyprland: onChange: remove subshell comment --- modules/services/window-managers/hyprland.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index ef41d85e..6b79248b 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -236,7 +236,7 @@ in { }) + lib.optionalString (cfg.extraConfig != "") cfg.extraConfig; onChange = lib.mkIf (cfg.package != null) '' - ( # Execute in subshell so we don't poision environment with vars + ( XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} if [[ -d "/tmp/hypr" || -d "$XDG_RUNTIME_DIR/hypr" ]]; then for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do From 939375b39661c7b5d2533c9cd7be6117ed98896a Mon Sep 17 00:00:00 2001 From: Jany <127505435+janydoe@users.noreply.github.com> Date: Mon, 27 May 2024 21:59:26 +0000 Subject: [PATCH 20/96] khal: add package option --- modules/programs/khal.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/programs/khal.nix b/modules/programs/khal.nix index 50ccb681..a2e28e01 100644 --- a/modules/programs/khal.nix +++ b/modules/programs/khal.nix @@ -168,6 +168,8 @@ in { options.programs.khal = { enable = mkEnableOption "khal, a CLI calendar application"; + package = mkPackageOption pkgs "khal" { }; + locale = mkOption { type = lib.types.submodule { options = localeOptions; }; description = '' @@ -197,7 +199,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.khal ]; + home.packages = [ cfg.package ]; xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ] ++ mapAttrsToList genCalendarStr khalAccounts ++ [ From 90010df15878762ff359e4fe391355a9dcad0bcf Mon Sep 17 00:00:00 2001 From: Phani Rithvij Date: Wed, 22 May 2024 23:31:16 +0530 Subject: [PATCH 21/96] topgrade: update example config --- modules/programs/topgrade.nix | 16 +++++++++------- .../programs/topgrade/settings-expected.toml | 7 ++++--- tests/modules/programs/topgrade/settings.nix | 14 +++++++++----- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/modules/programs/topgrade.nix b/modules/programs/topgrade.nix index a49f897b..0630ccab 100644 --- a/modules/programs/topgrade.nix +++ b/modules/programs/topgrade.nix @@ -28,13 +28,15 @@ in { defaultText = literalExpression "{ }"; example = literalExpression '' { - assume_yes = true; - disable = [ - "flutter" - "node" - ]; - set_title = false; - cleanup = true; + misc = { + assume_yes = true; + disable = [ + "flutter" + "node" + ]; + set_title = false; + cleanup = true; + }; commands = { "Run garbage collection on Nix store" = "nix-collect-garbage"; }; diff --git a/tests/modules/programs/topgrade/settings-expected.toml b/tests/modules/programs/topgrade/settings-expected.toml index aeed3d14..5e2a47ae 100644 --- a/tests/modules/programs/topgrade/settings-expected.toml +++ b/tests/modules/programs/topgrade/settings-expected.toml @@ -1,8 +1,9 @@ +[commands] +"Purge unused APT packages" = "sudo apt autoremove" + +[misc] cleanup = true disable = ["sdkman", "flutter", "node", "nix", "home_manager"] remote_topgrade_path = "bin/topgrade" remote_topgrades = ["backup", "ci"] set_title = false - -[commands] -"Purge unused APT packages" = "sudo apt autoremove" diff --git a/tests/modules/programs/topgrade/settings.nix b/tests/modules/programs/topgrade/settings.nix index e80e98b8..1e893eb4 100644 --- a/tests/modules/programs/topgrade/settings.nix +++ b/tests/modules/programs/topgrade/settings.nix @@ -6,17 +6,21 @@ settings = lib.mkMerge [ { - disable = [ "sdkman" "flutter" "node" "nix" "home_manager" ]; + misc = { + disable = [ "sdkman" "flutter" "node" "nix" "home_manager" ]; - remote_topgrades = [ "backup" "ci" ]; + remote_topgrades = [ "backup" "ci" ]; - remote_topgrade_path = "bin/topgrade"; + remote_topgrade_path = "bin/topgrade"; + }; } { - set_title = false; - cleanup = true; + misc = { + set_title = false; + cleanup = true; + }; commands = { "Purge unused APT packages" = "sudo apt autoremove"; }; } ]; From 10c7c219b7dae5795fb67f465a0d86cbe29f25fa Mon Sep 17 00:00:00 2001 From: Dee Anzorge Date: Tue, 28 May 2024 00:07:22 +0200 Subject: [PATCH 22/96] listenbrainz-mpd: fix config example --- modules/services/listenbrainz-mpd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/listenbrainz-mpd.nix b/modules/services/listenbrainz-mpd.nix index 5b949ebe..3cc24221 100644 --- a/modules/services/listenbrainz-mpd.nix +++ b/modules/services/listenbrainz-mpd.nix @@ -24,7 +24,7 @@ in { Configuration for listenbrainz-mpd written to {file}`$XDG_CONFIG_HOME/listenbrainz-mpd/config.toml`. ''; - example = { submission.tokenFile = "/run/secrets/listenbrainz-mpd"; }; + example = { submission.token_file = "/run/secrets/listenbrainz-mpd"; }; }; }; From 373ead20606efa9181cd15ba19a5deac7ead1492 Mon Sep 17 00:00:00 2001 From: midchildan Date: Wed, 29 May 2024 00:02:06 +0900 Subject: [PATCH 23/96] tests: fix broken overlay in mpv test --- tests/modules/programs/mpv/mpv-stubs.nix | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/modules/programs/mpv/mpv-stubs.nix b/tests/modules/programs/mpv/mpv-stubs.nix index 2fee1914..caef8e69 100644 --- a/tests/modules/programs/mpv/mpv-stubs.nix +++ b/tests/modules/programs/mpv/mpv-stubs.nix @@ -1,14 +1,20 @@ -{ pkgs, ... }: - { nixpkgs.overlays = [ - (self: super: { - mpvScript = pkgs.runCommandLocal "mpvScript" { scriptName = "something"; } + (final: prev: { + mpvScript = prev.runCommandLocal "mpvScript" { scriptName = "something"; } "mkdir $out"; - mpv-unwrapped = super.mpv-unwrapped.overrideAttrs { - builder = pkgs.writeShellScript "dummy" '' - PATH=${pkgs.coreutils}/bin + mpv-unwrapped = let + lua = prev.emptyDirectory.overrideAttrs { + luaversion = "0"; + passthru.withPackages = pkgsFn: prev.emptyDirectory; + }; + mpv-unwrapped' = prev.mpv-unwrapped.override { inherit lua; }; + in mpv-unwrapped'.overrideAttrs { + buildInputs = [ ]; + nativeBuildInputs = [ ]; + builder = prev.writeShellScript "dummy" '' + PATH=${final.coreutils}/bin mkdir -p $dev $doc $man $out/bin $out/Applications/mpv.app/Contents/MacOS touch $out/bin/{mpv,umpv} \ $out/Applications/mpv.app/Contents/MacOS/{mpv,mpv-bundle} @@ -16,11 +22,6 @@ $out/Applications/mpv.app/Contents/MacOS/{mpv,mpv-bundle} ''; }; - - lua = pkgs.emptyDirectory.overrideAttrs { - luaversion = "0"; - withPackages = ps: pkgs.emptyDirectory; - }; }) ]; From a9b36cbe9292a649222b89fdb9ae9907e9c74086 Mon Sep 17 00:00:00 2001 From: Sharzy Date: Wed, 29 May 2024 05:15:11 +0800 Subject: [PATCH 24/96] gpg-agent: fix usage of splitString `splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to https://github.com/NixOS/nix/issues/7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing. --- modules/services/gpg-agent.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix index 509adfa5..cce5ac19 100644 --- a/modules/services/gpg-agent.nix +++ b/modules/services/gpg-agent.nix @@ -48,9 +48,8 @@ let hexStringToBase32 = let mod = a: b: a - a / b * b; pow2 = elemAt [ 1 2 4 8 16 32 64 128 256 ]; - splitChars = s: init (tail (splitString "" s)); - base32Alphabet = splitChars "ybndrfg8ejkmcpqxot1uwisza345h769"; + base32Alphabet = stringToCharacters "ybndrfg8ejkmcpqxot1uwisza345h769"; hexToIntTable = listToAttrs (genList (x: { name = toLower (toHexString x); value = x; @@ -76,7 +75,7 @@ let buf = buf'; bufBits = bufBits'; }; - in hexString: (foldl' go initState (splitChars hexString)).ret; + in hexString: (foldl' go initState (stringToCharacters hexString)).ret; in { meta.maintainers = [ maintainers.rycee ]; From 04bc391a90f8ae2a953035f33ddebaeccbc0a36b Mon Sep 17 00:00:00 2001 From: XYenon Date: Wed, 29 May 2024 11:01:52 +0800 Subject: [PATCH 25/96] yazi: support plugins and flavors --- modules/programs/yazi.nix | 58 ++++++++++++++++++--- tests/modules/programs/yazi/flavor/init.lua | 1 + tests/modules/programs/yazi/init.lua | 3 ++ tests/modules/programs/yazi/plugin/init.lua | 1 + tests/modules/programs/yazi/settings.nix | 9 ++++ 5 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 tests/modules/programs/yazi/flavor/init.lua create mode 100644 tests/modules/programs/yazi/init.lua create mode 100644 tests/modules/programs/yazi/plugin/init.lua diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 7ae8acd6..11f4e75c 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -40,17 +40,12 @@ let } ''; in { - meta.maintainers = [ maintainers.xyenon ]; + meta.maintainers = with maintainers; [ xyenon ]; options.programs.yazi = { enable = mkEnableOption "yazi"; - package = mkOption { - type = types.package; - default = pkgs.yazi; - defaultText = literalExpression "pkgs.yazi"; - description = "Yazi package to install."; - }; + package = mkPackageOption pkgs "yazi" { }; enableBashIntegration = mkEnableOption "Bash integration"; @@ -135,6 +130,48 @@ in { for the full list of options ''; }; + + initLua = mkOption { + type = with types; nullOr path; + default = null; + description = '' + The init.lua for Yazi itself. + ''; + example = literalExpression "./init.lua"; + }; + + plugins = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Lua plugins. + + See https://yazi-rs.github.io/docs/plugins/overview/ for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; + + flavors = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Pre-made themes. + + See https://yazi-rs.github.io/docs/flavors/overview/ for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; + }; config = mkIf cfg.enable { @@ -160,6 +197,11 @@ in { "yazi/theme.toml" = mkIf (cfg.theme != { }) { source = tomlFormat.generate "yazi-theme" cfg.theme; }; - }; + "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; + } // (mapAttrs' + (name: value: nameValuePair "yazi/plugins/${name}" { source = value; }) + cfg.plugins) // (mapAttrs' + (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) + cfg.flavors); }; } diff --git a/tests/modules/programs/yazi/flavor/init.lua b/tests/modules/programs/yazi/flavor/init.lua new file mode 100644 index 00000000..8d06fa7a --- /dev/null +++ b/tests/modules/programs/yazi/flavor/init.lua @@ -0,0 +1 @@ +-- This is a flavor. diff --git a/tests/modules/programs/yazi/init.lua b/tests/modules/programs/yazi/init.lua new file mode 100644 index 00000000..a22493df --- /dev/null +++ b/tests/modules/programs/yazi/init.lua @@ -0,0 +1,3 @@ +require("zoxide"):setup { + update_db = true, +} diff --git a/tests/modules/programs/yazi/plugin/init.lua b/tests/modules/programs/yazi/plugin/init.lua new file mode 100644 index 00000000..a9286c3d --- /dev/null +++ b/tests/modules/programs/yazi/plugin/init.lua @@ -0,0 +1 @@ +-- This is a plugin. diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 5a540caf..4655ae8b 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -69,6 +69,9 @@ ]; }; }; + initLua = ./init.lua; + plugins = { "test.yazi" = ./plugin; }; + flavors = { "test.yazi" = ./flavor; }; }; test.stubs.yazi = { }; @@ -80,5 +83,11 @@ ${./settings-expected.toml} assertFileContent home-files/.config/yazi/theme.toml \ ${./theme-expected.toml} + assertFileContent home-files/.config/yazi/init.lua \ + ${./init.lua} + assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ + ${./plugin/init.lua} + assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ + ${./flavor/init.lua} ''; } From 1b589257f72c9c54e92d1d631e988e5346156736 Mon Sep 17 00:00:00 2001 From: Gaurav Juvekar Date: Wed, 29 May 2024 15:02:35 -0700 Subject: [PATCH 26/96] home-manager: check FQDN for '--flake .' attribute Since nixpkgs commit 993baa587c4b82e791686f6ce711bcd4ee8ef933, `networking.hostName` is not allowed to be a FQDN. Add `hostname --fqdn` to the default flake attribute names that are searched. If netorking.hostname = "hostname"; networking.domain = "example.com"; is set in the system NixOS configuration, this allows defining homeConfigurations."username@hostname.example.com" = ... and still use home-manager switch --flake . instead of having to type out home-manager switch --flake .#$(whoami)@$(hostname --fqdn) --- home-manager/home-manager | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-manager/home-manager b/home-manager/home-manager index 1c3b87f0..612df6f4 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -198,9 +198,9 @@ function setFlakeAttribute() { ;; *) local name="$USER" - # Check both long and short hostnames; long first to preserve + # Check FQDN, long, and short hostnames; long first to preserve # pre-existing behaviour in case both happen to be defined. - for n in "$USER@$(hostname)" "$USER@$(hostname -s)"; do + for n in "$USER@$(hostname --fqdn)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then name="$n" if [[ -v VERBOSE ]]; then From 60b85414b49d5d69816c2453865adb6cc39df33a Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Thu, 30 May 2024 08:17:09 +0200 Subject: [PATCH 27/96] Translate using Weblate (Korean) Currently translated at 100.0% (37 of 37 strings) Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ko/ Translation: Home Manager/Home Manager CLI Co-authored-by: lentil32 --- home-manager/po/ko.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home-manager/po/ko.po b/home-manager/po/ko.po index 2b8fbd2a..96eae071 100644 --- a/home-manager/po/ko.po +++ b/home-manager/po/ko.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-03-19 04:01+0000\n" -"Last-Translator: honnip \n" +"PO-Revision-Date: 2024-05-30 06:09+0000\n" +"Last-Translator: lentil32 \n" "Language-Team: Korean \n" "Language: ko\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.5-dev\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: %s에 대한 인자 누락" #: home-manager/home-manager:64 msgid "No configuration file found at %s" From 29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae Mon Sep 17 00:00:00 2001 From: Liassica <115422798+Liassica@users.noreply.github.com> Date: Thu, 30 May 2024 02:05:10 -0500 Subject: [PATCH 28/96] kdeconnect: fix service with 24.05 package version The 24.05 update for KDE Connect moved the kdeconnectd binary from `/libexec` to `/bin`, so this fix will check the version of the package used and set the path accordingly. --- modules/services/kdeconnect.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/services/kdeconnect.nix b/modules/services/kdeconnect.nix index 91b6657f..656a8c9a 100644 --- a/modules/services/kdeconnect.nix +++ b/modules/services/kdeconnect.nix @@ -48,7 +48,12 @@ in { Service = { Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${cfg.package}/libexec/kdeconnectd"; + ExecStart = + if strings.versionAtLeast (versions.majorMinor cfg.package.version) + "24.05" then + "${cfg.package}/bin/kdeconnectd" + else + "${cfg.package}/libexec/kdeconnectd"; Restart = "on-abort"; }; }; From 0eb314b4f0ba337e88123e0b1e57ef58346aafd9 Mon Sep 17 00:00:00 2001 From: Gaurav Juvekar Date: Thu, 30 May 2024 12:35:07 -0700 Subject: [PATCH 29/96] home-manager: use short -f instead of --fqdn MacOS doesn't support the long-style `--fqdn` option to `hostname` that was added by 1b589257f72c9c54e92d1d631e988e5346156736. Switch to short style `-f` that should be supported on every platform. --- home-manager/home-manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/home-manager b/home-manager/home-manager index 612df6f4..5bf796b4 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -200,7 +200,7 @@ function setFlakeAttribute() { local name="$USER" # Check FQDN, long, and short hostnames; long first to preserve # pre-existing behaviour in case both happen to be defined. - for n in "$USER@$(hostname --fqdn)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do + for n in "$USER@$(hostname -f)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then name="$n" if [[ -v VERBOSE ]]; then From c497bdc12f591e57f85a6941976daec78db3f529 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 03:59:27 +0000 Subject: [PATCH 30/96] 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/bfb7a882678e518398ce9a31a881538679f6f092' (2024-05-24) → 'github:NixOS/nixpkgs/ad57eef4ef0659193044870c731987a6df5cf56b' (2024-05-29) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d89cf352..86507204 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1716509168, - "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfb7a882678e518398ce9a31a881538679f6f092", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "type": "github" }, "original": { From bf3815854e6c24d28ad4e7df96f2d3c3beda20f1 Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Sun, 2 Jun 2024 10:14:04 +0200 Subject: [PATCH 31/96] Translate using Weblate (Finnish) Currently translated at 55.5% (10 of 18 strings) Translate using Weblate (Finnish) Currently translated at 72.9% (27 of 37 strings) Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/fi/ Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/fi/ Translation: Home Manager/Home Manager CLI Translation: Home Manager/Home Manager Modules Co-authored-by: jarre johansson --- home-manager/po/fi.po | 63 ++++++++++++++++++++++++------------------- modules/po/fi.po | 40 ++++++++++++++++++--------- 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/home-manager/po/fi.po b/home-manager/po/fi.po index 4e3c1935..2ac20911 100644 --- a/home-manager/po/fi.po +++ b/home-manager/po/fi.po @@ -8,23 +8,25 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"PO-Revision-Date: 2024-05-31 17:09+0000\n" +"Last-Translator: jarre johansson \n" +"Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: puuttuva argumentti kohteelle %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" -msgstr "" +msgstr "Konfiguraatiotiedostoa ei löytynyt sijainnista %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. @@ -37,11 +39,11 @@ msgstr "" #: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" -msgstr "" +msgstr "Konfiguraatiotiedostoa ei löytynyt. Luo sellainen sijaintiin %s" #: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manageria ei löytynyt sijainnista %s." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:115 @@ -74,37 +76,37 @@ msgstr "" #: home-manager/home-manager:146 msgid "Sanity checking Nix" -msgstr "" +msgstr "Nixin eheys tarkistetaan" #: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Sopivaa profiilihakemistoa ei löytynyt, yritettiin %s ja %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. #: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" -msgstr "" +msgstr "Flake-konfiguraation asetuksia ei voi tarkastella" #: home-manager/home-manager:296 home-manager/home-manager:319 #: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" -msgstr "" +msgstr "%s: tuntematon vaihtoehto '%s" #: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" -msgstr "" +msgstr "Aja '%s --help' saadaksesi käyttöohjeita" #: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Tiedosto %s on jo olemassa, jätetään se muuttumattomaksi..." #: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." -msgstr "" +msgstr "Luodaan tiedostoa %s..." #: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "Luodaan alkuperäistä Home Manager -generaatiota..." #. translators: The "%s" specifier will be replaced by a file path. #: home-manager/home-manager:480 @@ -130,7 +132,7 @@ msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. #: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "Flake-konfiguraatiota ei voi luoda" #: home-manager/home-manager:572 msgid "" @@ -140,16 +142,20 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" +"Sinulla on %d lukematon ja oleellinen uutisartikkeli.\n" +"Lue se ajamalla komento \"%s news\"." msgstr[1] "" +"Sinulla on %d lukematonta ja oleellista uutisartikkelia.\n" +"Lue ne ajamalla komento \"%s news\"." #: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" +msgstr "Tuntematon asetus \"news.display\" \"%s\"." #: home-manager/home-manager:594 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" -msgstr "" +msgstr "Aseta $EDITOR- tai $VISUAL-ympäristömuuttujaksi" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" @@ -161,11 +167,11 @@ msgstr "" #: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" -msgstr "" +msgstr "Nykyistä generaatiota %s ei voi poistaa" #: home-manager/home-manager:697 msgid "Removing generation %s" -msgstr "" +msgstr "Generaatio %s poistetaan" #: home-manager/home-manager:718 msgid "No generations to expire" @@ -173,35 +179,36 @@ msgstr "" #: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." -msgstr "" +msgstr "Näyttää siltä, ettei yhtään home-manager-pakettia ole asennettu." #: home-manager/home-manager:811 msgid "Unknown argument %s" -msgstr "" +msgstr "Tuntematon argumentti %s" #: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." -msgstr "" +msgstr "Tämä poistaa Home Managerin järjestelmästäsi." #: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" +msgstr "Tämä on kuivaharjoitus, mitään ei oikeasti poisteta." #: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" -msgstr "" +msgstr "Haluatko varmasti poistaa Home Managerin?" #: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." -msgstr "" +msgstr "Vaihdetaan tyhjään Home Manager -konfiguraatioon..." #: home-manager/home-manager:863 msgid "Yay!" -msgstr "" +msgstr "Jes!" #: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" +"Home Manager on poistettu, mutta home.nix-tiedostosi jää koskemattomaksi." #: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." @@ -209,7 +216,7 @@ msgstr "" #: home-manager/home-manager:1113 msgid "Unknown command: %s" -msgstr "" +msgstr "Tuntematon komento: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." diff --git a/modules/po/fi.po b/modules/po/fi.po index 8733eb95..c16c3080 100644 --- a/modules/po/fi.po +++ b/modules/po/fi.po @@ -8,21 +8,24 @@ msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"PO-Revision-Date: 2024-05-31 17:09+0000\n" +"Last-Translator: jarre johansson \n" +"Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6-dev\n" #: modules/files.nix:191 msgid "Creating home file links in %s" -msgstr "" +msgstr "Luodaan kotitiedostolinkkejä sijaintiin %s" #: modules/files.nix:204 msgid "Cleaning up orphan links from %s" -msgstr "" +msgstr "Siivotaan orpoja linkkejä sijainnista %s" #: modules/files.nix:220 msgid "Creating profile generation %s" @@ -50,15 +53,15 @@ msgstr "" #: modules/home-environment.nix:667 msgid "Activating %s" -msgstr "" +msgstr "Aktivoidaan %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Siirretään profiilia sijainnista %s kohteeseen %s" #: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Sopivaa profiilihakemistoa ei löytynyt, yritettiin %s ja %s" #: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" @@ -79,6 +82,19 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" +"Edellinen generaation numero ja polku ovat ristiriidassa! Niiden on oltava " +"joko molemmat tyhjiä tai molemmat määritettyjä, mutta ne ovat nyt asetettu " +"seuraavasti:\n" +"\n" +"'%s' ja '%s'\n" +"\n" +"Jos et välitä menettää aiempia profiilin generointeja, niin helpoin ratkaisu " +"on todennäköisesti suorittaa\n" +"\n" +"rm %s/home-manager*\n" +"rm %s/current-home\n" +"\n" +"ja yrittää sitten uudelleen home-manager switch -komentoa. Onnea matkaan!" #: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" @@ -90,15 +106,15 @@ msgstr "" #: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" -msgstr "" +msgstr "Home Managerin aktivointi käynnistyy" #: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" -msgstr "" +msgstr "Nixin eheys tarkistetaan" #: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" -msgstr "" +msgstr "Tämä on testiajo" #: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" @@ -110,4 +126,4 @@ msgstr "" #: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" -msgstr "" +msgstr "Aktivointimuuttujat:" From 62da78e1f8897706b9e5e890ffb86389b1d87333 Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Sun, 2 Jun 2024 10:15:15 +0200 Subject: [PATCH 32/96] Translate using Weblate (Vietnamese) Currently translated at 22.2% (4 of 18 strings) Translate using Weblate (Vietnamese) Currently translated at 75.6% (28 of 37 strings) Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/vi/ Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/vi/ Translation: Home Manager/Home Manager CLI Translation: Home Manager/Home Manager Modules Co-authored-by: goatastronaut0212 --- home-manager/po/vi.po | 46 ++++++++++++++++++++++++++++--------------- modules/po/vi.po | 12 +++++------ 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/home-manager/po/vi.po b/home-manager/po/vi.po index 336b5562..85baac38 100644 --- a/home-manager/po/vi.po +++ b/home-manager/po/vi.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-03-27 15:05+0000\n" -"Last-Translator: Nguyen Khanh \n" +"PO-Revision-Date: 2024-06-02 08:12+0000\n" +"Last-Translator: goatastronaut0212 \n" "Language-Team: Vietnamese \n" "Language: vi\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.5-dev\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: bị thiếu đối số cho %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" @@ -36,6 +36,8 @@ msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Giữ Home Manager của bạn %s ở %s đã không còn phù hợp,\n" +"hãy chuyển nó tới %s" #: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" @@ -95,7 +97,7 @@ msgstr "" #: home-manager/home-manager:146 msgid "Sanity checking Nix" -msgstr "" +msgstr "Kiểm tra độ hợp lệ của Nix" #: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" @@ -104,7 +106,7 @@ msgstr "Không thể tìm thấy thư mục hồ sơ phù hợp, đã thử %s v #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. #: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" -msgstr "" +msgstr "Không thể kiểm tra tùy chọn của cấu hình flake" #: home-manager/home-manager:296 home-manager/home-manager:319 #: home-manager/home-manager:1051 @@ -137,6 +139,13 @@ msgid "" "to configure Home Manager. Run 'man home-configuration.nix' to\n" "see all available options." msgstr "" +"Đã hoàn thành! Công cụ home-manager giờ đạ được cài đặt và bạn có thể chỉnh " +"sửa\n" +"\n" +" %s\n" +"\n" +"để cấu hình Home Manager. Chạy lệnh 'man home-configuration.nix' để\n" +"xem toàn bộ tùy chọn có sẵn." #. translators: The "%s" specifier will be replaced by a URL. #: home-manager/home-manager:485 @@ -147,6 +156,11 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"Quá trình cài đặt đã thất bại! Vui lòng tạo 1 báo cáo lỗi tại\n" +"\n" +" %s\n" +"\n" +"nếu như lỗi đó thuộc về Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. #: home-manager/home-manager:496 @@ -170,11 +184,11 @@ msgstr "" #: home-manager/home-manager:594 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" -msgstr "" +msgstr "Vui lòng đặt biến môi trường $EDITOR hoặc $VISUAL" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" -msgstr "" +msgstr "Không thể chạy lệnh xây dựng trong thư mục chỉ cho phép đọc" #: home-manager/home-manager:693 msgid "No generation with ID %s" @@ -194,31 +208,31 @@ msgstr "" #: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." -msgstr "" +msgstr "Không có bất kỳ gói home-manager nào được cài đặt." #: home-manager/home-manager:811 msgid "Unknown argument %s" -msgstr "" +msgstr "Không tồn tại đối số %s" #: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." -msgstr "" +msgstr "Việc này sẽ xóa Home Manager khỏi hệ thống của bạn." #: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" +msgstr "Đây là chạy thử nghiệm, sẽ không có bất cư thứ gì được gỡ cài đặt." #: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" -msgstr "" +msgstr "Bạn có muốn gỡ Home Manager không?" #: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." -msgstr "" +msgstr "Chuyển đổi sang cấu hình Home Manager trống..." #: home-manager/home-manager:863 msgid "Yay!" -msgstr "" +msgstr "Tuyệt vời!" #: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." @@ -230,7 +244,7 @@ msgstr "" #: home-manager/home-manager:1113 msgid "Unknown command: %s" -msgstr "" +msgstr "Không tồn tại câu lệnh: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." diff --git a/modules/po/vi.po b/modules/po/vi.po index a285c2bf..09b510df 100644 --- a/modules/po/vi.po +++ b/modules/po/vi.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-03-27 15:05+0000\n" -"Last-Translator: Nguyen Khanh \n" +"PO-Revision-Date: 2024-06-02 08:12+0000\n" +"Last-Translator: goatastronaut0212 \n" "Language-Team: Vietnamese \n" "Language: vi\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.5-dev\n" +"X-Generator: Weblate 5.6-dev\n" #: modules/files.nix:191 msgid "Creating home file links in %s" @@ -97,7 +97,7 @@ msgstr "" #: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" -msgstr "" +msgstr "Kiểm tra độ hợp lệ của Nix" #: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" @@ -109,8 +109,8 @@ msgstr "" #: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" -msgstr "" +msgstr "Phiên bản Nix đươc sử dụng: %s" #: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" -msgstr "" +msgstr "Các biến được kích hoạt:" From 9b53a10f4c91892f5af87cf55d08fba59ca086af Mon Sep 17 00:00:00 2001 From: Matthieu Coudron <886074+teto@users.noreply.github.com> Date: Sun, 2 Jun 2024 10:16:22 +0200 Subject: [PATCH 33/96] swayidle: wait for WAYLAND_DISPLAY To avoid this kind of message: swayidle[181123]: - [Line 1054] Unable to connect to the compositor. If your compositor is running, check or set the WAYLAND_DISPLAY environment variable. --- modules/services/swayidle.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/services/swayidle.nix b/modules/services/swayidle.nix index b28de6f0..80317e42 100644 --- a/modules/services/swayidle.nix +++ b/modules/services/swayidle.nix @@ -118,6 +118,7 @@ in { Unit = { Description = "Idle manager for Wayland"; Documentation = "man:swayidle(1)"; + ConditionEnvironment = "WAYLAND_DISPLAY"; PartOf = [ "graphical-session.target" ]; }; From 83bfe1bac8e0d930f36cee6874bd17e77c8754d1 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 4 Jun 2024 06:20:47 +0200 Subject: [PATCH 34/96] nix-gc: add `persistent` option (#5490) Mirrors the `nix.gc.persistent` option in nixpkgs: https://search.nixos.org/options?channel=unstable&show=nix.gc.persistent&from=0&size=50&sort=relevance&type=packages&query=nix.gc.persistent --- modules/services/nix-gc.nix | 13 +++++++++++++ tests/modules/services/nix-gc/expected.timer | 1 + 2 files changed, 14 insertions(+) diff --git a/modules/services/nix-gc.nix b/modules/services/nix-gc.nix index 8ac26dfe..652c575a 100644 --- a/modules/services/nix-gc.nix +++ b/modules/services/nix-gc.nix @@ -90,6 +90,18 @@ in { garbage collector is run automatically. ''; }; + + persistent = mkOption { + type = types.bool; + default = true; + example = false; + description = '' + If true, the time when the service unit was last triggered is + stored on disk. When the timer is activated, the service unit is + triggered immediately if it would have been triggered at least once + during the time when the timer was inactive. + ''; + }; }; }; @@ -107,6 +119,7 @@ in { Unit = { Description = "Nix Garbage Collector"; }; Timer = { OnCalendar = "${cfg.frequency}"; + Persistent = cfg.persistent; Unit = "nix-gc.service"; }; Install = { WantedBy = [ "timers.target" ]; }; diff --git a/tests/modules/services/nix-gc/expected.timer b/tests/modules/services/nix-gc/expected.timer index 2b0c6603..ef30df43 100644 --- a/tests/modules/services/nix-gc/expected.timer +++ b/tests/modules/services/nix-gc/expected.timer @@ -3,6 +3,7 @@ WantedBy=timers.target [Timer] OnCalendar=monthly +Persistent=true Unit=nix-gc.service [Unit] From 07b2c41d2df2878a5c71229a66fb1f8ccef71c47 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Mon, 3 Jun 2024 22:41:47 -0600 Subject: [PATCH 35/96] ci: bump all actions versions (#5496) * cachix/install-nix-action: v23 -> v27 Release: https://github.com/cachix/install-nix-action/releases/tag/v27 * actions/labeler: v4 -> v5 Release: https://github.com/actions/labeler/releases/tag/v5.0.0 * DeterminateSystems/update-flake-lock: v21 -> v22 Release: https://github.com/DeterminateSystems/update-flake-lock/releases/tag/v22 Signed-off-by: Sumner Evans --- .github/workflows/github_pages.yml | 2 +- .github/workflows/labeler.yml | 3 +-- .github/workflows/test.yml | 2 +- .github/workflows/update-flake.yml | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 2dee0786..9f49d49a 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v27 with: nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v15 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index daea610a..81585d85 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -17,8 +17,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'nix-community' steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} sync-labels: true - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40d4e2b3..05d04163 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v27 with: nix_path: nixpkgs=channel:nixos-unstable - run: | diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 64852866..9df8060d 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -12,9 +12,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v27 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v21 + uses: DeterminateSystems/update-flake-lock@v22 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies From 1a577c135cad84eb0cd5a922efe2de9cc467772a Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Tue, 4 Jun 2024 00:32:53 -0600 Subject: [PATCH 36/96] ci/labeler: upgrade to v5 format Signed-off-by: Sumner Evans --- .github/labeler.yml | 64 ++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index b03251e8..7828609b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,36 +1,46 @@ "mail": - - modules/programs/aerc*.nix - - modules/programs/alot*.nix - - tests/modules/programs/aerc/* - - tests/modules/programs/alot/* - - modules/programs/mujmap.nix - - tests/modules/programs/mujmap/* - - modules/programs/notmuch.nix - - modules/programs/neomutt* - - tests/modules/programs/neomutt/* - - modules/programs/getmail* - - modules/*/mbsync* - - tests/modules/programs/mbsync/* - - modules/programs/himalaya.nix - - tests/modules/programs/himalaya/* - - modules/programs/thunderbird.nix - - tests/modules/programs/thunderbird/* - - modules/services/imapnotify.nix +- changed-files + - any-glob-to-any-file + - modules/programs/aerc*.nix + - modules/programs/alot*.nix + - tests/modules/programs/aerc/* + - tests/modules/programs/alot/* + - modules/programs/mujmap.nix + - tests/modules/programs/mujmap/* + - modules/programs/notmuch.nix + - modules/programs/neomutt* + - tests/modules/programs/neomutt/* + - modules/programs/getmail* + - modules/*/mbsync* + - tests/modules/programs/mbsync/* + - modules/programs/himalaya.nix + - tests/modules/programs/himalaya/* + - modules/programs/thunderbird.nix + - tests/modules/programs/thunderbird/* + - modules/services/imapnotify.nix "neovim": - - modules/programs/neovim.nix - - tests/modules/programs/neovim/**/* +- changed-files + - any-glob-to-any-file + - modules/programs/neovim.nix + - tests/modules/programs/neovim/**/* "shell": - - modules/lib/zsh.nix - - modules/programs/zsh* - - modules/programs/bash* - - tests/modules/programs/zsh/**/* +- changed-files + - any-glob-to-any-file + - modules/lib/zsh.nix + - modules/programs/zsh* + - modules/programs/bash* + - tests/modules/programs/zsh/**/* "calendar": - - modules/programs/khal* - - modules/*/vdirsyncer* - - modules/accounts/calendar.nix +- changed-files + - any-glob-to-any-file + - modules/programs/khal* + - modules/*/vdirsyncer* + - modules/accounts/calendar.nix "contacts": - - modules/accounts/contacts.nix +- changed-files + - any-glob-to-any-file + - modules/accounts/contacts.nix From 2cacdd6a27477f1fa46b7026dd806de30f164d3b Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Tue, 4 Jun 2024 00:39:30 -0600 Subject: [PATCH 37/96] ci/labeler: fix upgrade to v5 format Signed-off-by: Sumner Evans --- .github/labeler.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 7828609b..cab1b543 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,6 @@ "mail": -- changed-files - - any-glob-to-any-file +- changed-files: + - any-glob-to-any-file: - modules/programs/aerc*.nix - modules/programs/alot*.nix - tests/modules/programs/aerc/* @@ -20,27 +20,27 @@ - modules/services/imapnotify.nix "neovim": -- changed-files - - any-glob-to-any-file +- changed-files: + - any-glob-to-any-file: - modules/programs/neovim.nix - tests/modules/programs/neovim/**/* "shell": -- changed-files - - any-glob-to-any-file +- changed-files: + - any-glob-to-any-file: - modules/lib/zsh.nix - modules/programs/zsh* - modules/programs/bash* - tests/modules/programs/zsh/**/* "calendar": -- changed-files - - any-glob-to-any-file +- changed-files: + - any-glob-to-any-file: - modules/programs/khal* - modules/*/vdirsyncer* - modules/accounts/calendar.nix "contacts": -- changed-files - - any-glob-to-any-file +- changed-files: + - any-glob-to-any-file: - modules/accounts/contacts.nix From a7117efb3725e6197dd95424136f79147aa35e5b Mon Sep 17 00:00:00 2001 From: Jdogzz Date: Tue, 4 Jun 2024 11:23:39 -0700 Subject: [PATCH 38/96] accounts.email: add clarifying documentation Add clarifying documentation for maildirBasePath value. Also improve default text. --- modules/accounts/email.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index 8657c4cb..f3996195 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -493,13 +493,14 @@ in { maildirBasePath = mkOption { type = types.str; default = "${config.home.homeDirectory}/Maildir"; - defaultText = "$HOME/Maildir"; + defaultText = "Maildir"; apply = p: if hasPrefix "/" p then p else "${config.home.homeDirectory}/${p}"; description = '' The base directory for account maildir directories. May be a - relative path, in which case it is relative the home - directory. + relative path (e.g. the user setting this value as "MyMaildir"), + in which case it is relative the home directory (e.g. resulting + in "~/MyMaildir"). ''; }; From 8f1b183c91c65c81131bbf7d76f0d845580c60bd Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 7 Jun 2024 04:20:00 +0000 Subject: [PATCH 39/96] fcitx5: fix tests Since https://github.com/NixOS/nixpkgs/pull/308725, fcitx5-with-addons expects share/dbus-1/services/ to be present. This patch updates the fcitx5 stub to reflect that. --- tests/modules/i18n/input-method/fcitx5-stubs.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/modules/i18n/input-method/fcitx5-stubs.nix b/tests/modules/i18n/input-method/fcitx5-stubs.nix index 2390ddde..9712a751 100644 --- a/tests/modules/i18n/input-method/fcitx5-stubs.nix +++ b/tests/modules/i18n/input-method/fcitx5-stubs.nix @@ -4,11 +4,15 @@ version = "0"; outPath = null; buildScript = '' - mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart + mkdir -p $out/bin $out/share/applications $out/share/dbus-1/services $out/etc/xdg/autostart touch $out/bin/fcitx5 \ $out/bin/fcitx5-config-qt \ $out/share/applications/org.fcitx.Fcitx5.desktop \ + $out/share/dbus-1/services/org.fcitx.Fcitx5.service \ $out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop + # The grep usage of fcitx5-with-addons expects one of the files to match with the fcitx5.out + # https://github.com/NixOS/nixpkgs/blob/d2eb4be48705289791428c07aca8ff654c1422ba/pkgs/tools/inputmethods/fcitx5/with-addons.nix#L40-L44 + echo $out >> $out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop chmod +x $out/bin/fcitx5 \ $out/bin/fcitx5-config-qt ''; From 8bdb74eaffa21cfce02d7d5d55cbde5524d50b84 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 9 Jun 2024 06:09:00 -0500 Subject: [PATCH 40/96] docs: add redirect from the previous options.html After migrating to nixos-render-docs, the extension move to .xtml. Unfortunately, this broke links to the previous Options Page. This patch provides a basic redirect support to the new Options Page. --- docs/home-manager-manual.nix | 2 ++ docs/options.html | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 docs/options.html diff --git a/docs/home-manager-manual.nix b/docs/home-manager-manual.nix index 34196d42..23b2d1e6 100644 --- a/docs/home-manager-manual.nix +++ b/docs/home-manager-manual.nix @@ -32,6 +32,8 @@ in stdenv.mkDerivation { OPTIONS_JSON \ ${home-manager-options.nix-darwin}/share/doc/nixos/options.json + cp ${./options.html} out/options.html + cp ${./static/style.css} out/style.css cp -r ${./release-notes} release-notes diff --git a/docs/options.html b/docs/options.html new file mode 100644 index 00000000..66c803fc --- /dev/null +++ b/docs/options.html @@ -0,0 +1,15 @@ + + + + Redirecting… + + + + + +

Redirecting…

+ + + From 885c037109fdbc05f37da8fa1b81c5a2f91f718b Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Sun, 9 Jun 2024 13:09:33 +0200 Subject: [PATCH 41/96] 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/ad57eef4ef0659193044870c731987a6df5cf56b?narHash=sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs%3D' (2024-05-29) → 'github:NixOS/nixpkgs/051f920625ab5aabe37c920346e3e69d7d34400e?narHash=sha256-4q0s6m0GUcN7q%2BY2DqD27iLvbcd1G50T2lv08kKxkSI%3D' (2024-06-07) 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 86507204..20290f1c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1717786204, + "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", "type": "github" }, "original": { From 8a20efbb00b096d7d30211cd306cc360c8eba38c Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 9 Jun 2024 14:11:01 +0300 Subject: [PATCH 42/96] hyprland: install xwayland if enabled Install the `xwayland` package if `cfg.xwayland.enable = true;`. This allows XWayland to work without having to enable the NixOS Hyprland option. --- modules/services/window-managers/hyprland.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 6b79248b..8fbdc6b7 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -206,7 +206,10 @@ in { "You have enabled hyprland.systemd.enable or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake."; in lib.optional inconsistent warning; - home.packages = lib.optional (cfg.package != null) cfg.finalPackage; + home.packages = lib.concatLists [ + (lib.optional (cfg.package != null) cfg.finalPackage) + (lib.optional (cfg.xwayland.enable) pkgs.xwayland) + ]; xdg.configFile."hypr/hyprland.conf" = let shouldGenerate = cfg.systemd.enable || cfg.extraConfig != "" From 3d65009effd77cb0d6e7520b68b039836a7606cf Mon Sep 17 00:00:00 2001 From: Matthieu Coudron <886074+teto@users.noreply.github.com> Date: Sun, 9 Jun 2024 13:14:04 +0200 Subject: [PATCH 43/96] waybar: remove modules-* from defaults Some prefer to handle modules-* imperatively for more flexibility, e.g., via waybar "includes" (https://github.com/Alexays/Waybar/wiki/Configuration). Current HM defaults modules-* to `[]` instead of null for most other settings, so they get written to ~/.config/waybar/config even though no explicit configuration has been made. And they take precedence over the imperative ones because of how waybar's includes work: ==== Paths to additional configuration files. Each file can contain a single object with any of the bar configuration options. In case of duplicate options, the first defined value takes precedence, i.e. including file -> first included file -> etc. Nested includes are permitted, but make sure to avoid circular imports. For a multi-bar config, the include directive affects only current bar configuration object. ==== --- modules/programs/waybar.nix | 12 ++++++------ .../programs/waybar/deprecated-modules-option.nix | 2 -- .../programs/waybar/settings-complex-expected.json | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 9925effc..72d24732 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -69,8 +69,8 @@ let }; modules-left = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed on the left."; example = literalExpression '' [ "sway/workspaces" "sway/mode" "wlr/taskbar" ] @@ -78,8 +78,8 @@ let }; modules-center = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed in the center."; example = literalExpression '' [ "sway/window" ] @@ -87,8 +87,8 @@ let }; modules-right = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed on the right."; example = literalExpression '' [ "mpd" "custom/mymodule#with-css-id" "temperature" ] diff --git a/tests/modules/programs/waybar/deprecated-modules-option.nix b/tests/modules/programs/waybar/deprecated-modules-option.nix index b4d730af..09f163b0 100644 --- a/tests/modules/programs/waybar/deprecated-modules-option.nix +++ b/tests/modules/programs/waybar/deprecated-modules-option.nix @@ -31,8 +31,6 @@ with lib; "modules-center": [ "test" ], - "modules-left": [], - "modules-right": [], "test": {} } ] diff --git a/tests/modules/programs/waybar/settings-complex-expected.json b/tests/modules/programs/waybar/settings-complex-expected.json index 87e4f690..e7ec8b4a 100644 --- a/tests/modules/programs/waybar/settings-complex-expected.json +++ b/tests/modules/programs/waybar/settings-complex-expected.json @@ -51,7 +51,6 @@ "modules-left": [ "sway/mode" ], - "modules-right": [], "output": [ "!DP-1" ], From 892f76bd0aa09a0f7f73eb41834b8a904b6d0fad Mon Sep 17 00:00:00 2001 From: Mathis H Date: Tue, 11 Jun 2024 21:35:34 +0000 Subject: [PATCH 44/96] mpv: fix package if wrapMpv not found `wrapMpv` was removed from nixpkgs since this PR: https://github.com/NixOS/nixpkgs/pull/304349 Co-authored-by: Mario Rodas --- modules/programs/mpv.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/programs/mpv.nix b/modules/programs/mpv.nix index 26cad111..30f2a8e0 100644 --- a/modules/programs/mpv.nix +++ b/modules/programs/mpv.nix @@ -55,8 +55,10 @@ let mpvPackage = if cfg.scripts == [ ] then cfg.package + else if hasAttr "wrapMpv" pkgs then + pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; } else - pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; }; + pkgs.mpv.override { scripts = cfg.scripts; }; in { options = { From 8d5e27b4807d25308dfe369d5a923d87e7dbfda3 Mon Sep 17 00:00:00 2001 From: midchildan Date: Thu, 13 Jun 2024 10:47:38 +0900 Subject: [PATCH 45/96] nix: add a declarative alternative to Nix channels (#4031) * nix: add options 'nixPath' and 'keepOldNixPath' By default, the system value for $NIX_PATH is kept as a fallback. To completely override the system value for $NIX_PATH: nix.keepOldNixPath = false; * nix: add more tests * nix: add a declarative alternative to Nix channels This adds a new option, 'nix.channels'. It's the Nix channels equivalent of the 'nix.registry' option, and compatible with pre-Flake Nix tooling including nix-env and nix-shell. Like 'nix.registry', this option is useful for pinning Nix channels. Channels defined in the new option can coexist with channels introduced through the nix-channel command. If the same channel exists in both, the one from Home Manager will be prioritized. * nix: add news entry * nix: make channels respect use-xdg-base-directories * nix: remove 'with lib;' --------- Co-authored-by: Michael Hoang --- modules/misc/news.nix | 11 +++ modules/misc/nix.nix | 83 ++++++++++++++++++- tests/modules/misc/nix/default.nix | 3 + tests/modules/misc/nix/empty-settings.nix | 1 + .../modules/misc/nix/example-channels-xdg.nix | 29 +++++++ tests/modules/misc/nix/example-channels.nix | 26 ++++++ tests/modules/misc/nix/example-settings.nix | 5 ++ tests/modules/misc/nix/keep-old-nix-path.nix | 16 ++++ 8 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 tests/modules/misc/nix/example-channels-xdg.nix create mode 100644 tests/modules/misc/nix/example-channels.nix create mode 100644 tests/modules/misc/nix/keep-old-nix-path.nix diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 2164d66a..1242d640 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1656,6 +1656,17 @@ in { See https://codeberg.org/dnkl/yambar for more. ''; } + + { + time = "2024-05-25T14:36:03+00:00"; + message = '' + Multiple new options are available: + + - 'nix.nixPath' + - 'nix.keepOldNixPath' + - 'nix.channels' + ''; + } ]; }; } diff --git a/modules/misc/nix.nix b/modules/misc/nix.nix index a4456946..2daa56b2 100644 --- a/modules/misc/nix.nix +++ b/modules/misc/nix.nix @@ -1,15 +1,40 @@ { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) + boolToString concatStringsSep escape floatToString getVersion isBool + isConvertibleWithToString isDerivation isFloat isInt isList isString + literalExpression maintainers mapAttrsToList mkDefault mkEnableOption mkIf + mkMerge mkOption optionalString toPretty types versionAtLeast; + cfg = config.nix; nixPackage = cfg.package; isNixAtLeast = versionAtLeast (getVersion nixPackage); + nixPath = concatStringsSep ":" cfg.nixPath; + + useXdg = config.nix.enable + && (config.nix.settings.use-xdg-base-directories or false); + defexprDir = if useXdg then + "${config.xdg.stateHome}/nix/defexpr" + else + "${config.home.homeDirectory}/.nix-defexpr"; + + # The deploy path for declarative channels. The directory name is prefixed + # with a number to make it easier for files in defexprDir to control the order + # they'll be read relative to each other. + channelPath = "${defexprDir}/50-home-manager"; + + channelsDrv = let + mkEntry = name: drv: { + inherit name; + path = toString drv; + }; + in pkgs.linkFarm "channels" (lib.mapAttrsToList mkEntry cfg.channels); + nixConf = assert isNixAtLeast "2.2"; let @@ -102,6 +127,47 @@ in { ''; }; + nixPath = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "$HOME/.nix-defexpr/channels" + "darwin-config=$HOME/.config/nixpkgs/darwin-configuration.nix" + ]; + description = '' + Adds new directories to the Nix expression search path. + + Used by Nix when looking up paths in angular brackets + (e.g. ``). + ''; + }; + + keepOldNixPath = mkOption { + type = types.bool; + default = true; + example = false; + description = '' + Whether {option}`nix.nixPath` should keep the previously set values in + {env}`NIX_PATH`. + ''; + }; + + channels = lib.mkOption { + type = with lib.types; attrsOf package; + default = { }; + example = lib.literalExpression "{ inherit nixpkgs; }"; + description = '' + A declarative alternative to Nix channels. Whereas with stock channels, + you would register URLs and fetch them into the Nix store with + {manpage}`nix-channel(1)`, this option allows you to register the store + path directly. One particularly useful example is registering flake + inputs as channels. + + This option can coexist with stock Nix channels. If the same channel is + defined in both, this option takes precedence. + ''; + }; + registry = mkOption { type = types.attrsOf (types.submodule (let inputAttrs = types.attrsOf @@ -210,6 +276,19 @@ in { }; config = mkIf cfg.enable (mkMerge [ + (mkIf (cfg.nixPath != [ ] && !cfg.keepOldNixPath) { + home.sessionVariables.NIX_PATH = "${nixPath}"; + }) + + (mkIf (cfg.nixPath != [ ] && cfg.keepOldNixPath) { + home.sessionVariables.NIX_PATH = "${nixPath}\${NIX_PATH:+:$NIX_PATH}"; + }) + + (lib.mkIf (cfg.channels != { }) { + nix.nixPath = [ channelPath ]; + home.file."${channelPath}".source = channelsDrv; + }) + (mkIf (cfg.registry != { }) { xdg.configFile."nix/registry.json".source = jsonFormat.generate "registry.json" { diff --git a/tests/modules/misc/nix/default.nix b/tests/modules/misc/nix/default.nix index b0370c2e..4c8822bf 100644 --- a/tests/modules/misc/nix/default.nix +++ b/tests/modules/misc/nix/default.nix @@ -2,4 +2,7 @@ nix-empty-settings = ./empty-settings.nix; nix-example-settings = ./example-settings.nix; nix-example-registry = ./example-registry.nix; + nix-keep-old-nix-path = ./keep-old-nix-path.nix; + nix-example-channels = ./example-channels.nix; + nix-example-channels-xdg = ./example-channels-xdg.nix; } diff --git a/tests/modules/misc/nix/empty-settings.nix b/tests/modules/misc/nix/empty-settings.nix index 18f1ab43..7e584474 100644 --- a/tests/modules/misc/nix/empty-settings.nix +++ b/tests/modules/misc/nix/empty-settings.nix @@ -8,6 +8,7 @@ with lib; nmt.script = '' assertPathNotExists home-files/.config/nix + assertPathNotExists home-files/.nix-defexpr/50-home-manager ''; }; } diff --git a/tests/modules/misc/nix/example-channels-xdg.nix b/tests/modules/misc/nix/example-channels-xdg.nix new file mode 100644 index 00000000..8ca1569f --- /dev/null +++ b/tests/modules/misc/nix/example-channels-xdg.nix @@ -0,0 +1,29 @@ +{ lib, config, pkgs, ... }: + +let + exampleChannel = pkgs.writeTextDir "default.nix" '' + { pkgs ? import { } }: + + { + example = pkgs.emptyDirectory; + } + ''; +in { + config = { + nix = { + package = config.lib.test.mkStubPackage { + version = lib.getVersion pkgs.nixVersions.stable; + }; + channels.example = exampleChannel; + settings.use-xdg-base-directories = true; + }; + + nmt.script = '' + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + 'export NIX_PATH="/home/hm-user/.local/state/nix/defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"' + assertFileContent \ + home-files/.local/state/nix/defexpr/50-home-manager/example/default.nix \ + ${exampleChannel}/default.nix + ''; + }; +} diff --git a/tests/modules/misc/nix/example-channels.nix b/tests/modules/misc/nix/example-channels.nix new file mode 100644 index 00000000..4b98c55d --- /dev/null +++ b/tests/modules/misc/nix/example-channels.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +let + exampleChannel = pkgs.writeTextDir "default.nix" '' + { pkgs ? import { } }: + + { + example = pkgs.emptyDirectory; + } + ''; +in { + config = { + nix = { + package = config.lib.test.mkStubPackage { }; + channels.example = exampleChannel; + }; + + nmt.script = '' + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + 'export NIX_PATH="/home/hm-user/.nix-defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"' + assertFileContent \ + home-files/.nix-defexpr/50-home-manager/example/default.nix \ + ${exampleChannel}/default.nix + ''; + }; +} diff --git a/tests/modules/misc/nix/example-settings.nix b/tests/modules/misc/nix/example-settings.nix index 6cbcd9df..df62fe8d 100644 --- a/tests/modules/misc/nix/example-settings.nix +++ b/tests/modules/misc/nix/example-settings.nix @@ -17,6 +17,8 @@ with lib; ''; }; + nixPath = [ "/a" "/b/c" ]; + settings = { use-sandbox = true; show-trace = true; @@ -28,6 +30,9 @@ with lib; assertFileContent \ home-files/.config/nix/nix.conf \ ${./example-settings-expected.conf} + + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + 'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"' ''; }; } diff --git a/tests/modules/misc/nix/keep-old-nix-path.nix b/tests/modules/misc/nix/keep-old-nix-path.nix new file mode 100644 index 00000000..72bd9f16 --- /dev/null +++ b/tests/modules/misc/nix/keep-old-nix-path.nix @@ -0,0 +1,16 @@ +{ config, ... }: + +{ + config = { + nix = { + package = config.lib.test.mkStubPackage { }; + nixPath = [ "/a" "/b/c" ]; + keepOldNixPath = false; + }; + + nmt.script = '' + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + 'export NIX_PATH="/a:/b/c"' + ''; + }; +} From 03c45b982c4e1ec683dbcbb587cddb41691bf52a Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Sun, 16 Jun 2024 10:32:21 +0200 Subject: [PATCH 46/96] 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/051f920625ab5aabe37c920346e3e69d7d34400e?narHash=sha256-4q0s6m0GUcN7q%2BY2DqD27iLvbcd1G50T2lv08kKxkSI%3D' (2024-06-07) → 'github:NixOS/nixpkgs/e9ee548d90ff586a6471b4ae80ae9cfcbceb3420?narHash=sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY%3D' (2024-06-13) 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 20290f1c..284ee498 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1717786204, - "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", + "lastModified": 1718318537, + "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", + "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "type": "github" }, "original": { From f2f254640ef74ee99cc4d6e76a7a13ec56ed5205 Mon Sep 17 00:00:00 2001 From: Mohamed Nehad Shalabi Date: Fri, 14 Jun 2024 22:40:58 +0200 Subject: [PATCH 47/96] Add translation using Weblate (Arabic) Co-authored-by: Mohamed Nehad Shalabi --- home-manager/po/ar.po | 217 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 home-manager/po/ar.po diff --git a/home-manager/po/ar.po b/home-manager/po/ar.po new file mode 100644 index 00000000..ea67fd5a --- /dev/null +++ b/home-manager/po/ar.po @@ -0,0 +1,217 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +msgstr[1] "" + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" From 6396c03229a8efa21a7550375de26620e07020b6 Mon Sep 17 00:00:00 2001 From: Languages add-on Date: Fri, 14 Jun 2024 22:40:58 +0200 Subject: [PATCH 48/96] Add translation using Weblate (Hungarian) Add translation using Weblate (Arabic) Co-authored-by: Languages add-on --- modules/po/ar.po | 113 +++++++++++++++++++++++++++++++++++++++++++++++ modules/po/hu.po | 113 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 modules/po/ar.po create mode 100644 modules/po/hu.po diff --git a/modules/po/ar.po b/modules/po/ar.po new file mode 100644 index 00000000..c2469fa5 --- /dev/null +++ b/modules/po/ar.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" diff --git a/modules/po/hu.po b/modules/po/hu.po new file mode 100644 index 00000000..b52c6293 --- /dev/null +++ b/modules/po/hu.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" From 0a7ffb28e5df5844d0e8039c9833d7075cdee792 Mon Sep 17 00:00:00 2001 From: Balint Barna Kovari Date: Fri, 14 Jun 2024 22:40:58 +0200 Subject: [PATCH 49/96] Translate using Weblate (Hungarian) Currently translated at 5.4% (2 of 37 strings) Add translation using Weblate (Hungarian) Co-authored-by: Balint Barna Kovari Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/hu/ Translation: Home Manager/Home Manager CLI --- home-manager/po/hu.po | 218 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 home-manager/po/hu.po diff --git a/home-manager/po/hu.po b/home-manager/po/hu.po new file mode 100644 index 00000000..88ad1d78 --- /dev/null +++ b/home-manager/po/hu.po @@ -0,0 +1,218 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-06-14 20:40+0000\n" +"Last-Translator: Balint Barna Kovari \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: hiányzó érték erre: %s" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "Nincs konfigurációs fájl itt: %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +msgstr[1] "" + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" From fab8e511d58f9c3f1cf8456abd685bfd381f7ebe Mon Sep 17 00:00:00 2001 From: bricked Date: Tue, 18 Jun 2024 15:23:11 +0200 Subject: [PATCH 50/96] firefox: update expected container settings From 0dd1c1495af6e6424695670343236f0053bf4947 Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Tue, 18 Jun 2024 23:05:42 +0200 Subject: [PATCH 51/96] Translate using Weblate (Polish) Currently translated at 100.0% (18 of 18 strings) Translate using Weblate (Polish) Currently translated at 100.0% (37 of 37 strings) Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/pl/ Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/pl/ Translation: Home Manager/Home Manager CLI Translation: Home Manager/Home Manager Modules Co-authored-by: Mateusz P --- home-manager/po/pl.po | 10 +++++----- modules/po/pl.po | 14 +++++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/home-manager/po/pl.po b/home-manager/po/pl.po index c8fa742f..63eeed3f 100644 --- a/home-manager/po/pl.po +++ b/home-manager/po/pl.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-02-16 22:01+0000\n" -"Last-Translator: Robert Helgesson \n" +"PO-Revision-Date: 2024-06-17 09:46+0000\n" +"Last-Translator: Mateusz P \n" "Language-Team: Polish \n" "Language: pl\n" @@ -18,12 +18,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -"X-Generator: Weblate 5.4\n" +"X-Generator: Weblate 5.6-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 msgid "%s: missing argument for %s" -msgstr "" +msgstr "%s: brakuje wartości dla %s" #: home-manager/home-manager:64 msgid "No configuration file found at %s" @@ -194,7 +194,7 @@ msgstr "Nieznane ustawienie „%s” „news.display”." #: home-manager/home-manager:594 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" -msgstr "" +msgstr "Proszę ustawić zmienną środowiskową $EDITOR lub $VISUAL" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" diff --git a/modules/po/pl.po b/modules/po/pl.po index 0e88a781..6ce24f50 100644 --- a/modules/po/pl.po +++ b/modules/po/pl.po @@ -8,17 +8,17 @@ msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2023-05-03 19:48+0000\n" -"Last-Translator: Eryk Michalak \n" +"PO-Revision-Date: 2024-06-17 09:46+0000\n" +"Last-Translator: Mateusz P \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.18-dev\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Weblate 5.6-dev\n" #: modules/files.nix:191 msgid "Creating home file links in %s" @@ -112,10 +112,14 @@ msgstr "" #: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" +"Błąd: Właściwość USER ma wartość \"%s\" podczas gdy spodziewana wartość to \"" +"%s\"" #: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" +"Błąd: Właściwość HOME ma wartość \"%s\" podczas gdy spodziewana wartość to \"" +"%s\"" #: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" From d7830d05421d0ced83a0f007900898bdcaf2a2ca Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:11:47 +0200 Subject: [PATCH 52/96] 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/e9ee548d90ff586a6471b4ae80ae9cfcbceb3420?narHash=sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY%3D' (2024-06-13) → 'github:NixOS/nixpkgs/b60ebf54c15553b393d144357375ea956f89e9a9?narHash=sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU%3D' (2024-06-16) 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 284ee498..538de1b3 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1718318537, - "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", + "lastModified": 1718530797, + "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", + "rev": "b60ebf54c15553b393d144357375ea956f89e9a9", "type": "github" }, "original": { From c559542f0aa87971a7f4c1b3478fe33cc904b902 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Fri, 21 Jun 2024 11:23:28 -0400 Subject: [PATCH 53/96] gtk: explicitly set default font size Fixes #5562 --- modules/misc/gtk.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 6454eb2a..e1ae250f 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -221,10 +221,9 @@ in { config = mkIf cfg.enable (let gtkIni = optionalAttrs (cfg.font != null) { - gtk-font-name = let - fontSize = - optionalString (cfg.font.size != null) " ${toString cfg.font.size}"; - in "${cfg.font.name}" + fontSize; + gtk-font-name = + let fontSize = if cfg.font.size != null then cfg.font.size else 10; + in "${cfg.font.name} ${toString fontSize}"; } // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; } // optionalAttrs (cfg.iconTheme != null) { gtk-icon-theme-name = cfg.iconTheme.name; @@ -245,10 +244,9 @@ in { '' + cfg4.extraCss; dconfIni = optionalAttrs (cfg.font != null) { - font-name = let - fontSize = - optionalString (cfg.font.size != null) " ${toString cfg.font.size}"; - in "${cfg.font.name}" + fontSize; + font-name = + let fontSize = if cfg.font.size != null then cfg.font.size else 10; + in "${cfg.font.name} ${toString fontSize}"; } // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; } // optionalAttrs (cfg.iconTheme != null) { icon-theme = cfg.iconTheme.name; From cd886711998fe5d9ff7979fdd4b4cbd17b1f1511 Mon Sep 17 00:00:00 2001 From: daru Date: Wed, 8 May 2024 06:16:09 +0200 Subject: [PATCH 54/96] blanket: add module --- modules/misc/news.nix | 12 ++++++ modules/modules.nix | 1 + modules/services/blanket.nix | 40 +++++++++++++++++++ tests/default.nix | 1 + .../services/blanket/basic-configuration.nix | 31 ++++++++++++++ tests/modules/services/blanket/default.nix | 1 + 6 files changed, 86 insertions(+) create mode 100644 modules/services/blanket.nix create mode 100644 tests/modules/services/blanket/basic-configuration.nix create mode 100644 tests/modules/services/blanket/default.nix diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 1242d640..997c7815 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1667,6 +1667,18 @@ in { - 'nix.channels' ''; } + + { + time = "2024-06-22T05:49:48+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.blanket'. + + Blanket is a program you can use to improve your focus and increase + your productivity by listening to different sounds. See + https://github.com/rafaelmardojai/blanket for more. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 4e1f0e20..5b100d47 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -274,6 +274,7 @@ let ./services/barrier.nix ./services/batsignal.nix ./services/betterlockscreen.nix + ./services/blanket.nix ./services/blueman-applet.nix ./services/borgmatic.nix ./services/cachix-agent.nix diff --git a/modules/services/blanket.nix b/modules/services/blanket.nix new file mode 100644 index 00000000..5eeb2ab1 --- /dev/null +++ b/modules/services/blanket.nix @@ -0,0 +1,40 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.services.blanket; + + inherit (lib) mkIf mkEnableOption mkPackageOption hm platforms; +in { + meta.maintainers = [ lib.maintainers.daru-san ]; + + options.services.blanket = { + enable = mkEnableOption "blanket"; + + package = mkPackageOption pkgs "blanket" { }; + }; + + config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.blanket" pkgs platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + systemd.user.services.blanket = { + Unit = { + Description = "Blanket daemon"; + Requires = [ "dbus.service" ]; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" "pipewire.service" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service = { + ExecStart = "${cfg.package}/bin/blanket --gapplication-service"; + Restart = "on-failure"; + RestartSec = 5; + }; + }; + }; +} diff --git a/tests/default.nix b/tests/default.nix index 4d8d49d4..a5e7fe9e 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -224,6 +224,7 @@ in import nmtSrc { ./modules/services/activitywatch ./modules/services/avizo ./modules/services/barrier + ./modules/services/blanket ./modules/services/borgmatic ./modules/services/cachix-agent ./modules/services/cliphist diff --git a/tests/modules/services/blanket/basic-configuration.nix b/tests/modules/services/blanket/basic-configuration.nix new file mode 100644 index 00000000..740c4d08 --- /dev/null +++ b/tests/modules/services/blanket/basic-configuration.nix @@ -0,0 +1,31 @@ +{ ... }: + +{ + services.blanket = { enable = true; }; + + test.stubs.blanket = { }; + + nmt.script = '' + clientServiceFile=home-files/.config/systemd/user/blanket.service + + assertFileExists $clientServiceFile + assertFileContent $clientServiceFile ${ + builtins.toFile "expected.service" '' + [Install] + WantedBy=graphical-session.target + + [Service] + ExecStart=@blanket@/bin/blanket --gapplication-service + Restart=on-failure + RestartSec=5 + + [Unit] + After=graphical-session-pre.target + Description=Blanket daemon + PartOf=graphical-session.target + PartOf=pipewire.service + Requires=dbus.service + '' + } + ''; +} diff --git a/tests/modules/services/blanket/default.nix b/tests/modules/services/blanket/default.nix new file mode 100644 index 00000000..8a439a52 --- /dev/null +++ b/tests/modules/services/blanket/default.nix @@ -0,0 +1 @@ +{ blanket-basic-configuration = ./basic-configuration.nix; } From 8be82697f797ce2190b6e2d7b11cd384076caae7 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 23 Jun 2024 23:03:18 +0200 Subject: [PATCH 55/96] ssh-agent: fix evaluation of maintainer field --- modules/lib/maintainers.nix | 6 ++++++ modules/services/ssh-agent.nix | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index b5175a87..a820d534 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -201,6 +201,12 @@ github = "kubukoz"; githubId = 894884; }; + lheckemann = { + name = "Linus Heckemann"; + email = "git@sphalerite.org"; + github = "lheckemann"; + githubId = 341954; + }; loicreynier = { name = "Loïc Reynier"; email = "loic@loireynier.fr"; diff --git a/modules/services/ssh-agent.nix b/modules/services/ssh-agent.nix index 16db3232..88ecf38b 100644 --- a/modules/services/ssh-agent.nix +++ b/modules/services/ssh-agent.nix @@ -5,7 +5,7 @@ let cfg = config.services.ssh-agent; in { - meta.maintainers = [ lib.maintainers.lheckemann ]; + meta.maintainers = [ lib.hm.maintainers.lheckemann ]; options = { services.ssh-agent = { From 6a9a1e51bbb8c301eae5aa63c9fc3c751ec5315b Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Sun, 23 Jun 2024 23:11:27 +0200 Subject: [PATCH 56/96] 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/b60ebf54c15553b393d144357375ea956f89e9a9?narHash=sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU%3D' (2024-06-16) → 'github:NixOS/nixpkgs/d603719ec6e294f034936c0d0dc06f689d91b6c3?narHash=sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw%2B0Bwe5DLU%3D' (2024-06-20) 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 538de1b3..b809cdb7 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1718530797, - "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", + "lastModified": 1718895438, + "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b60ebf54c15553b393d144357375ea956f89e9a9", + "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", "type": "github" }, "original": { From 5ccc3d6739b5e694841ced27cb5c06b50b163695 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Mon, 3 Jun 2024 19:39:00 +0200 Subject: [PATCH 57/96] yazi: Ensure plugin suffix `.yazi` - Append suffix `.yazi` to symlink targets of yazi plugins, if needed - Improve some docs, especially links to upstream docs. - Update tests to make use of this feature. --- modules/programs/yazi.nix | 29 +++++++++++++++++------- tests/modules/programs/yazi/settings.nix | 7 +++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 11f4e75c..f96a9bdf 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -144,9 +144,10 @@ in { type = with types; attrsOf (oneOf [ path package ]); default = { }; description = '' - Lua plugins. + Lua plugins. Will be linked into {file}`$XDG_CONFIG_HOME/yazi/plugins/`. - See https://yazi-rs.github.io/docs/plugins/overview/ for documentation. + See + for documentation. ''; example = literalExpression '' { @@ -162,7 +163,7 @@ in { description = '' Pre-made themes. - See https://yazi-rs.github.io/docs/flavors/overview/ for documentation. + See for documentation. ''; example = literalExpression '' { @@ -171,7 +172,6 @@ in { } ''; }; - }; config = mkIf cfg.enable { @@ -199,9 +199,22 @@ in { }; "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; } // (mapAttrs' - (name: value: nameValuePair "yazi/plugins/${name}" { source = value; }) - cfg.plugins) // (mapAttrs' - (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) - cfg.flavors); + (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) + cfg.flavors) // (let + # Make sure that the directory ends in `.yazi`, to comply with specification. + # `pluginName` is essential, it's needed to apply config in yazi's `init.lua` + ensureSuffix = pluginName: + if lib.hasSuffix ".yazi" pluginName then + "yazi/plugins/${pluginName}" + else + "yazi/plugins/${pluginName}.yazi"; + + mkPluginLink = pluginName: pluginPackage: { + name = ensureSuffix pluginName; + value.source = pluginPackage; + }; + + pluginLinks = mapAttrs' mkPluginLink cfg.plugins; + in pluginLinks); }; } diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 4655ae8b..33b99c2c 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -70,7 +70,10 @@ }; }; initLua = ./init.lua; - plugins = { "test.yazi" = ./plugin; }; + plugins = { + "test.yazi" = ./plugin; + "anotherTest" = ./plugin; + }; flavors = { "test.yazi" = ./flavor; }; }; @@ -87,6 +90,8 @@ ${./init.lua} assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ ${./plugin/init.lua} + assertFileContent home-files/.config/yazi/plugins/anotherTest.yazi/init.lua \ + ${./plugin/init.lua} assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ ${./flavor/init.lua} ''; From 340b98c0abb56ae24d7ee7dee64104583ad8a8c6 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Mon, 3 Jun 2024 20:29:06 +0200 Subject: [PATCH 58/96] yazi: Assert that plugins have valid structure --- modules/programs/yazi.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index f96a9bdf..59443dd3 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -209,12 +209,31 @@ in { else "yazi/plugins/${pluginName}.yazi"; - mkPluginLink = pluginName: pluginPackage: { + mkPluginLink = pluginName: pluginPackageOrPath: { name = ensureSuffix pluginName; - value.source = pluginPackage; + value.source = pluginPackageOrPath; }; pluginLinks = mapAttrs' mkPluginLink cfg.plugins; in pluginLinks); + + assertions = (mapAttrsToList (pluginName: pluginPackageOrPath: + let + isDir = pathIsDirectory "${pluginPackageOrPath}"; + hasInitLua = pathExists "${pluginPackageOrPath}/init.lua" + && !(pathIsDirectory "${pluginPackageOrPath}/init.lua"); + in { + assertion = isDir && hasInitLua; + message = + "Value at `programs.yazi.plugins.${pluginName}` is not a valid yazi plugin." + + (optionalString (!isDir) '' + + The path or package should be a directory, not a single file.'') + + (optionalString (!hasInitLua) '' + + The path or package must contain a file `init.lua`.'') + '' + + Evaluated value: `${pluginPackageOrPath}`''; + }) cfg.plugins); }; } From 09bc5c5949c73cf6b217badaae25feb2b4a7a2e5 Mon Sep 17 00:00:00 2001 From: Didn't read the style guide <50516935+lordkekz@users.noreply.github.com> Date: Tue, 4 Jun 2024 00:56:08 +0200 Subject: [PATCH 59/96] yazi: plugin names should be in kebab case (test) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲雅 · Misaki Masa --- tests/modules/programs/yazi/settings.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 33b99c2c..f0d54fae 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -71,8 +71,8 @@ }; initLua = ./init.lua; plugins = { - "test.yazi" = ./plugin; - "anotherTest" = ./plugin; + "test" = ./plugin; + "another-test" = ./plugin; }; flavors = { "test.yazi" = ./flavor; }; }; From 16f86c94ce2399ae09ae99b8f071f37bbc964b4f Mon Sep 17 00:00:00 2001 From: lordkekz Date: Wed, 5 Jun 2024 21:24:18 +0200 Subject: [PATCH 60/96] yazi: Assert plugin/flavor structure and warn about plugin/flavor suffix - Always append suffix `.yazi` to plugin's and flavor's attribute names. - Warn if the attribute names already have the suffix. - Assert that plugin's and flavor's values point to directories containing an `init.lua` file. --- modules/programs/yazi.nix | 86 +++++++++++++--------- tests/modules/programs/yazi/empty/.gitkeep | 0 tests/modules/programs/yazi/settings.nix | 23 ++++-- 3 files changed, 66 insertions(+), 43 deletions(-) create mode 100644 tests/modules/programs/yazi/empty/.gitkeep diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 59443dd3..db946344 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -144,7 +144,9 @@ in { type = with types; attrsOf (oneOf [ path package ]); default = { }; description = '' - Lua plugins. Will be linked into {file}`$XDG_CONFIG_HOME/yazi/plugins/`. + Lua plugins. + Values should be a package or path containing an `init.lua` file. + Will be linked to {file}`$XDG_CONFIG_HOME/yazi/plugins/.yazi`. See for documentation. @@ -162,6 +164,8 @@ in { default = { }; description = '' Pre-made themes. + Values should be a package or path containing an `init.lua` file. + Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`. See for documentation. ''; @@ -198,42 +202,52 @@ in { source = tomlFormat.generate "yazi-theme" cfg.theme; }; "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; - } // (mapAttrs' - (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) - cfg.flavors) // (let - # Make sure that the directory ends in `.yazi`, to comply with specification. - # `pluginName` is essential, it's needed to apply config in yazi's `init.lua` - ensureSuffix = pluginName: - if lib.hasSuffix ".yazi" pluginName then - "yazi/plugins/${pluginName}" - else - "yazi/plugins/${pluginName}.yazi"; + } // (mapAttrs' (name: value: + nameValuePair "yazi/flavors/${name}.yazi" { source = value; }) + cfg.flavors) // (mapAttrs' (name: value: + nameValuePair "yazi/plugins/${name}.yazi" { source = value; }) + cfg.plugins); - mkPluginLink = pluginName: pluginPackageOrPath: { - name = ensureSuffix pluginName; - value.source = pluginPackageOrPath; - }; + warnings = filter (s: s != "") (concatLists [ + (mapAttrsToList (name: value: + optionalString (hasSuffix ".yazi" name) '' + Flavors like `programs.yazi.flavors."${name}"` should no longer have the suffix ".yazi" in their attribute name. + The flavor will be linked to `$XDG_CONFIG_HOME/yazi/flavors/${name}.yazi`. + You probably want to rename it to `programs.yazi.flavors."${ + removeSuffix ".yazi" name + }"`. + '') cfg.flavors) + (mapAttrsToList (name: value: + optionalString (hasSuffix ".yazi" name) '' + Plugins like `programs.yazi.plugins."${name}"` should no longer have the suffix ".yazi" in their attribute name. + The plugin will be linked to `$XDG_CONFIG_HOME/yazi/plugins/${name}.yazi`. + You probably want to rename it to `programs.yazi.plugins."${ + removeSuffix ".yazi" name + }"`. + '') cfg.plugins) + ]); - pluginLinks = mapAttrs' mkPluginLink cfg.plugins; - in pluginLinks); - - assertions = (mapAttrsToList (pluginName: pluginPackageOrPath: - let - isDir = pathIsDirectory "${pluginPackageOrPath}"; - hasInitLua = pathExists "${pluginPackageOrPath}/init.lua" - && !(pathIsDirectory "${pluginPackageOrPath}/init.lua"); - in { - assertion = isDir && hasInitLua; - message = - "Value at `programs.yazi.plugins.${pluginName}` is not a valid yazi plugin." - + (optionalString (!isDir) '' - - The path or package should be a directory, not a single file.'') - + (optionalString (!hasInitLua) '' - - The path or package must contain a file `init.lua`.'') + '' - - Evaluated value: `${pluginPackageOrPath}`''; - }) cfg.plugins); + assertions = let + mkAsserts = opt: + mapAttrsToList (name: value: + let + isDir = pathIsDirectory "${value}"; + msgNotDir = optionalString (!isDir) + "The path or package should be a directory, not a single file."; + hasInitLua = pathExists "${value}/init.lua" + && !(pathIsDirectory "${value}/init.lua"); + msgNoInitLua = optionalString (!hasInitLua) + "The path or package must contain a file `init.lua`."; + singularOpt = removeSuffix "s" opt; + in { + assertion = isDir && hasInitLua; + message = '' + Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}. + ${msgNotDir} + ${msgNoInitLua} + Evaluated value: `${value}` + ''; + }) cfg.${opt}; + in (mkAsserts "flavors") ++ (mkAsserts "plugins"); }; } diff --git a/tests/modules/programs/yazi/empty/.gitkeep b/tests/modules/programs/yazi/empty/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index f0d54fae..66703871 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -71,10 +71,21 @@ }; initLua = ./init.lua; plugins = { - "test" = ./plugin; - "another-test" = ./plugin; + testplugin = ./plugin; + ## Produces warning + #"plugin-with-suffix.yazi" = ./plugin; + ## Fails assertion + #single-file-plugin = ./plugin/init.lua; + #empty-dir-plugin = ./empty; + }; + flavors = { + testflavor = ./flavor; + ## Produces warning + #"flavor-with-suffix.yazi" = ./flavor; + ## Fails assertion + #single-file-flavor = ./flavor/init.lua; + #empty-dir-flavor = ./empty; }; - flavors = { "test.yazi" = ./flavor; }; }; test.stubs.yazi = { }; @@ -88,11 +99,9 @@ ${./theme-expected.toml} assertFileContent home-files/.config/yazi/init.lua \ ${./init.lua} - assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ + assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \ ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/plugins/anotherTest.yazi/init.lua \ - ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ + assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/init.lua \ ${./flavor/init.lua} ''; } From 216d51eb22f9ce1a4c50a4737a4adcdb42fb6306 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Thu, 6 Jun 2024 12:05:28 +0200 Subject: [PATCH 61/96] yazi: Fix expected structure of flavors --- modules/programs/yazi.nix | 29 +++++++---- tests/modules/programs/yazi/flavor/LICENSE | 0 .../programs/yazi/flavor/LICENSE-tmtheme | 0 tests/modules/programs/yazi/flavor/README.md | 50 +++++++++++++++++++ .../modules/programs/yazi/flavor/flavor.toml | 2 + tests/modules/programs/yazi/flavor/init.lua | 1 - .../modules/programs/yazi/flavor/preview.png | 0 .../modules/programs/yazi/flavor/tmtheme.xml | 0 tests/modules/programs/yazi/settings.nix | 6 +-- 9 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 tests/modules/programs/yazi/flavor/LICENSE create mode 100644 tests/modules/programs/yazi/flavor/LICENSE-tmtheme create mode 100644 tests/modules/programs/yazi/flavor/README.md create mode 100644 tests/modules/programs/yazi/flavor/flavor.toml delete mode 100644 tests/modules/programs/yazi/flavor/init.lua create mode 100644 tests/modules/programs/yazi/flavor/preview.png create mode 100644 tests/modules/programs/yazi/flavor/tmtheme.xml diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index db946344..cb00ecc3 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -164,7 +164,7 @@ in { default = { }; description = '' Pre-made themes. - Values should be a package or path containing an `init.lua` file. + Values should be a package or path containing the required files. Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`. See for documentation. @@ -228,26 +228,37 @@ in { ]); assertions = let - mkAsserts = opt: + mkAsserts = opt: requiredFiles: mapAttrsToList (name: value: let isDir = pathIsDirectory "${value}"; msgNotDir = optionalString (!isDir) "The path or package should be a directory, not a single file."; - hasInitLua = pathExists "${value}/init.lua" - && !(pathIsDirectory "${value}/init.lua"); - msgNoInitLua = optionalString (!hasInitLua) - "The path or package must contain a file `init.lua`."; + isFileMissing = file: + !(pathExists "${value}/${file}") + || pathIsDirectory "${value}/${file}"; + missingFiles = filter isFileMissing requiredFiles; + msgFilesMissing = optionalString (missingFiles != [ ]) + "The ${singularOpt} is missing these files: ${ + toString missingFiles + }"; singularOpt = removeSuffix "s" opt; in { - assertion = isDir && hasInitLua; + assertion = isDir && missingFiles == [ ]; message = '' Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}. ${msgNotDir} - ${msgNoInitLua} + ${msgFilesMissing} Evaluated value: `${value}` ''; }) cfg.${opt}; - in (mkAsserts "flavors") ++ (mkAsserts "plugins"); + in (mkAsserts "flavors" [ + "flavor.toml" + "tmtheme.xml" + "README.md" + "preview.png" + "LICENSE" + "LICENSE-tmtheme" + ]) ++ (mkAsserts "plugins" [ "init.lua" ]); }; } diff --git a/tests/modules/programs/yazi/flavor/LICENSE b/tests/modules/programs/yazi/flavor/LICENSE new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/LICENSE-tmtheme b/tests/modules/programs/yazi/flavor/LICENSE-tmtheme new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/README.md b/tests/modules/programs/yazi/flavor/README.md new file mode 100644 index 00000000..3ba41d0d --- /dev/null +++ b/tests/modules/programs/yazi/flavor/README.md @@ -0,0 +1,50 @@ +
+ Yazi logo +
+ +

+ Example Flavor for Yazi +

+ +## Cooking up a new flavor + +> [!NOTE] +> Please remove this section from your README before publishing. + +1. [x] Fork this repository and rename it to `your-flavor-name.yazi`. +2. [ ] Copy the **parts you need to customize** from the [default theme.toml](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml) as `./flavor.toml`, and change them to meet your preferences. +3. [ ] Find a `.tmTheme` file on GitHub that matches the color of your flavor, copy it and it's license file as `./tmtheme.xml`, and `LICENSE-tmtheme`. +4. [ ] Modify the content and preview image in the README to fit your flavor. + +## 👀 Preview + + + +## 🎨 Installation + + + +```bash +# Linux/macOS +git clone https://github.com/username/example.yazi.git ~/.config/yazi/flavors/example.yazi + +# Windows +git clone https://github.com/username/example.yazi.git %AppData%\yazi\config\flavors\example.yazi +``` + +## ⚙️ Usage + +Add the these lines to your `theme.toml` configuration file to use it: + + + +```toml +[flavor] +use = "example" +``` + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/tests/modules/programs/yazi/flavor/flavor.toml b/tests/modules/programs/yazi/flavor/flavor.toml new file mode 100644 index 00000000..35e1fe77 --- /dev/null +++ b/tests/modules/programs/yazi/flavor/flavor.toml @@ -0,0 +1,2 @@ +# This is a flavor. + diff --git a/tests/modules/programs/yazi/flavor/init.lua b/tests/modules/programs/yazi/flavor/init.lua deleted file mode 100644 index 8d06fa7a..00000000 --- a/tests/modules/programs/yazi/flavor/init.lua +++ /dev/null @@ -1 +0,0 @@ --- This is a flavor. diff --git a/tests/modules/programs/yazi/flavor/preview.png b/tests/modules/programs/yazi/flavor/preview.png new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/tmtheme.xml b/tests/modules/programs/yazi/flavor/tmtheme.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 66703871..2694dade 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -83,7 +83,7 @@ ## Produces warning #"flavor-with-suffix.yazi" = ./flavor; ## Fails assertion - #single-file-flavor = ./flavor/init.lua; + #single-file-flavor = ./flavor/flavor.toml; #empty-dir-flavor = ./empty; }; }; @@ -101,7 +101,7 @@ ${./init.lua} assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \ ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/init.lua \ - ${./flavor/init.lua} + assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/flavor.toml \ + ${./flavor/flavor.toml} ''; } From 6b1f90a8ff92e81638ae6eb48cd62349c3e387bb Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sun, 23 Jun 2024 21:11:25 +0200 Subject: [PATCH 62/96] stalonetray: move config file to XDG_CONFIG_HOME --- modules/services/stalonetray.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/stalonetray.nix b/modules/services/stalonetray.nix index 172d6dd9..9d4d7a53 100644 --- a/modules/services/stalonetray.nix +++ b/modules/services/stalonetray.nix @@ -74,7 +74,7 @@ in { } (mkIf (cfg.config != { }) { - home.file.".stalonetrayrc".text = let + xdg.configFile."stalonetrayrc".text = let valueToString = v: if isBool v then (if v then "true" else "false") @@ -88,7 +88,7 @@ in { }) (mkIf (cfg.extraConfig != "") { - home.file.".stalonetrayrc".text = cfg.extraConfig; + xdg.configFile."stalonetrayrc".text = cfg.extraConfig; }) ]); } From d3bf2a06129c2493ec55e217be2907b92279f30f Mon Sep 17 00:00:00 2001 From: eljamm Date: Sun, 23 Jun 2024 15:01:38 +0100 Subject: [PATCH 63/96] yazi: add eljamm as maintainer --- modules/programs/yazi.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index cb00ecc3..77acfc6b 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -40,7 +40,7 @@ let } ''; in { - meta.maintainers = with maintainers; [ xyenon ]; + meta.maintainers = with maintainers; [ xyenon eljamm ]; options.programs.yazi = { enable = mkEnableOption "yazi"; From 92a26bf6df1f00cbbed16a99d2547531ff4b3a83 Mon Sep 17 00:00:00 2001 From: eljamm Date: Sun, 23 Jun 2024 15:05:25 +0100 Subject: [PATCH 64/96] yazi: add shellWrapperName & rename wrappers to yy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The program shell wrappers have been renamed from `ya` to `yy` following the introduction of the new CLI tool named `ya`. With this in mind, the `shellWrapperName` option has been introduced to provide users with more flexibility in choosing the name they're most accustomed to (ra, lf, ...). Co-authored-by: XYenon Co-authored-by: 三咲雅 · Misaki Masa --- modules/misc/news.nix | 13 +++++++++++++ modules/programs/yazi.nix | 15 ++++++++++++--- .../programs/yazi/bash-integration-enabled.nix | 2 +- .../programs/yazi/fish-integration-enabled.nix | 2 +- .../programs/yazi/nushell-integration-enabled.nix | 2 +- .../programs/yazi/zsh-integration-enabled.nix | 2 +- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 997c7815..e7e582f5 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1679,6 +1679,19 @@ in { https://github.com/rafaelmardojai/blanket for more. ''; } + + { + time = "2024-06-26T07:07:17+00:00"; + condition = with config.programs.yazi; + enable && (enableBashIntegration || enableZshIntegration + || enableFishIntegration || enableNushellIntegration); + message = '' + Yazi's shell integration wrappers have been renamed from 'ya' to 'yy'. + + A new option `programs.yazi.shellWrapperName` is also available that + allows you to override this name. + ''; + } ]; }; } diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 77acfc6b..105bbec4 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -7,7 +7,7 @@ let tomlFormat = pkgs.formats.toml { }; bashIntegration = '' - function ya() { + function ${cfg.shellWrapperName}() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then @@ -18,7 +18,7 @@ let ''; fishIntegration = '' - function ya + function ${cfg.shellWrapperName} set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] @@ -29,7 +29,7 @@ let ''; nushellIntegration = '' - def --env ya [...args] { + def --env ${cfg.shellWrapperName} [...args] { let tmp = (mktemp -t "yazi-cwd.XXXXX") yazi ...$args --cwd-file $tmp let cwd = (open $tmp) @@ -47,6 +47,15 @@ in { package = mkPackageOption pkgs "yazi" { }; + shellWrapperName = mkOption { + type = types.str; + default = "yy"; + example = "y"; + description = '' + Name of the shell wrapper to be called. + ''; + }; + enableBashIntegration = mkEnableOption "Bash integration"; enableZshIntegration = mkEnableOption "Zsh integration"; diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix index ac2e4979..474a989f 100644 --- a/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya() { + function yy() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix index 6d2b9fa3..2231035b 100644 --- a/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya + function yy set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] diff --git a/tests/modules/programs/yazi/nushell-integration-enabled.nix b/tests/modules/programs/yazi/nushell-integration-enabled.nix index 9adbaa98..a2de2d8b 100644 --- a/tests/modules/programs/yazi/nushell-integration-enabled.nix +++ b/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - def --env ya [...args] { + def --env yy [...args] { let tmp = (mktemp -t "yazi-cwd.XXXXX") yazi ...$args --cwd-file $tmp let cwd = (open $tmp) diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix index d5090a6a..0c0ec217 100644 --- a/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya() { + function yy() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then From 7a88ff6ad1e001043f876ebdb1d7460cdfe874d2 Mon Sep 17 00:00:00 2001 From: Kacper Koniuszy <120419423+kkoniuszy@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:41:48 +0200 Subject: [PATCH 65/96] systemd: fix sd-switch error on empty target directory After update to sd-switch 0.5.0, `home-manager switch` failed with the following error message: > Error: Error switching > > Caused by: > 0: Failed to build switch plan > 1: No such file or directory (os error 2) This was caused by a non-existing target unit directory due to no user services being managed by home-manager. This change makes sd-switch run with pkgs.emptyDirectory as the target in such cases. Closes: https://github.com/nix-community/home-manager/issues/5552 --- modules/systemd.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/systemd.nix b/modules/systemd.nix index f209f65d..1d96ec8d 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -336,7 +336,7 @@ in { ${pkgs.sd-switch}/bin/sd-switch \ ''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \ ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \ - --new-units $newGenPath/home-files/.config/systemd/user + --new-units "$newUnitsDir" ''; }; @@ -354,8 +354,15 @@ in { warnEcho "Attempting to reload services anyway..." fi + newUnitsDir="$newGenPath/home-files/.config/systemd/user" + if [[ ! -e $newUnitsDir ]]; then + newUnitsDir=${pkgs.emptyDirectory} + fi + ${ensureRuntimeDir} \ ${getAttr cfg.startServices cmd} + + unset newUnitsDir else echo "User systemd daemon not running. Skipping reload." fi From 607f969f5dca2dc100cbc53e24ab49ac24ef8987 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Wed, 26 Jun 2024 17:14:48 +0100 Subject: [PATCH 66/96] systemd: don't try to restart templates If the user has template services in their systemd configuration, these can't be restarted, and will produces warnings during the activation phase. Avoid those warnings by skipping any uninstantiated templates when looking for services to start or stop. --- modules/systemd-activate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/systemd-activate.sh b/modules/systemd-activate.sh index 235f1a24..ca26fea8 100644 --- a/modules/systemd-activate.sh +++ b/modules/systemd-activate.sh @@ -34,7 +34,7 @@ function systemdPostReload() { touch "$oldServiceFiles" else find "$oldUserServicePath" \ - -maxdepth 1 -name '*.service' -exec basename '{}' ';' \ + -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \ | sort \ > "$oldServiceFiles" fi @@ -43,7 +43,7 @@ function systemdPostReload() { touch "$newServiceFiles" else find "$newUserServicePath" \ - -maxdepth 1 -name '*.service' -exec basename '{}' ';' \ + -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \ | sort \ > "$newServiceFiles" fi From 1a4f12ae0bda877ec4099b429cf439aad897d7e9 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Wed, 26 Jun 2024 21:12:39 +0700 Subject: [PATCH 67/96] docs: introduction chapter Adds an introduction chapter to the manual. --- docs/manual/introduction.md | 32 ++++++++++++++++++++++++++++++++ docs/manual/manual.md | 1 + 2 files changed, 33 insertions(+) create mode 100644 docs/manual/introduction.md diff --git a/docs/manual/introduction.md b/docs/manual/introduction.md new file mode 100644 index 00000000..ebdac5bd --- /dev/null +++ b/docs/manual/introduction.md @@ -0,0 +1,32 @@ +# Introduction to Home Manager {#ch-introduction} + +Home Manager is a [Nix](https://nix.dev/)-powered tool for reproducible management of the contents of users' home directories. +This includes programs, configuration files, environment variables and, well… arbitrary files. +The following example snippet of Nix code: + +```nix +programs.git = { + enable = true; + userEmail = "joe@example.org"; + userName = "joe"; +}; +``` + +would make available to a user the `git` executable and man pages and a configuration file `~/.config/git/config`: + +```ini +[user] + email = "joe@example.org" + name = "joe" +``` + +Since Home Manager is implemented in Nix, it provides several benefits: + +- Contents are reproducible — a home will be the exact same every time it is built, unless of course, an intentional change is made. + This also means you can have the exact same home on different hosts. +- Significantly faster and more powerful than various backup strategies. +- Unlike "dotfiles" repositories, Home Manager supports specifying programs, as well as their configurations. +- Supported by , so that you don't have to build from source. +- If you do want to build some programs from source, there is hardly a tool more useful than Nix for that, and the build instructions can be neatly integrated in your Home Manager usage. +- Infinitely composable, so that values in different configuration files and build instructions can share a source of truth. +- Connects you with the [most extensive](https://repology.org/repositories/statistics/total) and [most up-to-date](https://repology.org/repositories/statistics/newest) software package repository on earth, [Nixpkgs](https://github.com/NixOS/nixpkgs). diff --git a/docs/manual/manual.md b/docs/manual/manual.md index a1cfb1a0..0f81642f 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -8,6 +8,7 @@ preface.md ``` ```{=include=} parts +introduction.md installation.md usage.md nix-flakes.md From 19e2f43e0b0aec2067e5101f7d1ec75a43f64778 Mon Sep 17 00:00:00 2001 From: Jakob Kukla Date: Fri, 28 Jun 2024 16:16:01 +0200 Subject: [PATCH 68/96] rbw: fix url option examples rbw expects a protocol for its base_url setting[1]. Otherwise fails with `rbw unlock: failed to parse base url: relative URL without a base`. [1] https://github.com/doy/rbw/blob/741a72cf0d7d45fcd32b0326b69f6238733e5a56/README.md#configuration --- modules/programs/rbw.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/rbw.nix b/modules/programs/rbw.nix index 5dd751d0..b7381c67 100644 --- a/modules/programs/rbw.nix +++ b/modules/programs/rbw.nix @@ -19,7 +19,7 @@ let base_url = mkOption { type = with types; nullOr str; default = null; - example = "bitwarden.example.com"; + example = "https://bitwarden.example.com/"; description = "The base-url for a self-hosted bitwarden installation."; }; @@ -27,7 +27,7 @@ let identity_url = mkOption { type = with types; nullOr str; default = null; - example = "identity.example.com"; + example = "https://identity.example.com/"; description = "The identity url for your bitwarden installation."; }; From f50e2779edbc905ab131ce7ce36b14a09ab44f3c Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:16:42 +0200 Subject: [PATCH 69/96] 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/d603719ec6e294f034936c0d0dc06f689d91b6c3?narHash=sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw%2B0Bwe5DLU%3D' (2024-06-20) → 'github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60?narHash=sha256-ECni%2BIkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko%3D' (2024-06-24) 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 b809cdb7..508f73e5 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1718895438, - "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { From 7e68e55d2e16d3a1e92a679430728c35a30fd24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Fri, 28 Jun 2024 08:24:13 -0700 Subject: [PATCH 70/96] glance: add module --- modules/misc/news.nix | 11 +++ modules/modules.nix | 1 + modules/services/glance.nix | 77 +++++++++++++++++++ tests/default.nix | 1 + .../services/glance/default-settings.nix | 15 ++++ tests/modules/services/glance/default.nix | 4 + .../services/glance/example-settings.nix | 33 ++++++++ .../services/glance/glance-default-config.yml | 6 ++ .../services/glance/glance-example-config.yml | 10 +++ tests/modules/services/glance/glance.service | 9 +++ 10 files changed, 167 insertions(+) create mode 100644 modules/services/glance.nix create mode 100644 tests/modules/services/glance/default-settings.nix create mode 100644 tests/modules/services/glance/default.nix create mode 100644 tests/modules/services/glance/example-settings.nix create mode 100644 tests/modules/services/glance/glance-default-config.yml create mode 100644 tests/modules/services/glance/glance-example-config.yml create mode 100644 tests/modules/services/glance/glance.service diff --git a/modules/misc/news.nix b/modules/misc/news.nix index e7e582f5..bef867bb 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1692,6 +1692,17 @@ in { allows you to override this name. ''; } + + { + time = "2024-06-28T14:18:16+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.glance'. + + Glance is a self-hosted dashboard that puts all your feeds in + one place. See https://github.com/glanceapp/glance for more. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 5b100d47..dbeebfbf 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -301,6 +301,7 @@ let ./services/fusuma.nix ./services/getmail.nix ./services/git-sync.nix + ./services/glance.nix ./services/gnome-keyring.nix ./services/gpg-agent.nix ./services/grobi.nix diff --git a/modules/services/glance.nix b/modules/services/glance.nix new file mode 100644 index 00000000..fa4f1a8d --- /dev/null +++ b/modules/services/glance.nix @@ -0,0 +1,77 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.glance; + + inherit (lib) mkEnableOption mkPackageOption mkOption mkIf getExe; + + settingsFormat = pkgs.formats.yaml { }; + + settingsFile = settingsFormat.generate "glance.yml" cfg.settings; + + configFilePath = "${config.xdg.configHome}/glance/glance.yml"; +in { + meta.maintainers = [ pkgs.lib.maintainers.gepbird ]; + + options.services.glance = { + enable = mkEnableOption "glance"; + + package = mkPackageOption pkgs "glance" { }; + + settings = mkOption { + type = settingsFormat.type; + default = { + pages = [{ + name = "Calendar"; + columns = [{ + size = "full"; + widgets = [{ type = "calendar"; }]; + }]; + }]; + }; + example = { + server.port = 5678; + pages = [{ + name = "Home"; + columns = [{ + size = "full"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + location = "London, United Kingdom"; + } + ]; + }]; + }]; + }; + description = '' + Configuration written to a yaml file that is read by glance. See + + for more. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.glance" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."glance/glance.yml".source = settingsFile; + + systemd.user.services.glance = { + Unit = { + Description = "Glance feed dashboard server"; + PartOf = [ "graphical-session.target" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service.ExecStart = "${getExe cfg.package} --config ${configFilePath}"; + }; + }; +} diff --git a/tests/default.nix b/tests/default.nix index a5e7fe9e..28ce4f64 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -241,6 +241,7 @@ in import nmtSrc { ./modules/services/fnott ./modules/services/fusuma ./modules/services/git-sync + ./modules/services/glance ./modules/services/gpg-agent ./modules/services/gromit-mpx ./modules/services/home-manager-auto-upgrade diff --git a/tests/modules/services/glance/default-settings.nix b/tests/modules/services/glance/default-settings.nix new file mode 100644 index 00000000..7b35db77 --- /dev/null +++ b/tests/modules/services/glance/default-settings.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + services.glance.enable = true; + + test.stubs.glance = { }; + + nmt.script = '' + configFile=home-files/.config/glance/glance.yml + serviceFile=home-files/.config/systemd/user/glance.service + + assertFileContent $configFile ${./glance-default-config.yml} + assertFileContent $serviceFile ${./glance.service} + ''; +} diff --git a/tests/modules/services/glance/default.nix b/tests/modules/services/glance/default.nix new file mode 100644 index 00000000..893ba651 --- /dev/null +++ b/tests/modules/services/glance/default.nix @@ -0,0 +1,4 @@ +{ + glance-default-settings = ./default-settings.nix; + glance-example-settings = ./example-settings.nix; +} diff --git a/tests/modules/services/glance/example-settings.nix b/tests/modules/services/glance/example-settings.nix new file mode 100644 index 00000000..9e2101d2 --- /dev/null +++ b/tests/modules/services/glance/example-settings.nix @@ -0,0 +1,33 @@ +{ ... }: + +{ + services.glance = { + enable = true; + settings = { + server.port = 5678; + pages = [{ + name = "Home"; + columns = [{ + size = "full"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + location = "London, United Kingdom"; + } + ]; + }]; + }]; + }; + }; + + test.stubs.glance = { }; + + nmt.script = '' + configFile=home-files/.config/glance/glance.yml + serviceFile=home-files/.config/systemd/user/glance.service + + assertFileContent $configFile ${./glance-example-config.yml} + assertFileContent $serviceFile ${./glance.service} + ''; +} diff --git a/tests/modules/services/glance/glance-default-config.yml b/tests/modules/services/glance/glance-default-config.yml new file mode 100644 index 00000000..024a8964 --- /dev/null +++ b/tests/modules/services/glance/glance-default-config.yml @@ -0,0 +1,6 @@ +pages: +- columns: + - size: full + widgets: + - type: calendar + name: Calendar diff --git a/tests/modules/services/glance/glance-example-config.yml b/tests/modules/services/glance/glance-example-config.yml new file mode 100644 index 00000000..2775916e --- /dev/null +++ b/tests/modules/services/glance/glance-example-config.yml @@ -0,0 +1,10 @@ +pages: +- columns: + - size: full + widgets: + - type: calendar + - location: London, United Kingdom + type: weather + name: Home +server: + port: 5678 diff --git a/tests/modules/services/glance/glance.service b/tests/modules/services/glance/glance.service new file mode 100644 index 00000000..07b82d1d --- /dev/null +++ b/tests/modules/services/glance/glance.service @@ -0,0 +1,9 @@ +[Install] +WantedBy=graphical-session.target + +[Service] +ExecStart=@glance@/bin/dummy --config /home/hm-user/.config/glance/glance.yml + +[Unit] +Description=Glance feed dashboard server +PartOf=graphical-session.target From c2f806e60ac55c604708250ba0ebcf96bccbbafe Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 29 Jun 2024 17:20:18 +0200 Subject: [PATCH 71/96] pulseeffects: fix test evaluation Fixes #5588 --- modules/lib/maintainers.nix | 7 +++++++ modules/services/pulseeffects.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index a820d534..1063f53a 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -173,6 +173,13 @@ github = "iosmanthus"; githubId = 16307070; }; + jonringer = { + email = "jonringer117@gmail.com"; + matrix = "@jonringer:matrix.org"; + github = "jonringer"; + githubId = 7673602; + name = "Jonathan Ringer"; + }; kalhauge = { name = "Christian Gram Kalhauge"; email = "kalhauge@users.noreply.github.com"; diff --git a/modules/services/pulseeffects.nix b/modules/services/pulseeffects.nix index 434adf85..3edc5349 100644 --- a/modules/services/pulseeffects.nix +++ b/modules/services/pulseeffects.nix @@ -9,7 +9,7 @@ let presetOpts = optionalString (cfg.preset != "") "--load-preset ${cfg.preset}"; in { - meta.maintainers = [ maintainers.jonringer ]; + meta.maintainers = [ hm.maintainers.jonringer ]; options.services.pulseeffects = { enable = mkEnableOption '' From 36317d4d38887f7629876b0e43c8d9593c5cc48d Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Sat, 29 Jun 2024 15:19:35 +0900 Subject: [PATCH 72/96] direnv: add silent option PR #5586 --- modules/programs/direnv.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index add2c8fc..4a763670 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -95,6 +95,7 @@ in { package = mkPackageOption pkgs "nix-direnv" { }; }; + silent = mkEnableOption "silent mode, that is, disabling direnv logging"; }; config = mkIf cfg.enable { @@ -163,5 +164,7 @@ in { } ) ''); + + home.sessionVariables = lib.mkIf cfg.silent { DIRENV_LOG_FORMAT = ""; }; }; } From ef74bacbb48cf5f33dda7b7565a7986fbc489a45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:49:15 +0200 Subject: [PATCH 73/96] ci: bump DeterminateSystems/update-flake-lock from 22 to 23 Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 22 to 23. - [Release notes](https://github.com/determinatesystems/update-flake-lock/releases) - [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v22...v23) --- updated-dependencies: - dependency-name: DeterminateSystems/update-flake-lock dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/update-flake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 9df8060d..8ba9264d 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -14,7 +14,7 @@ jobs: - name: Install Nix uses: cachix/install-nix-action@v27 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v22 + uses: DeterminateSystems/update-flake-lock@v23 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies From 59ce796b2563e19821361abbe2067c3bb4143a7d Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:50:39 +0200 Subject: [PATCH 74/96] 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/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60?narHash=sha256-ECni%2BIkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko%3D' (2024-06-24) → 'github:NixOS/nixpkgs/b2852eb9365c6de48ffb0dc2c9562591f652242a?narHash=sha256-C8e9S7RzshSdHB7L%2Bv9I51af1gDM5unhJ2xO1ywxNH8%3D' (2024-06-27) 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 508f73e5..cbdbf039 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1719254875, - "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "type": "github" }, "original": { From 36e2f9da91ce8b63a549a47688ae60d47c50de4b Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Wed, 3 Jul 2024 01:39:20 -0600 Subject: [PATCH 75/96] maintainers: remove ivar ivar was removed as a maintainer from upstream nixpkgs due to inactivity: https://github.com/NixOS/nixpkgs/pull/322266 Signed-off-by: Sumner Evans --- modules/programs/sm64ex.nix | 2 +- modules/services/pbgopy.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/sm64ex.nix b/modules/programs/sm64ex.nix index 35d608ba..23b75808 100644 --- a/modules/programs/sm64ex.nix +++ b/modules/programs/sm64ex.nix @@ -29,7 +29,7 @@ let in "${key} ${generatedValue}"; in { - meta.maintainers = [ maintainers.ivar ]; + meta.maintainers = [ ]; options.programs.sm64ex = { enable = mkEnableOption "sm64ex"; diff --git a/modules/services/pbgopy.nix b/modules/services/pbgopy.nix index fecc64ca..3a3499e5 100644 --- a/modules/services/pbgopy.nix +++ b/modules/services/pbgopy.nix @@ -15,7 +15,7 @@ let "--basic-auth ${escapeShellArg cfg.httpAuth}"); in { - meta.maintainers = [ maintainers.ivar ]; + meta.maintainers = [ ]; options.services.pbgopy = { enable = mkEnableOption "pbgopy"; From 269cc18d945dd44bcbc22d58df3876a5d0dbac0b Mon Sep 17 00:00:00 2001 From: sg-qwt <115715554+sg-qwt@users.noreply.github.com> Date: Thu, 4 Jul 2024 03:43:38 +0800 Subject: [PATCH 76/96] sway: fix systemd variables example --- modules/services/window-managers/i3-sway/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index bc20e9d9..cd1b27fe 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -403,7 +403,7 @@ in { "XCURSOR_THEME" "XCURSOR_SIZE" ]; - example = [ "-all" ]; + example = [ "--all" ]; description = '' Environment variables imported into the systemd and D-Bus user environment. ''; From e9158314725af06854009b829d2249d0d6c23c79 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:36:14 -0400 Subject: [PATCH 77/96] yazi: allow literal string for `initLua` --- modules/programs/yazi.nix | 9 +++++++-- tests/modules/programs/yazi/default.nix | 1 + tests/modules/programs/yazi/init-lua-string.nix | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tests/modules/programs/yazi/init-lua-string.nix diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 105bbec4..d7b88020 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -141,7 +141,7 @@ in { }; initLua = mkOption { - type = with types; nullOr path; + type = with types; nullOr (either path lines); default = null; description = '' The init.lua for Yazi itself. @@ -210,7 +210,12 @@ in { "yazi/theme.toml" = mkIf (cfg.theme != { }) { source = tomlFormat.generate "yazi-theme" cfg.theme; }; - "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; + "yazi/init.lua" = mkIf (cfg.initLua != null) + (if builtins.isPath cfg.initLua then { + source = cfg.initLua; + } else { + text = cfg.initLua; + }); } // (mapAttrs' (name: value: nameValuePair "yazi/flavors/${name}.yazi" { source = value; }) cfg.flavors) // (mapAttrs' (name: value: diff --git a/tests/modules/programs/yazi/default.nix b/tests/modules/programs/yazi/default.nix index 09d52ac3..ec543c84 100644 --- a/tests/modules/programs/yazi/default.nix +++ b/tests/modules/programs/yazi/default.nix @@ -1,5 +1,6 @@ { yazi-settings = ./settings.nix; + yazi-init-lua-string = ./init-lua-string.nix; yazi-bash-integration-enabled = ./bash-integration-enabled.nix; yazi-zsh-integration-enabled = ./zsh-integration-enabled.nix; yazi-fish-integration-enabled = ./fish-integration-enabled.nix; diff --git a/tests/modules/programs/yazi/init-lua-string.nix b/tests/modules/programs/yazi/init-lua-string.nix new file mode 100644 index 00000000..999dd6bc --- /dev/null +++ b/tests/modules/programs/yazi/init-lua-string.nix @@ -0,0 +1,14 @@ +{ ... }: { + programs.yazi = { + enable = true; + + initLua = builtins.readFile ./init.lua; + }; + + test.stubs.yazi = { }; + + nmt.script = '' + assertFileContent home-files/.config/yazi/init.lua \ + ${./init.lua} + ''; +} From 58268b4d7745f6747be18033e6f10011466ce8d4 Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 23:36:42 +0200 Subject: [PATCH 78/96] 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/b2852eb9365c6de48ffb0dc2c9562591f652242a?narHash=sha256-C8e9S7RzshSdHB7L%2Bv9I51af1gDM5unhJ2xO1ywxNH8%3D' (2024-06-27) → 'github:NixOS/nixpkgs/00d80d13810dbfea8ab4ed1009b09100cca86ba8?narHash=sha256-H3%2BEC5cYuq%2BgQW8y0lSrrDZfH71LB4DAf%2BTDFyvwCNA%3D' (2024-07-01) 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 cbdbf039..b700f208 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1719506693, - "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "lastModified": 1719848872, + "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", "type": "github" }, "original": { From 0a30138c694ab3b048ac300794c2eb599dc40266 Mon Sep 17 00:00:00 2001 From: novenary Date: Tue, 2 Jul 2024 15:04:26 +0300 Subject: [PATCH 79/96] mpd: specify dependency of service on socket This allows `systemctl --user restart mpd.socket` to work properly. --- modules/services/mpd.nix | 15 +++++++--- tests/modules/services/mpd/default.nix | 1 + .../services/mpd/start-when-needed.nix | 29 +++++++++++++++++++ .../services/mpd/start-when-needed.service | 12 ++++++++ .../services/mpd/start-when-needed.socket | 8 +++++ 5 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 tests/modules/services/mpd/start-when-needed.nix create mode 100644 tests/modules/services/mpd/start-when-needed.service create mode 100644 tests/modules/services/mpd/start-when-needed.socket diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix index a0011b02..3d8d03be 100644 --- a/modules/services/mpd.nix +++ b/modules/services/mpd.nix @@ -171,10 +171,17 @@ in { ]; systemd.user.services.mpd = { - Unit = { - After = [ "network.target" "sound.target" ]; - Description = "Music Player Daemon"; - }; + Unit = mkMerge [ + { + Description = "Music Player Daemon"; + After = [ "network.target" "sound.target" ]; + } + + (mkIf cfg.network.startWhenNeeded { + Requires = [ "mpd.socket" ]; + After = [ "mpd.socket" ]; + }) + ]; Install = mkIf (!cfg.network.startWhenNeeded) { WantedBy = [ "default.target" ]; diff --git a/tests/modules/services/mpd/default.nix b/tests/modules/services/mpd/default.nix index d2fd2a29..f7919b22 100644 --- a/tests/modules/services/mpd/default.nix +++ b/tests/modules/services/mpd/default.nix @@ -1,5 +1,6 @@ { mpd-basic-configuration = ./basic-configuration.nix; mpd-before-state-version-22_11 = ./before-state-version-22_11.nix; + mpd-start-when-needed = ./start-when-needed.nix; mpd-xdg-music-dir = ./xdg-music-dir.nix; } diff --git a/tests/modules/services/mpd/start-when-needed.nix b/tests/modules/services/mpd/start-when-needed.nix new file mode 100644 index 00000000..31017c9e --- /dev/null +++ b/tests/modules/services/mpd/start-when-needed.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + services.mpd = { + enable = true; + musicDirectory = "/my/music/dir"; + extraArgs = [ "--verbose" ]; + network.startWhenNeeded = true; + }; + + home.stateVersion = "22.11"; + + test.stubs.mpd = { }; + + nmt.script = '' + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/mpd.service) + assertFileContent "$serviceFile" ${./start-when-needed.service} + + socketFile=home-files/.config/systemd/user/mpd.socket + assertFileContent "$socketFile" ${./start-when-needed.socket} + + confFile=$(grep -o \ + '/nix/store/.*-mpd.conf' \ + $TESTED/home-files/.config/systemd/user/mpd.service) + assertFileContent "$confFile" ${./basic-configuration.conf} + ''; +} diff --git a/tests/modules/services/mpd/start-when-needed.service b/tests/modules/services/mpd/start-when-needed.service new file mode 100644 index 00000000..87eb4b79 --- /dev/null +++ b/tests/modules/services/mpd/start-when-needed.service @@ -0,0 +1,12 @@ +[Service] +Environment=PATH=/home/hm-user/.nix-profile/bin +ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf '--verbose' +ExecStartPre=/nix/store/00000000000000000000000000000000-bash/bin/bash -c "/nix/store/00000000000000000000000000000000-coreutils/bin/mkdir -p '/home/hm-user/.local/share/mpd' '/home/hm-user/.local/share/mpd/playlists'" +Type=notify + +[Unit] +After=network.target +After=sound.target +After=mpd.socket +Description=Music Player Daemon +Requires=mpd.socket diff --git a/tests/modules/services/mpd/start-when-needed.socket b/tests/modules/services/mpd/start-when-needed.socket new file mode 100644 index 00000000..b5687b11 --- /dev/null +++ b/tests/modules/services/mpd/start-when-needed.socket @@ -0,0 +1,8 @@ +[Install] +WantedBy=sockets.target + +[Socket] +Backlog=5 +KeepAlive=true +ListenStream=127.0.0.1:6600 +ListenStream=%t/mpd/socket From c23060ce95c4856157789b0636e1b6206be335c4 Mon Sep 17 00:00:00 2001 From: TheRealGramdalf <79593869+TheRealGramdalf@users.noreply.github.com> Date: Thu, 4 Jul 2024 23:07:22 +0000 Subject: [PATCH 80/96] hyprland: emphasize usage of the NixOS module --- modules/services/window-managers/hyprland.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 8fbdc6b7..73602ec6 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -40,7 +40,21 @@ in { ]; options.wayland.windowManager.hyprland = { - enable = lib.mkEnableOption "Hyprland wayland compositor"; + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Whether to enable configuration for Hyprland, a tiling Wayland + compositor that doesn't sacrifice on its looks. + + ::: {.note} + This module configures Hyprland and adds it to your user's {env}`PATH`, + but does not make certain system-level changes. NixOS users should + enable the NixOS module with {option}`programs.hyprland.enable`, which + makes system-level changes such as adding a desktop session entry. + ::: + ''; + }; package = lib.mkPackageOption pkgs "hyprland" { }; From 6ea6fafa3e0f1691ec1555ce4281d7d993546131 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Thu, 4 Jul 2024 17:09:47 -0600 Subject: [PATCH 81/96] mpv: remove tadeokondrak as maintainer --- modules/programs/mpv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/mpv.nix b/modules/programs/mpv.nix index 30f2a8e0..f2664e71 100644 --- a/modules/programs/mpv.nix +++ b/modules/programs/mpv.nix @@ -229,5 +229,5 @@ in { } ]); - meta.maintainers = with maintainers; [ tadeokondrak thiagokokada chuangzhu ]; + meta.maintainers = with maintainers; [ thiagokokada chuangzhu ]; } From c514e862cd5705e51edb6fe8d01146fdeec661f2 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 5 Jul 2024 01:18:45 +0200 Subject: [PATCH 82/96] treewide: fix eval after Nixpkgs maintainer changes --- modules/lib/maintainers.nix | 14 ++++++++++++++ modules/programs/gh-dash.nix | 2 +- modules/programs/hyfetch.nix | 2 +- modules/programs/script-directory.nix | 2 +- modules/services/cliphist.nix | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index 1063f53a..f1a81815 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -113,6 +113,13 @@ github = "jack5079"; githubId = 29169102; }; + janik = { + name = "Janik"; + email = "janik@aq0.de"; + matrix = "@janik0:matrix.org"; + github = "Janik-Haag"; + githubId = 80165193; + }; jkarlson = { email = "jekarlson@gmail.com"; github = "jkarlson"; @@ -214,6 +221,13 @@ github = "lheckemann"; githubId = 341954; }; + lilyinstarlight = { + email = "lily@lily.flowers"; + matrix = "@lily:lily.flowers"; + github = "lilyinstarlight"; + githubId = 298109; + name = "Lily Foster"; + }; loicreynier = { name = "Loïc Reynier"; email = "loic@loireynier.fr"; diff --git a/modules/programs/gh-dash.nix b/modules/programs/gh-dash.nix index 69d5482b..b351bb33 100644 --- a/modules/programs/gh-dash.nix +++ b/modules/programs/gh-dash.nix @@ -7,7 +7,7 @@ let yamlFormat = pkgs.formats.yaml { }; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.programs.gh-dash = { enable = lib.mkEnableOption "GitHub CLI dashboard plugin"; diff --git a/modules/programs/hyfetch.nix b/modules/programs/hyfetch.nix index 726bc94e..485ceb04 100644 --- a/modules/programs/hyfetch.nix +++ b/modules/programs/hyfetch.nix @@ -7,7 +7,7 @@ let jsonFormat = pkgs.formats.json { }; in { - meta.maintainers = [ maintainers.lilyinstarlight ]; + meta.maintainers = [ hm.maintainers.lilyinstarlight ]; options.programs.hyfetch = { enable = mkEnableOption "hyfetch"; diff --git a/modules/programs/script-directory.nix b/modules/programs/script-directory.nix index 9f5abf65..bd6b3b40 100644 --- a/modules/programs/script-directory.nix +++ b/modules/programs/script-directory.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: let cfg = config.programs.script-directory; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.programs.script-directory = { enable = lib.mkEnableOption "script-directory"; diff --git a/modules/services/cliphist.nix b/modules/services/cliphist.nix index 3599557f..1877a6de 100644 --- a/modules/services/cliphist.nix +++ b/modules/services/cliphist.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.services.cliphist; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.services.cliphist = { enable = From bbe6e94737289c8cb92d4d8f9199fbfe4f11c0ba Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:12:00 +0200 Subject: [PATCH 83/96] dunst: fix warning for lib.cartesianProductOfSets "lib.cartesianProductOfSets is a deprecated alias of lib.cartesianProduct." Rename happened in nixpkgs commit `228621e42dc43f936b66e0ed042c90c511aa0535`. --- modules/services/dunst.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index daa800cf..bd8c4adf 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -172,7 +172,7 @@ in { mkPath = { basePath, theme, category }: "${basePath}/share/icons/${theme.name}/${theme.size}/${category}"; - in concatMapStringsSep ":" mkPath (cartesianProductOfSets { + in concatMapStringsSep ":" mkPath (cartesianProduct { basePath = basePaths; theme = themes; category = categories; From b7b55e285cfc92e84f243012516bbc414691b747 Mon Sep 17 00:00:00 2001 From: novenary Date: Thu, 7 Mar 2024 17:48:31 +0200 Subject: [PATCH 84/96] sway: stop sway-session.target on exit This ensures graphical-session.target is properly cycled, and that all of its members are restarted on consecutive runs. --- modules/services/window-managers/i3-sway/sway.nix | 6 +++++- .../window-managers/sway/sway-bar-focused-colors.conf | 2 +- .../sway/sway-bindkeys-to-code-and-extra-config.conf | 2 +- .../modules/services/window-managers/sway/sway-default.conf | 2 +- .../window-managers/sway/sway-followmouse-expected.conf | 2 +- .../sway/sway-followmouse-legacy-expected.conf | 2 +- .../modules/services/window-managers/sway/sway-modules.conf | 2 +- .../services/window-managers/sway/sway-null-package.conf | 2 +- .../services/window-managers/sway/sway-post-2003.conf | 2 +- .../window-managers/sway/sway-systemd-variables.conf | 2 +- .../sway/sway-workspace-default-expected.conf | 2 +- .../sway/sway-workspace-output-expected.conf | 2 +- 12 files changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index cd1b27fe..c2fca366 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -411,7 +411,11 @@ in { extraCommands = mkOption { type = types.listOf types.str; - default = [ "systemctl --user start sway-session.target" ]; + default = [ + "systemctl --user start sway-session.target" + "swaymsg -mt subscribe '[]' || true" + "systemctl --user stop sway-session.target" + ]; description = '' Extra commands to run after D-Bus activation. ''; diff --git a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf index 448c41f4..841bdca9 100644 --- a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf +++ b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf @@ -108,4 +108,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf index d11f6f2b..b6bf9595 100644 --- a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf +++ b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf @@ -107,5 +107,5 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" exec_always pkill flashfocus; flasfocus & diff --git a/tests/modules/services/window-managers/sway/sway-default.conf b/tests/modules/services/window-managers/sway/sway-default.conf index 71a0b13f..a37e9160 100644 --- a/tests/modules/services/window-managers/sway/sway-default.conf +++ b/tests/modules/services/window-managers/sway/sway-default.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf index af259fac..5345f8f8 100644 --- a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf @@ -83,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf index 1fd0003f..590dc8aa 100644 --- a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf @@ -83,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-modules.conf b/tests/modules/services/window-managers/sway/sway-modules.conf index 766d61de..d11691e3 100644 --- a/tests/modules/services/window-managers/sway/sway-modules.conf +++ b/tests/modules/services/window-managers/sway/sway-modules.conf @@ -117,4 +117,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-null-package.conf b/tests/modules/services/window-managers/sway/sway-null-package.conf index 67073371..2066fcd2 100644 --- a/tests/modules/services/window-managers/sway/sway-null-package.conf +++ b/tests/modules/services/window-managers/sway/sway-null-package.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-post-2003.conf b/tests/modules/services/window-managers/sway/sway-post-2003.conf index 67073371..2066fcd2 100644 --- a/tests/modules/services/window-managers/sway/sway-post-2003.conf +++ b/tests/modules/services/window-managers/sway/sway-post-2003.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf index 1cbb92c3..2482ed45 100644 --- a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf +++ b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf index 5233c0bb..18dd31d2 100644 --- a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf @@ -104,4 +104,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf index 32dfd734..4fb7685c 100644 --- a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf @@ -110,4 +110,4 @@ workspace "ABC" output "DP" workspace "3: Test" output "HDMI" workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI" workspace "Multiple" output "DVI" "HDMI" "DP" -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" From e3582e5151498bc4d757e8361431ace8529e7bb7 Mon Sep 17 00:00:00 2001 From: novenary Date: Thu, 7 Mar 2024 18:57:22 +0200 Subject: [PATCH 85/96] sway: unfail units before starting session target Sometimes services can fail. Failed services will generally not be restarted by systemd. To start previously failed services we can just reset their failed state before starting our session target. GNOME and Plasma do the same thing. See: https://github.com/alebastr/sway-systemd/pull/11 --- modules/services/window-managers/i3-sway/sway.nix | 1 + .../services/window-managers/sway/sway-bar-focused-colors.conf | 2 +- .../sway/sway-bindkeys-to-code-and-extra-config.conf | 2 +- tests/modules/services/window-managers/sway/sway-default.conf | 2 +- .../window-managers/sway/sway-followmouse-expected.conf | 2 +- .../window-managers/sway/sway-followmouse-legacy-expected.conf | 2 +- tests/modules/services/window-managers/sway/sway-modules.conf | 2 +- .../services/window-managers/sway/sway-null-package.conf | 2 +- tests/modules/services/window-managers/sway/sway-post-2003.conf | 2 +- .../services/window-managers/sway/sway-systemd-variables.conf | 2 +- .../window-managers/sway/sway-workspace-default-expected.conf | 2 +- .../window-managers/sway/sway-workspace-output-expected.conf | 2 +- 12 files changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index c2fca366..f4e43721 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -412,6 +412,7 @@ in { extraCommands = mkOption { type = types.listOf types.str; default = [ + "systemctl --user reset-failed" "systemctl --user start sway-session.target" "swaymsg -mt subscribe '[]' || true" "systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf index 841bdca9..10019319 100644 --- a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf +++ b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf @@ -108,4 +108,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf index b6bf9595..28513fcd 100644 --- a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf +++ b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf @@ -107,5 +107,5 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" exec_always pkill flashfocus; flasfocus & diff --git a/tests/modules/services/window-managers/sway/sway-default.conf b/tests/modules/services/window-managers/sway/sway-default.conf index a37e9160..cefe4e0a 100644 --- a/tests/modules/services/window-managers/sway/sway-default.conf +++ b/tests/modules/services/window-managers/sway/sway-default.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf index 5345f8f8..f4f60ddf 100644 --- a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf @@ -83,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf index 590dc8aa..c10dbd90 100644 --- a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf @@ -83,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-modules.conf b/tests/modules/services/window-managers/sway/sway-modules.conf index d11691e3..d0302d07 100644 --- a/tests/modules/services/window-managers/sway/sway-modules.conf +++ b/tests/modules/services/window-managers/sway/sway-modules.conf @@ -117,4 +117,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-null-package.conf b/tests/modules/services/window-managers/sway/sway-null-package.conf index 2066fcd2..9df934b2 100644 --- a/tests/modules/services/window-managers/sway/sway-null-package.conf +++ b/tests/modules/services/window-managers/sway/sway-null-package.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-post-2003.conf b/tests/modules/services/window-managers/sway/sway-post-2003.conf index 2066fcd2..9df934b2 100644 --- a/tests/modules/services/window-managers/sway/sway-post-2003.conf +++ b/tests/modules/services/window-managers/sway/sway-post-2003.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf index 2482ed45..3710c539 100644 --- a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf +++ b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf @@ -105,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf index 18dd31d2..4fe87282 100644 --- a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf @@ -104,4 +104,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" diff --git a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf index 4fb7685c..7148d003 100644 --- a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf +++ b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf @@ -110,4 +110,4 @@ workspace "ABC" output "DP" workspace "3: Test" output "HDMI" workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI" workspace "Multiple" output "DVI" "HDMI" "DP" -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target" From 10486e6b311b3c5ae1c3477fee058704cea7cb4a Mon Sep 17 00:00:00 2001 From: Bojun Ren Date: Sun, 7 Jul 2024 02:08:39 +0800 Subject: [PATCH 86/96] starship: fix type of settings to allow all valid value Previously, type check of `programs.starship.settings` fails for some valid settings, such as `c.commands = [["cc" "--version"]]`. The commit fix the `type` argument passed to `mkOption`, so `programs.starship.settings` can accept all valid values (of toml type). --- modules/programs/starship.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index f253fa7f..9ccff7fc 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -24,14 +24,7 @@ in { }; settings = mkOption { - type = with types; - let - prim = either bool (either int str); - primOrPrimAttrs = either prim (attrsOf prim); - entry = either prim (listOf primOrPrimAttrs); - entryOrAttrsOf = t: either entry (attrsOf t); - entries = entryOrAttrsOf (entryOrAttrsOf entry); - in attrsOf entries // { description = "Starship configuration"; }; + type = tomlFormat.type; default = { }; example = literalExpression '' { From 6b7ce96f34b324e4e104abc30d06955d216bac71 Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Sun, 7 Jul 2024 06:49:29 +0200 Subject: [PATCH 87/96] Translate using Weblate (Hungarian) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 43.2% (16 of 37 strings) Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/hu/ Translation: Home Manager/Home Manager CLI Co-authored-by: Ferenci Ákos --- home-manager/po/hu.po | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/home-manager/po/hu.po b/home-manager/po/hu.po index 88ad1d78..a127cf1b 100644 --- a/home-manager/po/hu.po +++ b/home-manager/po/hu.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" "POT-Creation-Date: 2024-04-17 23:19+0200\n" -"PO-Revision-Date: 2024-06-14 20:40+0000\n" -"Last-Translator: Balint Barna Kovari \n" +"PO-Revision-Date: 2024-07-05 14:09+0000\n" +"Last-Translator: Ferenci Ákos \n" "Language-Team: Hungarian \n" "Language: hu\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6-dev\n" +"X-Generator: Weblate 5.7-dev\n" #. translators: For example: "home-manager: missing argument for --cores" #: home-manager/home-manager:16 @@ -36,14 +36,17 @@ msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"A Home Manager %s %s elérési úton való tárolása elavult. Kérem helyezze át a " +"%s elérési úthoz" #: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "" +"Nem található konfigurációs fájl. Kérem hozza létre a fájlt a %s elérési úton" #: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager nem található a %s elérési úton." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:115 @@ -90,23 +93,23 @@ msgstr "" #: home-manager/home-manager:296 home-manager/home-manager:319 #: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" -msgstr "" +msgstr "%s: ismeretlen opció '%s'" #: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" -msgstr "" +msgstr "Futtasa a '%s --help' parancsot a használattal kapcsolatos segítségért" #: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "A fájl %s már létezik és változatlan marad..." #: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." -msgstr "" +msgstr "%s létrehozása..." #: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "Kezdeti Home Manager generáció létrehozása..." #. translators: The "%s" specifier will be replaced by a file path. #: home-manager/home-manager:480 @@ -132,7 +135,7 @@ msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. #: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "Flake konfiguráció nem példányosítható" #: home-manager/home-manager:572 msgid "" @@ -155,7 +158,7 @@ msgstr "" #: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" -msgstr "" +msgstr "Build futtatása nem lehetséges csak-olvasható könyvtárban" #: home-manager/home-manager:693 msgid "No generation with ID %s" @@ -167,7 +170,7 @@ msgstr "" #: home-manager/home-manager:697 msgid "Removing generation %s" -msgstr "" +msgstr "%s generáció eltávolítása" #: home-manager/home-manager:718 msgid "No generations to expire" @@ -179,7 +182,7 @@ msgstr "" #: home-manager/home-manager:811 msgid "Unknown argument %s" -msgstr "" +msgstr "Ismeretlen argumentum %s" #: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." @@ -199,7 +202,7 @@ msgstr "" #: home-manager/home-manager:863 msgid "Yay!" -msgstr "" +msgstr "Hurrá!" #: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." @@ -211,7 +214,7 @@ msgstr "" #: home-manager/home-manager:1113 msgid "Unknown command: %s" -msgstr "" +msgstr "Ismeretlen parancs: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." From dfaf0ff2e7e536e404a260845e436bd888c4bb5f Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 8 Jul 2024 22:33:29 +0200 Subject: [PATCH 88/96] systemd: only set old units directory when available --- modules/systemd.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/systemd.nix b/modules/systemd.nix index 1d96ec8d..d480a1e4 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -335,7 +335,7 @@ in { in '' ${pkgs.sd-switch}/bin/sd-switch \ ''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \ - ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \ + ''${oldUnitsDir:+--old-units $oldUnitsDir} \ --new-units "$newUnitsDir" ''; }; @@ -354,6 +354,13 @@ in { warnEcho "Attempting to reload services anyway..." fi + if [[ -v oldGenPath ]]; then + oldUnitsDir="$oldGenPath/home-files/.config/systemd/user" + if [[ ! -e $oldUnitsDir ]]; then + oldUnitsDir= + fi + fi + newUnitsDir="$newGenPath/home-files/.config/systemd/user" if [[ ! -e $newUnitsDir ]]; then newUnitsDir=${pkgs.emptyDirectory} @@ -362,7 +369,7 @@ in { ${ensureRuntimeDir} \ ${getAttr cfg.startServices cmd} - unset newUnitsDir + unset newUnitsDir oldUnitsDir else echo "User systemd daemon not running. Skipping reload." fi From 2fb5c1e0a17bc6059fa09dc411a43d75f35bb192 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 7 Jul 2024 23:13:28 +0200 Subject: [PATCH 89/96] tests: update to match new sd-switch version Also, seems Nix has become more memory hungry so increase memory allocation. --- tests/integration/nixos/basics.nix | 2 ++ tests/integration/standalone/flake-basics.nix | 4 ++-- tests/integration/standalone/standard-basics.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/nixos/basics.nix b/tests/integration/nixos/basics.nix index 001623ca..43f537c7 100644 --- a/tests/integration/nixos/basics.nix +++ b/tests/integration/nixos/basics.nix @@ -7,6 +7,8 @@ nodes.machine = { ... }: { imports = [ ../../../nixos ]; # Import the HM NixOS module. + virtualisation.memorySize = 2048; + users.users.alice = { isNormalUser = true; description = "Alice Foobar"; diff --git a/tests/integration/standalone/flake-basics.nix b/tests/integration/standalone/flake-basics.nix index 8f9627d9..9638862f 100644 --- a/tests/integration/standalone/flake-basics.nix +++ b/tests/integration/standalone/flake-basics.nix @@ -6,7 +6,7 @@ nodes.machine = { ... }: { imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ]; - virtualisation.memorySize = 2048; + virtualisation.memorySize = 3072; nix = { registry.home-manager.to = { type = "path"; @@ -88,7 +88,7 @@ } /home/alice/.config/home-manager/home.nix") actual = succeed_as_alice("home-manager switch") - expected = "Started pueued.service - active" + expected = "Starting units: pueued.service" assert expected in actual, \ f"expected home-manager switch to contain {expected}, but got {actual}" diff --git a/tests/integration/standalone/standard-basics.nix b/tests/integration/standalone/standard-basics.nix index d4cac249..b994ff37 100644 --- a/tests/integration/standalone/standard-basics.nix +++ b/tests/integration/standalone/standard-basics.nix @@ -85,7 +85,7 @@ } /home/alice/.config/home-manager/home.nix") actual = succeed_as_alice("home-manager switch") - expected = "Started pueued.service - active" + expected = "Starting units: pueued.service" assert expected in actual, \ f"expected home-manager switch to contain {expected}, but got {actual}" From f749fabeccb1587e4c1562e4f818cf33b8f77a51 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 10 Jul 2024 11:54:49 +0000 Subject: [PATCH 90/96] atuin: use 'lib.getExe' --- modules/programs/atuin.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index bd907ac0..a27bcf86 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -110,18 +110,18 @@ in { programs.bash.initExtra = mkIf cfg.enableBashIntegration '' if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh" - eval "$(${cfg.package}/bin/atuin init bash ${flagsStr})" + eval "$(${lib.getExe cfg.package} init bash ${flagsStr})" fi ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' if [[ $options[zle] = on ]]; then - eval "$(${cfg.package}/bin/atuin init zsh ${flagsStr})" + eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})" fi ''; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - ${cfg.package}/bin/atuin init fish ${flagsStr} | source + ${lib.getExe cfg.package} init fish ${flagsStr} | source ''; programs.nushell = mkIf cfg.enableNushellIntegration { @@ -130,7 +130,9 @@ in { if not ($atuin_cache | path exists) { mkdir $atuin_cache } - ${cfg.package}/bin/atuin init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu + ${ + lib.getExe cfg.package + } init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu ''; extraConfig = '' source ${config.xdg.cacheHome}/atuin/init.nu From f79d950ac23a4c63e60bb71475d3321fbd9ace2d Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 10 Jul 2024 23:11:15 +0200 Subject: [PATCH 91/96] atuin: fix tests --- tests/modules/programs/atuin/bash.nix | 2 +- tests/modules/programs/atuin/empty-settings.nix | 2 +- tests/modules/programs/atuin/example-settings.nix | 2 +- tests/modules/programs/atuin/fish.nix | 2 +- tests/modules/programs/atuin/no-shell.nix | 2 +- tests/modules/programs/atuin/set-flags.nix | 2 +- tests/modules/programs/atuin/zsh.nix | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/modules/programs/atuin/bash.nix b/tests/modules/programs/atuin/bash.nix index a84ea99e..21d306b2 100644 --- a/tests/modules/programs/atuin/bash.nix +++ b/tests/modules/programs/atuin/bash.nix @@ -10,7 +10,7 @@ }; test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/empty-settings.nix b/tests/modules/programs/atuin/empty-settings.nix index 58f12696..be6b5598 100644 --- a/tests/modules/programs/atuin/empty-settings.nix +++ b/tests/modules/programs/atuin/empty-settings.nix @@ -4,7 +4,7 @@ programs.atuin.enable = true; test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/example-settings.nix b/tests/modules/programs/atuin/example-settings.nix index f2d3a887..98aca707 100644 --- a/tests/modules/programs/atuin/example-settings.nix +++ b/tests/modules/programs/atuin/example-settings.nix @@ -13,7 +13,7 @@ }; test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/fish.nix b/tests/modules/programs/atuin/fish.nix index ae3122cf..49d9a282 100644 --- a/tests/modules/programs/atuin/fish.nix +++ b/tests/modules/programs/atuin/fish.nix @@ -11,7 +11,7 @@ lib.mkForce (builtins.toFile "empty" ""); test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/no-shell.nix b/tests/modules/programs/atuin/no-shell.nix index 381bcc0c..c6481e42 100644 --- a/tests/modules/programs/atuin/no-shell.nix +++ b/tests/modules/programs/atuin/no-shell.nix @@ -18,7 +18,7 @@ lib.mkForce (builtins.toFile "empty" ""); test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/set-flags.nix b/tests/modules/programs/atuin/set-flags.nix index 7e3a7982..b6e8330d 100644 --- a/tests/modules/programs/atuin/set-flags.nix +++ b/tests/modules/programs/atuin/set-flags.nix @@ -17,7 +17,7 @@ lib.mkForce (builtins.toFile "empty" ""); test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; diff --git a/tests/modules/programs/atuin/zsh.nix b/tests/modules/programs/atuin/zsh.nix index 14adddca..2cb4fefe 100644 --- a/tests/modules/programs/atuin/zsh.nix +++ b/tests/modules/programs/atuin/zsh.nix @@ -7,7 +7,7 @@ }; test.stubs = { - atuin = { }; + atuin = { name = "atuin"; }; bash-preexec = { }; }; From 57d85c6c6d625c45bbf848ed77fbdb5794aa8414 Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Thu, 11 Jul 2024 05:13:46 +0800 Subject: [PATCH 92/96] xdg-desktop-entries: allow `terminal` to be null --- modules/misc/xdg-desktop-entries.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/misc/xdg-desktop-entries.nix b/modules/misc/xdg-desktop-entries.nix index 7ec7fa56..1aab6ffe 100644 --- a/modules/misc/xdg-desktop-entries.nix +++ b/modules/misc/xdg-desktop-entries.nix @@ -51,7 +51,7 @@ let terminal = mkOption { description = "Whether the program runs in a terminal window."; - type = types.bool; + type = types.nullOr types.bool; default = false; }; From c085b984ff2808bf322f375b10fea5a415a9c43d Mon Sep 17 00:00:00 2001 From: Johann Date: Sat, 6 Jul 2024 11:39:39 +0200 Subject: [PATCH 93/96] gnome-keyring: update package `pkgs.gnome.gnome-keyring` has been moved to `pkgs.gnome-keyring` In nixpgkgs-unstable --- modules/services/gnome-keyring.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/gnome-keyring.nix b/modules/services/gnome-keyring.nix index 460e4abd..2cfa33d0 100644 --- a/modules/services/gnome-keyring.nix +++ b/modules/services/gnome-keyring.nix @@ -49,7 +49,7 @@ in { args = concatStringsSep " " ([ "--start" "--foreground" ] ++ optional (cfg.components != [ ]) ("--components=" + concatStringsSep "," cfg.components)); - in "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon ${args}"; + in "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon ${args}"; Restart = "on-abort"; }; From 90ae324e2c56af10f20549ab72014804a3064c7f Mon Sep 17 00:00:00 2001 From: Chris Hodapp <108633+clhodapp@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:48:33 -0700 Subject: [PATCH 94/96] sd-switch: respect xdg directory specifications --- modules/systemd.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/systemd.nix b/modules/systemd.nix index d480a1e4..717a5922 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -100,6 +100,8 @@ let settingsFormat.generate "user.conf" cfg.settings; }; + configHome = lib.removePrefix config.home.homeDirectory config.xdg.configHome; + in { meta.maintainers = [ lib.maintainers.rycee ]; @@ -355,13 +357,13 @@ in { fi if [[ -v oldGenPath ]]; then - oldUnitsDir="$oldGenPath/home-files/.config/systemd/user" + oldUnitsDir="$oldGenPath/home-files${configHome}/systemd/user" if [[ ! -e $oldUnitsDir ]]; then oldUnitsDir= fi fi - newUnitsDir="$newGenPath/home-files/.config/systemd/user" + newUnitsDir="$newGenPath/home-files${configHome}/systemd/user" if [[ ! -e $newUnitsDir ]]; then newUnitsDir=${pkgs.emptyDirectory} fi From a38f88045e464c7ad5686e8d5fdaac39d3360e5b Mon Sep 17 00:00:00 2001 From: "O. C. Taskin" <42993892+octvs@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:17:37 +0200 Subject: [PATCH 95/96] khard: add option to contact module for khard dir Add an extra option, accounts.contact.accounts..khard.defaultCollection to hardcode a subdirectory for khard to function as intended. Khard expects to be given a collection directory directly, from which there can be multiple of in a vdir. This contrasts khal or vdirsyncer which support recursive search. Fixes #4531 --- modules/programs/khard.nix | 15 +++++++++++-- tests/modules/programs/khard/default.nix | 1 + tests/modules/programs/khard/dirty_path.nix | 22 +++++++++++++++++++ .../programs/khard/dirty_path_expected | 8 +++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tests/modules/programs/khard/dirty_path.nix create mode 100644 tests/modules/programs/khard/dirty_path_expected diff --git a/modules/programs/khard.nix b/modules/programs/khard.nix index a3e73fb0..cbd8c1f0 100644 --- a/modules/programs/khard.nix +++ b/modules/programs/khard.nix @@ -68,6 +68,11 @@ in { type = with lib.types; attrsOf (submodule { options.khard.enable = lib.mkEnableOption "khard access"; + options.khard.defaultCollection = lib.mkOption { + type = types.str; + default = ""; + description = "VCARD collection to be searched by khard."; + }; }); }; }; @@ -75,11 +80,17 @@ in { config = lib.mkIf cfg.enable { home.packages = [ pkgs.khard ]; - xdg.configFile."khard/khard.conf".text = '' + xdg.configFile."khard/khard.conf".text = let + makePath = anAccount: + builtins.toString (/. + lib.concatStringsSep "/" [ + anAccount.local.path + anAccount.khard.defaultCollection + ]); + in '' [addressbooks] ${lib.concatMapStringsSep "\n" (acc: '' [[${acc.name}]] - path = ${acc.local.path} + path = ${makePath acc} '') (lib.attrValues accounts)} ${renderSettings cfg.settings} diff --git a/tests/modules/programs/khard/default.nix b/tests/modules/programs/khard/default.nix index 3762dc0f..58b7a6f7 100644 --- a/tests/modules/programs/khard/default.nix +++ b/tests/modules/programs/khard/default.nix @@ -2,4 +2,5 @@ khard_empty_config = ./empty_config.nix; khard_basic_config = ./basic_config.nix; khard_multiple_accounts = ./multiple_accounts.nix; + khard_dirty_path = ./dirty_path.nix; } diff --git a/tests/modules/programs/khard/dirty_path.nix b/tests/modules/programs/khard/dirty_path.nix new file mode 100644 index 00000000..07396a14 --- /dev/null +++ b/tests/modules/programs/khard/dirty_path.nix @@ -0,0 +1,22 @@ +{ + accounts.contact = { + basePath = "/home/user/who/likes///"; + accounts.forward = { + local.type = "filesystem"; + khard = { + enable = true; + defaultCollection = "////slashes//a/lot"; + }; + }; + }; + + programs.khard.enable = true; + + test.stubs.khard = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/khard/khard.conf \ + ${./dirty_path_expected} + ''; +} diff --git a/tests/modules/programs/khard/dirty_path_expected b/tests/modules/programs/khard/dirty_path_expected new file mode 100644 index 00000000..8b7bb63e --- /dev/null +++ b/tests/modules/programs/khard/dirty_path_expected @@ -0,0 +1,8 @@ +[addressbooks] +[[forward]] +path = /home/user/who/likes/forward/slashes/a/lot + + +[general] +default_action=list + From afd2021bedff2de92dfce0e257a3d03ae65c603d Mon Sep 17 00:00:00 2001 From: "O. C. Taskin" <42993892+octvs@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:19:18 +0200 Subject: [PATCH 96/96] papis: add `program.papis.package` option Add `programs.papis.package` option to override default package used. This can be useful to track latest rev from repository via a flake. --- modules/programs/papis.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/programs/papis.nix b/modules/programs/papis.nix index b110172d..837bfc27 100644 --- a/modules/programs/papis.nix +++ b/modules/programs/papis.nix @@ -19,6 +19,8 @@ in { options.programs.papis = { enable = mkEnableOption "papis"; + package = mkPackageOption pkgs "papis" { }; + settings = mkOption { type = with types; attrsOf (oneOf [ bool int str ]); default = { }; @@ -84,7 +86,7 @@ in { (", namely " + concatStringsSep "," defaultLibraries); }]; - home.packages = [ pkgs.papis ]; + home.packages = [ cfg.package ]; xdg.configFile."papis/config" = mkIf (cfg.libraries != { }) { text = generators.toINI { } settingsIni; };