diff --git a/third_party/home-manager/.editorconfig b/third_party/home-manager/.editorconfig new file mode 100644 index 0000000000..a41f0862b8 --- /dev/null +++ b/third_party/home-manager/.editorconfig @@ -0,0 +1,21 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# The JSON files contain newlines inconsistently +[*.json] +insert_final_newline = ignore + +# Makefiles always use tabs for indentation +[Makefile] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false diff --git a/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md b/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md index af3efeaf70..11b8324c19 100644 --- a/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md +++ b/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md @@ -15,7 +15,7 @@ pull-request. Also make sure to read the guidelines found at - https://github.com/nix-community/home-manager/blob/master/docs/contributing.adoc#sec-guidelines + https://nix-community.github.io/home-manager/#sec-guidelines --> @@ -35,7 +35,7 @@ Also make sure to read the guidelines found at {long description} ``` - See [CONTRIBUTING](https://github.com/nix-community/home-manager/blob/master/docs/contributing.adoc#sec-commit-style) for more information and [recent commit messages](https://github.com/nix-community/home-manager/commits/master) for examples. + See [CONTRIBUTING](https://nix-community.github.io/home-manager/#sec-commit-style) for more information and [recent commit messages](https://github.com/nix-community/home-manager/commits/master) for examples. - If this PR adds a new module diff --git a/third_party/home-manager/.github/dependabot.yml b/third_party/home-manager/.github/dependabot.yml index 97d69dea1c..76b9adfa72 100644 --- a/third_party/home-manager/.github/dependabot.yml +++ b/third_party/home-manager/.github/dependabot.yml @@ -15,3 +15,11 @@ updates: interval: "weekly" commit-message: prefix: "ci:" + + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "release-23.11" + schedule: + interval: "weekly" + commit-message: + prefix: "ci:" diff --git a/third_party/home-manager/.github/workflows/github_pages.yml b/third_party/home-manager/.github/workflows/github_pages.yml index e9674468e0..238cb8436d 100644 --- a/third_party/home-manager/.github/workflows/github_pages.yml +++ b/third_party/home-manager/.github/workflows/github_pages.yml @@ -10,11 +10,11 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v12 + - uses: cachix/cachix-action@v13 with: name: nix-community authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' diff --git a/third_party/home-manager/.github/workflows/test.yml b/third_party/home-manager/.github/workflows/test.yml index 81364fc132..701a04c8b1 100644 --- a/third_party/home-manager/.github/workflows/test.yml +++ b/third_party/home-manager/.github/workflows/test.yml @@ -11,11 +11,11 @@ jobs: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v12 + - uses: cachix/cachix-action@v13 with: name: nix-community authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' diff --git a/third_party/home-manager/.github/workflows/update-flake.yml b/third_party/home-manager/.github/workflows/update-flake.yml index 3a6459a221..2f1eb8c658 100644 --- a/third_party/home-manager/.github/workflows/update-flake.yml +++ b/third_party/home-manager/.github/workflows/update-flake.yml @@ -10,11 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v22 + uses: cachix/install-nix-action@v23 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v19 + uses: DeterminateSystems/update-flake-lock@v20 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies diff --git a/third_party/home-manager/.release b/third_party/home-manager/.release deleted file mode 100644 index 38549cd856..0000000000 --- a/third_party/home-manager/.release +++ /dev/null @@ -1 +0,0 @@ -23.11 diff --git a/third_party/home-manager/README.md b/third_party/home-manager/README.md index 78ba76516b..805d2cfcca 100644 --- a/third_party/home-manager/README.md +++ b/third_party/home-manager/README.md @@ -1,112 +1,109 @@ Home Manager using Nix ====================== -This project provides a basic system for managing a user environment -using the [Nix][] package manager together with the Nix libraries -found in [Nixpkgs][]. It allows declarative configuration of user -specific (non global) packages and dotfiles. +This project provides a basic system for managing a user environment using the +[Nix][] package manager together with the Nix libraries found in [Nixpkgs][]. It +allows declarative configuration of user specific (non-global) packages and +dotfiles. Usage ----- -Before attempting to use Home Manager please read the warning below. +Before attempting to use Home Manager please read [the warning +below](#words-of-warning). -For a systematic overview of Home Manager and its available options, -please see +For a systematic overview of Home Manager and its available options, please see: -- the [Home Manager manual][manual], -- the [Home Manager configuration options][configuration options], and -- the 3rd party [Home Manager option search](https://mipmip.github.io/home-manager-option-search/). +- [Home Manager manual][manual] +- [Home Manager configuration options][configuration options] +- [3rd party Home Manager option + search](https://mipmip.github.io/home-manager-option-search/) -If you would like to contribute to Home Manager -then please have a look at the [contributing][] chapter of the manual. +If you would like to contribute to Home Manager, then please have a look at +["Contributing" in the manual][contributing]. 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.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. +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 +fixes, but usually not new modules. If you need a module to be backported, then +feel free to open an issue. Words of warning ---------------- -Unfortunately, it is quite possible to get difficult to understand -errors when working with Home Manager. You should therefore be -comfortable using the Nix language and the various tools in the Nix -ecosystem. +Unfortunately, it is quite possible to get difficult to understand errors when +working with Home Manager. You should therefore be comfortable using the [Nix][] +language and the various tools in the Nix ecosystem. -If you are not very familiar with Nix but still want to use Home -Manager then you are strongly encouraged to start with a small and -very simple configuration and gradually make it more elaborate as you -learn. +If you are not very familiar with Nix but still want to use Home Manager then +you are strongly encouraged to start with a small and very simple configuration +and gradually make it more elaborate as you learn. -In some cases Home Manager cannot detect whether it will overwrite a -previous manual configuration. For example, the Gnome Terminal module -will write to your 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. +In some cases Home Manager cannot detect whether it will overwrite a previous +manual configuration. For example, the Gnome Terminal module will write to your +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.05 (the -current stable version), it may or may not work on other Linux -distributions and NixOS versions. +Home Manager targets [NixOS][] unstable and NixOS version 23.11 (the current +stable version), it may or may not work on other Linux distributions and NixOS +versions. -Also, the `home-manager` tool does not explicitly support rollbacks at -the moment so if your home directory gets messed up you'll have to fix -it yourself. See the [rollbacks][] section for instructions on how to -manually perform a rollback. +Also, the `home-manager` tool does not explicitly support rollbacks at the +moment so if your home directory gets messed up you'll have to fix it yourself. +See the [rollbacks][] section for instructions on how to manually perform a +rollback. -Now when your expectations have been built up and you are eager to try -all this out you can go ahead and read the rest of this text. +Now when your expectations have been built up and you are eager to try all this +out you can go ahead and read the rest of this text. Contact ------- -You can chat with us on IRC in the channel [#home-manager][] on [OFTC][]. -There is also a [Matrix room](https://matrix.to/#/#hm:rycee.net), -which is bridged to the IRC channel. +You can chat with us on IRC in the channel [#home-manager][] on [OFTC][]. There +is also a [Matrix room](https://matrix.to/#/#hm:rycee.net), which is bridged to +the IRC channel. Installation ------------ Home Manager can be used in three primary ways: -1. Using the standalone `home-manager` tool. For platforms other than - NixOS and Darwin, this is the only available choice. It is also - recommended for people on NixOS or Darwin that want to manage their - home directory independently of the system as a whole. See - [Standalone installation][manual standalone install] in the manual - for instructions on how to perform this installation. +1. Using the standalone `home-manager` tool. For platforms other than NixOS and + Darwin, this is the only available choice. It is also recommended for people + on [NixOS][] or Darwin that want to manage their home directory independently + of the system as a whole. See ["Standalone installation" in the + manual][manual standalone install] for instructions on how to perform this + installation. -2. As a module within a NixOS system configuration. This allows the - user profiles to be built together with the system when running - `nixos-rebuild`. See [NixOS module installation][manual nixos - install] in the manual for a description of this setup. +1. As a module within a NixOS system configuration. This allows the user + profiles to be built together with the system when running `nixos-rebuild`. + See ["NixOS module" in the manual][manual nixos install] for a description of + this setup. -3. As a module within a [nix-darwin][] system configuration. This - allows the user profiles to be built together with the system when - running `darwin-rebuild`. See [nix-darwin module - installation][manual nix-darwin install] in the manual for a +1. As a module within a [nix-darwin] system configuration. This allows the user + profiles to be built together with the system when running `darwin-rebuild`. + See ["nix-darwin module" in the manual][manual nix-darwin install] for a description of this setup. -Home Manager provides both the channel-based setup and the flake-based one. -See [Nix Flakes][manual nix flakes] for a description of the flake-based setup. +Home Manager provides both the channel-based setup and the flake-based one. See +[Nix Flakes][manual nix flakes] for a description of the flake-based setup. Translations ------------ Home Manager has basic support for internationalization through -[gettext](https://www.gnu.org/software/gettext/). The translations are -hosted by [Weblate](https://weblate.org/). If you would like to -contribute to the translation effort then start by going to the -[Home Manager Weblate project](https://hosted.weblate.org/engage/home-manager/). +[gettext](https://www.gnu.org/software/gettext/). The translations are hosted by +[Weblate](https://weblate.org/). If you would like to contribute to the +translation effort then start by going to the [Home Manager Weblate +project](https://hosted.weblate.org/engage/home-manager/). -Translation status + Translation status License @@ -114,19 +111,18 @@ License This project is licensed under the terms of the [MIT license](LICENSE). -[Nix]: https://nixos.org/explore.html -[NixOS]: https://nixos.org/ -[Nixpkgs]: https://github.com/NixOS/nixpkgs -[manual]: https://nix-community.github.io/home-manager/index.html -[contributing]: https://nix-community.github.io/home-manager/#ch-contributing -[manual usage]: https://nix-community.github.io/home-manager/#ch-usage -[configuration options]: https://nix-community.github.io/home-manager/options.html [#home-manager]: https://webchat.oftc.net/?channels=home-manager -[OFTC]: https://oftc.net/ [Nix Flakes]: https://nixos.wiki/wiki/Flakes +[NixOS]: https://nixos.org/ +[Nix]: https://nixos.org/explore.html +[Nixpkgs]: https://github.com/NixOS/nixpkgs +[OFTC]: https://oftc.net/ +[configuration options]: https://nix-community.github.io/home-manager/options.xhtml +[contributing]: https://nix-community.github.io/home-manager/#ch-contributing +[manual nix flakes]: https://nix-community.github.io/home-manager/#ch-nix-flakes +[manual nix-darwin install]: https://nix-community.github.io/home-manager/#sec-install-nix-darwin-module +[manual nixos install]: https://nix-community.github.io/home-manager/#sec-install-nixos-module +[manual standalone install]: https://nix-community.github.io/home-manager/#sec-install-standalone +[manual]: https://nix-community.github.io/home-manager/ [nix-darwin]: https://github.com/LnL7/nix-darwin -[manual standalone install]: https://nix-community.github.io/home-manager/index.html#sec-install-standalone -[manual nixos install]: https://nix-community.github.io/home-manager/index.html#sec-install-nixos-module -[manual nix-darwin install]: https://nix-community.github.io/home-manager/index.html#sec-install-nix-darwin-module -[manual nix flakes]: https://nix-community.github.io/home-manager/index.html#ch-nix-flakes -[rollbacks]: https://nix-community.github.io/home-manager/index.html#sec-usage-rollbacks +[rollbacks]: https://nix-community.github.io/home-manager/#sec-usage-rollbacks diff --git a/third_party/home-manager/docs/3rd-party.adoc b/third_party/home-manager/docs/3rd-party.adoc deleted file mode 100644 index 8fdc528ce8..0000000000 --- a/third_party/home-manager/docs/3rd-party.adoc +++ /dev/null @@ -1,22 +0,0 @@ -[[ch-3rd-party]] -== Third-Party Tools and Extensions - -Here is a collection of tools and extensions that relate to Home -Manager. Note, these are maintained outside the regular Home Manager -flow so quality and support may vary wildly. If you encounter problems -then please raise them in the corresponding project, not as issues in -the Home Manager tracker. - -If you have made something interesting related to Home Manager then -you are encouraged to create a PR that expands this chapter. - -[[sec-3rd-party-module-collections]] -=== Module Collections - -- https://github.com/schuelermine/xhmm[xhmm — extra Home Manager modules] -+ -A collection of modules maintained by Anselm Schüler. - -- https://github.com/danth/stylix/[Stylix — System-wide colorscheming and typography] -+ -Configure your applications to get coherent color scheme and font. diff --git a/third_party/home-manager/docs/contributing.adoc b/third_party/home-manager/docs/contributing.adoc deleted file mode 100644 index 3a1805f21a..0000000000 --- a/third_party/home-manager/docs/contributing.adoc +++ /dev/null @@ -1,266 +0,0 @@ -[[ch-contributing]] -== Contributing - -:open-issues: https://github.com/nix-community/home-manager/issues -:new-issue: https://github.com/nix-community/home-manager/issues/new -:fork-a-repo: https://help.github.com/articles/fork-a-repo/ -:create-a-pull-request: https://help.github.com/articles/creating-a-pull-request/ -:seven-rules: https://chris.beams.io/posts/git-commit/#seven-rules -:news-nix: https://github.com/nix-community/home-manager/blob/master/modules/misc/news.nix -:nixfmt: https://github.com/serokell/nixfmt/ -:example-commit-message: https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef - -Contributions to Home Manager are very welcome. To make the process as smooth as possible for both you and the Home Manager maintainers we provide some guidelines that we ask you to follow. See <> for information on how to set up a suitable development environment and <> for the actual guidelines. - -This text is mainly directed at those who would like to make code contributions to Home Manager. If you just want to report a bug then first look among the already {open-issues}[open issues], if you find one matching yours then feel free to comment on it to add any additional information you may have. If no matching issue exists then go to the {new-issue}[new issue] page and write a description of your problem. Include as much information as you can, ideally also include relevant excerpts from your Home Manager configuration. - -[[sec-contrib-getting-started]] -=== Getting started - -If you have not previously forked Home Manager then you need to do that first. Have a look at GitHub's {fork-a-repo}[Fork a repo] for instructions on how to do this. - -Once you have a fork of Home Manager you should create a branch starting at the most recent `master` branch. Give your branch a reasonably descriptive name. Commit your changes to this branch and when you are happy with the result and it fulfills <> then push the branch to GitHub and {create-a-pull-request}[create a pull request]. - -Assuming your clone is at `$HOME/devel/home-manager` then you can make the `home-manager` command use it by either - -1. overriding the default path by using the `-I` command line option: -+ -[source,console] -$ home-manager -I home-manager=$HOME/devel/home-manager -+ -or, if using <>: -+ -[source,console] -$ home-manager --override-input home-manager ~/devel/home-manager -+ -or - -2. changing the default path by ensuring your configuration includes -+ -[source,nix] ----- -programs.home-manager.enable = true; -programs.home-manager.path = "$HOME/devel/home-manager"; ----- -+ -and running `home-manager switch` to activate the change. Afterwards, `home-manager build` and `home-manager switch` will use your cloned repository. - -The first option is good if you only temporarily want to use your clone. - -[[sec-guidelines]] -=== Guidelines -:irc-home-manager: https://webchat.oftc.net/?channels=home-manager -:valuable-options: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md#valuable-options -:rfc-42: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md -:assertions: https://nixos.org/manual/nixos/stable/index.html#sec-assertions - -If your contribution satisfy the following rules then there is a good chance it will be merged without too much trouble. The rules are enforced by the Home Manager maintainers and to a lesser extent the Home Manager CI system. - -If you are uncertain how these rules affect the change you would like to make then feel free to start a discussion in the {irc-home-manager}[#home-manager] IRC channel, ideally before you start developing. - -[[sec-guidelines-back-compat]] -==== Maintain backward compatibility - -Your contribution should not cause another user's existing configuration to break unless there is a very good reason and the change should be announced to the user through an {assertions}[assertion] or similar. - -Remember that Home Manager is used in many different environments and you should consider how your change may effect others. For example, - -- Does your change work for people that do not use NixOS? Consider other GNU/Linux distributions and macOS. -- Does your change work for people whose configuration is built on one system and deployed on another system? - -[[sec-guidelines-forward-compat]] -==== Keep forward compatibility in mind - -The master branch of Home Manager tracks the unstable channel of Nixpkgs, which may update package versions at any time. It is therefore important to consider how a package update may affect your code and try to reduce the risk of breakage. - -The most effective way to reduce this risk is to follow the advice in <>. - -[[sec-guidelines-valuable-options]] -==== Add only valuable options - -When creating a new module it is tempting to include every option supported by the software. This is _strongly_ discouraged. Providing many options increases maintenance burden and risk of breakage considerably. This is why only the most {valuable-options}[important software options] should be modeled explicitly. Less important options should be expressible through an `extraConfig` escape hatch. - -A good rule of thumb for the first implementation of a module is to only add explicit options for those settings that absolutely must be set for the software to function correctly. It follows that a module for software that provides sensible default values for all settings would require no explicit options at all. - -If the software uses a structured configuration format like a JSON, YAML, INI, TOML, or even a plain list of key/value pairs then consider using a `settings` option as described in {rfc-42}[Nix RFC 42]. - -[[sec-guidelines-add-tests]] -==== Add relevant tests - -If at all possible, make sure to add new tests and expand existing tests so that your change will keep working in the future. See <> for more information about the Home Manager test suite. - -All contributed code _must_ pass the test suite. - -[[sec-guidelines-module-maintainer]] - -==== Add relevant documentation -:nixpkgs-markdown: https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup -:docbook: https://tdg.docbook.org/ -:asciidoc: https://asciidoc.org/ - -Many code changes require changing the documentation as well. Module options should be documented with {nixpkgs-markdown}[Nixpkgs-flavoured Markdown]. Home Manager is itself documented using a combination of {docbook}[DocBook] and {asciidoc}[AsciiDoc]. All text is hosted in Home Manager's Git repository. - -The HTML version of the manual containing both the module option descriptions and the documentation of Home Manager can be generated and opened by typing the following in a shell within a clone of the Home Manager Git repository: - -[source,console] -$ nix-build -A docs.html -$ xdg-open ./result/share/doc/home-manager/index.html - -When you have made changes to a module, it is a good idea to check that the man page version of the module options looks good: - -[source,console] -$ nix-build -A docs.manPages -$ man ./result/share/man/man5/home-configuration.nix.5.gz - -==== Add yourself as a module maintainer - -Every new module _must_ include a named maintainer using the `meta.maintainers` attribute. If you are a user of a module that currently lacks a maintainer then please consider adopting it. - -If you are present in the nixpkgs maintainer list then you can use that entry. If you are not then you can add yourself to `modules/lib/maintainers.nix` in the Home Manager project. - -Maintainers are encouraged to join the IRC or Matrix channel and participate when they have opportunity. - -[[sec-guidelines-code-style]] -==== Format your code - -Make sure your code is formatted as described in <>. To maintain consistency throughout the project you are encouraged to browse through existing code and adopt its style also in new code. - -[[sec-guidelines-commit-message-style]] -==== Format your commit messages - -Similar to <> we encourage a consistent commit message format as described in <>. - -[[sec-guidelines-news-style]] -==== Format your news entries - -If your contribution includes a change that should be communicated to users of Home Manager then you can add a news entry. The entry must be formatted as described in <>. - -When new modules are added a news entry should be included but you do not need to create this entry manually. The merging maintainer will create the entry for you. This is to reduce the risk of merge conflicts. - -[[sec-guidelines-conditional-modules]] -==== Use conditional modules and news - -Home Manager includes a number of modules that are only usable on some of the supported platforms. The most common example of platform specific modules are those that define systemd user services, which only works on Linux systems. - -If you add a module that is platform specific then make sure to include a condition in the `loadModule` function call. This will make the module accessible only on systems where the condition evaluates to `true`. - -Similarly, if you are adding a news entry then it should be shown only to users that may find it relevant, see <> for a description of conditional news. - -[[sec-guidelines-licensing]] -==== Mind the license - -The Home Manager project is covered by the MIT license and we can only accept contributions that fall under this license, or are licensed in a compatible way. When you contribute self written code and documentation it is assumed that you are doing so under the MIT license. - -A potential gotcha with respect to licensing are option descriptions. Often it is convenient to copy from the upstream software documentation. When this is done it is important to verify that the license of the upstream documentation allows redistribution under the terms of the MIT license. - -[[sec-commit-style]] -=== Commits - -The commits in your pull request should be reasonably self-contained, that is, each commit should make sense in isolation. In particular, you will be asked to amend any commit that introduces syntax errors or similar problems even if they are fixed in a later commit. - -The commit messages should follow the {seven-rules}[seven rules], except for "Capitalize the subject line". We also ask you to include the affected code component or module in the first line. That is, a commit message should follow the template - ----- -{component}: {description} - -{long description} ----- - -where `{component}` refers to the code component (or module) your change affects, `{description}` is a very brief description of your change, and `{long description}` is an optional clarifying description. As a rare exception, if there is no clear component, or your change affects many components, then the `{component}` part is optional. See <> for a commit message that fulfills these requirements. - -[[ex-commit-message]] -.Compliant commit message -=============================================================================== -The commit {example-commit-message}[69f8e47e9e74c8d3d060ca22e18246b7f7d988ef] contains the commit message - ----- -starship: allow running in Emacs if vterm is used - -The vterm buffer is backed by libvterm and can handle Starship prompts -without issues. ----- - -which ticks all the boxes necessary to be accepted in Home Manager. -=============================================================================== - -Finally, when adding a new module, say `programs/foo.nix`, we use the fixed commit format `foo: add module`. You can, of course, still include a long description if you wish. - -[[sec-code-style]] -=== Code Style - -The code in Home Manager is formatted by the {nixfmt}[nixfmt] tool and the formatting is checked in the pull request tests. Run the `format` tool inside the project repository before submitting your pull request. - -Keep lines at a reasonable width, ideally 80 characters or less. This also applies to string literals. - -We prefer `lowerCamelCase` for variable and attribute names with the accepted exception of variables directly referencing packages in Nixpkgs which use a hyphenated style. For example, the Home Manager option `services.gpg-agent.enableSshSupport` references the `gpg-agent` package in Nixpkgs. - -[[sec-news]] -=== News - -Home Manager includes a system for presenting news to the user. When making a change you, therefore, have the option to also include an associated news entry. In general, a news entry should only be added for truly noteworthy news. For example, a bug fix or new option does generally not need a news entry. - -If you do have a change worthy of a news entry then please add one in {news-nix}[`news.nix`] but you should follow some basic guidelines: - -- The entry timestamp should be in ISO-8601 format having "+00:00" as time zone. For example, "2017-09-13T17:10:14+00:00". A suitable timestamp can be produced by the command -+ -[source,console] -$ date --iso-8601=second --universal - -- The entry condition should be as specific as possible. For example, if you are changing or deprecating a specific option then you could restrict the news to those users who actually use this option. - -- Wrap the news message so that it will fit in the typical terminal, that is, at most 80 characters wide. Ideally a bit less. - -- Unlike commit messages, news will be read without any connection to the Home Manager source code. It is therefore important to make the message understandable in isolation and to those who do not have knowledge of the Home Manager internals. To this end it should be written in more descriptive, prose like way. - -- If you refer to an option then write its full attribute path. That is, instead of writing -+ ----- -The option 'foo' has been deprecated, please use 'bar' instead. ----- -+ -it should read -+ ----- -The option 'services.myservice.foo' has been deprecated, please -use 'services.myservice.bar' instead. ----- - -- A new module, say `foo.nix`, should always include a news entry that has a message along the lines of -+ ----- -A new module is available: 'services.foo'. ----- -+ -If the module is platform specific, e.g., a service module using systemd, then a condition like -+ -[source,nix] -condition = hostPlatform.isLinux; -+ -should be added. If you contribute a module then you don't need to add this entry, the merger will create an entry for you. - -[[sec-tests]] -=== Tests - -Home Manager includes a basic test suite and it is highly recommended to include at least one test when adding a module. Tests are typically in the form of "golden tests" where, for example, a generated configuration file is compared to a known correct file. - -It is relatively easy to create tests by modeling the existing tests, found in the `tests` project directory. For a full reference to the functions available in test scripts, you can look at NMT's https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib[bash-lib]. - -The full Home Manager test suite can be run by executing - -[source,console] -$ nix-shell --pure tests -A run.all - -in the project root. List all test cases through - -[source,console] -$ nix-shell --pure tests -A list - -and run an individual test, for example `alacritty-empty-settings`, through - -[source,console] -$ nix-shell --pure tests -A run.alacritty-empty-settings - -However, those invocations will impurely source the system’s nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g. - -[source,console] -$ nix develop --ignore-environment .#all diff --git a/third_party/home-manager/docs/default.nix b/third_party/home-manager/docs/default.nix index 98dce1d9c0..ecef00c320 100644 --- a/third_party/home-manager/docs/default.nix +++ b/third_party/home-manager/docs/default.nix @@ -9,8 +9,8 @@ let nmdSrc = fetchTarball { url = - "https://git.sr.ht/~rycee/nmd/archive/824a380546b5d0d0eb701ff8cd5dbafb360750ff.tar.gz"; - sha256 = "0vvj40k6bw8ssra8wil9rqbsznmfy1kwy7cihvm13rajwdg9ycgg"; + "https://git.sr.ht/~rycee/nmd/archive/f18defadcc25e69e95b04493ee02682005472255.tar.gz"; + sha256 = "14fazjqbc6sfsxycwadfhcymi37xg5wmrlvg3jb8d4mpbcdwfwz4"; }; nmd = import nmdSrc { @@ -92,32 +92,38 @@ let optionIdPrefix = "nix-darwin-opt-"; }; - docs = nmd.buildDocBookDocs { - pathName = "home-manager"; - projectName = "Home Manager"; - modulesDocs = [{ - docBook = pkgs.linkFarm "hm-module-docs-for-nmd" { - "nmd-result/home-manager-options.xml" = hmOptionsDocs.optionsDocBook; - "nmd-result/nix-darwin-options.xml" = - nixDarwinOptionsDocs.optionsDocBook; - "nmd-result/nixos-options.xml" = nixosOptionsDocs.optionsDocBook; - }; - }]; - documentsDirectory = ./.; - documentType = "book"; - chunkToc = '' - - - - - - - - - + release-config = builtins.fromJSON (builtins.readFile ../release.json); + revision = "release-${release-config.release}"; + # Generate the `man home-configuration.nix` package + home-configuration-manual = + pkgs.runCommand "home-configuration-reference-manpage" { + nativeBuildInputs = + [ pkgs.buildPackages.installShellFiles pkgs.nixos-render-docs ]; + allowedReferences = [ "out" ]; + } '' + # Generate manpages. + mkdir -p $out/share/man/man5 + mkdir -p $out/share/man/man1 + nixos-render-docs -j $NIX_BUILD_CORES options manpage \ + --revision ${revision} \ + --header ${./home-configuration-nix-header.5} \ + --footer ${./home-configuration-nix-footer.5} \ + ${hmOptionsDocs.optionsJSON}/share/doc/nixos/options.json \ + $out/share/man/man5/home-configuration.nix.5 + cp ${./home-manager.1} $out/share/man/man1/home-manager.1 ''; + # Generate the HTML manual pages + home-manager-manual = pkgs.callPackage ./home-manager-manual.nix { + nmd = nmdSrc; + home-manager-options = { + home-manager = hmOptionsDocs.optionsJSON; + nixos = nixosOptionsDocs.optionsJSON; + nix-darwin = nixDarwinOptionsDocs.optionsJSON; + }; + inherit revision; }; - + html = home-manager-manual; + htmlOpenTool = pkgs.callPackage ./html-open-tool.nix { } { inherit html; }; in { inherit nmdSrc; @@ -138,9 +144,9 @@ in { ''; }; - manPages = docs.manPages; + manPages = home-configuration-manual; - manual = { inherit (docs) html htmlOpenTool; }; + manual = { inherit html htmlOpenTool; }; # Unstable, mainly for CI. jsonModuleMaintainers = pkgs.writeText "hm-module-maintainers.json" (let diff --git a/third_party/home-manager/docs/faq.adoc b/third_party/home-manager/docs/faq.adoc deleted file mode 100644 index e8b86649ef..0000000000 --- a/third_party/home-manager/docs/faq.adoc +++ /dev/null @@ -1,192 +0,0 @@ -[[ch-faq]] -== Frequently Asked Questions (FAQ) - -=== Why is there a collision error when switching generation? - -Home Manager currently installs packages into the user environment, precisely as if the packages were installed through `nix-env --install`. This means that you will get a collision error if your Home Manager configuration attempts to install a package that you already have installed manually, that is, packages that shows up when you run `nix-env --query`. - -For example, imagine you have the `hello` package installed in your environment - -[source,console] ----- -$ nix-env --query -hello-2.10 ----- - -and your Home Manager configuration contains - -[source,nix] ----- -home.packages = [ pkgs.hello ]; ----- - -Then attempting to switch to this configuration will result in an error similar to - -[source,console] ----- -$ home-manager switch -these derivations will be built: - /nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv -[…] -Activating installPackages -replacing old ‘home-manager-path’ -installing ‘home-manager-path’ -building path(s) ‘/nix/store/b5c0asjz9f06l52l9812w6k39ifr49jj-user-environment’ -Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79. -collision between ‘/nix/store/fmwa4axzghz11cnln5absh31nbhs9lq1-home-manager-path/bin/hello’ and ‘/nix/store/c2wyl8b9p4afivpcz8jplc9kis8rj36d-hello-2.10/bin/hello’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages -builder for ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed with exit code 2 -error: build of ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed ----- - -The solution is typically to uninstall the package from the environment using `nix-env --uninstall` and reattempt the Home Manager generation switch. - -You could also opt to unistall _all_ of the packages from your profile with `nix-env --uninstall '*'`. - -=== Why are the session variables not set? -:foreign-env: https://github.com/oh-my-fish/plugin-foreign-env - -Home Manager is only able to set session variables automatically if it manages your Bash, Z shell, or fish shell configuration. To enable such management you use <>, <>, or <>. - -If you don't want to let Home Manager manage your shell then you will have to manually source the `~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate way. In Bash and Z shell this can be done by adding - -[source,bash] ----- -. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ----- - -to your `.profile` and `.zshrc` files, respectively. The `hm-session-vars.sh` file should work in most Bourne-like shells. For fish shell, it is possible to source it using {foreign-env}[the foreign-env plugin] - -[source,bash] ----- -fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null ----- - -=== How to set up a configuration for multiple users/machines? -:post-your-homenix: https://www.reddit.com/r/NixOS/comments/9bb9h9/post_your_homemanager_homenix_file/ - -A typical way to prepare a repository of configurations for multiple logins and machines is to prepare one "top-level" file for each unique combination. - -For example, if you have two machines, called "kronos" and "rhea" on which you want to configure your user "jane" then you could create the files - -- `kronos-jane.nix`, -- `rhea-jane.nix`, and -- `common.nix` - -in your repository. -On the kronos and rhea machines you can then make -`~jane/.config/home-manager/home.nix` -be a symbolic link to the corresponding file in your configuration repository. - -The `kronos-jane.nix` and `rhea-jane.nix` files follow the format - -[source,nix] ----- -{ ... }: - -{ - imports = [ ./common.nix ]; - - # Various options that are specific for this machine/user. -} ----- - -while the `common.nix` file contains configuration shared across the two logins. Of course, instead of just a single `common.nix` file you can have multiple ones, even one per program or service. - -You can get some inspiration from the {post-your-homenix}[Post your home-manager home.nix file!] Reddit thread. - -=== Why do I get an error message about `ca.desrt.dconf` or `dconf.service`? - -You are most likely trying to configure something that uses dconf -but the DBus session is not aware of the dconf service. -The full error you might get is - ----- -error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files ----- - -or - ----- -error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found. ----- - -The solution on NixOS is to add - -[source,nix] -programs.dconf.enable = true; - -to your system configuration. - -=== How do I install packages from Nixpkgs unstable? - -If you are using a stable version of Nixpkgs but would like to install some particular packages from Nixpkgs unstable – or some other channel – then you can import the unstable Nixpkgs and refer to its packages within your configuration. Something like - -[source,nix] ----- -{ pkgs, config, ... }: - -let - - pkgsUnstable = import {}; - -in - -{ - home.packages = [ - pkgsUnstable.foo - ]; - - # … -} ----- - -should work provided you have a Nix channel called `nixpkgs-unstable`. - -You can add the `nixpkgs-unstable` channel by running - -[source,console] ----- -$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable -$ nix-channel --update ----- - -Note, the package will not be affected by any package overrides, overlays, etc. - -=== How do I override the package used by a module? -:nixpkgs-overlays: https://nixos.org/nixpkgs/manual/#chap-overlays - -By default Home Manager will install the package provided by your chosen `nixpkgs` channel but occasionally you might end up needing to change this package. This can typically be done in two ways. - -1. If the module provides a `package` option, such as `programs.beets.package`, then this is the recommended way to perform the override. For example, -+ -[source,nix] -programs.beets.package = pkgs.beets.override { enableCheck = true; }; - -2. If no `package` option is available then you can typically override the relevant package using an {nixpkgs-overlays}[overlay]. -+ -For example, if you want to use the `programs.skim` module but use the `skim` package from Nixpkgs unstable, then a configuration like -+ -[source,nix] ----- -{ pkgs, config, ... }: - -let - - pkgsUnstable = import {}; - -in - -{ - programs.skim.enable = true; - - nixpkgs.overlays = [ - (self: super: { - skim = pkgsUnstable.skim; - }) - ]; - - # … -} ----- -+ -should work OK. diff --git a/third_party/home-manager/docs/highlight-style.css b/third_party/home-manager/docs/highlight-style.css new file mode 100644 index 0000000000..0b360281cc --- /dev/null +++ b/third_party/home-manager/docs/highlight-style.css @@ -0,0 +1,8 @@ +pre { + padding: 0; +} + +pre code.hljs { + border: none; + margin: 0; +} diff --git a/third_party/home-manager/docs/home-configuration-nix-footer.5 b/third_party/home-manager/docs/home-configuration-nix-footer.5 new file mode 100644 index 0000000000..c109881302 --- /dev/null +++ b/third_party/home-manager/docs/home-configuration-nix-footer.5 @@ -0,0 +1,3 @@ +.SH "AUTHORS" +.PP +Home Manager contributors diff --git a/third_party/home-manager/docs/home-configuration-nix-header.5 b/third_party/home-manager/docs/home-configuration-nix-header.5 new file mode 100644 index 0000000000..557fd3e88c --- /dev/null +++ b/third_party/home-manager/docs/home-configuration-nix-header.5 @@ -0,0 +1,17 @@ +.TH "HOME-CONFIGURATION\&.NIX" "5" "01/01/1980" "Home Manager" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" enable line breaks after slashes +.cflags 4 / +.SH "NAME" +\fIhome\-configuration\&.nix\fP \- Home Manager configuration specification +.SH "DESCRIPTION" +.sp +The file ~/\&.config/home\-manager/home\&.nix contains the declarative specification of your Home Manager configuration\&. The command \fBhome\-manager\fR takes this file and realises the user environment configuration specified therein\&. +.SH "OPTIONS" +.PP +You can use the following options in +home\-configuration\&.nix: +.PP diff --git a/third_party/home-manager/docs/home-manager-manual.nix b/third_party/home-manager/docs/home-manager-manual.nix new file mode 100644 index 0000000000..6a14c5099d --- /dev/null +++ b/third_party/home-manager/docs/home-manager-manual.nix @@ -0,0 +1,66 @@ +{ stdenv, lib, documentation-highlighter, nmd, revision, home-manager-options +, nixos-render-docs }: +let outputPath = "share/doc/home-manager"; +in stdenv.mkDerivation { + name = "home-manager-manual"; + + nativeBuildInputs = [ nixos-render-docs ]; + + src = ./manual; + + buildPhase = '' + mkdir -p out/media + + mkdir -p out/highlightjs + cp -t out/highlightjs \ + ${documentation-highlighter}/highlight.pack.js \ + ${documentation-highlighter}/LICENSE \ + ${documentation-highlighter}/mono-blue.css \ + ${documentation-highlighter}/loader.js + + substituteInPlace ./options.md \ + --replace \ + '@OPTIONS_JSON@' \ + ${home-manager-options.home-manager}/share/doc/nixos/options.json + + substituteInPlace ./nixos-options.md \ + --replace \ + '@OPTIONS_JSON@' \ + ${home-manager-options.nixos}/share/doc/nixos/options.json + + substituteInPlace ./nix-darwin-options.md \ + --replace \ + '@OPTIONS_JSON@' \ + ${home-manager-options.nix-darwin}/share/doc/nixos/options.json + + cp ${nmd}/static/style.css out/style.css + cp -t out/highlightjs ${nmd}/static/highlightjs/tomorrow-night.min.css + cp ${./highlight-style.css} out/highlightjs/highlight-style.css + + cp -r ${./release-notes} release-notes + + nixos-render-docs manual html \ + --manpage-urls ./manpage-urls.json \ + --revision ${lib.trivial.revisionWithDefault revision} \ + --stylesheet style.css \ + --stylesheet highlightjs/tomorrow-night.min.css \ + --stylesheet highlightjs/highlight-style.css \ + --script highlightjs/highlight.pack.js \ + --script highlightjs/loader.js \ + --toc-depth 1 \ + --section-toc-depth 1 \ + manual.md \ + out/index.xhtml + ''; + + installPhase = '' + dest="$out/${outputPath}" + mkdir -p "$(dirname "$dest")" + mv out "$dest" + + mkdir -p $out/nix-support/ + echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products + ''; + + meta = { maintainers = [ lib.maintainers.considerate ]; }; +} diff --git a/third_party/home-manager/docs/home-manager.1 b/third_party/home-manager/docs/home-manager.1 new file mode 100644 index 0000000000..1747735e11 --- /dev/null +++ b/third_party/home-manager/docs/home-manager.1 @@ -0,0 +1,400 @@ +.Dd January 1, 1980 +.Dt home-manager 1 +.Os Home Manager +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" enable line breaks after slashes +.cflags 4 / +.Sh NAME +.Nm home-manager +.Nd reconfigure a user environment +. +. +. +.Sh SYNOPSIS +.Nm home-manager +.Bro +.Cm build +.Cm | init Op Fl -switch Ar dir +.Cm | instantiate +.Cm | edit +.Cm | expire-generations Ar timestamp +.Cm | generations +.Cm | help +.Cm | news +.Cm | option Ar option.name +.Cm | packages +.Cm | remove-generations Ar ID \&... +.Cm | uninstall +.Brc +.Op Fl A Ar attrPath +.Op Fl I Ar path +.Op Fl -flake Ar flake-uri +.Op Fl b Ar ext +.Op Bro Fl f | Fl -file Brc Ar path +.Op Bro Fl h | Fl -help Brc +.Op Fl -version +.Op Bro Fl n | Fl -dry-run Brc +.Op Fl -option Ar name Ar value +.Op Fl -cores Ar number +.Op Bro Fl j | Fl -max-jobs Brc Ar number +.Op Fl -option +.Op Fl -impure +.Op Fl -keep-failed +.Op Fl -keep-going +.Op Bro Fl L | Fl -print-build-logs Brc +.Op Fl -show-trace +.Op Fl -(no-)substitute +.Op Fl -no-out-link +.Op Fl -refresh +.Op Bro Fl v | Fl -verbose Brc +. +.Sh DESCRIPTION +.Pp +This command updates the user environment so that it corresponds to the configuration specified in +$XDG_CONFIG_HOME/home-manager/home.nix +or +$XDG_CONFIG_HOME/home-manager/flake.nix. +.Pp +All operations using this tool expects a sub-command that indicates the operation to perform. It must be one of +.Pp +.Bl -tag -width Ds + +.It Cm build +.RS 4 +Build configuration into a result directory. +.RE + +.It Cm init Op Fl -switch Op Ar dir +.RS 14 +Generates an initial home.nix file for the current user. If Nix flakes are +enabled, then this command also generates a flake.nix file. +.sp +If a path +.Ar dir +is given then the configuration will be generated in that directory. Otherwise, the configuration will be generated in +~/.config/home-manager. The output directory will be created if it does not exist. +.sp +If the +.Fl -switch +option is given, then the generated configuration is activated. +.sp +Note, this command will not overwrite any existing files. It is therefore safe to initialize a configuration, edit it, and then re-run the +.Cm init +command with +.Fl -switch +enabled to activate the configuration. +.RE +.Pp + +.It Cm instantiate +.RS 15 +Instantiate the configuration and print the resulting derivation\&. +.RE +.Pp + +.It Cm edit +.RS 16 +Open the home configuration using the editor indicated by \fBEDITOR\fR\&. +.RE +.Pp + +.It Cm expire-generations Ar timestamp +.RS 4 +Remove generations older than +.Ar timestamp +where +.Ar timestamp +is interpreted as in the +.Fl d +argument of the +\fBdate\fR(1) +tool. For example +-30 days or 2018-01-01. +.RE +.PP + +.It Cm generations +.RS 4 +List all home environment generations\&. +.RE +.Pp + +.It Cm help +.RS 4 +Print tool help. +.RE +.Pp + +.It Cm news +.RS 4 +Show news entries in a pager. +.RE +.PP + +.It Cm option Ar option.name +.RS 4 +Inspect the given option name in the home configuration, like +\fBnixos-option\fR(8)\&. +.RE +.Pp + +.It Cm packages +.RS 4 +List all packages installed in home-manager-path. +.RE +.Pp + +.It Cm remove-generations Ar ID \&... +.RS 4 +Remove indicated generations. Use the +.Cm generations +sub-command to find suitable generation numbers. +.RE +.Pp + +.It Cm switch +.RS 4 +Build and activate the configuration\&. +.RE +.Pp + +.It Cm uninstall +.RS 4 +Remove Home Manager from the user environment\&. This will +.sp +.RE +.RS 4 +.Bl -bullet +.It +remove all managed files from the home directory, +.RE +.sp +.RS 4 +.It +remove packages installed through Home Manager from the user profile, and +.RE +.sp +.RS 4 +.It +remove all Home Manager generations and make them available for immediate garbage collection\&. +.RE +.El +.sp +.RE +.El +. +.Sh OPTIONS +.Pp +The tool accepts the options +.Pp +.Bl -tag -width Ds +.It Cm Fl A Ar attrPath +.RS 4 +Optional attribute that selects a configuration expression in the configuration file. That is, if +home.nix contains +.sp +.if n \{\ +.RS 4 +.\} +.nf +{ + joe\-at\-work = {pkgs, \&.\&.\&.}: { home\&.packages = [ pkgs\&.fortune ]; }; + joe\-at\-home = {pkgs, \&.\&.\&.}: { home\&.packages = [ pkgs\&.cowsay ]; }; +} +.fi +.if n \{\ +.RE +.\} +.sp +then the command +\fBhome\-manager switch \-A joe\-at\-work\fR +will activate the profile containing the fortune program\&. +.RE +.PP +.It Cm Fl I Ar path +.RS 4 +Add a path to the Nix expression search path. For example, to build a Home Manager profile using a specific Nixpkgs run +.Cm home-manager Fl I Ar nixpkgs=/absolute/path/to/nixpkgs build. +By default +.Ar +is used. +.RE +.Pp + +.It Cm Fl -flake Ar flake-uri[#name] +.RS 4 +Build Home Manager configuration from the flake, which must contain the output homeConfigurations.name. If no name is specified it will first try username@hostname and then username. +.RE +.Pp + +.It Cm Fl b Ar extension +.RS 4 +Enable automatic resolution of collisions between unmanaged and managed files\&. The name of the original file will be suffixed by the given extension\&. For example, +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ \fBhome\-manager \-b bck switch\fR +.fi +.if n \{\ +.RE +.\} +.sp +will cause a colliding file +~/\&.config/foo\&.conf +to be moved to +~/\&.config/foo\&.conf\&.bck\&. +.RE +.Pp + +.It Cm Fl f Ar path, Fl -file Ar path +.RS 4 +Indicates the path to the Home Manager configuration file. If not given, +$XDG_CONFIG_HOME/home-manager/home.nix +is used. +.RE +.Pp +.It Cm Fl h, Fl -help +.RS 4 +Prints usage information for the +\fBhome\-manager\fR +tool. +.RE +.Pp + +.It Cm Fl -version +.RS 4 +Prints the version number of the +\fBhome\-manager\fR +tool. +.RE +.Pp +.It Cm Fl n, Fl -dry-run +.RS 4 +Perform a dry-run of the given operation, only prints what actions would be taken. +.RE +.Pp + +.It Cm Fl -option Ar name Ar value +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl -cores Ar number +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl j Ar number, Fl -max-jobs Ar number +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.\" TODO +.Pp +.It Cm Fl -debug +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp +.It Cm Fl -impure +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl -keep-failed +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl -keep-going +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl L, Fl -print-build-logs +.RS 4 +Passed on to +\fBnix build\fR() +when building from a flake\&. +.RE +.Pp + +.It Cm Fl -show-trace +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl -(no-)substitute +.RS 4 +Passed on to +\fBnix-build\fR(1)\&. +.RE +.Pp + +.It Cm Fl -no-out-link +.RS 4 +Passed on to +\fBnix-build\fR(1) +when running +\fBhome\-manager build\fR\&. +.RE +.Pp + +.It Cm Fl -refresh +.RS 4 +Passed on to +\fBnix-build\fR(1) +.RE +.Pp + +.It Cm Fl v, Fl -verbose +.RS 4 +Activates verbose output\&. +.RE +.El + +.Sh FILES +.Pp +$XDG_DATA_HOME/home\-manager/news\-read\-ids +.RS 4 +Identifiers of news items that have been shown\&. Can be deleted to reset the read news indicator\&. +.RE + +.Sh BUGS +.Pp +Please report any bugs on the +\m[blue]\fBproject issue tracker\fR\m[]\&. + +.Sh SEE ALSO +.Pp +\fBhome-configuration.nix\fR(5) + +.Sh AUTHOR +.Pp +\fBHome Manager contributors\fR +.RS 4 +Author. +.RE + +.Sh COPYRIGHT +.br +Copyright \(co 2017\(en2022 Home Manager contributors +.br diff --git a/third_party/home-manager/docs/html-open-tool.nix b/third_party/home-manager/docs/html-open-tool.nix new file mode 100644 index 0000000000..077e2a2f6c --- /dev/null +++ b/third_party/home-manager/docs/html-open-tool.nix @@ -0,0 +1,36 @@ +{ writeShellScriptBin, makeDesktopItem, symlinkJoin }: +{ html, pathName ? "home-manager", projectName ? pathName +, name ? "${pathName}-help" }: +let + helpScript = writeShellScriptBin name '' + set -euo pipefail + + if [[ ! -v BROWSER || -z $BROWSER ]]; then + for candidate in xdg-open open w3m; do + BROWSER="$(type -P $candidate || true)" + if [[ -x $BROWSER ]]; then + break; + fi + done + fi + + if [[ ! -v BROWSER || -z $BROWSER ]]; then + echo "$0: unable to start a web browser; please set \$BROWSER" + exit 1 + else + exec "$BROWSER" "${html}/share/doc/${pathName}/index.xhtml" + fi + ''; + + desktopItem = makeDesktopItem { + name = "${pathName}-manual"; + desktopName = "${projectName} Manual"; + genericName = "View ${projectName} documentation in a web browser"; + icon = "nix-snowflake"; + exec = "${helpScript}/bin/${name}"; + categories = [ "System" ]; + }; +in symlinkJoin { + inherit name; + paths = [ helpScript desktopItem ]; +} diff --git a/third_party/home-manager/docs/installation.adoc b/third_party/home-manager/docs/installation.adoc deleted file mode 100644 index 7b2ecd4317..0000000000 --- a/third_party/home-manager/docs/installation.adoc +++ /dev/null @@ -1,347 +0,0 @@ -[[ch-installation]] -== Installing Home Manager - -:nix-darwin: https://github.com/LnL7/nix-darwin/ -:nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes - -Home Manager can be used in three primary ways: - -1. Using the standalone `home-manager` tool. For platforms other than -NixOS and Darwin, this is the only available choice. It is also -recommended for people on NixOS or Darwin that want to manage their -home directory independently of the system as a whole. See -<> for instructions on how to perform this -installation. - -2. As a module within a NixOS system configuration. This allows the -user profiles to be built together with the system when running -`nixos-rebuild`. See <> for a description of -this setup. - -3. As a module within a {nix-darwin}[nix-darwin] system configuration. -This allows the user profiles to be built together with the system -when running `darwin-rebuild`. See <> -for a description of this setup. - -[NOTE] -In this chapter we describe how to install Home Manager in the -standard way using channels. If you prefer to use -{nixos-wiki-flakes}[Nix Flakes] then please see the instructions in -<>. - -[[sec-install-standalone]] -=== Standalone installation - -:nix-allowed-users: https://nixos.org/nix/manual/#conf-allowed-users -:nixos-allowed-users: https://nixos.org/manual/nixos/stable/options.html#opt-nix.settings.allowed-users -:bash: https://www.gnu.org/software/bash/ -:zsh: http://zsh.sourceforge.net/ -:fish: https://fishshell.com -:plugin-foreign-env: https://github.com/oh-my-fish/plugin-foreign-env -:babelfish: https://github.com/bouk/babelfish - -1. Make sure you have a working Nix installation. Specifically, make -sure that your user is able to build and install Nix packages. For -example, you should be able to successfully run a command like -`nix-instantiate '' -A hello` without having to switch to the -root user. For a multi-user install of Nix this means that your user -must be covered by the {nix-allowed-users}[`allowed-users`] Nix -option. On NixOS you can control this option using the -{nixos-allowed-users}[`nix.settings.allowed-users`] system option. - -2. Add the appropriate Home Manager channel. If you are following -Nixpkgs master or an unstable channel you can run -+ -[source,console] ----- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -$ nix-channel --update ----- -+ -and if you follow a Nixpkgs version 23.05 channel you can run -+ -[source,console] ----- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager -$ nix-channel --update ----- - -3. Run the Home Manager installation command and create the first Home -Manager generation: -+ -[source,console] -$ nix-shell '' -A install -+ -Once finished, Home Manager should be active and available in your -user environment. - -4. If you do not plan on having Home Manager manage your shell -configuration then you must source the -+ -[source,bash] -$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh -+ -file in your shell configuration. Alternatively source -+ -[source,bash] -/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh -+ -when managing home configuration together with system configuration. -+ -This file can be sourced directly by POSIX.2-like shells such as -{bash}[Bash] or {zsh}[Z shell]. {fish}[Fish] users can use utilities -such as {plugin-foreign-env}[foreign-env] or {babelfish}[babelfish]. -+ -For example, if you use Bash then add -+ -[source,bash] ----- -. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ----- -+ -to your `~/.profile` file. - -If instead of using channels you want to run Home Manager from a Git -checkout of the repository then you can use the -<> option to specify the absolute path -to the repository. - -Once installed you can see <> for a more detailed -description of Home Manager and how to use it. - -[[sec-install-nixos-module]] -=== NixOS module - -Home Manager provides a NixOS module that allows you to prepare user -environments directly from the system configuration file, which often -is more convenient than using the `home-manager` tool. It also opens -up additional possibilities, for example, to automatically configure -user environments in NixOS declarative containers or on systems -deployed through NixOps. - -To make the NixOS module available for use you must `import` it into -your system configuration. This is most conveniently done by adding a -Home Manager channel to the root user. For example, if you are -following Nixpkgs master or an unstable channel, you can run - -[source,console] ----- -$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -$ sudo nix-channel --update ----- - -and if you follow a Nixpkgs version 23.05 channel, you can run - -[source,console] ----- -$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager -$ sudo nix-channel --update ----- - -It is then possible to add - -[source,nix] -imports = [ ]; - -to your system `configuration.nix` file, which will introduce a new -NixOS option called `home-manager.users` whose type is an attribute -set that maps user names to Home Manager configurations. - -For example, a NixOS configuration may include the lines - -[source,nix] ----- -users.users.eve.isNormalUser = true; -home-manager.users.eve = { pkgs, ... }: { - home.packages = [ pkgs.atool pkgs.httpie ]; - programs.bash.enable = true; -}; ----- - -and after a `sudo nixos-rebuild switch` the user eve's environment should -include a basic Bash configuration and the packages atool and httpie. - -[NOTE] -==== -If `nixos-rebuild switch` does not result in the environment you expect, -you can take a look at the output of the Home Manager activation script output using - -[source,console] -$ systemctl status "home-manager-$USER.service" -==== - -If you do not plan on having Home Manager manage your shell -configuration then you must add either - -[source,bash] ----- -. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ----- - -or - -[source,bash] ----- -. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh" ----- - -to your shell configuration, depending on whether -<> is enabled. This file can -be sourced directly by POSIX.2-like shells such as {bash}[Bash] or -{zsh}[Z shell]. {fish}[Fish] users can use utilities such as -{plugin-foreign-env}[foreign-env] or {babelfish}[babelfish]. - -[NOTE] -==== -By default packages will be installed to `$HOME/.nix-profile` but they -can be installed to `/etc/profiles` if - -[source,nix] -home-manager.useUserPackages = true; - -is added to the system configuration. This is necessary if, for -example, you wish to use `nixos-rebuild build-vm`. This option may -become the default value in the future. -==== - -[NOTE] -==== -By default, Home Manager uses a private `pkgs` instance that is -configured via the `home-manager.users..nixpkgs` options. To -instead use the global `pkgs` that is configured via the system level -`nixpkgs` options, set - -[source,nix] -home-manager.useGlobalPkgs = true; - -This saves an extra Nixpkgs evaluation, adds consistency, and removes -the dependency on `NIX_PATH`, which is otherwise used for importing -Nixpkgs. -==== - -[NOTE] -==== -Home Manager will pass `osConfig` as a module argument to any modules -you create. This contains the system's NixOS configuration. - -[source,nix] -{ lib, pkgs, osConfig, ... }: -==== - -Once installed you can see <> for a more detailed -description of Home Manager and how to use it. - -[[sec-install-nix-darwin-module]] -=== nix-darwin module - -Home Manager provides a module that allows you to prepare user -environments directly from the {nix-darwin}[nix-darwin] configuration -file, which often is more convenient than using the `home-manager` -tool. - -To make the NixOS module available for use you must `import` it into -your system configuration. This is most conveniently done by adding a -Home Manager channel. For example, if you are following Nixpkgs master -or an unstable channel, you can run - -[source,console] ----- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -$ nix-channel --update ----- - -and if you follow a Nixpkgs version 23.05 channel, you can run - -[source,console] ----- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager -$ nix-channel --update ----- - -It is then possible to add - -[source,nix] -imports = [ ]; - -to your nix-darwin `configuration.nix` file, which will introduce a -new NixOS option called `home-manager` whose type is an attribute set -that maps user names to Home Manager configurations. - -For example, a nix-darwin configuration may include the lines - -[source,nix] ----- -users.users.eve = { - name = "eve"; - home = "/Users/eve"; -} -home-manager.users.eve = { pkgs, ... }: { - home.packages = [ pkgs.atool pkgs.httpie ]; - programs.bash.enable = true; -}; ----- - -and after a `darwin-rebuild switch` the user eve's environment -should include a basic Bash configuration and the packages atool and -httpie. - -If you do not plan on having Home Manager manage your shell -configuration then you must add either - -[source,bash] ----- -. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ----- - -or - -[source,bash] ----- -. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh" ----- - -to your shell configuration, depending on whether -<> is enabled. This file -can be sourced directly by POSIX.2-like shells such as {bash}[Bash] or -{zsh}[Z shell]. {fish}[Fish] users can use utilities such as -{plugin-foreign-env}[foreign-env] or {babelfish}[babelfish]. - -[NOTE] -==== -By default user packages will not be ignored in favor of -`environment.systemPackages`, but they will be installed to -`/etc/profiles/per-user/$USERNAME` if - -[source,nix] -home-manager.useUserPackages = true; - -is added to the nix-darwin configuration. This option may become the -default value in the future. -==== - -[NOTE] -==== -By default, Home Manager uses a private `pkgs` instance that is -configured via the `home-manager.users..nixpkgs` options. To -instead use the global `pkgs` that is configured via the system level -`nixpkgs` options, set - -[source,nix] -home-manager.useGlobalPkgs = true; - -This saves an extra Nixpkgs evaluation, adds consistency, and removes -the dependency on `NIX_PATH`, which is otherwise used for importing -Nixpkgs. -==== - -[NOTE] -==== -Home Manager will pass `osConfig` as a module argument to any modules -you create. This contains the system's nix-darwin configuration. - -[source,nix] -{ lib, pkgs, osConfig, ... }: -==== - -Once installed you can see <> for a more detailed -description of Home Manager and how to use it. diff --git a/third_party/home-manager/docs/man-configuration.xml b/third_party/home-manager/docs/man-configuration.xml deleted file mode 100644 index a7d1f51198..0000000000 --- a/third_party/home-manager/docs/man-configuration.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - home-configuration.nix - 5 - Home Manager - - - - home-configuration.nix - Home Manager configuration specification - - - Description - - The file ~/.config/home-manager/home.nix contains the - declarative specification of your Home Manager configuration. The command - home-manager takes this file and realises the user - environment configuration specified therein. - - - - Options - - You can use the following options in - home-configuration.nix: - - - - - See also - - - home-manager - 1 - - - - diff --git a/third_party/home-manager/docs/man-home-manager.xml b/third_party/home-manager/docs/man-home-manager.xml deleted file mode 100644 index 71c34b0fda..0000000000 --- a/third_party/home-manager/docs/man-home-manager.xml +++ /dev/null @@ -1,713 +0,0 @@ - - - home-manager - 1 - Home Manager - - - home-manager - reconfigure a user environment - - - - home-manager - - build - - - - init --switch dir - - - - instantiate - - - - edit - - - - expire-generations timestamp - - - - generations - - - - help - - - - news - - - - option option.name - - - - packages - - - - remove-generations ID … - - - - switch - - - - uninstall - - - - - -A attrPath - - - - -I path - - - - --flake flake-uri - - - - -b ext - - - - - - -f - - - - --file - - path - - - - - - -h - - - - --help - - - - - - --version - - - - - - -n - - - - --dry-run - - - - - - --option name value - - - - --cores number - - - - - - -j - - - - --max-jobs - - - number - - - - --debug - - - - --impure - - - - --keep-failed - - - - --keep-going - - - - - - -L - - - - --print-build-logs - - - - - - --show-trace - - - - --(no-)substitute - - - - --no-out-link - - - - --refresh - - - - - - -v - - - - --verbose - - - - - - - Description - - This command updates the user environment so that it corresponds to the - configuration specified in - $XDG_CONFIG_HOME/home-manager/home.nix or - $XDG_CONFIG_HOME/home-manager/flake.nix. - - - All operations using this tool expects a sub-command that indicates the - operation to perform. It must be one of - - - - - - - - Build configuration into a result directory. - - - - - - [] [dir] - - - - Generates an initial home.nix file for the - current user. If Nix flakes are enabled, then this command also - generates a flake.nix file. - - - If a path dir is given then the - configuration will be generated in that directory. Otherwise, the - configuration will be generated in - ~/.config/home-manager. The output directory will - be created if it does not exist. - - - If the option is given, then the generated - configuration is activated. - - - Note, this command will not overwrite any existing files. It is - therefore safe to initialize a configuration, edit it, and then re-run - the command with - enabled to activate the configuration. - - - - - - - - - - Instantiate the configuration and print the resulting derivation. - - - - - - - - - - Open the home configuration using the editor indicated by - EDITOR. - - - - - - - - - - Remove generations older than timestamp where - timestamp is interpreted as in the - argument of the - date - 1 tool. For example -30 - days or 2018-01-01. - - - - - - - - - - List all home environment generations. - - - - - - - - - - Print tool help. - - - - - - - - - - Show news entries in a pager. - - - - - - - - - - Inspect the given option name in the home configuration, like - nixos-option - 8 . - - - - - - - - - - List all packages installed in home-manager-path. - - - - - - - - - - Remove indicated generations. Use the - sub-command to find suitable generation numbers. - - - - - - - - - - Build and activate the configuration. - - - - - - - - - - Remove Home Manager from the user environment. This will - - - - remove all managed files from the home directory, - - - - - remove packages installed through Home Manager from the user profile, - and - - - - - remove all Home Manager generations and make them available - for immediate garbage collection. - - - - - - - - - - - Options - - The tool accepts the options - - - - - - - - - Optional attribute that selects a configuration expression in the - configuration file. That is, if home.nix contains - -{ - joe-at-work = {pkgs, ...}: { home.packages = [ pkgs.fortune ]; }; - joe-at-home = {pkgs, ...}: { home.packages = [ pkgs.cowsay ]; }; -} - - then the command home-manager switch -A joe-at-work - will activate the profile containing the fortune program. - - - - - - - - - - Add a path to the Nix expression search path. For example, to build a - Home Manager profile using a specific Nixpkgs run home-manager - -I nixpkgs=/absolute/path/to/nixpkgs build. By default - <nixpkgs> is used. - - - - - - - - - - Build Home Manager configuration from the flake, which must contain the - output homeConfigurations.name. If no name is specified it will first try - username@hostname and then username. - - - - - - - - - - Enable automatic resolution of collisions between unmanaged and managed - files. The name of the original file will be suffixed by the given - extension. For example, - -$ home-manager -b bck switch - - will cause a colliding file ~/.config/foo.conf to be - moved to ~/.config/foo.conf.bck. - - - - - - - - - - - - - Indicates the path to the Home Manager configuration file. If not given, - $XDG_CONFIG_HOME/home-manager/home.nix is used. - - - - - - - - - - - - - Prints usage information for the home-manager tool. - - - - - - - - - - Prints the version number of the home-manager tool. - - - - - - - - - - - - - Perform a dry-run of the given operation, only prints what actions would - be taken. - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - - - - Passed on to - nix build - - when building from a flake. - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 . - - - - - - - - - - Passed on to - nix-build - 1 - when running home-manager build. - - - - - - - - - - Passed on to - nix-build - 1 - - - - - - - - - - - - - Activates verbose output. - - - - - - - Files - - - - $XDG_DATA_HOME/home-manager/news-read-ids - - - - Identifiers of news items that have been shown. Can be deleted to reset - the read news indicator. - - - - - - - Bugs - - Please report any bugs on the - project - issue tracker. - - - - See also - - - home-configuration.nix - 5 - - - diff --git a/third_party/home-manager/docs/man-pages.xml b/third_party/home-manager/docs/man-pages.xml deleted file mode 100644 index a68b0e60d7..0000000000 --- a/third_party/home-manager/docs/man-pages.xml +++ /dev/null @@ -1,12 +0,0 @@ - - Home Manager Reference Pages - - Home Manager contributors - 2017–2022Home Manager contributors - - - - - diff --git a/third_party/home-manager/docs/manual.xml b/third_party/home-manager/docs/manual.xml deleted file mode 100644 index af757caf87..0000000000 --- a/third_party/home-manager/docs/manual.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - Home Manager Manual - - - Preface - - This manual will eventually describe how to install, use, and extend Home - Manager. - - - If you encounter problems then please reach out on the IRC channel - #home-manager - hosted by OFTC. - There is also a Matrix room, - which is bridged to the IRC channel. - If your problem is caused by a bug in Home Manager then it should - be reported on the - Home Manager issue tracker. - - - - Commands prefixed with $ sudo have to be run as root, either - requiring to login as root user or temporarily switching to it using - sudo for example. - - - - - - - - - - - - Configuration Options - - - - NixOS Module Options - - - - nix-darwin Module Options - - - - Tools - - - - diff --git a/third_party/home-manager/docs/manual/3rd-party.md b/third_party/home-manager/docs/manual/3rd-party.md new file mode 100644 index 0000000000..91a55d9b34 --- /dev/null +++ b/third_party/home-manager/docs/manual/3rd-party.md @@ -0,0 +1,14 @@ +# Third-Party Tools and Extensions {#ch-3rd-party} + +Here is a collection of tools and extensions that relate to Home +Manager. Note, these are maintained outside the regular Home Manager +flow so quality and support may vary wildly. If you encounter problems +then please raise them in the corresponding project, not as issues in +the Home Manager tracker. + +If you have made something interesting related to Home Manager then you +are encouraged to create a PR that expands this chapter. + +```{=include=} sections +3rd-party/collections.md +``` diff --git a/third_party/home-manager/docs/manual/3rd-party/collections.md b/third_party/home-manager/docs/manual/3rd-party/collections.md new file mode 100644 index 0000000000..af2d7bbfae --- /dev/null +++ b/third_party/home-manager/docs/manual/3rd-party/collections.md @@ -0,0 +1,11 @@ +# Module Collections {#sec-3rd-party-module-collections} + +- [xhmm --- extra Home Manager + modules](https://github.com/schuelermine/xhmm) + + A collection of modules maintained by Anselm Schüler. + +- [Stylix --- System-wide colorscheming and + typography](https://github.com/danth/stylix/) + + Configure your applications to get coherent color scheme and font. diff --git a/third_party/home-manager/docs/manual/contributing.md b/third_party/home-manager/docs/manual/contributing.md new file mode 100644 index 0000000000..54b5dac5d9 --- /dev/null +++ b/third_party/home-manager/docs/manual/contributing.md @@ -0,0 +1,27 @@ +# Contributing {#ch-contributing} + +Contributions to Home Manager are very welcome. To make the process as +smooth as possible for both you and the Home Manager maintainers we +provide some guidelines that we ask you to follow. See [Getting +started](#sec-contrib-getting-started) for information on how to set up +a suitable development environment and [Guidelines](#sec-guidelines) for +the actual guidelines. + +This text is mainly directed at those who would like to make code +contributions to Home Manager. If you just want to report a bug then +first look among the already [open +issues](https://github.com/nix-community/home-manager/issues), if you +find one matching yours then feel free to comment on it to add any +additional information you may have. If no matching issue exists then go +to the [new +issue](https://github.com/nix-community/home-manager/issues/new) page +and write a description of your problem. Include as much information as +you can, ideally also include relevant excerpts from your Home Manager +configuration. + +```{=include=} sections +contributing/getting-started.md +contributing/guidelines.md +contributing/news.md +contributing/tests.md +``` diff --git a/third_party/home-manager/docs/manual/contributing/getting-started.md b/third_party/home-manager/docs/manual/contributing/getting-started.md new file mode 100644 index 0000000000..d527ebd8a0 --- /dev/null +++ b/third_party/home-manager/docs/manual/contributing/getting-started.md @@ -0,0 +1,43 @@ +# Getting started {#sec-contrib-getting-started} + +If you have not previously forked Home Manager then you need to do that +first. Have a look at GitHub's [Fork a +repo](https://help.github.com/articles/fork-a-repo/) for instructions on +how to do this. + +Once you have a fork of Home Manager you should create a branch starting +at the most recent `master` branch. Give your branch a reasonably +descriptive name. Commit your changes to this branch and when you are +happy with the result and it fulfills [Guidelines](#sec-guidelines) then +push the branch to GitHub and [create a pull +request](https://help.github.com/articles/creating-a-pull-request/). + +Assuming your clone is at `$HOME/devel/home-manager` then you can make +the `home-manager` command use it by either + +1. overriding the default path by using the `-I` command line option: + + ``` shell + $ home-manager -I home-manager=$HOME/devel/home-manager + ``` + + or, if using [flakes](#sec-flakes-standalone): + + ``` shell + $ home-manager --override-input home-manager ~/devel/home-manager + ``` + + or + +2. changing the default path by ensuring your configuration includes + + ``` nix + programs.home-manager.enable = true; + programs.home-manager.path = "$HOME/devel/home-manager"; + ``` + + and running `home-manager switch` to activate the change. + Afterwards, `home-manager build` and `home-manager switch` will use + your cloned repository. + +The first option is good if you only temporarily want to use your clone. diff --git a/third_party/home-manager/docs/manual/contributing/guidelines.md b/third_party/home-manager/docs/manual/contributing/guidelines.md new file mode 100644 index 0000000000..6094539e64 --- /dev/null +++ b/third_party/home-manager/docs/manual/contributing/guidelines.md @@ -0,0 +1,221 @@ +# Guidelines {#sec-guidelines} + +If your contribution satisfy the following rules then there is a good +chance it will be merged without too much trouble. The rules are +enforced by the Home Manager maintainers and to a lesser extent the Home +Manager CI system. + +If you are uncertain how these rules affect the change you would like to +make then feel free to start a discussion in the +[#home-manager](https://webchat.oftc.net/?channels=home-manager) IRC +channel, ideally before you start developing. + +## Maintain backward compatibility {#sec-guidelines-back-compat} + +Your contribution should not cause another user's existing configuration +to break unless there is a very good reason and the change should be +announced to the user through an +[assertion](https://nixos.org/manual/nixos/stable/index.html#sec-assertions) +or similar. + +Remember that Home Manager is used in many different environments and +you should consider how your change may effect others. For example, + +- Does your change work for people that do not use NixOS? Consider + other GNU/Linux distributions and macOS. + +- Does your change work for people whose configuration is built on one + system and deployed on another system? + +## Keep forward compatibility in mind {#sec-guidelines-forward-compat} + +The master branch of Home Manager tracks the unstable channel of +Nixpkgs, which may update package versions at any time. It is therefore +important to consider how a package update may affect your code and try +to reduce the risk of breakage. + +The most effective way to reduce this risk is to follow the advice in +[Add only valuable options](#sec-guidelines-valuable-options). + +## Add only valuable options {#sec-guidelines-valuable-options} + +When creating a new module it is tempting to include every option +supported by the software. This is *strongly* discouraged. Providing +many options increases maintenance burden and risk of breakage +considerably. This is why only the most [important software +options](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md#valuable-options) +should be modeled explicitly. Less important options should be +expressible through an `extraConfig` escape hatch. + +A good rule of thumb for the first implementation of a module is to only +add explicit options for those settings that absolutely must be set for +the software to function correctly. It follows that a module for +software that provides sensible default values for all settings would +require no explicit options at all. + +If the software uses a structured configuration format like a JSON, +YAML, INI, TOML, or even a plain list of key/value pairs then consider +using a `settings` option as described in [Nix RFC +42](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md). + +## Add relevant tests {#sec-guidelines-add-tests} + +If at all possible, make sure to add new tests and expand existing tests +so that your change will keep working in the future. See +[Tests](#sec-tests) for more information about the Home Manager test +suite. + +All contributed code *must* pass the test suite. + +## Add relevant documentation {#sec-guidelines-module-maintainer} + +Many code changes require changing the documentation as well. Module +options should be documented with [Nixpkgs-flavoured +Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup). +Home Manager is itself documented using a combination of +[DocBook](https://tdg.docbook.org/) and +[AsciiDoc](https://asciidoc.org/). All text is hosted in Home Manager's +Git repository. + +The HTML version of the manual containing both the module option +descriptions and the documentation of Home Manager can be generated and +opened by typing the following in a shell within a clone of the Home +Manager Git repository: + +``` shell +$ nix-build -A docs.html +$ xdg-open ./result/share/doc/home-manager/index.html +``` + +When you have made changes to a module, it is a good idea to check that +the man page version of the module options looks good: + +``` shell +$ nix-build -A docs.manPages +$ man ./result/share/man/man5/home-configuration.nix.5.gz +``` + +## Add yourself as a module maintainer {#_add_yourself_as_a_module_maintainer} + +Every new module *must* include a named maintainer using the +`meta.maintainers` attribute. If you are a user of a module that +currently lacks a maintainer then please consider adopting it. + +If you are present in the nixpkgs maintainer list then you can use that +entry. If you are not then you can add yourself to +`modules/lib/maintainers.nix` in the Home Manager project. + +Maintainers are encouraged to join the IRC or Matrix channel and +participate when they have opportunity. + +## Format your code {#sec-guidelines-code-style} + +Make sure your code is formatted as described in [Code +Style](#sec-code-style). To maintain consistency throughout the project +you are encouraged to browse through existing code and adopt its style +also in new code. + +## Format your commit messages {#sec-guidelines-commit-message-style} + +Similar to [Format your code](#sec-guidelines-code-style) we encourage a +consistent commit message format as described in +[Commits](#sec-commit-style). + +## Format your news entries {#sec-guidelines-news-style} + +If your contribution includes a change that should be communicated to +users of Home Manager then you can add a news entry. The entry must be +formatted as described in [News](#sec-news). + +When new modules are added a news entry should be included but you do +not need to create this entry manually. The merging maintainer will +create the entry for you. This is to reduce the risk of merge conflicts. + +## Use conditional modules and news {#sec-guidelines-conditional-modules} + +Home Manager includes a number of modules that are only usable on some +of the supported platforms. The most common example of platform specific +modules are those that define systemd user services, which only works on +Linux systems. + +If you add a module that is platform specific then make sure to include +a condition in the `loadModule` function call. This will make the module +accessible only on systems where the condition evaluates to `true`. + +Similarly, if you are adding a news entry then it should be shown only +to users that may find it relevant, see [News](#sec-news) for a +description of conditional news. + +## Mind the license {#sec-guidelines-licensing} + +The Home Manager project is covered by the MIT license and we can only +accept contributions that fall under this license, or are licensed in a +compatible way. When you contribute self written code and documentation +it is assumed that you are doing so under the MIT license. + +A potential gotcha with respect to licensing are option descriptions. +Often it is convenient to copy from the upstream software documentation. +When this is done it is important to verify that the license of the +upstream documentation allows redistribution under the terms of the MIT +license. + +## Commits {#sec-commit-style} + +The commits in your pull request should be reasonably self-contained, +that is, each commit should make sense in isolation. In particular, you +will be asked to amend any commit that introduces syntax errors or +similar problems even if they are fixed in a later commit. + +The commit messages should follow the [seven +rules](https://chris.beams.io/posts/git-commit/#seven-rules), except for +\"Capitalize the subject line\". We also ask you to include the affected +code component or module in the first line. That is, a commit message +should follow the template + + {component}: {description} + + {long description} + +where `{component}` refers to the code component (or module) your change +affects, `{description}` is a very brief description of your change, and +`{long description}` is an optional clarifying description. As a rare +exception, if there is no clear component, or your change affects many +components, then the `{component}` part is optional. See +[example_title](#ex-commit-message) for a commit message that fulfills +these requirements. + +## Example commit {#ex-commit-message} + +The commit +[69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef) +contains the commit message + +``` + + starship: allow running in Emacs if vterm is used + + The vterm buffer is backed by libvterm and can handle Starship prompts + without issues. +``` + +which ticks all the boxes necessary to be accepted in Home Manager. + +Finally, when adding a new module, say `programs/foo.nix`, we use the +fixed commit format `foo: add module`. You can, of course, still include +a long description if you wish. + +## Code Style {#sec-code-style} + +The code in Home Manager is formatted by the +[nixfmt](https://github.com/serokell/nixfmt/) tool and the formatting is +checked in the pull request tests. Run the `format` tool inside the +project repository before submitting your pull request. + +Keep lines at a reasonable width, ideally 80 characters or less. This +also applies to string literals. + +We prefer `lowerCamelCase` for variable and attribute names with the +accepted exception of variables directly referencing packages in Nixpkgs +which use a hyphenated style. For example, the Home Manager option +`services.gpg-agent.enableSshSupport` references the `gpg-agent` package +in Nixpkgs. diff --git a/third_party/home-manager/docs/manual/contributing/news.md b/third_party/home-manager/docs/manual/contributing/news.md new file mode 100644 index 0000000000..80e1b0df05 --- /dev/null +++ b/third_party/home-manager/docs/manual/contributing/news.md @@ -0,0 +1,57 @@ +# News {#sec-news} + +Home Manager includes a system for presenting news to the user. When +making a change you, therefore, have the option to also include an +associated news entry. In general, a news entry should only be added for +truly noteworthy news. For example, a bug fix or new option does +generally not need a news entry. + +If you do have a change worthy of a news entry then please add one in +[`news.nix`](https://github.com/nix-community/home-manager/blob/master/modules/misc/news.nix) +but you should follow some basic guidelines: + +- The entry timestamp should be in ISO-8601 format having \"+00:00\" + as time zone. For example, \"2017-09-13T17:10:14+00:00\". A suitable + timestamp can be produced by the command + + ``` shell + $ date --iso-8601=second --universal + ``` + +- The entry condition should be as specific as possible. For example, + if you are changing or deprecating a specific option then you could + restrict the news to those users who actually use this option. + +- Wrap the news message so that it will fit in the typical terminal, + that is, at most 80 characters wide. Ideally a bit less. + +- Unlike commit messages, news will be read without any connection to + the Home Manager source code. It is therefore important to make the + message understandable in isolation and to those who do not have + knowledge of the Home Manager internals. To this end it should be + written in more descriptive, prose like way. + +- If you refer to an option then write its full attribute path. That + is, instead of writing + + The option 'foo' has been deprecated, please use 'bar' instead. + + it should read + + The option 'services.myservice.foo' has been deprecated, please + use 'services.myservice.bar' instead. + +- A new module, say `foo.nix`, should always include a news entry that + has a message along the lines of + + A new module is available: 'services.foo'. + + If the module is platform specific, e.g., a service module using + systemd, then a condition like + + ``` nix + condition = hostPlatform.isLinux; + ``` + + should be added. If you contribute a module then you don't need to + add this entry, the merger will create an entry for you. diff --git a/third_party/home-manager/docs/manual/contributing/tests.md b/third_party/home-manager/docs/manual/contributing/tests.md new file mode 100644 index 0000000000..bc3956ae3d --- /dev/null +++ b/third_party/home-manager/docs/manual/contributing/tests.md @@ -0,0 +1,38 @@ +# Tests {#sec-tests} + +Home Manager includes a basic test suite and it is highly recommended to +include at least one test when adding a module. Tests are typically in +the form of \"golden tests\" where, for example, a generated +configuration file is compared to a known correct file. + +It is relatively easy to create tests by modeling the existing tests, +found in the `tests` project directory. For a full reference to the +functions available in test scripts, you can look at NMT's +[bash-lib](https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib). + +The full Home Manager test suite can be run by executing + +``` shell +$ nix-shell --pure tests -A run.all +``` + +in the project root. List all test cases through + +``` shell +$ nix-shell --pure tests -A list +``` + +and run an individual test, for example `alacritty-empty-settings`, +through + +``` shell +$ nix-shell --pure tests -A run.alacritty-empty-settings +``` + +However, those invocations will impurely source the system's nixpkgs, +and may cause failures. To run against the nixpkgs from the flake.lock, +use instead e.g. + +``` shell +$ nix develop --ignore-environment .#all +``` diff --git a/third_party/home-manager/docs/manual/faq.md b/third_party/home-manager/docs/manual/faq.md new file mode 100644 index 0000000000..bc50174d57 --- /dev/null +++ b/third_party/home-manager/docs/manual/faq.md @@ -0,0 +1,10 @@ +# Frequently Asked Questions (FAQ) {#ch-faq} + +```{=include=} sections +faq/collision.md +faq/session-variables.md +faq/multiple-users-machines.md +faq/ca-desrt-dconf.md +faq/unstable.md +faq/override-package-module.md +``` diff --git a/third_party/home-manager/docs/manual/faq/ca-desrt-dconf.md b/third_party/home-manager/docs/manual/faq/ca-desrt-dconf.md new file mode 100644 index 0000000000..8ba0d58b47 --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/ca-desrt-dconf.md @@ -0,0 +1,19 @@ +# Why do I get an error message about `ca.desrt.dconf` or `dconf.service`? {#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal} + +You are most likely trying to configure something that uses dconf but +the DBus session is not aware of the dconf service. The full error you +might get is + + error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files + +or + + error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found. + +The solution on NixOS is to add + +``` nix +programs.dconf.enable = true; +``` + +to your system configuration. diff --git a/third_party/home-manager/docs/manual/faq/collision.md b/third_party/home-manager/docs/manual/faq/collision.md new file mode 100644 index 0000000000..543b588c76 --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/collision.md @@ -0,0 +1,47 @@ +# Why is there a collision error when switching generation? {#_why_is_there_a_collision_error_when_switching_generation} + +Home Manager currently installs packages into the user environment, +precisely as if the packages were installed through `nix-env --install`. +This means that you will get a collision error if your Home Manager +configuration attempts to install a package that you already have +installed manually, that is, packages that shows up when you run +`nix-env --query`. + +For example, imagine you have the `hello` package installed in your +environment + +``` shell +$ nix-env --query +hello-2.10 +``` + +and your Home Manager configuration contains + +``` nix +home.packages = [ pkgs.hello ]; +``` + +Then attempting to switch to this configuration will result in an error +similar to + +``` shell +$ home-manager switch +these derivations will be built: + /nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv +[…] +Activating installPackages +replacing old ‘home-manager-path’ +installing ‘home-manager-path’ +building path(s) ‘/nix/store/b5c0asjz9f06l52l9812w6k39ifr49jj-user-environment’ +Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79. +collision between ‘/nix/store/fmwa4axzghz11cnln5absh31nbhs9lq1-home-manager-path/bin/hello’ and ‘/nix/store/c2wyl8b9p4afivpcz8jplc9kis8rj36d-hello-2.10/bin/hello’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages +builder for ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed with exit code 2 +error: build of ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed +``` + +The solution is typically to uninstall the package from the environment +using `nix-env --uninstall` and reattempt the Home Manager generation +switch. + +You could also opt to unistall *all* of the packages from your profile +with `nix-env --uninstall '*'`. diff --git a/third_party/home-manager/docs/manual/faq/multiple-users-machines.md b/third_party/home-manager/docs/manual/faq/multiple-users-machines.md new file mode 100644 index 0000000000..3ef0d8f315 --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/multiple-users-machines.md @@ -0,0 +1,39 @@ +# How to set up a configuration for multiple users/machines? {#_how_to_set_up_a_configuration_for_multiple_users_machines} + +A typical way to prepare a repository of configurations for multiple +logins and machines is to prepare one \"top-level\" file for each unique +combination. + +For example, if you have two machines, called \"kronos\" and \"rhea\" on +which you want to configure your user \"jane\" then you could create the +files + +- `kronos-jane.nix`, + +- `rhea-jane.nix`, and + +- `common.nix` + +in your repository. On the kronos and rhea machines you can then make +`~jane/.config/home-manager/home.nix` be a symbolic link to the +corresponding file in your configuration repository. + +The `kronos-jane.nix` and `rhea-jane.nix` files follow the format + +``` nix +{ ... }: + +{ + imports = [ ./common.nix ]; + + # Various options that are specific for this machine/user. +} +``` + +while the `common.nix` file contains configuration shared across the two +logins. Of course, instead of just a single `common.nix` file you can +have multiple ones, even one per program or service. + +You can get some inspiration from the [Post your home-manager home.nix +file!](https://www.reddit.com/r/NixOS/comments/9bb9h9/post_your_homemanager_homenix_file/) +Reddit thread. diff --git a/third_party/home-manager/docs/manual/faq/override-package-module.md b/third_party/home-manager/docs/manual/faq/override-package-module.md new file mode 100644 index 0000000000..60b847625c --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/override-package-module.md @@ -0,0 +1,44 @@ +# How do I override the package used by a module? {#_how_do_i_override_the_package_used_by_a_module} + +By default Home Manager will install the package provided by your chosen +`nixpkgs` channel but occasionally you might end up needing to change +this package. This can typically be done in two ways. + +1. If the module provides a `package` option, such as + `programs.beets.package`, then this is the recommended way to + perform the override. For example, + + ``` nix + programs.beets.package = pkgs.beets.override { enableCheck = true; }; + ``` + +2. If no `package` option is available then you can typically override + the relevant package using an + [overlay](https://nixos.org/nixpkgs/manual/#chap-overlays). + + For example, if you want to use the `programs.skim` module but use + the `skim` package from Nixpkgs unstable, then a configuration like + + ``` nix + { pkgs, config, ... }: + + let + + pkgsUnstable = import {}; + + in + + { + programs.skim.enable = true; + + nixpkgs.overlays = [ + (self: super: { + skim = pkgsUnstable.skim; + }) + ]; + + # … + } + ``` + + should work OK. diff --git a/third_party/home-manager/docs/manual/faq/session-variables.md b/third_party/home-manager/docs/manual/faq/session-variables.md new file mode 100644 index 0000000000..5c85866285 --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/session-variables.md @@ -0,0 +1,24 @@ +# Why are the session variables not set? {#_why_are_the_session_variables_not_set} + +Home Manager is only able to set session variables automatically if it +manages your Bash, Z shell, or fish shell configuration. To enable such +management you use [programs.bash.enable](#opt-programs.bash.enable), +[programs.zsh.enable](#opt-programs.zsh.enable), or [programs.fish.enable](#opt-programs.fish.enable). + +If you don't want to let Home Manager manage your shell then you will +have to manually source the +`~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate +way. In Bash and Z shell this can be done by adding + +``` bash +. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" +``` + +to your `.profile` and `.zshrc` files, respectively. The +`hm-session-vars.sh` file should work in most Bourne-like shells. For +fish shell, it is possible to source it using [the foreign-env +plugin](https://github.com/oh-my-fish/plugin-foreign-env) + +``` bash +fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null +``` diff --git a/third_party/home-manager/docs/manual/faq/unstable.md b/third_party/home-manager/docs/manual/faq/unstable.md new file mode 100644 index 0000000000..84f23a587c --- /dev/null +++ b/third_party/home-manager/docs/manual/faq/unstable.md @@ -0,0 +1,36 @@ +# How do I install packages from Nixpkgs unstable? {#_how_do_i_install_packages_from_nixpkgs_unstable} + +If you are using a stable version of Nixpkgs but would like to install +some particular packages from Nixpkgs unstable -- or some other channel +-- then you can import the unstable Nixpkgs and refer to its packages +within your configuration. Something like + +``` nix +{ pkgs, config, ... }: + +let + + pkgsUnstable = import {}; + +in + +{ + home.packages = [ + pkgsUnstable.foo + ]; + + # … +} +``` + +should work provided you have a Nix channel called `nixpkgs-unstable`. + +You can add the `nixpkgs-unstable` channel by running + +``` shell +$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable +$ nix-channel --update +``` + +Note, the package will not be affected by any package overrides, +overlays, etc. diff --git a/third_party/home-manager/docs/manual/installation.md b/third_party/home-manager/docs/manual/installation.md new file mode 100644 index 0000000000..b663b68806 --- /dev/null +++ b/third_party/home-manager/docs/manual/installation.md @@ -0,0 +1,35 @@ +# Installing Home Manager {#ch-installation} + +Home Manager can be used in three primary ways: + +1. Using the standalone `home-manager` tool. For platforms other than + NixOS and Darwin, this is the only available choice. It is also + recommended for people on NixOS or Darwin that want to manage their + home directory independently of the system as a whole. See + [Standalone installation](#sec-install-standalone) for instructions + on how to perform this installation. + +2. As a module within a NixOS system configuration. This allows the + user profiles to be built together with the system when running + `nixos-rebuild`. See [NixOS module](#sec-install-nixos-module) for a + description of this setup. + +3. As a module within a + [nix-darwin](https://github.com/LnL7/nix-darwin/) system + configuration. This allows the user profiles to be built together + with the system when running `darwin-rebuild`. See [nix-darwin + module](#sec-install-nix-darwin-module) for a description of this + setup. + +:::{.note} +In this chapter we describe how to install Home Manager in the standard +way using channels. If you prefer to use [Nix +Flakes](https://nixos.wiki/wiki/Flakes) then please see the instructions +in [nix flakes](#ch-nix-flakes). +::: + +```{=include=} sections +installation/standalone.md +installation/nixos.md +installation/nix-darwin.md +``` diff --git a/third_party/home-manager/docs/manual/installation/nix-darwin.md b/third_party/home-manager/docs/manual/installation/nix-darwin.md new file mode 100644 index 0000000000..afa93e8f94 --- /dev/null +++ b/third_party/home-manager/docs/manual/installation/nix-darwin.md @@ -0,0 +1,115 @@ +# nix-darwin module {#sec-install-nix-darwin-module} + +Home Manager provides a module that allows you to prepare user +environments directly from the +[nix-darwin](https://github.com/LnL7/nix-darwin/) configuration file, +which often is more convenient than using the `home-manager` tool. + +To make the NixOS module available for use you must `import` it into +your system configuration. This is most conveniently done by adding a +Home Manager channel. For example, if you are following Nixpkgs master +or an unstable channel, you can run + +``` shell +$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +$ nix-channel --update +``` + +and if you follow a Nixpkgs version 23.11 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 --update +``` + +It is then possible to add + +``` nix +imports = [ ]; +``` + +to your nix-darwin `configuration.nix` file, which will introduce a new +NixOS option called `home-manager` whose type is an attribute set that +maps user names to Home Manager configurations. + +For example, a nix-darwin configuration may include the lines + +``` nix +users.users.eve = { + name = "eve"; + home = "/Users/eve"; +}; +home-manager.users.eve = { pkgs, ... }: { + home.packages = [ pkgs.atool pkgs.httpie ]; + programs.bash.enable = true; + + # The state version is required and should stay at the version you + # originally installed. + home.stateVersion = "23.11"; +}; +``` + +and after a `darwin-rebuild switch` the user eve's environment should +include a basic Bash configuration and the packages atool and httpie. + +If you do not plan on having Home Manager manage your shell +configuration then you must add either + +``` bash +. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" +``` + +or + +``` bash +. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh" +``` + +to your shell configuration, depending on whether +[home-manager.useUserPackages](#nix-darwin-opt-home-manager.useUserPackages) is enabled. This +file can be sourced directly by POSIX.2-like shells such as +[Bash](https://www.gnu.org/software/bash/) or [Z +shell](http://zsh.sourceforge.net/). [Fish](https://fishshell.com) users +can use utilities such as +[foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) or +[babelfish](https://github.com/bouk/babelfish). + +:::{.note} +By default user packages will not be ignored in favor of +`environment.systemPackages`, but they will be installed to +`/etc/profiles/per-user/$USERNAME` if + +``` nix +home-manager.useUserPackages = true; +``` + +is added to the nix-darwin configuration. This option may become the +default value in the future. +::: + +:::{.note} +By default, Home Manager uses a private `pkgs` instance that is +configured via the `home-manager.users..nixpkgs` options. To +instead use the global `pkgs` that is configured via the system level +`nixpkgs` options, set + +``` nix +home-manager.useGlobalPkgs = true; +``` + +This saves an extra Nixpkgs evaluation, adds consistency, and removes +the dependency on `NIX_PATH`, which is otherwise used for importing +Nixpkgs. +::: + +:::{.note} +Home Manager will pass `osConfig` as a module argument to any modules +you create. This contains the system's nix-darwin configuration. + +``` nix +{ lib, pkgs, osConfig, ... }: +``` +::: + +Once installed you can see [Using Home Manager](#ch-usage) for a more detailed +description of Home Manager and how to use it. diff --git a/third_party/home-manager/docs/manual/installation/nixos.md b/third_party/home-manager/docs/manual/installation/nixos.md new file mode 100644 index 0000000000..18a60e96cf --- /dev/null +++ b/third_party/home-manager/docs/manual/installation/nixos.md @@ -0,0 +1,125 @@ +# NixOS module {#sec-install-nixos-module} + +Home Manager provides a NixOS module that allows you to prepare user +environments directly from the system configuration file, which often is +more convenient than using the `home-manager` tool. It also opens up +additional possibilities, for example, to automatically configure user +environments in NixOS declarative containers or on systems deployed +through NixOps. + +To make the NixOS module available for use you must `import` it into +your system configuration. This is most conveniently done by adding a +Home Manager channel to the root user. For example, if you are following +Nixpkgs master or an unstable channel, you can run + +``` shell +$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +$ sudo nix-channel --update +``` + +and if you follow a Nixpkgs version 23.11 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 --update +``` + +It is then possible to add + +``` nix +imports = [ ]; +``` + +to your system `configuration.nix` file, which will introduce a new +NixOS option called `home-manager.users` whose type is an attribute set +that maps user names to Home Manager configurations. + +For example, a NixOS configuration may include the lines + +``` nix +users.users.eve.isNormalUser = true; +home-manager.users.eve = { pkgs, ... }: { + home.packages = [ pkgs.atool pkgs.httpie ]; + programs.bash.enable = true; + + # The state version is required and should stay at the version you + # originally installed. + home.stateVersion = "23.11"; +}; +``` + +and after a `sudo nixos-rebuild switch` the user eve's environment +should include a basic Bash configuration and the packages atool and +httpie. + +:::{.note} +If `nixos-rebuild switch` does not result in the environment you expect, +you can take a look at the output of the Home Manager activation script +output using + +``` shell +$ systemctl status "home-manager-$USER.service" +``` +::: + +If you do not plan on having Home Manager manage your shell +configuration then you must add either + +``` bash +. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" +``` + +or + +``` bash +. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh" +``` + +to your shell configuration, depending on whether +[home-manager.useUserPackages](#nixos-opt-home-manager.useUserPackages) is enabled. This file can +be sourced directly by POSIX.2-like shells such as +[Bash](https://www.gnu.org/software/bash/) or [Z +shell](http://zsh.sourceforge.net/). [Fish](https://fishshell.com) users +can use utilities such as +[foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) or +[babelfish](https://github.com/bouk/babelfish). + +:::{.note} +By default packages will be installed to `$HOME/.nix-profile` but they +can be installed to `/etc/profiles` if + +``` nix +home-manager.useUserPackages = true; +``` + +is added to the system configuration. This is necessary if, for example, +you wish to use `nixos-rebuild build-vm`. This option may become the +default value in the future. +::: + +:::{.note} +By default, Home Manager uses a private `pkgs` instance that is +configured via the `home-manager.users..nixpkgs` options. To +instead use the global `pkgs` that is configured via the system level +`nixpkgs` options, set + +``` nix +home-manager.useGlobalPkgs = true; +``` + +This saves an extra Nixpkgs evaluation, adds consistency, and removes +the dependency on `NIX_PATH`, which is otherwise used for importing +Nixpkgs. +::: + +:::{.note} +Home Manager will pass `osConfig` as a module argument to any modules +you create. This contains the system's NixOS configuration. + +``` nix +{ lib, pkgs, osConfig, ... }: +``` +::: + +Once installed you can see [Using Home Manager](#ch-usage) for a more detailed +description of Home Manager and how to use it. diff --git a/third_party/home-manager/docs/manual/installation/standalone.md b/third_party/home-manager/docs/manual/installation/standalone.md new file mode 100644 index 0000000000..7ca38ef652 --- /dev/null +++ b/third_party/home-manager/docs/manual/installation/standalone.md @@ -0,0 +1,75 @@ +# Standalone installation {#sec-install-standalone} + +1. Make sure you have a working Nix installation. Specifically, make + sure that your user is able to build and install Nix packages. For + example, you should be able to successfully run a command like + `nix-instantiate '' -A hello` without having to switch to + the root user. For a multi-user install of Nix this means that your + user must be covered by the + [`allowed-users`](https://nixos.org/nix/manual/#conf-allowed-users) + Nix option. On NixOS you can control this option using the + [`nix.settings.allowed-users`](https://nixos.org/manual/nixos/stable/options.html#opt-nix.settings.allowed-users) + system option. + +2. Add the appropriate Home Manager channel. If you are following + Nixpkgs master or an unstable channel you can run + + ``` shell + $ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager + $ nix-channel --update + ``` + + and if you follow a Nixpkgs version 23.11 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 --update + ``` + +3. Run the Home Manager installation command and create the first Home + Manager generation: + + ``` shell + $ nix-shell '' -A install + ``` + + Once finished, Home Manager should be active and available in your + user environment. + +4. If you do not plan on having Home Manager manage your shell + configuration then you must source the + + ``` bash + $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh + ``` + + file in your shell configuration. Alternatively source + + ``` bash + /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh + ``` + + when managing home configuration together with system configuration. + + This file can be sourced directly by POSIX.2-like shells such as + [Bash](https://www.gnu.org/software/bash/) or [Z + shell](http://zsh.sourceforge.net/). [Fish](https://fishshell.com) + users can use utilities such as + [foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) or + [babelfish](https://github.com/bouk/babelfish). + + For example, if you use Bash then add + + ``` bash + . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" + ``` + + to your `~/.profile` file. + +If instead of using channels you want to run Home Manager from a Git +checkout of the repository then you can use the +[home-manager.path](#opt-programs.home-manager.path) option to specify the absolute +path to the repository. + +Once installed you can see [Using Home Manager](#ch-usage) for a more detailed +description of Home Manager and how to use it. diff --git a/third_party/home-manager/docs/manual/manpage-urls.json b/third_party/home-manager/docs/manual/manpage-urls.json new file mode 100644 index 0000000000..e83708dd64 --- /dev/null +++ b/third_party/home-manager/docs/manual/manpage-urls.json @@ -0,0 +1,32 @@ +{ + "gnunet.conf(5)": "https://docs.gnunet.org/users/configuration.html", + "mpd(1)": "https://mpd.readthedocs.io/en/latest/mpd.1.html", + "mpd.conf(5)": "https://mpd.readthedocs.io/en/latest/mpd.conf.5.html", + "nix.conf(5)": "https://nixos.org/manual/nix/stable/command-ref/conf-file.html", + + "journald.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.html", + "logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html", + "networkd.conf(5)": "https://www.freedesktop.org/software/systemd/man/networkd.conf.html", + "systemd.automount(5)": "https://www.freedesktop.org/software/systemd/man/systemd.automount.html", + "systemd.exec(5)": "https://www.freedesktop.org/software/systemd/man/systemd.exec.html", + "systemd.link(5)": "https://www.freedesktop.org/software/systemd/man/systemd.link.html", + "systemd.mount(5)": "https://www.freedesktop.org/software/systemd/man/systemd.mount.html", + "systemd.netdev(5)": "https://www.freedesktop.org/software/systemd/man/systemd.netdev.html", + "systemd.network(5)": "https://www.freedesktop.org/software/systemd/man/systemd.network.html", + "systemd.nspawn(5)": "https://www.freedesktop.org/software/systemd/man/systemd.nspawn.html", + "systemd.path(5)": "https://www.freedesktop.org/software/systemd/man/systemd.path.html", + "systemd.resource-control(5)": "https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html", + "systemd.scope(5)": "https://www.freedesktop.org/software/systemd/man/systemd.scope.html", + "systemd.service(5)": "https://www.freedesktop.org/software/systemd/man/systemd.service.html", + "systemd.slice(5)": "https://www.freedesktop.org/software/systemd/man/systemd.slice.html", + "systemd.socket(5)": "https://www.freedesktop.org/software/systemd/man/systemd.socket.html", + "systemd.timer(5)": "https://www.freedesktop.org/software/systemd/man/systemd.timer.html", + "systemd.unit(5)": "https://www.freedesktop.org/software/systemd/man/systemd.unit.html", + "systemd-system.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html", + "systemd-user.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-user.conf.html", + "timesyncd.conf(5)": "https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html", + "tmpfiles.d(5)": "https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html", + "systemd.time(7)": "https://www.freedesktop.org/software/systemd/man/systemd.time.html", + "systemd-fstab-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html", + "systemd-networkd-wait-online.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.service.html" +} diff --git a/third_party/home-manager/docs/manual/manual.md b/third_party/home-manager/docs/manual/manual.md new file mode 100644 index 0000000000..a1cfb1a0c4 --- /dev/null +++ b/third_party/home-manager/docs/manual/manual.md @@ -0,0 +1,33 @@ +# Home Manager Manual {#home-manager-manual} + +## Version 24.05 (unstable) + + +```{=include=} preface +preface.md +``` + +```{=include=} parts +installation.md +usage.md +nix-flakes.md +writing-modules.md +contributing.md +3rd-party.md +faq.md +``` + +```{=include=} appendix html:into-file=//options.xhtml +options.md +``` + +```{=include=} appendix html:into-file=//nixos-options.xhtml +nixos-options.md +``` + +```{=include=} appendix html:into-file=//nix-darwin-options.xhtml +nix-darwin-options.md +``` +```{=include=} appendix html:into-file=//release-notes.xhtml +release-notes/release-notes.md +``` diff --git a/third_party/home-manager/docs/manual/nix-darwin-options.md b/third_party/home-manager/docs/manual/nix-darwin-options.md new file mode 100644 index 0000000000..bb9000d5b6 --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-darwin-options.md @@ -0,0 +1,7 @@ +# nix-darwin Configuration Options {#ch-nix-darwin-options} + +```{=include=} options +id-prefix: nix-darwin-opt- +list-id: nix-darwin-options +source: @OPTIONS_JSON@ +``` diff --git a/third_party/home-manager/docs/manual/nix-flakes.md b/third_party/home-manager/docs/manual/nix-flakes.md new file mode 100644 index 0000000000..9ac5c0cf16 --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-flakes.md @@ -0,0 +1,35 @@ +# Nix Flakes {#ch-nix-flakes} + +Home Manager is compatible with [Nix +Flakes](https://nixos.wiki/wiki/Flakes). But please be aware that this +support is still experimental and may change in backwards +incompatible ways. + +Just like in the standard installation you can use the Home Manager +flake in three ways: + +1. Using the standalone `home-manager` tool. For platforms other than + NixOS and Darwin, this is the only available choice. It is also + recommended for people on NixOS or Darwin that want to manage their + home directory independently of the system as a whole. See + [Standalone setup](#sec-flakes-standalone) for instructions on how + to perform this installation. + +2. As a module within a NixOS system configuration. This allows the + user profiles to be built together with the system when running + `nixos-rebuild`. See [NixOS module](#sec-flakes-nixos-module) for a + description of this setup. + +3. This allows the user profiles to be built together with the system + when running `darwin-rebuild`. See [nix-darwin + module](#sec-flakes-nix-darwin-module) for a description of this + setup. + +```{=include=} sections +nix-flakes/prerequisites.md +nix-flakes/standalone.md +nix-flakes/nixos.md +nix-flakes/nix-darwin.md +``` + + diff --git a/third_party/home-manager/docs/manual/nix-flakes/nix-darwin.md b/third_party/home-manager/docs/manual/nix-flakes/nix-darwin.md new file mode 100644 index 0000000000..133d917937 --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-flakes/nix-darwin.md @@ -0,0 +1,47 @@ +# nix-darwin module {#sec-flakes-nix-darwin-module} + +The flake-based setup of the Home Manager nix-darwin module is similar +to that of NixOS. The `flake.nix` would be: + +``` nix +{ + description = "Darwin configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + darwin.url = "github:lnl7/nix-darwin"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: { + darwinConfigurations = { + hostname = darwin.lib.darwinSystem { + system = "x86_64-darwin"; + modules = [ + ./configuration.nix + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.jdoe = import ./home.nix; + + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + } + ]; + }; + }; + }; +} +``` + +and it is also rebuilt with the nix-darwin generations. The rebuild +command here may be `darwin-rebuild switch --flake `. + +You can use the above `flake.nix` as a template in `~/.config/darwin` by + +``` shell +$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin +``` diff --git a/third_party/home-manager/docs/manual/nix-flakes/nixos.md b/third_party/home-manager/docs/manual/nix-flakes/nixos.md new file mode 100644 index 0000000000..71a3e33c7e --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-flakes/nixos.md @@ -0,0 +1,47 @@ +# NixOS module {#sec-flakes-nixos-module} + +To use Home Manager as a NixOS module, a bare-minimum `flake.nix` would +be as follows: + +``` nix +{ + description = "NixOS configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ nixpkgs, home-manager, ... }: { + nixosConfigurations = { + hostname = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.jdoe = import ./home.nix; + + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + } + ]; + }; + }; + }; +} +``` + +The Home Manager configuration is then part of the NixOS configuration +and is automatically rebuilt with the system when using the appropriate +command for the system, such as +`nixos-rebuild switch --flake `. + +You can use the above `flake.nix` as a template in `/etc/nixos` by + +``` shell +$ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos +``` diff --git a/third_party/home-manager/docs/manual/nix-flakes/prerequisites.md b/third_party/home-manager/docs/manual/nix-flakes/prerequisites.md new file mode 100644 index 0000000000..fa48ce856d --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-flakes/prerequisites.md @@ -0,0 +1,42 @@ +# Prerequisites {#sec-flakes-prerequisites} + +- Install Nix 2.4 or later, or have it in `nix-shell`. + +- Enable experimental features `nix-command` and `flakes`. + + - When using NixOS, add the following to your `configuration.nix` + and rebuild your system. + + ``` nix + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + ``` + + - If you are not using NixOS, add the following to `nix.conf` + (located at `~/.config/nix/` or `/etc/nix/nix.conf`). + + ``` bash + experimental-features = nix-command flakes + ``` + + You may need to restart the Nix daemon with, for example, + `sudo systemctl restart nix-daemon.service`. + + - Alternatively, you can enable flakes on a per-command basis with + the following additional flags to `nix` and `home-manager`: + + ``` shell + $ nix --extra-experimental-features "nix-command flakes" + $ home-manager --extra-experimental-features "nix-command flakes" + ``` + +- Prepare your Home Manager configuration (`home.nix`). + + Unlike the channel-based setup, `home.nix` will be evaluated when + the flake is built, so it must be present before bootstrap of Home + Manager from the flake. See [Configuration Example](#sec-usage-configuration) for + introduction about writing a Home Manager configuration. diff --git a/third_party/home-manager/docs/manual/nix-flakes/standalone.md b/third_party/home-manager/docs/manual/nix-flakes/standalone.md new file mode 100644 index 0000000000..428f29bc5a --- /dev/null +++ b/third_party/home-manager/docs/manual/nix-flakes/standalone.md @@ -0,0 +1,62 @@ +# Standalone setup {#sec-flakes-standalone} + +To prepare an initial Home Manager configuration for your logged in +user, you can run the Home Manager `init` command directly from its +flake. + +For example, if you are using the unstable version of Nixpkgs or NixOS, +then to generate and activate a basic configuration run the command + +``` shell +$ nix run home-manager/master -- init --switch +``` + +For Nixpkgs or NixOS version 23.11 run + +``` shell +$ nix run home-manager/release-23.11 -- init --switch +``` + +This will generate a `flake.nix` and a `home.nix` file in +`~/.config/home-manager`, creating the directory if it does not exist. + +If you omit the `--switch` option then the activation will not happen. +This is useful if you want to inspect and edit the configuration before +activating it. + +``` shell +$ nix run home-manager/$branch -- init +$ # Edit files in ~/.config/home-manager +$ nix run home-manager/$branch -- init --switch +``` + +Where `$branch` is one of `master` or `release-23.11`. + +After the initial activation has completed successfully then building +and activating your flake-based configuration is as simple as + +``` shell +$ home-manager switch +``` + +It is possible to override the default configuration directory, if you +want. For example, + +``` shell +$ nix run home-manager/$branch -- init --switch ~/hmconf +$ # And after the initial activation. +$ home-manager switch --flake ~/hmconf +``` + +::: {.note} +The flake inputs are not automatically updated by Home Manager. You need +to use the standard `nix flake update` command for that. + +If you only want to update a single flake input, then the command +`nix flake lock --update-input ` can be used. + +You can also pass flake-related options such as `--recreate-lock-file` +or `--update-input ` to `home-manager` when building or +switching, and these options will be forwarded to `nix build`. See the +[NixOS Wiki page](https://nixos.wiki/wiki/Flakes) for details. +::: diff --git a/third_party/home-manager/docs/manual/nixos-options.md b/third_party/home-manager/docs/manual/nixos-options.md new file mode 100644 index 0000000000..0f21031e95 --- /dev/null +++ b/third_party/home-manager/docs/manual/nixos-options.md @@ -0,0 +1,7 @@ +# NixOS Configuration Options {#ch-nixos-options} + +```{=include=} options +id-prefix: nixos-opt- +list-id: nixos-options +source: @OPTIONS_JSON@ +``` diff --git a/third_party/home-manager/docs/manual/options.md b/third_party/home-manager/docs/manual/options.md new file mode 100644 index 0000000000..a781a49a72 --- /dev/null +++ b/third_party/home-manager/docs/manual/options.md @@ -0,0 +1,7 @@ +# Home Manager Configuration Options {#ch-options} + +```{=include=} options +id-prefix: opt- +list-id: home-manager-options +source: @OPTIONS_JSON@ +``` diff --git a/third_party/home-manager/docs/manual/preface.md b/third_party/home-manager/docs/manual/preface.md new file mode 100644 index 0000000000..e855ec7c75 --- /dev/null +++ b/third_party/home-manager/docs/manual/preface.md @@ -0,0 +1,20 @@ +# Preface {#preface} + +This manual will eventually describe how to install, use, and extend Home +Manager. + +If you encounter problems then please reach out on the IRC channel +[#home-manager](https://webchat.oftc.net/?channels=home-manager) +hosted by [OFTC](https://oftc.net/). +There is also a [Matrix room](https://matrix.to/#/%23hm:rycee.net), +which is bridged to the IRC channel. +If your problem is caused by a bug in Home Manager then it should +be reported on the +[Home Manager issue tracker](https://github.com/nix-community/home-manager/issues). + + +:::{.note} +Commands prefixed with `$ sudo` have to be run as root, either +requiring to login as root user or temporarily switching to it using +`sudo` for example. +::: diff --git a/third_party/home-manager/docs/manual/usage.md b/third_party/home-manager/docs/manual/usage.md new file mode 100644 index 0000000000..2a569aaf9b --- /dev/null +++ b/third_party/home-manager/docs/manual/usage.md @@ -0,0 +1,63 @@ +# Using Home Manager {#ch-usage} + +Your use of Home Manager is centered around the configuration file, +which is typically found at `~/.config/home-manager/home.nix` in the +standard installation or `~/.config/home-manager/flake.nix` in a Nix +flake based installation. + +::: {.note} +The default configuration used to be placed in `~/.config/nixpkgs`¸ so +you may see references to that elsewhere. The old directory still works +but Home Manager will print a warning message when used. +::: + +This configuration file can be *built* and *activated*. + +Building a configuration produces a directory in the Nix store that +contains all files and programs that should be available in your home +directory and Nix user profile, respectively. The build step also checks +that the configuration is valid and it will fail with an error if you, +for example, assign a value to an option that does not exist or assign a +value of the wrong type. Some modules also have custom assertions that +perform more detailed, module specific, checks. + +Concretely, if your configuration contains + +``` nix +programs.emacs.enable = "yes"; +``` + +then building it, for example using `home-manager build`, will result in +an error message saying something like + +```console +$ home-manager build +error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values: +- In `/home/jdoe/.config/home-manager/home.nix': "yes" +(use '--show-trace' to show detailed location information) +``` + +The message indicates that you must provide a Boolean value for this +option, that is, either `true` or `false`. The documentation of each +option will state the expected type, for +[programs.emacs.enable](#opt-programs.emacs.enable) you will see "Type: boolean". You +there also find information about the default value and a description of +the option. You can find the complete option documentation in +[Home Manager Configuration Options](#ch-options) or directly in the terminal by running + +``` shell +man home-configuration.nix +``` + +Once a configuration is successfully built, it can be activated. The +activation performs the steps necessary to make the files, programs, and +services available in your user environment. The `home-manager switch` +command performs a combined build and activation. + +```{=include=} sections +usage/configuration.md +usage/rollbacks.md +usage/dotfiles.md +usage/graphical.md +usage/updating.md +``` diff --git a/third_party/home-manager/docs/manual/usage/configuration.md b/third_party/home-manager/docs/manual/usage/configuration.md new file mode 100644 index 0000000000..d611ec1857 --- /dev/null +++ b/third_party/home-manager/docs/manual/usage/configuration.md @@ -0,0 +1,112 @@ +# Configuration Example {#sec-usage-configuration} + +A fresh install of Home Manager will generate a minimal +`~/.config/home-manager/home.nix` file containing something like + +``` nix +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "jdoe"; + home.homeDirectory = "/home/jdoe"; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # 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"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} +``` + +You can use this as a base for your further configurations. + +::: {.note} +If you are not very familiar with the Nix language and NixOS modules +then it is encouraged to start with small and simple changes. As you +learn you can gradually grow the configuration with confidence. +::: + +As an example, let us expand the initial configuration file to also +install the htop and fortune packages, install Emacs with a few extra +packages available, and enable the user gpg-agent service. + +To satisfy the above setup we should elaborate the `home.nix` file as +follows: + +``` nix +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "jdoe"; + home.homeDirectory = "/home/jdoe"; + + # Packages that should be installed to the user profile. + home.packages = [ + pkgs.htop + pkgs.fortune + ]; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # 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"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + programs.emacs = { + enable = true; + extraPackages = epkgs: [ + epkgs.nix-mode + epkgs.magit + ]; + }; + + services.gpg-agent = { + enable = true; + defaultCacheTtl = 1800; + enableSshSupport = true; + }; +} +``` + +- Nixpkgs packages can be installed to the user profile using + [home.packages](#opt-home.packages). + +- The option names of a program module typically start with + `programs.`. + +- Similarly, for a service module, the names start with + `services.`. Note in some cases a package has both + programs *and* service options -- Emacs is such an example. + +To activate this configuration you can run + +``` shell +home-manager switch +``` + +or if you are not feeling so lucky, + +``` shell +home-manager build +``` + +which will create a `result` link to a directory containing an +activation script and the generated home directory files. diff --git a/third_party/home-manager/docs/manual/usage/dotfiles.md b/third_party/home-manager/docs/manual/usage/dotfiles.md new file mode 100644 index 0000000000..5ffedd934d --- /dev/null +++ b/third_party/home-manager/docs/manual/usage/dotfiles.md @@ -0,0 +1,36 @@ +# Keeping your \~ safe from harm {#sec-usage-dotfiles} + +To configure programs and services Home Manager must write various +things to your home directory. To prevent overwriting any existing files +when switching to a new generation, Home Manager will attempt to detect +collisions between existing files and generated files. If any such +collision is detected the activation will terminate before changing +anything on your computer. + +For example, suppose you have a wonderful, painstakingly created +`~/.config/git/config` and add + +``` nix +{ + # … + + programs.git = { + enable = true; + userName = "Jane Doe"; + userEmail = "jane.doe@example.org"; + }; + + # … +} +``` + +to your configuration. Attempting to switch to the generation will then +result in + +``` shell +$ home-manager switch +… +Activating checkLinkTargets +Existing file '/home/jdoe/.config/git/config' is in the way +Please move the above files and try again +``` diff --git a/third_party/home-manager/docs/manual/usage/graphical.md b/third_party/home-manager/docs/manual/usage/graphical.md new file mode 100644 index 0000000000..8b72e7abdc --- /dev/null +++ b/third_party/home-manager/docs/manual/usage/graphical.md @@ -0,0 +1,32 @@ +# Graphical services {#sec-usage-graphical} + +Home Manager includes a number of services intended to run in a +graphical session, for example `xscreensaver` and `dunst`. +Unfortunately, such services will not be started automatically unless +you let Home Manager start your X session. That is, you have something +like + +``` nix +{ + # … + + services.xserver.enable = true; + + # … +} +``` + +in your system configuration and + +``` nix +{ + # … + + xsession.enable = true; + xsession.windowManager.command = "…"; + + # … +} +``` + +in your Home Manager configuration. diff --git a/third_party/home-manager/docs/manual/usage/rollbacks.md b/third_party/home-manager/docs/manual/usage/rollbacks.md new file mode 100644 index 0000000000..5b5180f990 --- /dev/null +++ b/third_party/home-manager/docs/manual/usage/rollbacks.md @@ -0,0 +1,32 @@ +# Rollbacks {#sec-usage-rollbacks} + +While the `home-manager` tool does not explicitly support rollbacks at +the moment it is relatively easy to perform one manually. The steps to +do so are + +1. Run `home-manager generations` to determine which generation you + wish to rollback to: + + ``` shell + $ home-manager generations + 2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation + 2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation + 2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation + 2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation + 2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation + … + ``` + +2. Copy the Nix store path of the generation you chose, e.g., + + /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation + + for generation 763. + +3. Run the `activate` script inside the copied store path: + + ``` shell + $ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate + Starting home manager activation + … + ``` diff --git a/third_party/home-manager/docs/manual/usage/updating.md b/third_party/home-manager/docs/manual/usage/updating.md new file mode 100644 index 0000000000..c9d96296ff --- /dev/null +++ b/third_party/home-manager/docs/manual/usage/updating.md @@ -0,0 +1,12 @@ +# Updating {#sec-updating} + +If you have installed Home Manager using the Nix channel method then +updating Home Manager is done by first updating the channel. You can +then switch to the updated Home Manager environment. + +``` shell +$ nix-channel --update +… +unpacking channels... +$ home-manager switch +``` diff --git a/third_party/home-manager/docs/manual/writing-modules.md b/third_party/home-manager/docs/manual/writing-modules.md new file mode 100644 index 0000000000..bb3e1eb711 --- /dev/null +++ b/third_party/home-manager/docs/manual/writing-modules.md @@ -0,0 +1,13 @@ +# Writing Home Manager Modules {#ch-writing-modules} + +The module system in Home Manager is based entirely on the NixOS module +system so we will here only highlight aspects that are specific for Home +Manager. For information about the module system as such please refer to +the [Writing NixOS +Modules](https://nixos.org/nixos/manual/index.html#sec-writing-modules) +chapter of the NixOS manual. + + +```{=include=} sections +writing-modules/types.md +``` diff --git a/third_party/home-manager/docs/manual/writing-modules/types.md b/third_party/home-manager/docs/manual/writing-modules/types.md new file mode 100644 index 0000000000..8c68e24444 --- /dev/null +++ b/third_party/home-manager/docs/manual/writing-modules/types.md @@ -0,0 +1,368 @@ +# Option Types {#sec-option-types} + +Overall the basic option types are the same in Home Manager as NixOS. A +few Home Manager options, however, make use of custom types that are +worth describing in more detail. These are the option types `dagOf` and +`gvariant` that are used, for example, by +[programs.ssh.matchBlocks](#opt-programs.ssh.matchBlocks) and [dconf.settings](#opt-dconf.settings). + +[]{#sec-option-types-dag}`hm.types.dagOf` + +: Options of this type have attribute sets as values where each member + is a node in a [directed acyclic + graph](https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095) + (DAG). This allows the attribute set entries to express dependency + relations among themselves. This can, for example, be used to + control the order of match blocks in a OpenSSH client configuration + or the order of activation script blocks in + [home.activation](#opt-home.activation). + + A number of functions are provided to create DAG nodes. The + functions are shown below with examples using an option `foo.bar` of + type `hm.types.dagOf types.int`. + + []{#sec-option-types-dag-entryAnywhere}`hm.dag.entryAnywhere (value: T) : DagEntry` + + : Indicates that `value` can be placed anywhere within the DAG. + This is also the default for plain attribute set entries, that + is + + ``` nix + foo.bar = { + a = hm.dag.entryAnywhere 0; + } + ``` + + and + + ``` nix + foo.bar = { + a = 0; + } + ``` + + are equivalent. + + []{#sec-option-types-dag-entryAfter}`hm.dag.entryAfter (afters: list string) (value: T) : DagEntry` + + : Indicates that `value` must be placed *after* each of the + attribute names in the given list. For example + + ``` nix + foo.bar = { + a = 0; + b = hm.dag.entryAfter [ "a" ] 1; + } + ``` + + would place `b` after `a` in the graph. + + []{#sec-option-types-dag-entryBefore}`hm.dag.entryBefore (befores: list string) (value: T) : DagEntry` + + : Indicates that `value` must be placed *before* each of the + attribute names in the given list. For example + + ``` nix + foo.bar = { + b = hm.dag.entryBefore [ "a" ] 1; + a = 0; + } + ``` + + would place `b` before `a` in the graph. + + []{#sec-option-types-dag-entryBetween}`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry` + + : Indicates that `value` must be placed *before* the attribute + names in the first list and *after* the attribute names in the + second list. For example + + ``` nix + foo.bar = { + a = 0; + c = hm.dag.entryBetween [ "b" ] [ "a" ] 2; + b = 1; + } + ``` + + would place `c` before `b` and after `a` in the graph. + + There are also a set of functions that generate a DAG from a list. + These are convenient when you just want to have a linear list of DAG + entries, without having to manually enter the relationship between + each entry. Each of these functions take a `tag` as argument and the + DAG entries will be named `${tag}-${index}`. + + []{#sec-option-types-dag-entriesAnywhere}`hm.dag.entriesAnywhere (tag: string) (values: [T]) : Dag` + + : Creates a DAG with the given values with each entry labeled + using the given tag. For example + + ``` nix + foo.bar = hm.dag.entriesAnywhere "a" [ 0 1 ]; + ``` + + is equivalent to + + ``` nix + foo.bar = { + a-0 = 0; + a-1 = hm.dag.entryAfter [ "a-0" ] 1; + } + ``` + + []{#sec-option-types-dag-entriesAfter}`hm.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag` + + : Creates a DAG with the given values with each entry labeled + using the given tag. The list of values are placed are placed + *after* each of the attribute names in `afters`. For example + + ``` nix + foo.bar = + { b = 0; } + // hm.dag.entriesAfter "a" [ "b" ] [ 1 2 ]; + ``` + + is equivalent to + + ``` nix + foo.bar = { + b = 0; + a-0 = hm.dag.entryAfter [ "b" ] 1; + a-1 = hm.dag.entryAfter [ "a-0" ] 2; + } + ``` + + []{#sec-option-types-dag-entriesBefore}`hm.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag` + + : Creates a DAG with the given values with each entry labeled + using the given tag. The list of values are placed *before* each + of the attribute names in `befores`. For example + + ``` nix + foo.bar = + { b = 0; } + // hm.dag.entriesBefore "a" [ "b" ] [ 1 2 ]; + ``` + + is equivalent to + + ``` nix + foo.bar = { + b = 0; + a-0 = 1; + a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; + } + ``` + + []{#sec-option-types-dag-entriesBetween}`hm.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag` + + : Creates a DAG with the given values with each entry labeled + using the given tag. The list of values are placed *before* each + of the attribute names in `befores` and *after* each of the + attribute names in `afters`. For example + + ``` nix + foo.bar = + { b = 0; c = 3; } + // hm.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ]; + ``` + + is equivalent to + + ``` nix + foo.bar = { + b = 0; + c = 3; + a-0 = hm.dag.entryAfter [ "c" ] 1; + a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; + } + ``` + +[]{#sec-option-types-gvariant}`hm.types.gvariant` + +: This type is useful for options representing + [GVariant](https://docs.gtk.org/glib/struct.Variant.html#description) + values. The type accepts all primitive GVariant types as well as + arrays, tuples, "maybe" types, and dictionaries. + + Some Nix values are automatically coerced to matching GVariant value + but the GVariant model is richer so you may need to use one of the + provided constructor functions. Examples assume an option `foo.bar` + of type `hm.types.gvariant`. + + []{#sec-option-types-gvariant-mkBoolean}`hm.gvariant.mkBoolean (v: bool)` + + : Takes a Nix value `v` to a GVariant `boolean` value (GVariant + format string `b`). Note, Nix booleans are automatically coerced + using this function. That is, + + ``` nix + foo.bar = hm.gvariant.mkBoolean true; + ``` + + is equivalent to + + ``` nix + foo.bar = true; + ``` + + []{#sec-option-types-gvariant-mkString}`hm.gvariant.mkString (v: string)` + + : Takes a Nix value `v` to a GVariant `string` value (GVariant + format string `s`). Note, Nix strings are automatically coerced + using this function. That is, + + ``` nix + foo.bar = hm.gvariant.mkString "a string"; + ``` + + is equivalent to + + ``` nix + foo.bar = "a string"; + ``` + + []{#sec-option-types-gvariant-mkObjectpath}`hm.gvariant.mkObjectpath (v: string)` + + : Takes a Nix value `v` to a GVariant `objectpath` value (GVariant + format string `o`). + + []{#sec-option-types-gvariant-mkUchar}`hm.gvariant.mkUchar (v: string)` + + : Takes a Nix value `v` to a GVariant `uchar` value (GVariant + format string `y`). + + []{#sec-option-types-gvariant-mkInt16}`hm.gvariant.mkInt16 (v: int)` + + : Takes a Nix value `v` to a GVariant `int16` value (GVariant + format string `n`). + + []{#sec-option-types-gvariant-mkUint16}`hm.gvariant.mkUint16 (v: int)` + + : Takes a Nix value `v` to a GVariant `uint16` value (GVariant + format string `q`). + + []{#sec-option-types-gvariant-mkInt32}`hm.gvariant.mkInt32 (v: int)` + + : Takes a Nix value `v` to a GVariant `int32` value (GVariant + format string `i`). Note, Nix integers are automatically coerced + using this function. That is, + + ``` nix + foo.bar = hm.gvariant.mkInt32 7; + ``` + + is equivalent to + + ``` nix + foo.bar = 7; + ``` + + []{#sec-option-types-gvariant-mkUint32}`hm.gvariant.mkUint32 (v: int)` + + : Takes a Nix value `v` to a GVariant `uint32` value (GVariant + format string `u`). + + []{#sec-option-types-gvariant-mkInt64}`hm.gvariant.mkInt64 (v: int)` + + : Takes a Nix value `v` to a GVariant `int64` value (GVariant + format string `x`). + + []{#sec-option-types-gvariant-mkUint64}`hm.gvariant.mkUint64 (v: int)` + + : Takes a Nix value `v` to a GVariant `uint64` value (GVariant + format string `t`). + + []{#sec-option-types-gvariant-mkDouble}`hm.gvariant.mkDouble (v: double)` + + : Takes a Nix value `v` to a GVariant `double` value (GVariant + format string `d`). Note, Nix floats are automatically coerced + using this function. That is, + + ``` nix + foo.bar = hm.gvariant.mkDouble 3.14; + ``` + + is equivalent to + + ``` nix + foo.bar = 3.14; + ``` + + []{#sec-option-types-gvariant-mkArray}`hm.gvariant.mkArray type elements` + + : Builds a GVariant array containing the given list of elements, + where each element is a GVariant value of the given type + (GVariant format string `a${type}`). The `type` value can be + constructed using + + - `hm.gvariant.type.string` (GVariant format string `s`) + + - `hm.gvariant.type.boolean` (GVariant format string `b`) + + - `hm.gvariant.type.uchar` (GVariant format string `y`) + + - `hm.gvariant.type.int16` (GVariant format string `n`) + + - `hm.gvariant.type.uint16` (GVariant format string `q`) + + - `hm.gvariant.type.int32` (GVariant format string `i`) + + - `hm.gvariant.type.uint32` (GVariant format string `u`) + + - `hm.gvariant.type.int64` (GVariant format string `x`) + + - `hm.gvariant.type.uint64` (GVariant format string `t`) + + - `hm.gvariant.type.double` (GVariant format string `d`) + + - `hm.gvariant.type.variant` (GVariant format string `v`) + + - `hm.gvariant.type.arrayOf type` (GVariant format string + `a${type}`) + + - `hm.gvariant.type.maybeOf type` (GVariant format string + `m${type}`) + + - `hm.gvariant.type.tupleOf types` (GVariant format string + `(${lib.concatStrings types})`) + + - `hm.gvariant.type.dictionaryEntryOf [keyType valueType]` + (GVariant format string `{${keyType}${valueType}}`) + + where `type` and `types` are themselves a type and list of + types, respectively. + + []{#sec-option-types-gvariant-mkEmptyArray}`hm.gvariant.mkEmptyArray type` + + : An alias of + [`hm.gvariant.mkArray type []`](#sec-option-types-gvariant-mkArray). + + []{#sec-option-types-gvariant-mkNothing}`hm.gvariant.mkNothing type` + + : Builds a GVariant maybe value (GVariant format string + `m${type}`) whose (non-existent) element is of the given type. + The `type` value is constructed as described for the + [`mkArray`](#sec-option-types-gvariant-mkArray) function above. + + []{#sec-option-types-gvariant-mkJust}`hm.gvariant.mkJust element` + + : Builds a GVariant maybe value (GVariant format string + `m${element.type}`) containing the given GVariant element. + + []{#sec-option-types-gvariant-mkTuple}`hm.gvariant.mkTuple elements` + + : Builds a GVariant tuple containing the given list of elements, + where each element is a GVariant value. + + []{#sec-option-types-gvariant-mkVariant}`hm.gvariant.mkVariant element` + + : Builds a GVariant variant (GVariant format string `v`) which + contains the value of a GVariant element. + + []{#sec-option-types-gvariant-mkDictionaryEntry}`hm.gvariant.mkDictionaryEntry [key value]` + + : Builds a GVariant dictionary entry containing the given list of + elements (GVariant format string `{${key.type}${value.type}}`), + where each element is a GVariant value. diff --git a/third_party/home-manager/docs/nix-flakes.adoc b/third_party/home-manager/docs/nix-flakes.adoc deleted file mode 100644 index 21ccda9115..0000000000 --- a/third_party/home-manager/docs/nix-flakes.adoc +++ /dev/null @@ -1,228 +0,0 @@ -[[ch-nix-flakes]] -== Nix Flakes - -:nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes - -Home Manager is compatible with {nixos-wiki-flakes}[Nix Flakes]. But -please be aware that the support it is still experimental and may -change in backwards incompatible ways. - -Just like in the standard installation you can use the Home Manager -flake in three ways: - -1. Using the standalone `home-manager` tool. For platforms other than -NixOS and Darwin, this is the only available choice. It is also -recommended for people on NixOS or Darwin that want to manage their -home directory independently of the system as a whole. See -<> for instructions on how to perform this -installation. - -2. As a module within a NixOS system configuration. This allows the -user profiles to be built together with the system when running -`nixos-rebuild`. See <> for a description of -this setup. - -3. As a module within a {nix-darwin}[nix-darwin] system configuration. -This allows the user profiles to be built together with the system -when running `darwin-rebuild`. See <> -for a description of this setup. - -[[sec-flakes-prerequisites]] -=== Prerequisites - -* Install Nix 2.4 or later, or have it in `nix-shell`. - -* Enable experimental features `nix-command` and `flakes`. -+ -** When using NixOS, add the following to your `configuration.nix` and rebuild your system. -+ -[source,nix] -nix = { - package = pkgs.nixFlakes; - extraOptions = '' - experimental-features = nix-command flakes - ''; -}; -+ -** If you are not using NixOS, add the following to `nix.conf` (located at `~/.config/nix/` or `/etc/nix/nix.conf`). -+ -[source,bash] -experimental-features = nix-command flakes -+ -You may need to restart the Nix daemon with, for example, `sudo systemctl restart nix-daemon.service`. -+ -** Alternatively, you can enable flakes on a per-command basis with the following additional flags to `nix` and `home-manager`: -+ -[source,console] ----- -$ nix --extra-experimental-features "nix-command flakes" -$ home-manager --extra-experimental-features "nix-command flakes" ----- - -* Prepare your Home Manager configuration (`home.nix`). -+ -Unlike the channel-based setup, -`home.nix` will be evaluated when the flake is built, -so it must be present before bootstrap of Home Manager from the flake. -See <> for introduction about -writing a Home Manager configuration. - -[[sec-flakes-standalone]] -=== Standalone setup - -To prepare an initial Home Manager configuration for your logged in user, -you can run the Home Manager `init` command directly from its flake. - -For example, if you are using the unstable version of Nixpkgs or NixOS, -then to generate and activate a basic configuration run the command - -[source,console] -$ nix run home-manager/master -- init --switch - -For Nixpkgs or NixOS version 23.05 run - -[source,console] -$ nix run home-manager/release-23.05 -- init --switch - -This will generate a `flake.nix` and a `home.nix` file in -`~/.config/home-manager`, creating the directory if it does not exist. - -If you omit the `--switch` option then the activation will not happen. -This is useful if you want to inspect and edit the configuration before activating it. - -[source,console] ----- -$ nix run home-manager/$branch -- init -$ # Edit files in ~/.config/home-manager -$ nix run home-manager/$branch -- init --switch ----- - -Where `$branch` is one of `master` or `release-23.05`. - -After the initial activation has completed successfully then building -and activating your flake-based configuration is as simple as - -[source,console] -$ home-manager switch - -It is possible to override the default configuration directory, if you want. -For example, - -[source,console] ----- -$ nix run home-manager/$branch -- init --switch ~/hmconf -$ # And after the initial activation. -$ home-manager switch --flake ~/hmconf ----- - -[NOTE] -==== -The flake inputs are not automatically updated by Home Manager. -You need to use the standard `nix flake update` command for that. - -If you only want to update a single flake input, -then the command `nix flake lock --update-input ` can be used. - -You can also pass flake-related options -such as `--recreate-lock-file` or `--update-input ` -to `home-manager` when building or switching, -and these options will be forwarded to `nix build`. -See the {nixos-wiki-flakes}[NixOS Wiki page] for details. -==== - -[[sec-flakes-nixos-module]] -=== NixOS module - -To use Home Manager as a NixOS module, -a bare-minimum `flake.nix` would be as follows: - -[source,nix] ----- -{ - description = "NixOS configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ nixpkgs, home-manager, ... }: { - nixosConfigurations = { - hostname = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jdoe = import ./home.nix; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - } - ]; - }; - }; - }; -} ----- - -The Home Manager configuration is then part of the NixOS configuration -and is automatically rebuilt with the system when using the appropriate command -for the system, such as `nixos-rebuild switch --flake `. - -You can use the above `flake.nix` as a template in `/etc/nixos` by - -[source,console] -$ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos - -[[sec-flakes-nix-darwin-module]] -=== nix-darwin module - -The flake-based setup of the Home Manager nix-darwin module -is similar to that of NixOS. The `flake.nix` would be: - -[source,nix] ----- -{ - description = "Darwin configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - darwin.url = "github:lnl7/nix-darwin"; - darwin.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: { - darwinConfigurations = { - hostname = darwin.lib.darwinSystem { - system = "x86_64-darwin"; - modules = [ - ./configuration.nix - home-manager.darwinModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jdoe = import ./home.nix; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - } - ]; - }; - }; - }; -} ----- - -and it is also rebuilt with the nix-darwin generations. -The rebuild command here may be `darwin-rebuild switch --flake `. - -You can use the above `flake.nix` as a template in `~/.config/darwin` by - -[source,console] -$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin diff --git a/third_party/home-manager/docs/release-notes/release-notes.adoc b/third_party/home-manager/docs/release-notes/release-notes.adoc deleted file mode 100644 index e40cd6ffa8..0000000000 --- a/third_party/home-manager/docs/release-notes/release-notes.adoc +++ /dev/null @@ -1,31 +0,0 @@ -[[ch-release-notes]] -[appendix] -== Release Notes - -This section lists the release notes for stable versions of Home Manager and the current unstable version. - -:leveloffset: 1 - -include::rl-2311.adoc[] - -include::rl-2305.adoc[] - -include::rl-2211.adoc[] - -include::rl-2205.adoc[] - -include::rl-2111.adoc[] - -include::rl-2105.adoc[] - -include::rl-2009.adoc[] - -include::rl-2003.adoc[] - -include::rl-1909.adoc[] - -include::rl-1903.adoc[] - -include::rl-1809.adoc[] - -:leveloffset: 0 diff --git a/third_party/home-manager/docs/release-notes/release-notes.md b/third_party/home-manager/docs/release-notes/release-notes.md new file mode 100644 index 0000000000..91fc2ed5d7 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/release-notes.md @@ -0,0 +1,19 @@ +# Release Notes {#ch-release-notes} + +This section lists the release notes for stable versions of Home Manager +and the current unstable version. + +```{=include=} chapters +rl-2405.md +rl-2311.md +rl-2305.md +rl-2211.md +rl-2205.md +rl-2111.md +rl-2105.md +rl-2009.md +rl-2003.md +rl-1909.md +rl-1903.md +rl-1809.md +``` diff --git a/third_party/home-manager/docs/release-notes/rl-1809.adoc b/third_party/home-manager/docs/release-notes/rl-1809.md similarity index 64% rename from third_party/home-manager/docs/release-notes/rl-1809.adoc rename to third_party/home-manager/docs/release-notes/rl-1809.md index b363704e24..7a13b014a2 100644 --- a/third_party/home-manager/docs/release-notes/rl-1809.adoc +++ b/third_party/home-manager/docs/release-notes/rl-1809.md @@ -1,4 +1,3 @@ -[[sec-release-18.09]] -== Release 18.09 +# Release 18.09 {#sec-release-18.09} The 18.09 release branch became the stable branch in September, 2018. diff --git a/third_party/home-manager/docs/release-notes/rl-1903.adoc b/third_party/home-manager/docs/release-notes/rl-1903.adoc deleted file mode 100644 index 1cba4235d6..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-1903.adoc +++ /dev/null @@ -1,59 +0,0 @@ -[[sec-release-19.03]] -== Release 19.03 - -The 19.03 release branch became the stable branch in April, 2019. - -[[sec-release-19.03-highlights]] -=== Highlights -:opt-home-file-source: opt-home.file._name_.source - -This release has the following notable changes: - -* The <<{opt-home-file-source}>> option now allows source files to be -hidden, that is, having a name starting with the `.` character. It -also allows the source file name to contain characters not typically -allowed for Nix store paths. For example, your configuration can now -contain things such as -+ -[source,nix] ----- -home.file."my file".source = ./. + "/file with spaces!"; ----- - -* The type used for the systemd unit options under -<>, <>, etc. has -been changed to offer more robust merging of configurations. If you -don't override values within systemd units then you are not affected -by this change. Unfortunately, if you do override unit values you may -encounter errors. -+ -In particular, if you get an error saying that a ``unique option'' is -``defined multiple times'' then you need to use the -https://nixos.org/nixos/manual/#sec-option-definitions-setting-priorities[`mkForce`] -function. For example, -+ -[source,nix] ----- -systemd.user.services.foo.Service.ExecStart = "/foo/bar"; ----- -+ -becomes -+ -[source,nix] ----- -systemd.user.services.foo.Service.ExecStart = lib.mkForce "/foo/bar"; ----- -+ -We had to make this change because the old merging was causing too -many confusing situations for people. - -[[sec-release-19.03-state-version-changes]] -=== State Version Changes - -The state version in this release includes the changes below. These -changes are only active if the <> option is set -to ``19.03'' or later. - -* There is now an option <> that defaults -to `false`. Before the module would be active if the -<> option was non-empty. diff --git a/third_party/home-manager/docs/release-notes/rl-1903.md b/third_party/home-manager/docs/release-notes/rl-1903.md new file mode 100644 index 0000000000..0fe1a0676d --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-1903.md @@ -0,0 +1,52 @@ +# Release 19.03 {#sec-release-19.03} + +The 19.03 release branch became the stable branch in April, 2019. + +## Highlights {#sec-release-19.03-highlights} + +This release has the following notable changes: + +- The [home.file._name_.source](#opt-home.file._name_.source) option now allows source + files to be hidden, that is, having a name starting with the `.` + character. It also allows the source file name to contain characters + not typically allowed for Nix store paths. For example, your + configuration can now contain things such as + + ``` nix + home.file."my file".source = ./. + "/file with spaces!"; + ``` + +- The type used for the systemd unit options under + [systemd.user.sockets](#opt-systemd.user.sockets), + etc. has been changed to offer more robust merging of + configurations. If you don't override values within systemd units + then you are not affected by this change. Unfortunately, if you do + override unit values you may encounter errors. + + In particular, if you get an error saying that a "unique option" is + "defined multiple times" then you need to use the + [`mkForce`](https://nixos.org/nixos/manual/#sec-option-definitions-setting-priorities) + function. For example, + + ``` nix + systemd.user.services.foo.Service.ExecStart = "/foo/bar"; + ``` + + becomes + + ``` nix + systemd.user.services.foo.Service.ExecStart = lib.mkForce "/foo/bar"; + ``` + + We had to make this change because the old merging was causing too + many confusing situations for people. + +## State Version Changes {#sec-release-19.03-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the [home.stateVersion](#opt-home.stateVersion) option is +set to "19.03" or later. + +- There is now an option [programs.beets.enable](#opt-programs.beets.enable) that + defaults to `false`. Before the module would be active if the + [programs.beets.settings](#opt-programs.beets.settings) option was non-empty. diff --git a/third_party/home-manager/docs/release-notes/rl-1909.adoc b/third_party/home-manager/docs/release-notes/rl-1909.adoc deleted file mode 100644 index 89bbbdc2b4..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-1909.adoc +++ /dev/null @@ -1,31 +0,0 @@ -[[sec-release-19.09]] -== Release 19.09 - -The 19.09 release branch became the stable branch in October, 2019. - -[[sec-release-19.09-highlights]] -=== Highlights - -This release has the following notable changes: - -* The `programs.firefox.enableGoogleTalk` and - `programs.firefox.enableIcedTea` options are now deprecated - and will only work if Firefox ESR 52.x is used. - -* The `home-manager` tool now provides an `uninstall` sub-command that - can be used to uninstall Home Manager, if used in the standalone - mode. That is, not as a NixOS module. - -[[sec-release-19.09-state-version-changes]] -=== 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 -"19.09" or later. - -* The <> option now expects a wrapped - Firefox package and defaults to `pkgs.firefox`. - -* The options <> and - <> now default to `null`, which indicates - that the system value should be used. diff --git a/third_party/home-manager/docs/release-notes/rl-1909.md b/third_party/home-manager/docs/release-notes/rl-1909.md new file mode 100644 index 0000000000..2659d85638 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-1909.md @@ -0,0 +1,28 @@ +# Release 19.09 {#sec-release-19.09} + +The 19.09 release branch became the stable branch in October, 2019. + +## Highlights {#sec-release-19.09-highlights} + +This release has the following notable changes: + +- The `programs.firefox.enableGoogleTalk` and + `programs.firefox.enableIcedTea` options are now deprecated and will + only work if Firefox ESR 52.x is used. + +- The `home-manager` tool now provides an `uninstall` sub-command that + can be used to uninstall Home Manager, if used in the standalone + mode. That is, not as a NixOS module. + +## State Version Changes {#sec-release-19.09-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 +\"19.09\" or later. + +- The [programs.firefox.package](#opt-programs.firefox.package) option now expects a + wrapped Firefox package and defaults to `pkgs.firefox`. + +- The options [home.keyboard.layout](#opt-home.keyboard.layout) and + [home.keyboard.variant](#opt-home.keyboard.variant) now default to `null`, which + indicates that the system value should be used. diff --git a/third_party/home-manager/docs/release-notes/rl-2003.adoc b/third_party/home-manager/docs/release-notes/rl-2003.adoc deleted file mode 100644 index 5832e2e5ab..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2003.adoc +++ /dev/null @@ -1,126 +0,0 @@ -[[sec-release-20.03]] -== Release 20.03 - -The 20.03 release branch became the stable branch in April, 2020. - -[[sec-release-20.03-highlights]] -=== Highlights - -This release has the following notable changes: - -* Assigning a list to the <>, <>, -and <> options is now deprecated and will produce a -warning message if used. Specifically, if your configuration currently -contains something like -+ -[source,nix] ----- -home.file = [ - { - target = ".config/foo.txt"; - text = "bar"; - } -] ----- -+ -then it should be updated to instead use the equivalent attribute set form -+ -[source,nix] ----- -home.file = { - ".config/foo.txt".text = "bar"; -} ----- -+ -Support for the list form will be removed in Home Manager version -20.09. - -* The `lib` function attribute given to modules is now enriched with -an attribute `hm` containing extra library functions specific for Home -Manager. More specifically, `lib.hm` is now the same as `config.lib` -and should be the preferred choice since it is more robust. -+ -Therefore, if your configuration makes use of, for example, -`config.lib.dag` to create activation script blocks, it is recommended -to change to `lib.hm.dag`. -+ -Note, in the unlikely case that you are -+ -** using Home Manager's NixOS or nix-darwin module, -** have made your own Home Manager module containing an top-level - option named `config` or `options`, and -** assign to this option in your system configuration inside a plain - attribute set, i.e., without a function argument, - -+ -then you must update your configuration to perform the option -assignment inside a `config` attribute. For example, instead of -+ -[source,nix] ----- -home-manager.users.jane = { config = "foo"; }; ----- -+ -use -+ -[source,nix] ----- -home-manager.users.jane = { config.config = "foo"; }; ----- - -* The `services.compton` module has been deprecated and instead the -new module `services.picom` should be used. This is because Nixpkgs no -longer packages compton, and instead packages the (mostly) compatible -fork called picom. - -* The list form of the <> option has -been deprecated and configurations requiring match blocks in a defined -order should switch to using DAG entries instead. For example, a -configuration -+ -[source,nix] ----- -programs.ssh.matchBlocks = [ - { - host = "alpha.foo.com"; - user = "jd"; - } - { - host = "*.foo.com"; - user = "john.doe"; - } -]; ----- -+ -can be expressed along the lines of -+ -[source,nix] ----- -programs.ssh.matchBlocks = { - "*.example.com" = { - user = "john.doe"; - } - "alpha.example.com" = lib.hm.dag.entryBefore ["*.example.com"] { - user = "jd"; - } -}; ----- -+ -Support for the list form will be removed in Home Manager version -20.09. - -[[sec-release-20.03-state-version-changes]] -=== 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 -"20.03" or later. - -* The <> option is no longer prepended - by `$HOME`, which allows specifying absolute paths, for example, - using the xdg module. Also, the default value is fixed to - `$HOME/.zsh_history` and `dotDir` path is not prepended to it - anymore. -* The newsboat module will now default in displaying `queries` before `urls` in - its main window. This makes sense in the case when one has a lot of URLs and - few queries. diff --git a/third_party/home-manager/docs/release-notes/rl-2003.md b/third_party/home-manager/docs/release-notes/rl-2003.md new file mode 100644 index 0000000000..5ba6b2004c --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2003.md @@ -0,0 +1,122 @@ +# Release 20.03 {#sec-release-20.03} + +The 20.03 release branch became the stable branch in April, 2020. + +## Highlights {#sec-release-20.03-highlights} + +This release has the following notable changes: + +- Assigning a list to the [home.file](#opt-home.file), + [xdg.dataFile](#opt-xdg.dataFile) options is + now deprecated and will produce a warning message if used. + Specifically, if your configuration currently contains something + like + + ``` nix + home.file = [ + { + target = ".config/foo.txt"; + text = "bar"; + } + ] + ``` + + then it should be updated to instead use the equivalent attribute + set form + + ``` nix + home.file = { + ".config/foo.txt".text = "bar"; + } + ``` + + Support for the list form will be removed in Home Manager version + 20.09. + +- The `lib` function attribute given to modules is now enriched with + an attribute `hm` containing extra library functions specific for + Home Manager. More specifically, `lib.hm` is now the same as + `config.lib` and should be the preferred choice since it is more + robust. + + Therefore, if your configuration makes use of, for example, + `config.lib.dag` to create activation script blocks, it is + recommended to change to `lib.hm.dag`. + + Note, in the unlikely case that you are + + - using Home Manager's NixOS or nix-darwin module, + + - have made your own Home Manager module containing an top-level + option named `config` or `options`, and + + - assign to this option in your system configuration inside a + plain attribute set, i.e., without a function argument, + + then you must update your configuration to perform the option + assignment inside a `config` attribute. For example, instead of + + ``` nix + home-manager.users.jane = { config = "foo"; }; + ``` + + use + + ``` nix + home-manager.users.jane = { config.config = "foo"; }; + ``` + +- The `services.compton` module has been deprecated and instead the + new module `services.picom` should be used. This is because Nixpkgs + no longer packages compton, and instead packages the (mostly) + compatible fork called picom. + +- The list form of the [programs.ssh.matchBlocks](#opt-programs.ssh.matchBlocks) option has + been deprecated and configurations requiring match blocks in a + defined order should switch to using DAG entries instead. For + example, a configuration + + ``` nix + programs.ssh.matchBlocks = [ + { + host = "alpha.foo.com"; + user = "jd"; + } + { + host = "*.foo.com"; + user = "john.doe"; + } + ]; + ``` + + can be expressed along the lines of + + ``` nix + programs.ssh.matchBlocks = { + "*.example.com" = { + user = "john.doe"; + } + "alpha.example.com" = lib.hm.dag.entryBefore ["*.example.com"] { + user = "jd"; + } + }; + ``` + + Support for the list form will be removed in Home Manager version + 20.09. + +## State Version Changes {#sec-release-20.03-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 +\"20.03\" or later. + +- The [programs.zsh.history.path](#opt-programs.zsh.history.path) option is no longer + prepended by `$HOME`, which allows specifying absolute paths, for + example, using the xdg module. Also, the default value is fixed to + `$HOME/.zsh_history` and `dotDir` path is not prepended to it + anymore. + +- The newsboat module will now default in displaying `queries` before + `urls` in its main window. This makes sense in the case when one has + a lot of URLs and few queries. diff --git a/third_party/home-manager/docs/release-notes/rl-2009.adoc b/third_party/home-manager/docs/release-notes/rl-2009.adoc deleted file mode 100644 index a3de0260c7..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2009.adoc +++ /dev/null @@ -1,96 +0,0 @@ -[[sec-release-20.09]] -== Release 20.09 - -The 20.09 release branch became the stable branch in late September, 2020. - -[[sec-release-20.09-highlights]] -=== Highlights - -This release has the following notable changes: - -* Nothing has happened. - -[[sec-release-20.09-state-version-changes]] -=== 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 -"20.09" or later. - -* The options <> and <> no -longer have default values and must therefore be provided in your -configuration. Previously their values would default to the content of -the environment variables `HOME` and `USER`, respectively. -+ --- -Further, the options <>, <>, -and <> will no longer be affected by the -`XDG_CACHE_HOME`, `XDG_CONFIG_HOME`, and `XDG_DATA_HOME` environment -variables. They now unconditionally default to - -- `"${config.home.homeDirectory}/.cache"`, -- `"${config.home.homeDirectory}/.config"`, and -- `"${config.home.homeDirectory}/.local/share"`. - -If you choose to switch to state version 20.09 then you must set these -options if you use non-default XDG base directory paths. - -The initial configuration generated by - -[source,console] -$ nix-shell '' -A install - -will automatically include these options, when necessary. --- - -* Git's `smtpEncryption` option is now set to `tls` only if both <> and <> are `true`. If only <> is `true`, `ssl` is used instead. - -* The `nixpkgs` module no longer references ``. Before it would do so when building the `pkgs` module argument. Starting with state version 20.09, the `pkgs` argument is instead built from the same Nixpkgs that was used to initialize the Home Manager modules. This is useful, for example, when using Home Manager within a Nix Flake. If you want to keep using `` with state version ≥ 20.09 then add -+ -[source,nix] -_module.args.pkgsPath = ; -+ -to your Home Manager configuration. - -* The options `wayland.windowManager.sway.config.bars` and `opt-xsession.windowManager.i3.config.bars` have been changed so that most of the suboptions are now nullable and default to `null`. The default for these two options has been changed to manually set the old defaults for each suboption. The overall effect is that if the `bars` options is not set, then the default remains the same. On the other hand, something like: -+ --- -[source,nix] ----- -bars = [ { - command = "waybar"; -} ]; ----- -will now create the config: -.... -bar { - swaybar_command waybar -} -.... -instead of -.... -bar { - - font pango:monospace 8 - mode dock - hidden_state hide - position bottom - status_command /nix/store/h7s6i9q1z5fxrlyyw5ls8vqxhf5bcs5a-i3status-2.13/bin/i3status - swaybar_command waybar - workspace_buttons yes - strip_workspace_numbers no - tray_output primary - colors { - background #000000 - statusline #ffffff - separator #666666 - focused_workspace #4c7899 #285577 #ffffff - active_workspace #333333 #5f676a #ffffff - inactive_workspace #333333 #222222 #888888 - urgent_workspace #2f343a #900000 #ffffff - binding_mode #2f343a #900000 #ffffff - } - -} -.... --- diff --git a/third_party/home-manager/docs/release-notes/rl-2009.md b/third_party/home-manager/docs/release-notes/rl-2009.md new file mode 100644 index 0000000000..31a8ecf86d --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2009.md @@ -0,0 +1,112 @@ +# Release 20.09 {#sec-release-20.09} + +The 20.09 release branch became the stable branch in late September, +2020. + +## Highlights {#sec-release-20.09-highlights} + +This release has the following notable changes: + +- Nothing has happened. + +## State Version Changes {#sec-release-20.09-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 +\"20.09\" or later. + +- The options [home.homeDirectory](#opt-home.homeDirectory) and + [home.username](#opt-home.username) no longer have default values and must + therefore be provided in your configuration. Previously their values + would default to the content of the environment variables `HOME` and + `USER`, respectively. + + Further, the options [xdg.cacheHome](#opt-xdg.cacheHome), + [xdg.dataHome](#opt-xdg.dataHome) will no + longer be affected by the `XDG_CACHE_HOME`, `XDG_CONFIG_HOME`, and + `XDG_DATA_HOME` environment variables. They now unconditionally + default to + + - `"${config.home.homeDirectory}/.cache"`, + + - `"${config.home.homeDirectory}/.config"`, and + + - `"${config.home.homeDirectory}/.local/share"`. + + If you choose to switch to state version 20.09 then you must set + these options if you use non-default XDG base directory paths. + + The initial configuration generated by + + ``` console + $ nix-shell '' -A install + ``` + + will automatically include these options, when necessary. + +- Git's `smtpEncryption` option is now set to `tls` only if both + [accounts.email.accounts._name_.smtp.tls.enable](#opt-accounts.email.accounts._name_.smtp.tls.enable) and + [accounts.email.accounts._name_.smtp.tls.useStartTls](#opt-accounts.email.accounts._name_.smtp.tls.useStartTls) are + `true`. If only + [accounts.email.accounts._name_.smtp.tls.enable](#opt-accounts.email.accounts._name_.smtp.tls.enable) is + `true`, `ssl` is used instead. + +- The `nixpkgs` module no longer references ``. Before it + would do so when building the `pkgs` module argument. Starting with + state version 20.09, the `pkgs` argument is instead built from the + same Nixpkgs that was used to initialize the Home Manager modules. + This is useful, for example, when using Home Manager within a Nix + Flake. If you want to keep using `` with state version ≥ + 20.09 then add + + ``` nix + _module.args.pkgsPath = ; + ``` + + to your Home Manager configuration. + +- The options `wayland.windowManager.sway.config.bars` and + `opt-xsession.windowManager.i3.config.bars` have been changed so + that most of the suboptions are now nullable and default to `null`. + The default for these two options has been changed to manually set + the old defaults for each suboption. The overall effect is that if + the `bars` options is not set, then the default remains the same. On + the other hand, something like: + + ``` nix + bars = [ { + command = "waybar"; + } ]; + ``` + + will now create the config: + + bar { + swaybar_command waybar + } + + instead of + + bar { + + font pango:monospace 8 + mode dock + hidden_state hide + position bottom + status_command /nix/store/h7s6i9q1z5fxrlyyw5ls8vqxhf5bcs5a-i3status-2.13/bin/i3status + swaybar_command waybar + workspace_buttons yes + strip_workspace_numbers no + tray_output primary + colors { + background #000000 + statusline #ffffff + separator #666666 + focused_workspace #4c7899 #285577 #ffffff + active_workspace #333333 #5f676a #ffffff + inactive_workspace #333333 #222222 #888888 + urgent_workspace #2f343a #900000 #ffffff + binding_mode #2f343a #900000 #ffffff + } + + } diff --git a/third_party/home-manager/docs/release-notes/rl-2105.adoc b/third_party/home-manager/docs/release-notes/rl-2105.adoc deleted file mode 100644 index ed94f8880b..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2105.adoc +++ /dev/null @@ -1,200 +0,0 @@ -[[sec-release-21.05]] -== Release 21.05 - -The 21.05 release branch became the stable branch in May, 2021. - -[[sec-release-21.05-highlights]] -=== Highlights - -This release has the following notable changes: - -* The `opt-programs.broot.verbs` option is now a list rather than an -attribute set. To migrate, move the keys of the attrset into the list -items' `invocation` keys. For example, -+ -[source,nix] ----- -programs.broot.verbs = { - "p" = { execution = ":parent"; }; -}; ----- -+ -becomes -+ -[source,nix] ----- -programs.broot.verbs = [ - { - invocation = "p"; - execution = ":parent"; - } -]; ----- - -* The <> option has been changed to allow custom -derivations. The following configuration is now possible: -+ -[source,nix] ----- -programs.mpv.package = (pkgs.wrapMpv (pkgs.mpv-unwrapped.override { - vapoursynthSupport = true; -}) { - extraMakeWrapperArgs = [ - "--prefix" "LD_LIBRARY_PATH" ":" "${pkgs.vapoursynth-mvtools}/lib/vapoursynth" - ]; -}); ----- -+ -As a result of this change, <> is no longer the -resulting derivation. Use the newly introduced `programs.mpv.finalPackage` -instead. - -* The <> option is now an attribute set rather -than a string. To migrate, move each line into the attribute set, -removing the `rofi.` prefix from the keys. For example, -+ -[source,nix] ----- -programs.rofi.extraConfig = '' - rofi.show-icons: true - rofi.modi: drun,emoji,ssh -''; ----- -+ -becomes -+ -[source,nix] ----- -programs.rofi.extraConfig = { - show-icons = true; - modi = "drun,emoji,ssh"; -}; ----- -+ -* The <> option now supports defining a theme -using an attribute set, the following configuration is now possible: -+ -[source,nix] ----- -programs.rofi.theme = let - # Necessary to avoid quoting non-string values - inherit (config.lib.formats.rasi) mkLiteral; -in { - "@import" = "~/.config/rofi/theme.rasi"; - - "*" = { - background-color = mkLiteral "#000000"; - foreground-color = mkLiteral "rgba ( 250, 251, 252, 100 % )"; - border-color = mkLiteral "#FFFFFF"; - width = 512; - }; - - "#textbox-prompt-colon" = { - expand = false; - str = ":"; - margin = mkLiteral "0px 0.3em 0em 0em"; - text-color = mkLiteral "@foreground-color"; - }; -}; ----- - - -* The `services.redshift.extraOptions` and `services.gammastep.extraOptions` -options were removed in favor of <> and -`services.gammastep.settings`, that are now an attribute set rather -than a string. They also support new features not available before, for -example: -+ -[source,nix] ----- -services.redshift = { - dawnTime = "6:00-7:45"; - duskTime = "18:35-20:15"; - settings = { - redshift = { - gamma = 0.8; - adjustment-method = "randr"; - }; - - randr = { - screen = 0; - }; - }; -}; ----- -+ -It is recommended to check either -https://github.com/jonls/redshift/blob/master/redshift.conf.sample[redshift.conf.sample] or -https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample[gammastep.conf.sample] -for the available additional options in each program. - -* Specifying `programs.neomutt.binds.map` or `programs.neomutt.macros.map` as a - single string is now deprecated in favor of specfiying it as a list of - strings. - -* The `programs.neovim.configure` is deprecated in favor of other `programs.neovim` options; -please use the other options at your disposal: -+ -[source,nix] ----- -configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }] -configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }] -configure.customRC -> programs.neovim.extraConfig ----- - -* Home Manager now respects the `NO_COLOR` environment variable as per -https://no-color.org/[]. - -* Qt module now supports <> to specify a theme name and -<> to specify a theme package. If you have set -<> to `gnome`, a <> compatible -with both Qt and Gtk is now required to be set. For instance: -+ -[source,nix] ----- -qt = { - platformTheme = "gnome"; - style = { - name = "adwaita-dark"; - package = pkgs.adwaita-qt; - }; -}; ----- - -* The library type `fontType` now has a `size` attribute in addition to `name`. For example: -+ -[source,nix] ----- -font = { - name = "DejaVu Sans"; - size = 8; -}; ----- - -* The <> option is introduced to replace individual -options in `programs.htop`. To migrate, set the htop options directly in -<>. For example: -+ -[source,nix] ----- -programs.htop = { - enabled = true; - settings = { - color_scheme = 5; - delay = 15; - highlight_base_name = 1; - highlight_megabytes = 1; - highlight_threads = 1; - }; -}; ----- - -[[sec-release-21.05-state-version-changes]] -=== 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 -"21.05" or later. - -* The `newsboat` module now stores generated configuration in - `$XDG_CONFIG_HOME/newsboat`. diff --git a/third_party/home-manager/docs/release-notes/rl-2105.md b/third_party/home-manager/docs/release-notes/rl-2105.md new file mode 100644 index 0000000000..5ea92e34d0 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2105.md @@ -0,0 +1,194 @@ +# Release 21.05 {#sec-release-21.05} + +The 21.05 release branch became the stable branch in May, 2021. + +## Highlights {#sec-release-21.05-highlights} + +This release has the following notable changes: + +- The 'opt-programs.broot.verbs\` option is now a list rather than an + attribute set. To migrate, move the keys of the attrset into the + list items' `invocation` keys. For example, + + ``` nix + programs.broot.verbs = { + "p" = { execution = ":parent"; }; + }; + ``` + + becomes + + ``` nix + programs.broot.verbs = [ + { + invocation = "p"; + execution = ":parent"; + } + ]; + ``` + +- The [programs.mpv.package](#opt-programs.mpv.package) option has been changed to + allow custom derivations. The following configuration is now + possible: + + ``` nix + programs.mpv.package = (pkgs.wrapMpv (pkgs.mpv-unwrapped.override { + vapoursynthSupport = true; + }) { + extraMakeWrapperArgs = [ + "--prefix" "LD_LIBRARY_PATH" ":" "${pkgs.vapoursynth-mvtools}/lib/vapoursynth" + ]; + }); + ``` + + As a result of this change, [programs.mpv.package](#opt-programs.mpv.package) is no + longer the resulting derivation. Use the newly introduced + `programs.mpv.finalPackage` instead. + +- The [programs.rofi.extraConfig](#opt-programs.rofi.extraConfig) option is now an attribute + set rather than a string. To migrate, move each line into the + attribute set, removing the `rofi.` prefix from the keys. For + example, + + ``` nix + programs.rofi.extraConfig = '' + rofi.show-icons: true + rofi.modi: drun,emoji,ssh + ''; + ``` + + becomes + + ``` nix + programs.rofi.extraConfig = { + show-icons = true; + modi = "drun,emoji,ssh"; + }; + ``` + +- The [programs.rofi.theme](#opt-programs.rofi.theme) option now supports defining a + theme using an attribute set, the following configuration is now + possible: + + ``` nix + programs.rofi.theme = let + # Necessary to avoid quoting non-string values + inherit (config.lib.formats.rasi) mkLiteral; + in { + "@import" = "~/.config/rofi/theme.rasi"; + + "*" = { + background-color = mkLiteral "#000000"; + foreground-color = mkLiteral "rgba ( 250, 251, 252, 100 % )"; + border-color = mkLiteral "#FFFFFF"; + width = 512; + }; + + "#textbox-prompt-colon" = { + expand = false; + str = ":"; + margin = mkLiteral "0px 0.3em 0em 0em"; + text-color = mkLiteral "@foreground-color"; + }; + }; + ``` + +- The `services.redshift.extraOptions` and + `services.gammastep.extraOptions` options were removed in favor of + [services.redshift.settings](#opt-services.redshift.settings) and + `services.gammastep.settings`, that are now an attribute set rather + than a string. They also support new features not available before, + for example: + + ``` nix + services.redshift = { + dawnTime = "6:00-7:45"; + duskTime = "18:35-20:15"; + settings = { + redshift = { + gamma = 0.8; + adjustment-method = "randr"; + }; + + randr = { + screen = 0; + }; + }; + }; + ``` + + It is recommended to check either + [redshift.conf.sample](https://github.com/jonls/redshift/blob/master/redshift.conf.sample) + or + [gammastep.conf.sample](https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample) + for the available additional options in each program. + +- Specifying `programs.neomutt.binds.map` or + `programs.neomutt.macros.map` as a single string is now deprecated + in favor of specfiying it as a list of strings. + +- The `programs.neovim.configure` is deprecated in favor of other + `programs.neovim` options; please use the other options at your + disposal: + + ``` nix + configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }] + configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }] + configure.customRC -> programs.neovim.extraConfig + ``` + +- Home Manager now respects the `NO_COLOR` environment variable as per + . + +- Qt module now supports [qt.style.name](#opt-qt.style.name) to specify a theme + name and [qt.style.package](#opt-qt.style.package) to specify a theme package. If + you have set [qt.platformTheme](#opt-qt.platformTheme) to `gnome`, a + [qt.style.package](#opt-qt.style.package) compatible with both Qt and Gtk is now + required to be set. For instance: + + ``` nix + qt = { + platformTheme = "gnome"; + style = { + name = "adwaita-dark"; + package = pkgs.adwaita-qt; + }; + }; + ``` + +- The library type `fontType` now has a `size` attribute in addition + to `name`. For example: + + ``` nix + font = { + name = "DejaVu Sans"; + size = 8; + }; + ``` + +- The [programs.htop.settings](#opt-programs.htop.settings) option is introduced to + replace individual options in `programs.htop`. To migrate, set the + htop options directly in [programs.htop.settings](#opt-programs.htop.settings). For + example: + + ``` nix + programs.htop = { + enabled = true; + settings = { + color_scheme = 5; + delay = 15; + highlight_base_name = 1; + highlight_megabytes = 1; + highlight_threads = 1; + }; + }; + ``` + +## State Version Changes {#sec-release-21.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"21.05\" or later. + +- The `newsboat` module now stores generated configuration in + `$XDG_CONFIG_HOME/newsboat`. diff --git a/third_party/home-manager/docs/release-notes/rl-2111.adoc b/third_party/home-manager/docs/release-notes/rl-2111.adoc deleted file mode 100644 index 0ac83a322e..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2111.adoc +++ /dev/null @@ -1,73 +0,0 @@ -[[sec-release-21.11]] -== Release 21.11 - -The 21.11 release branch became the stable branch in November, 2021. - -[[sec-release-21.11-highlights]] -=== Highlights - -This release has the following notable changes: - -* All Home Manager modules are now loaded on all platforms. With this -change you will get a more descriptive error message if you attempt to -enable a module that is incompatible with the host platform. -+ -Previously, modules that were platform specific would only be loaded -on that particular platform. For example, a module defining a -https://systemd.io/[systemd] service would only be loaded when the -host platform was Linux. This reduced evaluation times, simplified the -generated documentation, and made it impossible to accidentally use -modules that do not support the host platform. -+ -While the above benefits are quite nice, avoiding module loads also -brings a few problems. For example, the -https://nix-community.github.io/home-manager/[public documentation] -will only show the options available for Linux hosts and the -documentation cannot make references to options within modules that -are unavailable on some hosts. Finally, users who wish to use the same -configuration file for different platforms cannot do so, even if the -platform incompatible options are unused. -+ -Ultimately, the benefits of loading all modules won and the behavior -has now changed. For associated discussion see -https://github.com/nix-community/home-manager/issues/1906[issue #1906]. - -* Rofi version 1.7.0 removed many options that were used by the module and replaced them with custom themes, which are more flexible and powerful. -+ -You can replicate your old configuration by moving those options to <>. Keep in mind that the syntax is different so you may need to do some changes. - -* Taskwarrior version 2.6.0 respects XDG Specification for the config file now. -Option <> and friends now generate the config file at -`$XDG_CONFIG_HOME/task/taskrc` instead of `~/.taskrc`. - -[[sec-release-21.11-state-version-changes]] -=== 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 -"21.11" or later. - -* The <> option now defaults to `null`, meaning that Home Manager won't do any keyboard layout management. For example, `setxkbmap` won't be run in X sessions. - -* The <> option no longer place its value inside a `General` attribute. -For example, -+ -[source,nix] -programs.pet.settings.editor = "nvim"; -+ -becomes -+ -[source,nix] -programs.pet.settings.General.editor = "nvim"; - -* The <> option now allows defining modules directly under <>. -For example, -+ -[source,nix] -programs.waybar.settings.modules."custom/my-module" = { }; -+ -becomes -+ -[source,nix] -programs.waybar.settings."custom/my-module" = { }; - diff --git a/third_party/home-manager/docs/release-notes/rl-2111.md b/third_party/home-manager/docs/release-notes/rl-2111.md new file mode 100644 index 0000000000..13ad0fa943 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2111.md @@ -0,0 +1,81 @@ +# Release 21.11 {#sec-release-21.11} + +The 21.11 release branch became the stable branch in November, 2021. + +## Highlights {#sec-release-21.11-highlights} + +This release has the following notable changes: + +- All Home Manager modules are now loaded on all platforms. With this + change you will get a more descriptive error message if you attempt + to enable a module that is incompatible with the host platform. + + Previously, modules that were platform specific would only be loaded + on that particular platform. For example, a module defining a + [systemd](https://systemd.io/) service would only be loaded when the + host platform was Linux. This reduced evaluation times, simplified + the generated documentation, and made it impossible to accidentally + use modules that do not support the host platform. + + While the above benefits are quite nice, avoiding module loads also + brings a few problems. For example, the [public + documentation](https://nix-community.github.io/home-manager/) will + only show the options available for Linux hosts and the + documentation cannot make references to options within modules that + are unavailable on some hosts. Finally, users who wish to use the + same configuration file for different platforms cannot do so, even + if the platform incompatible options are unused. + + Ultimately, the benefits of loading all modules won and the behavior + has now changed. For associated discussion see + [issue #1906](https://github.com/nix-community/home-manager/issues/1906). + +- Rofi version 1.7.0 removed many options that were used by the module + and replaced them with custom themes, which are more flexible and + powerful. + + You can replicate your old configuration by moving those options to + [programs.rofi.theme](#opt-programs.rofi.theme). Keep in mind that the syntax is + different so you may need to do some changes. + +- Taskwarrior version 2.6.0 respects XDG Specification for the config + file now. Option [programs.taskwarrior.config](#opt-programs.taskwarrior.config) and friends + now generate the config file at `$XDG_CONFIG_HOME/task/taskrc` + instead of `~/.taskrc`. + +## State Version Changes {#sec-release-21.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 +\"21.11\" or later. + +- The [home.keyboard](#opt-home.keyboard) option now defaults to `null`, meaning + that Home Manager won't do any keyboard layout management. For + example, `setxkbmap` won't be run in X sessions. + +- The [programs.pet.settings](#opt-programs.pet.settings) option no longer place its + value inside a `General` attribute. For example, + + ``` nix + programs.pet.settings.editor = "nvim"; + ``` + + becomes + + ``` nix + programs.pet.settings.General.editor = "nvim"; + ``` + +- The [programs.waybar.settings](#opt-programs.waybar.settings) option now allows defining + modules directly under [programs.waybar.settings](#opt-programs.waybar.settings). For + example, + + ``` nix + programs.waybar.settings.modules."custom/my-module" = { }; + ``` + + becomes + + ``` nix + programs.waybar.settings."custom/my-module" = { }; + ``` diff --git a/third_party/home-manager/docs/release-notes/rl-2205.adoc b/third_party/home-manager/docs/release-notes/rl-2205.adoc deleted file mode 100644 index f600640e4f..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2205.adoc +++ /dev/null @@ -1,44 +0,0 @@ -[[sec-release-22.05]] -== Release 22.05 - -The 22.05 release branch became the stable branch in May, 2022. - -[[sec-release-22.05-highlights]] -=== Highlights - -:hm-weblate: https://hosted.weblate.org/projects/home-manager/ - -This release has the following notable changes: - -* The `programs.waybar.settings.modules` option was removed. -Waybar modules should now be declared directly under `programs.waybar.settings`. - -* Home Manager now partially support translation of texts into different languages. -Note, the support is quite limited at the moment. -Specifically, it only applies to parts of the system written in the Bash language, -such as the `home-manager` command line tool and the activation script. -+ -If you would like to contribute to the translation effort -then you can do so through the {hm-weblate}[Home Manager Weblate project]. - -* A new module, `launchd.agents` was added. -Use this to enable services based on macOS LaunchAgents. - -[[sec-release-22.05-state-version-changes]] -=== 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 "22.05" or later. - -* The <> option now allows defining modules directly under <>. -Defining modules under `programs.waybar.settings.modules` will now be an error. -For example, -+ -[source,nix] -programs.waybar.settings.modules."custom/my-module" = { }; -+ -becomes -+ -[source,nix] -programs.waybar.settings."custom/my-module" = { }; - diff --git a/third_party/home-manager/docs/release-notes/rl-2205.md b/third_party/home-manager/docs/release-notes/rl-2205.md new file mode 100644 index 0000000000..b75e4d2767 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2205.md @@ -0,0 +1,45 @@ +# Release 22.05 {#sec-release-22.05} + +The 22.05 release branch became the stable branch in May, 2022. + +## Highlights {#sec-release-22.05-highlights} + +This release has the following notable changes: + +- The `programs.waybar.settings.modules` option was removed. Waybar + modules should now be declared directly under + `programs.waybar.settings`. + +- Home Manager now partially support translation of texts into + different languages. Note, the support is quite limited at the + moment. Specifically, it only applies to parts of the system written + in the Bash language, such as the `home-manager` command line tool + and the activation script. + + If you would like to contribute to the translation effort then you + can do so through the [Home Manager Weblate + project](https://hosted.weblate.org/projects/home-manager/). + +- A new module, `launchd.agents` was added. Use this to enable + services based on macOS LaunchAgents. + +## State Version Changes {#sec-release-22.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"22.05\" or later. + +- The [programs.waybar.settings](#opt-programs.waybar.settings) option now allows defining + modules directly under [programs.waybar.settings](#opt-programs.waybar.settings). + Defining modules under `programs.waybar.settings.modules` will now + be an error. For example, + + ``` nix + programs.waybar.settings.modules."custom/my-module" = { }; + ``` + + becomes + + ``` nix + programs.waybar.settings."custom/my-module" = { }; + ``` diff --git a/third_party/home-manager/docs/release-notes/rl-2211.adoc b/third_party/home-manager/docs/release-notes/rl-2211.adoc deleted file mode 100644 index e19f157793..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2211.adoc +++ /dev/null @@ -1,113 +0,0 @@ -[[sec-release-22.11]] -== Release 22.11 - -The 22.11 release branch became the stable branch in November, 2022. - -[[sec-release-22.11-highlights]] -=== Highlights - -This release has the following notable changes: - -* The <> option no longer has a default value. -It used to default to ``18.09'', which was the Home Manager version -that introduced the option. If your configuration does not explicitly -set this option then you need to add -+ -[source,nix] -home.stateVersion = "18.09"; -+ -to your configuration. - -* The Flake function `homeManagerConfiguration` has been simplified. -Specifically, the arguments -+ --- - - `configuration`, - - `username`, - - `homeDirectory`, - - `stateVersion`, - - `extraModules`, and - - `system` --- -+ -have been removed. Instead use the new `modules` argument, which -accepts a list of NixOS modules. -+ -Further, the `pkgs` argument is now mandatory and should be set to -`nixpkgs.legacyPackages.${system}` where `nixpkgs` is the Nixpkgs -input of your choice. -+ -For example, if your Flake currently contains -+ -[source,nix] ----- -homeManagerConfiguration { - configuration = import ./home.nix; - system = "x86_64-linux"; - username = "jdoe"; - homeDirectory = "/home/jdoe"; - stateVersion = "22.05"; - extraModules = [ ./some-extra-module.nix ]; -} ----- -+ -then you can change it to -+ -[source,nix] ----- -homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.${system}; - modules = [ - ./home.nix - ./some-extra-module.nix - { - home = { - username = "jdoe"; - homeDirectory = "/home/jdoe"; - stateVersion = "22.05"; - }; - } - ]; -} ----- -+ -Of course, you can move the assignment of <>, -<>, and <> to some -other file or simply place them in your `home.nix`. - -* The `services.picom` module has been refactored to use structural -settings. -+ -As a result `services.picom.extraOptions` has been removed in favor of -<>. Also, `services.picom.blur*` were -removed since upstream changed the blur settings to be more flexible. -You can migrate the blur settings to use -<> instead. - -* The `services.compton` module has been removed. It was deprecated in -release 20.03. Use `services.picom` instead. - -[[sec-release-22.11-state-version-changes]] -=== 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 "22.11" or later. - -* The <> option now defaults to the -value of <> if <> is -enabled. Otherwise it is undefined and must be specified in the user -configuration. - -* The activation script now resets `PATH` before running. Before, the -user's `PATH` environment variable would be used in the script and -this made it possible for commands in the activation script to run -arbitrary commands accessible to the user. We now restrict the -activation script to commands that are explicitly specified. -+ -There is no official way to restore the old behavior. We attempt to -make the activation script as reproducible as possible and honoring -the user's `PATH` reduces reproducibility. -+ -If you need to run a command in an activation script block then refer -to the command by its absolute command path, such as -`${pkgs.hello}/bin/hello`. diff --git a/third_party/home-manager/docs/release-notes/rl-2211.md b/third_party/home-manager/docs/release-notes/rl-2211.md new file mode 100644 index 0000000000..e731d462d2 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2211.md @@ -0,0 +1,113 @@ +# Release 22.11 {#sec-release-22.11} + +The 22.11 release branch became the stable branch in November, 2022. + +## Highlights {#sec-release-22.11-highlights} + +This release has the following notable changes: + +- The [home.stateVersion](#opt-home.stateVersion) option no longer has a default + value. It used to default to "18.09", which was the Home Manager + version that introduced the option. If your configuration does not + explicitly set this option then you need to add + + ``` nix + home.stateVersion = "18.09"; + ``` + + to your configuration. + +- The Flake function `homeManagerConfiguration` has been simplified. + Specifically, the arguments + + - `configuration`, + + - `username`, + + - `homeDirectory`, + + - `stateVersion`, + + - `extraModules`, and + + - `system` + + have been removed. Instead use the new `modules` argument, which + accepts a list of NixOS modules. + + Further, the `pkgs` argument is now mandatory and should be set to + `nixpkgs.legacyPackages.${system}` where `nixpkgs` is the Nixpkgs + input of your choice. + + For example, if your Flake currently contains + + ``` nix + homeManagerConfiguration { + configuration = import ./home.nix; + system = "x86_64-linux"; + username = "jdoe"; + homeDirectory = "/home/jdoe"; + stateVersion = "22.05"; + extraModules = [ ./some-extra-module.nix ]; + } + ``` + + then you can change it to + + ``` nix + homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.${system}; + modules = [ + ./home.nix + ./some-extra-module.nix + { + home = { + username = "jdoe"; + homeDirectory = "/home/jdoe"; + stateVersion = "22.05"; + }; + } + ]; + } + ``` + + Of course, you can move the assignment of [home.username](#opt-home.username), + [home.stateVersion](#opt-home.stateVersion) to + some other file or simply place them in your `home.nix`. + +- The `services.picom` module has been refactored to use structural + settings. + + As a result `services.picom.extraOptions` has been removed in favor + of [services.picom.settings](#opt-services.picom.settings). Also, `services.picom.blur*` + were removed since upstream changed the blur settings to be more + flexible. You can migrate the blur settings to use + [services.picom.settings](#opt-services.picom.settings) instead. + +- The `services.compton` module has been removed. It was deprecated in + release 20.03. Use `services.picom` instead. + +## State Version Changes {#sec-release-22.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 +\"22.11\" or later. + +- The [services.mpd.musicDirectory](#opt-services.mpd.musicDirectory) option now defaults to + the value of [xdg.userDirs.music](#opt-xdg.userDirs.music) if + [xdg.userDirs.enable](#opt-xdg.userDirs.enable) is enabled. Otherwise it is + undefined and must be specified in the user configuration. + +- The activation script now resets `PATH` before running. Before, the + user's `PATH` environment variable would be used in the script and + this made it possible for commands in the activation script to run + arbitrary commands accessible to the user. We now restrict the + activation script to commands that are explicitly specified. + + There is no official way to restore the old behavior. We attempt to + make the activation script as reproducible as possible and honoring + the user's `PATH` reduces reproducibility. + + If you need to run a command in an activation script block then + refer to the command by its absolute command path, such as + `${pkgs.hello}/bin/hello`. diff --git a/third_party/home-manager/docs/release-notes/rl-2305.adoc b/third_party/home-manager/docs/release-notes/rl-2305.adoc deleted file mode 100644 index b4491bb6cf..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2305.adoc +++ /dev/null @@ -1,57 +0,0 @@ -[[sec-release-23.05]] -== Release 23.05 - -The 23.05 release branch became the stable branch in May, 2023. - -[[sec-release-23.05-highlights]] -=== Highlights - -This release has the following notable changes: - -* Firefox add-ons are now managed per-profile. -That is, if you are currently having -+ -[source,nix] -programs.firefox.extensions = [ foo bar ]; -+ -in your configuration then you must change it to -+ -[source,nix] -programs.firefox.profiles.myprofile.extensions = [ foo bar ]; - -* The default configuration location has been changed from -`~/.config/nixpkgs/home.nix` to `~/.config/home-manager/home.nix`. -+ -Similarly, if you are using a Nix flake based setup -then the default flake file location has changed from -`~/.config/nixpkgs/flake.nix` to `~/.config/home-manager/flake.nix`. -+ -The old location will continue to work but using it will trigger a warning message. -We changed the default configuration location to avoid confusion about -which files belong to Home Manager and which belong to Nixpkgs. - -* The `home-manager` tool now offers an `init` command. -This command can be used to generate an initial Home Manager configuration, -and optionally also activate it. -The recommended installation method for a standalone Home Manager setup -with Nix flakes uses this new command. -The standard installation method remains the same but uses the new command internally. -See <> for more. - -[[sec-release-23.05-state-version-changes]] -=== 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 "23.05" or later. - -* The options -+ --- -- <> -- <> -- <> -- <> --- -+ -now default to `true` which is consistent with the default values for -those options used by `i3` and `sway`. diff --git a/third_party/home-manager/docs/release-notes/rl-2305.md b/third_party/home-manager/docs/release-notes/rl-2305.md new file mode 100644 index 0000000000..1358cf71e7 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2305.md @@ -0,0 +1,59 @@ +# Release 23.05 {#sec-release-23.05} + +The 23.05 release branch became the stable branch in May, 2023. + +## Highlights {#sec-release-23.05-highlights} + +This release has the following notable changes: + +- Firefox add-ons are now managed per-profile. That is, if you are + currently having + + ``` nix + programs.firefox.extensions = [ foo bar ]; + ``` + + in your configuration then you must change it to + + ``` nix + programs.firefox.profiles.myprofile.extensions = [ foo bar ]; + ``` + +- The default configuration location has been changed from + `~/.config/nixpkgs/home.nix` to `~/.config/home-manager/home.nix`. + + Similarly, if you are using a Nix flake based setup then the default + flake file location has changed from `~/.config/nixpkgs/flake.nix` + to `~/.config/home-manager/flake.nix`. + + The old location will continue to work but using it will trigger a + warning message. We changed the default configuration location to + avoid confusion about which files belong to Home Manager and which + belong to Nixpkgs. + +- The `home-manager` tool now offers an `init` command. This command + can be used to generate an initial Home Manager configuration, and + optionally also activate it. The recommended installation method for + a standalone Home Manager setup with Nix flakes uses this new + command. The standard installation method remains the same but uses + the new command internally. See [sec-flakes-standalone](#sec-flakes-standalone) for + more. + +## State Version Changes {#sec-release-23.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"23.05\" or later. + +- The options + + - [xsession.windowManager.i3.config.window.titlebar](#opt-xsession.windowManager.i3.config.window.titlebar) + + - [xsession.windowManager.i3.config.floating.titlebar](#opt-xsession.windowManager.i3.config.floating.titlebar) + + - [wayland.windowManager.sway.config.window.titlebar](#opt-wayland.windowManager.sway.config.window.titlebar) + + - [wayland.windowManager.sway.config.floating.titlebar](#opt-wayland.windowManager.sway.config.floating.titlebar) + + now default to `true` which is consistent with the default values + for those options used by `i3` and `sway`. diff --git a/third_party/home-manager/docs/release-notes/rl-2311.adoc b/third_party/home-manager/docs/release-notes/rl-2311.adoc deleted file mode 100644 index 4947b8095c..0000000000 --- a/third_party/home-manager/docs/release-notes/rl-2311.adoc +++ /dev/null @@ -1,41 +0,0 @@ -[[sec-release-23.11]] -== Release 23.11 - -This is the current unstable branch and the information in this section is therefore not final. - -[[sec-release-23.11-highlights]] -=== Highlights -:babelfish: https://github.com/bouk/babelfish -:nixpkgs-markdown: https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup - -This release has the following notable changes: - -* When using <>, the setup code -for <> is now translated -with {babelfish}[babelfish]. -This should result in significantly faster shell startup times -but could theoretically break -if you have very complex bash expressions in a session variable. -Please report any issues you experience. - -* The `.release` file in the Home Manager source tree -has been supplanted by `release.json`, -which contains more information about the branch. -If you have any external code reading this file, -please switch to consuming `release.json` instead. -The `.release` file will be removed in 24.05. - -* Home Manager has migrated to using -the upstream Nixpkgs `lib.nixosOptionsDoc` processor -for option documentation. -If you have any external Home Manager modules, -their option descriptions and literal examples should be translated -to {nixpkgs-markdown}[Nixpkgs-flavoured Markdown]. - -[[sec-release-23.11-state-version-changes]] -=== 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 "23.11" or later. - -* Nothing, yet. diff --git a/third_party/home-manager/docs/release-notes/rl-2311.md b/third_party/home-manager/docs/release-notes/rl-2311.md new file mode 100644 index 0000000000..cd88db45d4 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2311.md @@ -0,0 +1,37 @@ +# Release 23.11 {#sec-release-23.11} + +The 23.11 release branch became stable in November, 2023. + +## Highlights {#sec-release-23.11-highlights} + +This release has the following notable changes: + +- When using [programs.fish.enable](#opt-programs.fish.enable), the setup code for + [home.sessionVariables](#opt-home.sessionVariables) is now translated with + [babelfish](https://github.com/bouk/babelfish). This should result + in significantly faster shell startup times but could theoretically + break if you have very complex bash expressions in a session + variable. Please report any issues you experience. + +- The `.release` file in the Home Manager source tree has been + supplanted by `release.json`, which contains more information about + the branch. If you have any external code reading this file, please + switch to consuming `release.json` instead. The `.release` file will + be removed in 24.05. + +- Home Manager has migrated to using the upstream Nixpkgs + `lib.nixosOptionsDoc` processor for option documentation. If you + have any external Home Manager modules, their option descriptions + and literal examples should be translated to [Nixpkgs-flavoured + Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup). + +- The `services.password-store-sync` module has been removed. Use + `services.git-sync` instead. + +## State Version Changes {#sec-release-23.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 +\"23.11\" or later. + +- Nothing, yet. diff --git a/third_party/home-manager/docs/release-notes/rl-2405.md b/third_party/home-manager/docs/release-notes/rl-2405.md new file mode 100644 index 0000000000..6cf2c95742 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2405.md @@ -0,0 +1,19 @@ +# Release 24.05 {#sec-release-24.05} + +This is the current unstable branch and the information in this section +is therefore not final. + +## Highlights {#sec-release-24.05-highlights} + +This release has the following notable changes: + +- The `.release` file in the Home Manager project root has been + removed. Please use the `release.json` file instead. + +## State Version Changes {#sec-release-24.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"24.05\" or later. + +- Nothing, yet. diff --git a/third_party/home-manager/docs/usage.adoc b/third_party/home-manager/docs/usage.adoc deleted file mode 100644 index 00ce347e2f..0000000000 --- a/third_party/home-manager/docs/usage.adoc +++ /dev/null @@ -1,252 +0,0 @@ -[[ch-usage]] -== Using Home Manager - -Your use of Home Manager is centered around the configuration file, -which is typically found at `~/.config/home-manager/home.nix` in the standard installation -or `~/.config/home-manager/flake.nix` in a Nix flake based installation. - -[NOTE] -The default configuration used to be placed in `~/.config/nixpkgs`¸ -so you may see references to that elsewhere. -The old directory still works but Home Manager will print a warning message when used. - -This configuration file can be _built_ and _activated_. - -Building a configuration produces a directory in the Nix store that contains all files and programs that should be available in your home directory and Nix user profile, respectively. The build step also checks that the configuration is valid and it will fail with an error if you, for example, assign a value to an option that does not exist or assign a value of the wrong type. Some modules also have custom assertions that perform more detailed, module specific, checks. - -Concretely, if your configuration contains - -[source,nix] -programs.emacs.enable = "yes"; - -then building it, for example using `home-manager build`, will result in an error message saying something like - -[source,console] ----- -$ home-manager build -error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values: -- In `/home/jdoe/.config/home-manager/home.nix': "yes" -(use '--show-trace' to show detailed location information) ----- - -The message indicates that you must provide a Boolean value for this option, that is, either `true` or `false`. The documentation of each option will state the expected type, for <> you will see ``Type: boolean''. You there also find information about the default value and a description of the option. You can find the complete option documentation in <> or directly in the terminal by running - -[source,console] -man home-configuration.nix - -Once a configuration is successfully built, it can be activated. The activation performs the steps necessary to make the files, programs, and services available in your user environment. The `home-manager switch` command performs a combined build and activation. - -[[sec-usage-configuration]] -=== Configuration Example - -A fresh install of Home Manager will generate a minimal `~/.config/home-manager/home.nix` file containing something like - -[source,nix] ----- -{ config, pkgs, ... }: - -{ - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "jdoe"; - home.homeDirectory = "/home/jdoe"; - - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # 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.05"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -} ----- - -You can use this as a base for your further configurations. - -[NOTE] -If you are not very familiar with the Nix language and NixOS modules then it is encouraged to start with small and simple changes. As you learn you can gradually grow the configuration with confidence. - -As an example, let us expand the initial configuration file to also install the htop and fortune packages, install Emacs with a few extra packages available, and enable the user gpg-agent service. - -To satisfy the above setup we should elaborate the `home.nix` file as follows: - -[source,nix] ----- -{ config, pkgs, ... }: - -{ - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "jdoe"; - home.homeDirectory = "/home/jdoe"; - - # Packages that should be installed to the user profile. - home.packages = [ <1> - pkgs.htop - pkgs.fortune - ]; - - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # 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.05"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - programs.emacs = { <2> - enable = true; - extraPackages = epkgs: [ - epkgs.nix-mode - epkgs.magit - ]; - }; - - services.gpg-agent = { <3> - enable = true; - defaultCacheTtl = 1800; - enableSshSupport = true; - }; -} ----- -<1> Nixpkgs packages can be installed to the user profile using <>. -<2> The option names of a program module typically start with `programs.`. -<3> Similarly, for a service module, the names start with `services.`. Note in some cases a package has both programs _and_ service options – Emacs is such an example. - -To activate this configuration you can run - -[source,console] -home-manager switch - -or if you are not feeling so lucky, - -[source,console] -home-manager build - -which will create a `result` link to a directory containing an -activation script and the generated home directory files. - -[[sec-usage-rollbacks]] -=== Rollbacks - -While the `home-manager` tool does not explicitly support rollbacks at the moment it is relatively easy to perform one manually. The steps to do so are - -1. Run `home-manager generations` to determine which generation you wish to rollback to: -+ -[source,console] ----- -$ home-manager generations -2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation -2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation -2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation -2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation -2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation -… ----- - -2. Copy the Nix store path of the generation you chose, e.g., -+ ----- -/nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation ----- -+ -for generation 763. - -3. Run the `activate` script inside the copied store path: -+ -[source,console] ----- -$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate -Starting home manager activation -… ----- - -[[sec-usage-dotfiles]] -=== Keeping your ~ safe from harm - -To configure programs and services Home Manager must write various things to your home directory. To prevent overwriting any existing files when switching to a new generation, Home Manager will attempt to detect collisions between existing files and generated files. If any such collision is detected the activation will terminate before changing anything on your computer. - -For example, suppose you have a wonderful, painstakingly created `~/.config/git/config` and add - -[source,nix] ----- -{ - # … - - programs.git = { - enable = true; - userName = "Jane Doe"; - userEmail = "jane.doe@example.org"; - }; - - # … -} ----- - -to your configuration. Attempting to switch to the generation will then result in - -[source,console] ----- -$ home-manager switch -… -Activating checkLinkTargets -Existing file '/home/jdoe/.config/git/config' is in the way -Please move the above files and try again ----- - -[[sec-usage-graphical]] -=== Graphical services - -Home Manager includes a number of services intended to run in a graphical session, for example `xscreensaver` and `dunst`. Unfortunately, such services will not be started automatically unless you let Home Manager start your X session. That is, you have something like - -[source,nix] ----- -{ - # … - - services.xserver.enable = true; - - # … -} ----- - -in your system configuration and - -[source,nix] ----- -{ - # … - - xsession.enable = true; - xsession.windowManager.command = "…"; - - # … -} ----- - -in your Home Manager configuration. - -[[sec-updating]] -=== Updating - -If you have installed Home Manager using the Nix channel method -then updating Home Manager is done by first updating the channel. -You can then switch to the updated Home Manager environment. - -[source,console] ----- -$ nix-channel --update -… -unpacking channels... -$ home-manager switch ----- diff --git a/third_party/home-manager/docs/writing-modules.adoc b/third_party/home-manager/docs/writing-modules.adoc deleted file mode 100644 index 5e4802ce1a..0000000000 --- a/third_party/home-manager/docs/writing-modules.adoc +++ /dev/null @@ -1,283 +0,0 @@ -[[ch-writing-modules]] -== Writing Home Manager Modules -:writing-nixos-modules: https://nixos.org/nixos/manual/index.html#sec-writing-modules - -The module system in Home Manager is based entirely on the NixOS module system so we will here only highlight aspects that are specific for Home Manager. For information about the module system as such please refer to the {writing-nixos-modules}[Writing NixOS Modules] chapter of the NixOS manual. - -[[sec-option-types]] -=== Option Types -:wikipedia-dag: https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095 -:gvariant-description: https://docs.gtk.org/glib/struct.Variant.html#description - -Overall the basic option types are the same in Home Manager as NixOS. A few Home Manager options, however, make use of custom types that are worth describing in more detail. These are the option types `dagOf` and `gvariant` that are used, for example, by <> and <>. - -[[sec-option-types-dag]]`hm.types.dagOf`:: -Options of this type have attribute sets as values where each member is a node in a {wikipedia-dag}[directed acyclic graph] (DAG). This allows the attribute set entries to express dependency relations among themselves. This can, for example, be used to control the order of match blocks in a OpenSSH client configuration or the order of activation script blocks in <>. -+ -A number of functions are provided to create DAG nodes. The functions are shown below with examples using an option `foo.bar` of type `hm.types.dagOf types.int`. -+ --- -[[sec-option-types-dag-entryAnywhere]]`hm.dag.entryAnywhere (value: T) : DagEntry`::: -Indicates that `value` can be placed anywhere within the DAG. This is also the default for plain attribute set entries, that is -+ -[source,nix] ----- -foo.bar = { - a = hm.dag.entryAnywhere 0; -} ----- -+ -and -+ -[source,nix] ----- -foo.bar = { - a = 0; -} ----- -+ -are equivalent. -+ -[[sec-option-types-dag-entryAfter]]`hm.dag.entryAfter (afters: list string) (value: T) : DagEntry` ::: -Indicates that `value` must be placed _after_ each of the attribute names in the given list. For example -+ -[source,nix] ----- -foo.bar = { - a = 0; - b = hm.dag.entryAfter [ "a" ] 1; -} ----- -+ -would place `b` after `a` in the graph. -+ -[[sec-option-types-dag-entryBefore]]`hm.dag.entryBefore (befores: list string) (value: T) : DagEntry` ::: -Indicates that `value` must be placed _before_ each of the attribute names in the given list. For example -+ -[source,nix] ----- -foo.bar = { - b = hm.dag.entryBefore [ "a" ] 1; - a = 0; -} ----- -+ -would place `b` before `a` in the graph. -+ -[[sec-option-types-dag-entryBetween]]`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry` ::: -Indicates that `value` must be placed _before_ the attribute names in the first list and _after_ the attribute names in the second list. For example -+ -[source,nix] ----- -foo.bar = { - a = 0; - c = hm.dag.entryBetween [ "b" ] [ "a" ] 2; - b = 1; -} ----- -+ -would place `c` before `b` and after `a` in the graph. --- -+ -There are also a set of functions that generate a DAG from a list. -These are convenient when you just want to have a linear list of DAG entries, -without having to manually enter the relationship between each entry. -Each of these functions take a `tag` as argument and the DAG entries will be named `${tag}-${index}`. - -[[sec-option-types-dag-entriesAnywhere]]`hm.dag.entriesAnywhere (tag: string) (values: [T]) : Dag`::: -Creates a DAG with the given values with each entry labeled using the given tag. For example -+ -[source,nix] -foo.bar = hm.dag.entriesAnywhere "a" [ 0 1 ]; -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = { - a-0 = 0; - a-1 = hm.dag.entryAfter [ "a-0" ] 1; -} ----- -+ -[[sec-option-types-dag-entriesAfter]]`hm.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag`::: -Creates a DAG with the given values with each entry labeled using the given tag. -The list of values are placed are placed _after_ each of the attribute names in `afters`. -For example -+ -[source,nix] -foo.bar = - { b = 0; } - // hm.dag.entriesAfter "a" [ "b" ] [ 1 2 ]; -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = { - b = 0; - a-0 = hm.dag.entryAfter [ "b" ] 1; - a-1 = hm.dag.entryAfter [ "a-0" ] 2; -} ----- -+ -[[sec-option-types-dag-entriesBefore]]`hm.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag`::: -Creates a DAG with the given values with each entry labeled using the given tag. -The list of values are placed _before_ each of the attribute names in `befores`. -For example -+ -[source,nix] -foo.bar = - { b = 0; } - // hm.dag.entriesBefore "a" [ "b" ] [ 1 2 ]; -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = { - b = 0; - a-0 = 1; - a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; -} ----- -+ -[[sec-option-types-dag-entriesBetween]]`hm.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag`::: -Creates a DAG with the given values with each entry labeled using the given tag. -The list of values are placed _before_ each of the attribute names in `befores` -and _after_ each of the attribute names in `afters`. -For example -+ -[source,nix] -foo.bar = - { b = 0; c = 3; } - // hm.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ]; -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = { - b = 0; - c = 3; - a-0 = hm.dag.entryAfter [ "c" ] 1; - a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; -} ----- - -[[sec-option-types-gvariant]]`hm.types.gvariant`:: -This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays, tuples, ``maybe'' types, and dictionaries. -+ -Some Nix values are automatically coerced to matching GVariant value but the GVariant model is richer so you may need to use one of the provided constructor functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`. -+ -[[sec-option-types-gvariant-mkBoolean]]`hm.gvariant.mkBoolean (v: bool)`::: -Takes a Nix value `v` to a GVariant `boolean` value (GVariant format string `b`). Note, Nix booleans are automatically coerced using this function. That is, -+ -[source,nix] ----- -foo.bar = hm.gvariant.mkBoolean true; ----- -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = true; ----- -[[sec-option-types-gvariant-mkString]]`hm.gvariant.mkString (v: string)`::: -Takes a Nix value `v` to a GVariant `string` value (GVariant format string `s`). Note, Nix strings are automatically coerced using this function. That is, -+ -[source,nix] ----- -foo.bar = hm.gvariant.mkString "a string"; ----- -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = "a string"; ----- -[[sec-option-types-gvariant-mkObjectpath]]`hm.gvariant.mkObjectpath (v: string)`::: -Takes a Nix value `v` to a GVariant `objectpath` value (GVariant format string `o`). -[[sec-option-types-gvariant-mkUchar]]`hm.gvariant.mkUchar (v: string)`::: -Takes a Nix value `v` to a GVariant `uchar` value (GVariant format string `y`). -[[sec-option-types-gvariant-mkInt16]]`hm.gvariant.mkInt16 (v: int)`::: -Takes a Nix value `v` to a GVariant `int16` value (GVariant format string `n`). -[[sec-option-types-gvariant-mkUint16]]`hm.gvariant.mkUint16 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint16` value (GVariant format string `q`). -[[sec-option-types-gvariant-mkInt32]]`hm.gvariant.mkInt32 (v: int)`::: -Takes a Nix value `v` to a GVariant `int32` value (GVariant format string `i`). Note, Nix integers are automatically coerced using this function. That is, -+ -[source,nix] ----- -foo.bar = hm.gvariant.mkInt32 7; ----- -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = 7; ----- -[[sec-option-types-gvariant-mkUint32]]`hm.gvariant.mkUint32 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint32` value (GVariant format string `u`). -[[sec-option-types-gvariant-mkInt64]]`hm.gvariant.mkInt64 (v: int)`::: -Takes a Nix value `v` to a GVariant `int64` value (GVariant format string `x`). -[[sec-option-types-gvariant-mkUint64]]`hm.gvariant.mkUint64 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint64` value (GVariant format string `t`). -[[sec-option-types-gvariant-mkDouble]]`hm.gvariant.mkDouble (v: double)`::: -Takes a Nix value `v` to a GVariant `double` value (GVariant format string `d`). Note, Nix floats are automatically coerced using this function. That is, -+ -[source,nix] ----- -foo.bar = hm.gvariant.mkDouble 3.14; ----- -+ -is equivalent to -+ -[source,nix] ----- -foo.bar = 3.14; ----- -+ -[[sec-option-types-gvariant-mkArray]]`hm.gvariant.mkArray type elements`::: -Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type (GVariant format string `a${type}`). The `type` value can be constructed using -+ --- -- `hm.gvariant.type.string` (GVariant format string `s`) -- `hm.gvariant.type.boolean` (GVariant format string `b`) -- `hm.gvariant.type.uchar` (GVariant format string `y`) -- `hm.gvariant.type.int16` (GVariant format string `n`) -- `hm.gvariant.type.uint16` (GVariant format string `q`) -- `hm.gvariant.type.int32` (GVariant format string `i`) -- `hm.gvariant.type.uint32` (GVariant format string `u`) -- `hm.gvariant.type.int64` (GVariant format string `x`) -- `hm.gvariant.type.uint64` (GVariant format string `t`) -- `hm.gvariant.type.double` (GVariant format string `d`) -- `hm.gvariant.type.variant` (GVariant format string `v`) -- `hm.gvariant.type.arrayOf type` (GVariant format string `a${type}`) -- `hm.gvariant.type.maybeOf type` (GVariant format string `m${type}`) -- `hm.gvariant.type.tupleOf types` (GVariant format string `(${lib.concatStrings types})`) -- `hm.gvariant.type.dictionaryEntryOf [keyType valueType]` (GVariant format string `{${keyType}${valueType}}`) --- -+ -where `type` and `types` are themselves a type and list of types, respectively. -+ -[[sec-option-types-gvariant-mkEmptyArray]]`hm.gvariant.mkEmptyArray type`::: -An alias of <>. -+ -[[sec-option-types-gvariant-mkNothing]]`hm.gvariant.mkNothing type`::: -Builds a GVariant maybe value (GVariant format string `m${type}`) whose (non-existent) element is of the given type. The `type` value is constructed as described for the <> function above. -+ -[[sec-option-types-gvariant-mkJust]]`hm.gvariant.mkJust element`::: -Builds a GVariant maybe value (GVariant format string `m${element.type}`) containing the given GVariant element. -+ -[[sec-option-types-gvariant-mkTuple]]`hm.gvariant.mkTuple elements`::: -Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value. -+ -[[sec-option-types-gvariant-mkVariant]]`hm.gvariant.mkVariant element`::: -Builds a GVariant variant (GVariant format string `v`) which contains the value of a GVariant element. -+ -[[sec-option-types-gvariant-mkDictionaryEntry]]`hm.gvariant.mkDictionaryEntry [key value]`::: -Builds a GVariant dictionary entry containing the given list of elements (GVariant format string `{${key.type}${value.type}}`), where each element is a GVariant value. diff --git a/third_party/home-manager/flake.lock b/third_party/home-manager/flake.lock index 331e949eeb..6cde8df2e1 100644 --- a/third_party/home-manager/flake.lock +++ b/third_party/home-manager/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1690881714, - "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9e1960bc196baf6881340d53dccb203a951745a2", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "type": "github" }, "original": { diff --git a/third_party/home-manager/flake.nix b/third_party/home-manager/flake.nix index a1c81635d7..81d2d606b9 100644 --- a/third_party/home-manager/flake.nix +++ b/third_party/home-manager/flake.nix @@ -80,7 +80,10 @@ configuration = { ... }: { imports = modules ++ [{ programs.home-manager.path = toString ./.; }]; - nixpkgs = { inherit (pkgs) config overlays; }; + nixpkgs = { + config = nixpkgs.lib.mkDefault pkgs.config; + inherit (pkgs) overlays; + }; }; }); }; @@ -103,12 +106,18 @@ packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; + lib = pkgs.lib; releaseInfo = nixpkgs.lib.importJSON ./release.json; docs = import ./docs { inherit pkgs; inherit (releaseInfo) release isReleaseBranch; }; hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; + + testPackages = let + tests = import ./tests { inherit pkgs; }; + renameTestPkg = n: lib.nameValuePair "test-${n}"; + in lib.mapAttrs' renameTestPkg tests.build; in { default = hmPkg; home-manager = hmPkg; @@ -116,7 +125,7 @@ docs-html = docs.manual.html; docs-json = docs.options.json; docs-manpages = docs.manPages; - }); + } // testPackages); defaultPackage = forAllSystems (system: self.packages.${system}.default); }); diff --git a/third_party/home-manager/home-manager/completion.bash b/third_party/home-manager/home-manager/completion.bash index de78045151..d59c8a1184 100644 --- a/third_party/home-manager/home-manager/completion.bash +++ b/third_party/home-manager/home-manager/completion.bash @@ -301,7 +301,7 @@ _home-manager_completions () "--verbose" "--cores" "--debug" "--impure" "--keep-failed" \ "--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \ "-L" "--print-build-logs" \ - "--show-trace" "--substitute" "--builders" "--version" \ + "--show-trace" "--flake" "--substitute" "--builders" "--version" \ "--update-input" "--override-input" "--experimental-features" \ "--extra-experimental-features" "--refresh") diff --git a/third_party/home-manager/home-manager/completion.zsh b/third_party/home-manager/home-manager/completion.zsh index 52bcce90e9..43cc9bdb94 100644 --- a/third_party/home-manager/home-manager/completion.zsh +++ b/third_party/home-manager/home-manager/completion.zsh @@ -6,6 +6,7 @@ _arguments \ '-A[attribute]:ATTRIBUTE:()' \ '-I[search path]:PATH:_files -/' \ '-b[backup files]:EXT:()' \ + '--flake[flake-uri]:PATH:_files -/' \ '--cores[cores]:NUM:()' \ '--debug[debug]' \ '--impure[impure]' \ @@ -53,6 +54,7 @@ case "$state" in build|switch) _arguments \ '--cores[cores]:NUM:()' \ + '--flake[flake-uri]:PATH:_files -/' \ '--debug[debug]' \ '--impure[impure]' \ '--keep-failed[keep failed]' \ diff --git a/third_party/home-manager/home-manager/home-manager b/third_party/home-manager/home-manager/home-manager index 8f3418ddaa..88b3b142d9 100644 --- a/third_party/home-manager/home-manager/home-manager +++ b/third_party/home-manager/home-manager/home-manager @@ -29,7 +29,9 @@ function removeByName() { } function setNixProfileCommands() { - if [[ -e $HOME/.nix-profile/manifest.json ]] ; then + if [[ -e $HOME/.nix-profile/manifest.json \ + || -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then + LIST_OUTPATH_CMD="nix profile list" REMOVE_CMD="removeByName" else @@ -132,7 +134,7 @@ function setHomeManagerNixPath() { _iWarn $'The fallback Home Manager path %s has been deprecated and a file/directory was found there.' \ "$p" # translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. - _i $'To remove this warning, do one of the fallowing. + _i $'To remove this warning, do one of the following. 1. Explicitly tell Home Manager to use the path, for example by adding @@ -155,6 +157,11 @@ function setHomeManagerNixPath() { # Sets some useful Home Manager related paths as global read-only variables. function setHomeManagerPathVariables() { + # If called twice then just exit early. + if [[ -v HM_DATA_HOME ]]; then + return + fi + declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}" declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER" declare -r globalGcrootsDir="$globalNixStateDir/gcroots/per-user/$USER" @@ -354,7 +361,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.05"; # Please read the comment before changing. + home.stateVersion = "23.11"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. @@ -392,16 +399,21 @@ $xdgVars # ''; }; - # You can also manage environment variables but you will have to manually - # source + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. If you don't want to manage your shell through Home + # Manager then you have to manually source 'hm-session-vars.sh' located at + # either # # ~/.nix-profile/etc/profile.d/hm-session-vars.sh # # or # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # # /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh # - # if you don't want to manage your shell through Home Manager. home.sessionVariables = { # EDITOR = "emacs"; }; @@ -648,6 +660,8 @@ function doSwitch() { } function doListGens() { + setHomeManagerPathVariables + # Whether to colorize the generations output. local color="never" if [[ ! -v NO_COLOR && -t 1 ]]; then @@ -665,6 +679,7 @@ function doListGens() { # Removes linked generations. Takes as arguments identifiers of # generations to remove. function doRmGenerations() { + setHomeManagerPathVariables setVerboseAndDryRun pushd "$HM_PROFILE_DIR" > /dev/null @@ -686,6 +701,8 @@ function doRmGenerations() { } function doExpireGenerations() { + setHomeManagerPathVariables + local generations generations="$( \ find "$HM_PROFILE_DIR" -name 'home-manager-*-link' -not -newermt "$1" \ @@ -705,7 +722,7 @@ function doListPackages() { local outPath outPath="$($LIST_OUTPATH_CMD | grep -o '/.*home-manager-path$')" if [[ -n "$outPath" ]] ; then - nix-store -q --references "$outPath" | sed 's/[^-]*-//' + nix-store -q --references "$outPath" | sed 's/[^-]*-//' | sort --ignore-case else _i 'No home-manager packages seem to be installed.' >&2 fi @@ -810,6 +827,7 @@ function doShowNews() { } function doUninstall() { + setHomeManagerPathVariables setVerboseAndDryRun setNixProfileCommands @@ -945,8 +963,6 @@ COMMAND="" COMMAND_ARGS=() FLAKE_ARG="" -setHomeManagerPathVariables - while [[ $# -gt 0 ]]; do opt="$1" shift @@ -1022,7 +1038,7 @@ while [[ $# -gt 0 ]]; do export VERBOSE=1 ;; --version) - echo 23.11-pre + echo 24.05-pre exit 0 ;; *) diff --git a/third_party/home-manager/home-manager/po/ca.po b/third_party/home-manager/home-manager/po/ca.po index 1598d04f3e..e723136596 100644 --- a/third_party/home-manager/home-manager/po/ca.po +++ b/third_party/home-manager/home-manager/po/ca.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-04-23 12:49+0000\n" -"Last-Translator: Leix b \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-10 15:58+0000\n" +"Last-Translator: Nara Díaz Viñolas \n" "Language-Team: Catalan \n" "Language: ca\n" @@ -17,16 +17,16 @@ 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 4.18-dev\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "No s'ha trobat cap fitxer de configuració a %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,25 +34,27 @@ msgstr "" "Mantenir el teu Home Manager %s a %s està obsolet,\n" "si us plau mou-lo a %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "No s'ha trobat cap fitxer de configuració. Si us plau, creeu un a %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "No s'ha trobat el Home Manager a %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"La ruta alternativa del Home Manager ha quedat obsoleta i s'ha trobat un " +"fitxer/directori allí." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -70,40 +72,60 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Per a eliminar aquesta advertència, dugueu a terme una de les següents " +"opcions.\n" +"\n" +"1. Indiqueu explícitament al Home Manager que utilitzi la ruta, per exemple " +"afegint\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" a la vostra configuració.\n" +"\n" +" Si importeu el Home Manager directament, podeu utilitzar el paràmetre " +"`path`\n" +"\n" +" pkgs.callPackage /ruta/al/paquet-del-home-manager { path = \"%s\"; }\n" +"\n" +" quan invoqueu el paquet del Home Manager.\n" +"\n" +"2. Elimineu la ruta obsoleta.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" "No s'ha pogut trobar un directori de perfils adequat, s'ha provat %s i %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "No s'han pogut inspeccionar les opcions de configuració de flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%: opció desconeguda '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Executa '%s --help' per veure l'ajuda d'ús" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "El fitxer %s ja existeix, deixant sense modificar..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Creant %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Creant generació inicial de Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -120,7 +142,7 @@ msgstr "" "a veure totes les opcions disponibles." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -135,11 +157,11 @@ msgstr "" "si l'error sembla culpa de Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "No es pot instanciar una configuració flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -153,73 +175,73 @@ msgstr[1] "" "Hi han %d notícies rellevants no llegides.\n" "Llegeix-les executant la comanda \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Configuració \"news.display\" no reconeguda \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Si us plau, defineix la variable d'entorn $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Impossible executar la compilació en un directori només lectura" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "No existeix la generació amb ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Impossible eliminar la generació actual %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Eliminant la generació %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "No s'han trobat generacions a expirar" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Cap paquet home-manager sembla estar instal·lat." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Argument desconegut %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Home Manager serà esborrat del sistema." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Això és un simulacre, res serà realment desinstal·lat." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Estàs segur que vols desinstal·lar Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Canviant a configuració buida de Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Visca!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Manager ha estat desinstal·lat però el vostre home.nix es manté intacte." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera un argument, obtinguts %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Comanda desconeguda: %s" diff --git a/third_party/home-manager/home-manager/po/cs.po b/third_party/home-manager/home-manager/po/cs.po new file mode 100644 index 0000000000..c01cbe518a --- /dev/null +++ b/third_party/home-manager/home-manager/po/cs.po @@ -0,0 +1,248 @@ +# 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: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2024-01-05 11:06+0000\n" +"Last-Translator: FireFragment \n" +"Language-Team: Czech \n" +"Language: cs\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>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Weblate 5.4-dev\n" + +#: home-manager/home-manager:81 +msgid "No configuration file found at %s" +msgstr "V %s nebyl nalezen konfigurační soubor" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Udržovat Home Manager %s v %s je zastaralé,\n" +"prosím přesuňte jej do %s" + +#: home-manager/home-manager:109 +msgid "No configuration file found. Please create one at %s" +msgstr "Konfigurační soubor nenalezen. Prosím vytvořte jej v %s" + +#: home-manager/home-manager:124 +msgid "Home Manager not found at %s." +msgstr "Home Manager nebyl nalezen v %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:132 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Záložní cesta pro Homa Manager % je zastaralá, byl v ní ale nalezen soubor/" +"adresář." + +#. 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:135 +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 "" +"K odstranění tohoto varování udělejte jednu z následujících operací.\n" +"\n" +"1. Jmenovitě určete Home Manageru cestu kterou má použít, například " +"přidáním\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" do vašá konfigurace.\n" +"\n" +" pokud importujete Home Manager přímo, můžete použít proměnou `path`\n" +"\n" +" pkgs.callPackage /cesta/k/home-manager-package { path = \"%s\"; }\n" +"\n" +" pro volání balíčku Home Manager.\n" +"\n" +"2. Odstraňte zastaralou cestu.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:174 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Nebyl nalezen vhodný adresář profilu, byly zkoušeny %s a %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:229 +msgid "Can't inspect options of a flake configuration" +msgstr "Nelze ověřit parametry z konfigurace flake" + +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 +msgid "%s: unknown option '%s'" +msgstr "%s: neznámý parametr '%s'" + +#: home-manager/home-manager:296 home-manager/home-manager:1035 +msgid "Run '%s --help' for usage help" +msgstr "Spusťte '%s --help' pro vypsání nápovědy" + +#: home-manager/home-manager:322 home-manager/home-manager:421 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Soubor %s již existuje, ponechán beze změn..." + +#: home-manager/home-manager:324 home-manager/home-manager:423 +msgid "Creating %s..." +msgstr "Vytvářím %s..." + +#: home-manager/home-manager:465 +msgid "Creating initial Home Manager generation..." +msgstr "Vytvářím první generaci Home Manageru..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:470 +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 "" +"Vše dokončeno! Nástroj home-manager je nainstalován. Můžete upravovat\n" +"\n" +" %s\n" +"\n" +"čimž konfigurujete Home Manager. Spusťte 'man home-configuration.nix' \n" +"k zobrazení všech dostupných možností." + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:475 +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 "" +"Ehm ehm, instalace se nezdařila! Pokud chyba vypadá jako\n" +"chyba Homa manageru, prosím založte problém na\n" +"\n" +" %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:486 +msgid "Can't instantiate a flake configuration" +msgstr "Nelze vytvořit instanci flake konfigurace" + +#: home-manager/home-manager:562 +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] "" +"%d nepřečtená novinka.\n" +"Přečtěte ji pomocí příkazu \"%s news\"." +msgstr[1] "" +"%d nepřečtené novinky.\n" +"Přečtěte je pomocí příkazu \"%s news\"." +msgstr[2] "" +"%d nepřečtených novinek.\n" +"Přečtěte je pomocí příkazu \"%s news\"." + +#: home-manager/home-manager:576 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Neznáme nastavení \"news.display\" \"%s\"." + +#: home-manager/home-manager:583 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Prosím nastavte proměnou prostředí $EDITOR" + +#: home-manager/home-manager:598 +msgid "Cannot run build in read-only directory" +msgstr "Sestavení nelze provést v adresáři dostupném pouze pro čtení" + +#: home-manager/home-manager:676 +msgid "No generation with ID %s" +msgstr "Generace s ID %s neexistuje" + +#: home-manager/home-manager:678 +msgid "Cannot remove the current generation %s" +msgstr "Nelze odstranit současnou generaci %s" + +#: home-manager/home-manager:680 +msgid "Removing generation %s" +msgstr "Odstraňuji generaci %s" + +#: home-manager/home-manager:699 +msgid "No generations to expire" +msgstr "Žádná generace k vypršení platnosti" + +#: home-manager/home-manager:710 +msgid "No home-manager packages seem to be installed." +msgstr "Žádný home-manager balíček není nainstalován." + +#: home-manager/home-manager:792 +msgid "Unknown argument %s" +msgstr "Neznámý parametr %s" + +#: home-manager/home-manager:816 +msgid "This will remove Home Manager from your system." +msgstr "Toto odstraní Home Manager z vašeho systému." + +#: home-manager/home-manager:819 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Toto zkouška na nečisto, nic nebude odinstalováno." + +#: home-manager/home-manager:823 +msgid "Really uninstall Home Manager?" +msgstr "Opravdu odinstalovat Home Manager?" + +#: home-manager/home-manager:829 +msgid "Switching to empty Home Manager configuration..." +msgstr "Přepínám na prázdou konfiguraci Home Manageru..." + +#: home-manager/home-manager:857 +msgid "Yay!" +msgstr "Hurá!" + +#: home-manager/home-manager:862 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager se odinstalovává, ale váš home.nix nebyl změněn." + +#: home-manager/home-manager:1074 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations očekává jeden parametr, přítomno %d." + +#: home-manager/home-manager:1096 +msgid "Unknown command: %s" +msgstr "Neznámý příkaz: %s" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "Tuto odvozeninu nelze sestavit, prosím spusťte ji pomocí nix-shell." diff --git a/third_party/home-manager/home-manager/po/da.po b/third_party/home-manager/home-manager/po/da.po index 572c904205..70f22ad3d0 100644 --- a/third_party/home-manager/home-manager/po/da.po +++ b/third_party/home-manager/home-manager/po/da.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-09-19 18:22+0000\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-08-27 13:52+0000\n" "Last-Translator: cafkafk \n" "Language-Team: Danish \n" @@ -17,40 +17,44 @@ 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 4.14.1\n" +"X-Generator: Weblate 5.0.1-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Ingen konfigurationsfiler fundet ved %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 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" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Ingen konfigurationsfiler fundet. Venligst lav en ved %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager kan ikke findes under %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:122 +#: home-manager/home-manager:132 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." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -68,39 +72,57 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"For at fjerne denne advarsel, gør en af følgende:\n" +"\n" +"1. Fortæl eksplicit at Home Manager skal bruge stien, for eksempel ved at " +"tilføje\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" til din konfiguration.\n" +"\n" +" Hvis du importerer Home Manager direkte, kan du bruge `path` parameteren\n" +"\n" +" pkgs.callPackage /sti/til/home-manager-pakke { path = \"%s\"; }\n" +"\n" +" når du kalder Home Manager pakken.\n" +"\n" +"2. Fjern den forældede sti.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kunne ikke finde en passende profilmappe, forsøgte %s og %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Kan ikke inspicere indstillinger af en flake konfiguration" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: ukendt indstilling '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Kør '%s --help' for brugsvejledning" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Filen %s findes allerede, lader den være uændret..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Opretter %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Laver initial Home Manager generation..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -118,7 +140,7 @@ msgstr "" "se alle de mulige indstillinger." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -133,11 +155,11 @@ msgstr "" "hvis fejlen fremstår som forskyldt af Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Kan ikke instantiere en flake konfiguration" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -151,74 +173,74 @@ msgstr[1] "" "Der er %d ulæste og relavante nyheder.\n" "Læs dem ved at køre \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Ubekændt \"news.display\" indstilling \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Venligst sæt $EDITOR miljøvariablen" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Kan ikke bygge i en læs-kun folder" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Ingen generation med ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Kan ikke fjerne den nuværende generation %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Fjern generation %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Ingen generationer som skal udløbes" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "" "Det virker ikke som om der er nogle home-manager pakker der er installeret." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Ubekendt argument %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Dette vil fjerne Home Manager fra dit system." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Dette er en tør kørsel, intet vil rent faktisk blive uinstalleret." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Virkelig uinstaller Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Skifter til tom Home Manager konfiguration..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Juhuu!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Manager bliver uinstalleret, men din home.nix bliver forladt uberørt." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations forventer et argument, fik %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Ubekendt kommando: %s" diff --git a/third_party/home-manager/home-manager/po/de.po b/third_party/home-manager/home-manager/po/de.po index fbc77b4c33..ae35be2ec5 100644 --- a/third_party/home-manager/home-manager/po/de.po +++ b/third_party/home-manager/home-manager/po/de.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-08-02 20:04+0000\n" -"Last-Translator: JonathanB \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-08-15 17:51+0000\n" +"Last-Translator: Simon \n" "Language-Team: German \n" "Language: de\n" @@ -19,14 +19,14 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Keine Konfigurationsdatei unter %s gefunden" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,25 +34,27 @@ msgstr "" "Das Beibehalten Ihres Home Manager %s in %s ist veraltet.\n" "Bitte verschieben Sie es nach %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Keine Konfigurationsdatei gefunden. Bitte erstellen Sie eine unter %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." msgstr "Home Manager nicht gefunden unter %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Der Ausweichpfad für Home-Manager unter %s ist veraltet. Es wurde jedoch " +"eine Datei/ein Verzeichnis dort gefunden." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -70,41 +72,56 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Um diese Warnung zu entfernen, führen Sie einen der folgenden Schritte aus.\n" +"\n" +"1. Weisen Sie Home Manager explizit an, den Pfad zu verwenden, indem Sie z. " +"B. Folgendes zu Ihrer Konfiguration hinzufügen:\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" Sollten Sie Home Manager direkt importieren, können Sie den Parameter " +"`path` verwenden, wenn Sie das Home Manager-Paket aufrufen:\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +"2. Entfernen Sie den veralteten Pfad:\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" "Es konnte kein passendes Profilverzeichnis gefunden werden, %s und %s wurden " "versucht" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Die Optionen einer Flake-Konfiguration können nicht inspiziert werden" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: unbekannte Option '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Führe '%s --help' aus, um Hilfe zur Verwendung zu erhalten" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "Die Datei %s existiert bereits, sie bleibt unverändert..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Erstelle %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Erstelle initiale Home Manager Generation..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -122,7 +139,7 @@ msgstr "" "sehen." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -137,11 +154,11 @@ msgstr "" "falls der Fehler auf Home Manager zurückzuführen ist." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Kann eine Flake-Konfiguration nicht instanziieren" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -155,73 +172,73 @@ msgstr[1] "" "Es gibt %d ungelesene und relevante Nachrichten.\n" "Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Unbekannte \"news.display\" Einstellung \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Bitte legen Sie die $EDITOR Variable fest" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Build kann nicht im schreibgeschützten Ordner ausgeführt werden" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Keine Generation mit ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Die jetzige Generation %s kann nicht entfernt werden" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Entferne Generation %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Keine ablaufenden Generationen" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Es scheint, als ob keine Home Manager Pakete installiert sind." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Unbekannte Argumente %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Dies wird Home Manager von Ihrem System entfernen." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Dies ist ein Probelauf, es wird nichts vom System deinstalliert." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Möchten Sie wirklich Home Manager deinstallieren?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Wechsle zu einer leeren Home Manager Konfiguration..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Juhu!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Manager ist installiert, aber Ihre home.nix Datei bleibt unberührt." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations erwartet ein Argument, hat aber %d erhalten." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Unbekannter Befehl: %s" diff --git a/third_party/home-manager/home-manager/po/es.po b/third_party/home-manager/home-manager/po/es.po index 45e0241760..c3c20ac3a3 100644 --- a/third_party/home-manager/home-manager/po/es.po +++ b/third_party/home-manager/home-manager/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-07-17 10:03+0000\n" "Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" "Language-Team: Persian 1;\n" "X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "هیچ فایل تنظیماتی در %s پیدا نشد" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "هیچ فایل تنظیماتی پیدا نشد. لطفا یک فایل در %s بسازید" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -69,38 +69,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 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:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "فایل %s از قبل وجود داشته است، بدون تغییر رها شد..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "ساختن %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -111,7 +111,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -121,11 +121,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -135,73 +135,73 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "لطفا متغیر محیطی $EDITOR را مقدار دهی کنید" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "نمی‌توان نسل فعلی %s را حذف کرد" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "حذف کردن نسل %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "واقعاً هوم منیجر را حذف نصب کنید؟" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 #, fuzzy msgid "Yay!" msgstr "آره!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "هوم منیجر حذف نصب شد اما home.nix شما دست نخورده باقی ماند." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "دستور ناشناخته: %s" diff --git a/third_party/home-manager/home-manager/po/fi.po b/third_party/home-manager/home-manager/po/fi.po index 60c56b1337..466b6890a2 100644 --- a/third_party/home-manager/home-manager/po/fi.po +++ b/third_party/home-manager/home-manager/po/fi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,38 +17,38 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 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:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -67,38 +67,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 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:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -109,7 +109,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -119,11 +119,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -133,72 +133,72 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "" diff --git a/third_party/home-manager/home-manager/po/fr.po b/third_party/home-manager/home-manager/po/fr.po index 141a179fee..6b1df46378 100644 --- a/third_party/home-manager/home-manager/po/fr.po +++ b/third_party/home-manager/home-manager/po/fr.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-06-17 07:49+0000\n" -"Last-Translator: Pink Pony \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-25 10:10+0000\n" +"Last-Translator: Louis Thevenet \n" "Language-Team: French \n" "Language: fr\n" @@ -17,44 +17,46 @@ 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 4.18.1\n" +"X-Generator: Weblate 5.4-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Aucun fichier de configuration trouvé à l'emplacement %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" "Garder votre Home Manager %s dans %s est obsolète,\n" -"Veuillez le déplacer à % s" +"Veuillez le déplacer à %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "" "Aucun fichier de configuration trouvé. Veuillez en créer un à l'emplacement " "%s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager indisponible à %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Le chemin d'accès de secours vers Home Manager %s est obsolète et un fichier/" +"dossier y a été trouvé." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -72,39 +74,54 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Pour supprimer cet avertissement, exécutez l'une des actions suivantes :\n" +"\n" +"1. Préciser explicitement à Home Manager d'utiliser le chemin d'accès, par " +"exemple en ajoutant ceci à votre configuration :\n" +"\n" +"\t{ programs.home-manager.path = \"%s\" ; }\n" +"\n" +"Si vous importez Home Manager directement, vous pouvez utiliser le paramètre " +"`path` au lancement du package :\n" +"\n" +"\tpkgs.callPackage /path/to/home-manager-package { path = \"%s\" ; }\n" +"\n" +"2. Supprimez le chemin d'accès obsolète.\n" +"\n" +"\t$ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Impossible de trouver le dossier de profil approprié, essayé %s et %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" -msgstr "Impossible d'inspecter les options d'une configuration en flocons" +msgstr "Impossible d'inspecter les options de la configuration d'un flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" -msgstr "%s : option inconnue « %s »" +msgstr "%s : option inconnue '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Exécuter « %s --help » pour de l'aide sur l'utilisation" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "Le fichier %s existe déjà, il sera laissé inchangé..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Création de %s ..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Création de la génération initiale de Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -122,7 +139,7 @@ msgstr "" "essayez 'man home-configuration.nix'." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -138,11 +155,11 @@ msgstr "" "si l'erreur semble être liée à Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Impossible d'instancier une configuration flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -156,72 +173,72 @@ msgstr[1] "" "Il y a %d nouveaux éléments non lus et pertinents.\n" "Vous pouvez les lire en exécutant la commande \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Configuration \"news.display\" iconnue \"%s\"." +msgstr "Configuration \"news.display\" inconnue \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Veuillez définir la variable d'environnement $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Impossible de lancer une compilation dans un dossier en écriture seule" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" -msgstr "Aucune génération avec l'identifiant %s" +msgstr "Aucune génération avec l'ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Impossible de supprimer la génération courante %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Suppression de la génération %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Aucune génération expirée" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." -msgstr "Aucun paquet home-manager ne semble être installé." +msgstr "Aucun package home-manager ne semble être installé." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" -msgstr "Aucun argument %s" +msgstr "Argument inconnu %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Cela va supprimer Home Manager de votre système." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "C'est un essai, rien ne sera réellement désinstallé." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Voulez-vous vraiment désinstaller Home Manager ?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Changement vers une configuration vierge de Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Yay !" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager est désinstallé mais votre home.nix reste intact." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations attend un argument, a obtenu %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Commande inconnue : %s" diff --git a/third_party/home-manager/home-manager/po/home-manager.pot b/third_party/home-manager/home-manager/po/home-manager.pot index df8aaf283d..e5937eeccc 100644 --- a/third_party/home-manager/home-manager/po/home-manager.pot +++ b/third_party/home-manager/home-manager/po/home-manager.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,38 +18,38 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 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:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -68,38 +68,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 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:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -110,7 +110,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -120,11 +120,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -134,72 +134,72 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "" diff --git a/third_party/home-manager/home-manager/po/id.po b/third_party/home-manager/home-manager/po/id.po index 6ecec508a8..a36e493d8d 100644 --- a/third_party/home-manager/home-manager/po/id.po +++ b/third_party/home-manager/home-manager/po/id.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-10-04 06:02+0000\n" "Last-Translator: Reza Almanda \n" "Language-Team: Indonesian \n" @@ -17,16 +17,16 @@ 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.0-dev\n" +"X-Generator: Weblate 5.1-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Tidak ada file konfigurasi yang ditemukan di %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +34,16 @@ msgstr "" "Mempertahankan Pengelola Beranda Anda %s di %s tidak digunakan lagi,\n" "tolong pindahkan ke %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Tidak ada file konfigurasi yang ditemukan. Silakan buat di %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." msgstr "Home Manager tidak ditemukan di %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,9 +52,9 @@ msgstr "" "ditemukan di sana." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -73,38 +73,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "Tidak dapat menemukan direktori profil yang sesuai, mencoba %s dan %s" +msgstr "Tidak dapat menemukan direktori profil yang sesuai, coba %s dan %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Tidak dapat memeriksa opsi konfigurasi flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: opsi tidak diketahui '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Jalankan '%s --help' untuk bantuan penggunaan" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "File %s sudah ada, sehingga tidak berubah..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Membuat %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "Membuat pembuatan Home Manager awal..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -115,7 +115,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -123,13 +123,18 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"Aduh, instalasi gagal! Silakan buat issue di\n" +"\n" +" %s\n" +"\n" +"jika error tersebut tampaknya merupakan kesalahan Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "Tidak dapat membuat konfigurasi flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -137,75 +142,75 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" -msgstr[1] "" +"Ada %d item berita yang belum dibaca dan relevan. \n" +"Bacalah dengan menjalankan perintah \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" +msgstr "Pengaturan \"news.display\" yang tidak diketahui \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" -msgstr "" +msgstr "Silahkan atur variabel lingkungan $EDITOR" -#: home-manager/home-manager:588 -#, fuzzy +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" -msgstr "Tidak dapat menjalankan build di direktori read-only" +msgstr "Tidak dapat menjalankan build di direktori hanya-baca" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Tidak ada generasi dengan ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" -msgstr "" +msgstr "Tidak dapat menghapus %s generasi saat ini" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Menghapus generasi %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" -msgstr "" +msgstr "Tidak ada generasi yang kedaluwarsa" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Yey!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "" diff --git a/third_party/home-manager/home-manager/po/it.po b/third_party/home-manager/home-manager/po/it.po index bd68151c11..266ce46ddd 100644 --- a/third_party/home-manager/home-manager/po/it.po +++ b/third_party/home-manager/home-manager/po/it.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-04-11 20:41+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-02 23:06+0000\n" +"Last-Translator: Lorenzo Brzek \n" "Language-Team: Italian \n" "Language: it\n" @@ -17,40 +17,44 @@ 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 4.17-dev\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Nessun file di configurazione trovato in %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Mantere il tuo Home Manger su %s su %s è obsoleto,\n" +"si raccomanda di spostarlo su %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" -msgstr "Nessun file di configurazione trovato. Per favore crearne uno in %s" +msgstr "Nessun file di configurazione trovato. Per favore creane uno in %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager non è stato trovato in %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Il percorso di riserva di Home Manager %s è stato deprecato e un file/" +"directory è stato trovato lì." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -68,39 +72,60 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Per rimuovere questo avvertimento, esegui queste istruzioni.\n" +"\n" +"1.Di esplicitamente a Home Manager di usare il percorso, per esempio " +"aggiungendo\n" +"\n" +"· · · · · { programs.home-manager.path = \"%s\"; }\n" +"\n" +"nella tua configurazione.\n" +"\n" +"· · · Se hai importato Home Manager direttamente, puoi usare il parametro " +"`path`\n" +"\n" +"· · · · · pkgs.callPackage /percorso/di/home-manager-package { path = \"%s\"" +";}\n" +"\n" +"· · · quando chiami il pacchetto Home Manager\n" +"\n" +"2. Rimuovi il percorso obsoleto\n" +"\n" +"· · · · · $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Impossibile trovare la directory del profilo adatta, si è provato con %s e %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Impossibile ispezionare le opzioni di configurazione flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: opzione sconosciuta '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" -msgstr "Esegui '%s --help' per ottenere aiuto" +msgstr "Esegui '%s --help' per le informazioni d'uso" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "Il file %s è già esistente, non verrà modificato..." +msgstr "Il file %s esiste già, non verrà modificato..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Creando %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Creando la generazione iniziale di Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -111,13 +136,13 @@ msgid "" msgstr "" "Tutto fatto! Home-manager dovrebbe essere installato e puoi modificare\n" "\n" -"%s\n" +"· · · · %s\n" "\n" "per configurare Home Manager. Esegui 'man home-configurazion.nix' per\n" "consultare tutte le opzioni disponibili." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -125,19 +150,19 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" -"Oh no, l'installazione non è andata a buon fine! Per favore aprire un ticket " +"Oh oh, l'installazione non è andata a buon fine! Per favore aprire un ticket " "issue a\n" "\n" -"%s\n" +"· · · · %s\n" "\n" "se l'errore sembra essere causato da Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Impossibile istanziare una configurazione flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -145,85 +170,85 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" -"C'è %d novità di elementi non letta.\n" +"C'è %d novità rilevante non letta.\n" "Leggila con il comando \"%s news\"." msgstr[1] "" -"Ci sono %d novità di elementi non letti\n" +"Ci sono %d novità rilevanti non lette.\n" "Leggile con il comando \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Opzione \"news.display\" sconosciuta \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" -msgstr "Per favore impostare la variabile d'ambient $EDITOR" +msgstr "Per favore impostare la variabile d'ambiente $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Impossibile eseguire la build in una cartella in sola lettura" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Nessuna generazione con ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Impossibile rimuovere la generazione corrente %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Rimuovo la generazione %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Nessuna generazione in scadenza" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." -msgstr "Nessun pacchetto home-manager sembra essere installato." +msgstr "Sembrerebbe che nessun pacchetto home-manager sia installato." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Argomento sconosciuto: %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Questo rimuoverà Home Manger dal tuo sistema." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Questo è un avvio a secco, nulla verrà realmente disinstallato." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Vuoi davvero disinstallare Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." -msgstr "Cambio ad una configurazione Home Manager vuota..." +msgstr "Passaando ad una configurazione Home Manager vuota..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Urrà!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "Home Manager è disinstallato ma la tua home.Nix non è stata toccata." +msgstr "Home Manager è disinstallato ma la tua home.nix non è stata toccata." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations si aspetta un solo argomento, invece di %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Comando sconosciuto: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" -"Questa derivazione non è compilabile, prova ad eseguila usando nix-shell." +"Questa derivazione non è compilabile, prova ad eseguirla usando nix-shell." #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Creando la configurazione iniziale di Home Manager..." diff --git a/third_party/home-manager/home-manager/po/ja.po b/third_party/home-manager/home-manager/po/ja.po index 605cebf335..9236d53f56 100644 --- a/third_party/home-manager/home-manager/po/ja.po +++ b/third_party/home-manager/home-manager/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-06-12 10:49+0000\n" "Last-Translator: Jeff Ames \n" "Language-Team: Japanese \n" "Language-Team: Korean \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-10-19 04:00+0000\n" +"Last-Translator: Yogurt \n" "Language-Team: Lithuanian \n" "Language: lt\n" @@ -19,40 +19,43 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n % 10 == 1 && (n % 100 < 11 || n % 100 > " "19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? " "1 : 2);\n" -"X-Generator: Weblate 4.15.1-dev\n" +"X-Generator: Weblate 5.1\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Nerastas konfigūracijos failas %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 +#, fuzzy msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Home Manager saugojimas %s viduje %s yra pasenes,\n" +"prašome perkelti į %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Nerastas konfigūracijos failas. Sukurkite jį adresu %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Nerastas Home Manager šioje vietoje %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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -71,38 +74,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Nepavyko rasti tinkamo profilio katalogo, bandyta naudoti %s ir %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Negalima patikrinti flake konfigūracijos pasirinkimų" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: nežinomas pasirinkimas „%s“" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Paleiskite „%s --help“, kad gautumėte naudojimosi instrukcijas" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Failas %s jau egzistuoja, jis paliekamas nepakeistas..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Kuriamas %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Kuriama pradinė Home Manager generacija..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -121,7 +124,7 @@ msgstr "" "jei norite pamatyti visus pasirinkimus." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -129,13 +132,18 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"O ne, įdiegimas nepavyko! Prašome užpildyti pranešimą apie problemą \n" +"\n" +" %s\n" +"\n" +"jei atrodo, kad klaida įvyko dėl Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Negalima sukurti pradinės flake konfigūracijos" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -152,78 +160,80 @@ msgstr[2] "" "Yra %d neperskaitytų ir aktualių naujienų.\n" "Perskaitykite jas paleidus komandą \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Nežinomas \"news.display\" nustatymas \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Prašome nustatyti $EDITOR aplinkos kintamąjį" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 +#, fuzzy msgid "Cannot run build in read-only directory" -msgstr "" +msgstr "Negalima vykdyti kompiliavimo read-only kataloge" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Nėra generacijos su ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Negalima pašalinti esamos generacijos %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Pašalinama generacija %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" -msgstr "" +msgstr "Nėra generacijų, kurios baigtų galioti" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Nėra instaliuotų home-manager paketų." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Nežinomas argumentas %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Tai pašalins Home Manager iš jūsų sistemos." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Tai bandomasis paleidimas, niekas nebus ištrinta." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Tikrai išdiegti Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Perjungiama į tuščią Home Manager konfigūraciją..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Valio!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager yra išdiegtas, bet jūsų home.nix liko nepaliestas." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations tikisi vieno argumento, gauta %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Nežinoma komanda: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" +"Šis darinys negali būti sukurtas, prašome jį paleisti naudojant nix-shell." #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Kuriama pradinė Home Manager konfigūracija..." diff --git a/third_party/home-manager/home-manager/po/nb_NO.po b/third_party/home-manager/home-manager/po/nb_NO.po index 0ddf5b8574..2fc2c818f4 100644 --- a/third_party/home-manager/home-manager/po/nb_NO.po +++ b/third_party/home-manager/home-manager/po/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-03-08 07:22+0000\n" "Last-Translator: \"Kim A. Ødegaard\" \n" "Language-Team: Norwegian Bokmål \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-02 23:06+0000\n" +"Last-Translator: Zurga \n" "Language-Team: Dutch \n" "Language: nl\n" @@ -17,16 +17,16 @@ 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 4.17-dev\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Geen configuratiebestand gevonden op %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,25 +34,25 @@ msgstr "" "Je Home Manager %s bestand opslaan in %s is niet langer ondersteund,\n" "gelieve het te verplaatsen naar %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Geen configuratiebestand gevonden, maak er alstublieft een aan op %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -71,38 +71,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kan geen geschikte map vinden voor het profiel, %s en %s geprobeerd" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Kan de opties van een flake configuratie niet inspecteren" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: onbekende keuze '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Voer '%s --help' in om gebruiksinfo te zien" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "Het bestand %s bestaat al, het zal niet aangepast worden..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "%s aan het aanmaken..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Initiële Home Manager generatie aan het maken..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -121,7 +121,7 @@ msgstr "" "alle opties te zien." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -136,11 +136,11 @@ msgstr "" "als de error de schuld van Home Manager lijkt te zijn." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Het is niet gelukt om de flake-configuratie te creëren" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -154,72 +154,72 @@ msgstr[1] "" "Er zijn %d ongelezen and relevante nieuws artikelen.\n" "Lees ze door het commando \"%s news\" uit te voeren." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Onbekende \"new.display\" instelling \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Het is niet mogelijk om te bouwen in een read-only map" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Geen generatie met de ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Generatie %s aan het verwijderen" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Geen generatie om te beëindigen" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Onbekend argument %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Dit zal Home Manager van jouw systeem verwijderen." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Dit is een oefening, niets wordt werkelijk geïnstalleerd." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Wilt u zeker Home Manager verwijderen?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Naar een lege Home Manager configuratie aan het veranderen..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Joepie!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager is verwijdert maar jouw home.nix is onaangeraakt." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations verwacht één argument, maar kreeg er %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Onbekende opdracht: %s" diff --git a/third_party/home-manager/home-manager/po/pl.po b/third_party/home-manager/home-manager/po/pl.po index e1d9e394fe..030b88a014 100644 --- a/third_party/home-manager/home-manager/po/pl.po +++ b/third_party/home-manager/home-manager/po/pl.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-05-03 19:48+0000\n" -"Last-Translator: Eryk Michalak \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-08-30 13:45+0000\n" +"Last-Translator: Marcin Kaczorek \n" "Language-Team: Polish \n" "Language: pl\n" @@ -18,42 +18,44 @@ 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 4.18-dev\n" +"X-Generator: Weblate 5.0.1-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Nie znaleziono pliku konfiguracyjnego %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -"Przechowywanie Home Manager %s w %s jest przestarzałe,\n" +"Przechowywanie %s Home Managera w %s jest przestarzałe,\n" "proszę przenieść go do %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Nie znaleziono pliku konfiguracyjnego. Proszę utworzyć plik %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager nie znaleziony w %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Rezerwowa ścieżka Home Managera %s jest przestarzała ale zawiera plik lub " +"katalog." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -71,39 +73,58 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Zrób jedną z tych rzeczy aby aby pozbyć się tego ostrzeżenia:\n" +"\n" +"1. Jednoznacznie skonfiguruj Home Manager żeby używał konkretnej ścieżki, " +"np. dodając\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" do twojej konfiguracji.\n" +"\n" +" Jeśli importujesz Home Manager bezpośrednio, możesz użyć parametru " +"`path`\n" +"\n" +" pkgs.callPackage /ścieżka/do/pakiet-home-manager { path = \"%s\"; }\n" +"\n" +" przy wywołaniu pakietu Home Manager.\n" +"\n" +"2. Usuń przestarzałą ścieżkę.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Nie można znaleźć odpowiedniego katalogu profilu, próbowano %s i %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Nie mogę sprawdzić konfiguracji flake'a" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: nieznana opcja „%s”" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Uruchom „%s --help” by otrzymać pomoc" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "Plik %s już istnieje, pozostawianie go bez zmian..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Tworzenie %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Tworzenie pierwotnej generacji Home Managera..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -112,7 +133,8 @@ msgid "" "to configure Home Manager. Run 'man home-configuration.nix' to\n" "see all available options." msgstr "" -"Skończone! Narzędzie home-manager powinno być zainstalowane i może edytować\n" +"Skończone! Narzędzie home-manager powinno być zainstalowane i możesz " +"edytować\n" "\n" " %s\n" "\n" @@ -120,7 +142,7 @@ msgstr "" "sprawdzić wszystkie możliwe opcje konfiguracyjne." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -135,11 +157,11 @@ msgstr "" "jeśli myślisz, że problem spowodowany jest przez błąd Home Managera." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" -msgstr "Nie mogę zinstancjować konfiguracji flake'a" +msgstr "Nie mogę utworzyć instancji konfiguracji flake'a" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -156,73 +178,73 @@ msgstr[2] "" "Jest %d nieodczytanych wiadomości.\n" "Możesz je odczytać uruchamiając „%s news”." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Nieznane ustawienie „%s” „news.display”." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Proszę ustawić zmienną środowiskową $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Nie mogę uruchomić budowania w katalogu tylko-do-odczytu" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Brak generacji z ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Nie mogę usunąć bieżącej generacji %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Usuwanie generacji %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Brak wygasających generacji" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Pakiety home-manager nie wydają się być zainstalowane." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Nieznany argument %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "To usunie Home Managera z twojego systemu." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "To jest próba, faktycznie nic nie będzie usunięte." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Jesteś pewien usunięcia Home Managera?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Przełączanie do pustej konfiguracji Home Managera..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Jej!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Manager jest usunięty ale twój home.nix jest pozostawiony nietknięty." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations oczekuje jednego argumentu, otrzymane %d." +msgstr "expire-generations oczekuje jednego argumentu, otrzymano %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Nieznana komenda: %s" diff --git a/third_party/home-manager/home-manager/po/pt.po b/third_party/home-manager/home-manager/po/pt.po index 7eab398ba6..251da89b3a 100644 --- a/third_party/home-manager/home-manager/po/pt.po +++ b/third_party/home-manager/home-manager/po/pt.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-02-19 10:19+0000\n" -"Last-Translator: ssantos \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-11 16:06+0000\n" +"Last-Translator: Lucas Eduardo \n" "Language-Team: Portuguese \n" "Language: pt\n" @@ -17,40 +17,44 @@ 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 4.16-dev\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" -msgstr "Nenhum ficheiro de configuração encontrado no %s" +msgstr "Nenhum ficheiro de configuração encontrado em %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Manter o %s do seu Home Manager em %s já não é suportado,\n" +"por favor mova-o para %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Ficheiro de configuração não encontrado. Por favor crie um em %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager não foi encontrado em %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"O caminho alternativo do Home Manager %s foi depreciado e um arquivo/" +"diretório foi encontrado lá." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -68,39 +72,59 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Para remover este aviso, faça o seguinte.\n" +"\n" +"1. Instrua o Home Manager para usar o caminho, por exemplo, adicionando\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" em sua configuração.\n" +"\n" +" Se você importa o Home Manager diretamente, você pode usar o parâmetro " +"`path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" quando chamar o pacote do Home Manager.\n" +"\n" +"2. Remova o caminho depreciado.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Não foi possível encontrar uma diretoria de perfil apropriada, foi tentado " +"%s e %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Não é possivel inspecionar a opção de configuração do flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: opção não reconhecida '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Execute '%s --help' para instruções de uso" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "O arquivo %s já existe, deixando do jeito que está..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Criando %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Criando a geração inicial do Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -117,7 +141,7 @@ msgstr "" "ver todas as opções disponíveis." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -132,11 +156,11 @@ msgstr "" "se o erro lhe parecer ser um problema do Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Não foi possível instanciar a configuração de flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -150,72 +174,72 @@ msgstr[1] "" "Há %d novos itens relevants não lidos\n" "Leia executando o comando \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Por favor defina a variável de ambiente $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Não é possível fazer o build num diretório somente leitura" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Nenhuma geração com ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Não foi possível remover a geração atual %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "A remover a geração %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Nenhuma geração a expirar" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Nenhum pacote parece instalado com home-manager." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Argumento desconhecido %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Isto irá remover o Home Manager do seu sistema." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Essa é uma execução de teste, nada de fato será desinstalado." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Confirma a desinstalação do Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Trocando para configuração vazia do Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Boa!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera um argumento, recebeu %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Comando não reconhecido: %s" diff --git a/third_party/home-manager/home-manager/po/pt_BR.po b/third_party/home-manager/home-manager/po/pt_BR.po index b02fcaa651..aa311d80cf 100644 --- a/third_party/home-manager/home-manager/po/pt_BR.po +++ b/third_party/home-manager/home-manager/po/pt_BR.po @@ -7,50 +7,54 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-04-04 11:11+0000\n" -"Last-Translator: Alex Miranda \n" -"Language-Team: Portuguese (Brazil) \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-11-30 15:04+0000\n" +"Last-Translator: Gabriel Fontes \n" +"Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\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 4.12-dev\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Nenhum arquivo de configuração encontrado no %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Manter seu Home Manager %s em %s foi descontinuado,\n" +"por favor mova-o para %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Arquivo de configuração não encontrado. Por favor crie um em %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager não encontrado em %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"O caminho alternativo do Home Manager, %s, foi descontinuado, mas existe " +"algum arquivo/diretório nele." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -68,39 +72,59 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Para remover esse aviso, faça um dos seguintes.\n" +"\n" +"1. Explicitamente diga para o Home Manager usar esse caminho, por exemplo, " +"adicionando\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" à sua configuração.\n" +"\n" +" Se você importa o Home Manager diretamente, você pode usar o parâmetro " +"`path`\n" +"\n" +" pkgs.callPackage /caminho/do/pacote-home-manager { path = \"%s\"; }\n" +"\n" +" ao chamar o pacote do Home Manager.\n" +"\n" +"2. Apague o caminho descontinuado.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Não foi possível encontrar um diretório de perfil apropriado, tentei %s e %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Não é possivel inspecionar a opção de configuração do flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: opção não reconhecida '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Execute '%s --help' para instruções de uso" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "O arquivo %s já existe, mantendo ele sem modificações..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Criando %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Criando a geração inicial do Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -118,7 +142,7 @@ msgstr "" "ver todas as opções disponíveis." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -133,11 +157,11 @@ msgstr "" "se o erro lhe parecer ser um problema do Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Não foi possível instanciar a configuração de flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -151,72 +175,72 @@ msgstr[1] "" "Há %d novos itens relevants não lidos\n" "Leia executando o comando \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Por favor defina a variável de ambiente $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Não é possível fazer o build em um diretório somente leitura" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Nenhuma geração com ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Não foi possível remover a geração atual %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Removendo geração %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Nenhuma geração a expirar" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Nenhum pacote parece instalado com home-manager." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Argumento desconhecido %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Isso irá remover o Home Manager do seu sistema." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Essa é uma execução de teste, nada de fato será desinstalado." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Confirma a desinstalação do Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Trocando para configuração vazia do Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Boa!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera um argumento, recebeu %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Comando não reconhecido: %s" diff --git a/third_party/home-manager/home-manager/po/ro.po b/third_party/home-manager/home-manager/po/ro.po index cf1bd2231e..b58a2eb605 100644 --- a/third_party/home-manager/home-manager/po/ro.po +++ b/third_party/home-manager/home-manager/po/ro.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-08-02 20:04+0000\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-08-11 19:50+0000\n" "Last-Translator: HeartBlin913861820c094e37 \n" "Language-Team: Romanian \n" @@ -20,38 +20,43 @@ msgstr "" "20)) ? 1 : 2;\n" "X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Nu s-a găsit niciun fișier de configurare la locația %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Păstrarea Home Managerului %s în $s e depreciat,\n" +"vă rugăm să îl mutați în %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "" +"Nu s-a găsit niciun fișier de configurare. Vă rugăm să creați unul la %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager nu a putut fi găsit la locația %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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Locația de rezervă %s pentru Home Manager a fost depreciată și a fost găsit " +"un fișier/director acolo." #. 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -69,39 +74,58 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Ca să înlăturați această avertizare, faceți una dintre următoarele\n" +"\n" +"1. Spuneți în mod explicit lui Home Manager să folosească locația, ca " +"exemplu prin adăugarea\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" în fila de configurare a dumneavoastră.\n" +"\n" +" Dacă importați direct Home Manager, puteți folosi parametrul `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" cănd rulați Home Manager.\n" +"\n" +"2. Ștergeți locația depreciata.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Nu s-a putut găsi un director cu un profil potrivit, s-a încercat %s și %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" -msgstr "" +msgstr "Nu se pot inspecta opțiunile unei configurații flake" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" -msgstr "" +msgstr "%s: opțiune necunoscută '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" -msgstr "" +msgstr "Rulați '%s --help' pentru ajutor de utilizare" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Fișierul %s există deja, îl lăsăm neschimbat..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Creând %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "Se creează generația Home Manager inițială..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -110,9 +134,17 @@ msgid "" "to configure Home Manager. Run 'man home-configuration.nix' to\n" "see all available options." msgstr "" +"Totul este gata! Unealta home-manager ar trebui să fie instalata și acum " +"puteți edita\n" +"\n" +" %s\n" +"\n" +"ca să configurați Home Manager. Rulați 'man home-configuration.nix' pentru " +"a\n" +"putea vedea toate opțiunile." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -120,13 +152,18 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"Uh oh, instalația a eșuat! Vă rugăm creați o problemă la\n" +"\n" +" %s\n" +"\n" +"dacă eroarea pare să fie din vina Home manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "Nu se poate instanția o configurare flake" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -134,77 +171,87 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" +"Există %d știre necitită și relevantă.\n" +"Citiți-o folosind comanda \"%s news\"." msgstr[1] "" +"Există %d știri necitite și relevante.\n" +"Citiți-le folosind comanda \"%s news\"." +msgstr[2] "" +"Există %d de știri necitite și relevante.\n" +"Citiți-le folosind comanda \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" +msgstr "Opțiunea \"news.display\" este necunoscută \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" -msgstr "" +msgstr "Vă rugăm să setați variabila de mediu $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" -msgstr "" +msgstr "Nu se poate rula construirea într-un director numai pentru citire" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" -msgstr "" +msgstr "Nicio generație cu ID-ul %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" -msgstr "" +msgstr "Nu se poate șterge generația curentă %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" -msgstr "" +msgstr "Se șterge generația %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" -msgstr "" +msgstr "Nu există generații care să expire" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." -msgstr "" +msgstr "Nu există instalat niciun pachet home-manager." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" -msgstr "" +msgstr "Argument necunoscut %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." -msgstr "" +msgstr "Aceasta v-a înlătura Home Manager din sistemul dumneavoastră." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" +msgstr "Aceasta este o rulare de test, nimic nu v-a fi dezinstalat." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" -msgstr "" +msgstr "Doriți cu adevărat să dezinstalați Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." -msgstr "" +msgstr "Se trece la o configurare Home Manager goală..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" -msgstr "" +msgstr "Ura!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" +"Home Manager a fost dezinstalat, dar fișierul home.nix a rămas neatins." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." -msgstr "" +msgstr "expire-generations se așteaptă la un argument, a primit %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" -msgstr "" +msgstr "Comandă necunoscută: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" +"Această derivație nu poate fi construită, vă rugăm să o rulați folosind nix-" +"shell." diff --git a/third_party/home-manager/home-manager/po/ru.po b/third_party/home-manager/home-manager/po/ru.po index 7c33c9c3b3..97c4dd0047 100644 --- a/third_party/home-manager/home-manager/po/ru.po +++ b/third_party/home-manager/home-manager/po/ru.po @@ -7,51 +7,55 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-06-07 12:51+0000\n" -"Last-Translator: Nikolay Mokrinsky \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-10 16:00+0000\n" +"Last-Translator: Blezz Rot \n" "Language-Team: Russian \n" "Language: ru\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%10==1 && n%100!=11 ? 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%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.3-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Не найден файл конфигурации в %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Файл %s вашего Home Manager находится в устаревшем месте %s\n" +"пожалуйста, переместите его в %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Не найден файл конфигурации. Пожалуйста, создайте его в %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -69,39 +73,57 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Чтобы убрать это предупреждение, совершите один из шагов, приведённых ниже.\n" +"\n" +"1. Явно заставьте Home Manager использовать путь, например добавив\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" в ваш файл конфигурации.\n" +"\n" +" Если вы импортируете Home Manager напрямую, то вы можете использовать " +"параметр `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" когда вызываете пакет Home Manager\n" +"\n" +"2. Удалите устаревший путь.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Не найдена подходящая директория профиля, пробовали %s и %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Не могу получить опции для flake-конфигурации" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: неизвестная опция '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Выполните '%s --help', чтобы получить справку" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Файл %s уже существует и не будет изменен..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Создание %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Создаю начальное поколение Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -118,7 +140,7 @@ msgstr "" "Выполните 'man home-configuration.nix', чтобы увидеть доступные опции." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -133,11 +155,11 @@ msgstr "" "если считаете, что в ошибке виноват Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Не могу создать экземляр для flake-конфигурации" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -154,72 +176,72 @@ msgstr[2] "" "У вас есть %d непрочитанных и релевантных новостей.\n" "Прочтите их, выполнив команду \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Неизвестное значение \"news.display\": \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Пожалуйста, определите переменную среды $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Не могу начать сборку в директории, защищённой от записи" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Поколение под номером %s не существует" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Не могу удалить текущее поколение %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Удаляю поколение %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Нет поколений, которые можно просрочить" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Не обнаружено пакетов, установленных через home-manager." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Неизвестный аргумент %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Это удалит Home Manager из вашей системы." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Это пробный запуск, на самом деле ничего не удаляется." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Действительно хотите удалить Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Переключаюсь на пустую конфигурацию Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Ура!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager удалён, но ваш home.nix остался нетронутым." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations требует один аргумент, но передано %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Неизвестная команда: %s" diff --git a/third_party/home-manager/home-manager/po/sv.po b/third_party/home-manager/home-manager/po/sv.po index 24894446dc..5d7d65bac9 100644 --- a/third_party/home-manager/home-manager/po/sv.po +++ b/third_party/home-manager/home-manager/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-07-17 10:03+0000\n" "Last-Translator: Luna Jernberg \n" "Language-Team: Swedish , 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: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-09-19 06:27+0000\n" +"Last-Translator: Kamontat Chantrachirathumrong \n" +"Language-Team: Thai \n" +"Language: th\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 5.0.2\n" + +#: home-manager/home-manager:81 +msgid "No configuration file found at %s" +msgstr "ไม่พบการตั้งค่าที่ %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:109 +msgid "No configuration file found. Please create one at %s" +msgstr "" + +#: home-manager/home-manager:124 +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:132 +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:135 +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:174 +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:229 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:1035 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:322 home-manager/home-manager:421 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:324 home-manager/home-manager:423 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:465 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:470 +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:475 +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:486 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:562 +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:576 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:583 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "" + +#: home-manager/home-manager:598 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:676 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:678 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:680 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:699 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:710 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:792 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:816 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:819 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:823 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:829 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:857 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:862 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1074 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1096 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" diff --git a/third_party/home-manager/home-manager/po/tr.po b/third_party/home-manager/home-manager/po/tr.po index f2be534aad..ef686c7e48 100644 --- a/third_party/home-manager/home-manager/po/tr.po +++ b/third_party/home-manager/home-manager/po/tr.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" -"Last-Translator: Oğuz Ersen \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-10-19 04:00+0000\n" +"Last-Translator: Emre Çebi \n" "Language-Team: Turkish \n" "Language: tr\n" @@ -17,41 +17,43 @@ 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 4.12-dev\n" +"X-Generator: Weblate 5.1\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "%s konumunda yapılandırma dosyası bulunamadı" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Home Managerı %s de tutmak artık desteklenmemektedir,\n" +"lütfen % e taşıyın" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "" "Yapılandırma dosyası bulunamadı. Lütfen %s konumunda bir tane oluşturun" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." -msgstr "" +msgstr "%s konumunda Home Manager bulunamadı." #. 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:122 +#: home-manager/home-manager:132 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -70,38 +72,38 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kullanılabilir profil dizini bulunamadı, %s ve %s denendi" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Flake yapılandırmasının ayarları incelenemiyor" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: Bilinmeyen komut '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Yardım için '%s --help'" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "%s dosyası zaten var, değişiklik yapılmıyor..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." -msgstr "" +msgstr "Oluşturuluyor %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "İlk Home Manager inşası oluşturuluyor..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -118,7 +120,7 @@ msgstr "" "'man home-configuration.nix'." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -134,11 +136,11 @@ msgstr "" "adresinden bildirin." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Flake yapılandırması örneklendirilemiyor" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -147,77 +149,77 @@ msgid_plural "" "Read them by running the command \"%s news\"." msgstr[0] "" "%d tane okunmamış ilgili haber bulunmakta.\n" -"Okumak için \"%s news\"." +"Okumak için \"%s news\" komutunu kullanın." msgstr[1] "" "%d tane okunmamış ilgili haberler bulunmakta.\n" -"Okumak için \"%s news\"." +"Okumak için \"%s news\" komutunu kullanın." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Bilinmeyen \"news.display\" seçeneği \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Lütfen $EDITOR ortam değişkenini tanımlayın" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" -msgstr "İnşa, sadece okunabilir bir klasörde çalıştırılamaz" +msgstr "Sadece okuma izni olan bir dizinde inşa çalıştırılamaz" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" -msgstr "%s ID'sine sahip inşa bulunamadı" +msgstr "%s ID'sine sahip nesil bulunamadı" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Kullanımda olan %s inşası silinemez" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "İnşa siliniyor %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Süresi dolacak inşa yok" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Galiba home-manager paketi kurulu değil." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Bilinmeyen argüman %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Bu, sisteminizden Home Manager'ı kaldıracak." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Bu sadece bir inşa denemesi, hiçbir şey silinmeyecek." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Home Manager'ı silmek istediğinize emin misiniz?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Boş Home Manager yapılandırmasına geçiliyor..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Güzel!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager kaldırıldı ama home.nix dosyasına dokunulmadı." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations bir argüman istiyor, %d tane girildi." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Bilinmeyen komut: %s" diff --git a/third_party/home-manager/home-manager/po/uk.po b/third_party/home-manager/home-manager/po/uk.po index cf31eeae1d..fd3d88a976 100644 --- a/third_party/home-manager/home-manager/po/uk.po +++ b/third_party/home-manager/home-manager/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-07-17 10:03+0000\n" "Last-Translator: Dan \n" "Language-Team: Ukrainian =20) ? 1 : 2;\n" "X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:71 +#: home-manager/home-manager:81 msgid "No configuration file found at %s" msgstr "Файл конфігурації не знайдено в %s" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:88 home-manager/home-manager:92 -#: home-manager/home-manager:182 +#: home-manager/home-manager:98 home-manager/home-manager:102 +#: home-manager/home-manager:192 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -35,16 +35,16 @@ msgstr "" "Збереження вашого Home Manager %s у %s є застарілим,\n" "будь ласка, перемістіть його до %s" -#: home-manager/home-manager:99 +#: home-manager/home-manager:109 msgid "No configuration file found. Please create one at %s" msgstr "Файл конфігурації не знайдено. Будь ласка, створіть його в %s" -#: home-manager/home-manager:114 +#: home-manager/home-manager:124 msgid "Home Manager not found at %s." 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:122 +#: home-manager/home-manager:132 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,9 +52,9 @@ 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:125 +#: home-manager/home-manager:135 msgid "" -"To remove this warning, do one of the fallowing.\n" +"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" @@ -91,38 +91,38 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:164 +#: home-manager/home-manager:174 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Не вдалося знайти відповідний каталог профілю, спробував %s і %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:219 +#: home-manager/home-manager:229 msgid "Can't inspect options of a flake configuration" msgstr "Неможливо перевірити параметри flake-конфігурації" -#: home-manager/home-manager:281 home-manager/home-manager:304 -#: home-manager/home-manager:1023 +#: home-manager/home-manager:291 home-manager/home-manager:314 +#: home-manager/home-manager:1034 msgid "%s: unknown option '%s'" msgstr "%s: невідомий параметр '%s'" -#: home-manager/home-manager:286 home-manager/home-manager:1024 +#: home-manager/home-manager:296 home-manager/home-manager:1035 msgid "Run '%s --help' for usage help" msgstr "Запустіть '%s --help' для отримання довідки про використання" -#: home-manager/home-manager:312 home-manager/home-manager:411 +#: home-manager/home-manager:322 home-manager/home-manager:421 msgid "The file %s already exists, leaving it unchanged..." msgstr "Файл %s вже існує, залишаючи його незмінним..." -#: home-manager/home-manager:314 home-manager/home-manager:413 +#: home-manager/home-manager:324 home-manager/home-manager:423 msgid "Creating %s..." msgstr "Створення %s..." -#: home-manager/home-manager:455 +#: home-manager/home-manager:465 msgid "Creating initial Home Manager generation..." msgstr "Створення початкової генерації Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:460 +#: home-manager/home-manager:470 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -140,7 +140,7 @@ msgstr "" "переглянути всі доступні варіанти." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +155,11 @@ msgstr "" "якщо здається, що помилка сталася через Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:476 +#: home-manager/home-manager:486 msgid "Can't instantiate a flake configuration" msgstr "Не вдається створити екземпляр flake-конфігурації" -#: home-manager/home-manager:552 +#: home-manager/home-manager:562 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -176,72 +176,72 @@ msgstr[2] "" "Є %d непрочитаних і ревалентних новин.\n" "Прочитайте їх, виконавши команду \"%s news\"." -#: home-manager/home-manager:566 +#: home-manager/home-manager:576 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Невідоме налаштування \"news.display\" \"%s\"." -#: home-manager/home-manager:573 +#: home-manager/home-manager:583 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "Будь ласка, встановіть змінну середовища $EDITOR" -#: home-manager/home-manager:588 +#: home-manager/home-manager:598 msgid "Cannot run build in read-only directory" msgstr "Неможливо запустити збірку в каталозі, доступному лише для читання" -#: home-manager/home-manager:666 +#: home-manager/home-manager:676 msgid "No generation with ID %s" msgstr "Немає генерації з ID %s" -#: home-manager/home-manager:668 +#: home-manager/home-manager:678 msgid "Cannot remove the current generation %s" msgstr "Не вдається видалити поточну генерацію %s" -#: home-manager/home-manager:670 +#: home-manager/home-manager:680 msgid "Removing generation %s" msgstr "Видалення генерації %s" -#: home-manager/home-manager:689 +#: home-manager/home-manager:699 msgid "No generations to expire" msgstr "Немає генерацій, термін дії яких закінчується" -#: home-manager/home-manager:700 +#: home-manager/home-manager:710 msgid "No home-manager packages seem to be installed." msgstr "Здається, не встановлено жодних пакунків home-manager." -#: home-manager/home-manager:781 +#: home-manager/home-manager:792 msgid "Unknown argument %s" msgstr "Невідомий аргумент %s" -#: home-manager/home-manager:805 +#: home-manager/home-manager:816 msgid "This will remove Home Manager from your system." msgstr "Це призведе до видалення Home Manager з вашої системи." -#: home-manager/home-manager:808 +#: home-manager/home-manager:819 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Це пробний запуск, насправді нічого не буде видалено." -#: home-manager/home-manager:812 +#: home-manager/home-manager:823 msgid "Really uninstall Home Manager?" msgstr "Дійсно видаліть Home Manager?" -#: home-manager/home-manager:818 +#: home-manager/home-manager:829 msgid "Switching to empty Home Manager configuration..." msgstr "Перехід до порожньої конфігурації Home Manager..." -#: home-manager/home-manager:846 +#: home-manager/home-manager:857 msgid "Yay!" msgstr "Ура!" -#: home-manager/home-manager:851 +#: home-manager/home-manager:862 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager буде видалено, але ваш home.nix залишиться недоторканим." -#: home-manager/home-manager:1063 +#: home-manager/home-manager:1074 msgid "expire-generations expects one argument, got %d." msgstr "expire-generation очікує один аргумент, отримав %d." -#: home-manager/home-manager:1085 +#: home-manager/home-manager:1096 msgid "Unknown command: %s" msgstr "Невідома команда: %s" diff --git a/third_party/home-manager/home-manager/po/zh_Hans.po b/third_party/home-manager/home-manager/po/zh_Hans.po index 2f12b30263..8aaee206cd 100644 --- a/third_party/home-manager/home-manager/po/zh_Hans.po +++ b/third_party/home-manager/home-manager/po/zh_Hans.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-07-31 21:25+0000\n" "Last-Translator: Vollow \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional) ` which is constructed by NixOS or + # nix-darwin and won't require uninstalling `home-manager-path`. + if [[ -e $HOME/.nix-profile/manifest.json \ + || -e "''${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json" ]] ; then nix profile list \ | { grep 'home-manager-path$' || test $? = 1; } \ | cut -d ' ' -f 4 \ - | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG else if nix-env -q | grep '^home-manager-path$'; then $DRY_RUN_CMD nix-env -e home-manager-path @@ -623,7 +627,7 @@ in $DRY_RUN_CMD $oldNix profile install $1 } - if [[ -e $HOME/.nix-profile/manifest.json ]] ; then + if [[ -e ${cfg.profileDirectory}/manifest.json ]] ; then INSTALL_CMD="nix profile install" INSTALL_CMD_ACTUAL="nixReplaceProfile" LIST_CMD="nix profile list" diff --git a/third_party/home-manager/modules/i18n/input-method/fcitx5.nix b/third_party/home-manager/modules/i18n/input-method/fcitx5.nix index 78eb970838..3599fd2dc8 100644 --- a/third_party/home-manager/modules/i18n/input-method/fcitx5.nix +++ b/third_party/home-manager/modules/i18n/input-method/fcitx5.nix @@ -28,6 +28,8 @@ in { GTK_IM_MODULE = "fcitx"; QT_IM_MODULE = "fcitx"; XMODIFIERS = "@im=fcitx"; + QT_PLUGIN_PATH = + "$QT_PLUGIN_PATH\${QT_PLUGIN_PATH:+:}${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}"; }; systemd.user.services.fcitx5-daemon = { diff --git a/third_party/home-manager/modules/lib/maintainers.nix b/third_party/home-manager/modules/lib/maintainers.nix index 05d55b6782..e75541d932 100644 --- a/third_party/home-manager/modules/lib/maintainers.nix +++ b/third_party/home-manager/modules/lib/maintainers.nix @@ -19,6 +19,12 @@ githubId = 56743515; name = "Morgane Austreelis"; }; + Avimitin = { + name = "Avimitin"; + email = "dev@avimit.in"; + github = "Avimitin"; + githubId = 30021675; + }; blmhemu = { name = "blmhemu"; email = "19410501+blmhemu@users.noreply.github.com"; @@ -37,6 +43,12 @@ github = "CarlosLoboxyz"; githubId = 86011416; }; + considerate = { + name = "Viktor Kronvall"; + email = "viktor.kronvall@gmail.com"; + github = "considerate"; + githubId = 217918; + }; cvoges12 = { name = "Clayton Voges"; email = "38054771+cvoges12@users.noreply.github.com"; @@ -251,6 +263,12 @@ githubId = 605641; name = "Bart Bakker"; }; + ilaumjd = { + name = "Ilham AM"; + email = "ilaumjd@gmail.com"; + github = "ilaumjd"; + githubId = 16514431; + }; jrobsonchase = { email = "josh@robsonchase.com"; github = "jrobsonchase"; @@ -299,6 +317,18 @@ github = "nurelin"; githubId = 5276274; }; + omernaveedxyz = { + name = "Omer Naveed"; + email = "omer@omernaveed.dev"; + github = "omernaveedxyz"; + githubId = 112912585; + }; + otavio = { + email = "otavio.salvador@ossystems.com.br"; + github = "otavio"; + githubId = 25278; + name = "Otavio Salvador"; + }; pltanton = { name = "pltanton"; email = "plotnikovanton@gmail.com"; @@ -341,6 +371,12 @@ github = "sebtm"; githubId = 17243347; }; + shimunn = { + name = "shimun"; + email = "home-manager.c.shimun@shimun.net"; + github = "shimunn"; + githubId = 41011289; + }; rasmus-kirk = { name = "Rasmus Kirk"; email = "mail@rasmuskirk.com"; @@ -390,6 +426,11 @@ keys = [{ fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72"; }]; }; + tensor5 = { + github = "tensor5"; + githubId = 1545895; + name = "Nicola Squartini"; + }; toastal = { email = "toastal+nix@posteo.net"; matrix = "@toastal:matrix.org"; @@ -424,4 +465,16 @@ github = "liyangau"; githubId = 71299093; }; + wcarlsen = { + name = "Willi Carlsen"; + email = "carlsenwilli+nix@gmail.com"; + github = "wcarlsen"; + githubId = 17003032; + }; + "9p4" = { + name = "9p4"; + email = "vcs@ersei.net"; + github = "9p4"; + githubId = 17993169; + }; } diff --git a/third_party/home-manager/modules/misc/gtk.nix b/third_party/home-manager/modules/misc/gtk.nix index c20424b1fe..6454eb2aeb 100644 --- a/third_party/home-manager/modules/misc/gtk.nix +++ b/third_party/home-manager/modules/misc/gtk.nix @@ -35,6 +35,8 @@ let Package providing the theme. This package will be installed to your profile. If `null` then the theme is assumed to already be available in your profile. + + For the theme to apply to GTK 4, this option is mandatory. ''; }; @@ -233,6 +235,15 @@ in { gtk-cursor-theme-size = cfg.cursorTheme.size; }; + gtk4Css = + lib.optionalString (cfg.theme != null && cfg.theme.package != null) '' + /** + * GTK 4 reads the theme configured by gtk-theme-name, but ignores it. + * It does however respect user CSS, so import the theme from here. + **/ + @import url("file://${cfg.theme.package}/share/themes/${cfg.theme.name}/gtk-4.0/gtk.css"); + '' + cfg4.extraCss; + dconfIni = optionalAttrs (cfg.font != null) { font-name = let fontSize = @@ -277,8 +288,7 @@ in { xdg.configFile."gtk-4.0/settings.ini".text = toGtk3Ini { Settings = gtkIni // cfg4.extraConfig; }; - xdg.configFile."gtk-4.0/gtk.css" = - mkIf (cfg4.extraCss != "") { text = cfg4.extraCss; }; + xdg.configFile."gtk-4.0/gtk.css" = mkIf (gtk4Css != "") { text = gtk4Css; }; dconf.settings."org/gnome/desktop/interface" = dconfIni; }); diff --git a/third_party/home-manager/modules/misc/news.nix b/third_party/home-manager/modules/misc/news.nix index 0538d767b6..4e0f08a753 100644 --- a/third_party/home-manager/modules/misc/news.nix +++ b/third_party/home-manager/modules/misc/news.nix @@ -1116,7 +1116,7 @@ in can control it by using the `qt5ct` and `qt6ct` applications; - `qt.style.name = "kvantum"`: override the style by using themes written in SVG. Supports many popular themes. - ''; + ''; } { @@ -1179,6 +1179,214 @@ in A new module is available: 'services.git-sync'. ''; } + + { + time = "2023-08-15T15:45:45+00:00"; + message = '' + A new module is available: 'programs.xplr'. + ''; + } + + { + time = "2023-08-16T15:43:30+00:00"; + message = '' + A new module is available: 'programs.pqiv'. + ''; + } + + { + time = "2023-08-22T16:06:52+00:00"; + message = '' + A new module is available: 'programs.qcal'. + ''; + } + + { + time = "2023-08-23T12:01:06+00:00"; + message = '' + A new module is available: 'programs.yazi'. + ''; + } + + { + time = "2023-09-05T06:38:05+00:00"; + message = '' + A new module is available: 'programs.carapace'. + ''; + } + + { + time = "2023-09-07T14:52:19+00:00"; + message = '' + A new module is available: 'programs.eza'. + ''; + } + + { + time = "2023-09-18T11:44:11+00:00"; + message = '' + A new module is available: 'programs.rio'. + + Rio is a hardware-accelerated GPU terminal emulator powered by WebGPU. + ''; + } + + { + time = "2023-09-24T10:06:47+00:00"; + message = '' + A new module is available: 'programs.bacon'. + ''; + } + + { + time = "2023-09-30T07:47:23+00:00"; + message = '' + A new module is available: 'programs.awscli'. + ''; + } + + { + time = "2023-10-01T07:23:26+00:00"; + message = '' + A new module is available: 'programs.wpaperd'. + ''; + } + + { + time = "2023-10-01T07:28:45+00:00"; + message = '' + A new module is available: 'programs.khard'. + ''; + } + + { + time = "2023-10-04T06:06:08+00:00"; + condition = config.programs.zsh.enable; + message = '' + A new module is available: 'programs.zsh.zsh-abbr' + ''; + } + + { + time = "2023-10-04T06:44:15+00:00"; + message = '' + A new module is available: 'programs.thefuck'. + ''; + } + + { + time = "2023-10-04T18:35:42+00:00"; + message = '' + A new module is available: 'programs.openstackclient'. + ''; + } + + { + time = "2023-10-17T06:33:24+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.darkman'. + ''; + } + + { + time = "2023-10-24T06:14:53+00:00"; + message = '' + A new module is available: 'programs.cava'. + ''; + } + + { + time = "2023-11-01T21:18:20+00:00"; + message = '' + A new module is available: 'programs.granted'. + ''; + } + + { + time = "2023-11-22T22:42:16+00:00"; + message = '' + A new module is available: 'programs.ruff'. + ''; + } + + { + time = "2023-11-26T23:18:01+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.signaturepdf'. + ''; + } + + { + time = "2023-12-10T08:43:02+00:00"; + condition = config.wayland.windowManager.hyprland.settings ? source; + message = '' + Entries in + + wayland.windowManager.hyprland.settings.source + + are now placed at the start of the configuration file. If you relied + on the previous placement of the 'source' entries, please set + + wayland.windowManager.hyprland.sourceFirst = false + + to keep the previous behaviour. + ''; + } + + { + time = "2023-12-19T22:57:52+00:00"; + message = '' + A new module is available: 'programs.sapling'. + ''; + } + + { + time = "2023-12-20T11:41:10+00:00"; + message = '' + A new module is available: 'programs.gradle'. + ''; + } + + { + time = "2023-12-28T08:28:26+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.osmscout-server'. + ''; + } + + { + time = "2023-12-28T13:01:15+00:00"; + message = '' + A new module is available: 'programs.sftpman'. + ''; + } + + { + time = "2023-12-29T08:22:40+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.bemenu'. + ''; + } + + { + time = "2024-01-01T09:09:42+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.i3blocks'. + ''; + } + + { + time = "2024-01-03T19:25:09+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'xdg.portal'. + ''; + } ]; }; } diff --git a/third_party/home-manager/modules/misc/qt.nix b/third_party/home-manager/modules/misc/qt.nix index 554072e2f0..f02bc186e8 100644 --- a/third_party/home-manager/modules/misc/qt.nix +++ b/third_party/home-manager/modules/misc/qt.nix @@ -1,59 +1,76 @@ { config, lib, pkgs, ... }: -with lib; - let - cfg = config.qt; + # Map platform names to their packages. + platformPackages = with pkgs; { + gnome = [ qgnomeplatform qgnomeplatform-qt6 ]; + gtk = [ libsForQt5.qtstyleplugins qt6Packages.qt6gtk2 ]; + kde = [ libsForQt5.plasma-integration libsForQt5.systemsettings ]; + lxqt = [ lxqt.lxqt-qtplugin lxqt.lxqt-config ]; + qtct = [ libsForQt5.qt5ct qt6Packages.qt6ct ]; + }; + + # Maps style names to their QT_QPA_PLATFORMTHEME, if necessary. + styleNames = { + gtk = "gtk2"; + qtct = "qt5ct"; + }; + # Maps known lowercase style names to style packages. Non-exhaustive. stylePackages = with pkgs; { bb10bright = libsForQt5.qtstyleplugins; bb10dark = libsForQt5.qtstyleplugins; cleanlooks = libsForQt5.qtstyleplugins; - gtk2 = libsForQt5.qtstyleplugins; + gtk2 = [ libsForQt5.qtstyleplugins qt6Packages.qt6gtk2 ]; motif = libsForQt5.qtstyleplugins; cde = libsForQt5.qtstyleplugins; plastique = libsForQt5.qtstyleplugins; - adwaita = adwaita-qt; - adwaita-dark = adwaita-qt; - adwaita-highcontrast = adwaita-qt; - adwaita-highcontrastinverse = adwaita-qt; + adwaita = [ adwaita-qt adwaita-qt6 ]; + adwaita-dark = [ adwaita-qt adwaita-qt6 ]; + adwaita-highcontrast = [ adwaita-qt adwaita-qt6 ]; + adwaita-highcontrastinverse = [ adwaita-qt adwaita-qt6 ]; breeze = libsForQt5.breeze-qt5; - kvantum = [ - qtstyleplugin-kvantum-qt4 - libsForQt5.qtstyleplugin-kvantum - qt6Packages.qtstyleplugin-kvantum - ]; + kvantum = + [ libsForQt5.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum ]; }; in { - meta.maintainers = with maintainers; [ rycee thiagokokada ]; + meta.maintainers = with lib.maintainers; [ rycee thiagokokada ]; imports = [ - (mkChangedOptionModule [ "qt" "useGtkTheme" ] [ "qt" "platformTheme" ] + (lib.mkChangedOptionModule [ "qt" "useGtkTheme" ] [ "qt" "platformTheme" ] (config: - if getAttrFromPath [ "qt" "useGtkTheme" ] config then "gtk" else null)) + if lib.getAttrFromPath [ "qt" "useGtkTheme" ] config then + "gtk" + else + null)) ]; options = { qt = { - enable = mkEnableOption "Qt 4, 5 and 6 configuration"; + enable = lib.mkEnableOption "Qt 5 and 6 configuration"; - platformTheme = mkOption { - type = types.nullOr (types.enum [ "gtk" "gnome" "qtct" "kde" ]); + platformTheme = lib.mkOption { + type = with lib.types; + nullOr (enum [ "gtk" "gtk3" "gnome" "lxqt" "qtct" "kde" ]); default = null; example = "gnome"; relatedPackages = [ "qgnomeplatform" - [ "libsForQt5" "qtstyleplugins" ] - [ "libsForQt5" "qt5ct" ] - [ "qt6Packages" "qt6ct" ] + "qgnomeplatform-qt6" [ "libsForQt5" "plasma-integration" ] + [ "libsForQt5" "qt5ct" ] + [ "libsForQt5" "qtstyleplugins" ] [ "libsForQt5" "systemsettings" ] + [ "lxqt" "lxqt-config" ] + [ "lxqt" "lxqt-qtplugin" ] + [ "qt6Packages" "qt6ct" ] + [ "qt6Packages" "qt6gtk2" ] ]; description = '' Platform theme to use for Qt applications. @@ -64,10 +81,19 @@ in { : Use GTK theme with [`qtstyleplugins`](https://github.com/qt/qtstyleplugins) + `gtk3` + : Use [GTK3 integration](https://github.com/qt/qtbase/tree/dev/src/plugins/platformthemes/gtk3) + for file picker dialogs, font and theme configuration + `gnome` : Use GNOME theme with [`qgnomeplatform`](https://github.com/FedoraQt/QGnomePlatform) + `lxqt` + : Use LXQt theme style set using the + [`lxqt-config-appearance`](https://github.com/lxqt/lxqt-config) + application + `qtct` : Use Qt style set using [`qt5ct`](https://github.com/desktop-app/qt5ct) @@ -80,16 +106,17 @@ in { }; style = { - name = mkOption { - type = types.nullOr types.str; + name = lib.mkOption { + type = with lib.types; nullOr str; default = null; example = "adwaita-dark"; relatedPackages = [ "adwaita-qt" + "adwaita-qt6" [ "libsForQt5" "breeze-qt5" ] - [ "libsForQt5" "qtstyleplugins" ] - "qtstyleplugin-kvantum-qt4" [ "libsForQt5" "qtstyleplugin-kvantum" ] + [ "libsForQt5" "qtstyleplugins" ] + [ "qt6Packages" "qt6gtk2" ] [ "qt6Packages" "qtstyleplugin-kvantum" ] ]; description = '' @@ -115,10 +142,10 @@ in { ''; }; - package = mkOption { - type = with types; nullOr (either package (listOf package)); + package = lib.mkOption { + type = with lib.types; nullOr (either package (listOf package)); default = null; - example = literalExpression "pkgs.adwaita-qt"; + example = lib.literalExpression "pkgs.adwaita-qt"; description = '' Theme package to be used in Qt5/Qt6 applications. Auto-detected from {option}`qt.style.name` if possible. @@ -128,7 +155,31 @@ in { }; }; - config = mkIf (cfg.enable && cfg.platformTheme != null) { + config = let + + # Necessary because home.sessionVariables doesn't support mkIf + envVars = lib.filterAttrs (n: v: v != null) { + QT_QPA_PLATFORMTHEME = if (cfg.platformTheme != null) then + styleNames.${cfg.platformTheme} or cfg.platformTheme + else + null; + QT_STYLE_OVERRIDE = cfg.style.name; + }; + + envVarsExtra = let + inherit (config.home) profileDirectory; + qtVersions = with pkgs; [ qt5 qt6 ]; + makeQtPath = prefix: + lib.concatStringsSep ":" + (map (qt: "${profileDirectory}/${qt.qtbase.${prefix}}") qtVersions); + in { + QT_PLUGIN_PATH = "$QT_PLUGIN_PATH\${QT_PLUGIN_PATH:+:}" + + (makeQtPath "qtPluginPrefix"); + QML2_IMPORT_PATH = "$QML2_IMPORT_PATH\${QML2_IMPORT_PATH:+:}" + + (makeQtPath "qtQmlPrefix"); + }; + + in lib.mkIf cfg.enable { assertions = [{ assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null && cfg.style.package != null; @@ -138,43 +189,32 @@ in { ''; }]; - qt.style.package = mkIf (cfg.style.name != null) - (mkDefault (stylePackages.${toLower cfg.style.name} or null)); + qt.style.package = lib.mkIf (cfg.style.name != null) + (lib.mkDefault (stylePackages.${lib.toLower cfg.style.name} or null)); - # Necessary because home.sessionVariables doesn't support mkIf - home.sessionVariables = filterAttrs (n: v: v != null) { - QT_QPA_PLATFORMTHEME = if cfg.platformTheme == "gtk" then - "gtk2" - else if cfg.platformTheme == "qtct" then - "qt5ct" - else - cfg.platformTheme; - QT_STYLE_OVERRIDE = cfg.style.name; + home = { + sessionVariables = envVars; + # home.sessionVariables does not support setting the same environment + # variable to different values. + # Since some other modules may set the QT_PLUGIN_PATH or QML2_IMPORT_PATH + # to their own value, e.g.: fcitx5, we avoid conflicts by setting + # the values in home.sessionVariablesExtra instead. + sessionVariablesExtra = '' + export QT_PLUGIN_PATH=${envVarsExtra.QT_PLUGIN_PATH} + export QML2_IMPORT_PATH=${envVarsExtra.QML2_IMPORT_PATH} + ''; }; - home.packages = (if cfg.platformTheme == "gnome" then - [ pkgs.qgnomeplatform ] - else if cfg.platformTheme == "qtct" then [ - pkgs.libsForQt5.qt5ct - pkgs.qt6Packages.qt6ct - ] else if cfg.platformTheme == "kde" then [ - pkgs.libsForQt5.plasma-integration - pkgs.libsForQt5.systemsettings - ] else - [ pkgs.libsForQt5.qtstyleplugins ]) - ++ lib.optionals (cfg.style.package != null) - (lib.toList cfg.style.package); + # Apply theming also to apps started by systemd. + systemd.user.sessionVariables = envVars // envVarsExtra; - xsession.importedVariables = [ "QT_QPA_PLATFORMTHEME" ] + home.packages = (lib.optionals (cfg.platformTheme != null) + platformPackages.${cfg.platformTheme} or [ ]) + ++ (lib.optionals (cfg.style.package != null) + (lib.toList cfg.style.package)); + + xsession.importedVariables = [ "QT_PLUGIN_PATH" "QML2_IMPORT_PATH" ] + ++ lib.optionals (cfg.platformTheme != null) [ "QT_QPA_PLATFORMTHEME" ] ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; - - # Enable GTK+ style for Qt4 in Gtk/GNOME. - # It doesn’t support the platform theme packages. - home.activation.useGtkThemeInQt4 = - mkIf (cfg.platformTheme == "gtk" || cfg.platformTheme == "gnome") - (hm.dag.entryAfter [ "writeBoundary" ] '' - $DRY_RUN_CMD ${pkgs.crudini}/bin/crudini $VERBOSE_ARG \ - --set "${config.xdg.configHome}/Trolltech.conf" Qt style GTK+ - ''); }; } diff --git a/third_party/home-manager/modules/misc/tmpfiles.nix b/third_party/home-manager/modules/misc/tmpfiles.nix index c5f4a97562..9fa072b892 100644 --- a/third_party/home-manager/modules/misc/tmpfiles.nix +++ b/third_party/home-manager/modules/misc/tmpfiles.nix @@ -27,8 +27,8 @@ in { platforms.linux) ]; - xdg = { - dataFile."user-tmpfiles.d/home-manager.conf" = { + xdg.configFile = { + "user-tmpfiles.d/home-manager.conf" = { text = '' # This file is created automatically and should not be modified. # Please change the option ‘systemd.user.tmpfiles.rules’ instead. @@ -36,16 +36,14 @@ in { ''; onChange = "${pkgs.systemd}/bin/systemd-tmpfiles --user --create"; }; - configFile = { - "systemd/user/basic.target.wants/systemd-tmpfiles-setup.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; - "systemd/user/systemd-tmpfiles-setup.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; - "systemd/user/timers.target.wants/systemd-tmpfiles-clean.timer".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.timer"; - "systemd/user/systemd-tmpfiles-clean.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.service"; - }; + "systemd/user/basic.target.wants/systemd-tmpfiles-setup.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; + "systemd/user/systemd-tmpfiles-setup.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; + "systemd/user/timers.target.wants/systemd-tmpfiles-clean.timer".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.timer"; + "systemd/user/systemd-tmpfiles-clean.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.service"; }; }; } diff --git a/third_party/home-manager/modules/misc/version.nix b/third_party/home-manager/modules/misc/version.nix index f82fc3a42c..048f784abc 100644 --- a/third_party/home-manager/modules/misc/version.nix +++ b/third_party/home-manager/modules/misc/version.nix @@ -20,6 +20,7 @@ in { "22.11" "23.05" "23.11" + "24.05" ]; description = '' It is occasionally necessary for Home Manager to change diff --git a/third_party/home-manager/modules/misc/xdg-portal.nix b/third_party/home-manager/modules/misc/xdg-portal.nix new file mode 100644 index 0000000000..500e02e008 --- /dev/null +++ b/third_party/home-manager/modules/misc/xdg-portal.nix @@ -0,0 +1,157 @@ +{ config, pkgs, lib, ... }: + +let + + inherit (lib) + mapAttrsToList mkEnableOption mkIf mkMerge mkOption optional optionalString + types; + + associationOptions = with types; + attrsOf (coercedTo (either (listOf str) str) + (x: lib.concatStringsSep ";" (lib.toList x)) str); + +in { + meta.maintainers = [ lib.maintainers.misterio77 ]; + + options.xdg.portal = { + enable = mkEnableOption + "[XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal)"; + + extraPortals = mkOption { + type = types.listOf types.package; + default = [ ]; + description = '' + List of additional portals that should be passed to the + `xdg-desktop-portal.service`, via the `XDG_DESKTOP_PORTAL_DIR` + variable. + + Portals allow interaction with system, like choosing files or taking + screenshots. At minimum, a desktop portal implementation should be + listed. + ''; + }; + + xdgOpenUsePortal = mkOption { + type = types.bool; + default = false; + description = '' + Sets environment variable `NIXOS_XDG_OPEN_USE_PORTAL` to `1` + This will make `xdg-open` use the portal to open programs, which resolves bugs involving + programs opening inside FHS envs or with unexpected env vars set from wrappers. + See [#160923](https://github.com/NixOS/nixpkgs/issues/160923) for more info. + ''; + }; + + config = mkOption { + type = types.attrsOf associationOptions; + default = { }; + example = { + x-cinnamon = { default = [ "xapp" "gtk" ]; }; + pantheon = { + default = [ "pantheon" "gtk" ]; + "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; + }; + common = { default = [ "gtk" ]; }; + }; + description = '' + Sets which portal backend should be used to provide the implementation + for the requested interface. For details check {manpage}`portals.conf(5)`. + + These will be written with the name `$desktop-portals.conf` for + `xdg.portal.config.$desktop` and `portals.conf` for + `xdg.portal.config.common` as an exception. + + These, together with `xdg.portal.configPackages`, will be joined into a + directory and passed to `xdg-desktop-portal.service` through a + `NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR` variable. + ''; + }; + + configPackages = mkOption { + type = types.listOf types.package; + default = [ ]; + example = lib.literalExpression "[ pkgs.gnome.gnome-session ]"; + description = '' + List of packages that provide XDG desktop portal configuration, usually in + the form of `share/xdg-desktop-portal/$desktop-portals.conf`. + + Note that configs in `xdg.portal.config` will be preferred if set. + ''; + }; + }; + + config = let + cfg = config.xdg.portal; + + joinedPortals = pkgs.buildEnv { + name = "xdg-portals"; + paths = cfg.extraPortals; + pathsToLink = + [ "/share/xdg-desktop-portal/portals" "/share/applications" ]; + }; + + portalConfigPath = n: + "share/xdg-desktop-portal/${ + optionalString (n != "common") "${n}-" + }portals.conf"; + mkPortalConfig = desktop: conf: + pkgs.writeTextDir (portalConfigPath desktop) + (lib.generators.toINI { } { preferred = conf; }); + + joinedPortalConfigs = pkgs.buildEnv { + name = "xdg-portal-configs"; + ignoreCollisions = true; # Let config override configPackages cfgs + paths = (mapAttrsToList mkPortalConfig cfg.config) ++ cfg.configPackages; + pathsToLink = [ "/share/xdg-desktop-portal" ]; + }; + in mkIf cfg.enable { + warnings = optional (cfg.configPackages == [ ] && cfg.config == { }) '' + xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you + should either set `xdg.portal.config` or `xdg.portal.configPackages` + to specify which portal backend to use for the requested interface. + + https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in + + If you simply want to keep the behaviour in < 1.17, which uses the first + portal implementation found in lexicographical order, use the following: + + xdg.portal.config.common.default = "*"; + ''; + + assertions = [ + (lib.hm.assertions.assertPlatform "xdg.portal" pkgs lib.platforms.linux) + + { + assertion = cfg.extraPortals != [ ]; + message = + "Setting xdg.portal.enable to true requires a portal implementation in xdg.portal.extraPortals such as xdg-desktop-portal-gtk or xdg-desktop-portal-kde."; + } + ]; + + home = { + sessionVariables = + mkIf cfg.xdgOpenUsePortal { NIXOS_XDG_OPEN_USE_PORTAL = "1"; }; + + # Make extraPortals systemd units available to the user + packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + }; + + systemd.user.services.xdg-desktop-portal = { + Unit = { + Description = "Portal service"; + PartOf = "graphical-session.target"; + }; + + Service = { + Environment = [ + "XDG_DESKTOP_PORTAL_DIR=${joinedPortals}/share/xdg-desktop-portal/portals" + ] ++ (optional (cfg.configPackages != [ ]) + "NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR=${joinedPortalConfigs}/share/xdg-desktop-portal"); + Type = "dbus"; + BusName = "org.freedesktop.portal.Desktop"; + ExecStart = "${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"; + Slice = "session.slice"; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/modules.nix b/third_party/home-manager/modules/modules.nix index a23d6ebaa4..16b7837bf9 100644 --- a/third_party/home-manager/modules/modules.nix +++ b/third_party/home-manager/modules/modules.nix @@ -42,6 +42,7 @@ let ./misc/xdg-desktop-entries.nix ./misc/xdg-mime-apps.nix ./misc/xdg-mime.nix + ./misc/xdg-portal.nix ./misc/xdg-system-dirs.nix ./misc/xdg-user-dirs.nix ./misc/xdg.nix @@ -57,16 +58,21 @@ let ./programs/atuin.nix ./programs/autojump.nix ./programs/autorandr.nix + ./programs/awscli.nix ./programs/bash.nix ./programs/bashmount.nix ./programs/bat.nix + ./programs/bacon.nix ./programs/beets.nix + ./programs/bemenu.nix ./programs/borgmatic.nix ./programs/bottom.nix ./programs/boxxy.nix ./programs/broot.nix ./programs/browserpass.nix ./programs/btop.nix + ./programs/carapace.nix + ./programs/cava.nix ./programs/chromium.nix ./programs/command-not-found/command-not-found.nix ./programs/comodoro.nix @@ -77,7 +83,7 @@ let ./programs/eclipse.nix ./programs/emacs.nix ./programs/eww.nix - ./programs/exa.nix + ./programs/eza.nix ./programs/feh.nix ./programs/firefox.nix ./programs/fish.nix @@ -95,6 +101,8 @@ let ./programs/gnome-terminal.nix ./programs/go.nix ./programs/gpg.nix + ./programs/gradle.nix + ./programs/granted.nix ./programs/havoc.nix ./programs/helix.nix ./programs/hexchat.nix @@ -103,6 +111,7 @@ let ./programs/hstr.nix ./programs/htop.nix ./programs/hyfetch.nix + ./programs/i3blocks.nix ./programs/i3status-rust.nix ./programs/i3status.nix ./programs/imv.nix @@ -118,6 +127,7 @@ let ./programs/kakoune.nix ./programs/keychain.nix ./programs/khal.nix + ./programs/khard.nix ./programs/kitty.nix ./programs/kodi.nix ./programs/lazygit.nix @@ -159,6 +169,7 @@ let ./programs/offlineimap.nix ./programs/oh-my-posh.nix ./programs/opam.nix + ./programs/openstackclient.nix ./programs/pandoc.nix ./programs/papis.nix ./programs/password-store.nix @@ -169,22 +180,28 @@ let ./programs/piston-cli.nix ./programs/pls.nix ./programs/powerline-go.nix + ./programs/pqiv.nix ./programs/pubs.nix ./programs/pyenv.nix ./programs/pylint.nix + ./programs/qcal.nix ./programs/qutebrowser.nix ./programs/rbw.nix ./programs/readline.nix + ./programs/rio.nix ./programs/ripgrep.nix ./programs/rofi-pass.nix ./programs/rofi.nix ./programs/rtorrent.nix ./programs/rtx.nix + ./programs/ruff.nix ./programs/sagemath.nix + ./programs/sapling.nix ./programs/sbt.nix ./programs/scmpuff.nix ./programs/script-directory.nix ./programs/senpai.nix + ./programs/sftpman.nix ./programs/sioyek.nix ./programs/skim.nix ./programs/sm64ex.nix @@ -192,11 +209,13 @@ let ./programs/ssh.nix ./programs/starship.nix ./programs/swaylock.nix + ./programs/swayr.nix ./programs/taskwarrior.nix ./programs/tealdeer.nix ./programs/terminator.nix ./programs/termite.nix ./programs/texlive.nix + ./programs/thefuck.nix ./programs/thunderbird.nix ./programs/timidity.nix ./programs/tint2.nix @@ -218,7 +237,10 @@ let ./programs/wezterm.nix ./programs/wlogout.nix ./programs/wofi.nix + ./programs/wpaperd.nix ./programs/xmobar.nix + ./programs/xplr.nix + ./programs/yazi.nix ./programs/yt-dlp.nix ./programs/z-lua.nix ./programs/zathura.nix @@ -227,6 +249,7 @@ let ./programs/zplug.nix ./programs/zsh.nix ./programs/zsh/prezto.nix + ./programs/zsh/zsh-abbr.nix ./services/autorandr.nix ./services/avizo.nix ./services/barrier.nix @@ -237,10 +260,12 @@ let ./services/cachix-agent.nix ./services/caffeine.nix ./services/cbatticon.nix + ./services/cliphist.nix ./services/clipman.nix ./services/clipmenu.nix ./services/comodoro.nix ./services/copyq.nix + ./services/darkman.nix ./services/devilspie2.nix ./services/dropbox.nix ./services/dunst.nix @@ -285,11 +310,11 @@ let ./services/nextcloud-client.nix ./services/notify-osd.nix ./services/opensnitch-ui.nix + ./services/osmscout-server.nix ./services/owncloud-client.nix ./services/pantalaimon.nix ./services/parcellite.nix ./services/pass-secret-service.nix - ./services/password-store-sync.nix ./services/pasystray.nix ./services/pbgopy.nix ./services/picom.nix @@ -308,6 +333,7 @@ let ./services/safeeyes.nix ./services/screen-locker.nix ./services/sctd.nix + ./services/signaturepdf.nix ./services/spotifyd.nix ./services/ssh-agent.nix ./services/stalonetray.nix @@ -352,6 +378,10 @@ let ./misc/nix.nix (pkgs.path + "/nixos/modules/misc/assertions.nix") (pkgs.path + "/nixos/modules/misc/meta.nix") + + (mkRemovedOptionModule [ "services" "password-store-sync" ] '' + Use services.git-sync instead. + '') ] ++ optional useNixpkgsModule ./misc/nixpkgs.nix ++ optional (!useNixpkgsModule) ./misc/nixpkgs-disabled.nix; diff --git a/third_party/home-manager/modules/po/ca.po b/third_party/home-manager/modules/po/ca.po index 6821168f00..698b38d43d 100644 --- a/third_party/home-manager/modules/po/ca.po +++ b/third_party/home-manager/modules/po/ca.po @@ -7,9 +7,9 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-04-23 12:49+0000\n" -"Last-Translator: Leix b \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-10 15:58+0000\n" +"Last-Translator: Nara Díaz Viñolas \n" "Language-Team: Catalan \n" "Language: ca\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 4.18-dev\n" +"X-Generator: Weblate 5.3-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -35,7 +35,7 @@ msgstr "Creant generació de perfil %s" msgid "No change so reusing latest profile generation %s" msgstr "No hi ha canvis, reutilitzant últim perfil generat %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "i després provar d'activar la teva configuració de Home Manager de nou." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Activant %s" @@ -110,11 +110,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Error: USER està configurat a \"%s\", però s'esperava \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Error: HOME està configurat a \"%s\", però s'esperava \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/cs.po b/third_party/home-manager/modules/po/cs.po new file mode 100644 index 0000000000..748aab4733 --- /dev/null +++ b/third_party/home-manager/modules/po/cs.po @@ -0,0 +1,140 @@ +# 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: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-08 12:04+0000\n" +"Last-Translator: David Houdek \n" +"Language-Team: Czech \n" +"Language: cs\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>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Weblate 5.3-dev\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "Vytváření linků na domácí soubory v %s" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "Čištění osiřelých linků z %s" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "Vytvářím profil generace %s" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "Žádná změna, takže bude použita profil poslední generace %s" + +#: modules/home-environment.nix:640 +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 "" +"Jejda, Nix se nepodařilo instalovat váš nový Home Manager profil!\n" +"\n" +"Možná je konflikt s balíčkem, který byl nainstalován pomocí\n" +"\"%s\"? Zkuste spustit\n" +"\n" +"\t%s\n" +"\n" +"a jestli existuje konfliktní balíček, můžete ho odstranit pomocí\n" +"\n" +"\t%s\n" +"\n" +"Poté zkuste znova aktivovat vaši Home Manager konfiguraci." + +#: modules/home-environment.nix:673 +msgid "Activating %s" +msgstr "Aktivuji %s" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migruji profil z %s do %s" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Nebyl nalezen vhodný adresář profilu, byly zkoušeny %s a %s" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "Kontrola správnosti oldGenNum a oldGenPath" + +#: modules/lib-bash/activation-init.sh:84 +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 "" +"Poslední číslo a cesta generace jsou konfliktní! Ty\n" +"musí být oboje buď prázdné, nebo nastaveny, ale nyní jsou nastaveny na\n" +"\n" +"\t'%s' a '%s'\n" +"\n" +"Jestli vám nevadí ztráta předchozích generací profilu, potom\n" +"to nejjednodušší řešení bude nejspíš spustit\n" +"\n" +"\trm %s/home-manager*\n" +"\trm %s/current-home\n" +"\n" +"a zkusit přepínač home‐manager znova. Hodně štěstí!" + +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Chyba: USER je nastaven na \"%s\", ale očekáváme \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Chyba: HOME je nastaven na \"%s\", ale očekáváme \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "Zapínám aktivaci Home Manager" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "Kontrola správnosti Nix" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "Toto je zkušební běh" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "Toto je běh na ostro" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "Používám Nix verze: %s" + +#: modules/lib-bash/activation-init.sh:146 +msgid "Activation variables:" +msgstr "Aktivační proměnné:" diff --git a/third_party/home-manager/modules/po/da.po b/third_party/home-manager/modules/po/da.po index 31a38b3196..548f1407b0 100644 --- a/third_party/home-manager/modules/po/da.po +++ b/third_party/home-manager/modules/po/da.po @@ -7,9 +7,9 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-09-19 18:22+0000\n" -"Last-Translator: cafkafk \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-09-27 11:02+0000\n" +"Last-Translator: Emil Heilbo \n" "Language-Team: Danish \n" "Language: da\n" @@ -17,25 +17,25 @@ 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 4.14.1\n" +"X-Generator: Weblate 5.1-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "Skaber hjemme fil links i %s" +msgstr "Opretter hjemme fil links i %s" #: modules/files.nix:247 msgid "Cleaning up orphan links from %s" -msgstr "Opryder forældreløse links fra %s" +msgstr "Oprydder forældreløse links fra %s" #: modules/files.nix:263 msgid "Creating profile generation %s" -msgstr "Kreere profil generation %s" +msgstr "Opretter profil generation %s" #: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" -msgstr "Ingen ændring så genbrug den seneste profil generation %s" +msgstr "Ingen ændring, dermed genanvendes seneste profil generation %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -50,34 +50,34 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" -"Åh nej, Nix fejlede i at installere din nye Home Manager profil! \n" -" \n" +"Åh nej, Nix fejlede i at installere din nye Home Manager profil!\n" +"\n" "Måske er der en konflikt med en pakke der blev installeret gennem\n" -"\"%s\"? Prøv at køre \n" +"\"%s\"? Prøv at køre\n" "\n" " %s\n" -" \n" -"og hvis der er en pakke konflikt, kan du fjerne pakken med \n" -" \n" +"\n" +"og hvis der er en pakke-konflikt, kan du fjerne pakken med\n" +"\n" " %s\n" -" \n" -"og så prøve at genaktivere din Home Manager konfiguration igen." +"\n" +"Derefter prøv at aktivere din Home Manager konfiguration igen." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" -msgstr "Aktivere %s" +msgstr "Aktiverer %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Migrerer profil fra %s til %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kunne ikke finde en passende profilmappe, forsøgte %s og %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" -msgstr "Tjekker fornuften af oldGenNum and oldGenPath" +msgstr "Tjekker fornuften af oldGenNum og oldGenPath" #: modules/lib-bash/activation-init.sh:84 msgid "" @@ -94,38 +94,38 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" -"Den forrige generations nummer og sti er i konflikt! Disse\n" -"skal enten begge være tomme, eller begge være sat, men er nu sat til \n" -" \n" -" '%s' and '%s'\n" -" \n" +"Det forrige generationsnummer og sti er i konflikt! Disse skal\n" +"enten begge være tomme, eller begge være sat, men er nu sat til\n" +"\n" +" '%s' og '%s'\n" +"\n" "Hvis du ikke har noget mod at miste tidligere profil generationer så\n" -"er den nemmeste løsning nok at køre \n" -" \n" +"er den nemmeste løsning nok at køre\n" +"\n" " rm %s/home-manager*\n" " rm %s/current-home\n" -" \n" -"og så prøve at køre home-manager switch igen. Held og lykke!" +"\n" +"og forsøge at køre home-manager switch igen. Held og lykke!" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Fejl: USER er sat til \"%s\", men vi forventer \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Fejl: HOME er sat til \"%s\", men vi forventer \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" -msgstr "Starter Home Manager aktivation" +msgstr "Starter Home Manager aktivering" #: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" -msgstr "Udføre fornuft check af Nix" +msgstr "Tjekker fornuften af Nix" #: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" -msgstr "Dette er en tør kørsel" +msgstr "Dette er en test-kørsel" #: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" @@ -137,4 +137,4 @@ msgstr "Bruger Nix version: %s" #: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" -msgstr "Aktivere variable:" +msgstr "Aktiveringsvariabler:" diff --git a/third_party/home-manager/modules/po/de.po b/third_party/home-manager/modules/po/de.po index d70a7a6278..231d7ade59 100644 --- a/third_party/home-manager/modules/po/de.po +++ b/third_party/home-manager/modules/po/de.po @@ -7,9 +7,9 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-06-20 05:50+0000\n" -"Last-Translator: Sven Keidel \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-29 02:09+0000\n" +"Last-Translator: Peter Pfeufer \n" "Language-Team: German \n" "Language: de\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 4.18.1\n" +"X-Generator: Weblate 5.4-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -35,7 +35,7 @@ msgstr "Erstelle Profilgeneration %s" msgid "No change so reusing latest profile generation %s" msgstr "Keine Änderungen. Benutze daher letzte Profilgeneration %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "Versuchen Sie dann, Ihre Home Manager Konfiguration erneut zu aktivieren." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Aktiviere %s" @@ -132,7 +132,7 @@ msgstr "Dies ist ein Probelauf" #: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" -msgstr "Dies ist eine Live-Ausführung" +msgstr "Dies ist kein Probelauf" #: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" diff --git a/third_party/home-manager/modules/po/es.po b/third_party/home-manager/modules/po/es.po index 60953a25a5..d6799102b3 100644 --- a/third_party/home-manager/modules/po/es.po +++ b/third_party/home-manager/modules/po/es.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-05-27 12:11+0000\n" "Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" "Language-Team: French \n" "Language-Team: LANGUAGE \n" @@ -33,7 +33,7 @@ msgstr "" msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -49,7 +49,7 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "" diff --git a/third_party/home-manager/modules/po/id.po b/third_party/home-manager/modules/po/id.po index 1c654135d1..430822963c 100644 --- a/third_party/home-manager/modules/po/id.po +++ b/third_party/home-manager/modules/po/id.po @@ -7,8 +7,8 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-10-04 06:02+0000\n" "Last-Translator: Reza Almanda \n" "Language-Team: Indonesian \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.0-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -36,7 +36,7 @@ msgid "No change so reusing latest profile generation %s" msgstr "" "Tidak ada perubahan, jadi gunakan kembali pembuatan profil terbaru %s%s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "Kemudian coba aktifkan kembali konfigurasi Home Manager Anda." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Mengaktifkan %s" @@ -74,11 +74,11 @@ msgstr "Memigrasi profil dari %s ke %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Tidak dapat menemukan direktori profil yang sesuai, coba %s dan %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" -msgstr "" +msgstr "Sanity memeriksa oldGenNum dan oldGenPath" #: modules/lib-bash/activation-init.sh:84 msgid "" @@ -98,32 +98,32 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Error: PENGGUNA diatur ke \"%s\" tetapi kami mengharapkan \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Error: BERANDA diatur ke \"%s\" tetapi kami mengharapkan \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" -msgstr "" +msgstr "Memulai aktivasi Home Manager" #: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" -msgstr "" +msgstr "Pemeriksaan sanity Nix" #: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" -msgstr "" +msgstr "Ini adalah dry run" #: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" -msgstr "" +msgstr "Ini adalah live run" #: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" -msgstr "" +msgstr "Menggunakan versi Nix: %s" #: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" -msgstr "" +msgstr "Variabel aktivasi:" diff --git a/third_party/home-manager/modules/po/it.po b/third_party/home-manager/modules/po/it.po index 69f9bba77a..086d835ba2 100644 --- a/third_party/home-manager/modules/po/it.po +++ b/third_party/home-manager/modules/po/it.po @@ -7,9 +7,9 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-12-15 08:50+0000\n" -"Last-Translator: Walter Franzini \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-02 23:06+0000\n" +"Last-Translator: Lorenzo Brzek \n" "Language-Team: Italian \n" "Language: it\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 4.15-dev\n" +"X-Generator: Weblate 5.3-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -36,7 +36,7 @@ msgid "No change so reusing latest profile generation %s" msgstr "" "Nessuna modifica, verrà riutilizzata l'ultimo generazione di profilo %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -51,18 +51,32 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" +"Ops, Nix non è riuscito ad installare il tuo nuovo profilo Home Manager!\n" +"\n" +"Potrebbe esserci un conflitto con un pacchetto che è stato installato " +"utilizzando\n" +"\"%s\"? Provate ad eseguire\n" +"\n" +"· · · ·%s\n" +"\n" +"e se ci fosse un pacchetto in conflitto, potete rimuoverlo con\n" +"\n" +"· · · · %s\n" +"\n" +"Poi provate a riattivare la configurazione Home Manager." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Attivando %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Migrazione del profilo da %s a %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Impossibile trovare la directory del profilo adatta, si è provato con %s e %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -98,11 +112,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Errore: USER è impostato su \"%s\" ma era previsto \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Errore: HOME è impostata su \"%s\" ma era previsto un valore di \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/ja.po b/third_party/home-manager/modules/po/ja.po index 708b55b162..fc6bea3c26 100644 --- a/third_party/home-manager/modules/po/ja.po +++ b/third_party/home-manager/modules/po/ja.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-06-12 10:49+0000\n" "Last-Translator: Jeff Ames \n" "Language-Team: Japanese \n" "Language-Team: Korean \n" +"Language-Team: Lithuanian \n" "Language: lt\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 % 10 == 1 && (n % 100 < 11 || n % 100 > " +"19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? " +"1 : 2);\n" +"X-Generator: Weblate 5.1\n" #: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "" +msgstr "Kuriamos home failų nuorodos adresu %s" #: modules/files.nix:247 +#, fuzzy msgid "Cleaning up orphan links from %s" -msgstr "" +msgstr "Valomos pamestos nuorodos iš %s" #: modules/files.nix:263 msgid "Creating profile generation %s" -msgstr "" +msgstr "Kuriama profilio generacija %s" #: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" -msgstr "" +msgstr "Nėra pakeitimų, naudojama paskutinė profilio generacija %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -47,18 +53,30 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" +"Ups, Nix nepavyko įdiegti naujo Home Manager profilio!\n" +"\n" +"Galbūt yra konfliktas su paketu, kuris buvo įdiegtas naudojantis\n" +"\"%s\"? Pabandykite paleisti\n" +"\n" +" %s\n" +"\n" +"ir jei yra paketas sukeliantis konfliktą, galite jį išdiegti su\n" +"\n" +" %s\n" +"\n" +"Tada pabandykite aktyvuoti Home Manager konfigūraciją iš naujo." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" -msgstr "" +msgstr "Aktyvuojamas %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Perkeliamas profilis iš %s į %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Nepavyko rasti tinkamo profilio katalogo, bandyta naudoti %s ir %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -90,24 +108,25 @@ msgstr "" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" -msgstr "" +msgstr "Pradedamas Home Manager aktivavymas" #: modules/lib-bash/activation-init.sh:123 +#, fuzzy msgid "Sanity checking Nix" -msgstr "" +msgstr "Nix tikrinamas" #: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" -msgstr "" +msgstr "Tai yra sausas vykdymas" #: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" -msgstr "" +msgstr "Tai yra gyvas vykdymas" #: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" -msgstr "" +msgstr "Naudojama Nix versija: %s" #: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" -msgstr "" +msgstr "Aktyvavimo kintamieji:" diff --git a/third_party/home-manager/modules/po/nb_NO.po b/third_party/home-manager/modules/po/nb_NO.po index 1525492a35..189731bd9c 100644 --- a/third_party/home-manager/modules/po/nb_NO.po +++ b/third_party/home-manager/modules/po/nb_NO.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-03-08 07:22+0000\n" "Last-Translator: \"Kim A. Ødegaard\" \n" "Language-Team: Norwegian Bokmål \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-02 23:06+0000\n" +"Last-Translator: Zurga \n" "Language-Team: Dutch \n" "Language: nl\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 4.17-dev\n" +"X-Generator: Weblate 5.3-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -36,7 +36,7 @@ msgid "No change so reusing latest profile generation %s" msgstr "" "Geen veranderingen dus de laatste profiel generatie %s wordt hergebruikt" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -65,17 +65,17 @@ msgstr "" "\n" "Probeer daarna je Home Manager configuratie opnieuw te activeren." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "%s aan het activeren" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Profiel aan het migreren van %s naar %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kan geen geschikte map vinden voor het profiel, %s en %s geprobeerd" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -111,11 +111,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Fout: USER heeft als waarde \"%s\" maar we verwachten \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Fout: HOME heeft als waarde \"%s\" maar we verwachten \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/pl.po b/third_party/home-manager/modules/po/pl.po index ae1643bf8e..28cf687725 100644 --- a/third_party/home-manager/modules/po/pl.po +++ b/third_party/home-manager/modules/po/pl.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-05-03 19:48+0000\n" "Last-Translator: Eryk Michalak \n" "Language-Team: Polish \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-10-19 04:00+0000\n" +"Last-Translator: SrGesus \n" "Language-Team: Portuguese \n" "Language: pt\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 4.16-dev\n" +"X-Generator: Weblate 5.1\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -35,7 +35,7 @@ msgstr "A criar geração %s para o perfil" msgid "No change so reusing latest profile generation %s" msgstr "Nenhuma mudança, portanto a reusar a última geração %s para o perfil" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,17 +63,19 @@ msgstr "" "\n" "E então tente novamente ativar a sua configuração do Home Manager." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Ativando %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "A migrar perfil de %s para %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Não foi possível encontrar uma diretoria de perfil apropriada, foi tentado " +"%s e %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -109,11 +111,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Erro: USER está definido como \"%s\" mas é esperado \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Erro: HOME está definida como \"%s\" mas é esperado \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/pt_BR.po b/third_party/home-manager/modules/po/pt_BR.po index d4099cecdd..c4858b2056 100644 --- a/third_party/home-manager/modules/po/pt_BR.po +++ b/third_party/home-manager/modules/po/pt_BR.po @@ -7,17 +7,17 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-04-04 11:11+0000\n" -"Last-Translator: Alex Miranda \n" -"Language-Team: Portuguese (Brazil) \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-11-30 15:04+0000\n" +"Last-Translator: Gabriel Fontes \n" +"Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\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 4.12-dev\n" +"X-Generator: Weblate 5.3-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -35,7 +35,7 @@ msgstr "Criando geração %s para o perfil" msgid "No change so reusing latest profile generation %s" msgstr "Nenhuma mudança, portanto reusando a última geração %s para o perfil" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,17 +63,18 @@ msgstr "" "\n" "E então tente novamente ativar a sua configuração do Home Manager." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Ativando %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Migrando perfil de %s para %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Não foi possível encontrar um diretório de perfil apropriado, tentei %s e %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -109,11 +110,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Erro: USER está definido como \"%s\" mas o esperado é \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Erro: HOME está definido como \"%s\" mas o esperado é \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/ro.po b/third_party/home-manager/modules/po/ro.po index f8022e061c..98bd13a808 100644 --- a/third_party/home-manager/modules/po/ro.po +++ b/third_party/home-manager/modules/po/ro.po @@ -7,32 +7,36 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-08-11 19:51+0000\n" +"Last-Translator: HeartBlin913861820c094e37 \n" +"Language-Team: Romanian \n" "Language: ro\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==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" +"X-Generator: Weblate 5.0-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "" +msgstr "Se creează legături ale fișierelor personale în %s" #: modules/files.nix:247 msgid "Cleaning up orphan links from %s" -msgstr "" +msgstr "Se curăță legăturiile orfane din %s" #: modules/files.nix:263 msgid "Creating profile generation %s" -msgstr "" +msgstr "Se creează generația %s a profilului" #: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" -msgstr "" +msgstr "Nicio schimbare, se reutilizează ultimul profil generat %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -47,22 +51,35 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" +"Ups, Nix a eșuat să instaleze profilul tău nou Home Manager\n" +"\n" +"Poate există un conflict cu un pachet care a fost instalat folosind\n" +"\"%s\"? Încearcă să rulezi\n" +"\n" +" %s\n" +"\n" +"și dacă exista pachete în conflict puteți sa le ștergeți cu\n" +"\n" +" %s\n" +"\n" +"Apoi încearcă să activați configurația ta Home Manager din nou." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" -msgstr "" +msgstr "Se activează %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Se migrează profilul de la %s la %s" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" +"Nu s-a putut găsi un director cu un profil potrivit, s-a încercat %s și %s" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" -msgstr "" +msgstr "Se verifică corectitudinea oldGenNum și oldGenPath" #: modules/lib-bash/activation-init.sh:84 msgid "" @@ -79,35 +96,48 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" +"Numărul generației anterioare și calea sunt în conflict! Acestea\n" +"trebuie să fie ambele goale sau ambele setate, dar acum sunt setate la\n" +"\n" +" '%s' și '%s'\n" +"\n" +"Dacă nu vă deranjează pierderea generațiilor anterioare de profiluri, " +"atunci\n" +"cea mai ușoară soluție ar fi să rulezi\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"și să încerci să rulezi home-manager switch din nou. Mult noroc!" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Eroare: USER este setat la \"%s\", dar noi ne așteptam la \"%s\"" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Eroare: HOME este setat la \"%s\", dar noi ne așteptam la \"%s\"" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" -msgstr "" +msgstr "Se pornește activarea Home Managerului" #: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" -msgstr "" +msgstr "Se verifică corectitudinea Nix" #: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" -msgstr "" +msgstr "Aceasta este o rulare simulată" #: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" -msgstr "" +msgstr "Aceasta este o rulare directă" #: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" -msgstr "" +msgstr "Folosind versiunea Nix: %s" #: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" -msgstr "" +msgstr "Variabile de activație:" diff --git a/third_party/home-manager/modules/po/ru.po b/third_party/home-manager/modules/po/ru.po index f70468a2c5..0cf99a0f37 100644 --- a/third_party/home-manager/modules/po/ru.po +++ b/third_party/home-manager/modules/po/ru.po @@ -7,18 +7,18 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-06-07 12:51+0000\n" -"Last-Translator: Nikolay Mokrinsky \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-11 16:06+0000\n" +"Last-Translator: Blezz Rot \n" "Language-Team: Russian \n" "Language: ru\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%10==1 && n%100!=11 ? 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%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.3-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -36,7 +36,7 @@ msgstr "Создаю профиль в поколении %s" msgid "No change so reusing latest profile generation %s" msgstr "Изменений нет, переиспользую профиль в последнем поколении %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "После попробуйте активировать конфигурацию снова." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Активирую %s" @@ -78,7 +78,7 @@ msgstr "Не найдена подходящая директория профи #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" -msgstr "Сравниваю oldGenNum и oldGenPath на всякий" +msgstr "Проверка oldGenNum и oldGenPath" #: modules/lib-bash/activation-init.sh:84 msgid "" @@ -95,18 +95,19 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" -"Номер и путь прошлого поколения конфликтуют! Они должны быть\n" -"одинаково пустыми или заполненными, но сейчас имеют значения\n" +"Обнаружен конфликт между номером и расположением предыдущего поколения!\n" +"Обе переменные должны иметь значения либо быть пустыми, но следующие " +"значения:\n" "\n" -" '%s' и '%s'\n" +" '%s' and '%s'\n" "\n" -"Если вы не против потерять предыдущие профили, тогда,\n" -"вероятно, простейшим решением будет запустить\n" +"Если вы не возражаете потерять предыдущие поколения профиля,\n" +"наиболее простым решением будет выполнение\n" "\n" " rm %s/home-manager*\n" " rm %s/current-home\n" "\n" -"и выполнить home-manager switch ещё раз. Удачи!" +"и повторный запуск 'home-manager switch'. Удачи!" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" @@ -122,7 +123,7 @@ msgstr "Начинаю активацию Home Manager" #: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" -msgstr "Проверяю Nix на всякий случай" +msgstr "Проверка работоспособности Nix" #: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" diff --git a/third_party/home-manager/modules/po/sv.po b/third_party/home-manager/modules/po/sv.po index 270e1e58cc..f42ebeb42a 100644 --- a/third_party/home-manager/modules/po/sv.po +++ b/third_party/home-manager/modules/po/sv.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-05-27 12:11+0000\n" "Last-Translator: Robert Helgesson \n" "Language-Team: Swedish , 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: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: th\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:640 +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:673 +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:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:84 +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:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:146 +msgid "Activation variables:" +msgstr "" diff --git a/third_party/home-manager/modules/po/tr.po b/third_party/home-manager/modules/po/tr.po index 1e828c02fc..023294f9f7 100644 --- a/third_party/home-manager/modules/po/tr.po +++ b/third_party/home-manager/modules/po/tr.po @@ -7,8 +7,8 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-11-13 17:06+0000\n" "Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish \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 4.12-dev\n" +"X-Generator: Weblate 5.2-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" @@ -36,7 +36,7 @@ msgid "No change so reusing latest profile generation %s" msgstr "" "Değişiklik yok, bu nedenle en son profil inşası %s yeniden kullanılıyor" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,17 +64,17 @@ msgstr "" "ile kaldırabilirsiniz. Sonra Home Manager yapılandırmanızı yeniden\n" "etkinleştirmeyi deneyin." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "%s etkinleştiriliyor" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Profil %s, %s e taşınıyor" #: modules/lib-bash/activation-init.sh:53 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kullanılabilir profil dizini bulunamadı, %s ve %s denendi" #: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" @@ -111,11 +111,11 @@ msgstr "" #: modules/lib-bash/activation-init.sh:95 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Hata: USER \"%s\" olarak ayarlandı ancak biz \"%s\" bekliyoruz" #: modules/lib-bash/activation-init.sh:104 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Hata: HOME \"%s\" olarak ayarlandı ancak biz \"%s\" bekliyoruz" #: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" diff --git a/third_party/home-manager/modules/po/uk.po b/third_party/home-manager/modules/po/uk.po index a4e6154645..dad0270583 100644 --- a/third_party/home-manager/modules/po/uk.po +++ b/third_party/home-manager/modules/po/uk.po @@ -7,22 +7,22 @@ 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: 2023-07-30 09:08+0200\n" -"PO-Revision-Date: 2023-05-28 22:49+0000\n" -"Last-Translator: Dan \n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" +"PO-Revision-Date: 2023-12-31 14:09+0000\n" +"Last-Translator: Сергій \n" "Language-Team: Ukrainian \n" "Language: uk\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%10==1 && n%100!=11 ? 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%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.4-dev\n" #: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "Створення посилань на домашні файли в %s" +msgstr "Створення посилань на файли в домашньому каталозі в %s" #: modules/files.nix:247 msgid "Cleaning up orphan links from %s" @@ -36,7 +36,7 @@ msgstr "Створення генерації профілю %s" msgid "No change so reusing latest profile generation %s" msgstr "Без змін, тому повторне використання останньої генерації профілю %s" -#: modules/home-environment.nix:626 +#: modules/home-environment.nix:640 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "Потім спробуйте знову активувати конфігурацію Home Manager." -#: modules/home-environment.nix:659 +#: modules/home-environment.nix:673 msgid "Activating %s" msgstr "Активація %s" diff --git a/third_party/home-manager/modules/po/zh_Hans.po b/third_party/home-manager/modules/po/zh_Hans.po index 3ea71723d9..bf5c1c45a8 100644 --- a/third_party/home-manager/modules/po/zh_Hans.po +++ b/third_party/home-manager/modules/po/zh_Hans.po @@ -7,7 +7,7 @@ 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: 2023-07-30 09:08+0200\n" +"POT-Creation-Date: 2023-09-13 23:46+0200\n" "PO-Revision-Date: 2023-06-12 10:49+0000\n" "Last-Translator: Hongtyu Bhe \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional) - for the default configuration. + {file}`$XDG_CONFIG_HOME/alacritty/alacritty.yml` or + {file}`$XDG_CONFIG_HOME/alacritty/alacritty.toml` + (the latter being used for alacritty 0.13 and later). + See + for more info. ''; }; }; }; - config = mkMerge [ - (mkIf cfg.enable { - home.packages = [ cfg.package ]; + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; - xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != { }) { - # TODO: Replace by the generate function but need to figure out how to - # handle the escaping first. - # - # source = yamlFormat.generate "alacritty.yml" cfg.settings; - - text = - replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.settings); - }; - }) - ]; + xdg.configFile."alacritty/${configFileName}" = + lib.mkIf (cfg.settings != { }) (lib.mkMerge [ + (lib.mkIf useToml { + source = + (tomlFormat.generate configFileName cfg.settings).overrideAttrs + (finalAttrs: prevAttrs: { + buildCommand = lib.concatStringsSep "\n" [ + prevAttrs.buildCommand + # TODO: why is this needed? Is there a better way to retain escape sequences? + "substituteInPlace $out --replace '\\\\' '\\'" + ]; + }); + }) + # TODO remove this once we don't need to support Alacritty < 0.12 anymore + (lib.mkIf (!useToml) { + text = + replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.settings); + }) + ]); + }; } diff --git a/third_party/home-manager/modules/programs/antidote.nix b/third_party/home-manager/modules/programs/antidote.nix index f1fa044ce5..b4f98b1179 100644 --- a/third_party/home-manager/modules/programs/antidote.nix +++ b/third_party/home-manager/modules/programs/antidote.nix @@ -4,10 +4,6 @@ with lib; let cfg = config.programs.zsh.antidote; - relToDotDir = file: - (optionalString (config.programs.zsh.dotDir != null) - (config.programs.zsh.dotDir + "/")) + file; - zPluginStr = (pluginNames: optionalString (pluginNames != [ ]) "${concatStrings (map (name: '' ${name} diff --git a/third_party/home-manager/modules/programs/awscli.nix b/third_party/home-manager/modules/programs/awscli.nix new file mode 100644 index 0000000000..a4cfc108f5 --- /dev/null +++ b/third_party/home-manager/modules/programs/awscli.nix @@ -0,0 +1,72 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.awscli; + iniFormat = pkgs.formats.ini { }; + +in { + meta.maintainers = [ lib.maintainers.anthonyroussel ]; + + options.programs.awscli = { + enable = lib.mkEnableOption "AWS CLI tool"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.awscli2; + defaultText = lib.literalExpression "pkgs.awscli2"; + description = "Package providing {command}`aws`."; + }; + + settings = lib.mkOption { + type = lib.types.submodule { freeformType = iniFormat.type; }; + default = { }; + example = lib.literalExpression '' + { + "default" = { + region = "eu-west-3"; + output = "json"; + }; + }; + ''; + description = "Configuration written to {file}`$HOME/.aws/config`."; + }; + + credentials = lib.mkOption { + type = lib.types.submodule { freeformType = iniFormat.type; }; + default = { }; + example = lib.literalExpression '' + { + "default" = { + "credential_process" = "${pkgs.pass}/bin/pass show aws"; + }; + }; + ''; + description = '' + Configuration written to {file}`$HOME/.aws/credentials`. + + For security reasons, never store cleartext passwords here. + We recommend that you use `credential_process` option to retrieve + the IAM credentials from your favorite password manager during runtime, + or use AWS IAM Identity Center to get short-term credentials. + + See . + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.file."${config.home.homeDirectory}/.aws/config" = + lib.mkIf (cfg.settings != { }) { + source = + iniFormat.generate "aws-config-${config.home.username}" cfg.settings; + }; + + home.file."${config.home.homeDirectory}/.aws/credentials" = + lib.mkIf (cfg.credentials != { }) { + source = iniFormat.generate "aws-credentials-${config.home.username}" + cfg.credentials; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/bacon.nix b/third_party/home-manager/modules/programs/bacon.nix new file mode 100644 index 0000000000..263d1f0605 --- /dev/null +++ b/third_party/home-manager/modules/programs/bacon.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.bacon; + + settingsFormat = pkgs.formats.toml { }; +in { + meta.maintainers = [ hm.maintainers.shimunn ]; + + options.programs.bacon = { + enable = mkEnableOption "bacon, a background rust code checker"; + + settings = mkOption { + type = settingsFormat.type; + example = { + jobs.default = { + command = [ "cargo" "build" "--all-features" "--color" "always" ]; + need_stdout = true; + }; + }; + description = '' + Bacon configuration. + For available settings see . + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.bacon ]; + + xdg.configFile."bacon/prefs.toml".source = + settingsFormat.generate "prefs.toml" cfg.settings; + }; +} diff --git a/third_party/home-manager/modules/programs/bat.nix b/third_party/home-manager/modules/programs/bat.nix index 6890a28a80..b3951c33bb 100644 --- a/third_party/home-manager/modules/programs/bat.nix +++ b/third_party/home-manager/modules/programs/bat.nix @@ -8,10 +8,20 @@ let package = pkgs.bat; - toConfigFile = generators.toKeyValue { - mkKeyValue = k: v: "--${k}=${lib.escapeShellArg v}"; - listsAsDuplicateKeys = true; - }; + toConfigFile = attrs: + let + inherit (builtins) isBool attrNames; + nonBoolFlags = filterAttrs (_: v: !(isBool v)) attrs; + enabledBoolFlags = filterAttrs (_: v: isBool v && v) attrs; + + keyValuePairs = generators.toKeyValue { + mkKeyValue = k: v: "--${k}=${lib.escapeShellArg v}"; + listsAsDuplicateKeys = true; + } nonBoolFlags; + switches = concatMapStrings (k: '' + --${k} + '') (attrNames enabledBoolFlags); + in keyValuePairs + switches; in { meta.maintainers = [ ]; @@ -20,7 +30,7 @@ in { enable = mkEnableOption "bat, a cat clone with wings"; config = mkOption { - type = with types; attrsOf (either str (listOf str)); + type = with types; attrsOf (oneOf [ str (listOf str) bool ]); default = { }; example = { theme = "TwoDark"; @@ -43,16 +53,33 @@ in { }; themes = mkOption { - type = types.attrsOf types.lines; + type = types.attrsOf (types.either types.lines (types.submodule { + options = { + src = mkOption { + type = types.path; + description = "Path to the theme folder."; + }; + + file = mkOption { + type = types.nullOr types.str; + default = null; + description = + "Subpath of the theme file within the source, if needed."; + }; + }; + })); default = { }; example = literalExpression '' { - dracula = builtins.readFile (pkgs.fetchFromGitHub { - owner = "dracula"; - repo = "sublime"; # Bat uses sublime syntax for its themes - rev = "26c57ec282abcaa76e57e055f38432bd827ac34e"; - sha256 = "019hfl4zbn4vm4154hh3bwk6hm7bdxbr1hdww83nabxwjn99ndhv"; - } + "/Dracula.tmTheme"); + dracula = { + src = pkgs.fetchFromGitHub { + owner = "dracula"; + repo = "sublime"; # Bat uses sublime syntax for its themes + rev = "26c57ec282abcaa76e57e055f38432bd827ac34e"; + sha256 = "019hfl4zbn4vm4154hh3bwk6hm7bdxbr1hdww83nabxwjn99ndhv"; + }; + file = "Dracula.tmTheme"; + }; } ''; description = '' @@ -60,20 +87,85 @@ in { ''; }; + syntaxes = mkOption { + type = types.attrsOf (types.either types.lines (types.submodule { + options = { + src = mkOption { + type = types.path; + description = "Path to the syntax folder."; + }; + file = mkOption { + type = types.nullOr types.str; + default = null; + description = + "Subpath of the syntax file within the source, if needed."; + }; + }; + })); + default = { }; + example = literalExpression '' + { + gleam = { + src = pkgs.fetchFromGitHub { + owner = "molnarmark"; + repo = "sublime-gleam"; + rev = "2e761cdb1a87539d827987f997a20a35efd68aa9"; + hash = "sha256-Zj2DKTcO1t9g18qsNKtpHKElbRSc9nBRE2QBzRn9+qs="; + }; + file = "syntax/gleam.sublime-syntax"; + }; + } + ''; + description = '' + Additional syntaxes to provide. + ''; + }; }; - config = mkIf cfg.enable { - home.packages = [ package ] ++ cfg.extraPackages; + config = mkIf cfg.enable (mkMerge [ + (mkIf (any isString (attrValues cfg.themes)) { + warnings = ['' + Using programs.bat.themes as a string option is deprecated and will be + removed in the future. Please change to using it as an attribute set + instead. + '']; + }) + (mkIf (any isString (attrValues cfg.syntaxes)) { + warnings = ['' + Using programs.bat.syntaxes as a string option is deprecated and will be + removed in the future. Please change to using it as an attribute set + instead. + '']; + }) + { + home.packages = [ package ] ++ cfg.extraPackages; - xdg.configFile = mkMerge ([{ - "bat/config" = - mkIf (cfg.config != { }) { text = toConfigFile cfg.config; }; - }] ++ flip mapAttrsToList cfg.themes - (name: body: { "bat/themes/${name}.tmTheme" = { text = body; }; })); + xdg.configFile = mkMerge ([({ + "bat/config" = + mkIf (cfg.config != { }) { text = toConfigFile cfg.config; }; + })] ++ (flip mapAttrsToList cfg.themes (name: val: { + "bat/themes/${name}.tmTheme" = if isString val then { + text = val; + } else { + source = + if isNull val.file then "${val.src}" else "${val.src}/${val.file}"; + }; + })) ++ (flip mapAttrsToList cfg.syntaxes (name: val: { + "bat/syntaxes/${name}.sublime-syntax" = if isString val then { + text = val; + } else { + source = + if isNull val.file then "${val.src}" else "${val.src}/${val.file}"; + }; + }))); - home.activation.batCache = hm.dag.entryAfter [ "linkGeneration" ] '' - $VERBOSE_ECHO "Rebuilding bat theme cache" - $DRY_RUN_CMD ${lib.getExe package} cache --build - ''; - }; + home.activation.batCache = hm.dag.entryAfter [ "linkGeneration" ] '' + ( + export XDG_CACHE_HOME=${escapeShellArg config.xdg.cacheHome} + $VERBOSE_ECHO "Rebuilding bat theme cache" + $DRY_RUN_CMD ${lib.getExe package} cache --build + ) + ''; + } + ]); } diff --git a/third_party/home-manager/modules/programs/bemenu.nix b/third_party/home-manager/modules/programs/bemenu.nix new file mode 100644 index 0000000000..3cfd000265 --- /dev/null +++ b/third_party/home-manager/modules/programs/bemenu.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.bemenu; + +in { + meta.maintainers = [ hm.maintainers.omernaveedxyz ]; + + options.programs.bemenu = { + enable = mkEnableOption "bemenu"; + + package = mkPackageOption pkgs "bemenu" { }; + + settings = mkOption { + type = with types; attrsOf (oneOf [ str int bool ]); + default = { }; + example = literalExpression '' + { + line-height = 28; + prompt = "open"; + ignorecase = true; + fb = "#1e1e2e"; + ff = "#cdd6f4"; + nb = "#1e1e2e"; + nf = "#cdd6f4"; + tb = "#1e1e2e"; + hb = "#1e1e2e"; + tf = "#f38ba8"; + hf = "#f9e2af"; + af = "#cdd6f4"; + ab = "#1e1e2e"; + } + ''; + description = + "Configuration options for bemenu. See {manpage}`bemenu(1)`."; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.bemenu" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + home.sessionVariables = mkIf (cfg.settings != { }) { + BEMENU_OPTS = cli.toGNUCommandLineShell { } cfg.settings; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/borgmatic.nix b/third_party/home-manager/modules/programs/borgmatic.nix index 5e84edbe69..19670775ad 100644 --- a/third_party/home-manager/modules/programs/borgmatic.nix +++ b/third_party/home-manager/modules/programs/borgmatic.nix @@ -13,6 +13,13 @@ let default = null; }); + cleanRepositories = repos: + map (repo: + if builtins.isString repo then { + path = repo; + } else + removeNullValues repo) repos; + mkRetentionOption = frequency: mkNullableOption { type = types.int; @@ -27,6 +34,26 @@ let description = "Extra settings."; }; + repositoryOption = types.submodule { + options = { + path = mkOption { + type = types.str; + example = "ssh://myuser@myrepo.myserver.com/./repo"; + description = "Path of the repository."; + }; + + label = mkOption { + type = types.nullOr types.str; + default = null; + example = "remote"; + description = '' + Short text describing the repository. Can be used with the + `--repository` flag to select a repository. + ''; + }; + }; + }; + consistencyCheckModule = types.submodule { options = { name = mkOption { @@ -56,10 +83,23 @@ let }; repositories = mkOption { - type = types.listOf types.str; - description = "Paths to repositories."; - example = - literalExpression ''["ssh://myuser@myrepo.myserver.com/./repo"]''; + type = types.listOf (types.either types.str repositoryOption); + apply = cleanRepositories; + example = literalExpression '' + [ + { + "path" = "ssh://myuser@myrepo.myserver.com/./repo"; + "label" = "server"; + } + { + "path" = "/var/lib/backups/local.borg"; + "label" = "local"; + } + ] + ''; + description = '' + List of local or remote repositories with paths and optional labels. + ''; }; excludeHomeManagerSymlinks = mkOption { @@ -152,29 +192,22 @@ let hmExcludeFile = pkgs.writeText "hm-symlinks.txt" hmExcludePatterns; writeConfig = config: - generators.toYAML { } { - location = removeNullValues { - source_directories = config.location.sourceDirectories; - repositories = config.location.repositories; - } // config.location.extraConfig; - storage = removeNullValues { - encryption_passcommand = config.storage.encryptionPasscommand; - } // config.storage.extraConfig; - retention = removeNullValues { - keep_within = config.retention.keepWithin; - keep_secondly = config.retention.keepSecondly; - keep_minutely = config.retention.keepMinutely; - keep_hourly = config.retention.keepHourly; - keep_daily = config.retention.keepDaily; - keep_weekly = config.retention.keepWeekly; - keep_monthly = config.retention.keepMonthly; - keep_yearly = config.retention.keepYearly; - } // config.retention.extraConfig; - consistency = removeNullValues { checks = config.consistency.checks; } - // config.consistency.extraConfig; - output = config.output.extraConfig; - hooks = config.hooks.extraConfig; - }; + generators.toYAML { } (removeNullValues ({ + source_directories = config.location.sourceDirectories; + repositories = config.location.repositories; + encryption_passcommand = config.storage.encryptionPasscommand; + keep_within = config.retention.keepWithin; + keep_secondly = config.retention.keepSecondly; + keep_minutely = config.retention.keepMinutely; + keep_hourly = config.retention.keepHourly; + keep_daily = config.retention.keepDaily; + keep_weekly = config.retention.keepWeekly; + keep_monthly = config.retention.keepMonthly; + keep_yearly = config.retention.keepYearly; + checks = config.consistency.checks; + } // config.location.extraConfig // config.storage.extraConfig + // config.retention.extraConfig // config.consistency.extraConfig + // config.output.extraConfig // config.hooks.extraConfig)); in { meta.maintainers = [ maintainers.DamienCassou ]; diff --git a/third_party/home-manager/modules/programs/broot.nix b/third_party/home-manager/modules/programs/broot.nix index 179b1224d6..6a1680e07f 100644 --- a/third_party/home-manager/modules/programs/broot.nix +++ b/third_party/home-manager/modules/programs/broot.nix @@ -175,6 +175,14 @@ in { ''; }; + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; + package = mkOption { type = types.package; default = pkgs.broot; @@ -226,5 +234,8 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration (shellInit "zsh"); programs.fish.shellInit = mkIf cfg.enableFishIntegration (shellInit "fish"); + + programs.nushell.extraConfig = + mkIf cfg.enableNushellIntegration (shellInit "nushell"); }; } diff --git a/third_party/home-manager/modules/programs/browserpass.nix b/third_party/home-manager/modules/programs/browserpass.nix index 8faf53151b..fd3c5ad5aa 100644 --- a/third_party/home-manager/modules/programs/browserpass.nix +++ b/third_party/home-manager/modules/programs/browserpass.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.programs.browserpass; - browsers = [ "brave" "chrome" "chromium" "firefox" "vivaldi" ]; + browsers = [ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ]; in { options = { programs.browserpass = { @@ -72,6 +72,17 @@ in { "${dir}/com.github.browserpass.native.json".source = "${pkgs.browserpass}/lib/browserpass/hosts/firefox/com.github.browserpass.native.json"; }] + else if x == "librewolf" then + let + dir = if isDarwin then + "Library/Application Support/LibreWolf/NativeMessagingHosts" + else + ".librewolf/native-messaging-hosts"; + in [{ + "${dir}/com.github.browserpass.native.json".source = + "${pkgs.browserpass}/lib/browserpass/hosts/firefox/com.github.browserpass.native.json"; + }] + else if x == "vivaldi" then let dir = if isDarwin then diff --git a/third_party/home-manager/modules/programs/carapace.nix b/third_party/home-manager/modules/programs/carapace.nix new file mode 100644 index 0000000000..c31e2feed5 --- /dev/null +++ b/third_party/home-manager/modules/programs/carapace.nix @@ -0,0 +1,100 @@ +{ config, pkgs, lib, ... }: + +let + + inherit (lib) + mkEnableOption mkPackageOption mkIf pipe fileContents splitString; + cfg = config.programs.carapace; + bin = cfg.package + "/bin/carapace"; + +in { + meta.maintainers = with lib.maintainers; [ weathercold bobvanderlinden ]; + + options.programs.carapace = { + enable = + mkEnableOption "carapace, a multi-shell multi-command argument completer"; + + package = mkPackageOption pkgs "carapace" { }; + + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; + + enableNushellIntegration = mkEnableOption "Nushell integration" // { + default = true; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs = { + bash.initExtra = mkIf cfg.enableBashIntegration '' + source <(${bin} _carapace bash) + ''; + + zsh.initExtra = mkIf cfg.enableZshIntegration '' + source <(${bin} _carapace zsh) + ''; + + fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + ${bin} _carapace fish | source + ''; + + nushell = mkIf cfg.enableNushellIntegration { + # Note, the ${"$"} below is a work-around because xgettext otherwise + # interpret it as a Bash i18n string. + extraEnv = '' + let carapace_cache = "${config.xdg.cacheHome}/carapace" + if not ($carapace_cache | path exists) { + mkdir $carapace_cache + } + ${bin} _carapace nushell | save -f ${"$"}"($carapace_cache)/init.nu" + ''; + extraConfig = '' + source ${config.xdg.cacheHome}/carapace/init.nu + ''; + }; + }; + + xdg.configFile = + mkIf (config.programs.fish.enable && cfg.enableFishIntegration) ( + # Convert the entries from `carapace --list` to empty + # xdg.configFile."fish/completions/NAME.fish" entries. + # + # This is to disable fish builtin completion for each of the + # carapace-supported completions It is in line with the instructions from + # carapace-bin: + # + # carapace --list | awk '{print $1}' | xargs -I{} touch ~/.config/fish/completions/{}.fish + # + # See https://github.com/rsteube/carapace-bin#getting-started + let + carapaceListFile = pkgs.runCommandLocal "carapace-list" { + buildInputs = [ cfg.package ]; + } '' + ${bin} --list > $out + ''; + in pipe carapaceListFile [ + fileContents + (splitString "\n") + (map (builtins.match "^([a-z0-9-]+) .*")) + (builtins.filter + (match: match != null && (builtins.length match) > 0)) + (map (match: builtins.head match)) + (map (name: { + name = "fish/completions/${name}.fish"; + value = { text = ""; }; + })) + builtins.listToAttrs + ]); + }; +} diff --git a/third_party/home-manager/modules/programs/cava.nix b/third_party/home-manager/modules/programs/cava.nix new file mode 100644 index 0000000000..63173248f1 --- /dev/null +++ b/third_party/home-manager/modules/programs/cava.nix @@ -0,0 +1,52 @@ +{ pkgs, config, lib, ... }: + +with lib; + +let + + cfg = config.programs.cava; + + iniFmt = pkgs.formats.ini { }; + +in { + meta.maintainers = [ maintainers.bddvlpr ]; + + options.programs.cava = { + enable = mkEnableOption "Cava audio visualizer"; + + package = mkPackageOption pkgs "cava" { }; + + settings = mkOption { + type = iniFmt.type; + default = { }; + example = literalExpression '' + { + general.framerate = 60; + input.method = "alsa"; + smoothing.noise_reduction = 88; + color = { + background = "'#000000'"; + foreground = "'#FFFFFF'"; + }; + } + ''; + description = '' + Settings to be written to the Cava configuration file. See + for + all available options. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."cava/config" = mkIf (cfg.settings != { }) { + text = '' + ; Generated by Home Manager + + ${generators.toINI { } cfg.settings} + ''; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/chromium.nix b/third_party/home-manager/modules/programs/chromium.nix index 11a1054777..0a02311b7b 100644 --- a/third_party/home-manager/modules/programs/chromium.nix +++ b/third_party/home-manager/modules/programs/chromium.nix @@ -123,6 +123,20 @@ let documentation](https://developer.chrome.com/docs/extensions/mv2/external_extensions). ''; }; + + dictionaries = mkOption { + inherit visible; + type = types.listOf types.package; + default = [ ]; + example = literalExpression '' + [ + pkgs.hunspellDictsChromium.en_US + ] + ''; + description = '' + List of ${name} dictionaries to install. + ''; + }; }; browserConfig = cfg: @@ -159,6 +173,11 @@ let }); }; + dictionary = pkg: { + name = "${configDir}/Dictionaries/${pkg.passthru.dictFileName}"; + value.source = pkg; + }; + package = if cfg.commandLineArgs != [ ] then cfg.package.override { commandLineArgs = concatStringsSep " " cfg.commandLineArgs; @@ -168,8 +187,9 @@ let in mkIf cfg.enable { home.packages = [ package ]; - home.file = optionalAttrs (!isProprietaryChrome) - (listToAttrs (map extensionJson cfg.extensions)); + home.file = optionalAttrs (!isProprietaryChrome) (listToAttrs + ((map extensionJson cfg.extensions) + ++ (map dictionary cfg.dictionaries))); }; in { diff --git a/third_party/home-manager/modules/programs/direnv.nix b/third_party/home-manager/modules/programs/direnv.nix index 23636644a8..fcbc46346c 100644 --- a/third_party/home-manager/modules/programs/direnv.nix +++ b/third_party/home-manager/modules/programs/direnv.nix @@ -24,6 +24,8 @@ in { options.programs.direnv = { enable = mkEnableOption "direnv, the environment switcher"; + package = mkPackageOption pkgs "direnv" { }; + config = mkOption { type = tomlFormat.type; default = { }; @@ -89,12 +91,14 @@ in { enable = mkEnableOption '' [nix-direnv](https://github.com/nix-community/nix-direnv), a fast, persistent use_nix implementation for direnv''; + + package = mkPackageOption pkgs "nix-direnv" { }; }; }; config = mkIf cfg.enable { - home.packages = [ pkgs.direnv ]; + home.packages = [ cfg.package ]; xdg.configFile."direnv/direnv.toml" = mkIf (cfg.config != { }) { source = tomlFormat.generate "direnv-config" cfg.config; @@ -103,41 +107,60 @@ in { xdg.configFile."direnv/direnvrc" = let text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib ++ optional cfg.nix-direnv.enable - "source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc"); + "source ${cfg.nix-direnv.package}/share/nix-direnv/direnvrc"); in mkIf (text != "") { inherit text; }; programs.bash.initExtra = mkIf cfg.enableBashIntegration ( # Using mkAfter to make it more likely to appear after other # manipulations of the prompt. mkAfter '' - eval "$(${pkgs.direnv}/bin/direnv hook bash)" + eval "$(${getExe cfg.package} hook bash)" ''); programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${pkgs.direnv}/bin/direnv hook zsh)" + eval "$(${getExe cfg.package} hook zsh)" ''; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ( # Using mkAfter to make it more likely to appear after other # manipulations of the prompt. mkAfter '' - ${pkgs.direnv}/bin/direnv hook fish | source + ${getExe cfg.package} hook fish | source ''); programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration ( # Using mkAfter to make it more likely to appear after other # manipulations of the prompt. mkAfter '' - $env.config = ($env | default {} config).config - $env.config = ($env.config | default {} hooks) - $env.config = ($env.config | update hooks ($env.config.hooks | default [] pre_prompt)) - $env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { - code: " - let direnv = (${pkgs.direnv}/bin/direnv export json | from json) - let direnv = if ($direnv | length) == 1 { $direnv } else { {} } - $direnv | load-env - " - })) + $env.config = ($env.config? | default {}) + $env.config.hooks = ($env.config.hooks? | default {}) + $env.config.hooks.pre_prompt = ( + $env.config.hooks.pre_prompt? + | default [] + | append {|| + let direnv = (${getExe cfg.package} export json + | from json + | default {}) + if ($direnv | is-empty) { + return + } + $direnv + | items {|key, value| + { + key: $key + value: (do ( + $env.ENV_CONVERSIONS? + | default {} + | get -i $key + | get -i from_string + | default {|x| $x} + ) $value) + } + } + | transpose -ird + | load-env + } + ) ''); }; } diff --git a/third_party/home-manager/modules/programs/emacs.nix b/third_party/home-manager/modules/programs/emacs.nix index dfab66cf19..7f573c79fd 100644 --- a/third_party/home-manager/modules/programs/emacs.nix +++ b/third_party/home-manager/modules/programs/emacs.nix @@ -19,6 +19,7 @@ let userConfig = epkgs.trivialBuild { pname = "default"; src = pkgs.writeText "default.el" cfg.extraConfig; + version = "0.1.0"; packageRequires = packages; }; in packages ++ optional (cfg.extraConfig != "") userConfig; diff --git a/third_party/home-manager/modules/programs/exa.nix b/third_party/home-manager/modules/programs/eza.nix similarity index 60% rename from third_party/home-manager/modules/programs/exa.nix rename to third_party/home-manager/modules/programs/eza.nix index afe83e737f..0c6c5d7e5b 100644 --- a/third_party/home-manager/modules/programs/exa.nix +++ b/third_party/home-manager/modules/programs/eza.nix @@ -3,19 +3,24 @@ with lib; { - meta.maintainers = [ hm.maintainers.kalhauge ]; + imports = let + mkRenamed = opt: + mkRenamedOptionModule [ "programs" "exa" opt ] [ "programs" "eza" opt ]; + in map mkRenamed [ "enable" "enableAliases" "extraOptions" "icons" "git" ]; - options.programs.exa = { - enable = mkEnableOption "exa, a modern replacement for {command}`ls`"; + meta.maintainers = [ maintainers.cafkafk ]; - enableAliases = mkEnableOption "recommended exa aliases (ls, ll…)"; + options.programs.eza = { + enable = mkEnableOption "eza, a modern replacement for {command}`ls`"; + + enableAliases = mkEnableOption "recommended eza aliases (ls, ll…)"; extraOptions = mkOption { type = types.listOf types.str; default = [ ]; example = [ "--group-directories-first" "--header" ]; description = '' - Extra command line options passed to exa. + Extra command line options passed to eza. ''; }; @@ -35,23 +40,23 @@ with lib; ''; }; - package = mkPackageOption pkgs "exa" { }; + package = mkPackageOption pkgs "eza" { }; }; config = let - cfg = config.programs.exa; + cfg = config.programs.eza; args = escapeShellArgs (optional cfg.icons "--icons" ++ optional cfg.git "--git" ++ cfg.extraOptions); aliases = { - exa = "exa ${args}"; + eza = "eza ${args}"; } // optionalAttrs cfg.enableAliases { - ls = "exa"; - ll = "exa -l"; - la = "exa -a"; - lt = "exa --tree"; - lla = "exa -la"; + ls = "eza"; + ll = "eza -l"; + la = "eza -a"; + lt = "eza --tree"; + lla = "eza -la"; }; in mkIf cfg.enable { home.packages = [ cfg.package ]; @@ -63,5 +68,7 @@ with lib; programs.fish.shellAliases = aliases; programs.ion.shellAliases = aliases; + + programs.nushell.shellAliases = aliases; }; } diff --git a/third_party/home-manager/modules/programs/firefox.nix b/third_party/home-manager/modules/programs/firefox.nix index d420f554f0..145a0334ed 100644 --- a/third_party/home-manager/modules/programs/firefox.nix +++ b/third_party/home-manager/modules/programs/firefox.nix @@ -59,6 +59,24 @@ let ${extraPrefs} ''; + mkContainersJson = containers: + let + containerToIdentity = _: container: { + userContextId = container.id; + name = container.name; + icon = container.icon; + color = container.color; + public = true; + }; + in '' + ${builtins.toJSON { + version = 4; + lastUserContextId = + elemAt (mapAttrsToList (_: container: container.id) containers) 0; + identities = mapAttrsToList containerToIdentity containers; + }} + ''; + firefoxBookmarksFile = bookmarks: let indent = level: @@ -68,7 +86,7 @@ let '' ${indent indentLevel}
${ if directory.toolbar then - ''

Bookmarks Toolbar'' + '' +

Bookmarks Toolbar'' else - "

${escapeXML directory.name}" + ''

${escapeXML directory.name}'' }

${indent indentLevel}

${allItemsToHTML (indentLevel + 1) directory.bookmarks} - ${indent indentLevel}

''; + ${indent indentLevel}

''; itemToHTMLOrRecurse = indentLevel: item: if item ? "url" then @@ -108,9 +127,56 @@ let

Bookmarks Menu

${bookmarkEntries} -

+ ''; + mkNoDuplicateAssertion = entities: entityKind: + (let + # Return an attribute set with entity IDs as keys and a list of + # entity names with corresponding ID as value. An ID is present in + # the result only if more than one entity has it. The argument + # entities is a list of AttrSet of one id/name pair. + findDuplicateIds = entities: + filterAttrs (_entityId: entityNames: length entityNames != 1) + (zipAttrs entities); + + duplicates = findDuplicateIds (mapAttrsToList + (entityName: entity: { "${toString entity.id}" = entityName; }) + entities); + + mkMsg = entityId: entityNames: + " - ID ${entityId} is used by " + concatStringsSep ", " entityNames; + in { + assertion = duplicates == { }; + message = '' + Must not have a Firefox ${entityKind} with an existing ID but + '' + concatStringsSep "\n" (mapAttrsToList mkMsg duplicates); + }); + + wrapPackage = package: + let + # The configuration expected by the Firefox wrapper. + fcfg = { enableGnomeExtensions = cfg.enableGnomeExtensions; }; + + # A bit of hackery to force a config into the wrapper. + browserName = + package.browserName or (builtins.parseDrvName package.name).name; + + # The configuration expected by the Firefox wrapper builder. + bcfg = setAttrByPath [ browserName ] fcfg; + + in if package == null then + null + else if isDarwin then + package + else if versionAtLeast config.home.stateVersion "19.09" then + package.override (old: { + cfg = old.cfg or { } // fcfg; + extraPolicies = cfg.policies; + }) + else + (pkgs.wrapFirefox.override { config = bcfg; }) package { }; + in { meta.maintainers = [ maintainers.rycee maintainers.kira-bruneau ]; @@ -146,22 +212,39 @@ in { example = literalExpression '' pkgs.firefox.override { # See nixpkgs' firefox/wrapper.nix to check which options you can use - cfg = { + nativeMessagingHosts = [ # Gnome shell native connector - enableGnomeExtensions = true; + pkgs.gnome-browser-connector # Tridactyl native connector - enableTridactylNative = true; - }; + pkgs.tridactyl-native + ]; } ''; description = '' The Firefox package to use. If state version ≥ 19.09 then this should be a wrapped Firefox package. For earlier state versions it should be an unwrapped Firefox package. - Set to null to disable installing Firefox. + Set to `null` to disable installing Firefox. ''; }; + finalPackage = mkOption { + type = with types; nullOr package; + readOnly = true; + description = "Resulting Firefox package."; + }; + + policies = mkOption { + type = types.attrsOf jsonFormat.type; + default = { }; + description = + "[See list of policies](https://mozilla.github.io/policy-templates/)."; + example = { + DefaultDownloadDirectory = "\${home}/Downloads"; + BlockAboutConfig = true; + }; + }; + profiles = mkOption { type = types.attrsOf (types.submodule ({ config, name, ... }: { options = { @@ -295,7 +378,11 @@ in { toolbar = mkOption { type = types.bool; default = false; - description = "If directory should be shown in toolbar."; + description = '' + Make this the toolbar directory. Note, this does _not_ + mean that this directory will be added to the toolbar, + this directory _is_ the toolbar. + ''; }; }; }) // { @@ -376,6 +463,15 @@ in { ''; }; + privateDefault = mkOption { + type = with types; nullOr str; + default = null; + example = "DuckDuckGo"; + description = '' + The default search engine used in the Private Browsing. + ''; + }; + order = mkOption { type = with types; uniq (listOf str); default = [ ]; @@ -434,6 +530,83 @@ in { }; }; + containers = mkOption { + type = types.attrsOf (types.submodule ({ name, ... }: { + options = { + name = mkOption { + type = types.str; + default = name; + description = "Container name, e.g., shopping."; + }; + + id = mkOption { + type = types.ints.unsigned; + default = 0; + description = '' + Container ID. This should be set to a unique number per container in this profile. + ''; + }; + + # List of colors at + # https://searchfox.org/mozilla-central/rev/5ad226c7379b0564c76dc3b54b44985356f94c5a/toolkit/components/extensions/parent/ext-contextualIdentities.js#32 + color = mkOption { + type = types.enum [ + "blue" + "turquoise" + "green" + "yellow" + "orange" + "red" + "pink" + "purple" + "toolbar" + ]; + default = "pink"; + description = "Container color."; + }; + + icon = mkOption { + type = types.enum [ + "briefcase" + "cart" + "circle" + "dollar" + "fence" + "fingerprint" + "gift" + "vacation" + "food" + "fruit" + "pet" + "tree" + "chill" + ]; + default = "fruit"; + description = "Container icon."; + }; + }; + })); + default = { }; + example = { + "shopping" = { + id = 1; + color = "blue"; + icon = "cart"; + }; + "dangerous" = { + id = 2; + color = "red"; + icon = "fruit"; + }; + }; + description = '' + Attribute set of container configurations. See + [Multi-Account + Containers](https://support.mozilla.org/en-US/kb/containers) + for more information. + ''; + }; + extensions = mkOption { type = types.listOf types.package; default = [ ]; @@ -490,18 +663,10 @@ in { (", namely " + concatStringsSep ", " defaults); }) - (let - duplicates = filterAttrs (_: v: length v != 1) (zipAttrs - (mapAttrsToList (n: v: { "${toString v.id}" = n; }) (cfg.profiles))); - - mkMsg = n: v: " - ID ${n} is used by ${concatStringsSep ", " v}"; - in { - assertion = duplicates == { }; - message = '' - Must not have Firefox profiles with duplicate IDs but - '' + concatStringsSep "\n" (mapAttrsToList mkMsg duplicates); - }) - ]; + (mkNoDuplicateAssertion cfg.profiles "profile") + ] ++ (mapAttrsToList + (_: profile: mkNoDuplicateAssertion profile.containers "container") + cfg.profiles); warnings = optional (cfg.enableGnomeExtensions or false) '' Using 'programs.firefox.enableGnomeExtensions' has been deprecated and @@ -510,24 +675,9 @@ in { its example for how to do this. ''; - home.packages = let - # The configuration expected by the Firefox wrapper. - fcfg = { enableGnomeExtensions = cfg.enableGnomeExtensions; }; + programs.firefox.finalPackage = wrapPackage cfg.package; - # A bit of hackery to force a config into the wrapper. - browserName = cfg.package.browserName or (builtins.parseDrvName - cfg.package.name).name; - - # The configuration expected by the Firefox wrapper builder. - bcfg = setAttrByPath [ browserName ] fcfg; - - package = if isDarwin then - cfg.package - else if versionAtLeast config.home.stateVersion "19.09" then - cfg.package.override (old: { cfg = old.cfg or { } // fcfg; }) - else - (pkgs.wrapFirefox.override { config = bcfg; }) cfg.package { }; - in lib.optional (cfg.package != null) package; + home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage; home.file = mkMerge ([{ "${firefoxConfigPath}/profiles.ini" = @@ -547,9 +697,14 @@ in { mkUserJs profile.settings profile.extraConfig profile.bookmarks; }; + "${profilesPath}/${profile.path}/containers.json" = + mkIf (profile.containers != { }) { + text = mkContainersJson profile.containers; + }; + "${profilesPath}/${profile.path}/search.json.mozlz4" = mkIf - (profile.search.default != null || profile.search.order != [ ] - || profile.search.engines != { }) { + (profile.search.default != null || profile.search.privateDefault != null + || profile.search.order != [ ] || profile.search.engines != { }) { force = profile.search.force; source = let settings = { @@ -640,12 +795,18 @@ in { # engine if it's not in profile.search.engines ${profile.search.default} = profile.search.engines.${profile.search.default} or { }; + } // { + ${profile.search.privateDefault} = + profile.search.engines.${profile.search.privateDefault} or { }; }; in sortEngineConfigs (mapAttrs buildEngineConfig engineInput); metaData = optionalAttrs (profile.search.default != null) { current = profile.search.default; hash = "@hash@"; + } // optionalAttrs (profile.search.privateDefault != null) { + private = profile.search.privateDefault; + privateHash = "@privateHash@"; } // { useSavedOrder = profile.search.order != [ ]; }; @@ -667,14 +828,21 @@ in { profile.path + profile.search.default + disclaimer "Firefox" else null; + + privateSalt = if profile.search.privateDefault != null then + profile.path + profile.search.privateDefault + + disclaimer "Firefox" + else + null; in pkgs.runCommand "search.json.mozlz4" { nativeBuildInputs = with pkgs; [ mozlz4a openssl ]; json = builtins.toJSON settings; - inherit salt; + inherit salt privateSalt; } '' if [[ -n $salt ]]; then export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) - mozlz4a <(substituteStream json search.json.in --subst-var hash) "$out" + export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64) + mozlz4a <(substituteStream json search.json.in --subst-var hash --subst-var privateHash) "$out" else mozlz4a <(echo "$json") "$out" fi diff --git a/third_party/home-manager/modules/programs/fish.nix b/third_party/home-manager/modules/programs/fish.nix index b323846925..7df9704d0e 100644 --- a/third_party/home-manager/modules/programs/fish.nix +++ b/third_party/home-manager/modules/programs/fish.nix @@ -138,9 +138,77 @@ let }; }; - abbrsStr = concatStringsSep "\n" - (mapAttrsToList (k: v: "abbr --add --global -- ${k} ${escapeShellArg v}") - cfg.shellAbbrs); + abbrModule = types.submodule { + options = { + expansion = mkOption { + type = with types; nullOr str; + default = null; + description = '' + The command expanded by an abbreviation. + ''; + }; + + position = mkOption { + type = with types; nullOr str; + default = null; + example = "anywhere"; + description = '' + If the position is "command", the abbreviation expands only if + the position is a command. If it is "anywhere", the abbreviation + expands anywhere. + ''; + }; + + regex = mkOption { + type = with types; nullOr str; + default = null; + description = '' + The regular expression pattern matched instead of the literal name. + ''; + }; + + setCursor = mkOption { + type = with types; (either bool str); + default = false; + description = '' + The marker indicates the position of the cursor when the abbreviation + is expanded. When setCursor is true, the marker is set with a default + value of "%". + ''; + }; + + function = mkOption { + type = with types; nullOr str; + default = null; + description = '' + The fish function expanded instead of a literal string. + ''; + }; + }; + }; + + abbrsStr = concatStringsSep "\n" (mapAttrsToList (name: def: + let + mods = with def; + cli.toGNUCommandLineShell { + mkOption = k: v: + if v == null then + [ ] + else if k == "set-cursor" then + [ "--${k}=${lib.generators.mkValueStringDefault { } v}" ] + else [ + "--${k}" + (lib.generators.mkValueStringDefault { } v) + ]; + } { + inherit position regex function; + set-cursor = setCursor; + }; + modifiers = if isAttrs def then mods else ""; + expansion = if isAttrs def then def.expansion else def; + in "abbr --add ${modifiers} -- ${name}" + + optionalString (expansion != null) " ${escapeShellArg expansion}") + cfg.shellAbbrs); aliasesStr = concatStringsSep "\n" (mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases); @@ -154,9 +222,11 @@ let translatedSessionVariables = pkgs.runCommandLocal "hm-session-vars.fish" { } '' + (echo "function setup_hm_session_vars;" ${pkgs.buildPackages.babelfish}/bin/babelfish \ - <${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh \ - >$out + <${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh + echo "end" + echo "setup_hm_session_vars") > $out ''; in { @@ -199,12 +269,18 @@ in { }; shellAbbrs = mkOption { - type = with types; attrsOf str; + type = with types; attrsOf (either str abbrModule); default = { }; - example = { - l = "less"; - gco = "git checkout"; - }; + example = literalExpression '' + { + l = "less"; + gco = "git checkout"; + "-C" = { + position = "anywhere"; + expansion = "--color"; + }; + } + ''; description = '' An attribute set that maps aliases (the top level attribute names in this option) to abbreviations. Abbreviations are expanded with @@ -320,24 +396,29 @@ in { ${postBuild} ''; - generateCompletions = package: - pkgs.runCommand "${package.name}-fish-completions" { - srcs = [ package ] ++ filter (p: p != null) - (builtins.map (outName: package.${outName} or null) - config.home.extraOutputsToInstall); - nativeBuildInputs = [ pkgs.python3 ]; - buildInputs = [ cfg.package ]; - preferLocalBuild = true; - } '' - mkdir -p $out - for src in $srcs; do - if [ -d $src/share/man ]; then - find -L $src/share/man -type f \ - | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ - > /dev/null - fi - done - ''; + generateCompletions = let + getName = attrs: + attrs.name or "${attrs.pname or "«pname-missing»"}-${ + attrs.version or "«version-missing»" + }"; + in package: + pkgs.runCommand "${getName package}-fish-completions" { + srcs = [ package ] ++ filter (p: p != null) + (builtins.map (outName: package.${outName} or null) + config.home.extraOutputsToInstall); + nativeBuildInputs = [ pkgs.python3 ]; + buildInputs = [ cfg.package ]; + preferLocalBuild = true; + } '' + mkdir -p $out + for src in $srcs; do + if [ -d $src/share/man ]; then + find -L $src/share/man -type f \ + | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ + > /dev/null + fi + done + ''; in destructiveSymlinkJoin { name = "${config.home.username}-fish-completions"; paths = diff --git a/third_party/home-manager/modules/programs/fzf.nix b/third_party/home-manager/modules/programs/fzf.nix index 7544c1eff1..062df18645 100644 --- a/third_party/home-manager/modules/programs/fzf.nix +++ b/third_party/home-manager/modules/programs/fzf.nix @@ -190,8 +190,9 @@ in { fi ''); - programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - source ${cfg.package}/share/fzf/key-bindings.fish && fzf_key_bindings - ''; + programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration + (mkOrder 200 '' + source ${cfg.package}/share/fzf/key-bindings.fish && fzf_key_bindings + ''); }; } diff --git a/third_party/home-manager/modules/programs/gh.nix b/third_party/home-manager/modules/programs/gh.nix index 526010a50b..bdd939deee 100644 --- a/third_party/home-manager/modules/programs/gh.nix +++ b/third_party/home-manager/modules/programs/gh.nix @@ -126,7 +126,28 @@ in { home.packages = [ cfg.package ]; xdg.configFile."gh/config.yml".source = - yamlFormat.generate "gh-config.yml" cfg.settings; + yamlFormat.generate "gh-config.yml" ({ version = "1"; } // cfg.settings); + + # Version 2.40.0+ of gh needs to migrate account formats, this needs to + # happen before the version = 1 is placed in the configuration file. Running + # `gh help` is sufficient to perform the migration. If the migration already + # has occurred, then this is a no-op. + # + # See https://github.com/nix-community/home-manager/issues/4744 for details. + home.activation.migrateGhAccounts = + let ghHosts = "${config.xdg.configHome}/gh/hosts.yml"; + in hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' + if [[ ! -L "${ghHosts}" && -f "${ghHosts}" ]]; then + ( + TMP_DIR=$(mktemp -d) + trap "rm --force --recursive $TMP_DIR" EXIT + cp "${ghHosts}" $TMP_DIR/ + export GH_CONFIG_DIR=$TMP_DIR + $DRY_RUN_CMD ${getExe cfg.package} help 2>&1 > $DRY_RUN_NULL + cp $TMP_DIR/hosts.yml "${ghHosts}" + ) + fi + ''; programs.git.extraConfig.credential = mkIf cfg.gitCredentialHelper.enable (builtins.listToAttrs (map (host: diff --git a/third_party/home-manager/modules/programs/git.nix b/third_party/home-manager/modules/programs/git.nix index b9aca2db3b..53728060a2 100644 --- a/third_party/home-manager/modules/programs/git.nix +++ b/third_party/home-manager/modules/programs/git.nix @@ -6,50 +6,6 @@ let cfg = config.programs.git; - # create [section "subsection"] keys from "section.subsection" attrset names - mkSectionName = name: - let - containsQuote = strings.hasInfix ''"'' name; - sections = splitString "." name; - section = head sections; - subsections = tail sections; - subsection = concatStringsSep "." subsections; - in if containsQuote || subsections == [ ] then - name - else - ''${section} "${subsection}"''; - - mkValueString = v: - let - escapedV = '' - "${ - replaceStrings [ "\n" " " ''"'' "\\" ] [ "\\n" "\\t" ''\"'' "\\\\" ] v - }"''; - in generators.mkValueStringDefault { } (if isString v then escapedV else v); - - # generation for multiple ini values - mkKeyValue = k: v: - let - mkKeyValue = - generators.mkKeyValueDefault { inherit mkValueString; } " = " k; - in concatStringsSep "\n" (map (kv: " " + mkKeyValue kv) (toList v)); - - # converts { a.b.c = 5; } to { "a.b".c = 5; } for toINI - gitFlattenAttrs = let - recurse = path: value: - if isAttrs value then - mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value - else if length path > 1 then { - ${concatStringsSep "." (reverseList (tail path))}.${head path} = value; - } else { - ${head path} = value; - }; - in attrs: foldl recursiveUpdate { } (flatten (recurse [ ] attrs)); - - gitToIni = attrs: - let toIni = generators.toINI { inherit mkKeyValue mkSectionName; }; - in toIni (gitFlattenAttrs attrs); - gitIniType = with types; let primitiveType = either str (either bool int); @@ -137,7 +93,7 @@ let }; config.path = mkIf (config.contents != { }) (mkDefault (pkgs.writeText (hm.strings.storeFileName config.contentSuffix) - (gitToIni config.contents))); + (generators.toGitINI config.contents))); }); in { @@ -415,7 +371,7 @@ in { }; xdg.configFile = { - "git/config".text = gitToIni cfg.iniContent; + "git/config".text = generators.toGitINI cfg.iniContent; "git/ignore" = mkIf (cfg.ignores != [ ]) { text = concatStringsSep "\n" cfg.ignores + "\n"; @@ -502,8 +458,8 @@ in { } else { include.path = "${path}"; }; - in mkAfter - (concatStringsSep "\n" (map gitToIni (map include cfg.includes))); + in mkAfter (concatStringsSep "\n" + (map generators.toGitINI (map include cfg.includes))); }) (mkIf cfg.lfs.enable { diff --git a/third_party/home-manager/modules/programs/gradle.nix b/third_party/home-manager/modules/programs/gradle.nix new file mode 100644 index 0000000000..9a060581ae --- /dev/null +++ b/third_party/home-manager/modules/programs/gradle.nix @@ -0,0 +1,116 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.programs.gradle; + defaultHomeDirectory = ".gradle"; + settingsFormat = pkgs.formats.javaProperties { }; + + initScript = types.submodule ({ name, config, ... }: { + options = { + text = mkOption { + type = types.nullOr types.lines; + default = null; + description = '' + Text of the init script file. if this option is null + then `source` must be set. + ''; + }; + + source = mkOption { + type = types.path; + description = '' + Path of the init script file. If + `text` is non-null then this option will automatically point + to a file containing that text. + ''; + }; + }; + + config.source = mkIf (config.text != null) (mkDefault (pkgs.writeTextFile { + inherit (config) text; + name = hm.strings.storeFileName name; + })); + }); +in { + meta.maintainers = [ + # maintainers.britter + ]; + + options.programs.gradle = { + enable = mkEnableOption "Gradle Build Tool"; + + home = mkOption { + type = types.str; + default = defaultHomeDirectory; + description = '' + The Gradle home directory, relative to [](#opt-home.homeDirectory). + + If set, the {env}`GRADLE_USER_HOME` environment variable will be + set accordingly. Defaults to {file}`.gradle`. + ''; + }; + + package = mkPackageOption pkgs "gradle" { example = "pkgs.gradle_7"; }; + + settings = mkOption { + type = types.submodule { freeformType = settingsFormat.type; }; + default = { }; + example = literalExpression '' + { + "org.gradle.caching" = true; + "org.gradle.parallel" = true; + "org.gradle.jvmargs" = "-XX:MaxMetaspaceSize=384m"; + "org.gradle.home" = pkgs.jdk17; + }; + ''; + description = '' + Key value pairs to write to {file}`gradle.properties` in the Gradle + home directory. + ''; + }; + + initScripts = mkOption { + type = with types; attrsOf initScript; + default = { }; + example = literalExpression '' + { + "maven-local.gradle".text = ''' + allProject { + repositories { + mavenLocal() + } + } + '''; + "another.init.gradle.kts".source = ./another.init.gradle.kts; + } + ''; + description = '' + Definition of init scripts to link into the Gradle home directory. + + For more information about init scripts, including naming conventions + see https://docs.gradle.org/current/userguide/init_scripts.html. + ''; + }; + }; + + config = let gradleHome = "${config.home.homeDirectory}/${cfg.home}"; + in mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.file = mkMerge ([{ + "${cfg.home}/gradle.properties" = mkIf (cfg.settings != { }) { + source = settingsFormat.generate "gradle.properties" cfg.settings; + }; + }] + ++ mapAttrsToList (k: v: { "${cfg.home}/init.d/${k}".source = v.source; }) + cfg.initScripts); + + home.sessionVariables = mkIf (cfg.home != defaultHomeDirectory) { + GRADLE_USER_HOME = gradleHome; + }; + + programs.java.enable = true; + }; +} diff --git a/third_party/home-manager/modules/programs/granted.nix b/third_party/home-manager/modules/programs/granted.nix new file mode 100644 index 0000000000..a091692509 --- /dev/null +++ b/third_party/home-manager/modules/programs/granted.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.granted; + package = pkgs.granted; + +in { + meta.maintainers = [ hm.maintainers.wcarlsen ]; + + options.programs.granted = { + enable = mkEnableOption "granted"; + + enableZshIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Zsh integration. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ package ]; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + function assume() { + export GRANTED_ALIAS_CONFIGURED="true" + source ${package}/bin/.assume-wrapped "$@" + unset GRANTED_ALIAS_CONFIGURED + } + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/helix.nix b/third_party/home-manager/modules/programs/helix.nix index e8390ffd63..9c5519f3ba 100644 --- a/third_party/home-manager/modules/programs/helix.nix +++ b/third_party/home-manager/modules/programs/helix.nix @@ -18,6 +18,13 @@ in { description = "The package to use for helix."; }; + extraPackages = mkOption { + type = with types; listOf package; + default = [ ]; + example = literalExpression "[ pkgs.marksman ]"; + description = "Extra packages available to hx."; + }; + defaultEditor = mkOption { type = types.bool; default = false; @@ -161,7 +168,22 @@ in { }; config = mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = if cfg.extraPackages != [ ] then + [ + (pkgs.symlinkJoin { + name = + "${lib.getName cfg.package}-wrapped-${lib.getVersion cfg.package}"; + paths = [ cfg.package ]; + preferLocalBuild = true; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/hx \ + --prefix PATH : ${lib.makeBinPath cfg.extraPackages} + ''; + }) + ] + else + [ cfg.package ]; home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "hx"; }; diff --git a/third_party/home-manager/modules/programs/i3blocks.nix b/third_party/home-manager/modules/programs/i3blocks.nix new file mode 100644 index 0000000000..e3d8d68128 --- /dev/null +++ b/third_party/home-manager/modules/programs/i3blocks.nix @@ -0,0 +1,114 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.i3blocks; + + # Re-make the atom type for the INI files. + # For some reason, the normal INI type seems to be incompatible with + # DAG + configAtomType = let + # Keep the INI atom type here + optType = with types; (nullOr (oneOf [ int bool str float ])); + in types.mkOptionType { + name = "INI config atom"; + description = "INI atom (null, int, bool, string, or float)"; + check = x: optType.check x; + merge = (loc: defs: (optType.merge loc defs)); + }; + + # Create the type of the actual config type + configType = types.attrsOf configAtomType; + + # The INI generator + mkIni = generators.toINI { }; + +in { + meta.maintainers = [ maintainers.noodlez1232 ]; + + options.programs.i3blocks = { + enable = mkEnableOption "i3blocks i3 status command scheduler"; + + package = mkOption { + type = types.package; + default = pkgs.i3blocks; + defaultText = literalExpression "pkgs.i3blocks"; + description = "Package providing {command}`i3blocks`."; + }; + + bars = mkOption { + type = with types; attrsOf (hm.types.dagOf configType); + description = "Configuration written to i3blocks config"; + example = literalExpression '' + { + top = { + # The title block + title = { + interval = "persist"; + command = "xtitle -s"; + }; + }; + bottom = { + time = { + command = "date +%r"; + interval = 1; + }; + # Make sure this block comes after the time block + date = lib.hm.dag.entryAfter [ "time" ] { + command = "date +%d"; + interval = 5; + }; + # And this block after the example block + example = lib.hm.dag.entryAfter [ "date" ] { + command = "echo hi $(date +%s)"; + interval = 3; + }; + }; + }''; + }; + }; + + config = let + # A function to create the file that will be put into the XDG config home. + makeFile = config: + let + # Takes a singular name value pair and turns it into an attrset + nameValuePairToAttr = value: (builtins.listToAttrs [ value ]); + # Converts a dag entry to a name-value pair + dagEntryToNameValue = entry: (nameValuePair entry.name entry.data); + + # Try to sort the blocks + trySortedBlocks = hm.dag.topoSort config; + + # Get the blocks if successful, abort if not + blocks = if trySortedBlocks ? result then + trySortedBlocks.result + else + abort + "Dependency cycle in i3blocks: ${builtins.toJSON trySortedBlocks}"; + + # Turn the blocks back into their name value pairs + orderedBlocks = + (map (value: (nameValuePairToAttr (dagEntryToNameValue value))) + blocks); + in { + # We create an "INI" file for each bar, then append them all in order + text = concatStringsSep "\n" (map (value: (mkIni value)) orderedBlocks); + }; + + # Make our config (if enabled + in mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "programs.i3blocks" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile = (mapAttrs' + (name: value: nameValuePair "i3blocks/${name}" (makeFile value)) + cfg.bars); + }; +} diff --git a/third_party/home-manager/modules/programs/i3status-rust.nix b/third_party/home-manager/modules/programs/i3status-rust.nix index c5c020cb44..d9894f62e7 100644 --- a/third_party/home-manager/modules/programs/i3status-rust.nix +++ b/third_party/home-manager/modules/programs/i3status-rust.nix @@ -246,11 +246,8 @@ in { xdg.configFile = mapAttrs' (cfgFileSuffix: cfgBar: nameValuePair ("i3status-rust/config-${cfgFileSuffix}.toml") ({ - onChange = mkIf config.xsession.windowManager.i3.enable '' - i3Socket="''${XDG_RUNTIME_DIR:-/run/user/$UID}/i3/ipc-socket.*" - if [[ -S $i3Socket ]]; then - ${config.xsession.windowManager.i3.package}/bin/i3-msg -s $i3Socket restart >/dev/null - fi + onChange = '' + ${pkgs.procps}/bin/pkill -u $USER -USR2 i3status-rs || true ''; source = settingsFormat.generate ("config-${cfgFileSuffix}.toml") ({ diff --git a/third_party/home-manager/modules/programs/just.nix b/third_party/home-manager/modules/programs/just.nix index 79006a51da..5d78a67b19 100644 --- a/third_party/home-manager/modules/programs/just.nix +++ b/third_party/home-manager/modules/programs/just.nix @@ -1,22 +1,16 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.programs.just; - -in { - meta.maintainers = [ hm.maintainers.maximsmol ]; +{ lib, ... }: +{ imports = let msg = '' 'program.just' is deprecated, simply add 'pkgs.just' to 'home.packages' instead. See https://github.com/nix-community/home-manager/issues/3449#issuecomment-1329823502''; - in [ - (mkRemovedOptionModule [ "programs" "just" "enable" ] msg) - (mkRemovedOptionModule [ "programs" "just" "enableBashIntegration" ] msg) - (mkRemovedOptionModule [ "programs" "just" "enableZshIntegration" ] msg) - (mkRemovedOptionModule [ "programs" "just" "enableFishIntegration" ] msg) + + removed = opt: lib.mkRemovedOptionModule [ "programs" "just" opt ] msg; + in map removed [ + "enable" + "enableBashIntegration" + "enableZshIntegration" + "enableFishIntegration" ]; } diff --git a/third_party/home-manager/modules/programs/k9s.nix b/third_party/home-manager/modules/programs/k9s.nix index b32769cc04..43de8f79c8 100644 --- a/third_party/home-manager/modules/programs/k9s.nix +++ b/third_party/home-manager/modules/programs/k9s.nix @@ -8,7 +8,7 @@ let yamlFormat = pkgs.formats.yaml { }; in { - meta.maintainers = [ hm.maintainers.katexochen ]; + meta.maintainers = with maintainers; [ katexochen liyangau ]; options.programs.k9s = { enable = @@ -20,10 +20,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Configuration written to - {file}`$XDG_CONFIG_HOME/k9s/config.yml`. See - - for supported values. + Configuration written to {file}`$XDG_CONFIG_HOME/k9s/config.yml`. See + for supported values. ''; example = literalExpression '' k9s = { @@ -36,10 +34,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Skin written to - {file}`$XDG_CONFIG_HOME/k9s/skin.yml`. See - - for supported values. + Skin written to {file}`$XDG_CONFIG_HOME/k9s/skin.yml`. See + for supported values. ''; example = literalExpression '' k9s = { @@ -49,6 +45,99 @@ in { }; ''; }; + + aliases = mkOption { + type = yamlFormat.type; + default = { }; + description = '' + Aliases written to {file}`$XDG_CONFIG_HOME/k9s/aliases.yml`. See + for supported values. + ''; + example = literalExpression '' + alias = { + # Use pp as an alias for Pod + pp = "v1/pods"; + }; + ''; + }; + + hotkey = mkOption { + type = yamlFormat.type; + default = { }; + description = '' + Hotkeys written to {file}`$XDG_CONFIG_HOME/k9s/hotkey.yml`. See + for supported values. + ''; + example = literalExpression '' + hotkey = { + # Make sure this is camel case + hotKey = { + shift-0 = { + shortCut = "Shift-0"; + description = "Viewing pods"; + command = "pods"; + }; + }; + }; + ''; + }; + + plugin = mkOption { + type = yamlFormat.type; + default = { }; + description = '' + Plugins written to {file}`$XDG_CONFIG_HOME/k9s/plugin.yml`. See + for supported values. + ''; + example = literalExpression '' + plugin = { + # Defines a plugin to provide a `ctrl-l` shortcut to + # tail the logs while in pod view. + fred = { + shortCut = "Ctrl-L"; + description = "Pod logs"; + scopes = [ "po" ]; + command = "kubectl"; + background = false; + args = [ + "logs" + "-f" + "$NAME" + "-n" + "$NAMESPACE" + "--context" + "$CLUSTER" + ]; + }; + }; + ''; + }; + + views = mkOption { + type = yamlFormat.type; + default = { }; + description = '' + Resource column views written to {file}`$XDG_CONFIG_HOME/k9s/views.yml`. + See for supported values. + ''; + example = literalExpression '' + k9s = { + views = { + "v1/pods" = { + columns = [ + "AGE" + "NAMESPACE" + "NAME" + "IP" + "NODE" + "STATUS" + "READY" + ]; + }; + }; + }; + ''; + }; }; config = mkIf cfg.enable { @@ -61,5 +150,21 @@ in { xdg.configFile."k9s/skin.yml" = mkIf (cfg.skin != { }) { source = yamlFormat.generate "k9s-skin" cfg.skin; }; + + xdg.configFile."k9s/aliases.yml" = mkIf (cfg.aliases != { }) { + source = yamlFormat.generate "k9s-aliases" cfg.aliases; + }; + + xdg.configFile."k9s/hotkey.yml" = mkIf (cfg.hotkey != { }) { + source = yamlFormat.generate "k9s-hotkey" cfg.hotkey; + }; + + xdg.configFile."k9s/plugin.yml" = mkIf (cfg.plugin != { }) { + source = yamlFormat.generate "k9s-plugin" cfg.plugin; + }; + + xdg.configFile."k9s/views.yml" = mkIf (cfg.views != { }) { + source = yamlFormat.generate "k9s-views" cfg.views; + }; }; } diff --git a/third_party/home-manager/modules/programs/keychain.nix b/third_party/home-manager/modules/programs/keychain.nix index d59855f552..4aeef41328 100644 --- a/third_party/home-manager/modules/programs/keychain.nix +++ b/third_party/home-manager/modules/programs/keychain.nix @@ -117,7 +117,10 @@ in { eval "$(SHELL=zsh ${shellCommand})" ''; programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration '' - ${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env + let keychain_shell_command = (SHELL=bash ${shellCommand}| parse -r '(\w+)=(.*); export \1' | transpose -ird) + if not ($keychain_shell_command|is-empty) { + $keychain_shell_command | load-env + } ''; xsession.initExtra = mkIf cfg.enableXsessionIntegration '' eval "$(SHELL=bash ${shellCommand})" diff --git a/third_party/home-manager/modules/programs/khal.nix b/third_party/home-manager/modules/programs/khal.nix index 56a7d389f8..8fc0e0892f 100644 --- a/third_party/home-manager/modules/programs/khal.nix +++ b/third_party/home-manager/modules/programs/khal.nix @@ -7,6 +7,8 @@ let cfg = config.programs.khal; + iniFormat = pkgs.formats.ini { }; + khalCalendarAccounts = filterAttrs (_: a: a.khal.enable) config.accounts.calendar.accounts; @@ -147,6 +149,7 @@ let in { options.programs.khal = { enable = mkEnableOption "khal, a CLI calendar application"; + locale = mkOption { type = lib.types.submodule { options = localeOptions; }; description = '' @@ -154,6 +157,25 @@ in { ''; default = { }; }; + + settings = mkOption { + type = iniFormat.type; + default = { }; + example = literalExpression '' + { + default = { + default_calendar = "Calendar"; + timedelta = "5d"; + }; + view = { + agenda_event_format = + "{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset}"; + }; + }''; + description = '' + Configuration options to add to the various sections in the configuration file. + ''; + }; }; config = mkIf cfg.enable { @@ -161,7 +183,7 @@ in { xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ] ++ mapAttrsToList genCalendarStr khalAccounts ++ [ - (generators.toINI { } { + (generators.toINI { } (recursiveUpdate cfg.settings { locale = definedAttrs (cfg.locale // { _module = null; }); default = optionalAttrs (!isNull primaryAccount) { @@ -171,7 +193,7 @@ in { else primaryAccount.primaryCollection; }; - }) + })) ]); }; } diff --git a/third_party/home-manager/modules/programs/khard.nix b/third_party/home-manager/modules/programs/khard.nix new file mode 100644 index 0000000000..a3e73fb076 --- /dev/null +++ b/third_party/home-manager/modules/programs/khard.nix @@ -0,0 +1,88 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.programs.khard; + + accounts = + lib.filterAttrs (_: acc: acc.khard.enable) config.accounts.contact.accounts; + + renderSettings = with lib.generators; + toINI { + mkKeyValue = mkKeyValueDefault rec { + mkValueString = v: + if lib.isList v then + lib.concatStringsSep ", " v + else if lib.isBool v then + if v then "yes" else "no" + else + v; + } "="; + }; +in { + meta.maintainers = + [ lib.hm.maintainers.olmokramer lib.maintainers.antonmosich ]; + + options = { + programs.khard = { + enable = lib.mkEnableOption "Khard: an address book for the Unix console"; + + settings = lib.mkOption { + type = with lib.types; + submodule { + freeformType = let primOrList = oneOf [ bool str (listOf str) ]; + in attrsOf (attrsOf primOrList); + + options.general.default_action = lib.mkOption { + type = str; + default = "list"; + description = "The default action to execute."; + }; + }; + default = { }; + description = '' + Khard settings. See + + for more information. + ''; + example = lib.literalExpression '' + { + general = { + default_action = "list"; + editor = ["vim" "-i" "NONE"]; + }; + + "contact table" = { + display = "formatted_name"; + preferred_phone_number_type = ["pref" "cell" "home"]; + preferred_email_address_type = ["pref" "work" "home"]; + }; + + vcard = { + private_objects = ["Jabber" "Skype" "Twitter"]; + }; + } + ''; + }; + }; + + accounts.contact.accounts = lib.mkOption { + type = with lib.types; + attrsOf (submodule { + options.khard.enable = lib.mkEnableOption "khard access"; + }); + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ pkgs.khard ]; + + xdg.configFile."khard/khard.conf".text = '' + [addressbooks] + ${lib.concatMapStringsSep "\n" (acc: '' + [[${acc.name}]] + path = ${acc.local.path} + '') (lib.attrValues accounts)} + + ${renderSettings cfg.settings} + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/lsd.nix b/third_party/home-manager/modules/programs/lsd.nix index 59a51a12a2..c333918a88 100644 --- a/third_party/home-manager/modules/programs/lsd.nix +++ b/third_party/home-manager/modules/programs/lsd.nix @@ -45,6 +45,26 @@ in { for supported values. ''; }; + + colors = mkOption { + type = yamlFormat.type; + default = { }; + example = { + size = { + none = "grey"; + small = "yellow"; + large = "dark_yellow"; + }; + }; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/lsd/colors.yaml`. See + for + supported colors. + + If this option is non-empty then the `color.theme` option is + automatically set to `"custom"`. + ''; + }; }; config = mkIf cfg.enable { @@ -56,6 +76,13 @@ in { programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.lsd = + mkIf (cfg.colors != { }) { settings.color.theme = "custom"; }; + + xdg.configFile."lsd/colors.yaml" = mkIf (cfg.colors != { }) { + source = yamlFormat.generate "lsd-colors" cfg.colors; + }; + xdg.configFile."lsd/config.yaml" = mkIf (cfg.settings != { }) { source = yamlFormat.generate "lsd-config" cfg.settings; }; diff --git a/third_party/home-manager/modules/programs/msmtp.nix b/third_party/home-manager/modules/programs/msmtp.nix index 2a4d6b788b..33973aff25 100644 --- a/third_party/home-manager/modules/programs/msmtp.nix +++ b/third_party/home-manager/modules/programs/msmtp.nix @@ -51,6 +51,13 @@ in { programs.msmtp = { enable = mkEnableOption "msmtp"; + package = mkOption { + type = types.package; + default = pkgs.msmtp; + defaultText = literalExpression "pkgs.msmtp"; + description = "The msmtp package to use."; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -81,7 +88,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.msmtp ]; + home.packages = [ cfg.package ]; xdg.configFile."msmtp/config".text = configFile msmtpAccounts; diff --git a/third_party/home-manager/modules/programs/neomutt.nix b/third_party/home-manager/modules/programs/neomutt.nix index 65f3144f4a..968036f27e 100644 --- a/third_party/home-manager/modules/programs/neomutt.nix +++ b/third_party/home-manager/modules/programs/neomutt.nix @@ -118,7 +118,8 @@ let sendmail = "'${neomutt.sendMailCommand}'"; } else let - smtpProto = if smtp.tls.enable then "smtps" else "smtp"; + smtpProto = + if smtp.tls.enable && !smtp.tls.useStartTls then "smtps" else "smtp"; smtpPort = if smtp.port != null then ":${toString smtp.port}" else ""; smtpBaseUrl = "${smtpProto}://${escape userName}@${smtp.host}${smtpPort}"; @@ -217,7 +218,9 @@ let }"; in '' # Generated by Home Manager. - set ssl_force_tls = yes + set ssl_force_tls = ${ + lib.hm.booleans.yesNo (smtp.tls.enable || smtp.tls.useStartTls) + } set certificate_file=${toString config.accounts.email.certificatesFile} # GPG section diff --git a/third_party/home-manager/modules/programs/neovim.nix b/third_party/home-manager/modules/programs/neovim.nix index f5162f82d8..a3b87ea24e 100644 --- a/third_party/home-manager/modules/programs/neovim.nix +++ b/third_party/home-manager/modules/programs/neovim.nix @@ -237,7 +237,6 @@ in { finalPackage = mkOption { type = types.package; - visible = false; readOnly = true; description = "Resulting customized neovim package."; }; diff --git a/third_party/home-manager/modules/programs/nix-index.nix b/third_party/home-manager/modules/programs/nix-index.nix index 49f4b52e34..cdf3151c67 100644 --- a/third_party/home-manager/modules/programs/nix-index.nix +++ b/third_party/home-manager/modules/programs/nix-index.nix @@ -48,7 +48,7 @@ in { ''; # See https://github.com/bennofs/nix-index/issues/126 - programs.fish.shellInit = let + programs.fish.interactiveShellInit = let wrapper = pkgs.writeScript "command-not-found" '' #!${pkgs.bash}/bin/bash source ${cfg.package}/etc/profile.d/command-not-found.sh diff --git a/third_party/home-manager/modules/programs/offlineimap-accounts.nix b/third_party/home-manager/modules/programs/offlineimap-accounts.nix index afc7a01997..bbbc057a9c 100644 --- a/third_party/home-manager/modules/programs/offlineimap-accounts.nix +++ b/third_party/home-manager/modules/programs/offlineimap-accounts.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: with lib; diff --git a/third_party/home-manager/modules/programs/offlineimap.nix b/third_party/home-manager/modules/programs/offlineimap.nix index e3a47817fe..1a1845c0ff 100644 --- a/third_party/home-manager/modules/programs/offlineimap.nix +++ b/third_party/home-manager/modules/programs/offlineimap.nix @@ -17,22 +17,6 @@ let in "${key} = ${value'}"; }; - # Generates a script to fetch only a specific account. - # - # Note, these scripts are not actually created and installed at the - # moment. It will need some thinking on whether this is a good idea - # and whether other modules should have some similar functionality. - # - # Perhaps have a single tool `email` that wraps the command? - # Something like - # - # $ email - genOfflineImapScript = account: - with account; - pkgs.writeShellScriptBin "offlineimap-${name}" '' - exec ${cfg.package}/bin/offlineimap -a${account.name} "$@" - ''; - accountStr = account: with account; let diff --git a/third_party/home-manager/modules/programs/oh-my-posh.nix b/third_party/home-manager/modules/programs/oh-my-posh.nix index 1c6941caad..8c46a1c699 100644 --- a/third_party/home-manager/modules/programs/oh-my-posh.nix +++ b/third_party/home-manager/modules/programs/oh-my-posh.nix @@ -70,6 +70,14 @@ in { Whether to enable Fish integration. ''; }; + + enableNushellIntegration = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable Nushell integration. + ''; + }; }; config = mkIf cfg.enable { @@ -90,5 +98,18 @@ in { programs.fish.shellInit = mkIf cfg.enableFishIntegration '' ${cfg.package}/bin/oh-my-posh init fish ${configArgument} | source ''; + + programs.nushell = mkIf cfg.enableNushellIntegration { + extraEnv = '' + let oh_my_posh_cache = "${config.xdg.cacheHome}/oh-my-posh" + if not ($oh_my_posh_cache | path exists) { + mkdir $oh_my_posh_cache + } + ${cfg.package}/bin/oh-my-posh init nu ${configArgument} --print | save --force ${config.xdg.cacheHome}/oh-my-posh/init.nu + ''; + extraConfig = '' + source ${config.xdg.cacheHome}/oh-my-posh/init.nu + ''; + }; }; } diff --git a/third_party/home-manager/modules/programs/openstackclient.nix b/third_party/home-manager/modules/programs/openstackclient.nix new file mode 100644 index 0000000000..98d68a2f2f --- /dev/null +++ b/third_party/home-manager/modules/programs/openstackclient.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.openstackclient; + yamlFormat = pkgs.formats.yaml { }; +in { + meta.maintainers = [ lib.hm.maintainers.tensor5 ]; + + options.programs.openstackclient = { + enable = lib.mkEnableOption "OpenStack command-line client"; + + package = lib.mkPackageOption pkgs "openstackclient" { }; + + clouds = lib.mkOption { + type = lib.types.submodule { freeformType = yamlFormat.type; }; + default = { }; + example = lib.literalExpression '' + { + my-infra = { + cloud = "example-cloud"; + auth = { + project_id = "0123456789abcdef0123456789abcdef"; + username = "openstack"; + }; + region_name = "XXX"; + interface = "internal"; + }; + } + ''; + description = '' + Configuration needed to connect to one or more clouds. + + Do not include passwords here as they will be publicly readable in the Nix store. + Configuration written to {file}`$XDG_CONFIG_HOME/openstack/clouds.yaml`. + See . + ''; + }; + + publicClouds = lib.mkOption { + type = lib.types.submodule { freeformType = yamlFormat.type; }; + default = { }; + example = lib.literalExpression '' + { + example-cloud = { + auth = { + auth_url = "https://identity.cloud.example.com/v2.0"; + }; + }; + }; + ''; + description = '' + Public information about clouds. + + Configuration written to {file}`$XDG_CONFIG_HOME/openstack/clouds-public.yaml`. + See . + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."openstack/clouds.yaml".source = yamlFormat.generate + "openstackclient-clouds-yaml-${config.home.username}" { + clouds = cfg.clouds; + }; + + xdg.configFile."openstack/clouds-public.yaml".source = yamlFormat.generate + "openstackclient-clouds-public-yaml-${config.home.username}" { + public-clouds = cfg.publicClouds; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/pqiv.nix b/third_party/home-manager/modules/programs/pqiv.nix new file mode 100644 index 0000000000..046ed9aa96 --- /dev/null +++ b/third_party/home-manager/modules/programs/pqiv.nix @@ -0,0 +1,56 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.pqiv; + iniFormat = pkgs.formats.ini { }; + +in { + meta.maintainers = with lib.maintainers; [ donovanglover ]; + + options.programs.pqiv = { + enable = mkEnableOption "pqiv image viewer"; + + package = mkOption { + type = types.package; + default = pkgs.pqiv; + defaultText = literalExpression "pkgs.pqiv"; + description = "The pqiv package to install."; + }; + + settings = mkOption { + type = iniFormat.type; + default = { }; + description = '' + Configuration written to + $XDG_CONFIG_HOME/pqivrc. See + for a list of available options. To set a boolean flag, set the value to 1. + ''; + example = literalExpression '' + { + options = { + lazy-load = 1; + hide-info-box = 1; + background-pattern = "black"; + thumbnail-size = "256x256"; + command-1 = "thunar"; + }; + }; + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.pqiv" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."pqivrc" = mkIf (cfg.settings != { }) { + source = iniFormat.generate "pqivrc" cfg.settings; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/qcal.nix b/third_party/home-manager/modules/programs/qcal.nix new file mode 100644 index 0000000000..c70a6ea385 --- /dev/null +++ b/third_party/home-manager/modules/programs/qcal.nix @@ -0,0 +1,66 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.qcal; + + qcalAccounts = lib.attrValues + (lib.filterAttrs (_: a: a.qcal.enable) config.accounts.calendar.accounts); + + rename = oldname: + builtins.getAttr oldname { + url = "Url"; + userName = "Username"; + passwordCommand = "PasswordCmd"; + }; + + filteredAccounts = let + mkAccount = account: + lib.filterAttrs (_: v: v != null) (with account.remote; { + Url = url; + Username = if userName == null then null else userName; + PasswordCmd = + if passwordCommand == null then null else toString passwordCommand; + }); + in map mkAccount qcalAccounts; + +in { + meta.maintainers = with lib.maintainers; [ antonmosich ]; + + options = { + programs.qcal = { + enable = lib.mkEnableOption "qcal, a CLI calendar application"; + + timezone = lib.mkOption { + type = lib.types.singleLineStr; + default = "Local"; + example = "Europe/Vienna"; + description = "Timezone to display calendar entries in"; + }; + + defaultNumDays = lib.mkOption { + type = lib.types.ints.positive; + default = 30; + description = "Default number of days to show calendar entries for"; + }; + }; + + accounts.calendar.accounts = lib.mkOption { + type = with lib.types; + attrsOf + (submodule { options.qcal.enable = lib.mkEnableOption "qcal access"; }); + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ pkgs.qcal ]; + + xdg.configFile."qcal/config.json".source = + let jsonFormat = pkgs.formats.json { }; + in jsonFormat.generate "qcal.json" { + DefaultNumDays = cfg.defaultNumDays; + Timezone = cfg.timezone; + Calendars = filteredAccounts; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/qutebrowser.nix b/third_party/home-manager/modules/programs/qutebrowser.nix index 4de6f3e024..b6cc41ead8 100644 --- a/third_party/home-manager/modules/programs/qutebrowser.nix +++ b/third_party/home-manager/modules/programs/qutebrowser.nix @@ -239,6 +239,28 @@ in { ''; }; + greasemonkey = mkOption { + type = types.listOf types.package; + default = [ ]; + example = literalExpression '' + [ + (pkgs.fetchurl { + url = "https://raw.githubusercontent.com/afreakk/greasemonkeyscripts/1d1be041a65c251692ee082eda64d2637edf6444/youtube_sponsorblock.js"; + sha256 = "sha256-e3QgDPa3AOpPyzwvVjPQyEsSUC9goisjBUDMxLwg8ZE="; + }) + (pkgs.writeText "some-script.js" ''' + // ==UserScript== + // @name Some Greasemonkey script + // ==/UserScript== + ''') + ] + ''; + description = '' + Greasemonkey userscripts to add to qutebrowser's {file}`greasemonkey` + directory. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -265,6 +287,9 @@ in { quickmarksFile = optionals (cfg.quickmarks != { }) concatStringsSep "\n" ((mapAttrsToList formatQuickmarks cfg.quickmarks)); + + greasemonkeyDir = optionals (cfg.greasemonkey != [ ]) pkgs.linkFarmFromDrvs + "greasemonkey-userscripts" cfg.greasemonkey; in mkIf cfg.enable { home.packages = [ cfg.package ]; @@ -300,5 +325,15 @@ in { mkIf (cfg.quickmarks != { } && pkgs.stdenv.hostPlatform.isLinux) { text = quickmarksFile; }; + + home.file.".qutebrowser/greasemonkey" = + mkIf (cfg.greasemonkey != [ ] && pkgs.stdenv.hostPlatform.isDarwin) { + source = greasemonkeyDir; + }; + + xdg.configFile."qutebrowser/greasemonkey" = + mkIf (cfg.greasemonkey != [ ] && pkgs.stdenv.hostPlatform.isLinux) { + source = greasemonkeyDir; + }; }; } diff --git a/third_party/home-manager/modules/programs/rio.nix b/third_party/home-manager/modules/programs/rio.nix new file mode 100644 index 0000000000..6d66c99d6d --- /dev/null +++ b/third_party/home-manager/modules/programs/rio.nix @@ -0,0 +1,52 @@ +{ lib, pkgs, config, ... }: +let + cfg = config.programs.rio; + + settingsFormat = pkgs.formats.toml { }; + + inherit (pkgs.stdenv.hostPlatform) isDarwin; +in { + options.programs.rio = { + enable = lib.mkEnableOption null // { + description = lib.mdDoc '' + Enable Rio, a terminal built to run everywhere, as a native desktop applications by + Rust/WebGPU or even in the browsers powered by WebAssembly/WebGPU. + ''; + }; + + package = lib.mkPackageOption pkgs "rio" { }; + + settings = lib.mkOption { + type = settingsFormat.type; + default = { }; + description = '' + Configuration written to $XDG_CONFIG_HOME/rio/config.toml on Linux or + $HOME/Library/Application Support/rio/config.toml on Darwin. See + for options. + ''; + }; + }; + meta.maintainers = [ lib.maintainers.otavio ]; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + home.packages = [ cfg.package ]; + } + + # Only manage configuration if not empty + (lib.mkIf (cfg.settings != { } && !isDarwin) { + xdg.configFile."rio/config.toml".source = if lib.isPath cfg.settings then + cfg.settings + else + settingsFormat.generate "rio.toml" cfg.settings; + }) + + (lib.mkIf (cfg.settings != { } && isDarwin) { + home.file."Library/Application Support/rio/config.toml".source = + if lib.isPath cfg.settings then + cfg.settings + else + settingsFormat.generate "rio.toml" cfg.settings; + }) + ]); +} diff --git a/third_party/home-manager/modules/programs/rofi-pass.nix b/third_party/home-manager/modules/programs/rofi-pass.nix index 9d3ed7382f..f1de580fbf 100644 --- a/third_party/home-manager/modules/programs/rofi-pass.nix +++ b/third_party/home-manager/modules/programs/rofi-pass.nix @@ -7,11 +7,14 @@ let cfg = config.programs.rofi.pass; in { - meta.maintainers = [ maintainers.seylerius ]; + meta.maintainers = with maintainers; [ seylerius robwalt ]; options.programs.rofi.pass = { enable = mkEnableOption "rofi integration with password-store"; + package = + mkPackageOption pkgs "rofi-pass" { example = "pkgs.rofi-pass-wayland"; }; + stores = mkOption { type = types.listOf types.str; default = [ ]; @@ -37,7 +40,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.rofi-pass ]; + home.packages = [ cfg.package ]; xdg.configFile."rofi-pass/config".text = optionalString (cfg.stores != [ ]) ("root=" + (concatStringsSep ":" cfg.stores) + "\n") + cfg.extraConfig diff --git a/third_party/home-manager/modules/programs/ruff.nix b/third_party/home-manager/modules/programs/ruff.nix new file mode 100644 index 0000000000..e1490089ac --- /dev/null +++ b/third_party/home-manager/modules/programs/ruff.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.ruff; + + settingsFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ hm.maintainers.GaetanLepage ]; + + options.programs.ruff = { + enable = mkEnableOption + "ruff, an extremely fast Python linter and code formatter, written in Rust"; + + package = mkPackageOption pkgs "ruff" { }; + + settings = mkOption { + type = settingsFormat.type; + example = lib.literalExpression '' + { + line-length = 100; + per-file-ignores = { "__init__.py" = [ "F401" ]; }; + lint = { + select = [ "E4" "E7" "E9" "F" ]; + ignore = [ ]; + }; + } + ''; + description = '' + Ruff configuration. + For available settings see . + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."ruff/ruff.toml".source = + settingsFormat.generate "ruff.toml" cfg.settings; + }; +} diff --git a/third_party/home-manager/modules/programs/sapling.nix b/third_party/home-manager/modules/programs/sapling.nix new file mode 100644 index 0000000000..d2a4b4319e --- /dev/null +++ b/third_party/home-manager/modules/programs/sapling.nix @@ -0,0 +1,83 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.sapling; + + iniFormat = pkgs.formats.ini { }; + +in { + meta.maintainers = [ maintainers.pbar ]; + + options = { + programs.sapling = { + enable = mkEnableOption "Sapling"; + + package = mkPackageOption pkgs "sapling" { }; + + userName = mkOption { + type = types.str; + description = "Default user name to use."; + }; + + userEmail = mkOption { + type = types.str; + description = "Default user email to use."; + }; + + aliases = mkOption { + type = types.attrsOf types.str; + default = { }; + description = "Sapling aliases to define."; + }; + + extraConfig = mkOption { + type = types.attrsOf types.anything; + default = { }; + description = "Additional configuration to add."; + }; + + iniContent = mkOption { + type = iniFormat.type; + internal = true; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + { + home.packages = [ cfg.package ]; + + programs.sapling.iniContent.ui = { + username = cfg.userName + " <" + cfg.userEmail + ">"; + }; + } + + (mkIf (!pkgs.stdenv.isDarwin) { + xdg.configFile."sapling/sapling.conf".source = + iniFormat.generate "sapling.conf" cfg.iniContent; + }) + (mkIf (pkgs.stdenv.isDarwin) { + home.file."Library/Preferences/sapling/sapling.conf".source = + iniFormat.generate "sapling.conf" cfg.iniContent; + }) + + (mkIf (cfg.aliases != { }) { + programs.sapling.iniContent.alias = cfg.aliases; + }) + + (mkIf (lib.isAttrs cfg.extraConfig) { + programs.sapling.iniContent = cfg.extraConfig; + }) + + (mkIf (lib.isString cfg.extraConfig && !pkgs.stdenv.isDarwin) { + xdg.configFile."sapling/sapling.conf".text = cfg.extraConfig; + }) + (mkIf (lib.isString cfg.extraConfig && pkgs.stdenv.isDarwin) { + home.file."Library/Preferences/sapling/sapling.conf".text = + cfg.extraConfig; + }) + ]); +} diff --git a/third_party/home-manager/modules/programs/scmpuff.nix b/third_party/home-manager/modules/programs/scmpuff.nix index 5f2fba53b3..a85ae8d9c4 100644 --- a/third_party/home-manager/modules/programs/scmpuff.nix +++ b/third_party/home-manager/modules/programs/scmpuff.nix @@ -39,22 +39,34 @@ in { Whether to enable fish integration. ''; }; + + enableAliases = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable aliases (e.g. gs, ga, gd, gco). + ''; + }; }; - config = mkIf cfg.enable { + config = mkIf cfg.enable (let + mkArgs = shell: + concatStringsSep " " ([ "--shell=${shell}" ] + ++ optional (!cfg.enableAliases) "--aliases=false"); + in { home.packages = [ cfg.package ]; programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - eval "$(${cfg.package}/bin/scmpuff init -s)" + eval "$(${cfg.package}/bin/scmpuff init ${mkArgs "bash"})" ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${cfg.package}/bin/scmpuff init -s)" + eval "$(${cfg.package}/bin/scmpuff init ${mkArgs "zsh"})" ''; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration (mkAfter '' - ${cfg.package}/bin/scmpuff init -s --shell=fish | source + ${cfg.package}/bin/scmpuff init ${mkArgs "fish"} | source ''); - }; + }); } diff --git a/third_party/home-manager/modules/programs/sftpman.nix b/third_party/home-manager/modules/programs/sftpman.nix new file mode 100644 index 0000000000..c6978f80a6 --- /dev/null +++ b/third_party/home-manager/modules/programs/sftpman.nix @@ -0,0 +1,118 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.sftpman; + + jsonFormat = pkgs.formats.json { }; + + mountOpts = { config, name, ... }: { + options = { + host = mkOption { + type = types.str; + description = "The host to connect to."; + }; + + port = mkOption { + type = types.port; + default = 22; + description = "The port to connect to."; + }; + + user = mkOption { + type = types.str; + description = "The username to authenticate with."; + }; + + mountOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + description = "Options to pass to sshfs."; + }; + + mountPoint = mkOption { + type = types.str; + description = "The remote path to mount."; + }; + + authType = mkOption { + type = types.enum [ + "password" + "publickey" + "hostbased" + "keyboard-interactive" + "gssapi-with-mic" + ]; + default = "publickey"; + description = "The authentication method to use."; + }; + + sshKey = mkOption { + type = types.nullOr types.str; + default = cfg.defaultSshKey; + defaultText = + lib.literalExpression "config.programs.sftpman.defaultSshKey"; + description = '' + Path to the SSH key to use for authentication. + Only applies if authMethod is `publickey`. + ''; + }; + + beforeMount = mkOption { + type = types.str; + default = "true"; + description = "Command to run before mounting."; + }; + }; + }; +in { + meta.maintainers = with maintainers; [ fugi ]; + + options.programs.sftpman = { + enable = mkEnableOption + "sftpman, an application that handles sshfs/sftp file systems mounting"; + + package = mkPackageOption pkgs "sftpman" { }; + + defaultSshKey = mkOption { + type = types.nullOr types.str; + default = null; + description = + "Path to the SSH key to be used by default. Can be overridden per host."; + }; + + mounts = mkOption { + type = types.attrsOf (types.submodule mountOpts); + default = { }; + description = '' + The sshfs mount configurations written to + {file}`$XDG_CONFIG_HOME/sftpman/mounts/`. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (let + hasMissingKey = _: mount: + mount.authType == "publickey" && mount.sshKey == null; + mountsWithMissingKey = attrNames (filterAttrs hasMissingKey cfg.mounts); + mountsWithMissingKeyStr = concatStringsSep ", " mountsWithMissingKey; + in { + assertion = mountsWithMissingKey == [ ]; + message = '' + sftpman mounts using authentication type "publickey" but missing 'sshKey': ${mountsWithMissingKeyStr} + ''; + }) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile = mapAttrs' (name: value: + nameValuePair "sftpman/mounts/${name}.json" { + source = + jsonFormat.generate "sftpman-${name}.json" (value // { id = name; }); + }) cfg.mounts; + }; +} diff --git a/third_party/home-manager/modules/programs/ssh.nix b/third_party/home-manager/modules/programs/ssh.nix index e510fe8aad..5d038075f6 100644 --- a/third_party/home-manager/modules/programs/ssh.nix +++ b/third_party/home-manager/modules/programs/ssh.nix @@ -361,6 +361,17 @@ in ''; }; + addKeysToAgent = mkOption { + type = types.str; + default = "no"; + description = '' + When enabled, a private key that is used during authentication will be + added to ssh-agent if it is running (with confirmation enabled if + set to 'confirm'). The argument must be 'no' (the default), 'yes', 'confirm' + (optionally followed by a time interval), 'ask' or a time interval (e.g. '1h'). + ''; + }; + compression = mkOption { default = false; type = types.bool; @@ -528,6 +539,7 @@ in Host * ForwardAgent ${lib.hm.booleans.yesNo cfg.forwardAgent} + AddKeysToAgent ${cfg.addKeysToAgent} Compression ${lib.hm.booleans.yesNo cfg.compression} ServerAliveInterval ${toString cfg.serverAliveInterval} ServerAliveCountMax ${toString cfg.serverAliveCountMax} diff --git a/third_party/home-manager/modules/programs/starship.nix b/third_party/home-manager/modules/programs/starship.nix index 8a97b53a28..f253fa7f07 100644 --- a/third_party/home-manager/modules/programs/starship.nix +++ b/third_party/home-manager/modules/programs/starship.nix @@ -137,7 +137,7 @@ in { ${starshipCmd} init nu | save --force ${config.xdg.cacheHome}/starship/init.nu ''; extraConfig = '' - source ${config.xdg.cacheHome}/starship/init.nu + use ${config.xdg.cacheHome}/starship/init.nu ''; }; }; diff --git a/third_party/home-manager/modules/programs/swaylock.nix b/third_party/home-manager/modules/programs/swaylock.nix index 774ecf7050..be577ea806 100644 --- a/third_party/home-manager/modules/programs/swaylock.nix +++ b/third_party/home-manager/modules/programs/swaylock.nix @@ -16,7 +16,21 @@ in { false otherwise ''; example = true; - description = "Whether to enable swaylock."; + description = '' + Whether to enable swaylock. + + Note that PAM must be configured to enable swaylock to perform + authentication. The package installed through home-manager + will *not* be able to unlock the session without this + configuration. + + On NixOS, this is by default enabled with the sway module, but + for other compositors it can currently be enabled using: + + ```nix + security.pam.services.swaylock = {}; + ``` + ''; }; package = mkPackageOption pkgs "swaylock" { }; diff --git a/third_party/home-manager/modules/programs/swayr.nix b/third_party/home-manager/modules/programs/swayr.nix new file mode 100644 index 0000000000..250a3e01f2 --- /dev/null +++ b/third_party/home-manager/modules/programs/swayr.nix @@ -0,0 +1,135 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.swayr; + tomlFormat = pkgs.formats.toml { }; + configFile = tomlFormat.generate "config.toml" cfg.settings; + finalConfig = pkgs.writeText "swayr.toml" + ((builtins.readFile configFile) + cfg.extraConfig); +in { + meta.maintainers = [ lib.hm.maintainers."9p4" ]; + + options.programs.swayr = { + enable = mkEnableOption "the swayr service"; + + settings = mkOption { + type = types.nullOr tomlFormat.type; + default = { }; + example = literalExpression '' + menu = { + executable = "${pkgs.wofi}/bin/wofi"; + args = [ + "--show=dmenu" + "--allow-markup" + "--allow-images" + "--insensitive" + "--cache-file=/dev/null" + "--parse-search" + "--height=40%" + "--prompt={prompt}" + ]; + }; + + format = { + output_format = "{indent}Output {name} ({id})"; + workspace_format = "{indent}Workspace {name} [{layout}] on output {output_name} ({id})"; + container_format = "{indent}Container [{layout}] {marks} on workspace {workspace_name} ({id})"; + window_format = "img:{app_icon}:text:{indent}{app_name} — {urgency_start}“{title}”{urgency_end} {marks} on workspace {workspace_name} / {output_name} ({id})"; + indent = " "; + urgency_start = ""; + urgency_end = ""; + html_escape = true; + }; + + layout = { + auto_tile = false; + auto_tile_min_window_width_per_output_width = [ + [ 800 400 ] + [ 1024 500 ] + [ 1280 600 ] + [ 1400 680 ] + [ 1440 700 ] + [ 1600 780 ] + [ 1680 780 ] + [ 1920 920 ] + [ 2048 980 ] + [ 2560 1000 ] + [ 3440 1200 ] + [ 3840 1280 ] + [ 4096 1400 ] + [ 4480 1600 ] + [ 7680 2400 ] + ]; + }; + + focus = { + lockin_delay = 750; + }; + + misc = { + seq_inhibit = false; + }; + ''; + description = '' + Configuration included in `config.toml`. + For available options see + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra configuration lines to append to the swayr + configuration file. + ''; + }; + + systemd.enable = mkEnableOption "swayr systemd integration"; + systemd.target = mkOption { + type = types.str; + default = "graphical-session.target"; + description = '' + Systemd target to bind to. + ''; + }; + + package = mkOption { + type = types.package; + default = pkgs.swayr; + defaultText = literalExpression "pkgs.swayr"; + description = "swayr package to use."; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + { + home.packages = [ cfg.package ]; + + # Creating an empty file on empty configuration is desirable, otherwise swayrd will create the file on startup. + xdg.configFile."swayr/config.toml" = + mkIf (cfg.settings != { }) { source = finalConfig; }; + } + + (mkIf cfg.systemd.enable { + systemd.user.services.swayrd = { + Unit = { + Description = "A window-switcher & more for sway"; + Documentation = "https://sr.ht/~tsdh/swayr"; + After = [ cfg.systemd.target ]; + PartOf = [ cfg.systemd.target ]; + X-Restart-Triggers = mkIf (cfg.settings != { }) + [ "${config.xdg.configFile."swayr/config.toml".source}" ]; + }; + Service = { + Environment = [ "RUST_BACKTRACE=1" ]; + ExecStart = "${cfg.package}/bin/swayrd"; + Restart = "on-failure"; + }; + Install.WantedBy = [ cfg.systemd.target ]; + }; + }) + ]); +} diff --git a/third_party/home-manager/modules/programs/thefuck.nix b/third_party/home-manager/modules/programs/thefuck.nix new file mode 100644 index 0000000000..2cad4c3386 --- /dev/null +++ b/third_party/home-manager/modules/programs/thefuck.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + meta.maintainers = [ hm.maintainers.ilaumjd ]; + + options.programs.thefuck = { + enable = mkEnableOption + "thefuck - magnificent app that corrects your previous console command"; + + package = mkPackageOption pkgs "thefuck" { }; + + enableInstantMode = mkEnableOption "thefuck's experimental instant mode"; + + enableBashIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Bash integration. + ''; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; + + enableZshIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Zsh integration. + ''; + }; + }; + + config = let + cfg = config.programs.thefuck; + + cliArgs = cli.toGNUCommandLineShell { } { + alias = true; + enable-experimental-instant-mode = cfg.enableInstantMode; + }; + + shEvalCmd = '' + eval "$(${cfg.package}/bin/thefuck ${cliArgs})" + ''; + in mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration shEvalCmd; + + programs.fish.functions = mkIf cfg.enableFishIntegration { + fuck = { + description = "Correct your previous console command"; + body = '' + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 ${cfg.package}/bin/thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end + ''; + }; + }; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration shEvalCmd; + }; +} diff --git a/third_party/home-manager/modules/programs/waybar.nix b/third_party/home-manager/modules/programs/waybar.nix index efc34a3074..9925effc92 100644 --- a/third_party/home-manager/modules/programs/waybar.nix +++ b/third_party/home-manager/modules/programs/waybar.nix @@ -309,7 +309,7 @@ in { "Highly customizable Wayland bar for Sway and Wlroots based compositors."; Documentation = "https://github.com/Alexays/Waybar/wiki"; PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; + After = [ "graphical-session-pre.target" ]; }; Service = { diff --git a/third_party/home-manager/modules/programs/wezterm.nix b/third_party/home-manager/modules/programs/wezterm.nix index b66028d6d7..b02099a6c6 100644 --- a/third_party/home-manager/modules/programs/wezterm.nix +++ b/third_party/home-manager/modules/programs/wezterm.nix @@ -100,9 +100,7 @@ in { -- Generated by Home Manager. -- See https://wezfurlong.org/wezterm/ - -- Add config folder to watchlist for config reloads. local wezterm = require 'wezterm'; - wezterm.add_to_config_reload_watch_list(wezterm.config_dir) ${cfg.extraConfig} ''; diff --git a/third_party/home-manager/modules/programs/wpaperd.nix b/third_party/home-manager/modules/programs/wpaperd.nix new file mode 100644 index 0000000000..655024a06c --- /dev/null +++ b/third_party/home-manager/modules/programs/wpaperd.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.wpaperd; + tomlFormat = pkgs.formats.toml { }; +in { + meta.maintainers = [ hm.maintainers.Avimitin ]; + + options.programs.wpaperd = { + enable = mkEnableOption "wpaperd"; + + package = mkPackageOption pkgs "wpaperd" { }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + eDP-1 = { + path = "/home/foo/Pictures/Wallpaper"; + apply-shadow = true; + }; + DP-2 = { + path = "/home/foo/Pictures/Anime"; + sorting = "descending"; + }; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/wpaperd/wallpaper.toml`. + See + for the full list of options. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile = { + "wpaperd/wallpaper.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "wpaperd-wallpaper" cfg.settings; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/xplr.nix b/third_party/home-manager/modules/programs/xplr.nix new file mode 100644 index 0000000000..bd92229548 --- /dev/null +++ b/third_party/home-manager/modules/programs/xplr.nix @@ -0,0 +1,99 @@ +{ config, lib, pkgs, ... }: +let + inherit (lib) + types mkIf mkOption mkEnableOption mkPackageOption literalExpression; + + cfg = config.programs.xplr; + + initialConfig = '' + version = '${cfg.package.version}' + ''; + + # If `value` is a Nix store path, create the symlink `/nix/store/newhash/${name}/*` + # to `/nix/store/oldhash/*` and returns `/nix/store/newhash`. + wrapPlugin = name: value: + if lib.isStorePath value then + pkgs.symlinkJoin { + name = name; + paths = [ value ]; + postBuild = '' + mkdir '${name}' + mv $out/* '${name}/' + mv '${name}' $out/ + ''; + } + else + builtins.dirOf value; + + makePluginSearchPath = p: "${p}/?/init.lua;${p}/?.lua"; + + pluginPath = if cfg.plugins != { } then + let + wrappedPlugins = lib.mapAttrsToList wrapPlugin cfg.plugins; + searchPaths = map makePluginSearchPath wrappedPlugins; + pluginSearchPath = lib.concatStringsSep ";" searchPaths; + in ('' + package.path = "${pluginSearchPath};" .. package.path + '') + else + "\n"; + + # We provide a default version line within the configuration file, which is + # obtained from the package's attributes. Merge the initial configFile, a + # mapped list of plugins and then the user defined configuration to obtain + # the final configuration. + configFile = initialConfig + pluginPath + cfg.extraConfig; +in { + meta.maintainers = [ lib.maintainers.NotAShelf ]; + + options.programs.xplr = { + enable = mkEnableOption "xplr, terminal UI based file explorer"; + + package = mkPackageOption pkgs "xplr" { }; + + plugins = mkOption { + type = with types; nullOr (attrsOf (either package str)); + default = { }; + defaultText = literalExpression "{ }"; + description = '' + An attribute set of plugin paths to be added to the [package.path] of the {file}`~/config/xplr/init.lua` configuration file. + + Must be a package or string representing the plugin directory's path. + If the path string is not absolute, it will be relative to {file}`$XDG_CONFIG_HOME/xplr/init.lua`. + ''; + example = literalExpression '' + { + wl-clipboard = fetchFromGitHub { + owner = "sayanarijit"; + repo = "wl-clipboard.xplr"; + rev = "a3ffc87460c5c7f560bffea689487ae14b36d9c3"; + hash = "sha256-I4rh5Zks9hiXozBiPDuRdHwW5I7ppzEpQNtirY0Lcks="; + } + local-plugin = "/home/user/.config/plugins/local-plugin"; + }; + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + example = literalExpression '' + require("wl-clipboard").setup { + copy_command = "wl-copy -t text/uri-list", + paste_command = "wl-paste", + keep_selection = true, + } + ''; + description = '' + Extra xplr configuration. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."xplr/init.lua".source = + pkgs.writeText "init.lua" configFile; + }; +} diff --git a/third_party/home-manager/modules/programs/yazi.nix b/third_party/home-manager/modules/programs/yazi.nix new file mode 100644 index 0000000000..d0d941d139 --- /dev/null +++ b/third_party/home-manager/modules/programs/yazi.nix @@ -0,0 +1,169 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.yazi; + tomlFormat = pkgs.formats.toml { }; + + bashIntegration = '' + function ya() { + tmp="$(mktemp -t "yazi-cwd.XXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + cd -- "$cwd" + fi + rm -f -- "$tmp" + } + ''; + + fishIntegration = '' + function ya + 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" + end + rm -f -- "$tmp" + end + ''; + + nushellIntegration = '' + def --env ya [args?] { + let tmp = (mktemp -t "yazi-cwd.XXXXX") + if ($args == null) { + yazi --cwd-file $tmp + } else { + yazi $args --cwd-file $tmp + } + let cwd = (open $tmp) + if $cwd != "" and $cwd != $env.PWD { + cd $cwd + } + rm -f $tmp + } + ''; +in { + meta.maintainers = [ 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."; + }; + + enableBashIntegration = mkEnableOption "Bash integration"; + + enableZshIntegration = mkEnableOption "Zsh integration"; + + enableFishIntegration = mkEnableOption "Fish integration"; + + enableNushellIntegration = mkEnableOption "Nushell integration"; + + keymap = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + input.keymap = [ + { exec = "close"; on = [ "" ]; } + { exec = "close --submit"; on = [ "" ]; } + { exec = "escape"; on = [ "" ]; } + { exec = "backspace"; on = [ "" ]; } + ]; + manager.keymap = [ + { exec = "escape"; on = [ "" ]; } + { exec = "quit"; on = [ "q" ]; } + { exec = "close"; on = [ "" ]; } + ]; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/yazi/keymap.toml`. + + See + for the full list of options. + ''; + }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + log = { + enabled = false; + }; + manager = { + show_hidden = false; + sort_by = "modified"; + sort_dir_first = true; + sort_reverse = true; + }; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/yazi/yazi.toml`. + + See + for the full list of options. + ''; + }; + + theme = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + filetype = { + rules = [ + { fg = "#7AD9E5"; mime = "image/*"; } + { fg = "#F3D398"; mime = "video/*"; } + { fg = "#F3D398"; mime = "audio/*"; } + { fg = "#CD9EFC"; mime = "application/x-bzip"; } + ]; + }; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/yazi/theme.toml`. + + See + for the full list of options + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration bashIntegration; + + programs.fish.interactiveShellInit = + mkIf cfg.enableFishIntegration fishIntegration; + + programs.nushell.extraConfig = + mkIf cfg.enableNushellIntegration nushellIntegration; + + xdg.configFile = { + "yazi/keymap.toml" = mkIf (cfg.keymap != { }) { + source = tomlFormat.generate "yazi-keymap" cfg.keymap; + }; + "yazi/yazi.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "yazi-settings" cfg.settings; + }; + "yazi/theme.toml" = mkIf (cfg.theme != { }) { + source = tomlFormat.generate "yazi-theme" cfg.theme; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/zoxide.nix b/third_party/home-manager/modules/programs/zoxide.nix index 11ae353cc7..fe82ffc25e 100644 --- a/third_party/home-manager/modules/programs/zoxide.nix +++ b/third_party/home-manager/modules/programs/zoxide.nix @@ -76,7 +76,7 @@ in { eval "$(${cfg.package}/bin/zoxide init zsh ${cfgOptions})" ''; - programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' ${cfg.package}/bin/zoxide init fish ${cfgOptions} | source ''; @@ -86,7 +86,9 @@ in { if not ($zoxide_cache | path exists) { mkdir $zoxide_cache } - ${cfg.package}/bin/zoxide init nushell ${cfgOptions} | save --force ${config.xdg.cacheHome}/zoxide/init.nu + ${cfg.package}/bin/zoxide init nushell ${cfgOptions} | + str replace "def-env" "def --env" --all | # https://github.com/ajeetdsouza/zoxide/pull/632 + save --force ${config.xdg.cacheHome}/zoxide/init.nu ''; extraConfig = '' source ${config.xdg.cacheHome}/zoxide/init.nu diff --git a/third_party/home-manager/modules/programs/zsh.nix b/third_party/home-manager/modules/programs/zsh.nix index 58f700df61..c375b57cff 100644 --- a/third_party/home-manager/modules/programs/zsh.nix +++ b/third_party/home-manager/modules/programs/zsh.nix @@ -204,7 +204,8 @@ let default = [ "^[[A" ]; description = '' The key codes to be used when searching up. - The default of `^[[A` corresponds to the UP key. + The default of `^[[A` may correspond to the UP key -- if not, try + `$terminfo[kcuu1]`. ''; }; searchDownKey = mkOption { @@ -212,7 +213,8 @@ let default = [ "^[[B" ]; description = '' The key codes to be used when searching down. - The default of `^[[B` corresponds to the DOWN key. + The default of `^[[B` may correspond to the DOWN key -- if not, try + `$terminfo[kcud1]`. ''; }; }; @@ -224,9 +226,20 @@ let package = mkPackageOption pkgs "zsh-syntax-highlighting" { }; + highlighters = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "brackets" ]; + description = '' + Highlighters to enable + See the list of highlighters: + ''; + }; + styles = mkOption { type = types.attrsOf types.str; default = {}; + example = { comment = "fg=black,bold"; }; description = '' Custom styles for syntax highlighting. See each highlighter's options: @@ -240,6 +253,7 @@ in { imports = [ (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) + (mkRenamedOptionModule [ "programs" "zsh" "zproof" ] [ "programs" "zsh" "zprof" ]) ]; options = { @@ -343,6 +357,13 @@ in description = "Enable zsh autosuggestions"; }; + zprof.enable = mkOption { + default = false; + description = '' + Enable zprof in your zshrc. + ''; + }; + syntaxHighlighting = mkOption { type = syntaxHighlightingModule; default = {}; @@ -490,7 +511,7 @@ in (mkIf (cfg.dotDir != null) { home.file."${relToDotDir ".zshenv"}".text = '' - ZDOTDIR=${zdotdir} + export ZDOTDIR=${zdotdir} ''; # When dotDir is set, only use ~/.zshenv to source ZDOTDIR/.zshenv, @@ -521,6 +542,12 @@ in ++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package; home.file."${relToDotDir ".zshrc"}".text = concatStringsSep "\n" ([ + # zprof must be loaded before everything else, since it + # benchmarks the shell initialization. + (optionalString cfg.zprof.enable '' + zmodload zsh/zprof + '') + cfg.initExtraFirst "typeset -U path cdpath fpath manpath" @@ -622,6 +649,7 @@ in # https://github.com/zsh-users/zsh-syntax-highlighting#faq '' source ${cfg.syntaxHighlighting.package}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + ZSH_HIGHLIGHT_HIGHLIGHTERS+=(${lib.concatStringsSep " " (map lib.escapeShellArg cfg.syntaxHighlighting.highlighters)}) ${lib.concatStringsSep "\n" ( lib.mapAttrsToList (name: value: "ZSH_HIGHLIGHT_STYLES+=(${lib.escapeShellArg name} ${lib.escapeShellArg value})") @@ -635,14 +663,19 @@ in '' source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh ${lib.concatMapStringsSep "\n" - (upKey: "bindkey '${upKey}' history-substring-search-up") + (upKey: "bindkey \"${upKey}\" history-substring-search-up") (lib.toList cfg.historySubstringSearch.searchUpKey) } ${lib.concatMapStringsSep "\n" - (downKey: "bindkey '${downKey}' history-substring-search-down") + (downKey: "bindkey \"${downKey}\" history-substring-search-down") (lib.toList cfg.historySubstringSearch.searchDownKey) } '') + + (optionalString cfg.zprof.enable + '' + zprof + '') ]); } diff --git a/third_party/home-manager/modules/programs/zsh/prezto.nix b/third_party/home-manager/modules/programs/zsh/prezto.nix index ddf862f987..1aa3af1e9b 100644 --- a/third_party/home-manager/modules/programs/zsh/prezto.nix +++ b/third_party/home-manager/modules/programs/zsh/prezto.nix @@ -34,7 +34,8 @@ let pmoduleDirs = mkOption { type = types.listOf types.path; default = [ ]; - example = [ "$HOME/.zprezto-contrib" ]; + example = literalExpression + ''[ "''${config.home.homeDirectory}/.zprezto-contrib" ]''; description = "Add additional directories to load prezto modules from."; }; diff --git a/third_party/home-manager/modules/programs/zsh/zsh-abbr.nix b/third_party/home-manager/modules/programs/zsh/zsh-abbr.nix new file mode 100644 index 0000000000..8b6189c52c --- /dev/null +++ b/third_party/home-manager/modules/programs/zsh/zsh-abbr.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +with lib; +let cfg = config.programs.zsh.zsh-abbr; +in { + meta.maintainers = [ hm.maintainers.ilaumjd ]; + + options.programs.zsh.zsh-abbr = { + enable = + mkEnableOption "zsh-abbr - zsh manager for auto-expanding abbreviations"; + + abbreviations = mkOption { + type = types.attrsOf types.str; + default = { }; + example = { + l = "less"; + gco = "git checkout"; + }; + description = '' + An attribute set that maps aliases (the top level attribute names + in this option) to abbreviations. Abbreviations are expanded with + the longer phrase after they are entered. + ''; + }; + }; + + config = mkIf cfg.enable { + programs.zsh.plugins = [{ + name = "zsh-abbr"; + src = pkgs.zsh-abbr; + file = "/share/zsh/zsh-abbr/abbr.plugin.zsh"; + }]; + + xdg.configFile = { + "zsh-abbr/user-abbreviations".text = concatStringsSep "\n" + (mapAttrsToList (k: v: "abbr ${escapeShellArg k}=${escapeShellArg v}") + cfg.abbreviations) + "\n"; + }; + }; +} diff --git a/third_party/home-manager/modules/services/caffeine.nix b/third_party/home-manager/modules/services/caffeine.nix index 28ebc7f13b..84c69f3f0e 100644 --- a/third_party/home-manager/modules/services/caffeine.nix +++ b/third_party/home-manager/modules/services/caffeine.nix @@ -28,7 +28,6 @@ in { Restart = "on-failure"; PrivateTmp = true; ProtectSystem = "full"; - ProtectHome = "yes"; Type = "exec"; Slice = "session.slice"; ExecStart = "${pkgs.caffeine-ng}/bin/caffeine"; diff --git a/third_party/home-manager/modules/services/cbatticon.nix b/third_party/home-manager/modules/services/cbatticon.nix index 1216878ca0..1616b2dcd1 100644 --- a/third_party/home-manager/modules/services/cbatticon.nix +++ b/third_party/home-manager/modules/services/cbatticon.nix @@ -24,7 +24,7 @@ let ++ optional (cfg.updateIntervalSeconds != null) "--update-interval ${toString cfg.updateIntervalSeconds}" ++ optional (cfg.hideNotification != null && cfg.hideNotification) - "--hide-notification"); + "--hide-notification" ++ optional (cfg.batteryId != null) cfg.batteryId); in { meta.maintainers = [ maintainers.pmiddend ]; @@ -94,6 +94,15 @@ in { default = null; description = "Hide the notification popups."; }; + + batteryId = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + ID of the battery to monitor. List with {command}`cbatticon -p`. + Defaults to the first entry in the list. + ''; + }; }; }; diff --git a/third_party/home-manager/modules/services/cliphist.nix b/third_party/home-manager/modules/services/cliphist.nix new file mode 100644 index 0000000000..6ba733fa5e --- /dev/null +++ b/third_party/home-manager/modules/services/cliphist.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: +let cfg = config.services.cliphist; +in { + meta.maintainers = [ lib.maintainers.janik ]; + + options.services.cliphist = { + enable = + lib.mkEnableOption "cliphist, a clipboard history “manager” for wayland"; + + package = lib.mkPackageOption pkgs "cliphist" { }; + + systemdTarget = lib.mkOption { + type = lib.types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + The systemd target that will automatically start the cliphist service. + + When setting this value to `"sway-session.target"`, + make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`, + otherwise the service may never be started. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.cliphist" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + systemd.user.services.cliphist = { + Unit = { + Description = "Clipboard management daemon"; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + Type = "simple"; + ExecStart = + "${pkgs.wl-clipboard}/bin/wl-paste --watch ${cfg.package}/bin/cliphist store"; + Restart = "on-failure"; + }; + + Install = { WantedBy = [ cfg.systemdTarget ]; }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/clipmenu.nix b/third_party/home-manager/modules/services/clipmenu.nix index c55166b3ab..55ec5d06bc 100644 --- a/third_party/home-manager/modules/services/clipmenu.nix +++ b/third_party/home-manager/modules/services/clipmenu.nix @@ -49,10 +49,12 @@ in { Service = { ExecStart = "${cfg.package}/bin/clipmenud"; - Environment = "PATH=${ + Environment = [ + "PATH=${ makeBinPath (with pkgs; [ coreutils findutils gnugrep gnused systemd ]) - }"; + }" + ]; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/third_party/home-manager/modules/services/darkman.nix b/third_party/home-manager/modules/services/darkman.nix new file mode 100644 index 0000000000..d11f03244e --- /dev/null +++ b/third_party/home-manager/modules/services/darkman.nix @@ -0,0 +1,115 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.darkman; + + yamlFormat = pkgs.formats.yaml { }; + + scriptsOptionType = kind: + mkOption { + type = types.attrsOf (types.oneOf [ types.path types.lines ]); + default = { }; + example = literalExpression '' + { + gtk-theme = ''' + ''${pkgs.dconf}/bin/dconf write \ + /org/gnome/desktop/interface/color-scheme "'prefer-${kind}'" + '''; + my-python-script = pkgs.writers.writePython3 "my-python-script" { } ''' + print('Do something!') + '''; + } + ''; + description = '' + Scripts to run when switching to "${kind} mode". + + Multiline strings are interpreted as Bash shell scripts and a shebang is + not required. + ''; + }; + + generateScripts = folder: + mapAttrs' (k: v: { + name = "${folder}/${k}"; + value = { + source = if builtins.isPath v || isDerivation v then + v + else + pkgs.writeShellScript (hm.strings.storeFileName k) v; + }; + }); +in { + meta.maintainers = [ maintainers.xlambein ]; + + options.services.darkman = { + enable = mkEnableOption '' + darkman, a tool that automatically switches dark-mode on and off based on + the time of the day''; + + package = mkPackageOption pkgs "darkman" { }; + + settings = mkOption { + type = types.submodule { freeformType = yamlFormat.type; }; + example = literalExpression '' + { + lat = 52.3; + lng = 4.8; + usegeoclue = true; + } + ''; + description = '' + Settings for the {command}`darkman` command. See + for details. + ''; + }; + + darkModeScripts = scriptsOptionType "dark"; + + lightModeScripts = scriptsOptionType "light"; + }; + + config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.darkman" pkgs platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile = { + "darkman/config.yaml" = mkIf (cfg.settings != { }) { + source = yamlFormat.generate "darkman-config.yaml" cfg.settings; + }; + }; + + xdg.dataFile = mkMerge [ + (mkIf (cfg.darkModeScripts != { }) + (generateScripts "dark-mode.d" cfg.darkModeScripts)) + (mkIf (cfg.lightModeScripts != { }) + (generateScripts "light-mode.d" cfg.lightModeScripts)) + ]; + + systemd.user.services.darkman = { + Unit = { + Description = "Darkman system service"; + Documentation = "man:darkman(1)"; + PartOf = [ "graphical-session.target" ]; + BindsTo = [ "graphical-session.target" ]; + X-Restart-Triggers = + [ "${config.xdg.configFile."darkman/config.yaml".source}" ]; + }; + + Service = { + Type = "dbus"; + BusName = "nl.whynothugo.darkman"; + ExecStart = "${getExe cfg.package} run"; + Restart = "on-failure"; + TimeoutStopSec = 15; + Slice = "background.slice"; + }; + + Install.WantedBy = mkDefault [ "graphical-session.target" ]; + }; + }; +} diff --git a/third_party/home-manager/modules/services/emacs.nix b/third_party/home-manager/modules/services/emacs.nix index 64c6c6eeef..d319abf010 100644 --- a/third_party/home-manager/modules/services/emacs.nix +++ b/third_party/home-manager/modules/services/emacs.nix @@ -12,6 +12,10 @@ let clientWMClass = if versionAtLeast emacsVersion "28" then "Emacsd" else "Emacs"; + # Workaround for https://debbugs.gnu.org/47511 + needsSocketWorkaround = versionOlder emacsVersion "28" + && cfg.socketActivation.enable; + # Adapted from upstream emacs.desktop clientDesktopItem = pkgs.writeTextDir "share/applications/emacsclient.desktop" (generators.toINI { } { @@ -128,7 +132,7 @@ in { # Avoid killing the Emacs session, which may be full of # unsaved buffers. X-RestartIfChanged = false; - } // optionalAttrs (cfg.socketActivation.enable) { + } // optionalAttrs needsSocketWorkaround { # Emacs deletes its socket when shutting down, which systemd doesn't # handle, resulting in a server without a socket. # See https://github.com/nix-community/home-manager/issues/2018 @@ -157,7 +161,7 @@ in { SuccessExitStatus = 15; Restart = "on-failure"; - } // optionalAttrs (cfg.socketActivation.enable) { + } // optionalAttrs needsSocketWorkaround { # Use read-only directory permissions to prevent emacs from # deleting systemd's socket file before exiting. ExecStartPost = @@ -201,9 +205,21 @@ in { FileDescriptorName = "server"; SocketMode = "0600"; DirectoryMode = "0700"; + # This prevents the service from immediately starting again + # after being stopped, due to the function + # `server-force-stop' present in `kill-emacs-hook', which + # calls `server-running-p', which opens the socket file. + FlushPending = true; }; - Install = { WantedBy = [ "sockets.target" ]; }; + Install = { + WantedBy = [ "sockets.target" ]; + # Adding this Requires= dependency ensures that systemd + # manages the socket file, in the case where the service is + # started when the socket is stopped. + # The socket unit is implicitly ordered before the service. + RequiredBy = [ "emacs.service" ]; + }; }; }) ]); diff --git a/third_party/home-manager/modules/services/gpg-agent.nix b/third_party/home-manager/modules/services/gpg-agent.nix index 63ba11c779..70e4df0a59 100644 --- a/third_party/home-manager/modules/services/gpg-agent.nix +++ b/third_party/home-manager/modules/services/gpg-agent.nix @@ -22,6 +22,16 @@ let set -gx GPG_TTY (tty) '' + optionalString cfg.enableSshSupport gpgSshSupportStr; + gpgNushellInitStr = '' + $env.GPG_TTY = (tty) + '' + optionalString cfg.enableSshSupport '' + ${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore + + if not "SSH_AUTH_SOCK" in $env { + $env.SSH_AUTH_SOCK = (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket) + } + ''; + # mimic `gpgconf` output for use in `systemd` unit definitions. # we cannot use `gpgconf` directly because it heavily depends on system # state, but we need the values at build time. original: @@ -188,7 +198,7 @@ in { pinentryFlavor = mkOption { type = types.nullOr (types.enum pkgs.pinentry.flavors); example = "gnome3"; - default = "gtk2"; + default = null; description = '' Which pinentry interface to use. If not `null`, it sets @@ -200,8 +210,6 @@ in { ```nix services.dbus.packages = [ pkgs.gcr ]; ``` - For this reason, the default is `gtk2` for - now. ''; }; @@ -216,6 +224,10 @@ in { enableFishIntegration = mkEnableOption "Fish integration" // { default = true; }; + + enableNushellIntegration = mkEnableOption "Nushell integration" // { + default = true; + }; }; }; @@ -247,6 +259,9 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgInitStr; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration gpgFishInitStr; + + programs.nushell.extraEnv = + mkIf cfg.enableNushellIntegration gpgNushellInitStr; } (mkIf (cfg.sshKeys != null) { diff --git a/third_party/home-manager/modules/services/lorri.nix b/third_party/home-manager/modules/services/lorri.nix index 85b75682f8..f782ff880d 100644 --- a/third_party/home-manager/modules/services/lorri.nix +++ b/third_party/home-manager/modules/services/lorri.nix @@ -52,6 +52,12 @@ in { PrivateTmp = true; ProtectSystem = "strict"; ProtectHome = "read-only"; + ReadWritePaths = [ + # /run/user/1000 for the socket + "%t" + "/nix/var/nix/gcroots/per-user/%u" + ]; + CacheDirectory = [ "lorri" ]; Restart = "on-failure"; Environment = let path = with pkgs; diff --git a/third_party/home-manager/modules/services/osmscout-server.nix b/third_party/home-manager/modules/services/osmscout-server.nix new file mode 100644 index 0000000000..e2de14913b --- /dev/null +++ b/third_party/home-manager/modules/services/osmscout-server.nix @@ -0,0 +1,76 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.services.osmscout-server; +in { + meta.maintainers = [ maintainers.Thra11 ]; + + options = { + services.osmscout-server = { + enable = mkEnableOption "OSM Scout Server"; + + package = mkPackageOption pkgs "osmscout-server" { }; + + network = { + startWhenNeeded = mkOption { + type = types.bool; + default = true; + description = '' + Enable systemd socket activation. + ''; + }; + + listenAddress = mkOption { + type = types.str; + default = "127.0.0.1"; + description = '' + The address for the server to listen on. + ''; + }; + + port = mkOption { + type = types.port; + default = 8553; + description = '' + The TCP port on which the server will listen. + ''; + }; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.osmscout-server" pkgs + lib.platforms.linux) + ]; + + systemd.user.services.osmscout-server = { + Unit = { Description = "OSM Scout Server"; }; + + Install = mkIf (!cfg.network.startWhenNeeded) { + WantedBy = [ "default.target" ]; + }; + + Service = { + ExecStart = "'${cfg.package}/bin/osmscout-server' --systemd --quiet"; + }; + }; + + systemd.user.sockets.osmscout-server = mkIf cfg.network.startWhenNeeded { + Unit = { Description = "OSM Scout Server Socket"; }; + + Socket = { + ListenStream = + "${cfg.network.listenAddress}:${toString cfg.network.port}"; + TriggerLimitIntervalSec = "60s"; + TriggerLimitBurst = 1; + }; + + Install = { WantedBy = [ "sockets.target" ]; }; + }; + + home.packages = [ cfg.package ]; + }; +} diff --git a/third_party/home-manager/modules/services/password-store-sync.nix b/third_party/home-manager/modules/services/password-store-sync.nix deleted file mode 100644 index dfff410f2d..0000000000 --- a/third_party/home-manager/modules/services/password-store-sync.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - serviceCfg = config.services.password-store-sync; - programCfg = config.programs.password-store; - -in { - meta.maintainers = with maintainers; [ pacien ]; - - options.services.password-store-sync = { - enable = mkEnableOption "Password store periodic sync"; - - frequency = mkOption { - type = types.str; - default = "*:0/5"; - description = '' - How often to synchronise the password store git repository with its - default upstream. - - This value is passed to the systemd timer configuration as the - `onCalendar` option. - See - {manpage}`systemd.time(7)` - for more information about the format. - ''; - }; - }; - - config = mkIf serviceCfg.enable { - assertions = [ - (hm.assertions.assertPlatform "services.password-store-sync" pkgs - platforms.linux) - - { - assertion = programCfg.enable; - message = "The 'services.password-store-sync' module requires" - + " 'programs.password-store.enable = true'."; - } - ]; - - systemd.user.services.password-store-sync = { - Unit = { Description = "Password store sync"; }; - - Service = { - CPUSchedulingPolicy = "idle"; - IOSchedulingClass = "idle"; - Environment = let - makeEnvironmentPairs = - mapAttrsToList (key: value: "${key}=${builtins.toJSON value}"); - in makeEnvironmentPairs programCfg.settings; - ExecStart = toString (pkgs.writeShellScript "password-store-sync" '' - ${pkgs.pass}/bin/pass git pull --rebase && \ - ${pkgs.pass}/bin/pass git push - ''); - }; - }; - - systemd.user.timers.password-store-sync = { - Unit = { Description = "Password store periodic sync"; }; - - Timer = { - Unit = "password-store-sync.service"; - OnCalendar = serviceCfg.frequency; - Persistent = true; - }; - - Install = { WantedBy = [ "timers.target" ]; }; - }; - }; -} diff --git a/third_party/home-manager/modules/services/pasystray.nix b/third_party/home-manager/modules/services/pasystray.nix index 32922ad0fa..4ea340d210 100644 --- a/third_party/home-manager/modules/services/pasystray.nix +++ b/third_party/home-manager/modules/services/pasystray.nix @@ -2,14 +2,26 @@ with lib; -{ +let cfg = config.services.pasystray; + +in { meta.maintainers = [ hm.maintainers.pltanton ]; options = { - services.pasystray = { enable = mkEnableOption "PulseAudio system tray"; }; + services.pasystray = { + enable = mkEnableOption "PulseAudio system tray"; + + extraOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + description = '' + Extra command-line arguments to pass to {command}`pasystray`. + ''; + }; + }; }; - config = mkIf config.services.pasystray.enable { + config = mkIf cfg.enable { assertions = [ (hm.assertions.assertPlatform "services.pasystray" pkgs platforms.linux) ]; @@ -28,7 +40,8 @@ with lib; Environment = let toolPaths = makeBinPath [ pkgs.paprefs pkgs.pavucontrol ]; in [ "PATH=${toolPaths}" ]; - ExecStart = "${pkgs.pasystray}/bin/pasystray"; + ExecStart = escapeShellArgs + ([ "${pkgs.pasystray}/bin/pasystray" ] ++ cfg.extraOptions); }; }; }; diff --git a/third_party/home-manager/modules/services/picom.nix b/third_party/home-manager/modules/services/picom.nix index e136880964..1d9b7bb559 100644 --- a/third_party/home-manager/modules/services/picom.nix +++ b/third_party/home-manager/modules/services/picom.nix @@ -5,7 +5,7 @@ let inherit (lib) boolToString concatMapStringsSep concatStringsSep escape literalExpression mapAttrsToList mkEnableOption mkRenamedOptionModule mkRemovedOptionModule - mkDefault mkIf mkOption optional types warn; + mkDefault mkIf mkOption optional types warn getExe; cfg = config.services.picom; opt = options.services.picom; @@ -318,7 +318,7 @@ in { Service = { ExecStart = concatStringsSep " " ([ - "${cfg.package}/bin/picom" + "${getExe cfg.package}" "--config ${config.xdg.configFile."picom/picom.conf".source}" ] ++ cfg.extraArgs); Restart = "always"; diff --git a/third_party/home-manager/modules/services/recoll.nix b/third_party/home-manager/modules/services/recoll.nix index e4159d2842..2c50427028 100644 --- a/third_party/home-manager/modules/services/recoll.nix +++ b/third_party/home-manager/modules/services/recoll.nix @@ -85,7 +85,7 @@ in { default = pkgs.recoll; defaultText = literalExpression "pkgs.recoll"; description = '' - Package providing the `recoll` binary. + Package providing the {command}`recoll` binary. ''; example = literalExpression "(pkgs.recoll.override { withGui = false; })"; }; @@ -96,8 +96,7 @@ in { example = "00/2:00"; description = '' When or how often the periodic update should run. Must be the format - described from - {manpage}`systemd.time(7)`. + described from {manpage}`systemd.time(7)`. ''; }; @@ -105,11 +104,9 @@ in { type = settingsFormat.type; default = { }; description = '' - The configuration to be written at - {file}`''${config.services.recoll.configDir}/recoll.conf`. + The configuration to be written at {file}`$RECOLL_CONFDIR/recoll.conf`. - See - {manpage}`recoll(5)` for more details about the configuration. + See {manpage}`recoll.conf(5)` for more details about the configuration. ''; example = literalExpression '' { @@ -135,7 +132,7 @@ in { example = literalExpression "\${config.xdg.configHome}/recoll"; description = '' The directory to contain Recoll configuration files. This will be set - as `RECOLL_CONFDIR`. + as {env}`RECOLL_CONFDIR`. ''; }; }; diff --git a/third_party/home-manager/modules/services/signaturepdf.nix b/third_party/home-manager/modules/services/signaturepdf.nix new file mode 100644 index 0000000000..ef30e62871 --- /dev/null +++ b/third_party/home-manager/modules/services/signaturepdf.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.signaturepdf; + extraConfigToArgs = extraConfig: + lib.flatten + (lib.mapAttrsToList (name: value: [ "-d" "${name}=${value}" ]) extraConfig); +in { + meta.maintainers = [ lib.maintainers.DamienCassou ]; + + options.services.signaturepdf = with lib; { + enable = mkEnableOption + "signaturepdf; signing, organizing, editing metadatas or compressing PDFs"; + + package = mkOption { + type = types.package; + default = pkgs.signaturepdf; + defaultText = "pkgs.signaturepdf"; + description = "signaturepdf derivation to use."; + }; + + port = mkOption { + type = types.port; + default = 8080; + example = 8081; + description = "The port on which the application runs"; + }; + + extraConfig = mkOption { + default = { }; + type = with types; + let primitive = oneOf [ str int bool float ]; + in attrsOf primitive; + example = { + upload_max_filesize = "24M"; + post_max_size = "24M"; + max_file_uploads = "201"; + }; + description = "Additional configuration optional."; + }; + }; + + config = lib.mkIf cfg.enable { + xdg.desktopEntries = { + signaturepdf = { + name = "SignaturePDF"; + exec = "${pkgs.xdg-utils}/bin/xdg-open http://localhost:${ + toString cfg.port + }"; + terminal = false; + icon = "${cfg.package}/share/signaturepdf/public/favicon.ico"; + }; + }; + + systemd.user.services.signaturepdf = { + Unit = { + Description = + "signaturepdf; signing, organizing, editing metadatas or compressing PDFs"; + }; + + Service = { + ExecStart = "${cfg.package}/bin/signaturepdf ${toString cfg.port} ${ + lib.escapeShellArgs (extraConfigToArgs cfg.extraConfig) + }"; + }; + + Install = { WantedBy = [ "default.target" ]; }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/swayidle.nix b/third_party/home-manager/modules/services/swayidle.nix index 6e8b55cb83..b28de6f0ee 100644 --- a/third_party/home-manager/modules/services/swayidle.nix +++ b/third_party/home-manager/modules/services/swayidle.nix @@ -74,6 +74,7 @@ in { example = literalExpression '' [ { timeout = 60; command = "${pkgs.swaylock}/bin/swaylock -fF"; } + { timeout = 90; command = "${pkgs.systemd}/bin/systemctl suspend"; } ] ''; description = "List of commands to run after idle timeout."; @@ -84,7 +85,7 @@ in { default = [ ]; example = literalExpression '' [ - { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } + { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; } { event = "lock"; command = "lock"; } ] ''; @@ -99,7 +100,8 @@ in { systemdTarget = mkOption { type = types.str; - default = "sway-session.target"; + default = "graphical-session.target"; + example = "sway-session.target"; description = '' Systemd target to bind to. ''; @@ -121,6 +123,7 @@ in { Service = { Type = "simple"; + Restart = "always"; # swayidle executes commands using "sh -c", so the PATH needs to contain a shell. Environment = [ "PATH=${makeBinPath [ pkgs.bash ]}" ]; ExecStart = diff --git a/third_party/home-manager/modules/services/sxhkd.nix b/third_party/home-manager/modules/services/sxhkd.nix index e955d00b16..cec453a0a8 100644 --- a/third_party/home-manager/modules/services/sxhkd.nix +++ b/third_party/home-manager/modules/services/sxhkd.nix @@ -75,7 +75,7 @@ in { sxhkdCommand = "${cfg.package}/bin/sxhkd ${toString cfg.extraOptions}"; in '' systemctl --user stop sxhkd.scope 2> /dev/null || true - systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd ${sxhkdCommand} & + systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd ${sxhkdCommand} & ''; }; } diff --git a/third_party/home-manager/modules/services/unison.nix b/third_party/home-manager/modules/services/unison.nix index 7f8a47a627..452360a646 100644 --- a/third_party/home-manager/modules/services/unison.nix +++ b/third_party/home-manager/modules/services/unison.nix @@ -65,9 +65,10 @@ let serialiseArgs = args: concatStringsSep " " (mapAttrsToList serialiseArg args); + unitName = name: "unison-pair-${name}"; + makeDefs = gen: - mapAttrs' - (name: pairCfg: nameValuePair "unison-pair-${name}" (gen name pairCfg)) + mapAttrs' (name: pairCfg: nameValuePair (unitName name) (gen name pairCfg)) cfg.pairs; in { @@ -76,6 +77,10 @@ in { options.services.unison = { enable = mkEnableOption "Unison synchronisation"; + package = mkPackageOption pkgs "unison" { + example = "pkgs.unison.override { enableX11 = false; }"; + }; + pairs = mkOption { type = with types; attrsOf (submodule pairOptions); default = { }; @@ -102,28 +107,27 @@ in { ]; systemd.user.services = makeDefs (name: pairCfg: { - Unit = { - Description = "Unison pair sync (${name})"; - # Retry forever, useful in case of network disruption. - StartLimitIntervalSec = 0; - }; - + Unit.Description = "Unison pair sync (${name})"; Service = { - Restart = "always"; - RestartSec = 60; - CPUSchedulingPolicy = "idle"; IOSchedulingClass = "idle"; - Environment = [ "UNISON='${toString pairCfg.stateDirectory}'" ]; ExecStart = '' - ${pkgs.unison}/bin/unison \ + ${cfg.package}/bin/unison \ ${serialiseArgs pairCfg.commandOptions} \ ${strings.concatMapStringsSep " " escapeShellArg pairCfg.roots} ''; }; + }); - Install = { WantedBy = [ "default.target" ]; }; + systemd.user.timers = makeDefs (name: pairCfg: { + Unit.Description = "Unison pair sync auto-restart (${name})"; + Install.WantedBy = [ "timers.target" ]; + Timer = { + Unit = "${unitName name}.service"; + OnActiveSec = 1; + OnUnitInactiveSec = 60; + }; }); }; } diff --git a/third_party/home-manager/modules/services/window-managers/fluxbox.nix b/third_party/home-manager/modules/services/window-managers/fluxbox.nix index 99dfa50e04..c06b14d609 100644 --- a/third_party/home-manager/modules/services/window-managers/fluxbox.nix +++ b/third_party/home-manager/modules/services/window-managers/fluxbox.nix @@ -107,8 +107,7 @@ in { mkIf (cfg.windowmenu != "") { text = cfg.windowmenu; }; }; - xsession.windowManager.command = concatStringsSep " " - ([ "${cfg.package}/bin/fluxbox" ] - ++ escapeShellArgs (remove "" cfg.extraCommandLineArgs)); + xsession.windowManager.command = escapeShellArgs + ([ "${cfg.package}/bin/fluxbox" ] ++ remove "" cfg.extraCommandLineArgs); }; } diff --git a/third_party/home-manager/modules/services/window-managers/hyprland.nix b/third_party/home-manager/modules/services/window-managers/hyprland.nix index 41ceb356c0..9bf9cb2946 100644 --- a/third_party/home-manager/modules/services/window-managers/hyprland.nix +++ b/third_party/home-manager/modules/services/window-managers/hyprland.nix @@ -3,6 +3,13 @@ let cfg = config.wayland.windowManager.hyprland; + variables = builtins.concatStringsSep " " cfg.systemd.variables; + extraCommands = builtins.concatStringsSep " " + (map (f: "&& ${f}") cfg.systemd.extraCommands); + systemdActivation = '' + exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd ${variables} ${extraCommands} + ''; + in { meta.maintainers = [ lib.maintainers.fufexan ]; @@ -11,15 +18,23 @@ in { imports = [ (lib.mkRemovedOptionModule # \ [ "wayland" "windowManager" "hyprland" "disableAutoreload" ] - "Autoreloading now always happen") + "Autoreloading now always happens") (lib.mkRemovedOptionModule # \ [ "wayland" "windowManager" "hyprland" "recommendedEnvironment" ] "Recommended environment variables are now always set") + (lib.mkRemovedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "xwayland" "hidpi" ] + "HiDPI patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland") + (lib.mkRenamedOptionModule # \ [ "wayland" "windowManager" "hyprland" "nvidiaPatches" ] # \ [ "wayland" "windowManager" "hyprland" "enableNvidiaPatches" ]) + + (lib.mkRenamedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \ + [ "wayland" "windowManager" "hyprland" "systemd" "enable" ]) ]; options.wayland.windowManager.hyprland = { @@ -32,8 +47,7 @@ in { readOnly = true; default = cfg.package.override { enableXWayland = cfg.xwayland.enable; - hidpiXWayland = cfg.xwayland.hidpi; - nvidiaPatches = cfg.enableNvidiaPatches; + enableNvidiaPatches = cfg.enableNvidiaPatches; }; defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration"; @@ -51,31 +65,48 @@ in { ''; }; - systemdIntegration = lib.mkOption { - type = lib.types.bool; - default = pkgs.stdenv.isLinux; - description = '' - Whether to enable {file}`hyprland-session.target` on - hyprland startup. This links to `graphical-session.target`. - Some important environment variables will be imported to systemd - and dbus user environment before reaching the target, including - - `DISPLAY` - - `HYPRLAND_INSTANCE_SIGNATURE` - - `WAYLAND_DISPLAY` - - `XDG_CURRENT_DESKTOP` - ''; - }; - - xwayland = { - enable = lib.mkEnableOption "XWayland" // { default = true; }; - hidpi = lib.mkEnableOption null // { + systemd = { + enable = lib.mkEnableOption null // { + default = true; description = '' - Enable HiDPI XWayland, based on [XWayland MR 733](https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733). - See for more info. + Whether to enable {file}`hyprland-session.target` on + hyprland startup. This links to `graphical-session.target`. + Some important environment variables will be imported to systemd + and D-Bus user environment before reaching the target, including + - `DISPLAY` + - `HYPRLAND_INSTANCE_SIGNATURE` + - `WAYLAND_DISPLAY` + - `XDG_CURRENT_DESKTOP` ''; }; + + variables = lib.mkOption { + type = with lib.types; listOf str; + default = [ + "DISPLAY" + "HYPRLAND_INSTANCE_SIGNATURE" + "WAYLAND_DISPLAY" + "XDG_CURRENT_DESKTOP" + ]; + example = [ "-all" ]; + description = '' + Environment variables to be imported in the systemd & D-Bus user + environment. + ''; + }; + + extraCommands = lib.mkOption { + type = with lib.types; listOf str; + default = [ + "systemctl --user stop hyprland-session.target" + "systemctl --user start hyprland-session.target" + ]; + description = "Extra commands to be run after D-Bus activation."; + }; }; + xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; }; + enableNvidiaPatches = lib.mkEnableOption "patching wlroots for better Nvidia support"; @@ -144,6 +175,12 @@ in { Extra configuration lines to add to `~/.config/hypr/hyprland.conf`. ''; }; + + sourceFirst = lib.mkEnableOption '' + putting source entries at the top of the configuration + '' // { + default = true; + }; }; config = lib.mkIf cfg.enable { @@ -153,10 +190,10 @@ in { ]; warnings = let - inconsistent = (cfg.systemdIntegration || cfg.plugins != [ ]) + inconsistent = (cfg.systemd.enable || cfg.plugins != [ ]) && cfg.extraConfig == "" && cfg.settings == { }; warning = - "You have enabled hyprland.systemdIntegration or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake."; + "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; @@ -172,7 +209,7 @@ in { in map mkEntry cfg.plugins; }; - shouldGenerate = cfg.systemdIntegration || cfg.extraConfig != "" + shouldGenerate = cfg.systemd.enable || cfg.extraConfig != "" || combinedSettings != { }; toHyprconf = with lib; @@ -191,32 +228,32 @@ in { inherit indent; }; allFields = filterAttrs (n: v: !(isAttrs v)) attrs; - importantFields = - filterAttrs (n: _: (hasPrefix "$" n) || (hasPrefix "bezier" n)) - allFields; + importantFields = filterAttrs (n: _: + (hasPrefix "$" n) || (hasPrefix "bezier" n) || (n == "plugin") + || (cfg.sourceFirst && (hasPrefix "source" n))) allFields; fields = builtins.removeAttrs allFields (mapAttrsToList (n: _: n) importantFields); in mkFields importantFields + concatStringsSep "\n" (mapAttrsToList mkSection sections) + mkFields fields; in lib.mkIf shouldGenerate { - text = lib.optionalString cfg.systemdIntegration '' - exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target - '' + lib.optionalString (combinedSettings != { }) + text = lib.optionalString cfg.systemd.enable systemdActivation + + lib.optionalString (combinedSettings != { }) (toHyprconf combinedSettings 0) + lib.optionalString (cfg.extraConfig != "") cfg.extraConfig; + onChange = lib.mkIf (cfg.package != null) '' - ( # execute in subshell so that `shopt` won't affect other scripts - shopt -s nullglob # so that nothing is done if /tmp/hypr/ does not exist or is empty - for instance in /tmp/hypr/*; do - HYPRLAND_INSTANCE_SIGNATURE=''${instance##*/} ${cfg.finalPackage}/bin/hyprctl reload config-only \ - || true # ignore dead instance(s) + ( # Execute in subshell so we don't poision environment with vars + # This var must be set for hyprctl to function, but the value doesn't matter. + export HYPRLAND_INSTANCE_SIGNATURE="bogus" + for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do + HYPRLAND_INSTANCE_SIGNATURE=$i ${cfg.finalPackage}/bin/hyprctl reload config-only done ) ''; }; - systemd.user.targets.hyprland-session = lib.mkIf cfg.systemdIntegration { + systemd.user.targets.hyprland-session = lib.mkIf cfg.systemd.enable { Unit = { Description = "Hyprland compositor session"; Documentation = [ "man:systemd.special(7)" ]; @@ -225,5 +262,12 @@ in { After = [ "graphical-session-pre.target" ]; }; }; + + systemd.user.targets.tray = { + Unit = { + Description = "Home Manager System Tray"; + Requires = [ "graphical-session-pre.target" ]; + }; + }; }; } diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix index b9182439c8..1f6820f5de 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix @@ -290,7 +290,8 @@ let trayOutput = mkNullableOption { type = types.str; - default = "primary"; + # Sway/Wayland doesn't have the concept of a primary output. The default for sway is to show it on all outputs + default = if isI3 then "primary" else "*"; description = "Where to output tray."; }; diff --git a/third_party/home-manager/modules/systemd.nix b/third_party/home-manager/modules/systemd.nix index 22490218e0..041b9dfacb 100644 --- a/third_party/home-manager/modules/systemd.nix +++ b/third_party/home-manager/modules/systemd.nix @@ -4,12 +4,20 @@ let cfg = config.systemd.user; - inherit (lib) getAttr hm isBool literalExpression mkIf mkMerge mkOption types; + inherit (lib) + any attrValues getAttr hm isBool literalExpression mkIf mkMerge mkOption + types; + + settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; # From mkPathSafeName = lib.replaceStrings [ "@" ":" "\\" "[" "]" ] [ "-" "-" "-" "" "" ]; + removeIfEmpty = attrs: names: + lib.filterAttrs (name: value: !(builtins.elem name names) || value != "") + attrs; + toSystemdIni = lib.generators.toINI { listsAsDuplicateKeys = true; mkKeyValue = key: value: @@ -87,6 +95,11 @@ let + "\n"; }; + settings = mkIf (any (v: v != { }) (attrValues cfg.settings)) { + "systemd/user.conf".source = + settingsFormat.generate "user.conf" cfg.settings; + }; + in { meta.maintainers = [ lib.maintainers.rycee ]; @@ -209,6 +222,64 @@ in { {manpage}`environment.d(5)`. ''; }; + + settings = mkOption { + apply = sections: + sections // { + # Setting one of these to an empty value would reset any + # previous settings, so we’ll remove them instead if they + # are not explicitly set. + Manager = removeIfEmpty sections.Manager [ + "ManagerEnvironment" + "DefaultEnvironment" + ]; + }; + + type = types.submodule { + freeformType = settingsFormat.type; + + options = let + inherit (lib) concatStringsSep escapeShellArg mapAttrsToList; + environmentOption = args: + mkOption { + type = with types; + attrsOf (nullOr (oneOf [ str path package ])); + default = { }; + example = literalExpression '' + { + PATH = "%u/bin:%u/.cargo/bin"; + } + ''; + apply = value: + concatStringsSep " " + (mapAttrsToList (n: v: "${n}=${escapeShellArg v}") value); + } // args; + in { + Manager = { + DefaultEnvironment = environmentOption { + description = '' + Configures environment variables passed to all executed processes. + ''; + }; + ManagerEnvironment = environmentOption { + description = '' + Sets environment variables just for the manager process itself. + ''; + }; + }; + }; + }; + default = { }; + example = literalExpression '' + { + Manager.DefaultCPUAccounting = true; + } + ''; + description = '' + Extra config options for user session service manager. See {manpage}`systemd-user.conf(5)` for + available options. + ''; + }; }; }; @@ -227,6 +298,8 @@ in { ++ (buildServices "automount" cfg.automounts))) sessionVariables + + settings ]; # Run systemd service reload if user is logged in. If we're diff --git a/third_party/home-manager/nixos/common.nix b/third_party/home-manager/nixos/common.nix index 38c5aabb4a..5da3240b97 100644 --- a/third_party/home-manager/nixos/common.nix +++ b/third_party/home-manager/nixos/common.nix @@ -94,20 +94,23 @@ in { }; }; - config = mkIf (cfg.users != { }) { - warnings = flatten (flip mapAttrsToList cfg.users (user: config: - flip map config.warnings (warning: "${user} profile: ${warning}"))); + config = (mkMerge [ + # Fix potential recursion when configuring home-manager users based on values in users.users #594 + (mkIf (cfg.useUserPackages && cfg.users != { }) { + users.users = + (mapAttrs (username: usercfg: { packages = [ usercfg.home.path ]; }) + cfg.users); + environment.pathsToLink = [ "/etc/profile.d" ]; + }) + (mkIf (cfg.users != { }) { + warnings = flatten (flip mapAttrsToList cfg.users (user: config: + flip map config.warnings (warning: "${user} profile: ${warning}"))); - assertions = flatten (flip mapAttrsToList cfg.users (user: config: - flip map config.assertions (assertion: { - inherit (assertion) assertion; - message = "${user} profile: ${assertion.message}"; - }))); - - users.users = mkIf cfg.useUserPackages - (mapAttrs (username: usercfg: { packages = [ usercfg.home.path ]; }) - cfg.users); - - environment.pathsToLink = mkIf cfg.useUserPackages [ "/etc/profile.d" ]; - }; + assertions = flatten (flip mapAttrsToList cfg.users (user: config: + flip map config.assertions (assertion: { + inherit (assertion) assertion; + message = "${user} profile: ${assertion.message}"; + }))); + }) + ]); } diff --git a/third_party/home-manager/nixos/default.nix b/third_party/home-manager/nixos/default.nix index 736a787df3..95d5943fcb 100644 --- a/third_party/home-manager/nixos/default.nix +++ b/third_party/home-manager/nixos/default.nix @@ -49,7 +49,7 @@ in { User = usercfg.home.username; Type = "oneshot"; RemainAfterExit = "yes"; - TimeoutStartSec = 90; + TimeoutStartSec = "5m"; SyslogIdentifier = "hm-activate-${username}"; ExecStart = let diff --git a/third_party/home-manager/release.json b/third_party/home-manager/release.json index 5675c269e0..c5b5ecfdd3 100644 --- a/third_party/home-manager/release.json +++ b/third_party/home-manager/release.json @@ -1,4 +1,4 @@ { - "release": "23.11", + "release": "24.05", "isReleaseBranch": false } diff --git a/third_party/home-manager/tests/default.nix b/third_party/home-manager/tests/default.nix index 33331264bf..d5a5be7065 100644 --- a/third_party/home-manager/tests/default.nix +++ b/third_party/home-manager/tests/default.nix @@ -62,12 +62,15 @@ import nmt { ./modules/programs/aria2 ./modules/programs/atuin ./modules/programs/autojump + ./modules/programs/bacon ./modules/programs/bash ./modules/programs/bat ./modules/programs/bottom ./modules/programs/broot ./modules/programs/browserpass ./modules/programs/btop + ./modules/programs/carapace + ./modules/programs/cava ./modules/programs/comodoro ./modules/programs/darcs ./modules/programs/dircolors @@ -78,9 +81,11 @@ import nmt { ./modules/programs/gallery-dl ./modules/programs/gh ./modules/programs/gh-dash - ./modules/programs/git-cliff ./modules/programs/git + ./modules/programs/git-cliff ./modules/programs/gpg + ./modules/programs/gradle + ./modules/programs/granted ./modules/programs/helix ./modules/programs/himalaya ./modules/programs/htop @@ -90,11 +95,13 @@ import nmt { ./modules/programs/jujutsu ./modules/programs/k9s ./modules/programs/kakoune - ./modules/programs/kitty ./modules/programs/khal + ./modules/programs/khard + ./modules/programs/kitty ./modules/programs/ledger ./modules/programs/less ./modules/programs/lf + ./modules/programs/lsd ./modules/programs/lieer ./modules/programs/man ./modules/programs/mbsync @@ -112,6 +119,7 @@ import nmt { ./modules/programs/nnn ./modules/programs/nushell ./modules/programs/oh-my-posh + ./modules/programs/openstackclient ./modules/programs/pandoc ./modules/programs/papis ./modules/programs/pet @@ -120,20 +128,25 @@ import nmt { ./modules/programs/powerline-go ./modules/programs/pubs ./modules/programs/pyenv + ./modules/programs/qcal ./modules/programs/qutebrowser ./modules/programs/readline + ./modules/programs/rio ./modules/programs/ripgrep ./modules/programs/rtx + ./modules/programs/ruff ./modules/programs/sagemath + ./modules/programs/sapling ./modules/programs/sbt ./modules/programs/scmpuff + ./modules/programs/sftpman ./modules/programs/sioyek ./modules/programs/sm64ex ./modules/programs/ssh ./modules/programs/starship - ./modules/services/syncthing/common ./modules/programs/taskwarrior ./modules/programs/texlive + ./modules/programs/thefuck ./modules/programs/tmate ./modules/programs/tmux ./modules/programs/topgrade @@ -142,9 +155,11 @@ import nmt { ./modules/programs/vscode ./modules/programs/watson ./modules/programs/wezterm + ./modules/programs/yazi ./modules/programs/zellij ./modules/programs/zplug ./modules/programs/zsh + ./modules/services/syncthing/common ./modules/xresources ] ++ lib.optionals isDarwin [ ./modules/launchd @@ -164,7 +179,9 @@ import nmt { ./modules/misc/xsession ./modules/programs/abook ./modules/programs/autorandr + ./modules/programs/awscli ./modules/programs/beets # One test relies on services.mpd + ./modules/programs/bemenu ./modules/programs/borgmatic ./modules/programs/boxxy ./modules/programs/firefox @@ -173,29 +190,35 @@ import nmt { ./modules/programs/getmail ./modules/programs/gnome-terminal ./modules/programs/hexchat + ./modules/programs/i3blocks ./modules/programs/i3status-rust ./modules/programs/imv ./modules/programs/kodi ./modules/programs/looking-glass-client ./modules/programs/mangohud ./modules/programs/ncmpcpp-linux + ./modules/programs/pqiv ./modules/programs/rbw ./modules/programs/rofi ./modules/programs/rofi-pass ./modules/programs/swaylock + ./modules/programs/swayr ./modules/programs/terminator ./modules/programs/thunderbird ./modules/programs/waybar ./modules/programs/wlogout ./modules/programs/wofi + ./modules/programs/wpaperd ./modules/programs/xmobar ./modules/programs/yt-dlp ./modules/services/avizo ./modules/services/barrier ./modules/services/borgmatic ./modules/services/cachix-agent + ./modules/services/cliphist ./modules/services/clipman ./modules/services/comodoro + ./modules/services/darkman ./modules/services/devilspie2 ./modules/services/dropbox ./modules/services/emacs @@ -213,11 +236,13 @@ import nmt { ./modules/services/lieer ./modules/services/mopidy ./modules/services/mpd - ./modules/services/mpdris2 ./modules/services/mpd-mpris + ./modules/services/mpdris2 + ./modules/services/osmscout-server ./modules/services/pantalaimon ./modules/services/parcellite ./modules/services/pass-secret-service + ./modules/services/pasystray ./modules/services/pbgopy ./modules/services/picom ./modules/services/playerctld @@ -225,6 +250,7 @@ import nmt { ./modules/services/recoll ./modules/services/redshift-gammastep ./modules/services/screen-locker + ./modules/services/signaturepdf ./modules/services/swayidle ./modules/services/swayosd ./modules/services/sxhkd diff --git a/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix b/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix index cdf707de6c..7710aa3c51 100644 --- a/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix +++ b/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix @@ -6,9 +6,11 @@ buildScript = '' mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart touch $out/bin/fcitx5 \ + $out/bin/fcitx5-config-qt \ $out/share/applications/org.fcitx.Fcitx5.desktop \ $out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop - chmod +x $out/bin/fcitx5 + chmod +x $out/bin/fcitx5 \ + $out/bin/fcitx5-config-qt ''; }; fcitx5-configtool = { outPath = null; }; diff --git a/third_party/home-manager/tests/modules/misc/manual/manual.nix b/third_party/home-manager/tests/modules/misc/manual/manual.nix index eb70374a34..1e79cdb7ad 100644 --- a/third_party/home-manager/tests/modules/misc/manual/manual.nix +++ b/third_party/home-manager/tests/modules/misc/manual/manual.nix @@ -9,11 +9,14 @@ }; nmt.script = '' - assertFileExists home-path/share/doc/home-manager/index.html - assertFileExists home-path/share/doc/home-manager/options.html + assertFileExists home-path/share/doc/home-manager/index.xhtml assertFileExists home-path/share/doc/home-manager/options.json - assertFileExists home-path/share/man/man1/home-manager.1.gz - assertFileExists home-path/share/man/man5/home-configuration.nix.5.gz + assertFileExists home-path/share/doc/home-manager/options.xhtml + assertFileExists home-path/share/doc/home-manager/nixos-options.xhtml + assertFileExists home-path/share/doc/home-manager/nix-darwin-options.xhtml + assertFileExists home-path/share/doc/home-manager/release-notes.xhtml + assertFileExists home-path/share/man/man1/home-manager.1 + assertFileExists home-path/share/man/man5/home-configuration.nix.5 ''; }; } diff --git a/third_party/home-manager/tests/modules/misc/qt/default.nix b/third_party/home-manager/tests/modules/misc/qt/default.nix index c676b784e5..da27bf31f0 100644 --- a/third_party/home-manager/tests/modules/misc/qt/default.nix +++ b/third_party/home-manager/tests/modules/misc/qt/default.nix @@ -1,4 +1,6 @@ { + qt-basic = ./qt-basic.nix; qt-platform-theme-gtk = ./qt-platform-theme-gtk.nix; + qt-platform-theme-gtk3 = ./qt-platform-theme-gtk3.nix; qt-platform-theme-gnome = ./qt-platform-theme-gnome.nix; } diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix b/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix new file mode 100644 index 0000000000..9ddddb3574 --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + qt.enable = true; + + nmt.script = '' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QT_PLUGIN_PATH' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QML2_IMPORT_PATH' + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix index 58b4cd7a1f..d95ef704a2 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix @@ -15,6 +15,10 @@ 'QT_QPA_PLATFORMTHEME="gnome"' assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ 'QT_STYLE_OVERRIDE="adwaita"' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QT_PLUGIN_PATH' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QML2_IMPORT_PATH' ''; }; } diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix index d332465283..070c8020a2 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix @@ -6,10 +6,15 @@ enable = true; platformTheme = "gtk"; }; + i18n.inputMethod.enabled = "fcitx5"; nmt.script = '' assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ 'QT_QPA_PLATFORMTHEME="gtk2"' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QT_PLUGIN_PATH' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QML2_IMPORT_PATH' ''; }; } diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix new file mode 100644 index 0000000000..2b3ade9dd2 --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + qt = { + enable = true; + platformTheme = "gtk3"; + }; + + nmt.script = '' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QT_QPA_PLATFORMTHEME="gtk3"' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QT_PLUGIN_PATH' + assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ + 'QML2_IMPORT_PATH' + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/misc/xdg/default.nix b/third_party/home-manager/tests/modules/misc/xdg/default.nix index 4cce5bafc6..bc2f9a9dfa 100644 --- a/third_party/home-manager/tests/modules/misc/xdg/default.nix +++ b/third_party/home-manager/tests/modules/misc/xdg/default.nix @@ -5,4 +5,5 @@ xdg-file-gen = ./file-gen.nix; xdg-default-locations = ./default-locations.nix; xdg-user-dirs-null = ./user-dirs-null.nix; + xdg-portal = ./portal.nix; } diff --git a/third_party/home-manager/tests/modules/misc/xdg/portal.nix b/third_party/home-manager/tests/modules/misc/xdg/portal.nix new file mode 100644 index 0000000000..5c6e469958 --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/xdg/portal.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +lib.mkIf config.test.enableBig { + xdg.portal = { + enable = true; + extraPortals = + [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-wlr ]; + configPackages = [ pkgs.hyprland ]; + config = { sway.default = [ "wlr" "gtk" ]; }; + }; + + nmt.script = '' + xdgDesktopPortal=home-files/.config/systemd/user/xdg-desktop-portal.service + assertFileExists $xdgDesktopPortal + + xdgDesktopPortalWlr=home-path/share/systemd/user/xdg-desktop-portal-wlr.service + assertFileExists $xdgDesktopPortalWlr + + xdgDesktopPortalHyprland=home-path/share/systemd/user/xdg-desktop-portal-hyprland.service + assertFileExists $xdgDesktopPortalHyprland + + portalsDir="$(cat $TESTED/$xdgDesktopPortal | grep Environment=XDG_DESKTOP_PORTAL_DIR | cut -d '=' -f3)" + portalConfigsDir="$(cat $TESTED/$xdgDesktopPortal | grep Environment=NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR | cut -d '=' -f3)" + + assertFileContent $portalsDir/hyprland.portal \ + ${pkgs.xdg-desktop-portal-hyprland}/share/xdg-desktop-portal/portals/hyprland.portal + + assertFileContent $portalsDir/wlr.portal \ + ${pkgs.xdg-desktop-portal-wlr}/share/xdg-desktop-portal/portals/wlr.portal + + assertFileContent $portalConfigsDir/hyprland-portals.conf \ + ${pkgs.hyprland}/share/xdg-desktop-portal/hyprland-portals.conf + + assertFileContent $portalConfigsDir/sway-portals.conf \ + ${./sway-portals-expected.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/misc/xdg/sway-portals-expected.conf b/third_party/home-manager/tests/modules/misc/xdg/sway-portals-expected.conf new file mode 100644 index 0000000000..476f6b4549 --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/xdg/sway-portals-expected.conf @@ -0,0 +1,2 @@ +[preferred] +default=wlr;gtk diff --git a/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected b/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected index 172e3452fc..0697d9611a 100644 --- a/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected +++ b/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected @@ -54,9 +54,17 @@ from = Foo Bar outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42 outgoing-cred-cmd = echo PaSsWorD! -[i_maildir-mbsync] +[i1_maildir-mbsync] from = Foo Bar -source = maildir:///home/hm-user/Maildir/i_maildir-mbsync +source = maildir:///home/hm-user/Maildir/i1_maildir-mbsync + +[i2_maildirpp-mbsync] +from = Foo Bar +source = maildirpp:///home/hm-user/Maildir/i2_maildirpp-mbsync/Inbox + +[i3_maildir_flatten-mbsync] +from = Foo Bar +source = maildir:///home/hm-user/Maildir/i3_maildir_flatten-mbsync [j_maildir-offlineimap] from = Foo Bar diff --git a/third_party/home-manager/tests/modules/programs/aerc/settings.nix b/third_party/home-manager/tests/modules/programs/aerc/settings.nix index fa385655ae..af4d16f70a 100644 --- a/third_party/home-manager/tests/modules/programs/aerc/settings.nix +++ b/third_party/home-manager/tests/modules/programs/aerc/settings.nix @@ -4,7 +4,11 @@ with lib; { config = { - nmt.script = let dir = "home-files/.config/aerc"; + nmt.script = let + dir = if (pkgs.stdenv.isDarwin && !config.xdg.enable) then + "home-files/Library/Preferences/aerc" + else + "home-files/.config/aerc"; in '' assertFileContent ${dir}/accounts.conf ${./extraAccounts.expected} assertFileContent ${dir}/binds.conf ${./extraBinds.expected} @@ -198,7 +202,16 @@ with lib; tls.useStartTls = true; }; }; - i_maildir-mbsync = basics // { mbsync.enable = true; }; + i1_maildir-mbsync = basics // { mbsync.enable = true; }; + i2_maildirpp-mbsync = basics // { + mbsync.enable = true; + mbsync.subFolders = "Maildir++"; + }; + i3_maildir_flatten-mbsync = basics // { + mbsync.enable = true; + mbsync.subFolders = "Maildir++"; + mbsync.flatten = "."; + }; j_maildir-offlineimap = basics // { offlineimap.enable = true; }; k_notEnabled = basics // { aerc.enable = false; }; l_smtp-auth-none = basics // { diff --git a/third_party/home-manager/tests/modules/programs/alacritty/default.nix b/third_party/home-manager/tests/modules/programs/alacritty/default.nix index 3ccd9a91f3..e5445439d7 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/default.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/default.nix @@ -2,4 +2,5 @@ alacritty-example-settings = ./example-settings.nix; alacritty-empty-settings = ./empty-settings.nix; alacritty-merging-settings = ./settings-merging.nix; + alacritty-toml-config = ./toml_config.nix; } diff --git a/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml b/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml new file mode 100644 index 0000000000..723f1874c8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml @@ -0,0 +1,8 @@ +[[keyboard.bindings]] +chars = "\x0c" +key = "K" +mods = "Control" + +[window.dimensions] +columns = 200 +lines = 3 diff --git a/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.yml b/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.yml deleted file mode 100644 index 061624192c..0000000000 --- a/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.yml +++ /dev/null @@ -1 +0,0 @@ -{"key_bindings":[{"chars":"\x0c","key":"K","mods":"Control"}],"window":{"dimensions":{"columns":200,"lines":3}}} \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix b/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix index 61b8b4b4e5..8aa013808c 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix @@ -6,7 +6,7 @@ with lib; config = { programs.alacritty = { enable = true; - package = config.lib.test.mkStubPackage { }; + package = config.lib.test.mkStubPackage { version = "0.13.0"; }; settings = { window.dimensions = { @@ -14,7 +14,7 @@ with lib; columns = 200; }; - key_bindings = [{ + keyboard.bindings = [{ key = "K"; mods = "Control"; chars = "\\x0c"; @@ -24,8 +24,8 @@ with lib; nmt.script = '' assertFileContent \ - home-files/.config/alacritty/alacritty.yml \ - ${./example-settings-expected.yml} + home-files/.config/alacritty/alacritty.toml \ + ${./example-settings-expected.toml} ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix b/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix index c7962fb52f..76aedf4f64 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix @@ -6,7 +6,7 @@ with lib; config = { programs.alacritty = { enable = true; - package = config.lib.test.mkStubPackage { }; + package = config.lib.test.mkStubPackage { version = "0.12.3"; }; settings = { window.dimensions = { diff --git a/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml b/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml new file mode 100644 index 0000000000..9b0867ee70 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml @@ -0,0 +1,15 @@ +[font] +[font.bold] +family = "SFMono" + +[font.normal] +family = "SFMono" + +[[keyboard.bindings]] +chars = "\x0c" +key = "K" +mods = "Control" + +[window.dimensions] +columns = 200 +lines = 3 diff --git a/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix b/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix new file mode 100644 index 0000000000..4f15e70b8b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix @@ -0,0 +1,34 @@ +{ config, ... }: + +{ + config = { + programs.alacritty = { + enable = true; + package = config.lib.test.mkStubPackage { version = "0.13.0"; }; + + settings = { + window.dimensions = { + lines = 3; + columns = 200; + }; + + keyboard.bindings = [{ + key = "K"; + mods = "Control"; + chars = "\\x0c"; + }]; + + font = { + normal.family = "SFMono"; + bold.family = "SFMono"; + }; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/alacritty/alacritty.toml \ + ${./settings-toml-expected.toml} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/awscli/aws-config.conf b/third_party/home-manager/tests/modules/programs/awscli/aws-config.conf new file mode 100644 index 0000000000..0a901a7c44 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/awscli/aws-config.conf @@ -0,0 +1,3 @@ +[default] +output=json +region=eu-west-3 diff --git a/third_party/home-manager/tests/modules/programs/awscli/aws-credentials.conf b/third_party/home-manager/tests/modules/programs/awscli/aws-credentials.conf new file mode 100644 index 0000000000..76da052381 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/awscli/aws-credentials.conf @@ -0,0 +1,2 @@ +[iam] +credential_process=pass show aws diff --git a/third_party/home-manager/tests/modules/programs/awscli/awscli.nix b/third_party/home-manager/tests/modules/programs/awscli/awscli.nix new file mode 100644 index 0000000000..0a96990ad2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/awscli/awscli.nix @@ -0,0 +1,28 @@ +{ ... }: + +{ + programs = { + awscli = { + enable = true; + settings = { + default = { + output = "json"; + region = "eu-west-3"; + }; + }; + credentials = { iam = { credential_process = "pass show aws"; }; }; + }; + }; + + test.stubs.awscli2 = { }; + + nmt.script = '' + assertFileExists home-files/.aws/config + assertFileContent home-files/.aws/config \ + ${./aws-config.conf} + + assertFileExists home-files/.aws/credentials + assertFileContent home-files/.aws/credentials \ + ${./aws-credentials.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/awscli/default.nix b/third_party/home-manager/tests/modules/programs/awscli/default.nix new file mode 100644 index 0000000000..dc1734f700 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/awscli/default.nix @@ -0,0 +1 @@ +{ awscli = ./awscli.nix; } diff --git a/third_party/home-manager/tests/modules/programs/bacon/bacon.nix b/third_party/home-manager/tests/modules/programs/bacon/bacon.nix new file mode 100644 index 0000000000..15d98127c6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bacon/bacon.nix @@ -0,0 +1,23 @@ +{ ... }: { + programs.bacon = { + enable = true; + settings = { + jobs = { + ta = { + command = [ "cargo" "test" "--all-features" "--color" "always" ]; + need_stdout = true; + }; + }; + export = { + enabled = true; + path = ".bacon-locations"; + line_format = "{kind} {path}:{line}:{column} {message}"; + }; + }; + }; + test.stubs.bacon = { }; + nmt.script = '' + assertFileExists home-files/.config/bacon/prefs.toml + assertFileContent home-files/.config/bacon/prefs.toml ${./expected.toml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/bacon/default.nix b/third_party/home-manager/tests/modules/programs/bacon/default.nix new file mode 100644 index 0000000000..5859a2dda5 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bacon/default.nix @@ -0,0 +1 @@ +{ bacon-program = ./bacon.nix; } diff --git a/third_party/home-manager/tests/modules/programs/bacon/expected.toml b/third_party/home-manager/tests/modules/programs/bacon/expected.toml new file mode 100644 index 0000000000..912cfd9867 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bacon/expected.toml @@ -0,0 +1,8 @@ +[export] +enabled = true +line_format = "{kind} {path}:{line}:{column} {message}" +path = ".bacon-locations" + +[jobs.ta] +command = ["cargo", "test", "--all-features", "--color", "always"] +need_stdout = true diff --git a/third_party/home-manager/tests/modules/programs/bat/bat.nix b/third_party/home-manager/tests/modules/programs/bat/bat.nix index e986129223..cd169ffb7b 100644 --- a/third_party/home-manager/tests/modules/programs/bat/bat.nix +++ b/third_party/home-manager/tests/modules/programs/bat/bat.nix @@ -11,11 +11,19 @@ with lib; theme = "TwoDark"; pager = "less -FR"; map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ]; + show-all = true; + + # False boolean options should not appear in the config + lessopen = false; }; - themes.testtheme = '' + themes.testtheme.src = pkgs.writeText "testtheme.tmTheme" '' This is a test theme. ''; + + syntaxes.testsyntax.src = pkgs.writeText "testsyntax.sublime-syntax" '' + This is a test syntax. + ''; }; test.stubs.bat = { }; @@ -28,6 +36,7 @@ with lib; --map-syntax='*.props:Java Properties' --pager='less -FR' --theme='TwoDark' + --show-all '' } @@ -37,6 +46,13 @@ with lib; This is a test theme. '' } + + assertFileExists home-files/.config/bat/syntaxes/testsyntax.sublime-syntax + assertFileContent home-files/.config/bat/syntaxes/testsyntax.sublime-syntax ${ + pkgs.writeText "bat.expected" '' + This is a test syntax. + '' + } ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/bat/default.nix b/third_party/home-manager/tests/modules/programs/bat/default.nix index 001d4bca6e..c1c91d344c 100644 --- a/third_party/home-manager/tests/modules/programs/bat/default.nix +++ b/third_party/home-manager/tests/modules/programs/bat/default.nix @@ -1 +1,4 @@ -{ bat = ./bat.nix; } +{ + bat = ./bat.nix; + bat-deprecated-options = ./deprecated-options.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/bat/deprecated-options.nix b/third_party/home-manager/tests/modules/programs/bat/deprecated-options.nix new file mode 100644 index 0000000000..31a10413ae --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bat/deprecated-options.nix @@ -0,0 +1,67 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.bat = { + enable = true; + + config = { + theme = "TwoDark"; + pager = "less -FR"; + map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ]; + }; + + themes.testtheme = '' + This is a test theme. + ''; + + syntaxes.testsyntax = '' + This is a test syntax. + ''; + }; + + test.stubs.bat = { }; + + test.asserts.warnings.enable = true; + test.asserts.warnings.expected = [ + '' + Using programs.bat.themes as a string option is deprecated and will be + removed in the future. Please change to using it as an attribute set + instead. + '' + '' + Using programs.bat.syntaxes as a string option is deprecated and will be + removed in the future. Please change to using it as an attribute set + instead. + '' + ]; + + nmt.script = '' + assertFileExists home-files/.config/bat/config + assertFileContent home-files/.config/bat/config ${ + pkgs.writeText "bat.expected" '' + --map-syntax='*.jenkinsfile:Groovy' + --map-syntax='*.props:Java Properties' + --pager='less -FR' + --theme='TwoDark' + '' + } + + assertFileExists home-files/.config/bat/themes/testtheme.tmTheme + assertFileContent home-files/.config/bat/themes/testtheme.tmTheme ${ + pkgs.writeText "bat.expected" '' + This is a test theme. + '' + } + + assertFileExists home-files/.config/bat/syntaxes/testsyntax.sublime-syntax + assertFileContent home-files/.config/bat/syntaxes/testsyntax.sublime-syntax ${ + pkgs.writeText "bat.expected" '' + This is a test syntax. + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix new file mode 100644 index 0000000000..3284975ca9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix @@ -0,0 +1,26 @@ +{ + programs.bemenu = { + enable = true; + settings = { + line-height = 28; + prompt = "open"; + ignorecase = true; + fb = "#1e1e2e"; + ff = "#cdd6f4"; + nb = "#1e1e2e"; + nf = "#cdd6f4"; + tb = "#1e1e2e"; + hb = "#1e1e2e"; + tf = "#f38ba8"; + hf = "#f9e2af"; + af = "#cdd6f4"; + ab = "#1e1e2e"; + }; + }; + + nmt.script = '' + assertFileExists home-path/etc/profile.d/hm-session-vars.sh + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + "export BEMENU_OPTS=\"'--ab' '#1e1e2e' '--af' '#cdd6f4' '--fb' '#1e1e2e' '--ff' '#cdd6f4' '--hb' '#1e1e2e' '--hf' '#f9e2af' '--ignorecase' '--line-height' '28' '--nb' '#1e1e2e' '--nf' '#cdd6f4' '--prompt' 'open' '--tb' '#1e1e2e' '--tf' '#f38ba8'\"" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/bemenu/default.nix b/third_party/home-manager/tests/modules/programs/bemenu/default.nix new file mode 100644 index 0000000000..8ae2849e92 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bemenu/default.nix @@ -0,0 +1,4 @@ +{ + bemenu-empty-configuration = ./empty-configuration.nix; + bemenu-basic-configuration = ./basic-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix b/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix new file mode 100644 index 0000000000..5e56d9ed7f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix @@ -0,0 +1,9 @@ +{ + programs.bemenu = { enable = true; }; + + nmt.script = '' + assertFileExists home-path/etc/profile.d/hm-session-vars.sh + assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh \ + "export BEMENU_OPTS" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix index 50b4a0f2a5..15a57ca782 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix @@ -12,7 +12,14 @@ in { main = { location = { sourceDirectories = [ "/my-stuff-to-backup" ]; - repositories = [ "/mnt/disk1" "/mnt/disk2" ]; + repositories = [ + "/mnt/disk1" + { path = "/mnt/disk2"; } + { + path = "/mnt/disk3"; + label = "disk3"; + } + ]; extraConfig = { one_file_system = true; exclude_patterns = [ "*.swp" ]; @@ -62,50 +69,54 @@ in { declare -A expectations - expectations[location.source_directories[0]]="${ + expectations[source_directories[0]]="${ builtins.elemAt backups.main.location.sourceDirectories 0 }" - expectations[location.repositories[0]]="${ - builtins.elemAt backups.main.location.repositories 0 + expectations[repositories[0].path]="${ + (builtins.elemAt backups.main.location.repositories 0).path }" - expectations[location.repositories[1]]="${ - builtins.elemAt backups.main.location.repositories 1 + expectations[repositories[1].path]="${ + (builtins.elemAt backups.main.location.repositories 1).path }" - expectations[location.one_file_system]="${ + expectations[repositories[2].path]="${ + (builtins.elemAt backups.main.location.repositories 2).path + }" + expectations[repositories[2].label]="${ + (builtins.elemAt backups.main.location.repositories 2).label + }" + expectations[one_file_system]="${ boolToString backups.main.location.extraConfig.one_file_system }" - expectations[location.exclude_patterns[0]]="${ + expectations[exclude_patterns[0]]="${ builtins.elemAt backups.main.location.extraConfig.exclude_patterns 0 }" - expectations[storage.encryption_passcommand]="${backups.main.storage.encryptionPasscommand}" - expectations[storage.checkpoint_interval]="${ + expectations[encryption_passcommand]="${backups.main.storage.encryptionPasscommand}" + expectations[checkpoint_interval]="${ toString backups.main.storage.extraConfig.checkpoint_interval }" - expectations[retention.keep_within]="${backups.main.retention.keepWithin}" - expectations[retention.keep_secondly]="${ + expectations[keep_within]="${backups.main.retention.keepWithin}" + expectations[keep_secondly]="${ toString backups.main.retention.keepSecondly }" - expectations[retention.prefix]="${backups.main.retention.extraConfig.prefix}" + expectations[prefix]="${backups.main.retention.extraConfig.prefix}" - expectations[consistency.checks[0].name]="${ + expectations[checks[0].name]="${ (builtins.elemAt backups.main.consistency.checks 0).name }" - expectations[consistency.checks[0].frequency]="${ + expectations[checks[0].frequency]="${ (builtins.elemAt backups.main.consistency.checks 0).frequency }" - expectations[consistency.checks[1].name]="${ + expectations[checks[1].name]="${ (builtins.elemAt backups.main.consistency.checks 1).name }" - expectations[consistency.checks[1].frequency]="${ + expectations[checks[1].frequency]="${ (builtins.elemAt backups.main.consistency.checks 1).frequency }" - expectations[consistency.prefix]="${backups.main.consistency.extraConfig.prefix}" - expectations[output.color]="${ - boolToString backups.main.output.extraConfig.color - }" - expectations[hooks.before_actions[0]]="${ + expectations[prefix]="${backups.main.consistency.extraConfig.prefix}" + expectations[color]="${boolToString backups.main.output.extraConfig.color}" + expectations[before_actions[0]]="${ builtins.elemAt backups.main.hooks.extraConfig.before_actions 0 }" @@ -120,7 +131,7 @@ in { fi done - one_file_system=$($yq ".location.one_file_system" $config_file) + one_file_system=$($yq ".one_file_system" $config_file) if [[ $one_file_system != "true" ]]; then fail "Expected one_file_system to be true but it was $one_file_system" fi diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix index 1d238b9152..cadd7fd235 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix @@ -27,7 +27,7 @@ in { yq=${pkgs.yq-go}/bin/yq - hmExclusionsFile=$($yq '.location.exclude_from[0]' $config_file) + hmExclusionsFile=$($yq '.exclude_from[0]' $config_file) expected_content='/home/hm-user/.config/borgmatic.d/main.yaml' grep --quiet "$expected_content" "$hmExclusionsFile" diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix index 8635b28d0b..bc0e501295 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix @@ -28,7 +28,7 @@ in { declare -A expectations - expectations[location.exclude_from[0]]="${excludeFile}" + expectations[exclude_from[0]]="${excludeFile}" yq=${pkgs.yq-go}/bin/yq @@ -41,7 +41,7 @@ in { fi done - hmExclusionsFile=$($yq '.location.exclude_from[1]' $config_file) + hmExclusionsFile=$($yq '.exclude_from[1]' $config_file) expected_content='/home/hm-user/.config/borgmatic.d/main.yaml' grep --quiet "$expected_content" "$hmExclusionsFile" diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix b/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix index f4f5bfcd8b..dd9908b567 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix @@ -28,7 +28,7 @@ in { declare -A expectations - expectations[location.exclude_from[0]]="${excludeFile}" + expectations[exclude_from[0]]="${excludeFile}" yq=${pkgs.yq-go}/bin/yq diff --git a/third_party/home-manager/tests/modules/programs/browserpass/browserpass.nix b/third_party/home-manager/tests/modules/programs/browserpass/browserpass.nix index 2e1ca65e89..7211c0ed81 100644 --- a/third_party/home-manager/tests/modules/programs/browserpass/browserpass.nix +++ b/third_party/home-manager/tests/modules/programs/browserpass/browserpass.nix @@ -6,11 +6,12 @@ with lib; config = { programs.browserpass = { enable = true; - browsers = [ "brave" "chrome" "chromium" "firefox" "vivaldi" ]; + browsers = + [ "brave" "chrome" "chromium" "firefox" "librewolf" "vivaldi" ]; }; nmt.script = if pkgs.stdenv.hostPlatform.isDarwin then '' - for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "Vivaldi"; do + for dir in "BraveSoftware/Brave-Browser" "Google/Chrome" "Chromium" "Mozilla" "LibreWolf" "Vivaldi"; do assertFileExists "home-files/Library/Application Support/$dir/NativeMessagingHosts/com.github.browserpass.native.json" done @@ -26,7 +27,9 @@ with lib; assertFileExists "home-files/.config/$dir/policies/managed/com.github.browserpass.native.json" done - assertFileExists "home-files/.mozilla/native-messaging-hosts/com.github.browserpass.native.json" + for dir in ".mozilla" ".librewolf"; do + assertFileExists "home-files/$dir/native-messaging-hosts/com.github.browserpass.native.json" + done ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/carapace/bash.nix b/third_party/home-manager/tests/modules/programs/carapace/bash.nix new file mode 100644 index 0000000000..7377df3c30 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/carapace/bash.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + programs = { + carapace.enable = true; + bash.enable = true; + }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileRegex home-files/.bashrc \ + 'source <(/nix/store/.*carapace.*/bin/carapace _carapace bash)' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/carapace/default.nix b/third_party/home-manager/tests/modules/programs/carapace/default.nix new file mode 100644 index 0000000000..acdf02cf02 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/carapace/default.nix @@ -0,0 +1,6 @@ +{ + carapace-bash = ./bash.nix; + carapace-zsh = ./zsh.nix; + carapace-fish = ./fish.nix; + carapace-nushell = ./nushell.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/carapace/fish.nix b/third_party/home-manager/tests/modules/programs/carapace/fish.nix new file mode 100644 index 0000000000..6b71cef5af --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/carapace/fish.nix @@ -0,0 +1,18 @@ +{ ... }: + +{ + programs = { + carapace.enable = true; + fish.enable = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/fish/config.fish + assertFileRegex home-files/.config/fish/config.fish \ + '/nix/store/.*carapace.*/bin/carapace _carapace fish \| source' + + # Check whether completions are overridden. + assertFileExists home-files/.config/fish/completions/git.fish + assertFileContent home-files/.config/fish/completions/git.fish /dev/null + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/carapace/nushell.nix b/third_party/home-manager/tests/modules/programs/carapace/nushell.nix new file mode 100644 index 0000000000..a025da18c3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/carapace/nushell.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +{ + programs = { + carapace.enable = true; + nushell.enable = true; + }; + + nmt.script = let + configDir = if pkgs.stdenv.isDarwin then + "home-files/Library/Application Support/nushell" + else + "home-files/.config/nushell"; + in '' + assertFileExists "${configDir}/env.nu" + assertFileRegex "${configDir}/env.nu" \ + '/nix/store/.*carapace.*/bin/carapace _carapace nushell \| save -f \$"(\$carapace_cache)/init\.nu"' + assertFileExists "${configDir}/config.nu" + assertFileRegex "${configDir}/config.nu" \ + 'source /.*/\.cache/carapace/init\.nu' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/carapace/zsh.nix b/third_party/home-manager/tests/modules/programs/carapace/zsh.nix new file mode 100644 index 0000000000..5ab4fe8a1a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/carapace/zsh.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + programs = { + carapace.enable = true; + zsh.enable = true; + }; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileRegex home-files/.zshrc \ + 'source <(/nix/store/.*carapace.*/bin/carapace _carapace zsh)' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration-expected.ini b/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration-expected.ini new file mode 100644 index 0000000000..124f7ab36f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration-expected.ini @@ -0,0 +1,15 @@ +; Generated by Home Manager + +[color] +background='#000000' +foreground='#ffffff' + +[general] +framerate=30 + +[input] +source=alsa + +[smoothing] +noise_reduction=65 + diff --git a/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration.nix b/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration.nix new file mode 100644 index 0000000000..98936d8393 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/cava/cava-basic-configuration.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + programs.cava = { + enable = true; + + package = config.lib.test.mkStubPackage { }; + + settings = { + general.framerate = 30; + input.source = "alsa"; + smoothing.noise_reduction = 65; + color = { + background = "'#000000'"; + foreground = "'#ffffff'"; + }; + }; + }; + + nmt.script = '' + configFile=home-files/.config/cava/config + assertFileExists $configFile + assertFileContent $configFile ${./cava-basic-configuration-expected.ini} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/cava/default.nix b/third_party/home-manager/tests/modules/programs/cava/default.nix new file mode 100644 index 0000000000..90f5c2e78d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/cava/default.nix @@ -0,0 +1 @@ +{ cava-basic-configuration = ./cava-basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/direnv/nushell.nix b/third_party/home-manager/tests/modules/programs/direnv/nushell.nix index 3041770c1c..46f34ebd8a 100644 --- a/third_party/home-manager/tests/modules/programs/direnv/nushell.nix +++ b/third_party/home-manager/tests/modules/programs/direnv/nushell.nix @@ -14,6 +14,6 @@ in '' assertFileExists "${configFile}" assertFileRegex "${configFile}" \ - 'let direnv = (/nix/store/.*direnv.*/bin/direnv export json | from json)' + '^\s*let direnv = (/nix/store/.*direnv.*/bin/direnv export json$' ''; } diff --git a/third_party/home-manager/tests/modules/programs/emacs/extra-config.nix b/third_party/home-manager/tests/modules/programs/emacs/extra-config.nix index 52e83de5c9..86259877bc 100644 --- a/third_party/home-manager/tests/modules/programs/emacs/extra-config.nix +++ b/third_party/home-manager/tests/modules/programs/emacs/extra-config.nix @@ -16,6 +16,7 @@ let mkTestPackage = epkgs: epkgs.trivialBuild { pname = "hm-test"; + version = "0.1.0"; src = pkgs.writeText "hm-test.el" '' (defun hm-test-fn () 'success) (provide 'hm-test) diff --git a/third_party/home-manager/tests/modules/programs/firefox/default.nix b/third_party/home-manager/tests/modules/programs/firefox/default.nix index cc8e2fc466..b0c4fadb6a 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/default.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/default.nix @@ -2,4 +2,7 @@ firefox-profile-settings = ./profile-settings.nix; firefox-state-version-19_09 = ./state-version-19_09.nix; firefox-deprecated-native-messenger = ./deprecated-native-messenger.nix; + firefox-duplicate-profile-ids = ./duplicate-profile-ids.nix; + firefox-duplicate-container-ids = ./duplicate-container-ids.nix; + firefox-policies = ./policies.nix; } diff --git a/third_party/home-manager/tests/modules/programs/firefox/deprecated-native-messenger.nix b/third_party/home-manager/tests/modules/programs/firefox/deprecated-native-messenger.nix index 796389f116..db70d405be 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/deprecated-native-messenger.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/deprecated-native-messenger.nix @@ -2,35 +2,20 @@ with lib; -lib.mkIf config.test.enableBig { - programs.firefox = { - enable = true; - enableGnomeExtensions = true; +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; + + config = lib.mkIf config.test.enableBig { + programs.firefox = { + enable = true; + enableGnomeExtensions = true; + }; + + test.asserts.warnings.expected = ['' + Using 'programs.firefox.enableGnomeExtensions' has been deprecated and + will be removed in the future. Please change to overriding the package + configuration using 'programs.firefox.package' instead. You can refer to + its example for how to do this. + '']; }; - - nixpkgs.overlays = [ - (self: super: { - firefox-unwrapped = pkgs.runCommandLocal "firefox-0" { - meta.description = "I pretend to be Firefox"; - passthru.gtk3 = null; - } '' - mkdir -p "$out"/{bin,lib} - touch "$out/bin/firefox" - chmod 755 "$out/bin/firefox" - ''; - - chrome-gnome-shell = - pkgs.runCommandLocal "dummy-chrome-gnome-shell" { } '' - mkdir -p $out/lib/mozilla/native-messaging-hosts - touch $out/lib/mozilla/native-messaging-hosts/dummy - ''; - }) - ]; - - test.asserts.warnings.expected = ['' - Using 'programs.firefox.enableGnomeExtensions' has been deprecated and - will be removed in the future. Please change to overriding the package - configuration using 'programs.firefox.package' instead. You can refer to - its example for how to do this. - '']; } diff --git a/third_party/home-manager/tests/modules/programs/firefox/duplicate-container-ids.nix b/third_party/home-manager/tests/modules/programs/firefox/duplicate-container-ids.nix new file mode 100644 index 0000000000..fce91fa02f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/duplicate-container-ids.nix @@ -0,0 +1,35 @@ +{ config, lib, ... }: + +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; + + config = lib.mkIf config.test.enableBig { + test.asserts.assertions.expected = ['' + Must not have a Firefox container with an existing ID but + - ID 9 is used by dangerous, shopping'']; + + programs.firefox = { + enable = true; + + profiles = { + my-profile = { + isDefault = true; + id = 1; + + containers = { + "shopping" = { + id = 9; + color = "blue"; + icon = "circle"; + }; + "dangerous" = { + id = 9; + color = "red"; + icon = "circle"; + }; + }; + }; + }; + }; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/duplicate-profile-ids.nix b/third_party/home-manager/tests/modules/programs/firefox/duplicate-profile-ids.nix new file mode 100644 index 0000000000..9b0b7c060d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/duplicate-profile-ids.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: + +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; + + config = lib.mkIf config.test.enableBig { + test.asserts.assertions.expected = ['' + Must not have a Firefox profile with an existing ID but + - ID 1 is used by first, second'']; + + programs.firefox = { + enable = true; + + profiles = { + first = { + isDefault = true; + id = 1; + }; + second = { id = 1; }; + }; + }; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/policies.nix b/third_party/home-manager/tests/modules/programs/firefox/policies.nix new file mode 100644 index 0000000000..b855ee8701 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/policies.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; + + config = lib.mkIf config.test.enableBig { + home.stateVersion = "23.05"; + + programs.firefox = { + enable = true; + policies = { BlockAboutConfig = true; }; + }; + + nmt.script = '' + jq=${lib.getExe pkgs.jq} + config_file="${config.programs.firefox.finalPackage}/lib/firefox/distribution/policies.json" + + assertFileExists "$config_file" + blockAboutConfig_actual_value="$($jq ".policies.BlockAboutConfig" $config_file)" + + if [[ $blockAboutConfig_actual_value != "true" ]]; then + fail "Expected '$config_file' to set 'policies.BlockAboutConfig' to true" + fi + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html index c65cb1b12f..d19eab612e 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html @@ -6,20 +6,20 @@ Bookmarks

Bookmarks Menu

-

Bookmarks Toolbar

+

Bookmarks Toolbar

-

Home Manager -

-
wikipedia -
kernel.org -

Nix sites

+
Home Manager +

+

wikipedia +
kernel.org +

Nix sites

-

homepage -
wiki -

Nix sites

+
homepage +
wiki +

Nix sites

-

homepage -
wiki -

-

-

+
homepage +
wiki +

+

+ diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json new file mode 100644 index 0000000000..d1727cc2a8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json @@ -0,0 +1 @@ +{"identities":[{"color":"yellow","icon":"circle","name":"shopping","public":true,"userContextId":6}],"lastUserContextId":6,"version":4} diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json index ceee27ee64..f17a0b91ef 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json @@ -67,8 +67,10 @@ } ], "metaData": { - "current": "DuckDuckGo", - "hash": "BWvqUiaCuMJ20lbymFf2dqzWyl1cgm1LZhhdWNEp0Cc=", + "current": "Google", + "hash": "IRmKVSQlAYnvLO8kdZyNUR/g5hzVn4++T0PLPGm+kZk=", + "private": "DuckDuckGo", + "privateHash": "BWvqUiaCuMJ20lbymFf2dqzWyl1cgm1LZhhdWNEp0Cc=", "useSavedOrder": true }, "version": 6 diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix b/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix index 6cb1a0cbe3..94fa9436ee 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix @@ -1,202 +1,207 @@ { config, lib, pkgs, ... }: -with lib; +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; -lib.mkIf config.test.enableBig { - programs.firefox = { - enable = true; - profiles.basic.isDefault = true; + config = lib.mkIf config.test.enableBig { + programs.firefox = { + enable = true; + profiles.basic.isDefault = true; - profiles.test = { - id = 1; - settings = { - "general.smoothScroll" = false; - "browser.newtabpage.pinned" = [{ - title = "NixOS"; - url = "https://nixos.org"; - }]; - }; - }; - - profiles.bookmarks = { - id = 2; - settings = { "general.smoothScroll" = false; }; - bookmarks = [ - { - toolbar = true; - bookmarks = [{ - name = "Home Manager"; - url = "https://nixos.wiki/wiki/Home_Manager"; + profiles.test = { + id = 1; + settings = { + "general.smoothScroll" = false; + "browser.newtabpage.pinned" = [{ + title = "NixOS"; + url = "https://nixos.org"; }]; - } - { - name = "wikipedia"; - tags = [ "wiki" ]; - keyword = "wiki"; - url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; - } - { - name = "kernel.org"; - url = "https://www.kernel.org"; - } - { - name = "Nix sites"; - bookmarks = [ - { - name = "homepage"; - url = "https://nixos.org/"; - } - { - name = "wiki"; - tags = [ "wiki" "nix" ]; - url = "https://nixos.wiki/"; - } - { - name = "Nix sites"; - bookmarks = [ - { - name = "homepage"; - url = "https://nixos.org/"; - } - { - name = "wiki"; - url = "https://nixos.wiki/"; - } - ]; - } - ]; - } - ]; - }; + }; + }; - profiles.search = { - id = 3; - search = { - force = true; - default = "DuckDuckGo"; - order = [ "Nix Packages" "NixOS Wiki" ]; - engines = { - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; + profiles.bookmarks = { + id = 2; + settings = { "general.smoothScroll" = false; }; + bookmarks = [ + { + toolbar = true; + bookmarks = [{ + name = "Home Manager"; + url = "https://nixos.wiki/wiki/Home_Manager"; }]; + } + { + name = "wikipedia"; + tags = [ "wiki" ]; + keyword = "wiki"; + url = + "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; + } + { + name = "kernel.org"; + url = "https://www.kernel.org"; + } + { + name = "Nix sites"; + bookmarks = [ + { + name = "homepage"; + url = "https://nixos.org/"; + } + { + name = "wiki"; + tags = [ "wiki" "nix" ]; + url = "https://nixos.wiki/"; + } + { + name = "Nix sites"; + bookmarks = [ + { + name = "homepage"; + url = "https://nixos.org/"; + } + { + name = "wiki"; + url = "https://nixos.wiki/"; + } + ]; + } + ]; + } + ]; + }; - icon = - "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + profiles.search = { + id = 3; + search = { + force = true; + default = "Google"; + privateDefault = "DuckDuckGo"; + order = [ "Nix Packages" "NixOS Wiki" ]; + engines = { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + }]; - definedAliases = [ "@np" ]; + icon = + "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + + definedAliases = [ "@np" ]; + }; + + "NixOS Wiki" = { + urls = [{ + template = "https://nixos.wiki/index.php?search={searchTerms}"; + }]; + iconUpdateURL = "https://nixos.wiki/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@nw" ]; + }; + + "Bing".metaData.hidden = true; + "Google".metaData.alias = "@g"; }; + }; + }; - "NixOS Wiki" = { - urls = [{ - template = "https://nixos.wiki/index.php?search={searchTerms}"; - }]; - iconUpdateURL = "https://nixos.wiki/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "@nw" ]; + profiles.searchWithoutDefault = { + id = 4; + search = { + force = true; + order = [ "Google" "Nix Packages" ]; + engines = { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + }]; + + definedAliases = [ "@np" ]; + }; }; + }; + }; - "Bing".metaData.hidden = true; - "Google".metaData.alias = "@g"; + profiles.containers = { + id = 5; + containers = { + "shopping" = { + id = 6; + icon = "circle"; + color = "yellow"; + }; }; }; }; - profiles.searchWithoutDefault = { - id = 4; - search = { - force = true; - order = [ "Google" "Nix Packages" ]; - engines = { - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - }]; + nmt.script = '' + assertFileRegex \ + home-path/bin/firefox \ + MOZ_APP_LAUNCHER - definedAliases = [ "@np" ]; - }; - }; - }; - }; - }; - - nixpkgs.overlays = [ - (self: super: { - firefox-unwrapped = pkgs.runCommand "firefox-0" { - meta.description = "I pretend to be Firefox"; - preferLocalBuild = true; - passthru.gtk3 = null; - } '' - mkdir -p "$out"/{bin,lib} - touch "$out/bin/firefox" - chmod 755 "$out/bin/firefox" - ''; - }) - ]; - - nmt.script = '' - assertFileRegex \ - home-path/bin/firefox \ - MOZ_APP_LAUNCHER - - assertDirectoryExists home-files/.mozilla/firefox/basic - - assertFileContent \ - home-files/.mozilla/firefox/test/user.js \ - ${./profile-settings-expected-user.js} - - bookmarksUserJs=$(normalizeStorePaths \ - home-files/.mozilla/firefox/bookmarks/user.js) - - assertFileContent \ - $bookmarksUserJs \ - ${./profile-settings-expected-bookmarks-user.js} - - bookmarksFile="$(sed -n \ - '/browser.bookmarks.file/ {s|^.*\(/nix/store[^"]*\).*|\1|;p}' \ - $TESTED/home-files/.mozilla/firefox/bookmarks/user.js)" - - assertFileContent \ - $bookmarksFile \ - ${./profile-settings-expected-bookmarks.html} - - function assertFirefoxSearchContent() { - compressedSearch=$(normalizeStorePaths "$1") - - decompressedSearch=$(dirname $compressedSearch)/search.json - ${pkgs.mozlz4a}/bin/mozlz4a -d "$compressedSearch" >(${pkgs.jq}/bin/jq . > "$decompressedSearch") + assertDirectoryExists home-files/.mozilla/firefox/basic assertFileContent \ - $decompressedSearch \ - "$2" - } + home-files/.mozilla/firefox/test/user.js \ + ${./profile-settings-expected-user.js} - assertFirefoxSearchContent \ - home-files/.mozilla/firefox/search/search.json.mozlz4 \ - ${./profile-settings-expected-search.json} + assertFileContent \ + home-files/.mozilla/firefox/containers/containers.json \ + ${./profile-settings-expected-containers.json} - assertFirefoxSearchContent \ - home-files/.mozilla/firefox/searchWithoutDefault/search.json.mozlz4 \ - ${./profile-settings-expected-search-without-default.json} - ''; + bookmarksUserJs=$(normalizeStorePaths \ + home-files/.mozilla/firefox/bookmarks/user.js) + + assertFileContent \ + $bookmarksUserJs \ + ${./profile-settings-expected-bookmarks-user.js} + + bookmarksFile="$(sed -n \ + '/browser.bookmarks.file/ {s|^.*\(/nix/store[^"]*\).*|\1|;p}' \ + $TESTED/home-files/.mozilla/firefox/bookmarks/user.js)" + + assertFileContent \ + $bookmarksFile \ + ${./profile-settings-expected-bookmarks.html} + + function assertFirefoxSearchContent() { + compressedSearch=$(normalizeStorePaths "$1") + + decompressedSearch=$(dirname $compressedSearch)/search.json + ${pkgs.mozlz4a}/bin/mozlz4a -d "$compressedSearch" >(${pkgs.jq}/bin/jq . > "$decompressedSearch") + + assertFileContent \ + $decompressedSearch \ + "$2" + } + + assertFirefoxSearchContent \ + home-files/.mozilla/firefox/search/search.json.mozlz4 \ + ${./profile-settings-expected-search.json} + + assertFirefoxSearchContent \ + home-files/.mozilla/firefox/searchWithoutDefault/search.json.mozlz4 \ + ${./profile-settings-expected-search-without-default.json} + ''; + }; } diff --git a/third_party/home-manager/tests/modules/programs/firefox/setup-firefox-mock-overlay.nix b/third_party/home-manager/tests/modules/programs/firefox/setup-firefox-mock-overlay.nix new file mode 100644 index 0000000000..0f0d182a4b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/setup-firefox-mock-overlay.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +{ + nixpkgs.overlays = [ + (self: super: { + firefox-unwrapped = pkgs.runCommandLocal "firefox-0" { + meta.description = "I pretend to be Firefox"; + passthru.gtk3 = null; + } '' + mkdir -p "$out"/{bin,lib} + touch "$out/bin/firefox" + chmod 755 "$out/bin/firefox" + ''; + + chrome-gnome-shell = + pkgs.runCommandLocal "dummy-chrome-gnome-shell" { } '' + mkdir -p $out/lib/mozilla/native-messaging-hosts + touch $out/lib/mozilla/native-messaging-hosts/dummy + ''; + }) + ]; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/state-version-19_09.nix b/third_party/home-manager/tests/modules/programs/firefox/state-version-19_09.nix index bf0b95f05c..c4c75970e3 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/state-version-19_09.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/state-version-19_09.nix @@ -2,28 +2,18 @@ with lib; -lib.mkIf config.test.enableBig { - home.stateVersion = "19.09"; +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; - programs.firefox.enable = true; + config = lib.mkIf config.test.enableBig { + home.stateVersion = "19.09"; - nixpkgs.overlays = [ - (self: super: { - firefox-unwrapped = pkgs.runCommand "firefox-0" { - meta.description = "I pretend to be Firefox"; - preferLocalBuild = true; - passthru.gtk3 = null; - } '' - mkdir -p "$out"/{bin,lib} - touch "$out/bin/firefox" - chmod 755 "$out/bin/firefox" - ''; - }) - ]; + programs.firefox.enable = true; - nmt.script = '' - assertFileRegex \ - home-path/bin/firefox \ - MOZ_APP_LAUNCHER - ''; + nmt.script = '' + assertFileRegex \ + home-path/bin/firefox \ + MOZ_APP_LAUNCHER + ''; + }; } diff --git a/third_party/home-manager/tests/modules/programs/fish/abbrs.nix b/third_party/home-manager/tests/modules/programs/fish/abbrs.nix new file mode 100644 index 0000000000..ce89bcb009 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fish/abbrs.nix @@ -0,0 +1,72 @@ +{ config, ... }: { + config = { + programs.fish = { + enable = true; + + shellAbbrs = { + l = "less"; + gco = "git checkout"; + "-C" = { + position = "anywhere"; + expansion = "--color"; + }; + L = { + position = "anywhere"; + setCursor = true; + expansion = "% | less"; + }; + "!!" = { + position = "anywhere"; + function = "last_history_item"; + }; + vim_edit_texts = { + position = "command"; + regex = ".+\\.txt"; + function = "vim_edit"; + }; + "4DIRS" = { + setCursor = "!"; + expansion = '' + for dir in */ + cd $dir + ! + cd .. + end + ''; + }; + dotdot = { + regex = "^\\.\\.+$"; + function = "multicd"; + }; + }; + }; + + nmt = { + description = + "if fish.shellAbbrs is set, check fish.config contains valid abbreviations"; + script = '' + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add -- l less" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add -- gco 'git checkout'" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add --position anywhere -- -C --color" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add --position anywhere --set-cursor -- L '% | less'" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add --function last_history_item --position anywhere -- !!" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add --function vim_edit --position command --regex '.+\.txt' -- vim_edit_texts" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add '--set-cursor=!' -- 4DIRS 'for dir in */ + cd \$dir + ! + cd .. + end + '" + assertFileContains home-files/.config/fish/config.fish \ + "abbr --add --function multicd --regex '^\.\.+$' -- dotdot" + ''; + }; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/fish/default.nix b/third_party/home-manager/tests/modules/programs/fish/default.nix index 3ed5b9cfec..f81ff971ea 100644 --- a/third_party/home-manager/tests/modules/programs/fish/default.nix +++ b/third_party/home-manager/tests/modules/programs/fish/default.nix @@ -1,4 +1,5 @@ { + fish-abbrs = ./abbrs.nix; fish-format-scripts = ./format-scripts.nix; fish-functions = ./functions.nix; fish-no-functions = ./no-functions.nix; diff --git a/third_party/home-manager/tests/modules/programs/gh/config-file.nix b/third_party/home-manager/tests/modules/programs/gh/config-file.nix index 58600e7f4b..e7c17d5d98 100644 --- a/third_party/home-manager/tests/modules/programs/gh/config-file.nix +++ b/third_party/home-manager/tests/modules/programs/gh/config-file.nix @@ -18,6 +18,7 @@ co: pr checkout editor: vim git_protocol: https + version: '1' '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/gh/warnings.nix b/third_party/home-manager/tests/modules/programs/gh/warnings.nix index 53937a7c01..bf7e5df8e2 100644 --- a/third_party/home-manager/tests/modules/programs/gh/warnings.nix +++ b/third_party/home-manager/tests/modules/programs/gh/warnings.nix @@ -28,6 +28,7 @@ co: pr checkout editor: vim git_protocol: https + version: '1' '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/gradle/alternate-home-settings.nix b/third_party/home-manager/tests/modules/programs/gradle/alternate-home-settings.nix new file mode 100644 index 0000000000..dc885ab19d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/alternate-home-settings.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.gradle = { + enable = true; + home = ".gbt"; + settings = { "org.gradle.caching" = true; }; + initScripts = { "some-script.gradle".text = "println 'hello world'"; }; + }; + + programs.java.package = + pkgs.runCommandLocal "java" { home = ""; } "mkdir $out"; + + test.stubs.gradle = { }; + + nmt.script = '' + assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ + 'export GRADLE_USER_HOME="/home/hm-user/.gbt"' + assertFileExists home-files/.gbt/gradle.properties + assertFileExists home-files/.gbt/init.d/some-script.gradle + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/gradle/default.nix b/third_party/home-manager/tests/modules/programs/gradle/default.nix new file mode 100644 index 0000000000..b8a4549142 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/default.nix @@ -0,0 +1,7 @@ +{ + gradle-empty-settings = ./empty-settings.nix; + gradle-example-settings = ./example-settings.nix; + gradle-init-scripts-settings = ./init-scripts-settings.nix; + gradle-alternate-home-settings = ./alternate-home-settings.nix; +} + diff --git a/third_party/home-manager/tests/modules/programs/gradle/empty-settings.nix b/third_party/home-manager/tests/modules/programs/gradle/empty-settings.nix new file mode 100644 index 0000000000..8ed4657519 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/empty-settings.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + config = { + programs.gradle.enable = true; + + programs.java.package = + pkgs.runCommandLocal "java" { home = ""; } "mkdir $out"; + + test.stubs.gradle = { }; + + nmt.script = '' + assertPathNotExists home-files/.gradle + assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'GRADLE_USER_HOME' + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/gradle/example-settings.nix b/third_party/home-manager/tests/modules/programs/gradle/example-settings.nix new file mode 100644 index 0000000000..19b8c070ae --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/example-settings.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.gradle = { + enable = true; + settings = { + "org.gradle.caching" = true; + "org.gradle.parallel" = true; + "org.gradle.java.home" = pkgs.jdk17; + "org.gradle.java.installations.paths" = "${pkgs.jdk8},${pkgs.jdk11}"; + }; + }; + + programs.java.package = + pkgs.runCommandLocal "java" { home = ""; } "mkdir $out"; + + test.stubs = { + gradle = { }; + jdk = { }; + jdk8 = { }; + jdk11 = { }; + jdk17 = { }; + }; + + nmt.script = '' + assertFileExists home-files/.gradle/gradle.properties + assertFileContent home-files/.gradle/gradle.properties ${ + builtins.toFile "gradle.expected" '' + # Generated with Nix + + org.gradle.caching = true + org.gradle.java.home = @jdk17@ + org.gradle.java.installations.paths = @jdk8@,@jdk11@ + org.gradle.parallel = true + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/gradle/external-init-script.gradle b/third_party/home-manager/tests/modules/programs/gradle/external-init-script.gradle new file mode 100644 index 0000000000..ba80b8636a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/external-init-script.gradle @@ -0,0 +1 @@ +println 'external-init-script-1' diff --git a/third_party/home-manager/tests/modules/programs/gradle/init-scripts-settings.nix b/third_party/home-manager/tests/modules/programs/gradle/init-scripts-settings.nix new file mode 100644 index 0000000000..49d9a8dce8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gradle/init-scripts-settings.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.gradle = { + enable = true; + + initScripts = { + "inline-init-script.gradle".text = '' + println 'inline-init-script' + ''; + "external-init-script.gradle".source = ./external-init-script.gradle; + }; + }; + + programs.java.package = + pkgs.runCommandLocal "java" { home = ""; } "mkdir $out"; + + test.stubs.gradle = { }; + + nmt.script = '' + assertFileExists home-files/.gradle/init.d/inline-init-script.gradle + assertFileContent home-files/.gradle/init.d/inline-init-script.gradle ${ + pkgs.writeText "gradle.expected" '' + println 'inline-init-script' + '' + } + + assertFileExists home-files/.gradle/init.d/external-init-script.gradle + assertFileContent home-files/.gradle/init.d/external-init-script.gradle ${ + ./external-init-script.gradle + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/granted/default.nix b/third_party/home-manager/tests/modules/programs/granted/default.nix new file mode 100644 index 0000000000..da462752b1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/granted/default.nix @@ -0,0 +1,4 @@ +{ + granted-integration-enabled = ./integration-enabled.nix; + granted-integration-disabled = ./integration-disabled.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/granted/integration-disabled.nix b/third_party/home-manager/tests/modules/programs/granted/integration-disabled.nix new file mode 100644 index 0000000000..6e43b4777b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/granted/integration-disabled.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + programs = { + granted.enable = true; + granted.enableZshIntegration = false; + zsh.enable = true; + }; + + test.stubs.granted = { }; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileNotRegex \ + home-files/.zshrc \ + 'function assume()' + assertFileNotRegex \ + home-files/.zshrc \ + 'export GRANTED_ALIAS_CONFIGURED="true"' + assertFileNotRegex \ + home-files/.zshrc \ + 'source @granted@/bin/.assume-wrapped "$@"' + assertFileNotRegex \ + home-files/.zshrc \ + 'unset GRANTED_ALIAS_CONFIGURED' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/granted/integration-enabled.nix b/third_party/home-manager/tests/modules/programs/granted/integration-enabled.nix new file mode 100644 index 0000000000..daf8436765 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/granted/integration-enabled.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: + +{ + programs = { + granted.enable = true; + zsh.enable = true; + }; + + test.stubs.granted = { }; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'function assume()' + assertFileContains \ + home-files/.zshrc \ + 'export GRANTED_ALIAS_CONFIGURED="true"' + assertFileContains \ + home-files/.zshrc \ + 'source @granted@/bin/.assume-wrapped "$@"' + assertFileContains \ + home-files/.zshrc \ + 'unset GRANTED_ALIAS_CONFIGURED' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml b/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml index a18ec34745..91682f0ae0 100644 --- a/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml +++ b/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml @@ -1,5 +1,4 @@ theme = "base16" - [editor] line-number = "relative" diff --git a/third_party/home-manager/tests/modules/programs/i3blocks/default.nix b/third_party/home-manager/tests/modules/programs/i3blocks/default.nix new file mode 100644 index 0000000000..f03eb3909c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/i3blocks/default.nix @@ -0,0 +1 @@ +{ i3blocks-with-ordered-blocks = ./with-ordered-blocks.nix; } diff --git a/third_party/home-manager/tests/modules/programs/i3blocks/with-ordered-blocks.nix b/third_party/home-manager/tests/modules/programs/i3blocks/with-ordered-blocks.nix new file mode 100644 index 0000000000..c2c9e64773 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/i3blocks/with-ordered-blocks.nix @@ -0,0 +1,65 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + expectedConfig = pkgs.writeText "i3blocks-expected-config" '' + [block1first] + command=echo first + interval=1 + + [block3second] + command=echo second + interval=2 + + [block2third] + command=echo third + interval=3 + ''; +in { + config = { + programs.i3blocks = { + enable = true; + package = config.lib.test.mkStubPackage { }; + bars = with lib; { + bar1 = { + block1first = { + command = "echo first"; + interval = 1; + }; + block2third = hm.dag.entryAfter [ "block3second" ] { + command = "echo third"; + interval = 3; + }; + block3second = hm.dag.entryAfter [ "block1first" ] { + command = "echo second"; + interval = 2; + }; + }; + bar2 = { + block1first = { + command = "echo first"; + interval = 1; + }; + block2third = hm.dag.entryAfter [ "block3second" ] { + command = "echo third"; + interval = 3; + }; + block3second = hm.dag.entryAfter [ "block1first" ] { + command = "echo second"; + interval = 2; + }; + }; + }; + }; + + test.stubs.i3blocks = { }; + + nmt.script = '' + assertFileExists home-files/.config/i3blocks/bar1 + assertFileExists home-files/.config/i3blocks/bar2 + assertFileContent home-files/.config/i3blocks/bar1 ${expectedConfig} + assertFileContent home-files/.config/i3blocks/bar2 ${expectedConfig} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix index 0d8b4663b2..b0a8ee4ac3 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix @@ -199,7 +199,6 @@ [theme] theme = "solarized-dark" - [theme.overrides] idle_bg = "#123456" idle_fg = "#abcdef" diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yml new file mode 100644 index 0000000000..c2939252df --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yml @@ -0,0 +1,2 @@ +alias: + pp: v1/pods diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yml new file mode 100644 index 0000000000..cae3005dc9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yml @@ -0,0 +1,5 @@ +hotKey: + shift-0: + command: pods + description: Viewing pods + shortCut: Shift-0 diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yml new file mode 100644 index 0000000000..e6eb2a6c6b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yml @@ -0,0 +1,16 @@ +plugin: + fred: + args: + - logs + - -f + - $NAME + - -n + - $NAMESPACE + - --context + - $CLUSTER + background: false + command: kubectl + description: Pod logs + scopes: + - po + shortCut: Ctrl-L diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix b/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix index ffe5214487..3c935aa6fc 100644 --- a/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix @@ -13,7 +13,15 @@ headless = false; }; }; - + hotkey = { + hotKey = { + shift-0 = { + shortCut = "Shift-0"; + description = "Viewing pods"; + command = "pods"; + }; + }; + }; skin = { k9s = { body = { @@ -27,6 +35,29 @@ }; }; }; + aliases = { alias = { pp = "v1/pods"; }; }; + plugin = { + plugin = { + fred = { + shortCut = "Ctrl-L"; + description = "Pod logs"; + scopes = [ "po" ]; + command = "kubectl"; + background = false; + args = + [ "logs" "-f" "$NAME" "-n" "$NAMESPACE" "--context" "$CLUSTER" ]; + }; + }; + }; + views = { + k9s = { + views = { + "v1/pods" = { + columns = [ "AGE" "NAMESPACE" "NAME" "IP" "NODE" "STATUS" "READY" ]; + }; + }; + }; + }; }; nmt.script = '' @@ -38,5 +69,21 @@ assertFileContent \ home-files/.config/k9s/skin.yml \ ${./example-skin-expected.yml} + assertFileExists home-files/.config/k9s/hotkey.yml + assertFileContent \ + home-files/.config/k9s/hotkey.yml \ + ${./example-hotkey-expected.yml} + assertFileExists home-files/.config/k9s/aliases.yml + assertFileContent \ + home-files/.config/k9s/aliases.yml \ + ${./example-aliases-expected.yml} + assertFileExists home-files/.config/k9s/plugin.yml + assertFileContent \ + home-files/.config/k9s/plugin.yml \ + ${./example-plugin-expected.yml} + assertFileExists home-files/.config/k9s/views.yml + assertFileContent \ + home-files/.config/k9s/views.yml \ + ${./example-views-expected.yml} ''; } diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yml new file mode 100644 index 0000000000..f76bb07d16 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yml @@ -0,0 +1,11 @@ +k9s: + views: + v1/pods: + columns: + - AGE + - NAMESPACE + - NAME + - IP + - NODE + - STATUS + - READY diff --git a/third_party/home-manager/tests/modules/programs/khal/config.nix b/third_party/home-manager/tests/modules/programs/khal/config.nix index 1633d132b8..a2eb8bf138 100644 --- a/third_party/home-manager/tests/modules/programs/khal/config.nix +++ b/third_party/home-manager/tests/modules/programs/khal/config.nix @@ -1,7 +1,15 @@ { ... }: { - programs.khal.enable = true; + programs.khal = { + enable = true; + settings = { + default.timedelta = "5d"; + view.agenda_event_format = + "{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset}"; + }; + + }; accounts.calendar = { basePath = "$XDG_CONFIG_HOME/cal"; accounts = { @@ -27,6 +35,8 @@ test.stubs = { khal = { }; }; nmt.script = '' - assertFileExists home-files/.config/khal/config + configFile=home-files/.config/khal/config + assertFileExists $configFile + assertFileContent $configFile ${./khal-config-expected} ''; } diff --git a/third_party/home-manager/tests/modules/programs/khal/khal-config-expected b/third_party/home-manager/tests/modules/programs/khal/khal-config-expected new file mode 100644 index 0000000000..361db2d680 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khal/khal-config-expected @@ -0,0 +1,26 @@ +[calendars] +[[test]] +path = /home/hm-user/$XDG_CONFIG_HOME/cal/test/ +readonly = True +priority=10 +type=calendar + + + +[default] +default_calendar=test +highlight_event_days=true +timedelta=5d + +[locale] +dateformat=%x +datetimeformat=%c +firstweekday=0 +longdateformat=%x +longdatetimeformat=%c +timeformat=%X +unicode_symbols=true +weeknumbers=off + +[view] +agenda_event_format={calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset} diff --git a/third_party/home-manager/tests/modules/programs/khard/basic_config.nix b/third_party/home-manager/tests/modules/programs/khard/basic_config.nix new file mode 100644 index 0000000000..f6f0838c76 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/basic_config.nix @@ -0,0 +1,34 @@ +{ + accounts.contact = { + basePath = ".contacts"; + accounts.test = { + local.type = "filesystem"; + khard.enable = true; + }; + }; + + programs.khard = { + enable = true; + settings = { + general = { + default_action = "list"; + editor = [ "vim" "-i" "NONE" ]; + }; + + "contact table" = { + group_by_address_book = true; + reverse = false; + preferred_phone_number_type = [ "pref" "cell" "home" ]; + preferred_email_address_type = [ "pref" "work" "home" ]; + }; + }; + }; + + test.stubs.khard = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/khard/khard.conf \ + ${./basic_config_expected} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khard/basic_config_expected b/third_party/home-manager/tests/modules/programs/khard/basic_config_expected new file mode 100644 index 0000000000..e636b5c6aa --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/basic_config_expected @@ -0,0 +1,15 @@ +[addressbooks] +[[test]] +path = /home/hm-user/.contacts/test + + +[contact table] +group_by_address_book=yes +preferred_email_address_type=pref, work, home +preferred_phone_number_type=pref, cell, home +reverse=no + +[general] +default_action=list +editor=vim, -i, NONE + diff --git a/third_party/home-manager/tests/modules/programs/khard/default.nix b/third_party/home-manager/tests/modules/programs/khard/default.nix new file mode 100644 index 0000000000..3762dc0f1c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/default.nix @@ -0,0 +1,5 @@ +{ + khard_empty_config = ./empty_config.nix; + khard_basic_config = ./basic_config.nix; + khard_multiple_accounts = ./multiple_accounts.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/khard/empty_config.nix b/third_party/home-manager/tests/modules/programs/khard/empty_config.nix new file mode 100644 index 0000000000..9d19d11c92 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/empty_config.nix @@ -0,0 +1,19 @@ +{ + accounts.contact = { + basePath = ".contacts"; + accounts.test = { + local.type = "filesystem"; + khard.enable = true; + }; + }; + + programs.khard.enable = true; + + test.stubs.khard = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/khard/khard.conf \ + ${./empty_config_expected} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khard/empty_config_expected b/third_party/home-manager/tests/modules/programs/khard/empty_config_expected new file mode 100644 index 0000000000..10e79133ae --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/empty_config_expected @@ -0,0 +1,8 @@ +[addressbooks] +[[test]] +path = /home/hm-user/.contacts/test + + +[general] +default_action=list + diff --git a/third_party/home-manager/tests/modules/programs/khard/multiple_accounts.nix b/third_party/home-manager/tests/modules/programs/khard/multiple_accounts.nix new file mode 100644 index 0000000000..393510bf8e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/multiple_accounts.nix @@ -0,0 +1,23 @@ +{ + accounts.contact = { + basePath = ".contacts"; + accounts.test1 = { + local.type = "filesystem"; + khard.enable = true; + }; + accounts.test2 = { + local.type = "filesystem"; + khard.enable = true; + }; + }; + + programs.khard.enable = true; + + test.stubs.khard = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/khard/khard.conf \ + ${./multiple_accounts_expected} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khard/multiple_accounts_expected b/third_party/home-manager/tests/modules/programs/khard/multiple_accounts_expected new file mode 100644 index 0000000000..b30e2662a0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khard/multiple_accounts_expected @@ -0,0 +1,11 @@ +[addressbooks] +[[test1]] +path = /home/hm-user/.contacts/test1 + +[[test2]] +path = /home/hm-user/.contacts/test2 + + +[general] +default_action=list + diff --git a/third_party/home-manager/tests/modules/programs/lsd/default.nix b/third_party/home-manager/tests/modules/programs/lsd/default.nix new file mode 100644 index 0000000000..6a1454c9a7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/lsd/default.nix @@ -0,0 +1 @@ +{ lsd-example-settings = ./example-settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/lsd/example-colors-expected.yaml b/third_party/home-manager/tests/modules/programs/lsd/example-colors-expected.yaml new file mode 100644 index 0000000000..9247ac9a32 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/lsd/example-colors-expected.yaml @@ -0,0 +1,8 @@ +date: + day-old: green + older: dark_green +size: + large: dark_yellow + medium: yellow + none: grey + small: grey diff --git a/third_party/home-manager/tests/modules/programs/lsd/example-settings-expected.yaml b/third_party/home-manager/tests/modules/programs/lsd/example-settings-expected.yaml new file mode 100644 index 0000000000..2ddbe6f3f0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/lsd/example-settings-expected.yaml @@ -0,0 +1,14 @@ +blocks: +- date +- size +- name +color: + theme: custom +date: relative +ignore-globs: +- .git +- .hg +- .bsp +layout: oneline +sorting: + dir-grouping: first diff --git a/third_party/home-manager/tests/modules/programs/lsd/example-settings.nix b/third_party/home-manager/tests/modules/programs/lsd/example-settings.nix new file mode 100644 index 0000000000..f9217a0984 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/lsd/example-settings.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.lsd = { + enable = true; + enableAliases = false; + settings = { + date = "relative"; + blocks = [ "date" "size" "name" ]; + layout = "oneline"; + sorting.dir-grouping = "first"; + ignore-globs = [ ".git" ".hg" ".bsp" ]; + }; + colors = { + date = { + day-old = "green"; + older = "dark_green"; + }; + size = { + none = "grey"; + small = "grey"; + medium = "yellow"; + large = "dark_yellow"; + }; + }; + }; + + test.stubs.lsd = { }; + + nmt.script = '' + assertFileExists home-files/.config/lsd/config.yaml + assertFileExists home-files/.config/lsd/colors.yaml + assertFileContent \ + home-files/.config/lsd/config.yaml \ + ${./example-settings-expected.yaml} + assertFileContent \ + home-files/.config/lsd/colors.yaml \ + ${./example-colors-expected.yaml} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/neomutt/default.nix b/third_party/home-manager/tests/modules/programs/neomutt/default.nix index 8216017c1c..88e90c1d4b 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/default.nix +++ b/third_party/home-manager/tests/modules/programs/neomutt/default.nix @@ -11,4 +11,5 @@ neomutt-with-named-mailboxes = ./neomutt-with-named-mailboxes.nix; neomutt-with-signature = ./neomutt-with-signature.nix; neomutt-with-signature-command = ./neomutt-with-signature-command.nix; + neomutt-with-starttls = ./neomutt-with-starttls.nix; } diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected new file mode 100644 index 0000000000..1e5b15cac4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected @@ -0,0 +1,38 @@ +# Generated by Home Manager. +set ssl_force_tls = yes +set certificate_file=/etc/ssl/certs/ca-certificates.crt + +# GPG section +set crypt_use_gpgme = yes +set crypt_autosign = no +set crypt_opportunistic_encrypt = no +set pgp_use_gpg_agent = yes +set mbox_type = Maildir +set sort = "threads" + +# MTA section +set smtp_pass="`password-command`" +set smtp_url='smtp://home.manager@smtp.example.com' + + + + + +# MRA section +set folder='/home/hm-user/Mail/hm@example.com' +set from='hm@example.com' +set postponed='+Drafts' +set realname='H. M. Test' +set record='+Sent' +set spoolfile='+Inbox' +set trash='+Trash' + + +# Extra configuration +color status cyan default + + +unset signature +# notmuch section +set nm_default_uri = "notmuch:///home/hm-user/Mail" +virtual-mailboxes "My INBOX" "notmuch://?query=tag%3Ainbox" diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-starttls.nix b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-starttls.nix new file mode 100644 index 0000000000..09d37ff9e1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-starttls.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + config = { + accounts.email.accounts = { + "hm@example.com" = { + notmuch.enable = true; + neomutt = { + enable = true; + extraConfig = '' + color status cyan default + ''; + }; + imap.port = 143; + smtp.tls.useStartTls = true; + }; + }; + + programs.neomutt = { + enable = true; + vimKeys = false; + }; + + test.stubs.neomutt = { }; + + nmt.script = '' + assertFileExists home-files/.config/neomutt/neomuttrc + assertFileExists home-files/.config/neomutt/hm@example.com + assertFileContent home-files/.config/neomutt/neomuttrc ${ + ./neomutt-expected.conf + } + assertFileContent home-files/.config/neomutt/hm@example.com ${ + ./hm-example.com-starttls-expected + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/oh-my-posh/default.nix b/third_party/home-manager/tests/modules/programs/oh-my-posh/default.nix index 6552625668..4b4c9f46f9 100644 --- a/third_party/home-manager/tests/modules/programs/oh-my-posh/default.nix +++ b/third_party/home-manager/tests/modules/programs/oh-my-posh/default.nix @@ -2,4 +2,5 @@ oh-my-posh-bash = ./bash.nix; oh-my-posh-zsh = ./zsh.nix; oh-my-posh-fish = ./fish.nix; + oh-my-posh-nushell = ./nushell.nix; } diff --git a/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix b/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix new file mode 100644 index 0000000000..ad77f821aa --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: + +{ + programs = { + nushell.enable = true; + + oh-my-posh = { + enable = true; + useTheme = "jandedobbeleer"; + }; + }; + + test.stubs = { + oh-my-posh = { }; + nushell = { }; + }; + + nmt.script = let + configFile = if pkgs.stdenv.isDarwin then + "home-files/Library/Application Support/nushell/config.nu" + else + "home-files/.config/nushell/config.nu"; + + envFile = if pkgs.stdenv.isDarwin then + "home-files/Library/Application Support/nushell/env.nu" + else + "home-files/.config/nushell/env.nu"; + in '' + assertFileExists "${envFile}" + assertFileRegex \ + "${envFile}" \ + '/bin/oh-my-posh init nu --config .*--print \| save --force /.*/home-files/\.cache/oh-my-posh/init\.nu' + + assertFileExists "${configFile}" + assertFileRegex \ + "${configFile}" \ + 'source /.*/\.cache/oh-my-posh/init\.nu' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/openstackclient/clouds-public.yaml b/third_party/home-manager/tests/modules/programs/openstackclient/clouds-public.yaml new file mode 100644 index 0000000000..26bf551ff4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/openstackclient/clouds-public.yaml @@ -0,0 +1,4 @@ +public-clouds: + example-cloud: + auth: + auth_url: https://identity.cloud.example.com/v2.0 diff --git a/third_party/home-manager/tests/modules/programs/openstackclient/clouds.yaml b/third_party/home-manager/tests/modules/programs/openstackclient/clouds.yaml new file mode 100644 index 0000000000..c73d350ca4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/openstackclient/clouds.yaml @@ -0,0 +1,8 @@ +clouds: + my-infra: + auth: + project_id: 0123456789abcdef0123456789abcdef + username: openstack + cloud: example-cloud + interface: internal + region_name: XXX diff --git a/third_party/home-manager/tests/modules/programs/openstackclient/default.nix b/third_party/home-manager/tests/modules/programs/openstackclient/default.nix new file mode 100644 index 0000000000..846b99724a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/openstackclient/default.nix @@ -0,0 +1 @@ +{ openstackclient = ./openstackclient.nix; } diff --git a/third_party/home-manager/tests/modules/programs/openstackclient/openstackclient.nix b/third_party/home-manager/tests/modules/programs/openstackclient/openstackclient.nix new file mode 100644 index 0000000000..0c5e1f0bcf --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/openstackclient/openstackclient.nix @@ -0,0 +1,35 @@ +{ ... }: + +{ + programs.openstackclient = { + enable = true; + clouds = { + my-infra = { + cloud = "example-cloud"; + auth = { + project_id = "0123456789abcdef0123456789abcdef"; + username = "openstack"; + }; + region_name = "XXX"; + interface = "internal"; + }; + }; + publicClouds = { + example-cloud = { + auth = { auth_url = "https://identity.cloud.example.com/v2.0"; }; + }; + }; + + }; + + test.stubs.openstackclient = { }; + + nmt.script = '' + assertFileExists home-files/.config/openstack/clouds.yaml + assertFileContent home-files/.config/openstack/clouds.yaml \ + ${./clouds.yaml} + assertFileExists home-files/.config/openstack/clouds-public.yaml + assertFileContent home-files/.config/openstack/clouds-public.yaml \ + ${./clouds-public.yaml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/pqiv/default.nix b/third_party/home-manager/tests/modules/programs/pqiv/default.nix new file mode 100644 index 0000000000..24798b3541 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pqiv/default.nix @@ -0,0 +1 @@ +{ pqiv-settings = ./settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/pqiv/settings.nix b/third_party/home-manager/tests/modules/programs/pqiv/settings.nix new file mode 100644 index 0000000000..6a5abe6046 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pqiv/settings.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + programs.pqiv = { + enable = true; + package = config.lib.test.mkStubPackage { name = "pqiv"; }; + settings = { + options = { + hide-info-box = 1; + thumbnail-size = "256x256"; + }; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/pqivrc + assertFileContent home-files/.config/pqivrc ${ + builtins.toFile "pqiv.expected" '' + [options] + hide-info-box=1 + thumbnail-size=256x256 + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/default.nix b/third_party/home-manager/tests/modules/programs/qcal/default.nix new file mode 100644 index 0000000000..3a177e364b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/default.nix @@ -0,0 +1,5 @@ +{ + qcal-http = ./http-calendar.nix; + qcal-webdav = ./webdav-calendar.nix; + qcal-mixed = ./mixed.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/http-calendar.json-expected b/third_party/home-manager/tests/modules/programs/qcal/http-calendar.json-expected new file mode 100644 index 0000000000..7b39cdf9ad --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/http-calendar.json-expected @@ -0,0 +1,9 @@ +{ + "Calendars": [ + { + "Url": "https://example.com/events.ical" + } + ], + "DefaultNumDays": 30, + "Timezone": "Local" +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/http-calendar.nix b/third_party/home-manager/tests/modules/programs/qcal/http-calendar.nix new file mode 100644 index 0000000000..c32440601c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/http-calendar.nix @@ -0,0 +1,18 @@ +{ pkgs, lib, ... }: + +{ + programs.qcal.enable = true; + accounts.calendar.accounts.test = { + qcal.enable = true; + remote = { url = "https://example.com/events.ical"; }; + }; + + test.stubs = { qcal = { }; }; + + nmt.script = '' + assertFileExists home-files/.config/qcal/config.json + assertFileContent home-files/.config/qcal/config.json ${ + ./http-calendar.json-expected + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/mixed.json-expected b/third_party/home-manager/tests/modules/programs/qcal/mixed.json-expected new file mode 100644 index 0000000000..6546efda33 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/mixed.json-expected @@ -0,0 +1,14 @@ +{ + "Calendars": [ + { + "Url": "https://example.com/events.ical" + }, + { + "PasswordCmd": "pass show calendar", + "Url": "https://cal.example.com/anton/work", + "Username": "anton" + } + ], + "DefaultNumDays": 30, + "Timezone": "Local" +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/mixed.nix b/third_party/home-manager/tests/modules/programs/qcal/mixed.nix new file mode 100644 index 0000000000..d2241bdcb3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/mixed.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, ... }: + +{ + programs.qcal.enable = true; + accounts.calendar.accounts = { + http-test = { + remote = { url = "https://example.com/events.ical"; }; + qcal.enable = true; + }; + webdav-test = { + remote = { + url = "https://cal.example.com/anton/work"; + userName = "anton"; + passwordCommand = [ "pass" "show" "calendar" ]; + }; + qcal.enable = true; + }; + }; + + test.stubs = { qcal = { }; }; + + nmt.script = '' + assertFileExists home-files/.config/qcal/config.json + assertFileContent home-files/.config/qcal/config.json ${ + ./mixed.json-expected + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.json-expected b/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.json-expected new file mode 100644 index 0000000000..c7426cb337 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.json-expected @@ -0,0 +1,11 @@ +{ + "Calendars": [ + { + "PasswordCmd": "pass show calendar", + "Url": "https://cal.example.com/anton/work", + "Username": "anton" + } + ], + "DefaultNumDays": 23, + "Timezone": "Europe/Berlin" +} diff --git a/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.nix b/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.nix new file mode 100644 index 0000000000..caefe1f169 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qcal/webdav-calendar.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, ... }: + +{ + programs.qcal = { + enable = true; + defaultNumDays = 23; + timezone = "Europe/Berlin"; + }; + accounts.calendar.accounts.test = { + qcal.enable = true; + remote = { + url = "https://cal.example.com/anton/work"; + userName = "anton"; + passwordCommand = [ "pass" "show" "calendar" ]; + }; + }; + + test.stubs = { qcal = { }; }; + + nmt.script = '' + assertFileExists home-files/.config/qcal/config.json + assertFileContent home-files/.config/qcal/config.json ${ + ./webdav-calendar.json-expected + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/qutebrowser/default.nix b/third_party/home-manager/tests/modules/programs/qutebrowser/default.nix index 8c23515c0b..20b76337bd 100644 --- a/third_party/home-manager/tests/modules/programs/qutebrowser/default.nix +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/default.nix @@ -1,5 +1,6 @@ { - qutebrowser-settings = ./settings.nix; + qutebrowser-greasemonkey = ./greasemonkey.nix; qutebrowser-keybindings = ./keybindings.nix; qutebrowser-quickmarks = ./quickmarks.nix; + qutebrowser-settings = ./settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/qutebrowser/greasemonkey.nix b/third_party/home-manager/tests/modules/programs/qutebrowser/greasemonkey.nix new file mode 100644 index 0000000000..d6e8713c74 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/greasemonkey.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + greasemonkeyScript = pkgs.writeText "qutebrowser-greasemonkey.js" '' + // ==UserScript== + // @name foo + // @namespace foo + // @match https://example.com/* + // @grant none + // ==/UserScript== + ''; + +in { + programs.qutebrowser = { + enable = true; + greasemonkey = [ greasemonkeyScript ]; + }; + + test.stubs.qutebrowser = { }; + + nmt.script = let + scriptDir = if pkgs.stdenv.hostPlatform.isDarwin then + ".qutebrowser/greasemonkey" + else + ".config/qutebrowser/greasemonkey"; + in '' + assertFileContent \ + home-files/${scriptDir}/qutebrowser-greasemonkey.js \ + ${greasemonkeyScript} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/rio/default.nix b/third_party/home-manager/tests/modules/programs/rio/default.nix new file mode 100644 index 0000000000..a6aba7fe12 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rio/default.nix @@ -0,0 +1,4 @@ +{ + rio-example-settings = ./example-settings.nix; + rio-empty-settings = ./empty-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/rio/empty-settings.nix b/third_party/home-manager/tests/modules/programs/rio/empty-settings.nix new file mode 100644 index 0000000000..064fc98fac --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rio/empty-settings.nix @@ -0,0 +1,11 @@ +_: + +{ + programs.rio.enable = true; + + test.stubs.rio = { }; + + nmt.script = '' + assertPathNotExists home-files/.config/rio + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/rio/example-settings.nix b/third_party/home-manager/tests/modules/programs/rio/example-settings.nix new file mode 100644 index 0000000000..f3e116f038 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rio/example-settings.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: + +let + inherit (pkgs.stdenv.hostPlatform) isDarwin; + + path = if isDarwin then + "Library/Application Support/rio/config.toml" + else + ".config/rio/config.toml"; + + expected = pkgs.writeText "rio-expected.toml" '' + cursor = "_" + padding-x = 0 + performance = "Low" + ''; +in { + programs.rio = { + enable = true; + package = config.lib.test.mkStubPackage { }; + + settings = { + cursor = "_"; + performance = "Low"; + padding-x = 0; + }; + }; + + nmt.script = '' + assertFileExists home-files/"${path}" + assertFileContent home-files/"${path}" '${expected}' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/ruff/default.nix b/third_party/home-manager/tests/modules/programs/ruff/default.nix new file mode 100644 index 0000000000..c4d61acc0f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ruff/default.nix @@ -0,0 +1 @@ +{ ruff-program = ./ruff.nix; } diff --git a/third_party/home-manager/tests/modules/programs/ruff/expected.toml b/third_party/home-manager/tests/modules/programs/ruff/expected.toml new file mode 100644 index 0000000000..8c42d2be10 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ruff/expected.toml @@ -0,0 +1,8 @@ +line-length = 100 + +[lint] +ignore = [] +select = ["E4", "E7", "E9", "F"] + +[per-file-ignores] +"__init__.py" = ["F401"] diff --git a/third_party/home-manager/tests/modules/programs/ruff/ruff.nix b/third_party/home-manager/tests/modules/programs/ruff/ruff.nix new file mode 100644 index 0000000000..26654d550c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ruff/ruff.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + programs.ruff = { + enable = true; + + settings = { + line-length = 100; + per-file-ignores = { "__init__.py" = [ "F401" ]; }; + lint = { + select = [ "E4" "E7" "E9" "F" ]; + ignore = [ ]; + }; + }; + }; + + test.stubs.ruff = { }; + + nmt.script = '' + assertFileExists home-files/.config/ruff/ruff.toml + assertFileContent home-files/.config/ruff/ruff.toml ${./expected.toml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/sapling/default.nix b/third_party/home-manager/tests/modules/programs/sapling/default.nix new file mode 100644 index 0000000000..0e0468ea6b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sapling/default.nix @@ -0,0 +1,4 @@ +{ + sapling-basic = ./sapling-basic.nix; + sapling-most = ./sapling-most.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/sapling/sapling-basic.nix b/third_party/home-manager/tests/modules/programs/sapling/sapling-basic.nix new file mode 100644 index 0000000000..6f5caabf5e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sapling/sapling-basic.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: + +{ + programs.sapling = { + enable = true; + userName = "John Doe"; + userEmail = "johndoe@example.com"; + }; + + test.stubs.sapling = { }; + + nmt.script = let + configfile = if pkgs.stdenv.isDarwin then + "Library/Preferences/sapling/sapling.conf" + else + ".config/sapling/sapling.conf"; + + expected = builtins.toFile "sapling.conf" '' + [ui] + username=John Doe + ''; + in '' + assertFileExists home-files/${configfile} + assertFileContent home-files/${configfile} ${expected} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/sapling/sapling-most.nix b/third_party/home-manager/tests/modules/programs/sapling/sapling-most.nix new file mode 100644 index 0000000000..7280e21ec6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sapling/sapling-most.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +{ + programs.sapling = { + enable = true; + userName = "John Doe"; + userEmail = "johndoe@example.com"; + aliases = { + cm = "commit"; + d = "diff --exclude=*.lock"; + s = "status"; + view = "!$HG config paths.default | xargs open"; + }; + extraConfig = { + pager.pager = "delta"; + gpg.key = "not-an-actual-key"; + }; + }; + + test.stubs.sapling = { }; + + nmt.script = let + configfile = if pkgs.stdenv.isDarwin then + "Library/Preferences/sapling/sapling.conf" + else + ".config/sapling/sapling.conf"; + + expected = builtins.toFile "sapling.conf" '' + [alias] + cm=commit + d=diff --exclude=*.lock + s=status + view=!$HG config paths.default | xargs open + + [gpg] + key=not-an-actual-key + + [pager] + pager=delta + + [ui] + username=John Doe + ''; + in '' + assertFileExists home-files/${configfile} + assertFileContent home-files/${configfile} ${expected} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix b/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix index 942d472f9d..8f97caa6f9 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix @@ -12,6 +12,6 @@ assertFileExists home-files/.bashrc assertFileContains \ home-files/.bashrc \ - 'eval "$(@scmpuff@/bin/scmpuff init -s)"' + 'eval "$(@scmpuff@/bin/scmpuff init --shell=bash)"' ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/default.nix b/third_party/home-manager/tests/modules/programs/scmpuff/default.nix index bf162a9bb7..ec73b5337a 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/default.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/default.nix @@ -6,4 +6,5 @@ scmpuff-zsh = ./zsh.nix; scmpuff-fish = ./fish.nix; scmpuff-no-fish = ./no-fish.nix; + scmpuff-no-aliases = ./no-aliases.nix; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix b/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix index 920196b16c..a1abbffa3b 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix @@ -16,6 +16,6 @@ assertFileExists home-files/.config/fish/config.fish assertFileContains \ home-files/.config/fish/config.fish \ - '@scmpuff@/bin/scmpuff init -s --shell=fish | source' + '@scmpuff@/bin/scmpuff init --shell=fish | source' ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-aliases.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-aliases.nix new file mode 100644 index 0000000000..0636c8791a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-aliases.nix @@ -0,0 +1,34 @@ +{ lib, ... }: + +{ + programs = { + scmpuff.enable = true; + scmpuff.enableAliases = false; + bash.enable = true; + fish.enable = true; + zsh.enable = true; + }; + + # Needed to avoid error with dummy fish package. + xdg.dataFile."fish/home-manager_generated_completions".source = + lib.mkForce (builtins.toFile "empty" ""); + + test.stubs.scmpuff = { }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(@scmpuff@/bin/scmpuff init --shell=bash --aliases=false)"' + + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(@scmpuff@/bin/scmpuff init --shell=zsh --aliases=false)"' + + assertFileExists home-files/.config/fish/config.fish + assertFileContains \ + home-files/.config/fish/config.fish \ + '@scmpuff@/bin/scmpuff init --shell=fish --aliases=false | source' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix index e76295a533..5594738aee 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix @@ -12,6 +12,6 @@ test.stubs.scmpuff = { }; nmt.script = '' - assertFileNotRegex home-files/.bashrc '@scmpuff@/bin/scmpuff' + assertFileNotRegex home-files/.bashrc '@scmpuff@' ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix index 1f479efdad..8c33a2b279 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix @@ -17,7 +17,7 @@ }; nmt.script = '' - assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s' - assertFileNotRegex home-files/.bashrc '@scmpuff@ init -s' + assertFileNotRegex home-files/.zshrc '@scmpuff@' + assertFileNotRegex home-files/.bashrc '@scmpuff@' ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix b/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix index ce0a0eaeb0..8a4e2e54c4 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix @@ -15,6 +15,6 @@ assertFileExists home-files/.zshrc assertFileContains \ home-files/.zshrc \ - 'eval "$(@scmpuff@/bin/scmpuff init -s)"' + 'eval "$(@scmpuff@/bin/scmpuff init --shell=zsh)"' ''; } diff --git a/third_party/home-manager/tests/modules/programs/sftpman/assert-on-no-sshkey.nix b/third_party/home-manager/tests/modules/programs/sftpman/assert-on-no-sshkey.nix new file mode 100644 index 0000000000..549b68902c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/assert-on-no-sshkey.nix @@ -0,0 +1,21 @@ +{ + config = { + programs.sftpman = { + enable = true; + + mounts = { + mount1 = { + host = "host1.example.com"; + mountPoint = "/path/to/somewhere"; + user = "root"; + }; + }; + }; + + test.stubs.sftpman = { }; + + test.asserts.assertions.expected = ['' + sftpman mounts using authentication type "publickey" but missing 'sshKey': mount1 + '']; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/sftpman/default.nix b/third_party/home-manager/tests/modules/programs/sftpman/default.nix new file mode 100644 index 0000000000..55e319e16e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/default.nix @@ -0,0 +1,4 @@ +{ + sftpman-example-settings = ./example-settings.nix; + sftpman-assert-on-no-sshkey = ./assert-on-no-sshkey.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/sftpman/example-settings.nix b/third_party/home-manager/tests/modules/programs/sftpman/example-settings.nix new file mode 100644 index 0000000000..265f35525f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/example-settings.nix @@ -0,0 +1,44 @@ +{ + config = { + programs.sftpman = { + enable = true; + defaultSshKey = "/home/user/.ssh/id_ed25519"; + + mounts = { + mount1 = { + host = "host1.example.com"; + mountPoint = "/path/to/somewhere"; + user = "root"; + mountOptions = [ "idmap=user" ]; + }; + mount2 = { + host = "host2.example.com"; + mountPoint = "/another/path"; + user = "someuser"; + authType = "password"; + sshKey = null; + }; + mount3 = { + host = "host3.example.com"; + mountPoint = "/yet/another/path"; + user = "user"; + sshKey = "/home/user/.ssh/id_rsa"; + }; + }; + }; + + test.stubs.sftpman = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/sftpman/mounts/mount1.json \ + ${./expected-mount1.json} + assertFileContent \ + home-files/.config/sftpman/mounts/mount2.json \ + ${./expected-mount2.json} + assertFileContent \ + home-files/.config/sftpman/mounts/mount3.json \ + ${./expected-mount3.json} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/sftpman/expected-mount1.json b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount1.json new file mode 100644 index 0000000000..06124fd26d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount1.json @@ -0,0 +1,13 @@ +{ + "authType": "publickey", + "beforeMount": "true", + "host": "host1.example.com", + "id": "mount1", + "mountOptions": [ + "idmap=user" + ], + "mountPoint": "/path/to/somewhere", + "port": 22, + "sshKey": "/home/user/.ssh/id_ed25519", + "user": "root" +} diff --git a/third_party/home-manager/tests/modules/programs/sftpman/expected-mount2.json b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount2.json new file mode 100644 index 0000000000..384a9e93f9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount2.json @@ -0,0 +1,11 @@ +{ + "authType": "password", + "beforeMount": "true", + "host": "host2.example.com", + "id": "mount2", + "mountOptions": [], + "mountPoint": "/another/path", + "port": 22, + "sshKey": null, + "user": "someuser" +} diff --git a/third_party/home-manager/tests/modules/programs/sftpman/expected-mount3.json b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount3.json new file mode 100644 index 0000000000..5ee679623e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/sftpman/expected-mount3.json @@ -0,0 +1,11 @@ +{ + "authType": "publickey", + "beforeMount": "true", + "host": "host3.example.com", + "id": "mount3", + "mountOptions": [], + "mountPoint": "/yet/another/path", + "port": 22, + "sshKey": "/home/user/.ssh/id_rsa", + "user": "user" +} diff --git a/third_party/home-manager/tests/modules/programs/ssh/default-config-expected.conf b/third_party/home-manager/tests/modules/programs/ssh/default-config-expected.conf index d205cab1e6..d387017bbd 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/default-config-expected.conf +++ b/third_party/home-manager/tests/modules/programs/ssh/default-config-expected.conf @@ -2,6 +2,7 @@ Host * ForwardAgent no + AddKeysToAgent no Compression no ServerAliveInterval 0 ServerAliveCountMax 3 diff --git a/third_party/home-manager/tests/modules/programs/ssh/forwards-dynamic-valid-bind-no-asserts-expected.conf b/third_party/home-manager/tests/modules/programs/ssh/forwards-dynamic-valid-bind-no-asserts-expected.conf index a67a96ca40..06720d4f9a 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/forwards-dynamic-valid-bind-no-asserts-expected.conf +++ b/third_party/home-manager/tests/modules/programs/ssh/forwards-dynamic-valid-bind-no-asserts-expected.conf @@ -5,6 +5,7 @@ Host dynamicBindPathNoPort Host * ForwardAgent no + AddKeysToAgent no Compression no ServerAliveInterval 0 ServerAliveCountMax 3 diff --git a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf index b6b760ce6e..903dc5710a 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf +++ b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf @@ -18,6 +18,7 @@ Host ordered Host * ForwardAgent no + AddKeysToAgent no Compression no ServerAliveInterval 0 ServerAliveCountMax 3 diff --git a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-match-and-hosts-expected.conf b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-match-and-hosts-expected.conf index d50343b99b..6e61831845 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-match-and-hosts-expected.conf +++ b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-match-and-hosts-expected.conf @@ -7,6 +7,7 @@ Match host xyz canonical Host * ForwardAgent no + AddKeysToAgent no Compression no ServerAliveInterval 0 ServerAliveCountMax 3 diff --git a/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.nix new file mode 100644 index 0000000000..47648e828a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.nix @@ -0,0 +1,82 @@ +{ config, pkgs, ... }: + +{ + config = { + programs.swayr = { + enable = true; + package = config.lib.test.mkStubPackage { }; + systemd.enable = true; + settings = { + menu = { + executable = "wofi"; + args = [ + "--show=dmenu" + "--allow-markup" + "--allow-images" + "--insensitive" + "--cache-file=/dev/null" + "--parse-search" + "--height=40%" + "--prompt={prompt}" + ]; + }; + + format = { + output_format = '' + {indent}Output {name} ({id})''; + workspace_format = '' + {indent}Workspace {name} [{layout}] on output {output_name} ({id})''; + container_format = '' + {indent}Container [{layout}] {marks} on workspace {workspace_name} ({id})''; + window_format = '' + img:{app_icon}:text:{indent}{app_name} — {urgency_start}“{title}”{urgency_end} {marks} on workspace {workspace_name} / {output_name} ({id})''; + indent = " "; + urgency_start = ''''; + urgency_end = ""; + html_escape = true; + }; + + layout = { + auto_tile = false; + auto_tile_min_window_width_per_output_width = [ + [ 800 400 ] + [ 1024 500 ] + [ 1280 600 ] + [ 1400 680 ] + [ 1440 700 ] + [ 1600 780 ] + [ 1680 780 ] + [ 1920 920 ] + [ 2048 980 ] + [ 2560 1000 ] + [ 3440 1200 ] + [ 3840 1280 ] + [ 4096 1400 ] + [ 4480 1600 ] + [ 7680 2400 ] + ]; + }; + + focus = { lockin_delay = 750; }; + + misc = { seq_inhibit = false; }; + }; + extraConfig = '' + [extra] + foo = "\ubar" + ''; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/swayrd.service + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*/bin/swayrd' + assertFileRegex $serviceFile 'Environment=RUST_BACKTRACE=1' + + assertFileExists home-files/.config/swayr/config.toml + assertFileContent home-files/.config/swayr/config.toml \ + ${./basic-configuration.toml} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.toml b/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.toml new file mode 100644 index 0000000000..3252a632a0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swayr/basic-configuration.toml @@ -0,0 +1,25 @@ +[focus] +lockin_delay = 750 + +[format] +container_format = "{indent}Container [{layout}] {marks} on workspace {workspace_name} ({id})" +html_escape = true +indent = " " +output_format = "{indent}Output {name} ({id})" +urgency_end = "" +urgency_start = "" +window_format = "img:{app_icon}:text:{indent}{app_name} — {urgency_start}“{title}”{urgency_end} {marks} on workspace {workspace_name} / {output_name} ({id})" +workspace_format = "{indent}Workspace {name} [{layout}] on output {output_name} ({id})" + +[layout] +auto_tile = false +auto_tile_min_window_width_per_output_width = [[800, 400], [1024, 500], [1280, 600], [1400, 680], [1440, 700], [1600, 780], [1680, 780], [1920, 920], [2048, 980], [2560, 1000], [3440, 1200], [3840, 1280], [4096, 1400], [4480, 1600], [7680, 2400]] + +[menu] +args = ["--show=dmenu", "--allow-markup", "--allow-images", "--insensitive", "--cache-file=/dev/null", "--parse-search", "--height=40%", "--prompt={prompt}"] +executable = "wofi" + +[misc] +seq_inhibit = false +[extra] +foo = "\ubar" diff --git a/third_party/home-manager/tests/modules/programs/swayr/default.nix b/third_party/home-manager/tests/modules/programs/swayr/default.nix new file mode 100644 index 0000000000..ed2908e90a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swayr/default.nix @@ -0,0 +1,4 @@ +{ + swayr-basic-configuration = ./basic-configuration.nix; + swayr-empty-configuration = ./empty-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/swayr/empty-configuration.nix b/third_party/home-manager/tests/modules/programs/swayr/empty-configuration.nix new file mode 100644 index 0000000000..f1b4d6298e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swayr/empty-configuration.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + config = { + programs.swayr = { + enable = true; + package = config.lib.test.mkStubPackage { }; + systemd.enable = true; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/swayrd.service + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*/bin/swayrd' + assertFileRegex $serviceFile 'Environment=RUST_BACKTRACE=1' + + assertPathNotExists home-files/.config/swayr/config.toml + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/thefuck/default.nix b/third_party/home-manager/tests/modules/programs/thefuck/default.nix new file mode 100644 index 0000000000..1250e0c062 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/thefuck/default.nix @@ -0,0 +1,5 @@ +{ + thefuck-integration-enabled = ./integration-enabled.nix; + thefuck-integration-enabled-instant = ./integration-enabled-instant.nix; + thefuck-integration-disabled = ./integration-disabled.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix b/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix new file mode 100644 index 0000000000..9a55efac08 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + programs = { + thefuck.enable = true; + thefuck.enableBashIntegration = false; + thefuck.enableFishIntegration = false; + thefuck.enableZshIntegration = false; + bash.enable = true; + zsh.enable = true; + }; + + test.stubs.thefuck = { }; + + nmt.script = '' + assertFileNotRegex home-files/.bashrc '@thefuck@/bin/thefuck' + assertPathNotExists home-files/.config/fish/functions/fuck.fish + assertFileNotRegex home-files/.zshrc '@thefuck@/bin/thefuck' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled-instant.nix b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled-instant.nix new file mode 100644 index 0000000000..18584acbd3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled-instant.nix @@ -0,0 +1,26 @@ +{ ... }: + +{ + programs = { + thefuck = { + enable = true; + enableInstantMode = true; + }; + bash.enable = true; + zsh.enable = true; + }; + + test.stubs.thefuck = { }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"' '"'"'--enable-experimental-instant-mode'"'"')"' + + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"' '"'"'--enable-experimental-instant-mode'"'"')"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix new file mode 100644 index 0000000000..79cadaf81c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix @@ -0,0 +1,37 @@ +{ ... }: + +{ + programs = { + thefuck.enable = true; + bash.enable = true; + fish.enable = true; + zsh.enable = true; + }; + + test.stubs.thefuck = { }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"')"' + + assertFileExists home-files/.config/fish/functions/fuck.fish + assertFileContains \ + home-files/.config/fish/functions/fuck.fish \ + 'function fuck --description="Correct your previous console command" + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 @thefuck@/bin/thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end + end' + + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"')"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.service b/third_party/home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.service index e1343da8a8..c99c8c13ac 100644 --- a/third_party/home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.service +++ b/third_party/home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.service @@ -8,7 +8,7 @@ KillMode=mixed Restart=on-failure [Unit] -After=graphical-session.target +After=graphical-session-pre.target Description=Highly customizable Wayland bar for Sway and Wlroots based compositors. Documentation=https://github.com/Alexays/Waybar/wiki PartOf=graphical-session.target diff --git a/third_party/home-manager/tests/modules/programs/wezterm/empty-setting.nix b/third_party/home-manager/tests/modules/programs/wezterm/empty-setting.nix index 062605aaa4..8e72b3b0ef 100644 --- a/third_party/home-manager/tests/modules/programs/wezterm/empty-setting.nix +++ b/third_party/home-manager/tests/modules/programs/wezterm/empty-setting.nix @@ -10,9 +10,7 @@ -- Generated by Home Manager. -- See https://wezfurlong.org/wezterm/ - -- Add config folder to watchlist for config reloads. local wezterm = require 'wezterm'; - wezterm.add_to_config_reload_watch_list(wezterm.config_dir) return {} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/example-setting.nix b/third_party/home-manager/tests/modules/programs/wezterm/example-setting.nix index ec586daa2e..60b81fa206 100644 --- a/third_party/home-manager/tests/modules/programs/wezterm/example-setting.nix +++ b/third_party/home-manager/tests/modules/programs/wezterm/example-setting.nix @@ -53,9 +53,7 @@ -- Generated by Home Manager. -- See https://wezfurlong.org/wezterm/ - -- Add config folder to watchlist for config reloads. local wezterm = require 'wezterm'; - wezterm.add_to_config_reload_watch_list(wezterm.config_dir) return { font = wezterm.font("JetBrains Mono"), diff --git a/third_party/home-manager/tests/modules/programs/wpaperd/default.nix b/third_party/home-manager/tests/modules/programs/wpaperd/default.nix new file mode 100644 index 0000000000..dfd4b041d9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wpaperd/default.nix @@ -0,0 +1 @@ +{ wpaperd-example-settings = ./wpaperd-example-settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-example-settings.nix b/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-example-settings.nix new file mode 100644 index 0000000000..8869f68cce --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-example-settings.nix @@ -0,0 +1,26 @@ +{ ... }: + +{ + config = { + programs.wpaperd = { + enable = true; + settings = { + eDP-1 = { + path = "/home/foo/Pictures/Wallpaper"; + apply-shadow = true; + }; + DP-2 = { + path = "/home/foo/Pictures/Anime"; + sorting = "descending"; + }; + }; + }; + + test.stubs.wpaperd = { }; + + nmt.script = '' + assertFileContent home-files/.config/wpaperd/wallpaper.toml \ + ${./wpaperd-expected-settings.toml} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-expected-settings.toml b/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-expected-settings.toml new file mode 100644 index 0000000000..55c87b58a6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wpaperd/wpaperd-expected-settings.toml @@ -0,0 +1,7 @@ +[DP-2] +path = "/home/foo/Pictures/Anime" +sorting = "descending" + +[eDP-1] +apply-shadow = true +path = "/home/foo/Pictures/Wallpaper" diff --git a/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix new file mode 100644 index 0000000000..9a8c18bf26 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -0,0 +1,27 @@ +{ ... }: + +let + shellIntegration = '' + function ya() { + tmp="$(mktemp -t "yazi-cwd.XXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + cd -- "$cwd" + fi + rm -f -- "$tmp" + } + ''; +in { + programs.bash.enable = true; + + programs.yazi = { + enable = true; + enableBashIntegration = true; + }; + + test.stubs.yazi = { }; + + nmt.script = '' + assertFileContains home-files/.bashrc '${shellIntegration}' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/default.nix b/third_party/home-manager/tests/modules/programs/yazi/default.nix new file mode 100644 index 0000000000..09d52ac3df --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/default.nix @@ -0,0 +1,7 @@ +{ + yazi-settings = ./settings.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; + yazi-nushell-integration-enabled = ./nushell-integration-enabled.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix new file mode 100644 index 0000000000..02506b266b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -0,0 +1,27 @@ +{ ... }: + +let + shellIntegration = '' + function ya + 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" + end + rm -f -- "$tmp" + end + ''; +in { + programs.fish.enable = true; + + programs.yazi = { + enable = true; + enableFishIntegration = true; + }; + + test.stubs.yazi = { }; + + nmt.script = '' + assertFileContains home-files/.config/fish/config.fish '${shellIntegration}' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/keymap-expected.toml b/third_party/home-manager/tests/modules/programs/yazi/keymap-expected.toml new file mode 100644 index 0000000000..6733978ad4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/keymap-expected.toml @@ -0,0 +1,27 @@ +[[input.keymap]] +exec = "close" +on = [""] + +[[input.keymap]] +exec = "close --submit" +on = [""] + +[[input.keymap]] +exec = "escape" +on = [""] + +[[input.keymap]] +exec = "backspace" +on = [""] + +[[manager.keymap]] +exec = "escape" +on = [""] + +[[manager.keymap]] +exec = "quit" +on = ["q"] + +[[manager.keymap]] +exec = "close" +on = [""] diff --git a/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix new file mode 100644 index 0000000000..121e275671 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: + +let + shellIntegration = '' + def --env ya [args?] { + let tmp = (mktemp -t "yazi-cwd.XXXXX") + if ($args == null) { + yazi --cwd-file $tmp + } else { + yazi $args --cwd-file $tmp + } + let cwd = (open $tmp) + if $cwd != "" and $cwd != $env.PWD { + cd $cwd + } + rm -f $tmp + } + ''; +in { + programs.nushell.enable = true; + + programs.yazi = { + enable = true; + enableNushellIntegration = true; + }; + + test.stubs.yazi = { }; + + nmt.script = let + configPath = if pkgs.stdenv.isDarwin then + "home-files/Library/Application Support/nushell/config.nu" + else + "home-files/.config/nushell/config.nu"; + in '' + assertFileContains '${configPath}' '${shellIntegration}' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/settings-expected.toml b/third_party/home-manager/tests/modules/programs/yazi/settings-expected.toml new file mode 100644 index 0000000000..678895c58a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/settings-expected.toml @@ -0,0 +1,8 @@ +[log] +enabled = false + +[manager] +show_hidden = false +sort_by = "modified" +sort_dir_first = true +sort_reverse = true diff --git a/third_party/home-manager/tests/modules/programs/yazi/settings.nix b/third_party/home-manager/tests/modules/programs/yazi/settings.nix new file mode 100644 index 0000000000..5a540cafb4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/settings.nix @@ -0,0 +1,84 @@ +{ ... }: + +{ + programs.yazi = { + enable = true; + + keymap = { + input.keymap = [ + { + exec = "close"; + on = [ "" ]; + } + { + exec = "close --submit"; + on = [ "" ]; + } + { + exec = "escape"; + on = [ "" ]; + } + { + exec = "backspace"; + on = [ "" ]; + } + ]; + manager.keymap = [ + { + exec = "escape"; + on = [ "" ]; + } + { + exec = "quit"; + on = [ "q" ]; + } + { + exec = "close"; + on = [ "" ]; + } + ]; + }; + settings = { + log = { enabled = false; }; + manager = { + show_hidden = false; + sort_by = "modified"; + sort_dir_first = true; + sort_reverse = true; + }; + }; + theme = { + filetype = { + rules = [ + { + fg = "#7AD9E5"; + mime = "image/*"; + } + { + fg = "#F3D398"; + mime = "video/*"; + } + { + fg = "#F3D398"; + mime = "audio/*"; + } + { + fg = "#CD9EFC"; + mime = "application/x-bzip"; + } + ]; + }; + }; + }; + + test.stubs.yazi = { }; + + nmt.script = '' + assertFileContent home-files/.config/yazi/keymap.toml \ + ${./keymap-expected.toml} + assertFileContent home-files/.config/yazi/yazi.toml \ + ${./settings-expected.toml} + assertFileContent home-files/.config/yazi/theme.toml \ + ${./theme-expected.toml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/theme-expected.toml b/third_party/home-manager/tests/modules/programs/yazi/theme-expected.toml new file mode 100644 index 0000000000..cfd1e985c3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/theme-expected.toml @@ -0,0 +1,15 @@ +[[filetype.rules]] +fg = "#7AD9E5" +mime = "image/*" + +[[filetype.rules]] +fg = "#F3D398" +mime = "video/*" + +[[filetype.rules]] +fg = "#F3D398" +mime = "audio/*" + +[[filetype.rules]] +fg = "#CD9EFC" +mime = "application/x-bzip" diff --git a/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix new file mode 100644 index 0000000000..ef7960c592 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -0,0 +1,27 @@ +{ ... }: + +let + shellIntegration = '' + function ya() { + tmp="$(mktemp -t "yazi-cwd.XXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + cd -- "$cwd" + fi + rm -f -- "$tmp" + } + ''; +in { + programs.zsh.enable = true; + + programs.yazi = { + enable = true; + enableBashIntegration = true; + }; + + test.stubs.yazi = { }; + + nmt.script = '' + assertFileContains home-files/.zshrc '${shellIntegration}' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/zsh/default.nix b/third_party/home-manager/tests/modules/programs/zsh/default.nix index fcfb642ffc..25aa3b4706 100644 --- a/third_party/home-manager/tests/modules/programs/zsh/default.nix +++ b/third_party/home-manager/tests/modules/programs/zsh/default.nix @@ -8,4 +8,5 @@ zsh-history-substring-search = ./history-substring-search.nix; zsh-prezto = ./prezto.nix; zsh-syntax-highlighting = ./syntax-highlighting.nix; + zsh-abbr = ./zsh-abbr.nix; } diff --git a/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix b/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix index 4e9054d931..10560b9fa6 100644 --- a/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix +++ b/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix @@ -17,9 +17,9 @@ with lib; # Written with regex to ensure we don't end up missing newlines in the future nmt.script = '' - assertFileRegex home-files/.zshrc "^bindkey '\^\[\[B' history-substring-search-down$" - assertFileRegex home-files/.zshrc "^bindkey '\^\[\[A' history-substring-search-up$" - assertFileRegex home-files/.zshrc "^bindkey '\\\\eOA' history-substring-search-up$" + assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[B\" history-substring-search-down$" + assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[A\" history-substring-search-up$" + assertFileRegex home-files/.zshrc "^bindkey \"\\\\eOA\" history-substring-search-up$" ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix b/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix index 73297c8c16..9baf1e4377 100644 --- a/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix +++ b/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix @@ -9,6 +9,7 @@ with lib; syntaxHighlighting = { enable = true; package = pkgs.hello; + highlighters = [ "brackets" "pattern" "cursor" ]; styles.comment = "fg=#6c6c6c"; }; }; @@ -17,6 +18,7 @@ with lib; nmt.script = '' assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=('brackets' 'pattern' 'cursor')" assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=('comment' 'fg=#6c6c6c')" ''; }; diff --git a/third_party/home-manager/tests/modules/programs/zsh/zsh-abbr.nix b/third_party/home-manager/tests/modules/programs/zsh/zsh-abbr.nix new file mode 100644 index 0000000000..0e016fafe8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zsh/zsh-abbr.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs.zsh.zsh-abbr = { + enable = true; + abbreviations = { ga = "git add"; }; + }; + + test.stubs.zsh-abbr = { }; + + nmt.script = '' + abbreviations=home-files/.config/zsh-abbr/user-abbreviations + + assertFileExists $abbreviations + assertFileContains $abbreviations "abbr 'ga'='git add'" + ''; +} diff --git a/third_party/home-manager/tests/modules/services/cliphist/cliphist-sway-session-target.nix b/third_party/home-manager/tests/modules/services/cliphist/cliphist-sway-session-target.nix new file mode 100644 index 0000000000..25da0f1375 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/cliphist/cliphist-sway-session-target.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + services.cliphist = { + enable = true; + systemdTarget = "sway-session.target"; + }; + + test.stubs = { + cliphist = { }; + wl-clipboard = { }; + }; + + nmt.script = '' + assertFileExists home-files/.config/systemd/user/cliphist.service + ''; +} diff --git a/third_party/home-manager/tests/modules/services/cliphist/default.nix b/third_party/home-manager/tests/modules/services/cliphist/default.nix new file mode 100644 index 0000000000..0110133223 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/cliphist/default.nix @@ -0,0 +1 @@ +{ cliphist-sway-session-target = ./cliphist-sway-session-target.nix; } diff --git a/third_party/home-manager/tests/modules/services/darkman/basic-configuration.nix b/third_party/home-manager/tests/modules/services/darkman/basic-configuration.nix new file mode 100644 index 0000000000..4c3e854700 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/darkman/basic-configuration.nix @@ -0,0 +1,70 @@ +{ config, pkgs, ... }: + +{ + services.darkman = { + enable = true; + package = config.lib.test.mkStubPackage { + name = "darkman"; + outPath = "@darkman@"; + }; + + settings.lat = 50.8; + settings.lng = 4.4; + settings.usegeoclue = true; + + darkModeScripts.color-scheme-dark = '' + dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" + ''; + + lightModeScripts.color-scheme-light = pkgs.writeScript "my-python-script" '' + #!${pkgs.python}/bin/python + + print('Do something!') + ''; + }; + + test.stubs.python = { }; + + nmt.script = '' + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/darkman.service) + darkModeScriptFile=$(normalizeStorePaths home-files/.local/share/dark-mode.d/color-scheme-dark) + lightModeScriptFile=$(normalizeStorePaths home-files/.local/share/light-mode.d/color-scheme-light) + + assertFileExists $serviceFile + assertFileContent $serviceFile ${ + builtins.toFile "expected" '' + [Install] + WantedBy=graphical-session.target + + [Service] + BusName=nl.whynothugo.darkman + ExecStart=@darkman@/bin/darkman run + Restart=on-failure + Slice=background.slice + TimeoutStopSec=15 + Type=dbus + + [Unit] + BindsTo=graphical-session.target + Description=Darkman system service + Documentation=man:darkman(1) + PartOf=graphical-session.target + X-Restart-Triggers=/nix/store/00000000000000000000000000000000-darkman-config.yaml + '' + } + assertFileContent $darkModeScriptFile ${ + builtins.toFile "expected" '' + #!/nix/store/00000000000000000000000000000000-bash/bin/bash + dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" + + '' + } + assertFileContent $lightModeScriptFile ${ + builtins.toFile "expected" '' + #!@python@/bin/python + + print('Do something!') + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/services/darkman/default.nix b/third_party/home-manager/tests/modules/services/darkman/default.nix new file mode 100644 index 0000000000..6c03491b96 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/darkman/default.nix @@ -0,0 +1 @@ +{ darkman-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.service b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27-emacs.service similarity index 100% rename from third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.service rename to third_party/home-manager/tests/modules/services/emacs/emacs-socket-27-emacs.service diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix index c7282bdb8f..70e85551bd 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix @@ -32,7 +32,7 @@ ${ pkgs.substituteAll { inherit (pkgs) runtimeShell coreutils; - src = ./emacs-socket-emacs.service; + src = ./emacs-socket-27-emacs.service; } } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28-emacs.service b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28-emacs.service new file mode 100644 index 0000000000..153f5d8fe5 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28-emacs.service @@ -0,0 +1,10 @@ +[Service] +ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon='%t/emacs/server' '-f' 'exwm-enable'" +Restart=on-failure +SuccessExitStatus=15 +Type=notify + +[Unit] +Description=Emacs text editor +Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ +X-RestartIfChanged=false diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix index c822f535e7..49887c3307 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix @@ -32,7 +32,7 @@ ${ pkgs.substituteAll { inherit (pkgs) runtimeShell coreutils; - src = ./emacs-socket-emacs.service; + src = ./emacs-socket-28-emacs.service; } } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.socket b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.socket index 7fffcb0d00..843d87fe8e 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.socket +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-emacs.socket @@ -1,9 +1,11 @@ [Install] +RequiredBy=emacs.service WantedBy=sockets.target [Socket] DirectoryMode=0700 FileDescriptorName=server +FlushPending=true ListenStream=%t/emacs/server SocketMode=0600 diff --git a/third_party/home-manager/tests/modules/services/osmscout-server/basic-setup.nix b/third_party/home-manager/tests/modules/services/osmscout-server/basic-setup.nix new file mode 100644 index 0000000000..62333fb2bf --- /dev/null +++ b/third_party/home-manager/tests/modules/services/osmscout-server/basic-setup.nix @@ -0,0 +1,43 @@ +{ config, ... }: + +{ + services.osmscout-server = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@osmscout-server@"; }; + network = { + startWhenNeeded = true; + listenAddress = "0.0.0.0"; + port = 55555; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/systemd/user/osmscout-server.service \ + ${ + builtins.toFile "osmscout-server.service" '' + [Service] + ExecStart='@osmscout-server@/bin/osmscout-server' --systemd --quiet + + [Unit] + Description=OSM Scout Server + '' + } + assertFileContent \ + home-files/.config/systemd/user/osmscout-server.socket \ + ${ + builtins.toFile "osmscout-server.socket" '' + [Install] + WantedBy=sockets.target + + [Socket] + ListenStream=0.0.0.0:55555 + TriggerLimitBurst=1 + TriggerLimitIntervalSec=60s + + [Unit] + Description=OSM Scout Server Socket + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/services/osmscout-server/default.nix b/third_party/home-manager/tests/modules/services/osmscout-server/default.nix new file mode 100644 index 0000000000..1acee0b889 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/osmscout-server/default.nix @@ -0,0 +1 @@ +{ osmscout-server = ./basic-setup.nix; } diff --git a/third_party/home-manager/tests/modules/services/pasystray/default.nix b/third_party/home-manager/tests/modules/services/pasystray/default.nix new file mode 100644 index 0000000000..0c0f31c5f9 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pasystray/default.nix @@ -0,0 +1 @@ +{ pasystray-service = ./service.nix; } diff --git a/third_party/home-manager/tests/modules/services/pasystray/expected.service b/third_party/home-manager/tests/modules/services/pasystray/expected.service new file mode 100644 index 0000000000..b2c23c518f --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pasystray/expected.service @@ -0,0 +1,13 @@ +[Install] +WantedBy=graphical-session.target + +[Service] +Environment=PATH=@paprefs@/bin:@pavucontrol@/bin +ExecStart='@pasystray@/bin/pasystray' '-g' + +[Unit] +After=graphical-session-pre.target +After=tray.target +Description=PulseAudio system tray +PartOf=graphical-session.target +Requires=tray.target diff --git a/third_party/home-manager/tests/modules/services/pasystray/service.nix b/third_party/home-manager/tests/modules/services/pasystray/service.nix new file mode 100644 index 0000000000..5b8548c8b4 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pasystray/service.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + services.pasystray = { + enable = true; + extraOptions = [ "-g" ]; + }; + + test.stubs = { + pasystray = { }; + paprefs = { }; + pavucontrol = { }; + }; + + nmt.script = '' + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/pasystray.service) + assertFileContent "$serviceFile" ${./expected.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/picom/picom-basic-configuration-expected.service b/third_party/home-manager/tests/modules/services/picom/picom-basic-configuration-expected.service index 6aeef22495..f5d0efeb03 100644 --- a/third_party/home-manager/tests/modules/services/picom/picom-basic-configuration-expected.service +++ b/third_party/home-manager/tests/modules/services/picom/picom-basic-configuration-expected.service @@ -2,7 +2,7 @@ WantedBy=graphical-session.target [Service] -ExecStart=@picom@/bin/picom --config /nix/store/00000000000000000000000000000000-hm_picompicom.conf --legacy-backends +ExecStart=@picom@/bin/dummy --config /nix/store/00000000000000000000000000000000-hm_picompicom.conf --legacy-backends Restart=always RestartSec=3 diff --git a/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.desktop b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.desktop new file mode 100644 index 0000000000..921ca5df43 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Exec=@xdg-utils@/bin/xdg-open http://localhost:9494 +Icon=/signaturepdf/share/signaturepdf/public/favicon.ico +Name=SignaturePDF +Terminal=false +Type=Application +Version=1.4 diff --git a/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.nix b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.nix new file mode 100644 index 0000000000..66c1b08344 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + services.signaturepdf = { + enable = true; + port = 9494; + extraConfig = { upload_max_filesize = "24M"; }; + }; + + test.stubs = { + signaturepdf = { outPath = "/signaturepdf"; }; + xdg-utils = { }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/systemd/user/signaturepdf.service \ + ${./basic-configuration.service} + + assertFileContent \ + home-path/share/applications/signaturepdf.desktop \ + ${./basic-configuration.desktop} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.service b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.service new file mode 100644 index 0000000000..0775fff651 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/signaturepdf/basic-configuration.service @@ -0,0 +1,8 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=/signaturepdf/bin/signaturepdf 9494 '-d' 'upload_max_filesize=24M' + +[Unit] +Description=signaturepdf; signing, organizing, editing metadatas or compressing PDFs diff --git a/third_party/home-manager/tests/modules/services/signaturepdf/default.nix b/third_party/home-manager/tests/modules/services/signaturepdf/default.nix new file mode 100644 index 0000000000..a887f1242b --- /dev/null +++ b/third_party/home-manager/tests/modules/services/signaturepdf/default.nix @@ -0,0 +1 @@ +{ signaturepdf-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/swayidle/basic-configuration.nix b/third_party/home-manager/tests/modules/services/swayidle/basic-configuration.nix index caa06ae161..96d9832090 100644 --- a/third_party/home-manager/tests/modules/services/swayidle/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/swayidle/basic-configuration.nix @@ -46,6 +46,7 @@ assertFileExists $serviceFile assertFileRegex $serviceFile 'ExecStart=.*/bin/swayidle ${expectedArgs}' + assertFileRegex $serviceFile 'Restart=always' assertFileRegex $serviceFile 'Environment=.*PATH=${ lib.makeBinPath [ pkgs.bash ] }' diff --git a/third_party/home-manager/tests/modules/services/sxhkd/service.nix b/third_party/home-manager/tests/modules/services/sxhkd/service.nix index 84f3086a8b..5f49f7a579 100644 --- a/third_party/home-manager/tests/modules/services/sxhkd/service.nix +++ b/third_party/home-manager/tests/modules/services/sxhkd/service.nix @@ -21,6 +21,6 @@ 'systemctl --user stop sxhkd.scope 2> /dev/null || true' assertFileContains $xsessionFile \ - 'systemd-cat -t sxhkd systemd-run --user --scope -u sxhkd @sxhkd@/bin/sxhkd -m 1 &' + 'systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd @sxhkd@/bin/sxhkd -m 1 &' ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix index 3daad82604..0f9a18e5bf 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix @@ -10,7 +10,7 @@ }; test.asserts.warnings.expected = [ - "You have enabled hyprland.systemdIntegration or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake." + "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." ]; test.asserts.warnings.enable = true; diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf index fa0f63f70b..d715fad0b0 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf @@ -1,8 +1,11 @@ -exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target +exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $mod=SUPER bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=overshot, 0.4,0.8,0.2,1.2 +plugin=/path/to/plugin1 +plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +source=sourced.conf animations { animation=border, 1, 2, smoothIn animation=fade, 1, 4, smoothOut @@ -26,8 +29,6 @@ input { bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow bindm=$mod ALT, mouse:272, resizewindow -plugin=/path/to/plugin1 -plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so # window resize bind = $mod, S, submap, resize diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix index ee8227550a..31fe043201 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix @@ -8,6 +8,8 @@ plugins = [ "/path/to/plugin1" (config.lib.test.mkStubPackage { name = "foo"; }) ]; settings = { + source = [ "sourced.conf" ]; + decoration = { shadow_offset = "0 5"; "col.shadow" = "rgba(00000099)"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf index 795ad59d9c..953e664cc4 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf @@ -90,7 +90,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf index 8b11cc1f64..28254b2b7c 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf @@ -92,7 +92,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf index be91606202..3a956c9ecb 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf @@ -90,7 +90,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf index b53d95bffe..78119a2cda 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf @@ -102,7 +102,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf new file mode 100644 index 0000000000..be91606202 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf @@ -0,0 +1,106 @@ +font pango:monospace 8.000000 +floating_modifier Mod1 +default_border pixel 2 +default_floating_border pixel 2 +hide_edge_borders none +focus_wrapping no +focus_follows_mouse yes +focus_on_window_activation smart +mouse_warping output +workspace_layout default +workspace_auto_back_and_forth no +client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577 +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c +client.background #ffffff + +bindsym Mod1+1 workspace number 1 +bindsym Mod1+2 workspace number 2 +bindsym Mod1+3 workspace number 3 +bindsym Mod1+4 workspace number 4 +bindsym Mod1+5 workspace number 5 +bindsym Mod1+6 workspace number 6 +bindsym Mod1+7 workspace number 7 +bindsym Mod1+8 workspace number 8 +bindsym Mod1+9 workspace number 9 +bindsym Mod1+Down focus down +bindsym Mod1+Left focus left +bindsym Mod1+Return exec @foot@/bin/foot +bindsym Mod1+Right focus right +bindsym Mod1+Shift+1 move container to workspace number 1 +bindsym Mod1+Shift+2 move container to workspace number 2 +bindsym Mod1+Shift+3 move container to workspace number 3 +bindsym Mod1+Shift+4 move container to workspace number 4 +bindsym Mod1+Shift+5 move container to workspace number 5 +bindsym Mod1+Shift+6 move container to workspace number 6 +bindsym Mod1+Shift+7 move container to workspace number 7 +bindsym Mod1+Shift+8 move container to workspace number 8 +bindsym Mod1+Shift+9 move container to workspace number 9 +bindsym Mod1+Shift+Down move down +bindsym Mod1+Shift+Left move left +bindsym Mod1+Shift+Right move right +bindsym Mod1+Shift+Up move up +bindsym Mod1+Shift+c reload +bindsym Mod1+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' +bindsym Mod1+Shift+h move left +bindsym Mod1+Shift+j move down +bindsym Mod1+Shift+k move up +bindsym Mod1+Shift+l move right +bindsym Mod1+Shift+minus move scratchpad +bindsym Mod1+Shift+q kill +bindsym Mod1+Shift+space floating toggle +bindsym Mod1+Up focus up +bindsym Mod1+a focus parent +bindsym Mod1+b splith +bindsym Mod1+d exec @dmenu@/bin/dmenu_run +bindsym Mod1+e layout toggle split +bindsym Mod1+f fullscreen toggle +bindsym Mod1+h focus left +bindsym Mod1+j focus down +bindsym Mod1+k focus up +bindsym Mod1+l focus right +bindsym Mod1+minus scratchpad show +bindsym Mod1+r mode resize +bindsym Mod1+s layout stacking +bindsym Mod1+space focus mode_toggle +bindsym Mod1+v splitv +bindsym Mod1+w layout tabbed + +mode "resize" { + bindsym Down resize grow height 10 px + bindsym Escape mode default + bindsym Left resize shrink width 10 px + bindsym Return mode default + bindsym Right resize grow width 10 px + bindsym Up resize shrink height 10 px + bindsym h resize shrink width 10 px + bindsym j resize grow height 10 px + bindsym k resize shrink height 10 px + bindsym l resize grow width 10 px +} + +bar { + font pango:monospace 8.000000 + mode dock + hidden_state hide + position bottom + status_command @i3status@/bin/i3status + swaybar_command @sway@/bin/swaybar + workspace_buttons yes + strip_workspace_numbers no + tray_output primary + colors { + background #000000 + statusline #ffffff + separator #666666 + focused_workspace #4c7899 #285577 #ffffff + active_workspace #333333 #5f676a #ffffff + inactive_workspace #333333 #222222 #888888 + urgent_workspace #2f343a #900000 #ffffff + binding_mode #2f343a #900000 #ffffff + } +} + +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix index 72e1fd9eae..13aac533c0 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix @@ -15,6 +15,6 @@ nmt.script = '' assertFileExists home-files/.config/sway/config assertFileContent $(normalizeStorePaths home-files/.config/sway/config) \ - ${./sway-default.conf} + ${./sway-post-2003.conf} ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-stubs.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-stubs.nix index 2ae673c781..f946dfa78d 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-stubs.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-stubs.nix @@ -5,7 +5,7 @@ dmenu = { }; foot = { }; i3status = { }; - sway = { }; + sway = { version = "1"; }; sway-unwrapped = { version = "1"; }; swaybg = { }; xwayland = { }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf index 34924bb1a8..3647ca246d 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf @@ -89,7 +89,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf index c19373d1e6..1fc0bac4d7 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf @@ -90,7 +90,7 @@ bar { swaybar_command @sway@/bin/swaybar workspace_buttons yes strip_workspace_numbers no - tray_output primary + tray_output * colors { background #000000 statusline #ffffff diff --git a/third_party/home-manager/tests/modules/systemd/default.nix b/third_party/home-manager/tests/modules/systemd/default.nix index a0271b47be..ee8a9ae6ba 100644 --- a/third_party/home-manager/tests/modules/systemd/default.nix +++ b/third_party/home-manager/tests/modules/systemd/default.nix @@ -2,6 +2,8 @@ systemd-services = ./services.nix; systemd-services-disabled-for-root = ./services-disabled-for-root.nix; systemd-session-variables = ./session-variables.nix; + systemd-user-config = ./user-config.nix; + systemd-empty-user-config = ./empty-user-config.nix; systemd-slices = ./slices.nix; systemd-timers = ./timers.nix; } diff --git a/third_party/home-manager/tests/modules/systemd/empty-user-config.nix b/third_party/home-manager/tests/modules/systemd/empty-user-config.nix new file mode 100644 index 0000000000..9e192ae4a0 --- /dev/null +++ b/third_party/home-manager/tests/modules/systemd/empty-user-config.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + nmt.script = '' + userConf=home-files/.config/systemd/user.conf + assertPathNotExists $userConf + ''; +} diff --git a/third_party/home-manager/tests/modules/systemd/user-config.nix b/third_party/home-manager/tests/modules/systemd/user-config.nix new file mode 100644 index 0000000000..f977d2f194 --- /dev/null +++ b/third_party/home-manager/tests/modules/systemd/user-config.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +{ + systemd.user.settings.Manager = { + LogLevel = "debug"; + DefaultCPUAccounting = true; + DefaultEnvironment = { + TEST = "abc"; + PATH = "/bin:/sbin:/some where"; + }; + }; + + nmt.script = '' + userConf=home-files/.config/systemd/user.conf + assertFileExists $userConf + assertFileContent $userConf ${ + pkgs.writeText "expected" '' + [Manager] + DefaultCPUAccounting=true + DefaultEnvironment=PATH='/bin:/sbin:/some where' TEST='abc' + LogLevel=debug + '' + } + ''; +} diff --git a/third_party/home-manager/tests/stubs.nix b/third_party/home-manager/tests/stubs.nix index 5dee8e43a1..e9ecbed703 100644 --- a/third_party/home-manager/tests/stubs.nix +++ b/third_party/home-manager/tests/stubs.nix @@ -33,7 +33,8 @@ let defaultBuildScript = "mkdir $out"; - dummyPackage = pkgs.runCommandLocal "dummy" { } defaultBuildScript; + dummyPackage = pkgs.runCommandLocal "dummy" { meta.mainProgram = "dummy"; } + defaultBuildScript; mkStubPackage = { name ? "dummy", outPath ? null, version ? null , buildScript ? defaultBuildScript }: @@ -41,7 +42,10 @@ let pkg = if name == "dummy" && buildScript == defaultBuildScript then dummyPackage else - pkgs.runCommandLocal name { pname = name; } buildScript; + pkgs.runCommandLocal name { + pname = name; + meta.mainProgram = name; + } buildScript; in pkg // optionalAttrs (outPath != null) { inherit outPath;