diff --git a/.builds/manual.yml b/.builds/manual.yml index af257412cffc..4072e5a4dccd 100644 --- a/.builds/manual.yml +++ b/.builds/manual.yml @@ -9,6 +9,7 @@ environment: NIX_CONFIG: "experimental-features = nix-command flakes" packages: - nixos.cachix + - nixos.jq tasks: - setup: | cachix use rycee @@ -26,7 +27,7 @@ tasks: if [[ $gitBranch == master ]]; then dirName="unstable" else - dirName="$(cat .release)" + dirName="$(jq -r .release < release.json)" fi rsync --delete -r --info=stats \ diff --git a/.editorconfig b/.editorconfig index a41f0862b85c..c036a7541f23 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,3 +19,6 @@ indent_style = tab [*.md] trim_trailing_whitespace = false + +[*.plist] +insert_final_newline = false diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 76b9adfa72fc..b34df60ea0dd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.05" + target-branch: "release-24.05" schedule: interval: "weekly" commit-message: @@ -18,7 +18,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.11" + target-branch: "release-24.11" schedule: interval: "weekly" commit-message: diff --git a/.github/labeler.yml b/.github/labeler.yml index b03251e89a32..cab1b5438716 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,36 +1,46 @@ "mail": - - modules/programs/aerc*.nix - - modules/programs/alot*.nix - - tests/modules/programs/aerc/* - - tests/modules/programs/alot/* - - modules/programs/mujmap.nix - - tests/modules/programs/mujmap/* - - modules/programs/notmuch.nix - - modules/programs/neomutt* - - tests/modules/programs/neomutt/* - - modules/programs/getmail* - - modules/*/mbsync* - - tests/modules/programs/mbsync/* - - modules/programs/himalaya.nix - - tests/modules/programs/himalaya/* - - modules/programs/thunderbird.nix - - tests/modules/programs/thunderbird/* - - modules/services/imapnotify.nix +- changed-files: + - any-glob-to-any-file: + - modules/programs/aerc*.nix + - modules/programs/alot*.nix + - tests/modules/programs/aerc/* + - tests/modules/programs/alot/* + - modules/programs/mujmap.nix + - tests/modules/programs/mujmap/* + - modules/programs/notmuch.nix + - modules/programs/neomutt* + - tests/modules/programs/neomutt/* + - modules/programs/getmail* + - modules/*/mbsync* + - tests/modules/programs/mbsync/* + - modules/programs/himalaya.nix + - tests/modules/programs/himalaya/* + - modules/programs/thunderbird.nix + - tests/modules/programs/thunderbird/* + - modules/services/imapnotify.nix "neovim": - - modules/programs/neovim.nix - - tests/modules/programs/neovim/**/* +- changed-files: + - any-glob-to-any-file: + - modules/programs/neovim.nix + - tests/modules/programs/neovim/**/* "shell": - - modules/lib/zsh.nix - - modules/programs/zsh* - - modules/programs/bash* - - tests/modules/programs/zsh/**/* +- changed-files: + - any-glob-to-any-file: + - modules/lib/zsh.nix + - modules/programs/zsh* + - modules/programs/bash* + - tests/modules/programs/zsh/**/* "calendar": - - modules/programs/khal* - - modules/*/vdirsyncer* - - modules/accounts/calendar.nix +- changed-files: + - any-glob-to-any-file: + - modules/programs/khal* + - modules/*/vdirsyncer* + - modules/accounts/calendar.nix "contacts": - - modules/accounts/contacts.nix +- changed-files: + - any-glob-to-any-file: + - modules/accounts/contacts.nix diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml index 238cb8436df5..4e10f9ccb95f 100644 --- a/.github/workflows/github_pages.yml +++ b/.github/workflows/github_pages.yml @@ -11,10 +11,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v13 + - uses: cachix/cachix-action@v15 with: name: nix-community authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -22,7 +22,7 @@ jobs: nix-build -A docs.html cp -r result/share/doc/home-manager public - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index daea610a3a51..81585d85976c 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -17,8 +17,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'nix-community' steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} sync-labels: true - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d92789a6cda..ff67b6760387 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v13 - with: - name: nix-community - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: | if grep -R --exclude stdlib-extended.nix literalExample modules ; then echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr @@ -29,3 +25,5 @@ jobs: - run: nix-shell --show-trace . -A install - run: yes | home-manager -I home-manager=. uninstall - run: nix-shell --show-trace --arg enableBig false --pure tests -A run.all + # Somebody please help us fix the macos tests. + if: matrix.os != 'macos-latest' diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 2f1eb8c658f1..9b0e4b44354a 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -12,9 +12,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v30 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v20 + uses: DeterminateSystems/update-flake-lock@v24 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies diff --git a/README.md b/README.md index 805d2cfcca8d..d90efb9e60f6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ For a systematic overview of Home Manager and its available options, please see: - [Home Manager manual][manual] - [Home Manager configuration options][configuration options] - [3rd party Home Manager option - search](https://mipmip.github.io/home-manager-option-search/) + search](https://home-manager-options.extranix.com/) If you would like to contribute to Home Manager, then please have a look at ["Contributing" in the manual][contributing]. @@ -28,7 +28,7 @@ Releases Home Manager is developed against `nixpkgs-unstable` branch, which often causes it to contain tweaks for changes/packages not yet released in stable [NixOS][]. To avoid breaking users' configurations, Home Manager is released in branches -corresponding to NixOS releases (e.g. `release-23.11`). These branches get +corresponding to NixOS releases (e.g. `release-24.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. @@ -49,7 +49,7 @@ dconf store and cannot tell whether a configuration that it is about to be overwritten was from a previous Home Manager generation or from manual configuration. -Home Manager targets [NixOS][] unstable and NixOS version 23.11 (the current +Home Manager targets [NixOS][] unstable and NixOS version 24.11 (the current stable version), it may or may not work on other Linux distributions and NixOS versions. @@ -112,7 +112,7 @@ License This project is licensed under the terms of the [MIT license](LICENSE). [#home-manager]: https://webchat.oftc.net/?channels=home-manager -[Nix Flakes]: https://nixos.wiki/wiki/Flakes +[Nix Flakes]: https://wiki.nixos.org/wiki/Flakes [NixOS]: https://nixos.org/ [Nix]: https://nixos.org/explore.html [Nixpkgs]: https://github.com/NixOS/nixpkgs @@ -125,4 +125,4 @@ This project is licensed under the terms of the [MIT license](LICENSE). [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 -[rollbacks]: https://nix-community.github.io/home-manager/#sec-usage-rollbacks +[rollbacks]: https://nix-community.github.io/home-manager/index.xhtml#sec-usage-rollbacks diff --git a/docs/default.nix b/docs/default.nix index b6dae7092c08..dd79c4590367 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -7,28 +7,37 @@ let - nmdSrc = fetchTarball { - url = "https://git.sr.ht/~rycee/nmd/archive/v0.5.0.tar.gz"; - sha256 = "0hnd86jd19zb5j3hmpwmdmdiasg65lgahqv7n8frl9p1vdqz6z67"; - }; - - nmd = import nmdSrc { - inherit lib; - # The DocBook output of `nixos-render-docs` doesn't have the change - # `nmd` uses to work around the broken stylesheets in - # `docbook-xsl-ns`, so we restore the patched version here. - pkgs = pkgs // { - docbook-xsl-ns = - pkgs.docbook-xsl-ns.override { withManOptDedupPatch = true; }; - }; - }; + # Recursively replace each derivation in the given attribute set + # with the same derivation but with the `outPath` attribute set to + # the string `"\${pkgs.attribute.path}"`. This allows the + # documentation to refer to derivations through their values without + # establishing an actual dependency on the derivation output. + # + # This is not perfect, but it seems to cover a vast majority of use + # cases. + # + # Caveat: even if the package is reached by a different means, the + # path above will be shown and not e.g. + # `${config.services.foo.package}`. + scrubDerivations = prefixPath: attrs: + let + scrubDerivation = name: value: + let pkgAttrName = prefixPath + "." + name; + in if lib.isAttrs value then + scrubDerivations pkgAttrName value + // lib.optionalAttrs (lib.isDerivation value) { + outPath = "\${${pkgAttrName}}"; + } + else + value; + in lib.mapAttrs scrubDerivation attrs; # Make sure the used package is scrubbed to avoid actually # instantiating derivations. scrubbedPkgsModule = { imports = [{ _module.args = { - pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs); + pkgs = lib.mkForce (scrubDerivations "pkgs" pkgs); pkgs_i686 = lib.mkForce { }; }; }]; @@ -46,7 +55,11 @@ let hmPath = toString ./..; buildOptionsDocs = args@{ modules, includeModuleSystemOptions ? true, ... }: - let options = (lib.evalModules { inherit modules; }).options; + let + options = (lib.evalModules { + inherit modules; + class = "homeManager"; + }).options; in pkgs.buildPackages.nixosOptionsDoc ({ options = if includeModuleSystemOptions then options @@ -113,7 +126,6 @@ let ''; # 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; @@ -124,8 +136,6 @@ let html = home-manager-manual; htmlOpenTool = pkgs.callPackage ./html-open-tool.nix { } { inherit html; }; in { - inherit nmdSrc; - options = { # TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream # `nixosOptionsDoc` is more customizable. @@ -137,7 +147,7 @@ in { substitute \ ${hmOptionsDocs.optionsJSON}/nix-support/hydra-build-products \ $out/nix-support/hydra-build-products \ - --replace \ + --replace-fail \ '${hmOptionsDocs.optionsJSON}/share/doc/nixos' \ "$out/share/doc/home-manager" ''; @@ -154,6 +164,7 @@ in { inherit lib pkgs; check = false; } ++ [ scrubbedPkgsModule ]; + class = "homeManager"; }; in builtins.toJSON result.config.meta.maintainers); } diff --git a/docs/flake.lock b/docs/flake.lock new file mode 100644 index 000000000000..4b53be81116f --- /dev/null +++ b/docs/flake.lock @@ -0,0 +1,45 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1706683685, + "narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "scss-reset": "scss-reset" + } + }, + "scss-reset": { + "flake": false, + "locked": { + "lastModified": 1683906868, + "narHash": "sha256-cif5Sx8Ca5vxdw/mNAgpulLH15TwmzyJFNM7JURpoaE=", + "owner": "andreymatin", + "repo": "scss-reset", + "rev": "5a7bd491ac82441e6283fb0d5d54644b913b30c7", + "type": "github" + }, + "original": { + "owner": "andreymatin", + "ref": "1.4.2", + "repo": "scss-reset", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/docs/flake.nix b/docs/flake.nix new file mode 100644 index 000000000000..f4aa9567c297 --- /dev/null +++ b/docs/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Support developing Home Manager documentation"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + scss-reset = { + url = "github:andreymatin/scss-reset/1.4.2"; + flake = false; + }; + }; + + outputs = { self, nixpkgs, scss-reset }: + let + supportedSystems = [ + "aarch64-darwin" + "aarch64-linux" + "i686-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + + lib = nixpkgs.lib; + + forAllSystems = lib.genAttrs supportedSystems; + + flakePkgs = pkgs: { + p-build = pkgs.writeShellScriptBin "p-build" '' + set -euo pipefail + + export PATH=${lib.makeBinPath [ pkgs.coreutils pkgs.rsass ]} + + tmpfile=$(mktemp -d) + trap "rm -r $tmpfile" EXIT + + ln -s "${scss-reset}/build" "$tmpfile/scss-reset" + + rsass --load-path="$tmpfile" --style compressed \ + ./static/style.scss > ./static/style.css + echo "Generated ./static/style.css" + ''; + }; + in { + devShells = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + fpkgs = flakePkgs pkgs; + in { + default = pkgs.mkShell { + name = "hm-docs"; + packages = [ fpkgs.p-build ]; + }; + }); + }; +} diff --git a/docs/highlight-style.css b/docs/highlight-style.css deleted file mode 100644 index 0b360281cc8d..000000000000 --- a/docs/highlight-style.css +++ /dev/null @@ -1,8 +0,0 @@ -pre { - padding: 0; -} - -pre code.hljs { - border: none; - margin: 0; -} diff --git a/docs/home-manager-manual.nix b/docs/home-manager-manual.nix index 6a14c5099d89..f87803962cbf 100644 --- a/docs/home-manager-manual.nix +++ b/docs/home-manager-manual.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, documentation-highlighter, nmd, revision, home-manager-options +{ stdenv, lib, documentation-highlighter, revision, home-manager-options , nixos-render-docs }: let outputPath = "share/doc/home-manager"; in stdenv.mkDerivation { @@ -9,9 +9,8 @@ in stdenv.mkDerivation { src = ./manual; buildPhase = '' - mkdir -p out/media + mkdir -p out/{highlightjs,media} - mkdir -p out/highlightjs cp -t out/highlightjs \ ${documentation-highlighter}/highlight.pack.js \ ${documentation-highlighter}/LICENSE \ @@ -19,23 +18,23 @@ in stdenv.mkDerivation { ${documentation-highlighter}/loader.js substituteInPlace ./options.md \ - --replace \ - '@OPTIONS_JSON@' \ + --subst-var-by \ + OPTIONS_JSON \ ${home-manager-options.home-manager}/share/doc/nixos/options.json substituteInPlace ./nixos-options.md \ - --replace \ - '@OPTIONS_JSON@' \ + --subst-var-by \ + OPTIONS_JSON \ ${home-manager-options.nixos}/share/doc/nixos/options.json substituteInPlace ./nix-darwin-options.md \ - --replace \ - '@OPTIONS_JSON@' \ + --subst-var-by \ + 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 ${./options.html} out/options.html + + cp ${./static/style.css} out/style.css cp -r ${./release-notes} release-notes @@ -43,8 +42,6 @@ in stdenv.mkDerivation { --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 \ @@ -62,5 +59,7 @@ in stdenv.mkDerivation { echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products ''; + passthru = { inherit home-manager-options; }; + meta = { maintainers = [ lib.maintainers.considerate ]; }; } diff --git a/docs/home-manager.1 b/docs/home-manager.1 index 1747735e1155..41406aca0f47 100644 --- a/docs/home-manager.1 +++ b/docs/home-manager.1 @@ -97,7 +97,7 @@ Instantiate the configuration and print the resulting derivation\&. .It Cm edit .RS 16 -Open the home configuration using the editor indicated by \fBEDITOR\fR\&. +Open the home configuration using the editor indicated by \fBVISUAL\fR or \fBEDITOR\fR\&. .RE .Pp diff --git a/docs/manual/contributing/guidelines.md b/docs/manual/contributing/guidelines.md index 6094539e64c8..3493ae5697ce 100644 --- a/docs/manual/contributing/guidelines.md +++ b/docs/manual/contributing/guidelines.md @@ -69,13 +69,10 @@ 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. +Many code changes require changing the documentation as well. The +documentation is written in +[Nixpkgs-flavoured Markdown](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup). +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 @@ -105,6 +102,9 @@ 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. +As a maintainer you are expected to respond to issues and +pull-requests associated with your module. + Maintainers are encouraged to join the IRC or Matrix channel and participate when they have opportunity. diff --git a/docs/manual/faq.md b/docs/manual/faq.md index bc50174d573e..ea308f78830a 100644 --- a/docs/manual/faq.md +++ b/docs/manual/faq.md @@ -6,5 +6,5 @@ faq/session-variables.md faq/multiple-users-machines.md faq/ca-desrt-dconf.md faq/unstable.md -faq/override-package-module.md +faq/change-package-module.md ``` diff --git a/docs/manual/faq/override-package-module.md b/docs/manual/faq/change-package-module.md similarity index 53% rename from docs/manual/faq/override-package-module.md rename to docs/manual/faq/change-package-module.md index 60b847625cd4..bcb943bafbc7 100644 --- a/docs/manual/faq/override-package-module.md +++ b/docs/manual/faq/change-package-module.md @@ -1,4 +1,4 @@ -# How do I override the package used by a module? {#_how_do_i_override_the_package_used_by_a_module} +# How do I change the package used by a module? {#_how_do_i_change_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 @@ -6,13 +6,35 @@ 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, + perform the change. For example, ``` nix - programs.beets.package = pkgs.beets.override { enableCheck = true; }; + programs.beets.package = pkgs.beets.override { pluginOverrides = { beatport.enable = false; }; }; ``` -2. If no `package` option is available then you can typically override + See [Nix pill 17](https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html) + for more information on package overrides. Alternatively, if you want + to use the `beets` package from Nixpkgs unstable, then a configuration like + + ``` nix + { pkgs, config, ... }: + + let + + pkgsUnstable = import {}; + + in + + { + programs.beets.package = pkgsUnstable.beets; + + # … + } + ``` + + should work OK. + +3. If no `package` option is available then you can typically change the relevant package using an [overlay](https://nixos.org/nixpkgs/manual/#chap-overlays). diff --git a/docs/manual/installation.md b/docs/manual/installation.md index b663b68806f2..07b1392d5161 100644 --- a/docs/manual/installation.md +++ b/docs/manual/installation.md @@ -24,7 +24,7 @@ Home Manager can be used in three primary ways: :::{.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 +Flakes](https://wiki.nixos.org/wiki/Flakes) then please see the instructions in [nix flakes](#ch-nix-flakes). ::: diff --git a/docs/manual/installation/nix-darwin.md b/docs/manual/installation/nix-darwin.md index afa93e8f9421..97ff95dab227 100644 --- a/docs/manual/installation/nix-darwin.md +++ b/docs/manual/installation/nix-darwin.md @@ -15,10 +15,10 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master $ nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.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 --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager $ nix-channel --update ``` @@ -45,7 +45,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; }; ``` diff --git a/docs/manual/installation/nixos.md b/docs/manual/installation/nixos.md index 18a60e96cf70..6c9807ee8c1a 100644 --- a/docs/manual/installation/nixos.md +++ b/docs/manual/installation/nixos.md @@ -17,10 +17,10 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m $ sudo nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.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 --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager $ sudo nix-channel --update ``` @@ -44,7 +44,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; }; ``` diff --git a/docs/manual/installation/standalone.md b/docs/manual/installation/standalone.md index 7ca38ef65240..4d430af9d4ce 100644 --- a/docs/manual/installation/standalone.md +++ b/docs/manual/installation/standalone.md @@ -19,10 +19,10 @@ $ nix-channel --update ``` - and if you follow a Nixpkgs version 23.11 channel you can run + and if you follow a Nixpkgs version 24.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 --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager $ nix-channel --update ``` diff --git a/docs/manual/introduction.md b/docs/manual/introduction.md new file mode 100644 index 000000000000..ebdac5bd62a5 --- /dev/null +++ b/docs/manual/introduction.md @@ -0,0 +1,32 @@ +# Introduction to Home Manager {#ch-introduction} + +Home Manager is a [Nix](https://nix.dev/)-powered tool for reproducible management of the contents of users' home directories. +This includes programs, configuration files, environment variables and, well… arbitrary files. +The following example snippet of Nix code: + +```nix +programs.git = { + enable = true; + userEmail = "joe@example.org"; + userName = "joe"; +}; +``` + +would make available to a user the `git` executable and man pages and a configuration file `~/.config/git/config`: + +```ini +[user] + email = "joe@example.org" + name = "joe" +``` + +Since Home Manager is implemented in Nix, it provides several benefits: + +- Contents are reproducible — a home will be the exact same every time it is built, unless of course, an intentional change is made. + This also means you can have the exact same home on different hosts. +- Significantly faster and more powerful than various backup strategies. +- Unlike "dotfiles" repositories, Home Manager supports specifying programs, as well as their configurations. +- Supported by , so that you don't have to build from source. +- If you do want to build some programs from source, there is hardly a tool more useful than Nix for that, and the build instructions can be neatly integrated in your Home Manager usage. +- Infinitely composable, so that values in different configuration files and build instructions can share a source of truth. +- Connects you with the [most extensive](https://repology.org/repositories/statistics/total) and [most up-to-date](https://repology.org/repositories/statistics/newest) software package repository on earth, [Nixpkgs](https://github.com/NixOS/nixpkgs). diff --git a/docs/manual/manual.md b/docs/manual/manual.md index a1cfb1a0c4f2..2aa6024ae211 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -1,6 +1,6 @@ # Home Manager Manual {#home-manager-manual} -## Version 24.05 (unstable) +## Version 25.05 (unstable) ```{=include=} preface @@ -8,6 +8,7 @@ preface.md ``` ```{=include=} parts +introduction.md installation.md usage.md nix-flakes.md diff --git a/docs/manual/nix-flakes.md b/docs/manual/nix-flakes.md index 9ac5c0cf16ce..93f71feb868c 100644 --- a/docs/manual/nix-flakes.md +++ b/docs/manual/nix-flakes.md @@ -1,7 +1,7 @@ # Nix Flakes {#ch-nix-flakes} Home Manager is compatible with [Nix -Flakes](https://nixos.wiki/wiki/Flakes). But please be aware that this +Flakes](https://wiki.nixos.org/wiki/Flakes). But please be aware that this support is still experimental and may change in backwards incompatible ways. diff --git a/docs/manual/nix-flakes/standalone.md b/docs/manual/nix-flakes/standalone.md index 428f29bc5a05..4cfac424ce6d 100644 --- a/docs/manual/nix-flakes/standalone.md +++ b/docs/manual/nix-flakes/standalone.md @@ -11,10 +11,10 @@ then to generate and activate a basic configuration run the command $ nix run home-manager/master -- init --switch ``` -For Nixpkgs or NixOS version 23.11 run +For Nixpkgs or NixOS version 24.11 run ``` shell -$ nix run home-manager/release-23.11 -- init --switch +$ nix run home-manager/release-24.11 -- init --switch ``` This will generate a `flake.nix` and a `home.nix` file in @@ -30,7 +30,7 @@ $ # Edit files in ~/.config/home-manager $ nix run home-manager/$branch -- init --switch ``` -Where `$branch` is one of `master` or `release-23.11`. +Where `$branch` is one of `master` or `release-24.11`. After the initial activation has completed successfully then building and activating your flake-based configuration is as simple as @@ -58,5 +58,5 @@ If you only want to update a single flake input, then the command 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. +[NixOS Wiki page](https://wiki.nixos.org/wiki/Flakes) for details. ::: diff --git a/docs/manual/usage.md b/docs/manual/usage.md index 2a569aaf9b76..88e884546de9 100644 --- a/docs/manual/usage.md +++ b/docs/manual/usage.md @@ -59,5 +59,6 @@ usage/configuration.md usage/rollbacks.md usage/dotfiles.md usage/graphical.md +usage/gpu-non-nixos.md usage/updating.md ``` diff --git a/docs/manual/usage/configuration.md b/docs/manual/usage/configuration.md index d611ec1857c0..868b93521f6b 100644 --- a/docs/manual/usage/configuration.md +++ b/docs/manual/usage/configuration.md @@ -20,7 +20,7 @@ A fresh install of Home Manager will generate a minimal # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -65,7 +65,7 @@ follows: # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/docs/manual/usage/gpu-non-nixos.md b/docs/manual/usage/gpu-non-nixos.md new file mode 100644 index 000000000000..0aefa4ae386f --- /dev/null +++ b/docs/manual/usage/gpu-non-nixos.md @@ -0,0 +1,81 @@ +# GPU on non-NixOS systems {#sec-usage-gpu-non-nixos} + +To access the GPU, programs need access to OpenGL and Vulkan libraries. While +this works transparently on NixOS, it does not on other Linux systems. A +solution is provided by [NixGL](https://github.com/nix-community/nixGL), which +can be integrated into Home Manager. + +To enable the integration, import NixGL into your home configuration, either as +a channel, or as a flake input passed via `extraSpecialArgs`. Then, set the +`nixGL.packages` option to the package set provided by NixGL. + +Once integration is enabled, it can be used in two ways: as Nix functions for +wrapping programs installed via Home Manager, and as shell commands for running +programs installed by other means (such as `nix shell`). In either case, there +are several wrappers available. They can be broadly categorized + +- by vendor: as Mesa (for Free drivers of all vendors) and Nvidia (for + Nvidia-specific proprietary drivers). +- by GPU selection: as primary and secondary (offloading). + +For example, the `mesa` wrapper provides support for running programs on the +primary GPU for Intel, AMD and Nouveau drivers, while the `mesaPrime` wrapper +does the same for the secondary GPU. + +**Note:** when using Nvidia wrappers together with flakes, your home +configuration will not be pure and needs to be built using `home-manager switch +--impure`. Otherwise, the build will fail, complaining about missing attribute +`currentTime`. + +Wrapper functions are available under `config.lib.nixGL.wrappers`. However, it +can be more convenient to use the `config.lib.nixGL.wrap` alias, which can be +configured to use any of the wrappers. It is intended to provide a customization +point when the same home configuration is used across several machines with +different hardware. There is also the `config.lib.nixGL.wrapOffload` alias for +two-GPU systems. + +Another convenience is that all wrapper functions are always available. However, +when `nixGL.packages` option is unset, they are no-ops. This allows them to be +used even when the home configuration is used on NixOS machines. The exception +is the `prime-offload` script which ignores `nixGL.packages` and is installed +into the environment whenever `nixGL.prime.installScript` is set. This script, +which can be used to start a program on a secondary GPU, does not depend on +NixGL and is useful on NixOS systems as well. + +Below is an abbreviated example for an Optimus laptop that makes use of both +Mesa and Nvidia wrappers, where the latter is used in dGPU offloading mode. It +demonstrates how to wrap `mpv` to run on the integrated Intel GPU, wrap FreeCAD +to run on the Nvidia dGPU, and how to install the wrapper scripts. It also wraps +Xonotic to run on the dGPU, but uses the wrapper function directly for +demonstration purposes. + +```nix +{ config, lib, pkgs, nixgl, ... }: +{ + nixGL.packages = nixgl.packages; + nixGL.defaultWrapper = "mesa"; + nixGL.offloadWrapper = "nvidiaPrime"; + nixGL.installScripts = [ "mesa" "nvidiaPrime" ]; + + programs.mpv = { + enable = true; + package = config.lib.nixGL.wrap pkgs.mpv; + }; + + home.packages = [ + (config.lib.nixGL.wrapOffload pkgs.freecad) + (config.lib.nixGL.wrappers.nvidiaPrime pkgs.xonotic) + ]; +} +``` + +The above example assumes a flake-based setup where `nixgl` was passed from the +flake. When using channels, the example would instead begin with + +```nix +{ config, lib, pkgs, ... }: +{ + nixGL.packages = import { inherit pkgs; }; + # The rest is the same as above + ... +``` diff --git a/docs/options.html b/docs/options.html new file mode 100644 index 000000000000..66c803fc92bc --- /dev/null +++ b/docs/options.html @@ -0,0 +1,15 @@ + + + + Redirecting… + + + + + +

Redirecting…

+ + + diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index 91fc2ed5d7ef..b7d1b43804aa 100644 --- a/docs/release-notes/release-notes.md +++ b/docs/release-notes/release-notes.md @@ -4,6 +4,8 @@ This section lists the release notes for stable versions of Home Manager and the current unstable version. ```{=include=} chapters +rl-2505.md +rl-2411.md rl-2405.md rl-2311.md rl-2305.md diff --git a/docs/release-notes/rl-2405.md b/docs/release-notes/rl-2405.md index d653e6040a68..9bb629f72f89 100644 --- a/docs/release-notes/rl-2405.md +++ b/docs/release-notes/rl-2405.md @@ -1,7 +1,6 @@ # Release 24.05 {#sec-release-24.05} -This is the current unstable branch and the information in this section -is therefore not final. +The 24.05 release branch became stable in May, 2024. ## Highlights {#sec-release-24.05-highlights} @@ -31,10 +30,62 @@ This release has the following notable changes: _all_ Home Manager state from your user environment. This includes removing all your historic Home Manager generations! +- The use of `$DRY_RUN_CMD` and `$DRY_RUN_NULL` in activation script + blocks is now deprecated. Instead use the new shell function + {command}`run`. In most cases it is sufficient to replace + `$DRY_RUN_CMD` by {command}`run`. For example, if your configuration + currently contains + + ```nix + home.activation.reportChanges = config.lib.dag.entryAnywhere '' + if [[ -v oldGenPath ]]; then + $DRY_RUN_CMD nix store diff-closures $oldGenPath $newGenPath + fi + ''; + ``` + + then you are now encouraged to change to + + ```nix + home.activation.reportChanges = config.lib.dag.entryAnywhere '' + if [[ -v oldGenPath ]]; then + run nix store diff-closures $oldGenPath $newGenPath + fi + ''; + ``` + + See the description of [home.activation](#opt-home.activation) for + more. The deprecated variables will continue to work for now but + their use may in the future trigger a warning message and eventually + they may be removed entirely. + +- Similarly, the use of `$VERBOSE_ECHO` in activation script blocks is + deprecated. Instead use the new shell function + {command}`verboseEcho`. That is, + + ```nix + home.activation.doThing = config.lib.dag.entryAnywhere '' + $VERBOSE_ECHO "Doing the thing" + '' + ``` + + should now be expressed + + ```nix + home.activation.doThing = config.lib.dag.entryAnywhere '' + verboseEcho "Doing the thing" + '' + ``` + + See the description of [home.activation](#opt-home.activation) for + more. The deprecated variable will continue to work for now but its + use may in the future trigger a warning message and eventually it + may be removed entirely. + ## 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. +- There was no state version change in this release. diff --git a/docs/release-notes/rl-2411.md b/docs/release-notes/rl-2411.md new file mode 100644 index 000000000000..c03394c54943 --- /dev/null +++ b/docs/release-notes/rl-2411.md @@ -0,0 +1,31 @@ +# Release 24.11 {#sec-release-24.11} + +The 24.05 release branch became stable in November, 2024. + +## Highlights {#sec-release-24.11-highlights} + +This release has the following notable changes: + +- The swayidle module behavior has changed. Specifically, swayidle was + previously always called with a `-w` flag. This flag is now moved to + the default + [services.swayidle.extraArgs](#opt-services.swayidle.extraArgs) + value to make it optional. + + Your configuration may break if you already set this option and also + rely on the flag being automatically added. To resolve this, please + add `-w` to your assignment of + [services.swayidle.extraArgs](#opt-services.swayidle.extraArgs). + +- Support for Boolean values in the option + [programs.eza.icons](#opt-programs.eza.icons) is deprecated for + future removal. The new value for `true` is `"auto"`, and for + `false` it is `null`. + +## State Version Changes {#sec-release-24.11-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"24.11\" or later. + +- There was no state version change in this release. diff --git a/docs/release-notes/rl-2505.md b/docs/release-notes/rl-2505.md new file mode 100644 index 000000000000..dec0f21318bd --- /dev/null +++ b/docs/release-notes/rl-2505.md @@ -0,0 +1,18 @@ +# Release 25.05 {#sec-release-25.05} + +This is the current unstable branch and the information in this +section is therefore not final. + +## Highlights {#sec-release-25.05-highlights} + +This release has the following notable changes: + +- No changes. + +## State Version Changes {#sec-release-25.05-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"25.05\" or later. + +- No changes. diff --git a/docs/static/style.css b/docs/static/style.css new file mode 100644 index 000000000000..6e654ed4a556 --- /dev/null +++ b/docs/static/style.css @@ -0,0 +1,7 @@ +:root{--nmd-color0: #0A3E68;--nmd-color1: #268598;--nmd-color2: #B8D09E;--nmd-color3: #F6CF5E;--nmd-color4: #EC733B;--nmd-color-info: #167cb9;--nmd-color-warn: #ff6700}html{-webkit-text-size-adjust:100%}html:focus-within{scroll-behavior:smooth}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-height:100vh;position:relative;text-rendering:optimizeSpeed;width:100%}*,:after,:before{box-sizing:border-box}a:not([class]){-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:baseline}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}input,input:required{box-shadow:none}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 30px #fff}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none}input:focus{outline:0}audio,canvas,video{display:inline-block;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}a:active,a:hover{outline:0}img{height:auto;max-width:100%;vertical-align:middle}img,picture{display:inline-block}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;background:0 0;border:0;cursor:pointer}button[disabled],html input[disabled]{cursor:default}[disabled]{pointer-events:none}input[type=checkbox],input[type=radio]{padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button{background:0 0;border:0}textarea{overflow:auto;resize:vertical;vertical-align:top}table{border-collapse:collapse;border-spacing:0;text-indent:0}hr{background:#000;border:0;box-sizing:content-box;height:1px;line-height:0;margin:0;overflow:visible;padding:0;page-break-after:always;width:100%}pre{font-family:monospace,monospace;font-size:100%}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:none}code,kbd,pre,samp{font-family:monospace,monospace}small,sub,sup{font-size:75%}sub,sup{line-height:0;position:relative;vertical-align:baseline}sub{bottom:-5px}sup{top:-5px}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1;margin:0;padding:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;outline:0;padding:0}legend{border:0;color:inherit;display:block;max-width:100%;white-space:normal;width:100%}fieldset{min-width:0}body:not(:-moz-handler-blocked) fieldset{display:block}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}template{display:none}body{background:white;color:#111827;max-width:min(100ch, 1024px);margin:0 auto;padding:10px;font-family:"Lucida Sans",Arial,sans-serif;font-size:16px;line-height:1.4em}@media (prefers-color-scheme: dark){body{background:#111827;color:#F9FAFB}}h1,h2,h3{color:var(--nmd-color0);font-family:"Lato",sans-serif;font-weight:300;line-height:1.125}@media (prefers-color-scheme: dark){h1,h2,h3{color:var(--nmd-color4)}}h1{font-size:48px;font-weight:300;margin:4rem 0 1.5rem}h2{font-size:32px;font-weight:300;margin:2rem 0 1rem}h3{font-size:20px;font-weight:400;margin:.5rem .25rem}p{margin:.9rem 0}p:first-child{margin-top:0}p:last-child{margin-bottom:0}a{color:var(--nmd-color0);text-decoration:underline;text-underline-offset:3px}a:visited{color:var(--nmd-color1)}a:hover{color:var(--nmd-color1)}@media (prefers-color-scheme: dark){a{color:var(--nmd-color3)}a:visited{color:var(--nmd-color2)}a:hover{color:var(--nmd-color4)}}code{font-size:90%}span.command{font-size:90%;font-family:monospace}em{font-style:italic}strong{font-weight:bold}pre{background:#F9FAFB;margin:2rem 16px;padding:10px;border:1px solid #E5E7EB;border-radius:4px;box-shadow:4px 4px 8px #E5E7EB;font-size:90%;margin-bottom:1.5rem;padding:6px;overflow:auto}@media (prefers-color-scheme: dark){pre{background:#1F2937;border-color:black;box-shadow:4px 4px 8px black}}pre span img{user-select:none}pre:has(code){padding:0}td,th{padding:2px 5px}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}dt{margin:1.2rem 0 .8rem}dd{margin-left:2rem}ul{margin:.9rem 0;padding-left:30px;list-style:disc}ul:first-child{margin-top:0}ul:last-child{margin-bottom:0}ol{margin:.9rem 0;padding-left:30px;list-style:decimal}ol:first-child{margin-top:0}ol:last-child{margin-bottom:0}li{margin:.9rem 0;padding-left:5px}li:first-child{margin-top:0}li:last-child{margin-bottom:0}.navheader hr,.navfooter hr{margin:1rem 0;background:#E5E7EB}@media (prefers-color-scheme: dark){.navheader hr,.navfooter hr{background:#4B5563}}.navheader a,.navfooter a{text-decoration:none}div.titlepage{margin:40px 0}div.titlepage hr{display:none}div.toc{background:#F9FAFB;margin:2rem 16px;padding:10px;border:1px solid #E5E7EB;border-radius:4px;box-shadow:4px 4px 8px #E5E7EB}@media (prefers-color-scheme: dark){div.toc{background:#1F2937;border-color:black;box-shadow:4px 4px 8px black}}div.toc a{text-decoration:none}div.note,div.warning{background:#F9FAFB;margin:2rem 16px;padding:10px;border:1px solid #E5E7EB;border-radius:4px;box-shadow:4px 4px 8px #E5E7EB;font-style:italic}@media (prefers-color-scheme: dark){div.note,div.warning{background:#1F2937;border-color:black;box-shadow:4px 4px 8px black}}div.note h3,div.warning h3{float:right;margin:0 0 1rem 1rem;width:42px;height:42px;content:url()}div.note h3+p,div.warning h3+p{margin-top:0}div.note h3{background-color:var(--nmd-color-info);mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E")}div.warning h3{background-color:var(--nmd-color-warn);mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E")}.term{font-weight:300}.docbook .xref img[src^=images\/callouts\/],.screen img,.programlisting img{width:1em}.calloutlist img{width:1.3em}.programlisting.language-shell .hljs-meta.prompt_{user-select:none}/*! + Theme: Tomorrow + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#4d4d4c;background:#fff}.hljs ::selection,.hljs::selection{background-color:#d6d6d6;color:#4d4d4c}.hljs-comment{color:#8e908c}.hljs-tag{color:#969896}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#4d4d4c}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#c82829}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f5871f}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#eab700}.hljs-strong{font-weight:700;color:#eab700}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#718c00}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#3e999f}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#4271ae}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#8959a8}.hljs-emphasis{color:#8959a8;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}@media (prefers-color-scheme: dark){/*! Theme: Tomorrow Night Author: Chris Kempson (http://chriskempson.com) License: ~ MIT (or more permissive) [via base16-schemes-source] Maintainer: @highlightjs/core-team Version: 2021.09.0*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ccc;background:#2d2d2d}.hljs ::selection,.hljs::selection{background-color:#515151;color:#ccc}.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f99157}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#6cc}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#69c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}} diff --git a/docs/static/style.scss b/docs/static/style.scss new file mode 100644 index 000000000000..3eb0e631f1de --- /dev/null +++ b/docs/static/style.scss @@ -0,0 +1,310 @@ +:root { + --nmd-color0: #0A3E68; + --nmd-color1: #268598; + --nmd-color2: #B8D09E; + --nmd-color3: #F6CF5E; + --nmd-color4: #EC733B; + + --nmd-color-info: #167cb9; + --nmd-color-warn: #ff6700; +} + +// Copied from Tailwind CSS. +$color-gray-50: #F9FAFB; +$color-gray-100: #F3F4F6; +$color-gray-200: #E5E7EB; +$color-gray-300: #D1D5DB; +$color-gray-400: #9CA3AF; +$color-gray-500: #6B7280; +$color-gray-600: #4B5563; +$color-gray-700: #374151; +$color-gray-800: #1F2937; +$color-gray-900: #111827; + +$color-blue-50: #EFF6FF; +$color-blue-100: #DBEAFE; +$color-blue-200: #BFDBFE; +$color-blue-300: #93C5FD; +$color-blue-400: #60A5FA; +$color-blue-500: #3B82F6; +$color-blue-600: #2563EB; +$color-blue-700: #1D4ED8; +$color-blue-800: #1E40AF; +$color-blue-900: #1E3A8A; + + +@use 'scss-reset/reset'; + +@mixin boxed { + background: $color-gray-50; + margin: 2rem 16px; + padding: 10px; + border: 1px solid $color-gray-200; + border-radius: 4px; + box-shadow: 4px 4px 8px $color-gray-200; + + @media (prefers-color-scheme: dark) { + background: $color-gray-800; + border-color: black; + box-shadow: 4px 4px 8px black; + } +} + +@mixin margined { + margin: 0.9rem 0; + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } +} + +body { + background: white; + color: $color-gray-900; + max-width: min(100ch, 1024px); + margin: 0 auto; + padding: 10px; + + font-family: 'Lucida Sans', Arial, sans-serif; + font-size: 16px; + line-height: 1.4em; + + @media (prefers-color-scheme: dark) { + background: $color-gray-900; + color: $color-gray-50; + } +} + +h1, h2, h3 { + color: var(--nmd-color0); + font-family: "Lato", sans-serif; + font-weight: 300; + line-height: 1.125; + + @media (prefers-color-scheme: dark) { + color: var(--nmd-color4); + } +} + +h1 { + font-size: 48px; + font-weight: 300; + margin: 4rem 0 1.5rem; +} + +h2 { + font-size: 32px; + font-weight: 300; + margin: 2rem 0 1rem; +} + +h3 { + font-size: 20px; + font-weight: 400; + margin: 0.5rem 0.25rem; +} + +p { + @include margined; +} + +a { + color: var(--nmd-color0); //$color-secondary-1-3; + text-decoration: underline; + text-underline-offset: 3px; + + &:visited { + color: var(--nmd-color1); + } + + &:hover { + color: var(--nmd-color1); + } + + @media (prefers-color-scheme: dark) { + color: var(--nmd-color3); + + &:visited { + color: var(--nmd-color2); + } + + &:hover { + color: var(--nmd-color4); + } + } +} + +code { + font-size: 90%; +} + +span.command { + font-size: 90%; + font-family: monospace; +} + +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + +pre { + @include boxed; + + font-size: 90%; + margin-bottom: 1.5rem; + padding: 6px; + overflow: auto; + + // The callout markers should not be selectable. + span img { + user-select: none; + } +} + +pre:has(code) { + padding: 0; +} + +td, th { + padding: 2px 5px; + + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } +} + +dt { + margin: 1.2rem 0 0.8rem; +} + +dd { + margin-left: 2rem; +} + +div.book { + +} + +ul { + @include margined; + + padding-left: 30px; + list-style: disc; +} + +ol { + @include margined; + + padding-left: 30px; + list-style: decimal; +} + +li { + @include margined; + + padding-left: 5px; +} + +.navheader, .navfooter { + hr { + margin: 1rem 0; + background: $color-gray-200; + @media (prefers-color-scheme: dark) { + background: $color-gray-600; + } + } + + a { + text-decoration: none; + } +} + +div.titlepage { + margin: 40px 0; + + hr { + display: none; + } +} + +div.toc { + @include boxed; + + a { + text-decoration: none; + } +} + +div.note, div.warning { + @include boxed; + + font-style: italic; + + h3 { + float: right; + margin: 0 0 1rem 1rem; + width: 42px; + height: 42px; + content: url(); + } + + + h3 + p { + margin-top: 0; + } +} + +div.note { + h3 { + background-color: var(--nmd-color-info); + // From https://tabler-icons.io/i/info-square-rounded + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E"); + } +} + +div.warning { + h3 { + background-color: var(--nmd-color-warn); + // From https://tabler-icons.io/i/alert-triangle + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E"); + } +} + +.term { + font-weight: 300; +} + +.docbook .xref img[src^=images\/callouts\/], +.screen img, +.programlisting img { + width: 1em; +} + +.calloutlist img { + width: 1.3em; +} + +/** The console prompt, e.g., `$` and `#` should not be selectable. */ +.programlisting.language-shell .hljs-meta.prompt_ { + user-select: none; +} + +@import 'tomorrow.min.css'; + +@media (prefers-color-scheme: dark) { + @import 'tomorrow-night.min.css'; +} diff --git a/docs/static/tomorrow-night.min.css b/docs/static/tomorrow-night.min.css new file mode 100644 index 000000000000..a0b3f625aaa2 --- /dev/null +++ b/docs/static/tomorrow-night.min.css @@ -0,0 +1,7 @@ +/*! + Theme: Tomorrow Night + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ccc;background:#2d2d2d}.hljs ::selection,.hljs::selection{background-color:#515151;color:#ccc}.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f99157}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#6cc}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#69c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} \ No newline at end of file diff --git a/docs/static/tomorrow.min.css b/docs/static/tomorrow.min.css new file mode 100644 index 000000000000..5785f6efcc42 --- /dev/null +++ b/docs/static/tomorrow.min.css @@ -0,0 +1,7 @@ +/*! + Theme: Tomorrow + Author: Chris Kempson (http://chriskempson.com) + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.09.0 +*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#4d4d4c;background:#fff}.hljs ::selection,.hljs::selection{background-color:#d6d6d6;color:#4d4d4c}.hljs-comment{color:#8e908c}.hljs-tag{color:#969896}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#4d4d4c}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#c82829}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f5871f}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#eab700}.hljs-strong{font-weight:700;color:#eab700}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#718c00}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#3e999f}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#4271ae}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#8959a8}.hljs-emphasis{color:#8959a8;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} \ No newline at end of file diff --git a/flake.lock b/flake.lock index 115cd7d7de2c..9de322090e3d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1705316053, - "narHash": "sha256-J2Ey5mPFT8gdfL2XC0JTZvKaBw/b2pnyudEXFvl+dQM=", + "lastModified": 1733212471, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370", + "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d047c7bf5228..3a90f89c0f26 100644 --- a/flake.nix +++ b/flake.nix @@ -78,8 +78,7 @@ in throwForRemovedArgs (import ./modules { inherit pkgs lib check extraSpecialArgs; configuration = { ... }: { - imports = modules - ++ [{ programs.home-manager.path = toString ./.; }]; + imports = modules ++ [{ programs.home-manager.path = "${./.}"; }]; nixpkgs = { config = nixpkgs.lib.mkDefault pkgs.config; inherit (pkgs) overlays; @@ -112,12 +111,17 @@ inherit pkgs; inherit (releaseInfo) release isReleaseBranch; }; - hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; + hmPkg = pkgs.callPackage ./home-manager { path = "${./.}"; }; testPackages = let tests = import ./tests { inherit pkgs; }; renameTestPkg = n: lib.nameValuePair "test-${n}"; in lib.mapAttrs' renameTestPkg tests.build; + + integrationTestPackages = let + tests = import ./tests/integration { inherit pkgs; }; + renameTestPkg = n: lib.nameValuePair "integration-test-${n}"; + in lib.mapAttrs' renameTestPkg tests; in { default = hmPkg; home-manager = hmPkg; @@ -125,7 +129,7 @@ docs-html = docs.manual.html; docs-json = docs.options.json; docs-manpages = docs.manPages; - } // testPackages); + } // testPackages // integrationTestPackages); defaultPackage = forAllSystems (system: self.packages.${system}.default); }); diff --git a/home-manager/default.nix b/home-manager/default.nix index 5e0e1e462f39..50fda77e5cf9 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,5 +1,5 @@ { runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused, jq -, less, ncurses, unixtools +, less, ncurses, inetutils # used for pkgs.path for nixos-option , pkgs @@ -38,7 +38,7 @@ in runCommand "home-manager" { less ncurses nixos-option - unixtools.hostname + inetutils # for `hostname` ] }" \ --subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \ diff --git a/home-manager/home-manager b/home-manager/home-manager index 34407ed27ede..712954476868 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -11,6 +11,12 @@ export TEXTDOMAINDIR=@OUT@/share/locale # shellcheck disable=1091 source @HOME_MANAGER_LIB@ +function errMissingOptArg() { + # translators: For example: "home-manager: missing argument for --cores" + _iError "%s: missing argument for %s" "$0" "$1" >&2 + exit 1 +} + function setNixProfileCommands() { if [[ -e $HOME/.nix-profile/manifest.json \ || -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then @@ -21,18 +27,12 @@ function setNixProfileCommands() { fi } -function setVerboseAndDryRun() { +function setVerboseArg() { if [[ -v VERBOSE ]]; then export VERBOSE_ARG="--verbose" else export VERBOSE_ARG="" fi - - if [[ -v DRY_RUN ]] ; then - export DRY_RUN_CMD=echo - else - export DRY_RUN_CMD="" - fi } function setWorkDir() { @@ -143,6 +143,10 @@ function setHomeManagerPathVariables() { return fi + _iVerbose "Sanity checking Nix" + nix-build --quiet --expr '{}' --no-out-link > /dev/null 2>&1 || true + nix-env -q > /dev/null 2>&1 || true + 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" @@ -160,7 +164,7 @@ function setHomeManagerPathVariables() { declare -gr HM_PROFILE_DIR="$globalProfilesDir" else _iError 'Could not find suitable profile directory, tried %s and %s' \ - "$HM_STATE_DIR/profiles" "$globalProfilesDir" >&2 + "$userNixStateDir/profiles" "$globalProfilesDir" >&2 exit 1 fi } @@ -194,9 +198,9 @@ function setFlakeAttribute() { ;; *) local name="$USER" - # Check both long and short hostnames; long first to preserve + # Check FQDN, long, and short hostnames; long first to preserve # pre-existing behaviour in case both happen to be defined. - for n in "$USER@$(hostname)" "$USER@$(hostname -s)"; do + for n in "$USER@$(hostname -f)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then name="$n" if [[ -v VERBOSE ]]; then @@ -264,6 +268,9 @@ function doInit() { withFlake=1 fi + local homeManagerUrl="github:nix-community/home-manager" + local nixpkgsUrl="github:nixos/nixpkgs/nixos-unstable" + while (( $# > 0 )); do local opt="$1" shift @@ -275,6 +282,16 @@ function doInit() { --switch) switch=1 ;; + --home-manager-url) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" + homeManagerUrl="$1" + shift + ;; + --nixpkgs-url) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" + nixpkgsUrl="$1" + shift + ;; -*) _iError "%s: unknown option '%s'" "$0" "$opt" >&2 exit 1 @@ -342,7 +359,7 @@ $xdgVars # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. + home.stateVersion = "24.11"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. @@ -381,9 +398,10 @@ $xdgVars }; # 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 + # 'home.sessionVariables'. These will be explicitly sourced when using a + # shell provided by Home Manager. 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 # @@ -425,9 +443,9 @@ EOF inputs = { # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "$nixpkgsUrl"; home-manager = { - url = "github:nix-community/home-manager"; + url = "$homeManagerUrl"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -571,10 +589,14 @@ function presentNews() { } function doEdit() { - if [[ ! -v EDITOR || -z $EDITOR ]]; then - # shellcheck disable=2016 - _i 'Please set the $EDITOR environment variable' >&2 - return 1 + if [[ ! -v VISUAL || -z $VISUAL ]]; then + if [[ ! -v EDITOR || -z $EDITOR ]]; then + # shellcheck disable=2016 + _i 'Please set the $EDITOR or $VISUAL environment variable' >&2 + return 1 + fi + else + EDITOR=$VISUAL fi setConfigFile @@ -661,7 +683,7 @@ function doListGens() { # generations to remove. function doRmGenerations() { setHomeManagerPathVariables - setVerboseAndDryRun + setVerboseArg pushd "$HM_PROFILE_DIR" > /dev/null @@ -674,7 +696,7 @@ function doRmGenerations() { _i 'Cannot remove the current generation %s' "$generationId" >&2 else _i 'Removing generation %s' "$generationId" - $DRY_RUN_CMD rm $VERBOSE_ARG $linkName + run rm $VERBOSE_ARG $linkName fi done @@ -720,7 +742,11 @@ function newsReadIdsFile() { touch "$path" fi - echo "$path" + # Remove duplicate slashes in case $HOME or $XDG_DATA_HOME have a trailing + # slash. Double slashes causes Nix to error out with + # + # error: syntax error, unexpected PATH_END, expecting DOLLAR_CURLY". + echo "$path" | tr -s / } # Builds the Home Manager news data file. @@ -755,7 +781,7 @@ function buildNews() { done local readIdsFile - readIdsFile=$(newsReadIdsFile) + readIdsFile="$(newsReadIdsFile)" nix-instantiate \ --no-build-output --strict \ @@ -774,7 +800,7 @@ function doShowNews() { buildNews "$newsNixFile" local readIdsFile - readIdsFile=$(newsReadIdsFile) + readIdsFile="$(newsReadIdsFile)" local news @@ -809,7 +835,6 @@ function doShowNews() { function doUninstall() { setHomeManagerPathVariables - setVerboseAndDryRun setNixProfileCommands _i 'This will remove Home Manager from your system.' @@ -832,7 +857,7 @@ function doUninstall() { uninstall = true; home.username = "$USER"; home.homeDirectory = "$HOME"; - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; } EOF # shellcheck disable=2064 @@ -888,7 +913,7 @@ function doHelp() { echo echo " help Print this help" echo - echo " edit Open the home configuration in \$EDITOR" + echo " edit Open the home configuration in \$VISUAL or \$EDITOR" echo echo " option OPTION.NAME" echo " Inspect configuration option named OPTION.NAME." @@ -939,22 +964,27 @@ while [[ $# -gt 0 ]]; do COMMAND="$opt" ;; -A) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" HOME_MANAGER_CONFIG_ATTRIBUTE="$1" shift ;; -I) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" EXTRA_NIX_PATH+=("$1") shift ;; -b) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" export HOME_MANAGER_BACKUP_EXT="$1" shift ;; -f|--file) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" HOME_MANAGER_CONFIG="$1" shift ;; --flake) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" FLAKE_ARG="$1" shift ;; @@ -962,18 +992,23 @@ while [[ $# -gt 0 ]]; do PASSTHROUGH_OPTS+=("$opt") ;; --update-input) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" PASSTHROUGH_OPTS+=("$opt" "$1") shift ;; --override-input) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" + [[ -v 2 && $2 != -* ]] || errMissingOptArg "$opt $1" PASSTHROUGH_OPTS+=("$opt" "$1" "$2") shift 2 ;; --experimental-features) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" PASSTHROUGH_OPTS+=("$opt" "$1") shift ;; --extra-experimental-features) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" PASSTHROUGH_OPTS+=("$opt" "$1") shift ;; @@ -991,10 +1026,13 @@ while [[ $# -gt 0 ]]; do export DRY_RUN=1 ;; --option|--arg|--argstr) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" + [[ -v 2 ]] || errMissingOptArg "$opt $1" PASSTHROUGH_OPTS+=("$opt" "$1" "$2") shift 2 ;; -j|--max-jobs|--cores|--builders) + [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" PASSTHROUGH_OPTS+=("$opt" "$1") shift ;; @@ -1006,7 +1044,7 @@ while [[ $# -gt 0 ]]; do export VERBOSE=1 ;; --version) - echo 24.05-pre + echo 25.05-pre exit 0 ;; *) diff --git a/home-manager/po/ar.po b/home-manager/po/ar.po new file mode 100644 index 000000000000..ea67fd5aeb68 --- /dev/null +++ b/home-manager/po/ar.po @@ -0,0 +1,217 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +msgstr[1] "" + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" diff --git a/home-manager/po/ca.po b/home-manager/po/ca.po index e72313659642..12992995aff8 100644 --- a/home-manager/po/ca.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-12-10 15:58+0000\n" -"Last-Translator: Nara Díaz Viñolas \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-08-07 17:09+0000\n" +"Last-Translator: Tomi Ockier \n" "Language-Team: Catalan \n" "Language: ca\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.3-dev\n" +"X-Generator: Weblate 5.7-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%: falta un argument per %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Mantenir el teu Home Manager %s a %s està obsolet,\n" "si us plau mou-lo a %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -93,39 +98,43 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Comprovant Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 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:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%: opció desconeguda '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Executa '%s --help' per veure l'ajuda d'ús" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "El fitxer %s ja existeix, deixant sense modificar..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Creant %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -142,7 +151,7 @@ msgstr "" "a veure totes les opcions disponibles." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -157,11 +166,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "No es pot instanciar una configuració flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -175,73 +184,73 @@ msgstr[1] "" "Hi han %d notícies rellevants no llegides.\n" "Llegeix-les executant la comanda \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Configuració \"news.display\" no reconeguda \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Si us plau, defineix la variable d'entorn $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Si us plau, defineix les variables de entorn $EDITOR o $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Impossible executar la compilació en un directori només lectura" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "No existeix la generació amb ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Impossible eliminar la generació actual %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Eliminant la generació %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "No s'han trobat generacions a expirar" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Cap paquet home-manager sembla estar instal·lat." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argument desconegut %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Home Manager serà esborrat del sistema." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Estàs segur que vols desinstal·lar Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Canviant a configuració buida de Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Visca!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera un argument, obtinguts %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comanda desconeguda: %s" @@ -251,6 +260,10 @@ msgstr "" "Aquesta derivació no es pot construir, si us plau executa-la utilitzant nix-" "shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Si us plau, defineix la variable d'entorn $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "Ho sentim, aquesta comanda encara no està suportada en la configuració de " diff --git a/home-manager/po/cs.po b/home-manager/po/cs.po index c01cbe518a22..2fe4019b3b90 100644 --- a/home-manager/po/cs.po +++ b/home-manager/po/cs.po @@ -7,26 +7,31 @@ 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" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \n" "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" +"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" +"X-Generator: Weblate 5.4\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Udržovat Home Manager %s v %s je zastaralé,\n" "prosím přesuňte jej do %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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 +#: home-manager/home-manager:107 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 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,38 +96,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Kontrola správnosti Nix" + +#: home-manager/home-manager:166 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 +#: home-manager/home-manager:221 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 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: neznámý parametr '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 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 +#: home-manager/home-manager:327 home-manager/home-manager:431 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 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Vytvářím %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -139,7 +148,7 @@ msgstr "" "k zobrazení všech dostupných možností." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -153,11 +162,11 @@ msgstr "" " %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Nelze vytvořit instanci flake konfigurace" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -174,75 +183,79 @@ msgstr[2] "" "%d nepřečtených novinek.\n" "Přečtěte je pomocí příkazu \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Neznáme nastavení \"news.display\" \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Prosím nastavte proměnou prostředí $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 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 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Generace s ID %s neexistuje" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Nelze odstranit současnou generaci %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Odstraňuji generaci %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Žádná generace k vypršení platnosti" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Žádný home-manager balíček není nainstalován." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Neznámý parametr %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Toto odstraní Home Manager z vašeho systému." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Opravdu odinstalovat Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Přepínám na prázdou konfiguraci Home Manageru..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Hurá!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations očekává jeden parametr, přítomno %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 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." + +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Prosím nastavte proměnou prostředí $EDITOR" diff --git a/home-manager/po/da.po b/home-manager/po/da.po index 70f22ad3d07c..b05d5c231e5c 100644 --- a/home-manager/po/da.po +++ b/home-manager/po/da.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-08-27 13:52+0000\n" -"Last-Translator: cafkafk \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-25 11:09+0000\n" +"Last-Translator: DeeKahy \n" "Language-Team: Danish \n" "Language: da\n" @@ -17,42 +17,47 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0.1-dev\n" +"X-Generator: Weblate 5.6-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: manglende argument for %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -"At have din Home Manager %s i %s er forældet,\n" -"flyt den venligst til %s" +"Det er forældet at holde Home Manager %s i %s,\n" +"ryk den venligst til %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Ingen konfigurationsfiler fundet. Venligst lav en ved %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "Home Manager kan ikke findes under %s." +msgstr "Home Manager blev ikke fundet ved %s." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" -"Fallback-stien til Home Manager %s er blevet forældet, og en fil/mappe blev " -"fundet der." +"Det er forældet at bruge fallback Home Manager path %s og der blev fundet en " +"fil/mappe der." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,38 +96,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Tjekker fornuften af Nix" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Kan ikke inspicere indstillinger af en flake konfiguration" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: ukendt indstilling '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Kør '%s --help' for brugsvejledning" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." -msgstr "Filen %s findes allerede, lader den være uændret..." +msgstr "Filen %s eksisterer allerede, efterlader den uændret…" -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Opretter %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -140,7 +149,7 @@ msgstr "" "se alle de mulige indstillinger." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +164,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Kan ikke instantiere en flake konfiguration" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -173,74 +182,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:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Ubekændt \"news.display\" indstilling \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Venligst sæt $EDITOR miljøvariablen" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Indstil venligst miljøvariablen $EDITOR eller $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Kan ikke bygge i en læs-kun folder" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Ingen generation med ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Kan ikke fjerne den nuværende generation %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Fjern generation %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Ingen generationer som skal udløbes" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 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:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Ubekendt argument %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Dette vil fjerne Home Manager fra dit system." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Virkelig uinstaller Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Skifter til tom Home Manager konfiguration..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Juhuu!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations forventer et argument, fik %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Ubekendt kommando: %s" @@ -248,6 +257,10 @@ msgstr "Ubekendt kommando: %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Denne derivation er ikke bygbar, venligst kør den gennem nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Venligst sæt $EDITOR miljøvariablen" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Laver initial Home Manager konfiguration..." diff --git a/home-manager/po/de.po b/home-manager/po/de.po index ae35be2ec576..dddccb3755d7 100644 --- a/home-manager/po/de.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-08-15 17:51+0000\n" -"Last-Translator: Simon \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-21 18:02+0000\n" +"Last-Translator: halbGefressen \n" "Language-Team: German \n" "Language: de\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0-dev\n" +"X-Generator: Weblate 5.6-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: Fehlendes Argument für %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Das Beibehalten Ihres Home Manager %s in %s ist veraltet.\n" "Bitte verschieben Sie es nach %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Keine Konfigurationsdatei gefunden. Bitte erstellen Sie eine unter %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -75,9 +80,11 @@ 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" +"B. :\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" "\n" -" { programs.home-manager.path = \"%s\"; }\n" +" zu Ihrer Konfiguration hinzufügen.\n" "\n" " Sollten Sie Home Manager direkt importieren, können Sie den Parameter " "`path` verwenden, wenn Sie das Home Manager-Paket aufrufen:\n" @@ -88,40 +95,44 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Überprüfe zur Sicherheit Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Die Optionen einer Flake-Konfiguration können nicht inspiziert werden" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: unbekannte Option '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Führe '%s --help' aus, um Hilfe zur Verwendung zu erhalten" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Die Datei %s existiert bereits, sie bleibt unverändert..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Erstelle %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -139,7 +150,7 @@ msgstr "" "sehen." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -154,11 +165,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Kann eine Flake-Konfiguration nicht instanziieren" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -172,73 +183,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:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Unbekannte \"news.display\" Einstellung \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Bitte legen Sie die $EDITOR Variable fest" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Bitte definieren Sie die $EDITOR oder $VISUAL Umgebungsvariable" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Build kann nicht im schreibgeschützten Ordner ausgeführt werden" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Keine Generation mit ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Die jetzige Generation %s kann nicht entfernt werden" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Entferne Generation %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Keine ablaufenden Generationen" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Es scheint, als ob keine Home Manager Pakete installiert sind." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Unbekannte Argumente %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Dies wird Home Manager von Ihrem System entfernen." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Möchten Sie wirklich Home Manager deinstallieren?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Wechsle zu einer leeren Home Manager Konfiguration..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Juhu!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations erwartet ein Argument, hat aber %d erhalten." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Unbekannter Befehl: %s" @@ -247,6 +258,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Diese Derivation ist nicht kompilierbar. Bitte führen Sie nix-shell aus." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Bitte legen Sie die $EDITOR Variable fest" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "Dieser Befehl wird im Flake-Setup leider noch nicht unterstützt" diff --git a/home-manager/po/es.po b/home-manager/po/es.po index c3c20ac3a3d5..cafc9a0a608b 100644 --- a/home-manager/po/es.po +++ b/home-manager/po/es.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-19 17:07+0000\n" "Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: falta argumento para %s" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "Archivo de configuración no encontrado en %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Mantener tu Home Manager %s en %s está obsoleto,\n" "por favor muévalo a %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Archivo de configuración no encontrado. Por favor cree uno en %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "No se ha encontrado el Home Manager en %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 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "archivo/directorio 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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,40 +96,44 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Chequeando Nix" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" "No se ha podido encontrar un directorio de perfiles adecuado, se ha probado " "con %s y %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "No se pudo inspeccionar las opciones de la configuración flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opción desconocida '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Ejecute '%s --help' para ver ayuda" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "El fichero %s ya existe, dejándolo sin modificar..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Creando %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Creando generación inicial de Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -141,7 +150,7 @@ msgstr "" "ver todas las opciones disponibles." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -156,11 +165,11 @@ msgstr "" "si el error parecer ser culpa de Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "No se pudo instanciar una configuración flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -174,72 +183,72 @@ msgstr[1] "" "Hay %d noticias relevantes no leídas.\n" "Léalas ejecutando el comando \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Configuración \"news.display\" no reconocida \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Defina la variable de ambiente $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Por favor, defina la variable del entorno $EDITOR o $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "No se puede ejecutar en un directorio de sólo lectura" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "No existe la generación con ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "No se pudo borrar la generación actual %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Borrando generación %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "No se encontraron generaciones para expirar" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "No se encontró ningún paquete home-manager instalado." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argumento desconocido %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Home Manager será borrado del sistema." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Este es un simulacro, nada será realmente desinstalado." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Desinstalar Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Cambiando a configuración vacía de Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Bien!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager desinstalado pero no se ha modificado home.nix." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera un argumento pero se dieron %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comando desconocido %s" @@ -247,6 +256,10 @@ msgstr "Comando desconocido %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Esta derivación no se puede construir, ejecute con nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Defina la variable de ambiente $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "Lo sentimos, este comando aún no está soportado en la configuración de " diff --git a/home-manager/po/fa.po b/home-manager/po/fa.po index 4e677def375d..b3aceeb1a331 100644 --- a/home-manager/po/fa.po +++ b/home-manager/po/fa.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-05-28 22:49+0000\n" -"Last-Translator: Mohammad Abdolirad \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-02 10:58+0000\n" +"Last-Translator: Keivan \n" "Language-Team: Persian \n" "Language: fa\n" @@ -17,38 +17,47 @@ 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.5.3-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: مقدار %s یافت نشد" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" -msgstr "هیچ فایل تنظیماتی در %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"نگه داری %s در %s منسوخ شده است.\n" +"لطفا آنرا به %s انتفال دهید" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "هیچ فایل تنظیماتی پیدا نشد. لطفا یک فایل در %s بسازید" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 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:132 +#: home-manager/home-manager:115 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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -68,39 +77,61 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"برای از بین بردن این اخطار, یکی از کار های زیر را انجام دهید.\n" +"\n" +"1. مسیر Home Manager را به صورت دقیق با اضافه کردن خط زیر\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +"به کانفیگ خود, تعریف کنید\n" +"\n" +"اگر Home Manager را به طور مستقیم import کرده اید, میتوانید از پارامتر `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:146 +msgid "Sanity checking Nix" +msgstr "چک کردن پایداری Nix" -#: home-manager/home-manager:174 +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "بعد از امتحان کردن %s و %s , دایرکتوری مناسب برای پروفایل یافت نشد" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" -msgstr "" +msgstr "عدم امکان بررسی گزینه‌های تنظیمات Flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" -msgstr "" +msgstr "%s: آپشن مورد نظر شما یافت نشد %s" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" -msgstr "" +msgstr "%s --help برای دیدن راهنمایی دستور رو به رو را اجرا کنید" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "فایل %s از قبل وجود داشته است، بدون تغییر رها شد..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." -msgstr "ساختن %s..." +msgstr "درحال ساختن %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "در حال ساخت نسخه اولیه Home Manager." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -109,9 +140,15 @@ msgid "" "to configure Home Manager. Run 'man home-configuration.nix' to\n" "see all available options." msgstr "" +"پایان! ابزار home-manager نصب شده است و شما میتوانید با تغییر دادن فایل\n" +"\n" +" %s\n" +"\n" +"تنظیمات Home Manager خود را تغییر دهید. برای دیدن همه ی تنظیمات موجود\n" +"دستور 'man home-configuration.nix' را اجرا کنید." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -119,13 +156,19 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"ای بابا, فرایند نصب با شکست مواجه شد! اگر بنظرتان میاید مشکل از Home Manager " +"است, لطفا یک issue در\n" +"\n" +" %s\n" +"\n" +"ایجاد کنید." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "عدم امکان نمونه‌سازی تنظیمات flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -133,81 +176,88 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" +"%d خبر خوانده نشده وجود دارد.\n" +"میتوانید آن را با اجرای دستور \"%s news\" بخوانید." msgstr[1] "" +"%d خبر خوانده نشده وجود دارد.\n" +"میتوانید آنها را با اجرای دستور \"%s news\" بخوانید." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" +msgstr "تنظیمات \"news.display\" در \"%s\" شناخته شده نیست." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "لطفا متغیر محیطی $EDITOR را مقدار دهی کنید" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "لطفا متغیر محلی $EDITOR و یا $VISUAL را تنظیم کنید" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" -msgstr "" +msgstr "نمیتوان دستور build را در یک دایکتوری read-only اجرا کرد" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" -msgstr "" +msgstr "هیچ نسل ای با شناسه %s یافت نشد" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "نمی‌توان نسل فعلی %s را حذف کرد" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "حذف کردن نسل %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" -msgstr "" +msgstr "هیچ نسلی برای منسوخ کردن وجود ندارد" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." -msgstr "" +msgstr "بنظر میاید هیچ پکیجی از home-manager نصب نشده است." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" -msgstr "" +msgstr "پارامتر %s شناخته نشده است" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." -msgstr "" +msgstr "این عمل Home Manager را از سیستم شما حذف میکند." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" +msgstr "این یک عمل آزمایشی است, قرار نیست چیزی واقعا حذف شود." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" -msgstr "واقعاً هوم منیجر را حذف نصب کنید؟" +msgstr "واقعا میخواهید Home Manager را حذف کنید؟" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." -msgstr "" +msgstr "در حال انتقال به تنظیمات خالی Home Manager..." -#: home-manager/home-manager:857 -#, fuzzy +#: home-manager/home-manager:863 msgid "Yay!" -msgstr "آره!" +msgstr "ایول!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "هوم منیجر حذف نصب شد اما home.nix شما دست نخورده باقی ماند." +msgstr "Home Manager حذف نصب شد اما home.nix شما دست نخورده باقی ماند." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." -msgstr "" +msgstr "expire-generations یک پارامتر نیاز دارد, اما %d پارامتر دریافت کرد" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "دستور ناشناخته: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." -msgstr "" +msgstr "این نسخه قابل build کردن نیست, لطفا آن را با nix-shell اجرا کنید." + +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "لطفا متغیر محیطی $EDITOR را مقدار دهی کنید" #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "ایجاد تنظیمات اولیه Home-Manager..." diff --git a/home-manager/po/fi.po b/home-manager/po/fi.po index 466b6890a282..6662d35a255a 100644 --- a/home-manager/po/fi.po +++ b/home-manager/po/fi.po @@ -7,46 +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-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" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-12-03 13:00+0000\n" +"Last-Translator: Ricky Tigg \n" +"Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.9-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: puuttuva argumentti kohteelle %s" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" -msgstr "" +msgstr "Kokoonpanotiedostoa ei löydy %s:sta" #. 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Home Managerin %s pitäminen %s:ssa on vanhentunut.\n" +"ole hyvä ja siirrä se %s:een" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" -msgstr "" +msgstr "Kokoonpanotiedostoa ei löytynyt. Luo sellainen %s:lla" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manageria ei löytynyt sijainnista %s." #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -67,38 +76,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nixin eheys tarkistetaan" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Sopivaa profiilihakemistoa ei löytynyt, yritettiin %s ja %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" -msgstr "" +msgstr "Flake-konfiguraation asetuksia ei voi tarkastella" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" -msgstr "" +msgstr "%s: tuntematon vaihtoehto '%s" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" -msgstr "" +msgstr "Aja '%s --help' saadaksesi käyttöohjeita" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Tiedosto %s on jo olemassa, jätetään se muuttumattomaksi..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." -msgstr "" +msgstr "Luodaan tiedostoa %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." -msgstr "" +msgstr "Luodaan alkuperäistä Home Manager -generaatiota..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -109,7 +122,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -119,11 +132,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" -msgstr "" +msgstr "Flake-konfiguraatiota ei voi luoda" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -131,76 +144,81 @@ msgid_plural "" "There are %d unread and relevant news items.\n" "Read them by running the command \"%s news\"." msgstr[0] "" +"Sinulla on %d lukematon ja oleellinen uutisartikkeli.\n" +"Lue se ajamalla komento \"%s news\"." msgstr[1] "" +"Sinulla on %d lukematonta ja oleellista uutisartikkelia.\n" +"Lue ne ajamalla komento \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" +msgstr "Tuntematon asetus \"news.display\" \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Aseta $EDITOR- tai $VISUAL-ympäristömuuttujaksi" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" -msgstr "" +msgstr "Nykyistä generaatiota %s ei voi poistaa" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" -msgstr "" +msgstr "Generaatio %s poistetaan" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." -msgstr "" +msgstr "Näyttää siltä, ettei yhtään home-manager-pakettia ole asennettu." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" -msgstr "" +msgstr "Tuntematon argumentti %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." -msgstr "" +msgstr "Tämä poistaa Home Managerin järjestelmästäsi." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" +msgstr "Tämä on kuivaharjoitus, mitään ei oikeasti poisteta." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" -msgstr "" +msgstr "Haluatko varmasti poistaa Home Managerin?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." -msgstr "" +msgstr "Vaihdetaan tyhjään Home Manager -konfiguraatioon..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" -msgstr "" +msgstr "Jes!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" +"Home Manager on poistettu, mutta home.nix-tiedostosi jää koskemattomaksi." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" -msgstr "" +msgstr "Tuntematon komento: %s" #: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." diff --git a/home-manager/po/fr.po b/home-manager/po/fr.po index 6b1df46378d9..de1c061bf990 100644 --- a/home-manager/po/fr.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-12-25 10:10+0000\n" -"Last-Translator: Louis Thevenet \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-29 18:07+0000\n" +"Last-Translator: Michael Thomas \n" "Language-Team: French \n" "Language: fr\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.4-dev\n" +"X-Generator: Weblate 5.5.2\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s : argument manquant pour %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,18 +39,18 @@ msgstr "" "Garder votre Home Manager %s dans %s est obsolète,\n" "Veuillez le déplacer à %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -54,7 +59,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -90,38 +95,42 @@ msgstr "" "\n" "\t$ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Vérification de Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Impossible d'inspecter les options de la configuration d'un flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s : option inconnue '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Exécuter « %s --help » pour de l'aide sur l'utilisation" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Le fichier %s existe déjà, il sera laissé inchangé..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Création de %s ..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -139,7 +148,7 @@ msgstr "" "essayez 'man home-configuration.nix'." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +164,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Impossible d'instancier une configuration flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -173,72 +182,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:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Configuration \"news.display\" inconnue \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Veuillez définir la variable d'environnement $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Veuillez remplir la variable d'environnement $EDITOR ou VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Impossible de lancer une compilation dans un dossier en écriture seule" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Aucune génération avec l'ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Impossible de supprimer la génération courante %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Suppression de la génération %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Aucune génération expirée" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Aucun package home-manager ne semble être installé." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argument inconnu %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Cela va supprimer Home Manager de votre système." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Voulez-vous vraiment désinstaller Home Manager ?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Changement vers une configuration vierge de Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Yay !" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations attend un argument, a obtenu %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Commande inconnue : %s" @@ -246,6 +255,10 @@ msgstr "Commande inconnue : %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Cette dérivation ne peut être construite, essayez avec nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Veuillez définir la variable d'environnement $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "Désolé, cette commande n'est pas encore prise en charge dans la " diff --git a/home-manager/po/hi.po b/home-manager/po/hi.po new file mode 100644 index 000000000000..3921eff11557 --- /dev/null +++ b/home-manager/po/hi.po @@ -0,0 +1,220 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-10-09 14:31+0000\n" +"Last-Translator: Utkarsh Sharma \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.8-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: ‌%s के लिए कोई आर्ग्यूमेंट नहीं दिया" + +#: home-manager/home-manager:64 +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:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"अपने Home Manager %s को %s में रखना अप्रचलित है,\n" +"कृपया इसे %s में स्थानांतरित करें" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "कोई कॉन्फ़िगरेशन फ़ाइल नहीं मिली। कृपया %s पर एक फ़ाइल बनाएं।" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "%s पर Home Manager नहीं मिला।" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +msgstr[1] "" + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" diff --git a/home-manager/po/home-manager.pot b/home-manager/po/home-manager.pot index e5937eeccca8..2fcdc5a6061a 100644 --- a/home-manager/po/home-manager.pot +++ b/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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,36 +18,41 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "" #. translators: The first '%s' specifier will be replaced by either #. 'home.nix' or 'flake.nix'. -#: home-manager/home-manager:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -68,38 +73,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 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 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -110,7 +119,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -120,11 +129,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -134,72 +143,72 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" +msgid "Please set the $EDITOR or $VISUAL environment variable" msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "" diff --git a/home-manager/po/hu.po b/home-manager/po/hu.po new file mode 100644 index 000000000000..3cfab2551a63 --- /dev/null +++ b/home-manager/po/hu.po @@ -0,0 +1,258 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-09-02 17:09+0000\n" +"Last-Translator: Ferenci Ákos \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.8-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: hiányzó érték erre: %s" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "Nincs konfigurációs fájl itt: %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"A Home Manager %s %s elérési úton való tárolása elavult. Kérem helyezze át a " +"%s elérési úthoz" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "" +"Nem található konfigurációs fájl. Kérem hozza létre a fájlt a %s elérési úton" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "Home Manager nem található a %s elérési úton." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"A tartalék Home Manager fájlútvonal %s elavult és fájl/könyvtár található " +"itt." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" +"A felmerült hiba elhárítására a következőket tegye:\n" +"\n" +"1. Közvetlen adja át a Home Manager-nek a fájlútvonalat, pl.:\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" sor konfigurációhoz való hozzáadásával.\n" +"\n" +" Amennyiben a Home Manager-t közvetlen importolja, használhatja a 'path' " +"paramétert\n" +"\n" +" pkgs.callPackage/path/tohome-manager-package{path = \"%s\"; }\n" +" a Home Manager csomag meghívásakor.\n" +"\n" +" 2. Távolítsa el az elavult fájlútvonalat.\n" +"\n" +" $ rm -r \"$s\"" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix épségének ellenőrzése" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"Nem található megfelelő profil mappa, %s és %s útvonalak lettek kipróbálva." + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "Nem lehet a flake konfiguráció beállításait megtekinteni." + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "%s: ismeretlen opció '%s'" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "Futtasa a '%s --help' parancsot a használattal kapcsolatos segítségért" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "A fájl %s már létezik és változatlan marad..." + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "%s létrehozása..." + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "Kezdeti Home Manager generáció létrehozása..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +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 "" +"Elkészült! A home-manager eszköz most már installálva van és a \n" +"\n" +" %s\n" +"\n" +"fájl szerkesztésével konfigurálhatja a Home Manager-t. \n" +"Futtassa a 'man home-configuration.nix' parancsot az összes opció " +"áttekintéséhez." + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" +"Uh oh, az installáció nem sikerült! Kérem készítsen egy jelentést erről a \n" +"\n" +" %s\n" +"\n" +"helyen amennyiben a hiba a Home Manager miatt lépett fel." + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "Flake konfiguráció nem példányosítható" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"%d olvasatlan és releváns hírt kapott.\n" +"Olvassa el a \"%s news\" futattásával." +msgstr[1] "" +"%d olvasatlan és releváns hírt kapott.\n" +"Olvassa el őket a \"%s news\" futattásával." + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Ismeretlen \"news.display\" opció \"%s\"." + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Kérem állítása be az $EDITOR vagy a $VISUAL környezeti változókat." + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "Build futtatása nem lehetséges csak-olvasható könyvtárban" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "Nem található generáció a következő ID-val: %" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "A jelenlegi generáció %s nem eltávolítható" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "%s generáció eltávolítása" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "Nincs lejárandó generáció" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "Nem található installált Home Manager csomag" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "Ismeretlen argumentum %s" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "Ez a művelet eltávolítja a Home Manager-t a rendszeréről." + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Ez egy üres járat, semmi nem lesz valójában eltávolítva." + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "Biztosan eltávolítja a Home Managert-t?" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "Átváltás üres Home Manager konfigurációra..." + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "Hurrá!" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager eltávolítva, de a home.nix fájl érintetlenül maradt." + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "Ismeretlen parancs: %s" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" +"Ez a származtatás nem építhető fel, kérlek futtasd nix-shell segítségével." diff --git a/home-manager/po/id.po b/home-manager/po/id.po index a36e493d8d46..2dd2c14d2129 100644 --- a/home-manager/po/id.po +++ b/home-manager/po/id.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-10-04 06:02+0000\n" -"Last-Translator: Reza Almanda \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \n" "Language-Team: Indonesian \n" "Language: id\n" @@ -17,16 +17,21 @@ 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.1-dev\n" +"X-Generator: Weblate 5.4\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Mempertahankan Pengelola Beranda Anda %s di %s tidak digunakan lagi,\n" "tolong pindahkan ke %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ 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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -73,38 +78,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Pemeriksaan sanity Nix" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Tidak dapat memeriksa opsi konfigurasi flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opsi tidak diketahui '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Jalankan '%s --help' untuk bantuan penggunaan" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "File %s sudah ada, sehingga tidak berubah..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Membuat %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Membuat pembuatan Home Manager awal..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -115,7 +124,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -130,11 +139,11 @@ msgstr "" "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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Tidak dapat membuat konfigurasi flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -145,72 +154,72 @@ msgstr[0] "" "Ada %d item berita yang belum dibaca dan relevan. \n" "Bacalah dengan menjalankan perintah \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Pengaturan \"news.display\" yang tidak diketahui \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Silahkan atur variabel lingkungan $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Tidak dapat menjalankan build di direktori hanya-baca" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Tidak ada generasi dengan ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Tidak dapat menghapus %s generasi saat ini" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Menghapus generasi %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Tidak ada generasi yang kedaluwarsa" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Yey!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "" @@ -218,3 +227,7 @@ msgstr "" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Derivasi ini tidak dapat dibangun, silakan jalankan menggunakan nix-shell." + +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Silahkan atur variabel lingkungan $EDITOR" diff --git a/home-manager/po/is.po b/home-manager/po/is.po new file mode 100644 index 000000000000..8c29d2a2461f --- /dev/null +++ b/home-manager/po/is.po @@ -0,0 +1,223 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-23 17:49+0000\n" +"Last-Translator: Bjarki Gunnarsson \n" +"Language-Team: Icelandic \n" +"Language: is\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 % 10 != 1 || n % 100 == 11;\n" +"X-Generator: Weblate 5.5-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +#, fuzzy +msgid "%s: missing argument for %s" +msgstr "%s: vantar inntak fyrir %s" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "Engin stillingaskrá fundin í %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Það er úrelt að geyma Home Manager %s í %s,\n" +"vinsamlega færðu hann í %s" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "Engin stillingaskrá fundin. Vinsamlegast búðu hana til í %s" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "Home Manager ekki fundinn í %s." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Vara Home Manager slóðin %s hefur verið úreld en skrá/mappa hefur verið " +"fundin þar." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +msgid "" +"Uh oh, the installation failed! Please create an issue at\n" +"\n" +" %s\n" +"\n" +"if the error seems to be the fault of Home Manager." +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +msgstr[1] "" + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" diff --git a/home-manager/po/it.po b/home-manager/po/it.po index 266ce46ddd4f..1637a62dce98 100644 --- a/home-manager/po/it.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-12-02 23:06+0000\n" -"Last-Translator: Lorenzo Brzek \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-11-18 15:00+0000\n" +"Last-Translator: Lorenzo Bevilacqua \n" "Language-Team: Italian \n" "Language: it\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.3-dev\n" +"X-Generator: Weblate 5.9-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: argomento mancante per %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Mantere il tuo Home Manger su %s su %s è obsoleto,\n" "si raccomanda di spostarlo su %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Nessun file di configurazione trovato. Per favore creane uno in %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -84,8 +89,8 @@ msgstr "" "· · · Se hai importato Home Manager direttamente, puoi usare il parametro " "`path`\n" "\n" -"· · · · · pkgs.callPackage /percorso/di/home-manager-package { path = \"%s\"" -";}\n" +"· · · · · pkgs.callPackage /percorso/di/home-manager-package { path = " +"\"%s\";}\n" "\n" "· · · quando chiami il pacchetto Home Manager\n" "\n" @@ -93,39 +98,43 @@ msgstr "" "\n" "· · · · · $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Controllando Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Impossibile ispezionare le opzioni di configurazione flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opzione sconosciuta '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Esegui '%s --help' per le informazioni d'uso" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Il file %s esiste già, non verrà modificato..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Creando %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -142,7 +151,7 @@ msgstr "" "consultare tutte le opzioni disponibili." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -158,11 +167,11 @@ msgstr "" "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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Impossibile istanziare una configurazione flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -176,72 +185,72 @@ msgstr[1] "" "Ci sono %d novità rilevanti non lette.\n" "Leggile con il comando \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Opzione \"news.display\" sconosciuta \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Per favore impostare la variabile d'ambiente $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Per favore definisci le variabili d'ambiente $EDITOR o $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Impossibile eseguire la build in una cartella in sola lettura" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Nessuna generazione con ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Impossibile rimuovere la generazione corrente %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Rimuovo la generazione %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Nessuna generazione in scadenza" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Sembrerebbe che nessun pacchetto home-manager sia installato." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argomento sconosciuto: %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Questo rimuoverà Home Manger dal tuo sistema." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Vuoi davvero disinstallare Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Passaando ad una configurazione Home Manager vuota..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Urrà!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager è disinstallato ma la tua home.nix non è stata toccata." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations si aspetta un solo argomento, invece di %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comando sconosciuto: %s" @@ -250,6 +259,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Questa derivazione non è compilabile, prova ad eseguirla usando nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Per favore impostare la variabile d'ambiente $EDITOR" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Creando la configurazione iniziale di Home Manager..." diff --git a/home-manager/po/ja.po b/home-manager/po/ja.po index 9236d53f5694..5a558d365f7b 100644 --- a/home-manager/po/ja.po +++ b/home-manager/po/ja.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-06-12 10:49+0000\n" -"Last-Translator: Jeff Ames \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-25 11:09+0000\n" +"Last-Translator: TANIGUCHI Kohei \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.6-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: %s の引数がありません" + +#: home-manager/home-manager:64 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,23 +39,24 @@ msgstr "" "Home Managerの %s の %s への保管は非推奨となりました\n" "%s へ移動させてください" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "設定ファイルがありません。ファイルを %s に作ってください" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "%s にHome Managerが見つかりません。" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." -msgstr "" +msgstr "フォールバックの Home Manager のパス %s " +"は非推奨ですが、そこにファイルまたはディレクトリがあります。" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -70,40 +76,62 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"この警告が表示されないようにするには、以下のどれかを行ってください。\n" +"\n" +"1. Home Manager にそのパスを使うよう伝えます。例えば\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" を設定に追加します。\n" +"\n" +" もし Home Manager を直接インポートしているのであれば、 Home Manager " +"パッケージを呼び出すときに `path` パラメーターを使って\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" のようにできます。\n" +"\n" +"2. 非推奨のパスにあるものを削除します。\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nixの健全性検査中です" -#: home-manager/home-manager:174 +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "flake設定のオプションを検査できません" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: 不明なオプション '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "'%s --help' でヘルプを参照することができます" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "%s は既に存在します。変更せずに続行しています..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "%s を作成中です..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Home Managerの世代を初期化しています..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -121,7 +149,7 @@ msgstr "" "'man home-configuration.nix' を実行してください。" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -137,11 +165,11 @@ msgstr "" "というissueを立ててください。" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "flake設定を初期化できません" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -152,75 +180,75 @@ msgstr[0] "" "未読のお知らせが%d件あります。\n" "\"%s news\"コマンドで確認できます。" -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "\"news.display\"に\"%s\"という設定は存在しません。" -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "$EDITOR環境変数を設定してください" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "環境変数 $EDITOR または $VISUAL を設定してください" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "読み込み専用ディレクトリ内ではbuild(作成)できません" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "ID %s を持つ世代はありません" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "現在使用中の世代 %s は削除できません" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "世代 %s を削除中です" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "期限切れで削除される世代はありません" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "home-managerパッケージがインストールされていないようです。" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "不明な引数 %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "この操作によってHome Managerはシステムから削除されます。" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "これはdry run (予行練習)で、実際にはアンインストールは行われません。" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "本当にHome Managerをアンインストールしますか?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "空のHome Managerの設定に切り替えています..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "イェイ!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Managerはアンインストールされましたが、home.nixはそのまま残してありま" "す。" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" "expire-generations は一つしか引数を取らないところ、%d 個が与えられました。" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "不明なコマンド: %s" @@ -228,6 +256,10 @@ msgstr "不明なコマンド: %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "この派生はビルドできません。nix-shellを使って実行してください。" +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "$EDITOR環境変数を設定してください" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "申し訳ありませんが、このコマンドはflake設定ではまだ対応されていません" diff --git a/home-manager/po/ko.po b/home-manager/po/ko.po index c68ef7f79a2a..96eae0712080 100644 --- a/home-manager/po/ko.po +++ b/home-manager/po/ko.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-08-03 05:07+0000\n" -"Last-Translator: 박수원 \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-30 06:09+0000\n" +"Last-Translator: lentil32 \n" "Language-Team: Korean \n" "Language: ko\n" @@ -17,16 +17,21 @@ 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.6-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: %s에 대한 인자 누락" + +#: home-manager/home-manager:64 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "홈 매니저 %s 을 %s 안에 선언하는 것은 더 이상 사용되지 않습니다.\n" "%s로 옮겨주십시오" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "설정 파일을 찾을 수 없음. %s에 설정 파일을 생성하십시오" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "%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 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ 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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,38 +96,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix가 정상인지 확인 중" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "flake 설정의 옵션들을 검사할 수 없음" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: 알 수 없는 옵션 '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "도움말을 보려면 '%s --help'를 실행하십시오" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "%s 파일은 이미 존재하므로, 수정하지 않음..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "%s를 생성하는 중..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "최초의 홈 매니저 세대를 생성하는 중..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -140,7 +149,7 @@ msgstr "" "실행해서 가능한 모든 옵션을 살펴보십시오." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +164,11 @@ msgstr "" "위 사이트에서 이슈를 생성하십시오." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "flake 설정을 인스턴스화 할 수 없음" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -170,74 +179,74 @@ msgstr[0] "" "읽지 않은 관련된 뉴스 항목들이 %d 개 있습니다.\n" "\"%s news\" 명령어를 실행해 읽어보십시오." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "알 수 없는 \"news.display\"의 설정 \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "환경변수 $EDITOR를 설정하십시오" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "$EDITOR 또는 $VISUAL 환경 변수를 설정하십시오" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "읽기전용 폴더에서 빌드를 실행할 수 없습니다" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "ID %s를 갖는 세대가 존재하지 않음" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "현재 세대인 %s를 삭제할 수 없음" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "%s 세대를 삭제하는 중" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "유효 기간이 지난 세대가 없음" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "홈 매니저 패키지들이 설치되지 않은 것으로 보입니다." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "알 수 없는 매개변수 %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "시스템에서 홈 매니저를 삭제할 것입니다." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "모의 실행 중으로, 아무것도 실제로 설치되지 않습니다." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "정말로 홈 매니저를 삭제할까요?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "빈 홈 매니저 설정으로 바꾸는 중..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "야호!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "홈 매니저는 삭제되지만 home.nix 파일은 남겨집니다." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" "expire-generations 명령어는 매개변수가 한 개 필요한데, %d 개가 입력되었습니" "다." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "알 수 없는 명령어: %s" @@ -246,6 +255,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "이 derivation은 빌드 할 수 없습니다. nix-shell을 이용해서 실행해 주십시오." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "환경변수 $EDITOR를 설정하십시오" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "죄송합니다만, 이 명령어는 아직 flake 환경에서 지원되지 않습니다" diff --git a/home-manager/po/lt.po b/home-manager/po/lt.po index 708d8de697f0..c635d93a61ef 100644 --- a/home-manager/po/lt.po +++ b/home-manager/po/lt.po @@ -7,28 +7,32 @@ 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-10-19 04:00+0000\n" -"Last-Translator: Yogurt \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-10-17 00:20+0000\n" +"Last-Translator: Julius Marozas \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" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (" +"n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Weblate 5.8-rc\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: trūksta argumento %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 #, fuzzy msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" @@ -37,23 +41,25 @@ msgstr "" "Home Manager saugojimas %s viduje %s yra pasenes,\n" "prašome perkelti į %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Nerastas konfigūracijos failas. Sukurkite jį adresu %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Atsarginis kelias %s į Home Manager jau nebenaudojamas, tačiau jame buvo " +"rastas failas/katalogas." #. 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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -73,39 +79,61 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Norėdami pašalinti šį įspėjimą, atlikite vieną iš šių veiksmų.\n" +"\n" +"1. Aiškiai nurodykite kelią į Home Manager, pavyzdžiui, pridėdami\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" prie jūsų konfigūracijos.\n" +"\n" +" Jei importuojate Home Manager tiesiogiai, galite naudoti parametrą `path`." +"\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" kviečiant į Home Manager paketą.\n" +"\n" +"2. Pašalinkite nebenaudojamą kelią.\n" +"\n" +" $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix tikrinamas" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Negalima patikrinti flake konfigūracijos pasirinkimų" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: nežinomas pasirinkimas „%s“" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Paleiskite „%s --help“, kad gautumėte naudojimosi instrukcijas" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Failas %s jau egzistuoja, jis paliekamas nepakeistas..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Kuriamas %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -124,7 +152,7 @@ msgstr "" "jei norite pamatyti visus pasirinkimus." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -139,11 +167,11 @@ msgstr "" "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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Negalima sukurti pradinės flake konfigūracijos" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -160,73 +188,72 @@ msgstr[2] "" "Yra %d neperskaitytų ir aktualių naujienų.\n" "Perskaitykite jas paleidus komandą \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Nežinomas \"news.display\" nustatymas \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Prašome nustatyti $EDITOR aplinkos kintamąjį" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Nustatykite $EDITOR arba $VISUAL aplinkos kintamuosius" -#: home-manager/home-manager:598 -#, fuzzy +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Negalima vykdyti kompiliavimo read-only kataloge" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Nėra generacijos su ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Negalima pašalinti esamos generacijos %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Pašalinama generacija %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Nėra generacijų, kurios baigtų galioti" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Nėra instaliuotų home-manager paketų." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Nežinomas argumentas %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Tai pašalins Home Manager iš jūsų sistemos." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Tai bandomasis paleidimas, niekas nebus ištrinta." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Tikrai išdiegti Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Perjungiama į tuščią Home Manager konfigūraciją..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Valio!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations tikisi vieno argumento, gauta %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Nežinoma komanda: %s" @@ -235,6 +262,10 @@ 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." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Prašome nustatyti $EDITOR aplinkos kintamąjį" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Kuriama pradinė Home Manager konfigūracija..." diff --git a/home-manager/po/nb_NO.po b/home-manager/po/nb_NO.po index 2fc2c818f4eb..41f5035c48df 100644 --- a/home-manager/po/nb_NO.po +++ b/home-manager/po/nb_NO.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-03-08 07:22+0000\n" -"Last-Translator: \"Kim A. Ødegaard\" \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-02 21:38+0000\n" +"Last-Translator: LilleAila \n" "Language-Team: Norwegian Bokmål \n" "Language: nb_NO\n" @@ -17,38 +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.16.2-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "Fant ingen oppsettsfil i %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +#, fuzzy msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" +"Å holde Home Manager %s i %s er avviklet,\n" +"vennligst flytt det til %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Fant ikke noen oppsettsfil. Opprett en i %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." -msgstr "" +msgstr "Home Manager var ikke funnet på %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 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -69,38 +77,43 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Kontrollerer at Nix fungerer" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kunne ikke finne en passende profilmappe, prøvde %s og %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Kan ikke inspisere alternativer for et flake-oppsett" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: ukjent alternativ «%s»" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Kjør «%s --help» for brukshjelp" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 +#, fuzzy msgid "The file %s already exists, leaving it unchanged..." -msgstr "" +msgstr "Filen %s eksisterer fra før, lar den være uendret..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." -msgstr "" +msgstr "Lager %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Oppretter ny Home Manager-generasjon..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -117,7 +130,7 @@ msgstr "" "se alle tilgjengelige innstillinger." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -132,11 +145,11 @@ msgstr "" "hvis du tror feilen er forårsaket av Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Kan ikke igangsette flak-oppsett" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -150,72 +163,72 @@ msgstr[1] "" "Det er %d uleste og relevante nyhetssaker.\n" "Les dem ved å kjøre kommandoen «%s news»." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Ukjent «news.display»-innstilling «%s»." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Sett «$EDITOR»-miljøvariabelen" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Kan ikke kjøre bygg i skrivebeskyttet mappe" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Ingen generering med ID-en %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Kan ikke fjerne nåværende generering %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Fjerner generering %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Ingen genereringer til utløp" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Ingen «home-manager»-pakker ser ut til å være installert." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Ukjent parameter %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Dette vil fjerne Home Manager fra systemet ditt." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Dette er en testkjøring. Ingenting vil bli avinstallert." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Vil du avinstallere Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Bytter til tomt Home Manager-oppsett …" -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Hurra!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager er avinstallert, men din home.nix er levnet uforandret." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "«expire-generations» forventet ett argument, mottok %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Ukjent kommando: %s" @@ -223,6 +236,10 @@ msgstr "Ukjent kommando: %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Denne avledningen kan ikke bygges, vennligst kjør den i nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Sett «$EDITOR»-miljøvariabelen" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Oppretter ny Home Manager-konfigurasjon..." diff --git a/home-manager/po/nl.po b/home-manager/po/nl.po index 04a398eaec82..9f614ab10a3c 100644 --- a/home-manager/po/nl.po +++ b/home-manager/po/nl.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-12-02 23:06+0000\n" -"Last-Translator: Zurga \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \n" "Language-Team: Dutch \n" "Language: nl\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.3-dev\n" +"X-Generator: Weblate 5.4\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "Geen configuratiebestand gevonden op %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,23 +39,23 @@ msgstr "" "Je Home Manager %s bestand opslaan in %s is niet langer ondersteund,\n" "gelieve het te verplaatsen naar %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -71,38 +76,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix aan het sanity checken" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Kan de opties van een flake configuratie niet inspecteren" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: onbekende keuze '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Voer '%s --help' in om gebruiksinfo te zien" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Het bestand %s bestaat al, het zal niet aangepast worden..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "%s aan het aanmaken..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -121,7 +130,7 @@ msgstr "" "alle opties te zien." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -136,11 +145,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Het is niet gelukt om de flake-configuratie te creëren" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -154,72 +163,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:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Onbekende \"new.display\" instelling \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 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:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Geen generatie met de ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Generatie %s aan het verwijderen" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Geen generatie om te beëindigen" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Onbekend argument %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Dit zal Home Manager van jouw systeem verwijderen." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Wilt u zeker Home Manager verwijderen?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Naar een lege Home Manager configuratie aan het veranderen..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Joepie!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations verwacht één argument, maar kreeg er %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Onbekende opdracht: %s" @@ -229,6 +238,10 @@ msgstr "" "Deze afleiding kan niet gebouwd worden, voer het alstublieft uit met nix-" "shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Initiële Home Manager configuratie aan het maken..." diff --git a/home-manager/po/pl.po b/home-manager/po/pl.po index 030b88a0140a..63eeed3f0d6d 100644 --- a/home-manager/po/pl.po +++ b/home-manager/po/pl.po @@ -7,27 +7,32 @@ 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-08-30 13:45+0000\n" -"Last-Translator: Marcin Kaczorek \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-06-17 09:46+0000\n" +"Last-Translator: Mateusz P \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 5.0.1-dev\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Weblate 5.6-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: brakuje wartości dla %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -35,16 +40,16 @@ msgstr "" "Przechowywanie %s Home Managera w %s jest przestarzałe,\n" "proszę przenieść go do %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Nie znaleziono pliku konfiguracyjnego. Proszę utworzyć plik %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -53,7 +58,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -93,38 +98,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Sprawdzanie poprawności Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Nie mogę sprawdzić konfiguracji flake'a" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: nieznana opcja „%s”" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Uruchom „%s --help” by otrzymać pomoc" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Plik %s już istnieje, pozostawianie go bez zmian..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Tworzenie %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -142,7 +151,7 @@ msgstr "" "sprawdzić wszystkie możliwe opcje konfiguracyjne." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -157,11 +166,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Nie mogę utworzyć instancji konfiguracji flake'a" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -178,73 +187,73 @@ msgstr[2] "" "Jest %d nieodczytanych wiadomości.\n" "Możesz je odczytać uruchamiając „%s news”." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Nieznane ustawienie „%s” „news.display”." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Proszę ustawić zmienną środowiskową $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Proszę ustawić zmienną środowiskową $EDITOR lub $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Nie mogę uruchomić budowania w katalogu tylko-do-odczytu" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Brak generacji z ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Nie mogę usunąć bieżącej generacji %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Usuwanie generacji %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Brak wygasających generacji" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Pakiety home-manager nie wydają się być zainstalowane." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Nieznany argument %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "To usunie Home Managera z twojego systemu." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Jesteś pewien usunięcia Home Managera?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Przełączanie do pustej konfiguracji Home Managera..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Jej!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations oczekuje jednego argumentu, otrzymano %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Nieznana komenda: %s" @@ -253,6 +262,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Ta paczka (derivation) nie da się budować, proszę uruchom używając nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Proszę ustawić zmienną środowiskową $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "Przepraszamy, ta komenda nie jest jeszcze obsługiwana w konfiguracji flake" diff --git a/home-manager/po/pt.po b/home-manager/po/pt.po index 251da89b3ab5..a5de344bd92e 100644 --- a/home-manager/po/pt.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-12-11 16:06+0000\n" -"Last-Translator: Lucas Eduardo \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-19 17:07+0000\n" +"Last-Translator: Felipe Silva \n" "Language-Team: Portuguese \n" "Language: pt\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.3-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: faltando argumento para %s" + +#: home-manager/home-manager:64 msgid "No configuration file found at %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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ 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:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,40 +96,44 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Revalidando Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 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:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opção não reconhecida '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Execute '%s --help' para instruções de uso" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "O arquivo %s já existe, deixando do jeito que está..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Criando %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -141,7 +150,7 @@ msgstr "" "ver todas as opções disponíveis." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -156,11 +165,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Não foi possível instanciar a configuração de flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -174,72 +183,72 @@ msgstr[1] "" "Há %d novos itens relevants não lidos\n" "Leia executando o comando \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Por favor defina a variável de ambiente $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Por favor, defina a variável de ambiente $EDITOR ou $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 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:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Nenhuma geração com ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Não foi possível remover a geração atual %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "A remover a geração %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Nenhuma geração a expirar" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Nenhum pacote parece instalado com home-manager." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argumento desconhecido %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Isto irá remover o Home Manager do seu sistema." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Confirma a desinstalação do Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Trocando para configuração vazia do Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Boa!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera um argumento, recebeu %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comando não reconhecido: %s" @@ -249,6 +258,10 @@ msgstr "" "O build dessa derivation não pode ser feito, por favor rode usando o nix-" "shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Por favor defina a variável de ambiente $EDITOR" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Criando a configuração inicial do Home Manager..." diff --git a/home-manager/po/pt_BR.po b/home-manager/po/pt_BR.po index aa311d80cfd6..a3075d41e4d5 100644 --- a/home-manager/po/pt_BR.po +++ b/home-manager/po/pt_BR.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-11-30 15:04+0000\n" -"Last-Translator: Gabriel Fontes \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-19 17:07+0000\n" +"Last-Translator: Felipe Silva \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.3-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: faltando argumento para %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Manter seu Home Manager %s em %s foi descontinuado,\n" "por favor mova-o para %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -92,39 +97,43 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Revalidando Nix" + +#: home-manager/home-manager:166 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" +"Não foi possível encontrar um diretório de perfil apropriado, tentou %s e %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 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:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opção não reconhecida '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Execute '%s --help' para instruções de uso" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "O arquivo %s já existe, mantendo ele sem modificações..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Criando %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -142,7 +151,7 @@ msgstr "" "ver todas as opções disponíveis." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -157,11 +166,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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Não foi possível instanciar a configuração de flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -175,72 +184,72 @@ msgstr[1] "" "Há %d novos itens relevants não lidos\n" "Leia executando o comando \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Por favor defina a variável de ambiente $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Por favor, defina a variável de ambiente $EDITOR ou $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 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:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Nenhuma geração com ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Não foi possível remover a geração atual %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Removendo geração %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Nenhuma geração a expirar" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Nenhum pacote parece instalado com home-manager." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argumento desconhecido %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Isso irá remover o Home Manager do seu sistema." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Confirma a desinstalação do Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Trocando para configuração vazia do Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Boa!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations espera um argumento, recebeu %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comando não reconhecido: %s" @@ -250,6 +259,10 @@ msgstr "" "O build dessa derivation não pode ser feito, por favor rode usando o nix-" "shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Por favor defina a variável de ambiente $EDITOR" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Criando a configuração inicial do Home Manager..." diff --git a/home-manager/po/ro.po b/home-manager/po/ro.po index b58a2eb605d1..b4be27ce4c3f 100644 --- a/home-manager/po/ro.po +++ b/home-manager/po/ro.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-08-11 19:50+0000\n" -"Last-Translator: HeartBlin913861820c094e37 \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-09-09 10:09+0000\n" +"Last-Translator: Felix Puscasu \n" "Language-Team: Romanian \n" "Language: ro\n" @@ -18,16 +18,21 @@ msgstr "" "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" +"X-Generator: Weblate 5.8-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: Argument lipsă pentru %s" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -35,17 +40,17 @@ msgstr "" "Păstrarea Home Managerului %s în $s e depreciat,\n" "vă rugăm să îl mutați în %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -54,7 +59,7 @@ msgstr "" "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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -93,39 +98,43 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Se verifică corectitudinea Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Nu se pot inspecta opțiunile unei configurații flake" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: opțiune necunoscută '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Rulați '%s --help' pentru ajutor de utilizare" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Fișierul %s există deja, îl lăsăm neschimbat..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Creând %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Se creează generația Home Manager inițială..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -144,7 +153,7 @@ msgstr "" "putea vedea toate opțiunile." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -159,11 +168,11 @@ msgstr "" "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:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Nu se poate instanția o configurare flake" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -180,73 +189,73 @@ msgstr[2] "" "Există %d de știri necitite și relevante.\n" "Citiți-le folosind comanda \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Opțiunea \"news.display\" este necunoscută \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Vă rugăm să setați variabila de mediu $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Rugăm să setați variabila $EDITOR sau $VISUAL în variabilele de mediu" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Nu se poate rula construirea într-un director numai pentru citire" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Nicio generație cu ID-ul %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Nu se poate șterge generația curentă %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Se șterge generația %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Nu există generații care să expire" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Nu există instalat niciun pachet home-manager." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Argument necunoscut %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Aceasta v-a înlătura Home Manager din sistemul dumneavoastră." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Aceasta este o rulare de test, nimic nu v-a fi dezinstalat." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Doriți cu adevărat să dezinstalați Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Se trece la o configurare Home Manager goală..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Ura!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations se așteaptă la un argument, a primit %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Comandă necunoscută: %s" @@ -255,3 +264,7 @@ 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." + +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Vă rugăm să setați variabila de mediu $EDITOR" diff --git a/home-manager/po/ru.po b/home-manager/po/ru.po index 97c4dd0047a5..c8afd5a2f8d6 100644 --- a/home-manager/po/ru.po +++ b/home-manager/po/ru.po @@ -7,27 +7,32 @@ 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-12-10 16:00+0000\n" -"Last-Translator: Blezz Rot \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-09-12 02:12+0000\n" +"Last-Translator: NikSne \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 5.3-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.8-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: отсутствует параметр для %s" + +#: home-manager/home-manager:64 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -35,16 +40,16 @@ msgstr "" "Файл %s вашего Home Manager находится в устаревшем месте %s\n" "пожалуйста, переместите его в %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Не найден файл конфигурации. Пожалуйста, создайте его в %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -53,7 +58,7 @@ 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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -92,38 +97,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Проверка работоспособности Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Не могу получить опции для flake-конфигурации" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: неизвестная опция '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Выполните '%s --help', чтобы получить справку" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Файл %s уже существует и не будет изменен..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Создание %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Создаю начальное поколение Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -140,7 +149,7 @@ msgstr "" "Выполните 'man home-configuration.nix', чтобы увидеть доступные опции." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +164,11 @@ msgstr "" "если считаете, что в ошибке виноват Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Не могу создать экземляр для flake-конфигурации" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -176,72 +185,72 @@ msgstr[2] "" "У вас есть %d непрочитанных и релевантных новостей.\n" "Прочтите их, выполнив команду \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Неизвестное значение \"news.display\": \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Пожалуйста, определите переменную среды $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Пожалуйста, установите переменную среды $EDITOR или $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Не могу начать сборку в директории, защищённой от записи" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Поколение под номером %s не существует" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Не могу удалить текущее поколение %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Удаляю поколение %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Нет поколений, которые можно просрочить" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Не обнаружено пакетов, установленных через home-manager." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Неизвестный аргумент %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Это удалит Home Manager из вашей системы." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Это пробный запуск, на самом деле ничего не удаляется." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Действительно хотите удалить Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Переключаюсь на пустую конфигурацию Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Ура!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager удалён, но ваш home.nix остался нетронутым." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations требует один аргумент, но передано %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Неизвестная команда: %s" @@ -250,6 +259,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Это определение нельзя собрать. Пожалуйста, запустите его через nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Пожалуйста, определите переменную среды $EDITOR" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "Создаю начальную конфигурацию Home Manager..." diff --git a/home-manager/po/sv.po b/home-manager/po/sv.po index 5d7d65bac93f..15930e49f86a 100644 --- a/home-manager/po/sv.po +++ b/home-manager/po/sv.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-07-17 10:03+0000\n" -"Last-Translator: Luna Jernberg \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-22 07:07+0000\n" +"Last-Translator: bittin1ddc447d824349b2 \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: saknar argument för %s" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "Det finns ingen konfigurationsfil i %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,16 +39,16 @@ msgstr "" "Att behålla din Home Manager %s i %s är föråldrat,\n" "snälla flytta den till %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Hittade ingen konfigurationsfil. Skapa en i %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "Home Manager hittades inte på %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 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ msgstr "" "där." #. 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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,38 +96,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Kontrollerar att Nix funkar" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Kunde inte hitta lämplig profil-katalog, försökte med %s och %s" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Kan inte granska alternativ i en flake-konfiguration" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: okänt val '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Kör '%s --help' för användarhjälp" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Filen %s finns redan, lämnar den orörd..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Skapar %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Skapar initial Home Manager-generation..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -139,7 +148,7 @@ msgstr "" "att se alla tillgängliga alternativ." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -154,11 +163,11 @@ msgstr "" "om problemet verkar bero på något Home Manager gör fel." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Kan inte instansera en flake-konfiguration" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -172,72 +181,72 @@ msgstr[1] "" "Det finns %d olästa och relevanta nyheter.\n" "Läs dem genom att köra kommandot \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Okänt \"news.display\"-värde \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Vänligen tilldela miljövariablen $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Vänligen ställ in miljövariabeln $EDITOR eller $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Kan inte bygga i katalog med bara läsrättigheter" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Ingen generation med ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Kan inte ta bort nuvarande generation %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Tar bort generation %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Ingen generation att förfalla" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Paketet home-manager verkar inte vara installerat." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Okänt argument %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Detta kommer att ta bort Home Manager från ditt system." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Detta är en testkörning, inget kommer att bli avinstallerat." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Verkligen avinstallera Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Byter till tom Home Manager-konfiguration..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Hurra!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager är avinstallerad men din home.nix är orörd." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expect-generations förväntar sig ett argument, fick %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Okänt kommando: %s" @@ -245,6 +254,10 @@ msgstr "Okänt kommando: %s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Denna derivation är inte byggbar, kör den med nix-shell istället." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Vänligen tilldela miljövariablen $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "" #~ "Ursäkta, för tillfället stödjs detta kommando inte när Nix flakes används" diff --git a/home-manager/po/th.po b/home-manager/po/th.po index 0e7e7f4436b8..174b1c0a8a79 100644 --- a/home-manager/po/th.po +++ b/home-manager/po/th.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-09-19 06:27+0000\n" "Last-Translator: Kamontat Chantrachirathumrong \n" @@ -20,36 +20,41 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 5.0.2\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "ไม่พบการตั้งค่าที่ %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -70,38 +75,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 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 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -112,7 +121,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -122,11 +131,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -136,72 +145,72 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" +msgid "Please set the $EDITOR or $VISUAL environment variable" msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "" diff --git a/home-manager/po/tr.po b/home-manager/po/tr.po index ef686c7e48e7..66c89e608f9a 100644 --- a/home-manager/po/tr.po +++ b/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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-10-19 04:00+0000\n" -"Last-Translator: Emre Çebi \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-19 17:07+0000\n" +"Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish \n" "Language: tr\n" @@ -17,16 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.1\n" +"X-Generator: Weblate 5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: %s için argüman eksik" + +#: home-manager/home-manager:64 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:98 home-manager/home-manager:102 -#: home-manager/home-manager:192 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,24 +39,26 @@ msgstr "" "Home Managerı %s de tutmak artık desteklenmemektedir,\n" "lütfen % e taşıyın" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 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:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" +"Yedek Ana Dizin Yöneticisi yolu %s kullanımdan kaldırıldı ve orada bir dosya/" +"dizin bulundu." #. 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 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -71,39 +78,61 @@ msgid "" "\n" " $ rm -r \"%s\"" msgstr "" +"Bu uyarıyı kaldırmak için aşağıdakilerden birini yapın.\n" +"\n" +"1. Ev Dizin Yöneticisi'ne yolu kullanmasını açıkça söyleyin, örneğin\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" şeklinde yapılandırmanıza ekleyebilirsiniz.\n" +"\n" +" Ev Dizin Yöneticisi'ne doğrudan içe aktarırsanız, Ev Dizin Yöneticisi " +"paketini çağırırken\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" şeklinde `path` parametresini kullanabilirsiniz.\n" +"\n" +"2. Kullanımdan kaldırılan yolu kaldırın.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix denetleniyor" -#: home-manager/home-manager:174 +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Flake yapılandırmasının ayarları incelenemiyor" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: Bilinmeyen komut '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Yardım için '%s --help'" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "%s dosyası zaten var, değişiklik yapılmıyor..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Oluşturuluyor %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 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:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -120,7 +149,7 @@ msgstr "" "'man home-configuration.nix'." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -136,11 +165,11 @@ msgstr "" "adresinden bildirin." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Flake yapılandırması örneklendirilemiyor" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -154,72 +183,72 @@ msgstr[1] "" "%d tane okunmamış ilgili haberler bulunmakta.\n" "Okumak için \"%s news\" komutunu kullanın." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Bilinmeyen \"news.display\" seçeneği \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Lütfen $EDITOR ortam değişkenini tanımlayın" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Lütfen $EDITOR veya $VISUAL ortam değişkenini ayarlayın" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Sadece okuma izni olan bir dizinde inşa çalıştırılamaz" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "%s ID'sine sahip nesil bulunamadı" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Kullanımda olan %s inşası silinemez" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "İnşa siliniyor %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Süresi dolacak inşa yok" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Galiba home-manager paketi kurulu değil." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Bilinmeyen argüman %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Bu, sisteminizden Home Manager'ı kaldıracak." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 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:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Home Manager'ı silmek istediğinize emin misiniz?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Boş Home Manager yapılandırmasına geçiliyor..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Güzel!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 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:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations bir argüman istiyor, %d tane girildi." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Bilinmeyen komut: %s" @@ -228,6 +257,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Bu türetim inşa edilebilir değil, lütfen onu nix-shell kullanarak çalıştırın." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Lütfen $EDITOR ortam değişkenini tanımlayın" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "İlk Home Manager yapılandırması oluşturuluyor..." diff --git a/home-manager/po/uk.po b/home-manager/po/uk.po index fd3d88a9767a..9e6fc3997f87 100644 --- a/home-manager/po/uk.po +++ b/home-manager/po/uk.po @@ -7,27 +7,32 @@ 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-07-17 10:03+0000\n" -"Last-Translator: Dan \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-11-18 15:00+0000\n" +"Last-Translator: wadsaek \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 5.0-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.9-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: відсутній аргумент для %s" + +#: home-manager/home-manager:64 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -35,16 +40,16 @@ msgstr "" "Збереження вашого Home Manager %s у %s є застарілим,\n" "будь ласка, перемістіть його до %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "Файл конфігурації не знайдено. Будь ласка, створіть його в %s" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 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:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." @@ -52,7 +57,7 @@ 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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -91,38 +96,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Перевірка адекватності Nix" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "Неможливо перевірити параметри flake-конфігурації" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s: невідомий параметр '%s'" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "Запустіть '%s --help' для отримання довідки про використання" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "Файл %s вже існує, залишаючи його незмінним..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "Створення %s..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "Створення початкової генерації Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -140,7 +149,7 @@ msgstr "" "переглянути всі доступні варіанти." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -155,11 +164,11 @@ msgstr "" "якщо здається, що помилка сталася через Home Manager." #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "Не вдається створити екземпляр flake-конфігурації" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -176,72 +185,72 @@ msgstr[2] "" "Є %d непрочитаних і ревалентних новин.\n" "Прочитайте їх, виконавши команду \"%s news\"." -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "Невідоме налаштування \"news.display\" \"%s\"." -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Будь ласка, встановіть змінну середовища $EDITOR" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Будь ласка, встановіть змінну оточення $EDITOR або $VISUAL" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "Неможливо запустити збірку в каталозі, доступному лише для читання" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "Немає генерації з ID %s" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "Не вдається видалити поточну генерацію %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "Видалення генерації %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "Немає генерацій, термін дії яких закінчується" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "Здається, не встановлено жодних пакунків home-manager." -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "Невідомий аргумент %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "Це призведе до видалення Home Manager з вашої системи." -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "Це пробний запуск, насправді нічого не буде видалено." -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "Дійсно видаліть Home Manager?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "Перехід до порожньої конфігурації Home Manager..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "Ура!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager буде видалено, але ваш home.nix залишиться недоторканим." -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generation очікує один аргумент, отримав %d." -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "Невідома команда: %s" @@ -250,6 +259,10 @@ msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Цю похідну не можна зібрати, будь ласка, запустіть її за допомогою nix-shell." +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "Будь ласка, встановіть змінну середовища $EDITOR" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "На жаль, ця команда ще не підтримується в налаштуваннях flake" diff --git a/home-manager/po/vi.po b/home-manager/po/vi.po new file mode 100644 index 000000000000..749de0218673 --- /dev/null +++ b/home-manager/po/vi.po @@ -0,0 +1,254 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-08-01 04:09+0000\n" +"Last-Translator: goatastronaut0212 \n" +"Language-Team: Vietnamese \n" +"Language: vi\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.7-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: bị thiếu đối số cho %s" + +#: home-manager/home-manager:64 +msgid "No configuration file found at %s" +msgstr "Không tìm thấy tập tin cấu hình tại %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Giữ Home Manager của bạn %s ở %s đã không còn phù hợp,\n" +"hãy chuyển nó tới %s" + +#: home-manager/home-manager:92 +msgid "No configuration file found. Please create one at %s" +msgstr "Không tìm thấy tệp cấu hình. Vui lòng tạo một cái tại %s" + +#: home-manager/home-manager:107 +msgid "Home Manager not found at %s." +msgstr "Không tìm thấy 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:115 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Đường dẫn Home Manager dự phòng %s không được dùng nữa và một tệp/thư mục đã " +"đuợc tìm thấy ở đó." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:118 +msgid "" +"To remove this warning, do one of the following.\n" +"\n" +"1. Explicitly tell Home Manager to use the path, for example by adding\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" to your configuration.\n" +"\n" +" If you import Home Manager directly, you can use the `path` parameter\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" when calling the Home Manager package.\n" +"\n" +"2. Remove the deprecated path.\n" +"\n" +" $ rm -r \"%s\"" +msgstr "" +"Để tắt cảnh báo này, hãy thực hiện một trong các thao tác sau.\n" +"\n" +"1. Chỉ định Home Manager sử dụng đường dẫn, ví dụ bằng cách thêm\n" +"\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +" vào cấu hình của bạn.\n" +"\n" +"Nếu bạn nhập trực tiếp Home Manager, bạn có thể sử dụng tham số `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" khi gọi gói Home Manager.\n" +"\n" +"2. Xóa đường dẫn không được dùng nữa.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Kiểm tra hợp lệ của Nix" + +#: home-manager/home-manager:166 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Không thể tìm thấy thư mục hồ sơ phù hợp, đã thử %s và %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:221 +msgid "Can't inspect options of a flake configuration" +msgstr "Không thể kiểm tra tùy chọn của cấu hình flake" + +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 +msgid "%s: unknown option '%s'" +msgstr "%s: tùy chọn không xác định '%s'" + +#: home-manager/home-manager:301 home-manager/home-manager:1052 +msgid "Run '%s --help' for usage help" +msgstr "Chạy '%s --help' để được trợ giúp sử dụng" + +#: home-manager/home-manager:327 home-manager/home-manager:431 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Tệp %s đã tồn tại, để nguyên nó không thay đổi..." + +#: home-manager/home-manager:329 home-manager/home-manager:433 +msgid "Creating %s..." +msgstr "Đang tạo %s..." + +#: home-manager/home-manager:475 +msgid "Creating initial Home Manager generation..." +msgstr "Khởi tạo thế hệ Home Manager ban đầu..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:480 +msgid "" +"All done! The home-manager tool should now be installed and you can edit\n" +"\n" +" %s\n" +"\n" +"to configure Home Manager. Run 'man home-configuration.nix' to\n" +"see all available options." +msgstr "" +"Đã hoàn thành! Công cụ home-manager giờ đạ được cài đặt và bạn có thể chỉnh " +"sửa\n" +"\n" +" %s\n" +"\n" +"để cấu hình Home Manager. Chạy lệnh 'man home-configuration.nix' để\n" +"xem toàn bộ tùy chọn có sẵn." + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:485 +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 "" +"Quá trình cài đặt đã thất bại! Vui lòng tạo 1 báo cáo lỗi tại\n" +"\n" +" %s\n" +"\n" +"nếu như lỗi đó thuộc về Home Manager." + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:496 +msgid "Can't instantiate a flake configuration" +msgstr "Không thể khởi tạo cấu hình flake" + +#: home-manager/home-manager:572 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"Có %d tin tức liên quan và chưa được đọc.\n" +"Để đọc nó hãy chạy lệnh \"%s news\"." + +#: home-manager/home-manager:586 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Không tồn tại \"news.display\" cấu hình \"%s\"." + +#: home-manager/home-manager:594 +#, sh-format +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "Vui lòng đặt biến môi trường $EDITOR hoặc $VISUAL" + +#: home-manager/home-manager:612 +msgid "Cannot run build in read-only directory" +msgstr "Không thể chạy lệnh xây dựng trong thư mục chỉ cho phép đọc" + +#: home-manager/home-manager:693 +msgid "No generation with ID %s" +msgstr "Không có thế hệ với ID %s" + +#: home-manager/home-manager:695 +msgid "Cannot remove the current generation %s" +msgstr "Không thể xóa thể hệ hiện tại %s" + +#: home-manager/home-manager:697 +msgid "Removing generation %s" +msgstr "Đang xóa thế hệ %s" + +#: home-manager/home-manager:718 +msgid "No generations to expire" +msgstr "Không có bất kỳ thế hệ nào hết hạn" + +#: home-manager/home-manager:729 +msgid "No home-manager packages seem to be installed." +msgstr "Không có bất kỳ gói home-manager nào được cài đặt." + +#: home-manager/home-manager:811 +msgid "Unknown argument %s" +msgstr "Không tồn tại đối số %s" + +#: home-manager/home-manager:835 +msgid "This will remove Home Manager from your system." +msgstr "Việc này sẽ xóa Home Manager khỏi hệ thống của bạn." + +#: home-manager/home-manager:838 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Đây là chạy thử nghiệm, sẽ không có bất cư thứ gì được gỡ cài đặt." + +#: home-manager/home-manager:842 +msgid "Really uninstall Home Manager?" +msgstr "Bạn có muốn gỡ Home Manager không?" + +#: home-manager/home-manager:848 +msgid "Switching to empty Home Manager configuration..." +msgstr "Chuyển đổi sang cấu hình Home Manager trống..." + +#: home-manager/home-manager:863 +msgid "Yay!" +msgstr "Tuyệt vời!" + +#: home-manager/home-manager:868 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" +"Home Manager đã được gỡ cài đặt nhưng home.nix của bạn sẽ được giữ nguyên " +"vẹn." + +#: home-manager/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations kỳ vọng 1 đối số, có %d." + +#: home-manager/home-manager:1113 +msgid "Unknown command: %s" +msgstr "Không tồn tại câu lệnh: %s" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" diff --git a/home-manager/po/zh_Hans.po b/home-manager/po/zh_Hans.po index 8aaee206cda3..6e773fcab694 100644 --- a/home-manager/po/zh_Hans.po +++ b/home-manager/po/zh_Hans.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-07-31 21:25+0000\n" -"Last-Translator: Vollow \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-13 10:00+0000\n" +"Last-Translator: Zexin Yuan \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_Hans\n" @@ -17,16 +17,21 @@ 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.5.5-dev\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s:缺少参数 %s" + +#: home-manager/home-manager:64 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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" @@ -34,23 +39,23 @@ msgstr "" "需要确保 Home Manager 在 %s 中,%s 已废弃。\n" "请手动移动到 %s" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "未找到配置文件。请在 %s 处创建一份" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "未在 %s 找到 Home Manager。" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 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:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -87,38 +92,42 @@ msgstr "" "\n" " $ rm -r \"%s\"" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "正在进行 Nix 完整性检查" + +#: home-manager/home-manager:166 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:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "无法检查 flake 配置中的选项" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s:未知选项 ‘%s’" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "运行 ‘%s --help’ 获取用法帮助" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "文件 %s 已存在,未对其更改 ..." -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "正在创建 %s ..." -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "正在创建 Home Manager 初始化配置生成 ..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -135,7 +144,7 @@ msgstr "" "来查看所有可用选项。" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -150,11 +159,11 @@ msgstr "" "处创建 Issue 告知我们。" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "无法创建 flake 配置实例" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -165,72 +174,72 @@ msgstr[0] "" "有 %d 条未读的相关新闻或消息。\n" "可运行 “%s news” 命令进行阅读。" -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "未知的 “news.display” 设置项 “%s”。" -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "请设定 $EDITOR 环境变量" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "请设置 $EDITOR 或 $VISUAL 环境变量" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "无法在只读目录中运行构建" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "没有 ID 为 %s 的生成结果" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "无法移除当前生成结果 %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "正在移除生成结果 %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "没有即将过期的生成结果" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "似乎没有安装 home-manager 软件包。" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "未知参数 %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "这将会从系统中移除 Home Manager。" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "这是试运行结果,没有实际卸载任何软件包。" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "确定要卸载 Home Manager 吗?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "正在切换至空的 Home Manager 配置 ..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "好耶!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager 已卸载,但未改动您的 home.nix 配置文件。" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations 须要一个参数,但获取到了 %d 个。" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "未知命令:%s" @@ -238,6 +247,10 @@ msgstr "未知命令:%s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "此配置文件/变体不可构建,请使用 nix-shell 运行它。" +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "请设定 $EDITOR 环境变量" + #~ msgid "Sorry, this command is not yet supported in flake setup" #~ msgstr "抱歉,当前命令暂不支持在 flake 配置中使用" diff --git a/home-manager/po/zh_Hant.po b/home-manager/po/zh_Hant.po index 6562e19569d7..c3b9336d7563 100644 --- a/home-manager/po/zh_Hant.po +++ b/home-manager/po/zh_Hant.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2021-12-29 08:48+0000\n" -"Last-Translator: WhiredPlanck \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \n" "Language-Team: Chinese (Traditional) \n" "Language: zh_Hant\n" @@ -17,38 +17,43 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.10.1\n" +"X-Generator: Weblate 5.4\n" -#: home-manager/home-manager:81 +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "" + +#: home-manager/home-manager:64 msgid "No configuration file found at %s" msgstr "未在 %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 +#: home-manager/home-manager:81 home-manager/home-manager:85 +#: home-manager/home-manager:184 msgid "" "Keeping your Home Manager %s in %s is deprecated,\n" "please move it to %s" msgstr "" -#: home-manager/home-manager:109 +#: home-manager/home-manager:92 msgid "No configuration file found. Please create one at %s" msgstr "未找到配置檔案。請在 %s 處建立一份" -#: home-manager/home-manager:124 +#: home-manager/home-manager:107 msgid "Home Manager not found at %s." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:132 +#: home-manager/home-manager:115 msgid "" "The fallback Home Manager path %s has been deprecated and a file/directory " "was found there." msgstr "" #. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. -#: home-manager/home-manager:135 +#: home-manager/home-manager:118 msgid "" "To remove this warning, do one of the following.\n" "\n" @@ -69,38 +74,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: home-manager/home-manager:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "正在進行 Nix 完整性檢查" + +#: home-manager/home-manager:166 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:229 +#: home-manager/home-manager:221 msgid "Can't inspect options of a flake configuration" msgstr "無法檢查 flake 配置中的選項" -#: home-manager/home-manager:291 home-manager/home-manager:314 -#: home-manager/home-manager:1034 +#: home-manager/home-manager:296 home-manager/home-manager:319 +#: home-manager/home-manager:1051 msgid "%s: unknown option '%s'" msgstr "%s:未知選項 ‘%s’" -#: home-manager/home-manager:296 home-manager/home-manager:1035 +#: home-manager/home-manager:301 home-manager/home-manager:1052 msgid "Run '%s --help' for usage help" msgstr "執行 ‘%s --help’ 獲取用法幫助" -#: home-manager/home-manager:322 home-manager/home-manager:421 +#: home-manager/home-manager:327 home-manager/home-manager:431 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:324 home-manager/home-manager:423 +#: home-manager/home-manager:329 home-manager/home-manager:433 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:465 +#: home-manager/home-manager:475 msgid "Creating initial Home Manager generation..." msgstr "正在建立初始 Home Manager 世代 ..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:470 +#: home-manager/home-manager:480 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -117,7 +126,7 @@ msgstr "" "來檢視所有可用選項。" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:475 +#: home-manager/home-manager:485 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -132,11 +141,11 @@ msgstr "" "處建立 Issue 告知我們。" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:486 +#: home-manager/home-manager:496 msgid "Can't instantiate a flake configuration" msgstr "無法建立 flake 配置例項" -#: home-manager/home-manager:562 +#: home-manager/home-manager:572 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -147,72 +156,72 @@ msgstr[0] "" "有 %d 條未讀的相關新聞或訊息。\n" "可執行 “%s news” 命令進行閱讀。" -#: home-manager/home-manager:576 +#: home-manager/home-manager:586 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "未知的 “news.display” 設定項 “%s”。" -#: home-manager/home-manager:583 +#: home-manager/home-manager:594 #, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "請設定 $EDITOR 環境變數" +msgid "Please set the $EDITOR or $VISUAL environment variable" +msgstr "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 msgid "Cannot run build in read-only directory" msgstr "無法在只讀目錄中執行構建" -#: home-manager/home-manager:676 +#: home-manager/home-manager:693 msgid "No generation with ID %s" msgstr "沒有 ID 為 %s 的世代" -#: home-manager/home-manager:678 +#: home-manager/home-manager:695 msgid "Cannot remove the current generation %s" msgstr "無法移除當前世代 %s" -#: home-manager/home-manager:680 +#: home-manager/home-manager:697 msgid "Removing generation %s" msgstr "正在移除世代 %s" -#: home-manager/home-manager:699 +#: home-manager/home-manager:718 msgid "No generations to expire" msgstr "沒有即將過期的世代" -#: home-manager/home-manager:710 +#: home-manager/home-manager:729 msgid "No home-manager packages seem to be installed." msgstr "似乎沒有安裝 home-manager 軟體包。" -#: home-manager/home-manager:792 +#: home-manager/home-manager:811 msgid "Unknown argument %s" msgstr "未知引數 %s" -#: home-manager/home-manager:816 +#: home-manager/home-manager:835 msgid "This will remove Home Manager from your system." msgstr "這將會從系統中移除 Home Manager。" -#: home-manager/home-manager:819 +#: home-manager/home-manager:838 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "這是試執行結果,沒有實際解除安裝任何軟體包。" -#: home-manager/home-manager:823 +#: home-manager/home-manager:842 msgid "Really uninstall Home Manager?" msgstr "確定要解除安裝 Home Manager 嗎?" -#: home-manager/home-manager:829 +#: home-manager/home-manager:848 msgid "Switching to empty Home Manager configuration..." msgstr "正在切換至空的 Home Manager 配置 ..." -#: home-manager/home-manager:857 +#: home-manager/home-manager:863 msgid "Yay!" msgstr "好耶!" -#: home-manager/home-manager:862 +#: home-manager/home-manager:868 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "Home Manager 已解除安裝,但未改動您的 home.nix 配置檔案。" -#: home-manager/home-manager:1074 +#: home-manager/home-manager:1091 msgid "expire-generations expects one argument, got %d." msgstr "expire-generations 須要一個引數,但獲取到了 %d 個。" -#: home-manager/home-manager:1096 +#: home-manager/home-manager:1113 msgid "Unknown command: %s" msgstr "未知命令:%s" @@ -220,6 +229,10 @@ msgstr "未知命令:%s" msgid "This derivation is not buildable, please run it using nix-shell." msgstr "此配置檔案/變體不可構建,請在 nix-shell 中執行它。" +#, sh-format +#~ msgid "Please set the $EDITOR environment variable" +#~ msgstr "請設定 $EDITOR 環境變數" + #~ msgid "Creating initial Home Manager configuration..." #~ msgstr "正在建立初始 Home Manager 配置 ..." diff --git a/lib/bash/home-manager.sh b/lib/bash/home-manager.sh index b7f3f42b2817..2b9c2d01e684 100644 --- a/lib/bash/home-manager.sh +++ b/lib/bash/home-manager.sh @@ -48,6 +48,12 @@ function noteEcho() { echo "${noteColor}$*${normalColor}" } +function verboseEcho() { + if [[ -v VERBOSE ]]; then + echo "$*" + fi +} + function _i() { local msgid="$1" shift @@ -83,3 +89,39 @@ function _iNote() { _i "$@" echo -n "${normalColor}" } + +function _iVerbose() { + if [[ -v VERBOSE ]]; then + _i "$@" + fi +} + +# Runs the given command on live run, otherwise prints the command to standard +# output. +# +# If given the command line option `--quiet`, then the command's standard output +# is sent to `/dev/null` on a live run. +# +# If given the command line option `--silence`, then the command's standard and +# error output is sent to `/dev/null` on a live run. +# +# The `--silence` and `--quiet` flags are mutually exclusive. +function run() { + if [[ $1 == '--quiet' ]]; then + local quiet=1 + shift + elif [[ $1 == '--silence' ]]; then + local silence=1 + shift + fi + + if [[ -v DRY_RUN ]] ; then + echo "$@" + elif [[ -v quiet ]] ; then + "$@" > /dev/null + elif [[ -v silence ]] ; then + "$@" > /dev/null 2>&1 + else + "$@" + fi +} diff --git a/modules/accounts/calendar.nix b/modules/accounts/calendar.nix index e96f2f2dd73f..86f1b38c5dde 100644 --- a/modules/accounts/calendar.nix +++ b/modules/accounts/calendar.nix @@ -12,18 +12,20 @@ let path = mkOption { type = types.str; default = "${cfg.basePath}/${name}"; - defaultText = "‹accounts.calendar.basePath›/‹name›"; + defaultText = + lib.literalExpression "‹accounts.calendar.basePath›/‹name›"; description = "The path of the storage."; }; type = mkOption { type = types.enum [ "filesystem" "singlefile" ]; + default = "filesystem"; description = "The type of the storage."; }; fileExt = mkOption { type = types.nullOr types.str; - default = null; + default = ".ics"; description = "The file extension to use."; }; @@ -57,15 +59,6 @@ let description = "User name for authentication."; }; - # userNameCommand = mkOption { - # type = types.nullOr (types.listOf types.str); - # default = null; - # example = [ "~/get-username.sh" ]; - # description = '' - # A command that prints the user name to standard output. - # ''; - # }; - passwordCommand = mkOption { type = types.nullOr (types.listOf types.str); default = null; @@ -98,7 +91,8 @@ let }; primaryCollection = mkOption { - type = types.str; + type = types.nullOr types.str; + default = null; description = '' The primary collection of the account. Required when an account has multiple collections. @@ -106,8 +100,8 @@ let }; local = mkOption { - type = types.nullOr (localModule name); - default = null; + type = localModule name; + default = { }; description = '' Local configuration for the calendar. ''; @@ -129,6 +123,7 @@ in { options.accounts.calendar = { basePath = mkOption { type = types.str; + example = ".calendar"; apply = p: if hasPrefix "/" p then p else "${config.home.homeDirectory}/${p}"; description = '' diff --git a/modules/accounts/contacts.nix b/modules/accounts/contacts.nix index 83f57d8e24ae..d00f5d0711bf 100644 --- a/modules/accounts/contacts.nix +++ b/modules/accounts/contacts.nix @@ -12,7 +12,8 @@ let path = mkOption { type = types.str; default = "${cfg.basePath}/${name}"; - defaultText = "‹accounts.contact.basePath›/‹name›"; + defaultText = + lib.literalExpression "‹accounts.contact.basePath›/‹name›"; description = "The path of the storage."; }; @@ -126,6 +127,7 @@ in { contactOpts (import ../programs/vdirsyncer-accounts.nix) (import ../programs/khal-accounts.nix) + (import ../programs/khal-contact-accounts.nix) ]); default = { }; description = "List of contacts."; diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index 8657c4cbd310..f3996195d2dc 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -493,13 +493,14 @@ in { maildirBasePath = mkOption { type = types.str; default = "${config.home.homeDirectory}/Maildir"; - defaultText = "$HOME/Maildir"; + defaultText = "Maildir"; apply = p: if hasPrefix "/" p then p else "${config.home.homeDirectory}/${p}"; description = '' The base directory for account maildir directories. May be a - relative path, in which case it is relative the home - directory. + relative path (e.g. the user setting this value as "MyMaildir"), + in which case it is relative the home directory (e.g. resulting + in "~/MyMaildir"). ''; }; diff --git a/modules/config/home-cursor.nix b/modules/config/home-cursor.nix index c696908d553b..42c259455a19 100644 --- a/modules/config/home-cursor.nix +++ b/modules/config/home-cursor.nix @@ -45,6 +45,17 @@ let gtk config generation for {option}`home.pointerCursor` ''; }; + + hyprcursor = { + enable = mkEnableOption "hyprcursor config generation"; + + size = mkOption { + type = types.nullOr types.int; + example = 32; + default = null; + description = "The cursor size for hyprcursor."; + }; + }; }; }; @@ -67,7 +78,7 @@ let }; in { - meta.maintainers = [ maintainers.polykernel maintainers.league ]; + meta.maintainers = [ maintainers.league ]; imports = [ (mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [ @@ -163,7 +174,7 @@ in { } (mkIf cfg.x11.enable { - xsession.initExtra = '' + xsession.profileExtra = '' ${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cursorPath} ${ toString cfg.size } @@ -178,5 +189,13 @@ in { (mkIf cfg.gtk.enable { gtk.cursorTheme = mkDefault { inherit (cfg) package name size; }; }) + + (mkIf cfg.hyprcursor.enable { + home.sessionVariables = { + HYPRCURSOR_THEME = cfg.name; + HYPRCURSOR_SIZE = + if cfg.hyprcursor.size != null then cfg.hyprcursor.size else cfg.size; + }; + }) ]); } diff --git a/modules/default.nix b/modules/default.nix index ba43fec5c2cd..6c54148abd32 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -25,31 +25,38 @@ let rawModule = extendedLib.evalModules { modules = [ configuration ] ++ hmModules; + class = "homeManager"; specialArgs = { modulesPath = builtins.toString ./.; } // extraSpecialArgs; }; - module = showWarnings (let - failed = collectFailed rawModule.config; - failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed); - in if failed == [ ] then - rawModule - else - throw '' + moduleChecks = raw: + showWarnings (let + failed = collectFailed raw.config; + failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed); + in if failed == [ ] then + raw + else + throw '' - Failed assertions: - ${failedStr}''); + Failed assertions: + ${failedStr}''); -in { - inherit (module) options config; + withExtraAttrs = rawModule: + let module = moduleChecks rawModule; + in { + inherit (module) options config; - activationPackage = module.config.home.activationPackage; + activationPackage = module.config.home.activationPackage; - # For backwards compatibility. Please use activationPackage instead. - activation-script = module.config.home.activationPackage; + # For backwards compatibility. Please use activationPackage instead. + activation-script = module.config.home.activationPackage; - newsDisplay = rawModule.config.news.display; - newsEntries = sort (a: b: a.time > b.time) - (filter (a: a.condition) rawModule.config.news.entries); + newsDisplay = rawModule.config.news.display; + newsEntries = sort (a: b: a.time > b.time) + (filter (a: a.condition) rawModule.config.news.entries); - inherit (module._module.args) pkgs; -} + inherit (module._module.args) pkgs; + + extendModules = args: withExtraAttrs (rawModule.extendModules args); + }; +in withExtraAttrs rawModule diff --git a/modules/files.nix b/modules/files.nix index c869df1d8617..59e9c25783c7 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -79,59 +79,14 @@ in (mapAttrsToList (n: v: v.target) (filterAttrs (n: v: v.force) cfg)); - check = pkgs.writeText "check" '' - ${config.lib.bash.initHomeManagerLib} - - # A symbolic link whose target path matches this pattern will be - # considered part of a Home Manager generation. - homeFilePattern="$(readlink -e ${escapeShellArg builtins.storeDir})/*-home-manager-files/*" - - forcedPaths=(${forcedPaths}) - - newGenFiles="$1" - shift - for sourcePath in "$@" ; do - relativePath="''${sourcePath#$newGenFiles/}" - targetPath="$HOME/$relativePath" + storeDir = escapeShellArg builtins.storeDir; - forced="" - for forcedPath in "''${forcedPaths[@]}"; do - if [[ $targetPath == $forcedPath* ]]; then - forced="yeah" - break - fi - done - - if [[ -n $forced ]]; then - $VERBOSE_ECHO "Skipping collision check for $targetPath" - elif [[ -e "$targetPath" \ - && ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then - # The target file already exists and it isn't a symlink owned by Home Manager. - if cmp -s "$sourcePath" "$targetPath"; then - # First compare the files' content. If they're equal, we're fine. - warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be skipped since they are the same" - elif [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then - # Next, try to move the file to a backup location if configured and possible - backup="$targetPath.$HOME_MANAGER_BACKUP_EXT" - if [[ -e "$backup" ]]; then - errorEcho "Existing file '$backup' would be clobbered by backing up '$targetPath'" - collision=1 - else - warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be moved to '$backup'" - fi - else - # Fail if nothing else works - errorEcho "Existing file '$targetPath' is in the way of '$sourcePath'" - collision=1 - fi - fi - done + check = pkgs.substituteAll { + src = ./files/check-link-targets.sh; - if [[ -v collision ]] ; then - errorEcho "Please move the above files and try again or use 'home-manager switch -b backup' to back up existing files automatically." - exit 1 - fi - ''; + inherit (config.lib.bash) initHomeManagerLib; + inherit forcedPaths storeDir; + }; in '' function checkNewGenCollision() { @@ -169,6 +124,8 @@ in home.activation.linkGeneration = hm.dag.entryAfter ["writeBoundary"] ( let link = pkgs.writeShellScript "link" '' + ${config.lib.bash.initHomeManagerLib} + newGenFiles="$1" shift for sourcePath in "$@" ; do @@ -177,17 +134,17 @@ in if [[ -e "$targetPath" && ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then # The target exists, back it up backup="$targetPath.$HOME_MANAGER_BACKUP_EXT" - $DRY_RUN_CMD mv $VERBOSE_ARG "$targetPath" "$backup" || errorEcho "Moving '$targetPath' failed!" + run mv $VERBOSE_ARG "$targetPath" "$backup" || errorEcho "Moving '$targetPath' failed!" fi if [[ -e "$targetPath" && ! -L "$targetPath" ]] && cmp -s "$sourcePath" "$targetPath" ; then # The target exists but is identical – don't do anything. - $VERBOSE_ECHO "Skipping '$targetPath' as it is identical to '$sourcePath'" + verboseEcho "Skipping '$targetPath' as it is identical to '$sourcePath'" else # Place that symlink, --force # This can still fail if the target is a directory, in which case we bail out. - $DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")" - $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1 + run mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")" + run ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1 fi done ''; @@ -204,12 +161,12 @@ in for relativePath in "$@" ; do targetPath="$HOME/$relativePath" if [[ -e "$newGenFiles/$relativePath" ]] ; then - $VERBOSE_ECHO "Checking $targetPath: exists" + verboseEcho "Checking $targetPath: exists" elif [[ ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then warnEcho "Path '$targetPath' does not link into a Home Manager generation. Skipping delete." else - $VERBOSE_ECHO "Checking $targetPath: gone (deleting)" - $DRY_RUN_CMD rm $VERBOSE_ARG "$targetPath" + verboseEcho "Checking $targetPath: gone (deleting)" + run rm $VERBOSE_ARG "$targetPath" # Recursively delete empty parent directories. targetDir="$(dirname "$relativePath")" @@ -219,7 +176,7 @@ in # Call rmdir with a relative path excluding $HOME. # Otherwise, it might try to delete $HOME and exit # with a permission error. - $DRY_RUN_CMD rmdir $VERBOSE_ARG \ + run rmdir $VERBOSE_ARG \ -p --ignore-fail-on-non-empty \ "$targetDir" @@ -266,15 +223,15 @@ in # `nix profile remove '.*' --profile "$genProfilePath"` was not working, so here is a workaround: nix profile list --profile "$genProfilePath" \ | cut -d ' ' -f 4 \ - | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG --profile "$genProfilePath" - $DRY_RUN_CMD nix profile install $VERBOSE_ARG --profile "$genProfilePath" "$newGenPath" + | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG --profile "$genProfilePath" + run nix profile install $VERBOSE_ARG --profile "$genProfilePath" "$newGenPath" else - $DRY_RUN_CMD nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath" + run nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath" fi - $DRY_RUN_CMD nix-store --realise "$newGenPath" --add-root "$newGenGcPath" > "$DRY_RUN_NULL" + run --quiet nix-store --realise "$newGenPath" --add-root "$newGenGcPath" --indirect if [[ -e "$legacyGenGcPath" ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG "$legacyGenGcPath" + run rm $VERBOSE_ARG "$legacyGenGcPath" fi else _i "No change so reusing latest profile generation %s" "$oldGenNum" diff --git a/modules/files/check-link-targets.sh b/modules/files/check-link-targets.sh new file mode 100644 index 000000000000..215ff6c3703b --- /dev/null +++ b/modules/files/check-link-targets.sh @@ -0,0 +1,59 @@ +# -*- mode: sh; sh-shell: bash -*- + +@initHomeManagerLib@ + +# A symbolic link whose target path matches this pattern will be +# considered part of a Home Manager generation. +homeFilePattern="$(readlink -e @storeDir@)/*-home-manager-files/*" + +forcedPaths=(@forcedPaths@) + +newGenFiles="$1" +shift +for sourcePath in "$@" ; do + relativePath="${sourcePath#$newGenFiles/}" + targetPath="$HOME/$relativePath" + + forced="" + for forcedPath in "${forcedPaths[@]}"; do + if [[ $targetPath == $forcedPath* ]]; then + forced="yeah" + break + fi + done + + if [[ -n $forced ]]; then + verboseEcho "Skipping collision check for $targetPath" + elif [[ -e "$targetPath" \ + && ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then + # The target file already exists and it isn't a symlink owned by Home Manager. + if cmp -s "$sourcePath" "$targetPath"; then + # First compare the files' content. If they're equal, we're fine. + warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be skipped since they are the same" + elif [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then + # Next, try to move the file to a backup location if configured and possible + backup="$targetPath.$HOME_MANAGER_BACKUP_EXT" + if [[ -e "$backup" ]]; then + errorEcho "Existing file '$backup' would be clobbered by backing up '$targetPath'" + collision=1 + else + warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be moved to '$backup'" + fi + else + # Fail if nothing else works + errorEcho "Existing file '$targetPath' is in the way of '$sourcePath'" + collision=1 + fi + fi +done + +if [[ -v collision ]] ; then + errorEcho "Please do one of the following: +- Move or remove the above files and try again. +- In standalone mode, use 'home-manager switch -b backup' to back up + files automatically. +- When used as a NixOS or nix-darwin module, set + 'home-manager.backupFileExtension' + to, for example, 'backup' and rebuild." + exit 1 +fi diff --git a/modules/home-environment.nix b/modules/home-environment.nix index d28f8c45e7e7..810b4d325930 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -280,8 +280,9 @@ in }; ``` may not work as expected. If you need to reference another - session variable, then do so inside Nix instead. The above - example then becomes + session variable (even if it is declared by using other options + like [](#opt-xdg.configHome)), then do so inside Nix instead. + The above example then becomes ```nix home.sessionVariables = { FOO = "Hello"; @@ -374,7 +375,7 @@ in example = literalExpression '' { myActivationAction = lib.hm.dag.entryAfter ["writeBoundary"] ''' - $DRY_RUN_CMD ln -s $VERBOSE_ARG \ + run ln -s $VERBOSE_ARG \ ''${builtins.toPath ./link-me-directly} $HOME '''; } @@ -396,18 +397,32 @@ in collisions between non-managed files and files defined in [](#opt-home.file). - A script block should respect the {var}`DRY_RUN` - variable, if it is set then the actions taken by the script - should be logged to standard out and not actually performed. - The variable {var}`DRY_RUN_CMD` is set to - {command}`echo` if dry run is enabled. - - A script block should also respect the - {var}`VERBOSE` variable, and if set print - information on standard out that may be useful for debugging - any issue that may arise. The variable - {var}`VERBOSE_ARG` is set to - {option}`--verbose` if verbose output is enabled. + A script block should respect the {var}`DRY_RUN` variable. If it is set + then the actions taken by the script should be logged to standard out + and not actually performed. A convenient shell function {command}`run` + is provided for activation script blocks. It is used as follows: + + {command}`run {command}` + : Runs the given command on live run, otherwise prints the command to + standard output. + + {command}`run --quiet {command}` + : Runs the given command on live run and sends its standard output to + {file}`/dev/null`, otherwise prints the command to standard output. + + {command}`run --silence {command}` + : Runs the given command on live run and sends its standard and error + output to {file}`/dev/null`, otherwise prints the command to standard + output. + + The `--quiet` and `--silence` flags are mutually exclusive. + + A script block should also respect the {var}`VERBOSE` variable, and if + set print information on standard out that may be useful for debugging + any issue that may arise. The variable {var}`VERBOSE_ARG` is set to + {option}`--verbose` if verbose output is enabled. You can also use the + provided shell function {command}`verboseEcho`, which acts as + {command}`echo` when verbose output is enabled. ''; }; @@ -463,6 +478,12 @@ in will be printed when the user configuration is being built. ''; }; + + home.preferXdgDirectories = mkEnableOption "" // { + description = '' + Whether to make programs use XDG directories whenever supported. + ''; + }; }; config = { @@ -598,7 +619,7 @@ in nixProfileRemove 'home-manager-path' - $DRY_RUN_CMD $oldNix profile install $1 + run $oldNix profile install $1 } if [[ ${if config.home.forceNixProfiles then "true" else "false"} = true || -e ${cfg.profileDirectory}/manifest.json ]] ; then @@ -608,7 +629,7 @@ in REMOVE_CMD_SYNTAX='nix profile remove {number | store path}' else INSTALL_CMD="nix-env -i" - INSTALL_CMD_ACTUAL="$DRY_RUN_CMD nix-env -i" + INSTALL_CMD_ACTUAL="run nix-env -i" LIST_CMD="nix-env -q" REMOVE_CMD_SYNTAX='nix-env -e {package name}' fi diff --git a/modules/i18n/input-method/fcitx5.nix b/modules/i18n/input-method/fcitx5.nix index 3599fd2dc840..3c2d1c191be9 100644 --- a/modules/i18n/input-method/fcitx5.nix +++ b/modules/i18n/input-method/fcitx5.nix @@ -5,7 +5,8 @@ with lib; let im = config.i18n.inputMethod; cfg = im.fcitx5; - fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; }; + fcitx5Package = + pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; }; in { options = { i18n.inputMethod.fcitx5 = { diff --git a/modules/i18n/input-method/kime.nix b/modules/i18n/input-method/kime.nix index 5608b54e43ae..0416515f649a 100644 --- a/modules/i18n/input-method/kime.nix +++ b/modules/i18n/input-method/kime.nix @@ -1,30 +1,29 @@ -{ config, pkgs, lib, generators, ... }: -with lib; +{ config, pkgs, lib, ... }: + let + inherit (lib) literalExpression mkIf mkOption mkRemovedOptionModule types; + cfg = config.i18n.inputMethod.kime; - yamlFormat = pkgs.formats.yaml { }; in { + imports = [ + (mkRemovedOptionModule [ "i18n" "inputMethod" "kime" "config" ] '' + Please use 'i18n.inputMethod.kime.extraConfig' instead. + '') + ]; + options = { i18n.inputMethod.kime = { - config = mkOption { - type = yamlFormat.type; - default = { }; + extraConfig = mkOption { + type = types.lines; + default = ""; example = literalExpression '' - { - daemon = { - modules = ["Xim" "Indicator"]; - }; - - indicator = { - icon_color = "White"; - }; - - engine = { - hangul = { - layout = "dubeolsik"; - }; - }; - } + daemon: + modules: [Xim,Indicator] + indicator: + icon_color: White + engine: + hangul: + layout: dubeolsik ''; description = '' kime configuration. Refer to @@ -44,8 +43,7 @@ in { XMODIFIERS = "@im=kime"; }; - xdg.configFile."kime/config.yaml".text = - replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.config); + xdg.configFile."kime/config.yaml".text = cfg.extraConfig; systemd.user.services.kime-daemon = { Unit = { diff --git a/modules/launchd/default.nix b/modules/launchd/default.nix index 90e5360de121..6a9c44efd710 100644 --- a/modules/launchd/default.nix +++ b/modules/launchd/default.nix @@ -162,7 +162,7 @@ in { fi if [[ -f "$dstPath" ]]; then for (( i = 0; i < bootout_retries; i++ )); do - $DRY_RUN_CMD /bin/launchctl bootout "$domain/$agentName" || err=$? + run /bin/launchctl bootout "$domain/$agentName" || err=$? if [[ -v DRY_RUN ]]; then break fi @@ -177,8 +177,8 @@ in { return 1 fi fi - $DRY_RUN_CMD install -Dm444 -T "$srcPath" "$dstPath" - $DRY_RUN_CMD /bin/launchctl bootstrap "$domain" "$dstPath" + run install -Dm444 -T "$srcPath" "$dstPath" + run /bin/launchctl bootstrap "$domain" "$dstPath" done if [[ ! -e "$oldDir" ]]; then @@ -194,7 +194,7 @@ in { continue fi - $DRY_RUN_CMD /bin/launchctl bootout "$domain/$agentName" || : + run /bin/launchctl bootout "$domain/$agentName" || : if [[ ! -e "$dstPath" ]]; then continue fi @@ -202,7 +202,7 @@ in { warnEcho "Skipping deletion of '$dstPath', since its contents have diverged" continue fi - $DRY_RUN_CMD rm -f $VERBOSE_ARG "$dstPath" + run rm -f $VERBOSE_ARG "$dstPath" done } diff --git a/modules/lib-bash/activation-init.sh b/modules/lib-bash/activation-init.sh index 0924c637ec06..91111e5d0d29 100755 --- a/modules/lib-bash/activation-init.sh +++ b/modules/lib-bash/activation-init.sh @@ -80,7 +80,7 @@ function setupVars() { oldGenPath="$(readlink -e "$genProfilePath")" fi - $VERBOSE_RUN _i "Sanity checking oldGenNum and oldGenPath" + _iVerbose "Sanity checking oldGenNum and oldGenPath" if [[ -v oldGenNum && ! -v oldGenPath || ! -v oldGenNum && -v oldGenPath ]]; then _i $'The previous generation number and path are in conflict! These\nmust be either both empty or both set but are now set to\n\n \'%s\' and \'%s\'\n\nIf you don\'t mind losing previous profile generations then\nthe easiest solution is probably to run\n\n rm %s/home-manager*\n rm %s/current-home\n\nand trying home-manager switch again. Good luck!' \ @@ -112,10 +112,10 @@ function nixProfileRemove() { # 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 - nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + nixProfileList "$1" | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG else if nix-env -q | grep -q "^$1$"; then - $DRY_RUN_CMD nix-env -e "$1" > $DRY_RUN_NULL 2>&1 + run --quiet nix-env -e "$1" fi fi } @@ -138,6 +138,8 @@ function checkHomeDirectory() { fi } +# Note, the VERBOSE_ECHO variable is deprecated and should not be used inside +# the Home Manager project. It is provided here for backwards compatibility. if [[ -v VERBOSE ]]; then export VERBOSE_ECHO=echo export VERBOSE_ARG="--verbose" @@ -152,8 +154,8 @@ _i "Starting Home Manager activation" # Verify that we can connect to the Nix store and/or daemon. This will # also create the necessary directories in profiles and gcroots. -$VERBOSE_RUN _i "Sanity checking Nix" -nix-build --expr '{}' --no-out-link +_iVerbose "Sanity checking Nix" +nix-build --quiet --expr '{}' --no-out-link # Also make sure that the Nix profiles path is created. nix-env -q > /dev/null 2>&1 || true @@ -161,12 +163,15 @@ nix-env -q > /dev/null 2>&1 || true migrateProfile setupVars +# Note, the DRY_RUN_CMD and DRY_RUN_NULL variables are deprecated and should not +# be used inside the Home Manager project. They are provided here for backwards +# compatibility. if [[ -v DRY_RUN ]] ; then _i "This is a dry run" export DRY_RUN_CMD=echo export DRY_RUN_NULL=/dev/stdout else - $VERBOSE_RUN _i "This is a live run" + _iVerbose "This is a live run" export DRY_RUN_CMD="" export DRY_RUN_NULL=/dev/null fi @@ -175,16 +180,16 @@ if [[ -v VERBOSE ]]; then _i 'Using Nix version: %s' "$(nix-env --version)" fi -$VERBOSE_RUN _i "Activation variables:" +_iVerbose "Activation variables:" if [[ -v oldGenNum ]] ; then - $VERBOSE_ECHO " oldGenNum=$oldGenNum" - $VERBOSE_ECHO " oldGenPath=$oldGenPath" + verboseEcho " oldGenNum=$oldGenNum" + verboseEcho " oldGenPath=$oldGenPath" else - $VERBOSE_ECHO " oldGenNum undefined (first run?)" - $VERBOSE_ECHO " oldGenPath undefined (first run?)" + verboseEcho " oldGenNum undefined (first run?)" + verboseEcho " oldGenPath undefined (first run?)" fi -$VERBOSE_ECHO " newGenPath=$newGenPath" -$VERBOSE_ECHO " newGenNum=$newGenNum" -$VERBOSE_ECHO " genProfilePath=$genProfilePath" -$VERBOSE_ECHO " newGenGcPath=$newGenGcPath" -$VERBOSE_ECHO " legacyGenGcPath=$legacyGenGcPath" +verboseEcho " newGenPath=$newGenPath" +verboseEcho " newGenNum=$newGenNum" +verboseEcho " genProfilePath=$genProfilePath" +verboseEcho " newGenGcPath=$newGenGcPath" +verboseEcho " legacyGenGcPath=$legacyGenGcPath" diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 5d732a83f8d1..8014c625e38f 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -14,4 +14,5 @@ rec { shell = import ./shell.nix { inherit lib; }; zsh = import ./zsh.nix { inherit lib; }; + nushell = import ./nushell.nix { inherit lib; }; } diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix index 3fb51fd56e44..48ff00f1b883 100644 --- a/modules/lib/file-type.nix +++ b/modules/lib/file-type.nix @@ -99,7 +99,6 @@ in { force = mkOption { type = types.bool; default = false; - visible = false; description = '' Whether the target path should be unconditionally replaced by the managed file source. Warning, this will silently diff --git a/modules/lib/generators.nix b/modules/lib/generators.nix index 98a03ba21077..2aebd92c99c7 100644 --- a/modules/lib/generators.nix +++ b/modules/lib/generators.nix @@ -1,6 +1,49 @@ { lib }: { + toHyprconf = { attrs, indentLevel ? 0, importantPrefixes ? [ "$" ], }: + let + inherit (lib) + all concatMapStringsSep concatStrings concatStringsSep filterAttrs foldl + generators hasPrefix isAttrs isList mapAttrsToList replicate; + + initialIndent = concatStrings (replicate indentLevel " "); + + toHyprconf' = indent: attrs: + let + sections = + filterAttrs (n: v: isAttrs v || (isList v && all isAttrs v)) attrs; + + mkSection = n: attrs: + if lib.isList attrs then + (concatMapStringsSep "\n" (a: mkSection n a) attrs) + else '' + ${indent}${n} { + ${toHyprconf' " ${indent}" attrs}${indent}} + ''; + + mkFields = generators.toKeyValue { + listsAsDuplicateKeys = true; + inherit indent; + }; + + allFields = + filterAttrs (n: v: !(isAttrs v || (isList v && all isAttrs v))) + attrs; + + isImportantField = n: _: + foldl (acc: prev: if hasPrefix prev n then true else acc) false + importantPrefixes; + + importantFields = filterAttrs isImportantField allFields; + + fields = builtins.removeAttrs allFields + (mapAttrsToList (n: _: n) importantFields); + in mkFields importantFields + + concatStringsSep "\n" (mapAttrsToList mkSection sections) + + mkFields fields; + in toHyprconf' initialIndent attrs; + toKDL = { }: let inherit (lib) concatStringsSep splitString mapAttrsToList any; @@ -99,4 +142,97 @@ in attrs: '' ${concatStringsSep "\n" (mapAttrsToList convertAttributeToKDL attrs)} ''; + + toSCFG = { }: + let + inherit (lib) concatStringsSep mapAttrsToList any; + inherit (builtins) typeOf replaceStrings elem; + + # ListOf String -> String + indentStrings = let + # Although the input of this function is a list of strings, + # the strings themselves *will* contain newlines, so you need + # to normalize the list by joining and resplitting them. + unlines = lib.splitString "\n"; + lines = lib.concatStringsSep "\n"; + indentAll = lines: concatStringsSep "\n" (map (x: " " + x) lines); + in stringsWithNewlines: indentAll (unlines (lines stringsWithNewlines)); + + # String -> Bool + specialChars = s: + any (char: elem char (reserved ++ [ " " "'" "{" "}" ])) + (lib.stringToCharacters s); + + # String -> String + sanitizeString = + replaceStrings reserved [ ''\"'' "\\\\" "\\r" "\\n" "\\t" ]; + + reserved = [ ''"'' "\\" "\r" "\n" " " ]; + + # OneOf [Int Float String Bool] -> String + literalValueToString = element: + lib.throwIfNot (elem (typeOf element) [ "int" "float" "string" "bool" ]) + "Cannot convert value of type ${typeOf element} to SCFG literal." + (if element == false then + "false" + else if element == true then + "true" + else if typeOf element == "string" then + if element == "" || specialChars element then + ''"${sanitizeString element}"'' + else + element + else + toString element); + + # Bool -> ListOf (OneOf [Int Float String Bool]) -> String + toOptParamsString = cond: list: + lib.optionalString (cond) (lib.pipe list [ + (map literalValueToString) + (concatStringsSep " ") + (s: " " + s) + ]); + + # Attrset Conversion + # String -> AttrsOf Anything -> String + convertAttrsToSCFG = name: attrs: + let + optParamsString = toOptParamsString (attrs ? "_params") attrs._params; + in '' + ${name}${optParamsString} { + ${indentStrings (convertToAttrsSCFG' attrs)} + }''; + + # Attrset Conversion + # AttrsOf Anything -> ListOf String + convertToAttrsSCFG' = attrs: + mapAttrsToList convertAttributeToSCFG + (lib.filterAttrs (name: val: !isNull val && name != "_params") attrs); + + # List Conversion + # String -> ListOf (OneOf [Int Float String Bool]) -> String + convertListOfFlatAttrsToSCFG = name: list: + let optParamsString = toOptParamsString (list != [ ]) list; + in "${name}${optParamsString}"; + + # Combined Conversion + # String -> Anything -> String + convertAttributeToSCFG = name: value: + lib.throwIf (name == "") "Directive must not be empty" + (let vType = typeOf value; + in if elem vType [ "int" "float" "bool" "string" ] then + "${name} ${literalValueToString value}" + else if vType == "set" then + convertAttrsToSCFG name value + else if vType == "list" then + convertListOfFlatAttrsToSCFG name value + else + throw '' + Cannot convert type `(${typeOf value})` to SCFG: + ${name} = ${toString value} + ''); + in attrs: + lib.optionalString (attrs != { }) '' + ${concatStringsSep "\n" (convertToAttrsSCFG' attrs)} + ''; } diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index 9fe03dcf2c77..91ecb47be228 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -7,6 +7,24 @@ # [1] https://github.com/NixOS/nixpkgs/blob/fca0d6e093c82b31103dc0dacc48da2a9b06e24b/maintainers/maintainer-list.nix#LC1 { + aabccd021 = { + name = "Muhamad Abdurahman"; + email = "aabccd021@gmail.com"; + github = "aabccd021"; + githubId = 33031950; + }; + abayomi185 = { + name = "Yomi"; + email = "yomi+nix@yomitosh.com"; + github = "abayomi185"; + githubId = 21103047; + }; + afresquet = { + name = "Alvaro Fresquet"; + email = "alvarofresquet@gmail.com"; + github = "afresquet"; + githubId = 29437693; + }; amesgen = { name = "amesgen"; email = "amesgen@amesgen.de"; @@ -25,6 +43,12 @@ github = "Avimitin"; githubId = 30021675; }; + bamhm182 = { + name = "bamhm182"; + email = "bamhm182@gmail.com"; + github = "bamhm182"; + githubId = 920269; + }; blmhemu = { name = "blmhemu"; email = "19410501+blmhemu@users.noreply.github.com"; @@ -37,6 +61,12 @@ github = "bertof"; githubId = 9915675; }; + bricked = { + name = "Bricked"; + email = "hello@bricked.dev"; + github = "brckd"; + githubId = 92804487; + }; CarlosLoboxyz = { name = "Carlos Lobo"; email = "86011416+CarlosLoboxyz@users.noreply.github.com"; @@ -55,6 +85,12 @@ github = "cvoges12"; githubId = 38054771; }; + danjujan = { + name = "Jan Schmitz"; + email = "44864658+danjujan@users.noreply.github.com"; + github = "danjujan"; + githubId = 44864658; + }; d-dervishi = { email = "david.dervishi@epfl.ch"; github = "d-dervishi"; @@ -71,12 +107,37 @@ github = "Dines97"; githubId = 19364873; }; + diniamo = { + name = "diniamo"; + email = "diniamo69@gmail.com"; + github = "diniamo"; + githubId = 55629891; + }; dwagenk = { email = "dwagenk@mailbox.org"; github = "dwagenk"; githubId = 32838899; name = "Daniel Wagenknecht"; }; + henrisota = { + email = "henrisota@users.noreply.github.com"; + github = "henrisota"; + githubId = "56848082"; + name = "Henri Sota"; + }; + jack5079 = { + name = "Jack W."; + email = "nix@jack.cab"; + github = "jack5079"; + githubId = 29169102; + }; + janik = { + name = "Janik"; + email = "janik@aq0.de"; + matrix = "@janik0:matrix.org"; + github = "Janik-Haag"; + githubId = 80165193; + }; jkarlson = { email = "jekarlson@gmail.com"; github = "jkarlson"; @@ -89,6 +150,12 @@ github = "JustinLovinger"; githubId = 7183441; }; + kaleo = { + name = "Kaleo Cheng"; + email = "kaleocheng@gmail.com"; + github = "kaleocheng"; + githubId = 7939352; + }; owm111 = { email = "7798336+owm111@users.noreply.github.com"; name = "Owen McGrath"; @@ -113,6 +180,12 @@ github = "foo-dogsquared"; githubId = 34962634; }; + fpob = { + name = "Filip Pobořil"; + email = "fpob@proton.me"; + github = "fpob"; + githubId = 6289078; + }; olmokramer = { name = "Olmo Kramer"; email = "olmokramer@users.noreply.github.com"; @@ -125,6 +198,13 @@ github = "iosmanthus"; githubId = 16307070; }; + jonringer = { + email = "jonringer117@gmail.com"; + matrix = "@jonringer:matrix.org"; + github = "jonringer"; + githubId = 7673602; + name = "Jonathan Ringer"; + }; kalhauge = { name = "Christian Gram Kalhauge"; email = "kalhauge@users.noreply.github.com"; @@ -153,12 +233,31 @@ github = "kubukoz"; githubId = 894884; }; + lheckemann = { + name = "Linus Heckemann"; + email = "git@sphalerite.org"; + github = "lheckemann"; + githubId = 341954; + }; + lilyinstarlight = { + email = "lily@lily.flowers"; + matrix = "@lily:lily.flowers"; + github = "lilyinstarlight"; + githubId = 298109; + name = "Lily Foster"; + }; loicreynier = { name = "Loïc Reynier"; email = "loic@loireynier.fr"; github = "loicreynier"; githubId = 88983487; }; + LucasWagler = { + name = "Lucas Wagler"; + email = "lucas@wagler.dev"; + github = "LucasWagler"; + githubId = 32136449; + }; matrss = { name = "Matthias Riße"; email = "matrss@users.noreply.github.com"; @@ -189,6 +288,22 @@ github = "nilp0inter"; githubId = 1224006; }; + NitroSniper = { + name = "Nitro Sniper"; + email = "nitro@ortin.dev"; + github = "NitroSniper"; + githubId = 44097331; + }; + n-hass = { + name = "Nicholas Hassan"; + email = "nick@hassan.host"; + github = "n-hass"; + githubId = 72363381; + keys = [{ + longkeyid = "rsa4096/0xFC95AB946A781EE7"; + fingerprint = "FDEE 6116 DBA7 8840 7323 4466 A371 5973 2728 A6A6"; + }]; + }; seylerius = { email = "sable@seyleri.us"; name = "Sable Seyler"; @@ -199,6 +314,12 @@ fingerprint = "F0E0 0311 126A CD72 4392 25E6 68BF 2EAE 6D91 CAFF"; }]; }; + silmarp = { + name = "Silmar Pereira da Silva Junior"; + email = "silmarjr2@gmail.com"; + github = "silmarp"; + githubID = 67292496; + }; fendse = { email = "46252070+Fendse@users.noreply.github.com"; github = "Fendse"; @@ -217,6 +338,11 @@ githubId = 33058747; name = "Gaetan Lepage"; }; + genericnerdyusername = { + email = "genericnerdyusername@proton.me"; + github = "genericnerdyusername"; + githubId = 111183546; + }; maximsmol = { email = "maximsmol@gmail.com"; github = "maximsmol"; @@ -239,6 +365,11 @@ githubId = 12465195; name = "Bruno BELANYI"; }; + libewa = { + email = "libewa-git@icloud.com"; + github = "libewa"; + githubId = 67926131; + }; malvo = { email = "malte@malvo.org"; github = "malte-v"; @@ -317,12 +448,6 @@ 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"; @@ -483,4 +608,24 @@ github = "britter"; githubId = 1327662; }; + zorrobert = { + name = "zorrobert"; + email = "zorrobert@mailbox.org"; + github = "zorrobert"; + githubId = 118135271; + }; + joygnu = { + name = "joygnu"; + email = "contact@joygnu.org"; + github = "joygnu"; + githubId = 152063003; + }; + callumio = { + name = "Callum Leslie"; + email = "git+nix@cleslie.uk"; + github = "callumio"; + githubId = 16057677; + keys = + [{ fingerprint = "BC82 4BB5 1656 D144 285E A0EC D382 C4AF EECE AA90"; }]; + }; } diff --git a/modules/lib/nushell.nix b/modules/lib/nushell.nix new file mode 100644 index 000000000000..e831380cd0c3 --- /dev/null +++ b/modules/lib/nushell.nix @@ -0,0 +1,65 @@ +{ lib }: rec { + mkNushellInline = expr: lib.setType "nushell-inline" { inherit expr; }; + + toNushell = { indent ? "", multiline ? true, asBindings ? false }@args: + v: + let + innerIndent = "${indent} "; + introSpace = if multiline then '' + + ${innerIndent}'' else + " "; + outroSpace = if multiline then '' + + ${indent}'' else + " "; + innerArgs = args // { + indent = if asBindings then indent else innerIndent; + asBindings = false; + }; + concatItems = lib.concatStringsSep introSpace; + isNushellInline = lib.isType "nushell-inline"; + + generatedBindings = assert lib.assertMsg (badVarNames == [ ]) + "Bad Nushell variable names: ${ + lib.generators.toPretty { } badVarNames + }"; + lib.concatStrings (lib.mapAttrsToList (key: value: '' + ${indent}let ${key} = ${toNushell innerArgs value} + '') v); + + isBadVarName = name: + # Extracted from https://github.com/nushell/nushell/blob/ebc7b80c23f777f70c5053cca428226b3fe00d30/crates/nu-parser/src/parser.rs#L33 + # Variables with numeric or even empty names are allowed. The only requisite is not containing any of the following characters + let invalidVariableCharacters = ".[({+-*^/=!<>&|"; + in lib.match "^[$]?[^${lib.escapeRegex invalidVariableCharacters}]+$" + name == null; + badVarNames = lib.filter isBadVarName (builtins.attrNames v); + in if asBindings then + generatedBindings + else if v == null then + "null" + else if lib.isInt v || lib.isFloat v || lib.isString v || lib.isBool v then + lib.strings.toJSON v + else if lib.isList v then + (if v == [ ] then + "[]" + else + "[${introSpace}${ + concatItems (map (value: "${toNushell innerArgs value}") v) + }${outroSpace}]") + else if lib.isAttrs v then + (if isNushellInline v then + "(${v.expr})" + else if v == { } then + "{}" + else if lib.isDerivation v then + toString v + else + "{${introSpace}${ + concatItems (lib.mapAttrsToList (key: value: + "${lib.strings.toJSON key}: ${toNushell innerArgs value}") v) + }${outroSpace}}") + else + abort "nushell.toNushell: type ${lib.typeOf v} is unsupported"; +} diff --git a/modules/lib/types.nix b/modules/lib/types.nix index 056d3165b063..14d1c2192295 100644 --- a/modules/lib/types.nix +++ b/modules/lib/types.nix @@ -107,4 +107,27 @@ in rec { mergeDefaultOption loc defs; }; + nushellValue = let + valueType = types.nullOr (types.oneOf [ + (lib.mkOptionType { + name = "nushell"; + description = "Nushell inline value"; + descriptionClass = "name"; + check = lib.isType "nushell-inline"; + }) + types.bool + types.int + types.float + types.str + types.path + (types.attrsOf valueType // { + description = "attribute set of Nushell values"; + descriptionClass = "name"; + }) + (types.listOf valueType // { + description = "list of Nushell values"; + descriptionClass = "name"; + }) + ]); + in valueType; } diff --git a/modules/manual.nix b/modules/manual.nix index 84ec7eda0e8c..23963c3c04e1 100644 --- a/modules/manual.nix +++ b/modules/manual.nix @@ -57,13 +57,6 @@ in { (mkIf cfg.manpages.enable [ docs.manPages ]) (mkIf cfg.json.enable [ docs.options.json ]) ]; - - # Whether a dependency on nmd should be introduced. - home.extraBuilderCommands = - mkIf (cfg.html.enable || cfg.manpages.enable || cfg.json.enable) '' - mkdir $out/lib - ln -s ${docs.nmdSrc} $out/lib/nmd - ''; }; } diff --git a/modules/misc/dconf.nix b/modules/misc/dconf.nix index 24e02a129903..b4863a139091 100644 --- a/modules/misc/dconf.nix +++ b/modules/misc/dconf.nix @@ -111,8 +111,8 @@ in { --slurpfile new "$newState" \ '($old[] - $new[])[]' \ | while read -r key; do - $VERBOSE_ECHO "Resetting dconf key \"$key\"" - $DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION dconf reset "$key" + verboseEcho "Resetting dconf key \"$key\"" + run $DCONF_DBUS_RUN_SESSION dconf reset "$key" done ''; in '' @@ -128,7 +128,7 @@ in { "$newGenPath/${statePath}" fi - $DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile} + run $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile} unset DCONF_DBUS_RUN_SESSION ''); diff --git a/modules/misc/fontconfig.nix b/modules/misc/fontconfig.nix index 49fef96a983e..9bc6ac47b3d8 100644 --- a/modules/misc/fontconfig.nix +++ b/modules/misc/fontconfig.nix @@ -1,3 +1,7 @@ +# This module is heavily inspired by the corresponding NixOS module. See +# +# https://github.com/NixOS/nixpkgs/blob/23.11/nixos/modules/config/fonts/fontconfig.nix + { config, lib, pkgs, ... }: with lib; @@ -32,6 +36,50 @@ in { {command}`nix-env`. ''; }; + + defaultFonts = { + monospace = mkOption { + type = with types; listOf str; + default = [ ]; + description = '' + Per-user default monospace font(s). Multiple fonts may be listed in + case multiple languages must be supported. + ''; + }; + + sansSerif = mkOption { + type = with types; listOf str; + default = [ ]; + description = '' + Per-user default sans serif font(s). Multiple fonts may be listed + in case multiple languages must be supported. + ''; + }; + + serif = mkOption { + type = with types; listOf str; + default = [ ]; + description = '' + Per-user default serif font(s). Multiple fonts may be listed in + case multiple languages must be supported. + ''; + }; + + emoji = mkOption { + type = with types; listOf str; + default = [ ]; + description = '' + Per-user default emoji font(s). Multiple fonts may be listed in + case a font does not support all emoji. + + Note that fontconfig matches color emoji fonts preferentially, + so if you want to use a black and white font while having + a color font installed (eg. Noto Color Emoji installed alongside + Noto Emoji), fontconfig will still choose the color font even + when it is later in the list. + ''; + }; + }; }; }; @@ -71,26 +119,52 @@ in { fi ''; - xdg.configFile = { - "fontconfig/conf.d/10-hm-fonts.conf".text = '' + xdg.configFile = let + mkFontconfigConf = conf: '' - Add fonts in the Nix user profile + ${conf} + + ''; + in { + "fontconfig/conf.d/10-hm-fonts.conf".text = mkFontconfigConf '' + Add fonts in the Nix user profile - ${config.home.path}/etc/fonts/conf.d - ${config.home.path}/etc/fonts/fonts.conf + ${config.home.path}/etc/fonts/conf.d + ${config.home.path}/etc/fonts/fonts.conf - ${config.home.path}/lib/X11/fonts - ${config.home.path}/share/fonts - ${profileDirectory}/lib/X11/fonts - ${profileDirectory}/share/fonts + ${config.home.path}/lib/X11/fonts + ${config.home.path}/share/fonts + ${profileDirectory}/lib/X11/fonts + ${profileDirectory}/share/fonts - ${config.home.path}/lib/fontconfig/cache - + ${config.home.path}/lib/fontconfig/cache + ''; + + "fontconfig/conf.d/52-hm-default-fonts.conf".text = let + genDefault = fonts: name: + optionalString (fonts != [ ]) '' + + ${name} + + ${ + concatStringsSep "" (map (font: '' + ${font} + '') fonts) + } + + + ''; + in mkFontconfigConf '' + + ${genDefault cfg.defaultFonts.sansSerif "sans-serif"} + ${genDefault cfg.defaultFonts.serif "serif"} + ${genDefault cfg.defaultFonts.monospace "monospace"} + ${genDefault cfg.defaultFonts.emoji "emoji"} ''; }; }; diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 6454eb2aeb66..65ed1de2f14e 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -53,7 +53,7 @@ let package = mkOption { type = types.nullOr types.package; default = null; - example = literalExpression "pkgs.gnome.adwaita-icon-theme"; + example = literalExpression "pkgs.adwaita-icon-theme"; description = '' Package providing the icon theme. This package will be installed to your profile. If `null` then the theme @@ -221,10 +221,9 @@ in { config = mkIf cfg.enable (let gtkIni = optionalAttrs (cfg.font != null) { - gtk-font-name = let - fontSize = - optionalString (cfg.font.size != null) " ${toString cfg.font.size}"; - in "${cfg.font.name}" + fontSize; + gtk-font-name = + let fontSize = if cfg.font.size != null then cfg.font.size else 10; + in "${cfg.font.name} ${toString fontSize}"; } // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; } // optionalAttrs (cfg.iconTheme != null) { gtk-icon-theme-name = cfg.iconTheme.name; @@ -245,10 +244,9 @@ in { '' + cfg4.extraCss; dconfIni = optionalAttrs (cfg.font != null) { - font-name = let - fontSize = - optionalString (cfg.font.size != null) " ${toString cfg.font.size}"; - in "${cfg.font.name}" + fontSize; + font-name = + let fontSize = if cfg.font.size != null then cfg.font.size else 10; + in "${cfg.font.name} ${toString fontSize}"; } // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; } // optionalAttrs (cfg.iconTheme != null) { icon-theme = cfg.iconTheme.name; diff --git a/modules/misc/news.nix b/modules/misc/news.nix index ed6d1546bb13..3dbb01723faf 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1,9 +1,6 @@ { config, lib, options, pkgs, ... }: - with lib; - let - cfg = config.news; hostPlatform = pkgs.stdenv.hostPlatform; @@ -44,7 +41,6 @@ let config = { id = mkDefault (builtins.hashString "sha256" config.message); }; }); - in { meta.maintainers = [ maintainers.rycee ]; @@ -1383,6 +1379,488 @@ in { A new module is available: 'xdg.portal'. ''; } + + { + time = "2024-01-20T23:45:07+00:00"; + message = '' + A new module is available: 'programs.mise'. + + This module replaces 'programs.rtx', which has been removed. + ''; + } + + { + time = "2024-01-27T22:53:00+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.wob'. + ''; + } + + { + time = "2024-02-05T22:33:54+00:00"; + message = '' + A new module is available: 'services.arrpc' + ''; + } + + { + time = "2024-02-05T22:45:37+00:00"; + message = '' + A new module is available: 'programs.jetbrains-remote' + ''; + } + + { + time = "2024-02-21T23:01:27+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'wayland.windowManager.river'. + ''; + } + + { + time = "2024-03-08T22:20:04+00:00"; + message = '' + A new module is available: 'programs.zk' + ''; + } + + { + time = "2024-03-08T22:23:24+00:00"; + message = '' + A new module is available: 'programs.ranger'. + ''; + } + + { + time = "2024-03-13T13:28:22+00:00"; + message = '' + A new module is available: 'programs.joplin-desktop'. + ''; + } + + { + time = "2024-03-14T07:22:09+00:00"; + condition = config.services.gpg-agent.enable; + message = '' + 'services.gpg-agent.pinentryFlavor' has been removed and replaced by + 'services.gpg-agent.pinentryPackage'. + ''; + } + + { + time = "2024-03-14T07:22:59+00:00"; + condition = config.programs.rbw.enable; + message = '' + 'programs.rbw.pinentry' has been simplified to only accept 'null' or + a package. + ''; + } + + { + time = "2024-03-15T08:39:52+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.activitywatch'. + ''; + } + + { + time = "2024-03-28T17:02:19+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.amberol'. + ''; + } + + { + time = "2024-04-08T21:43:38+00:00"; + message = '' + A new module is available: 'programs.bun'. + ''; + } + + { + time = "2024-04-18T22:30:49+00:00"; + message = '' + A new module is available: 'programs.fd'. + ''; + } + + { + time = "2024-04-19T09:23:52+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.tofi'. + ''; + } + + { + time = "2024-04-19T10:01:55+00:00"; + message = '' + A new module is available: 'programs.spotify-player'. + ''; + } + + { + time = "2024-04-19T14:53:17+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.remmina'. + ''; + } + + { + time = "2024-04-21T20:53:09+00:00"; + message = '' + A new module is available: 'programs.poetry'. + + Poetry is a tool that helps you manage Python project dependencies and + packages. See https://python-poetry.org/ for more. + ''; + } + + { + time = "2024-04-22T18:04:47+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.amberol'. + + Amberol is a music player with no delusions of grandeur. If you just + want to play music available on your local system then Amberol is the + music player you are looking for. See https://apps.gnome.org/Amberol/ + for more. + ''; + } + + { + time = "2024-04-28T20:27:08+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.psd'. + + Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage + your browser's profile in tmpfs and to periodically sync it back to + your physical disc (HDD/SSD). + ''; + } + + { + time = "2024-04-29T22:01:51+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.swaync'. + + SwayNotificationCenter is a simple notification daemon with a GTK GUI + for notifications and the control center. See + https://github.com/ErikReider/SwayNotificationCenter for more. + ''; + } + + { + time = "2024-04-30T18:28:28+00:00"; + message = '' + A new module is available: 'programs.freetube'. + + FreeTube is a YouTube client built around using YouTube more + privately. You can enjoy your favorite content and creators without + your habits being tracked. See https://freetubeapp.io/ for more. + ''; + } + + { + time = "2024-04-30T21:57:23+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.conky'. + + Conky is a system monitor for X. Conky can display just about + anything, either on your root desktop or in its own window. See + https://conky.cc/ for more. + ''; + } + + { + time = "2024-05-05T07:22:01+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.hypridle'. + + Hypridle is a program that monitors user activity and runs commands + when idle or active. See https://github.com/hyprwm/hypridle for more. + ''; + } + + { + time = "2024-05-06T07:36:13+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.gnome-shell'. + + GNOME Shell is the graphical shell of the GNOME desktop environment. + It provides basic functions like launching applications and switching + between windows, and is also a widget engine. + ''; + } + + { + time = "2024-05-10T10:30:58+00:00"; + message = '' + A new module is available: 'programs.fastfetch'. + + Fastfetch is a Neofetch-like tool for fetching system information and + displaying them in a pretty way. See + https://github.com/fastfetch-cli/fastfetch for more. + ''; + } + + { + time = "2024-05-10T11:48:34+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.hyprlock'. + + Hyprland's simple, yet multi-threaded and GPU-accelerated screen + locking utility. See https://github.com/hyprwm/hyprlock for more. + ''; + } + + { + time = "2024-05-10T13:35:19+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.hyprpaper'. + + Hyprpaper is a blazing fast wallpaper utility for Hyprland with the + ability to dynamically change wallpapers through sockets. It will work + on all wlroots-based compositors, though. See + https://github.com/hyprwm/hyprpaper for more. + ''; + } + + { + time = "2024-05-10T21:28:38+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.yambar'. + + Yambar is a lightweight and configurable status panel for X11 and + Wayland, that goes to great lengths to be both CPU and battery + efficient - polling is only done when absolutely necessary. + + See https://codeberg.org/dnkl/yambar for more. + ''; + } + + { + time = "2024-05-25T14:36:03+00:00"; + message = '' + Multiple new options are available: + + - 'nix.nixPath' + - 'nix.keepOldNixPath' + - 'nix.channels' + ''; + } + + { + time = "2024-06-22T05:49:48+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.blanket'. + + Blanket is a program you can use to improve your focus and increase + your productivity by listening to different sounds. See + https://github.com/rafaelmardojai/blanket for more. + ''; + } + + { + time = "2024-06-26T07:07:17+00:00"; + condition = with config.programs.yazi; + enable && (enableBashIntegration || enableZshIntegration + || enableFishIntegration || enableNushellIntegration); + message = '' + Yazi's shell integration wrappers have been renamed from 'ya' to 'yy'. + + A new option `programs.yazi.shellWrapperName` is also available that + allows you to override this name. + ''; + } + + { + time = "2024-06-28T14:18:16+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.glance'. + + Glance is a self-hosted dashboard that puts all your feeds in + one place. See https://github.com/glanceapp/glance for more. + ''; + } + + { + time = "2024-09-13T08:58:17+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.trayscale'. + + An unofficial GUI wrapper around the Tailscale CLI client. + ''; + } + + { + time = "2024-09-13T09:50:49+00:00"; + message = '' + A new module is available: 'programs.neovide'. + + Neovide is a simple, no-nonsense, cross-platform graphical user + interface for Neovim (an aggressively refactored and updated Vim + editor). + ''; + } + + { + time = "2024-09-20T07:00:11+00:00"; + condition = config.programs.kitty.theme != null; + message = '' + The option 'programs.kitty.theme' has been deprecated, please use + 'programs.kitty.themeFile' instead. + + The 'programs.kitty.themeFile' option expects the file name of a + theme from `kitty-themes`, without the `.conf` suffix. See + for a + list of themes. + ''; + } + + { + time = "2024-09-20T07:48:08+00:00"; + condition = hostPlatform.isLinux && config.services.swayidle.enable; + message = '' + The swayidle module behavior has changed. Specifically, swayidle was + previously always called with a `-w` flag. This flag is now moved to + the default `services.swayidle.extraArgs` value to make it optional. + + Your configuration may break if you already set this option and also + rely on the flag being automatically added. To resolve this, please + add `-w` to your assignment of `services.swayidle.extraArgs`. + ''; + } + + { + time = "2024-10-09T06:16:23+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.snixembed'. + + snixembed proxies StatusNotifierItems as XEmbedded systemtray-spec + icons. This is useful for some tools in some environments, e.g., Safe + Eyes in i3, lxde or mate. + ''; + } + + { + time = "2024-10-11T08:23:19+00:00"; + message = '' + A new module is available: 'programs.vifm'. + + Vifm is a curses based Vim-like file manager extended with some useful + ideas from mutt. + ''; + } + + { + time = "2024-10-17T13:07:55+00:00"; + message = '' + A new module is available: 'programs.zed-editor'. + + Zed is a fast text editor for macOS and Linux. + See https://zed.dev for more. + ''; + } + + { + time = "2024-10-18T14:01:07+00:00"; + message = '' + A new module is available: 'programs.cmus'. + + cmus is a small, fast and powerful console music player. + ''; + } + + { + time = "2024-10-20T07:53:54+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.nh'. + + nh is yet another Nix CLI helper. Adding functionality on top of the + existing solutions, like nixos-rebuild, home-manager cli or nix + itself. + ''; + } + + { + time = "2024-10-25T08:18:30+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'nixGL'. + + NixGL solve the "OpenGL" problem with nix. The 'nixGL' module provides + integration of NixGL into Home Manager. See the "GPU on non-NixOS + systems" section in the Home Manager manual for more. + ''; + } + + { + time = "2024-11-01T19:44:59+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.podman'. + + Podman is a daemonless container engine that lets you manage + containers, pods, and images. + + This Home Manager module allows you to define containers that will run + as systemd services. + ''; + } + + { + time = "2024-12-01T19:17:40+00:00"; + message = '' + A new module is available: 'programs.nix-your-shell'. + + nix-your-shell is a wrapper for `nix develop` or `nix-shell` to retain + the same shell inside the new environment. + ''; + } + + { + time = "2024-12-01T19:34:04+00:00"; + message = '' + A new module is available: 'programs.kubecolor'. + + Kubecolor is a kubectl wrapper used to add colors to your kubectl + output. + ''; + } + + { + time = "2024-12-04T20:00:00+00:00"; + condition = let + sCfg = config.programs.starship; + fCfg = config.programs.fish; + in sCfg.enable && sCfg.enableFishIntegration && fCfg.enable; + message = '' + A new option 'programs.starship.enableInteractive' is available for + the Fish shell that only enables starship if the shell is interactive. + + Some plugins require this to be set to 'false' to function correctly. + ''; + } ]; }; } diff --git a/modules/misc/nix.nix b/modules/misc/nix.nix index 9e249143665b..652d3eb89179 100644 --- a/modules/misc/nix.nix +++ b/modules/misc/nix.nix @@ -1,15 +1,40 @@ { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) + boolToString concatStringsSep escape floatToString getVersion isBool + isConvertibleWithToString isDerivation isFloat isInt isList isString + literalExpression maintainers mapAttrsToList mkDefault mkEnableOption mkIf + mkMerge mkOption optionalString toPretty types versionAtLeast; + cfg = config.nix; nixPackage = cfg.package; isNixAtLeast = versionAtLeast (getVersion nixPackage); + nixPath = concatStringsSep ":" cfg.nixPath; + + useXdg = config.nix.enable + && (config.nix.settings.use-xdg-base-directories or false); + defexprDir = if useXdg then + "${config.xdg.stateHome}/nix/defexpr" + else + "${config.home.homeDirectory}/.nix-defexpr"; + + # The deploy path for declarative channels. The directory name is prefixed + # with a number to make it easier for files in defexprDir to control the order + # they'll be read relative to each other. + channelPath = "${defexprDir}/50-home-manager"; + + channelsDrv = let + mkEntry = name: drv: { + inherit name; + path = toString drv; + }; + in pkgs.linkFarm "channels" (lib.mapAttrsToList mkEntry cfg.channels); + nixConf = assert isNixAtLeast "2.2"; let @@ -52,22 +77,26 @@ let checkPhase = if pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform then '' echo "Ignoring validation for cross-compilation" - '' else '' - echo "Validating generated nix.conf" - ln -s $out ./nix.conf - set -e - set +o pipefail - NIX_CONF_DIR=$PWD \ - ${cfg.package}/bin/nix show-config ${ - optionalString (isNixAtLeast "2.3pre") - "--no-net --option experimental-features nix-command" - } \ - |& sed -e 's/^warning:/error:/' \ - | (! grep '${ - if cfg.checkConfig then "^error:" else "^error: unknown setting" - }') - set -o pipefail - ''; + '' else + let + showCommand = + if isNixAtLeast "2.20pre" then "config show" else "show-config"; + in '' + echo "Validating generated nix.conf" + ln -s $out ./nix.conf + set -e + set +o pipefail + NIX_CONF_DIR=$PWD \ + ${cfg.package}/bin/nix ${showCommand} ${ + optionalString (isNixAtLeast "2.3pre") + "--no-net --option experimental-features nix-command" + } \ + |& sed -e 's/^warning:/error:/' \ + | (! grep '${ + if cfg.checkConfig then "^error:" else "^error: unknown setting" + }') + set -o pipefail + ''; }; semanticConfType = with types; @@ -98,6 +127,47 @@ in { ''; }; + nixPath = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "$HOME/.nix-defexpr/channels" + "darwin-config=$HOME/.config/nixpkgs/darwin-configuration.nix" + ]; + description = '' + Adds new directories to the Nix expression search path. + + Used by Nix when looking up paths in angular brackets + (e.g. ``). + ''; + }; + + keepOldNixPath = mkOption { + type = types.bool; + default = true; + example = false; + description = '' + Whether {option}`nix.nixPath` should keep the previously set values in + {env}`NIX_PATH`. + ''; + }; + + channels = lib.mkOption { + type = with lib.types; attrsOf package; + default = { }; + example = lib.literalExpression "{ inherit nixpkgs; }"; + description = '' + A declarative alternative to Nix channels. Whereas with stock channels, + you would register URLs and fetch them into the Nix store with + {manpage}`nix-channel(1)`, this option allows you to register the store + path directly. One particularly useful example is registering flake + inputs as channels. + + This option can coexist with stock Nix channels. If the same channel is + defined in both, this option takes precedence. + ''; + }; + registry = mkOption { type = types.attrsOf (types.submodule (let inputAttrs = types.attrsOf @@ -206,6 +276,19 @@ in { }; config = mkIf cfg.enable (mkMerge [ + (mkIf (cfg.nixPath != [ ] && !cfg.keepOldNixPath) { + home.sessionVariables.NIX_PATH = "${nixPath}"; + }) + + (mkIf (cfg.nixPath != [ ] && cfg.keepOldNixPath) { + home.sessionVariables.NIX_PATH = "${nixPath}\${NIX_PATH:+:$NIX_PATH}"; + }) + + (lib.mkIf (cfg.channels != { }) { + nix.nixPath = [ channelPath ]; + home.file."${channelPath}".source = channelsDrv; + }) + (mkIf (cfg.registry != { }) { xdg.configFile."nix/registry.json".source = jsonFormat.generate "registry.json" { @@ -228,5 +311,5 @@ in { }) ]); - meta.maintainers = [ maintainers.polykernel ]; + meta.maintainers = [ ]; } diff --git a/modules/misc/nixgl.nix b/modules/misc/nixgl.nix new file mode 100644 index 000000000000..2c7fcaffc33a --- /dev/null +++ b/modules/misc/nixgl.nix @@ -0,0 +1,296 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.nixGL; + wrapperListMarkdown = with builtins; + foldl' (list: name: + list + '' + - ${name} + '') "" (attrNames config.lib.nixGL.wrappers); +in { + meta.maintainers = [ lib.maintainers.smona ]; + + options.nixGL = { + packages = lib.mkOption { + type = with lib.types; nullOr attrs; + default = null; + example = lib.literalExpression "inputs.nixGL.packages"; + description = '' + The nixGL package set containing GPU library wrappers. This can be used + to provide OpenGL and Vulkan access to applications on non-NixOS systems + by using `(config.lib.nixGL.wrap )` for the default wrapper, or + `(config.lib.nixGL.wrappers. )` for any available + wrapper. + + The wrapper functions are always available. If this option is empty (the + default), they are a no-op. This is useful on NixOS where the wrappers + are unnecessary. + + Note that using any Nvidia wrapper requires building the configuration + with the `--impure` option. + ''; + }; + + defaultWrapper = lib.mkOption { + type = lib.types.enum (builtins.attrNames config.lib.nixGL.wrappers); + default = "mesa"; + description = '' + The package wrapper function available for use as `(config.lib.nixGL.wrap + )`. Intended to start programs on the main GPU. + + Wrapper functions can be found under `config.lib.nixGL.wrappers`. They + can be used directly, however, setting this option provides a convenient + shorthand. + + The following wrappers are available: + ${wrapperListMarkdown} + ''; + }; + + offloadWrapper = lib.mkOption { + type = lib.types.enum (builtins.attrNames config.lib.nixGL.wrappers); + default = "mesaPrime"; + description = '' + The package wrapper function available for use as + `(config.lib.nixGL.wrapOffload )`. Intended to start programs + on the secondary GPU. + + Wrapper functions can be found under `config.lib.nixGL.wrappers`. They + can be used directly, however, setting this option provides a convenient + shorthand. + + The following wrappers are available: + ${wrapperListMarkdown} + ''; + }; + + prime.card = lib.mkOption { + type = lib.types.str; + default = "1"; + example = "pci-0000_06_00_0"; + description = '' + Selects the non-default graphics card used for PRIME render offloading. + The value can be: + + - a number, selecting the n-th non-default GPU; + - a PCI bus id in the form `pci-XXX_YY_ZZ_U`; + - a PCI id in the form `vendor_id:device_id` + + For more information, consult the Mesa documentation on the `DRI_PRIME` + environment variable. + ''; + }; + + prime.nvidiaProvider = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "NVIDIA-G0"; + description = '' + If this option is set, it overrides the offload provider for Nvidia + PRIME offloading. Consult the proprietary Nvidia driver documentation + on the `__NV_PRIME_RENDER_OFFLOAD_PROVIDER` environment variable. + ''; + }; + + prime.installScript = lib.mkOption { + type = with lib.types; nullOr (enum [ "mesa" "nvidia" ]); + default = null; + example = "mesa"; + description = '' + If this option is set, the wrapper script `prime-offload` is installed + into the environment. It allows starting programs on the secondary GPU + selected by the `nixGL.prime.card` option. This makes sense when the + program is not already using one of nixGL PRIME wrappers, or for + programs not installed from Nixpkgs. + + This option can be set to either "mesa" or "nvidia", making the script + use one or the other graphics library. + ''; + }; + + installScripts = lib.mkOption { + type = with lib.types; + nullOr (listOf (enum (builtins.attrNames config.lib.nixGL.wrappers))); + default = null; + example = [ "mesa" "mesaPrime" ]; + description = '' + For each wrapper `wrp` named in the provided list, a wrapper script + named `nixGLWrp` is installed into the environment. These scripts are + useful for running programs not installed via Home Manager. + + The following wrappers are available: + ${wrapperListMarkdown} + ''; + }; + + vulkan.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = '' + Whether to enable Vulkan in nixGL wrappers. + + This is disabled by default bacause Vulkan brings in several libraries + that can cause symbol version conflicts in wrapped programs. Your + mileage may vary. + ''; + }; + }; + + config = let + findWrapperPackage = packageAttr: + # NixGL has wrapper packages in different places depending on how you + # access it. We want HM configuration to be the same, regardless of how + # NixGL is imported. + # + # First, let's see if we have a flake. + if builtins.hasAttr pkgs.system cfg.packages then + cfg.packages.${pkgs.system}.${packageAttr} + else + # Next, let's see if we have a channel. + if builtins.hasAttr packageAttr cfg.packages then + cfg.packages.${packageAttr} + else + # Lastly, with channels, some wrappers are grouped under "auto". + if builtins.hasAttr "auto" cfg.packages then + cfg.packages.auto.${packageAttr} + else + throw "Incompatible NixGL package layout"; + + getWrapperExe = vendor: + let + glPackage = findWrapperPackage "nixGL${vendor}"; + glExe = lib.getExe glPackage; + vulkanPackage = findWrapperPackage "nixVulkan${vendor}"; + vulkanExe = if cfg.vulkan.enable then lib.getExe vulkanPackage else ""; + in "${glExe} ${vulkanExe}"; + + mesaOffloadEnv = { "DRI_PRIME" = "${cfg.prime.card}"; }; + + nvOffloadEnv = { + "DRI_PRIME" = "${cfg.prime.card}"; + "__NV_PRIME_RENDER_OFFLOAD" = "1"; + "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; + "__VK_LAYER_NV_optimus" = "NVIDIA_only"; + } // (let provider = cfg.prime.nvidiaProvider; + in if !isNull provider then { + "__NV_PRIME_RENDER_OFFLOAD_PROVIDER" = "${provider}"; + } else + { }); + + makePackageWrapper = vendor: environment: pkg: + if builtins.isNull cfg.packages then + pkg + else + # Wrap the package's binaries with nixGL, while preserving the rest of + # the outputs and derivation attributes. + (pkg.overrideAttrs (old: { + name = "nixGL-${pkg.name}"; + + # Make sure this is false for the wrapper derivation, so nix doesn't expect + # a new debug output to be produced. We won't be producing any debug info + # for the original package. + separateDebugInfo = false; + nativeBuildInputs = old.nativeBuildInputs or [ ] + ++ [ pkgs.makeWrapper ]; + buildCommand = let + # We need an intermediate wrapper package because makeWrapper + # requires a single executable as the wrapper. + combinedWrapperPkg = + pkgs.writeShellScriptBin "nixGLCombinedWrapper-${vendor}" '' + exec ${getWrapperExe vendor} "$@" + ''; + in '' + set -eo pipefail + + ${ # Heavily inspired by https://stackoverflow.com/a/68523368/6259505 + lib.concatStringsSep "\n" (map (outputName: '' + echo "Copying output ${outputName}" + set -x + cp -rs --no-preserve=mode "${ + pkg.${outputName} + }" "''$${outputName}" + set +x + '') (old.outputs or [ "out" ]))} + + rm -rf $out/bin/* + shopt -s nullglob # Prevent loop from running if no files + for file in ${pkg.out}/bin/*; do + local prog="$(basename "$file")" + makeWrapper \ + "${lib.getExe combinedWrapperPkg}" \ + "$out/bin/$prog" \ + --argv0 "$prog" \ + --add-flags "$file" \ + ${ + lib.concatStringsSep " " (lib.attrsets.mapAttrsToList + (var: val: "--set '${var}' '${val}'") environment) + } + done + + # If .desktop files refer to the old package, replace the references + for dsk in "$out/share/applications"/*.desktop ; do + if ! grep -q "${pkg.out}" "$dsk"; then + continue + fi + src="$(readlink "$dsk")" + rm "$dsk" + sed "s|${pkg.out}|$out|g" "$src" > "$dsk" + done + + shopt -u nullglob # Revert nullglob back to its normal default state + ''; + })); + + wrappers = { + mesa = makePackageWrapper "Intel" { }; + mesaPrime = makePackageWrapper "Intel" mesaOffloadEnv; + nvidia = makePackageWrapper "Nvidia" { }; + nvidiaPrime = makePackageWrapper "Nvidia" nvOffloadEnv; + }; + in { + lib.nixGL.wrap = wrappers.${cfg.defaultWrapper}; + lib.nixGL.wrapOffload = wrappers.${cfg.offloadWrapper}; + lib.nixGL.wrappers = wrappers; + + home.packages = let + wantsPrimeWrapper = (!isNull cfg.prime.installScript); + wantsWrapper = wrapper: + (!isNull cfg.packages) && (!isNull cfg.installScripts) + && (builtins.elem wrapper cfg.installScripts); + envVarsAsScript = environment: + lib.concatStringsSep "\n" + (lib.attrsets.mapAttrsToList (var: val: "export ${var}=${val}") + environment); + in [ + (lib.mkIf wantsPrimeWrapper (pkgs.writeShellScriptBin "prime-offload" '' + ${if cfg.prime.installScript == "mesa" then + (envVarsAsScript mesaOffloadEnv) + else + (envVarsAsScript nvOffloadEnv)} + exec "$@" + '')) + + (lib.mkIf (wantsWrapper "mesa") (pkgs.writeShellScriptBin "nixGLMesa" '' + exec ${getWrapperExe "Intel"} "$@" + '')) + + (lib.mkIf (wantsWrapper "mesaPrime") + (pkgs.writeShellScriptBin "nixGLMesaPrime" '' + ${envVarsAsScript mesaOffloadEnv} + exec ${getWrapperExe "Intel"} "$@" + '')) + + (lib.mkIf (wantsWrapper "nvidia") + (pkgs.writeShellScriptBin "nixGLNvidia" '' + exec ${getWrapperExe "Nvidia"} "$@" + '')) + + (lib.mkIf (wantsWrapper "nvidia") + (pkgs.writeShellScriptBin "nixGLNvidiaPrime" '' + ${envVarsAsScript nvOffloadEnv} + exec ${getWrapperExe "Nvidia"} "$@" + '')) + ]; + }; +} diff --git a/modules/misc/qt.nix b/modules/misc/qt.nix index f02bc186e8e1..a36bd5673771 100644 --- a/modules/misc/qt.nix +++ b/modules/misc/qt.nix @@ -6,6 +6,7 @@ let # Map platform names to their packages. platformPackages = with pkgs; { gnome = [ qgnomeplatform qgnomeplatform-qt6 ]; + adwaita = [ qadwaitadecorations qadwaitadecorations-qt6 ]; gtk = [ libsForQt5.qtstyleplugins qt6Packages.qt6gtk2 ]; kde = [ libsForQt5.plasma-integration libsForQt5.systemsettings ]; lxqt = [ lxqt.lxqt-qtplugin lxqt.lxqt-config ]; @@ -55,56 +56,85 @@ in { qt = { enable = lib.mkEnableOption "Qt 5 and 6 configuration"; - platformTheme = lib.mkOption { + platformTheme = let + newOption = { + name = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "adwaita"; + relatedPackages = [ + "qgnomeplatform" + "qgnomeplatform-qt6" + "qadwaitadecorations" + "qadwaitadecorations-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. + + Some examples are + + `gtk` + : 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 + + `adwaita` + : Use Adwaita theme with + [`qadwaitadecorations`](https://github.com/FedoraQt/QAdwaitaDecorations) + + `gnome` (deprecated) + : Use GNOME theme with + [`qgnomeplatform`](https://github.com/FedoraQt/QGnomePlatform). + Is no longer maintained so prefer `adwaita`. + + `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) + and [`qt6ct`](https://github.com/trialuser02/qt6ct) + applications + + `kde` + : Use Qt settings from Plasma + ''; + }; + package = lib.mkOption { + type = with lib.types; nullOr (either package (listOf package)); + default = null; + example = + lib.literalExpression "[pkgs.adwaita-qt pkgs.adwaita-qt6]"; + description = '' + Theme package to be used in Qt5/Qt6 applications. + Auto-detected from {option}`qt.platformTheme.name` if possible. + See its documentation for available options. + ''; + }; + }; + in lib.mkOption { type = with lib.types; - nullOr (enum [ "gtk" "gtk3" "gnome" "lxqt" "qtct" "kde" ]); + nullOr + (either (enum [ "gtk" "gtk3" "gnome" "adwaita" "lxqt" "qtct" "kde" ]) + (lib.types.submodule { options = newOption; })); default = null; - example = "gnome"; - relatedPackages = [ - "qgnomeplatform" - "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. - - The options are - - `gtk` - : 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) - and [`qt6ct`](https://github.com/trialuser02/qt6ct) - applications - - `kde` - : Use Qt settings from Plasma + Deprecated. Use {option}`qt.platformTheme.name` instead. ''; }; - style = { name = lib.mkOption { type = with lib.types; nullOr str; @@ -149,6 +179,7 @@ in { description = '' Theme package to be used in Qt5/Qt6 applications. Auto-detected from {option}`qt.style.name` if possible. + See its documentation for available options. ''; }; }; @@ -156,11 +187,24 @@ in { }; config = let + platformTheme = if (builtins.isString cfg.platformTheme) then { + option = "qt.platformTheme"; + name = cfg.platformTheme; + package = null; + } else if cfg.platformTheme == null then { + option = null; + name = null; + package = null; + } else { + option = "qt.platformTheme.name"; + name = cfg.platformTheme.name; + package = cfg.platformTheme.package; + }; # 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 + QT_QPA_PLATFORMTHEME = if (platformTheme.name != null) then + styleNames.${platformTheme.name} or platformTheme.name else null; QT_STYLE_OVERRIDE = cfg.style.name; @@ -181,14 +225,20 @@ in { in lib.mkIf cfg.enable { assertions = [{ - assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null + assertion = platformTheme.name == "gnome" -> cfg.style.name != null && cfg.style.package != null; message = '' - `qt.platformTheme` "gnome" must have `qt.style` set to a theme that + `qt.platformTheme.name` "gnome" must have `qt.style` set to a theme that supports both Qt and Gtk, for example "adwaita", "adwaita-dark", or "breeze". ''; }]; + warnings = (lib.lists.optional (platformTheme.option == "qt.platformTheme") + "The option `qt.platformTheme` has been renamed to `qt.platformTheme.name`.") + ++ (lib.lists.optional + (platformTheme.name == "gnome" && platformTheme.package == null) + "The value `gnome` for option `${platformTheme.option}` is deprecated. Use `adwaita` instead."); + qt.style.package = lib.mkIf (cfg.style.name != null) (lib.mkDefault (stylePackages.${lib.toLower cfg.style.name} or null)); @@ -208,13 +258,16 @@ in { # Apply theming also to apps started by systemd. systemd.user.sessionVariables = envVars // envVarsExtra; - home.packages = (lib.optionals (cfg.platformTheme != null) - platformPackages.${cfg.platformTheme} or [ ]) - ++ (lib.optionals (cfg.style.package != null) - (lib.toList cfg.style.package)); + home.packages = (lib.findFirst (x: x != [ ]) [ ] [ + (lib.optionals (platformTheme.package != null) + (lib.toList platformTheme.package)) + (lib.optionals (platformTheme.name != null) + platformPackages.${platformTheme.name} 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 (platformTheme.name != null) [ "QT_QPA_PLATFORMTHEME" ] ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; }; } diff --git a/modules/misc/qt/kconfig.nix b/modules/misc/qt/kconfig.nix new file mode 100644 index 000000000000..76bf7c686b86 --- /dev/null +++ b/modules/misc/qt/kconfig.nix @@ -0,0 +1,73 @@ +{ config, pkgs, lib, ... }: + +let + + cfg = config.qt.kde.settings; +in { + options.qt.kde.settings = lib.mkOption { + type = with lib.types; + let + valueType = + nullOr (oneOf [ bool int float str path (attrsOf valueType) ]) // { + description = "KDE option value"; + }; + in attrsOf valueType; + default = { }; + example = { + powermanagementprofilesrc.AC.HandleButtonEvents.lidAction = 32; + }; + description = '' + A set of values to be modified by {command}`kwriteconfig6`. + + The example value would cause the following command to run in the + activation script: + + ``` shell + kwriteconfig6 --file $XDG_CONFIG_HOME/powermanagementprofilesrc \ + --group AC \ + --group HandleButtonEvents \ + --group lidAction \ + --key lidAction \ + 32 + ``` + + Note, `null` values will delete the corresponding entry instead of + inserting any value. + ''; + }; + + config = lib.mkIf (cfg != { }) { + home.activation.kconfig = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + ${let + inherit (config.xdg) configHome; + toValue = v: + let t = builtins.typeOf v; + in if v == null then + "--delete" + else if t == "bool" then + "--type bool ${builtins.toJSON v}" + else + lib.escapeShellArg (toString v); + toLine = file: path: value: + if builtins.isAttrs value then + lib.mapAttrsToList + (group: value: toLine file (path ++ [ group ]) value) value + else + "run ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 --file '${configHome}/${file}' ${ + lib.concatMapStringsSep " " (x: "--group ${x}") + (lib.lists.init path) + } --key '${lib.lists.last path}' ${toValue value}"; + lines = lib.flatten + (lib.mapAttrsToList (file: attrs: toLine file [ ] attrs) cfg); + in builtins.concatStringsSep "\n" lines} + + # TODO: some way to only call the dbus calls needed + run ${pkgs.kdePackages.qttools}/bin/qdbus org.kde.KWin /KWin reconfigure || echo "KWin reconfigure failed" + # the actual values are https://github.com/KDE/plasma-workspace/blob/c97dddf20df5702eb429b37a8c10b2c2d8199d4e/kcms/kcms-common_p.h#L13 + for changeType in {0..10}; do + # even if one of those calls fails the others keep running + run ${pkgs.dbus}/bin/dbus-send /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:$changeType int32:0 || echo "KGlobalSettings.notifyChange $changeType failed" + done + ''; + }; +} diff --git a/modules/misc/submodule-support.nix b/modules/misc/submodule-support.nix index 400e234cb6ba..82fbc0a30fe6 100644 --- a/modules/misc/submodule-support.nix +++ b/modules/misc/submodule-support.nix @@ -29,4 +29,19 @@ with lib; ''; }; }; + + config = { + # To make it easier for the end user to override the values in the + # configuration depending on the installation method, we set default values + # for the arguments that are defined in the NixOS/nix-darwin modules. + # + # Without these defaults, these attributes would simply not exist, and the + # module system can not inform modules about their non-existence; see + # https://github.com/NixOS/nixpkgs/issues/311709#issuecomment-2110861842 + _module.args = { + osConfig = mkDefault null; + nixosConfig = mkDefault null; + darwinConfig = mkDefault null; + }; + }; } diff --git a/modules/misc/uninstall.nix b/modules/misc/uninstall.nix index eeb0fa4f000a..3086d21b8aa6 100644 --- a/modules/misc/uninstall.nix +++ b/modules/misc/uninstall.nix @@ -21,7 +21,7 @@ in { config = mkIf config.uninstall { home.packages = lib.mkForce [ ]; home.file = lib.mkForce { }; - home.stateVersion = lib.mkForce "23.11"; + home.stateVersion = lib.mkForce "24.11"; home.enableNixpkgsReleaseCheck = lib.mkForce false; manual.manpages.enable = lib.mkForce false; news.display = lib.mkForce "silent"; @@ -31,19 +31,19 @@ in { nixProfileRemove home-manager-path if [[ -e $hmDataPath ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG -r "$hmDataPath" + run rm $VERBOSE_ARG -r "$hmDataPath" fi if [[ -e $hmStatePath ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG -r "$hmStatePath" + run rm $VERBOSE_ARG -r "$hmStatePath" fi if [[ -e $genProfilePath ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG "$genProfilePath"* + run rm $VERBOSE_ARG "$genProfilePath"* fi if [[ -e $legacyGenGcPath ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG "$legacyGenGcPath" + run rm $VERBOSE_ARG "$legacyGenGcPath" fi ''; }; diff --git a/modules/misc/version.nix b/modules/misc/version.nix index 048f784abc67..176901f3e0eb 100644 --- a/modules/misc/version.nix +++ b/modules/misc/version.nix @@ -21,6 +21,8 @@ in { "23.05" "23.11" "24.05" + "24.11" + "25.05" ]; description = '' It is occasionally necessary for Home Manager to change diff --git a/modules/misc/xdg-desktop-entries.nix b/modules/misc/xdg-desktop-entries.nix index 7ec7fa56888c..1aab6ffe7276 100644 --- a/modules/misc/xdg-desktop-entries.nix +++ b/modules/misc/xdg-desktop-entries.nix @@ -51,7 +51,7 @@ let terminal = mkOption { description = "Whether the program runs in a terminal window."; - type = types.bool; + type = types.nullOr types.bool; default = false; }; diff --git a/modules/misc/xdg-mime.nix b/modules/misc/xdg-mime.nix index 09f62aaff9aa..78b569fa5334 100644 --- a/modules/misc/xdg-mime.nix +++ b/modules/misc/xdg-mime.nix @@ -5,33 +5,50 @@ with lib; let cfg = config.xdg.mime; + inherit (lib) getExe getExe'; in { options = { - xdg.mime.enable = mkOption { - type = types.bool; - default = pkgs.stdenv.hostPlatform.isLinux; - defaultText = - literalExpression "true if host platform is Linux, false otherwise"; - description = '' - Whether to install programs and files to support the - XDG Shared MIME-info specification and XDG MIME Applications - specification at - - and - , - respectively. - ''; + xdg.mime = { + enable = mkOption { + type = types.bool; + default = pkgs.stdenv.hostPlatform.isLinux; + defaultText = + literalExpression "true if host platform is Linux, false otherwise"; + description = '' + Whether to install programs and files to support the + XDG Shared MIME-info specification and XDG MIME Applications + specification at + + and + , + respectively. + ''; + }; + + sharedMimeInfoPackage = mkOption { + type = types.package; + default = pkgs.shared-mime-info; + defaultText = literalExpression "pkgs.shared-mime-info"; + description = "The package to use when running update-mime-database."; + }; + + desktopFileUtilsPackage = mkOption { + type = types.package; + default = pkgs.desktop-file-utils; + defaultText = literalExpression "pkgs.desktop-file-utils"; + description = + "The package to use when running update-desktop-database."; + }; }; }; - - config = mkIf config.xdg.mime.enable { + config = mkIf cfg.enable { assertions = [ (hm.assertions.assertPlatform "xdg.mime" pkgs platforms.linux) ]; home.packages = [ # Explicitly install package to provide basic mime types. - pkgs.shared-mime-info + cfg.sharedMimeInfoPackage # Make sure the target directories will be real directories. (pkgs.runCommandLocal "dummy-xdg-mime-dirs1" { } '' @@ -46,12 +63,12 @@ in { if [[ -w $out/share/mime && -w $out/share/mime/packages && -d $out/share/mime/packages ]]; then XDG_DATA_DIRS=$out/share \ PKGSYSTEM_ENABLE_FSYNC=0 \ - ${pkgs.buildPackages.shared-mime-info}/bin/update-mime-database \ + ${getExe cfg.sharedMimeInfoPackage} \ -V $out/share/mime > /dev/null fi if [[ -w $out/share/applications ]]; then - ${pkgs.buildPackages.desktop-file-utils}/bin/update-desktop-database \ + ${getExe' cfg.desktopFileUtilsPackage "update-desktop-database"} \ $out/share/applications fi ''; diff --git a/modules/misc/xdg-portal.nix b/modules/misc/xdg-portal.nix index 500e02e0088c..b863b23ec6d1 100644 --- a/modules/misc/xdg-portal.nix +++ b/modules/misc/xdg-portal.nix @@ -2,9 +2,7 @@ let - inherit (lib) - mapAttrsToList mkEnableOption mkIf mkMerge mkOption optional optionalString - types; + inherit (lib) mkIf mkMerge mkOption optional types; associationOptions = with types; attrsOf (coercedTo (either (listOf str) str) @@ -14,8 +12,24 @@ in { meta.maintainers = [ lib.maintainers.misterio77 ]; options.xdg.portal = { - enable = mkEnableOption - "[XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal)"; + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Whether to enable [XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal). + + Note, if you use the NixOS module and have `useUserPackages = true`, + make sure to add + + ``` nix + environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ]; + ``` + + to your system configuration so that the portal definitions and DE + provided configurations get linked. + ''; + }; extraPortals = mkOption { type = types.listOf types.package; @@ -82,28 +96,9 @@ in { 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" ]; - }; + packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + portalsDir = + "${config.home.profileDirectory}/share/xdg-desktop-portal/portals"; in mkIf cfg.enable { warnings = optional (cfg.configPackages == [ ] && cfg.config == { }) '' xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you @@ -129,29 +124,21 @@ in { ]; 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; + packages = packages ++ cfg.configPackages; + sessionVariables = mkMerge [ + (mkIf cfg.xdgOpenUsePortal { NIXOS_XDG_OPEN_USE_PORTAL = "1"; }) + { NIX_XDG_DESKTOP_PORTAL_DIR = portalsDir; } + ]; }; - - 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"; - }; + systemd.user.sessionVariables = { + NIX_XDG_DESKTOP_PORTAL_DIR = portalsDir; }; + + xdg.configFile = lib.concatMapAttrs (desktop: conf: + lib.optionalAttrs (conf != { }) { + "xdg-desktop-portal/${ + lib.optionalString (desktop != "common") "${desktop}-" + }portals.conf".text = lib.generators.toINI { } { preferred = conf; }; + }) cfg.config; }; } diff --git a/modules/misc/xdg-user-dirs.nix b/modules/misc/xdg-user-dirs.nix index fcc0742cd173..1198ea039c1c 100644 --- a/modules/misc/xdg-user-dirs.nix +++ b/modules/misc/xdg-user-dirs.nix @@ -137,7 +137,8 @@ in { home.activation.createXdgUserDirectories = mkIf cfg.createDirectories (let directoriesList = attrValues directories; - mkdir = (dir: ''$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "${dir}"''); + mkdir = + (dir: ''[[ -L "${dir}" ]] || run mkdir -p $VERBOSE_ARG "${dir}"''); in lib.hm.dag.entryAfter [ "linkGeneration" ] (strings.concatMapStringsSep "\n" mkdir directoriesList)); }; diff --git a/modules/misc/xdg.nix b/modules/misc/xdg.nix index 23cbe72a2fb4..b916e88fbab3 100644 --- a/modules/misc/xdg.nix +++ b/modules/misc/xdg.nix @@ -30,6 +30,8 @@ in { apply = toString; description = '' Absolute path to directory holding application caches. + + Sets `XDG_CACHE_HOME` for the user if `xdg.enable` is set `true`. ''; }; @@ -48,6 +50,8 @@ in { apply = toString; description = '' Absolute path to directory holding application configurations. + + Sets `XDG_CONFIG_HOME` for the user if `xdg.enable` is set `true`. ''; }; @@ -67,6 +71,18 @@ in { apply = toString; description = '' Absolute path to directory holding application data. + + Sets `XDG_DATA_HOME` for the user if `xdg.enable` is set `true`. + ''; + }; + + stateFile = mkOption { + type = fileType "xdg.stateFile" "xdg.stateHome" + cfg.stateHome; + default = { }; + description = '' + Attribute set of files to link into the user's XDG + state home. ''; }; @@ -76,6 +92,8 @@ in { apply = toString; description = '' Absolute path to directory holding application states. + + Sets `XDG_STATE_HOME` for the user if `xdg.enable` is set `true`. ''; }; }; @@ -122,6 +140,8 @@ in { cfg.configFile) (mapAttrs' (name: file: nameValuePair "${cfg.dataHome}/${name}" file) cfg.dataFile) + (mapAttrs' (name: file: nameValuePair "${cfg.stateHome}/${name}" file) + cfg.stateFile) { "${cfg.cacheHome}/.keep".text = ""; } ]; } diff --git a/modules/misc/xfconf.nix b/modules/misc/xfconf.nix index ec0cd82d0319..087040085675 100644 --- a/modules/misc/xfconf.nix +++ b/modules/misc/xfconf.nix @@ -106,7 +106,7 @@ in { home.activation.xfconfSettings = hm.dag.entryAfter [ "installPackages" ] (let mkCommand = channel: property: value: '' - $DRY_RUN_CMD ${pkgs.xfce.xfconf}/bin/xfconf-query \ + run ${pkgs.xfce.xfconf}/bin/xfconf-query \ ${ escapeShellArgs ([ "-c" channel "-p" "/${property}" ] ++ (if value == null then @@ -120,8 +120,10 @@ in { (channel: properties: mapAttrsToList (mkCommand channel) properties) cfg.settings; - load = pkgs.writeShellScript "load-xfconf" - (concatMapStrings concatStrings commands); + load = pkgs.writeShellScript "load-xfconf" '' + ${config.lib.bash.initHomeManagerLib} + ${concatMapStrings concatStrings commands} + ''; in '' if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then export DBUS_RUN_SESSION_CMD="" @@ -129,7 +131,7 @@ in { export DBUS_RUN_SESSION_CMD="${pkgs.dbus}/bin/dbus-run-session --dbus-daemon=${pkgs.dbus}/bin/dbus-daemon" fi - $DRY_RUN_CMD $DBUS_RUN_SESSION_CMD ${load} + run $DBUS_RUN_SESSION_CMD ${load} unset DBUS_RUN_SESSION_CMD ''); diff --git a/modules/modules.nix b/modules/modules.nix index 314dfdb8d824..5d40a82fc8f5 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -31,9 +31,11 @@ let ./misc/gtk.nix ./misc/lib.nix ./misc/news.nix + ./misc/nixgl.nix ./misc/numlock.nix ./misc/pam.nix ./misc/qt.nix + ./misc/qt/kconfig.nix ./misc/specialisation.nix ./misc/submodule-support.nix ./misc/tmpfiles.nix @@ -72,9 +74,11 @@ let ./programs/broot.nix ./programs/browserpass.nix ./programs/btop.nix + ./programs/bun.nix ./programs/carapace.nix ./programs/cava.nix ./programs/chromium.nix + ./programs/cmus.nix ./programs/command-not-found/command-not-found.nix ./programs/comodoro.nix ./programs/darcs.nix @@ -85,10 +89,14 @@ let ./programs/emacs.nix ./programs/eww.nix ./programs/eza.nix + ./programs/fastfetch.nix + ./programs/fd.nix ./programs/feh.nix ./programs/firefox.nix ./programs/fish.nix + ./programs/floorp.nix ./programs/foot.nix + ./programs/freetube.nix ./programs/fuzzel.nix ./programs/fzf.nix ./programs/gallery-dl.nix @@ -99,6 +107,7 @@ let ./programs/git-credential-oauth.nix ./programs/git.nix ./programs/gitui.nix + ./programs/gnome-shell.nix ./programs/gnome-terminal.nix ./programs/go.nix ./programs/gpg.nix @@ -112,6 +121,7 @@ let ./programs/hstr.nix ./programs/htop.nix ./programs/hyfetch.nix + ./programs/hyprlock.nix ./programs/i3blocks.nix ./programs/i3status-rust.nix ./programs/i3status.nix @@ -120,9 +130,11 @@ let ./programs/ion.nix ./programs/irssi.nix ./programs/java.nix + ./programs/jetbrains-remote.nix ./programs/jq.nix ./programs/jujutsu.nix ./programs/joshuto.nix + ./programs/joplin-desktop.nix ./programs/just.nix ./programs/k9s.nix ./programs/kakoune.nix @@ -131,6 +143,7 @@ let ./programs/khard.nix ./programs/kitty.nix ./programs/kodi.nix + ./programs/kubecolor.nix ./programs/lazygit.nix ./programs/ledger.nix ./programs/less.nix @@ -147,6 +160,7 @@ let ./programs/mcfly.nix ./programs/mercurial.nix ./programs/micro.nix + ./programs/mise.nix ./programs/mpv.nix ./programs/mr.nix ./programs/msmtp.nix @@ -157,10 +171,13 @@ let ./programs/ncspot.nix ./programs/ne.nix ./programs/neomutt.nix + ./programs/neovide.nix ./programs/neovim.nix ./programs/newsboat.nix + ./programs/nh.nix ./programs/nheko.nix ./programs/nix-index.nix + ./programs/nix-your-shell.nix ./programs/nnn.nix ./programs/noti.nix ./programs/notmuch.nix @@ -180,6 +197,7 @@ let ./programs/pistol.nix ./programs/piston-cli.nix ./programs/pls.nix + ./programs/poetry.nix ./programs/powerline-go.nix ./programs/pqiv.nix ./programs/pubs.nix @@ -187,6 +205,7 @@ let ./programs/pylint.nix ./programs/qcal.nix ./programs/qutebrowser.nix + ./programs/ranger.nix ./programs/rbw.nix ./programs/readline.nix ./programs/rio.nix @@ -194,7 +213,6 @@ let ./programs/rofi-pass.nix ./programs/rofi.nix ./programs/rtorrent.nix - ./programs/rtx.nix ./programs/ruff.nix ./programs/sagemath.nix ./programs/sapling.nix @@ -206,6 +224,7 @@ let ./programs/sioyek.nix ./programs/skim.nix ./programs/sm64ex.nix + ./programs/spotify-player.nix ./programs/sqls.nix ./programs/ssh.nix ./programs/starship.nix @@ -223,12 +242,14 @@ let ./programs/tiny.nix ./programs/tmate.nix ./programs/tmux.nix + ./programs/tofi.nix ./programs/topgrade.nix ./programs/translate-shell.nix ./programs/urxvt.nix ./programs/vdirsyncer.nix - ./programs/vim.nix + ./programs/vifm.nix ./programs/vim-vint.nix + ./programs/vim.nix ./programs/vscode.nix ./programs/vscode/haskell.nix ./programs/pywal.nix @@ -241,21 +262,28 @@ let ./programs/wpaperd.nix ./programs/xmobar.nix ./programs/xplr.nix + ./programs/yambar.nix ./programs/yazi.nix ./programs/yt-dlp.nix ./programs/z-lua.nix ./programs/zathura.nix + ./programs/zed-editor.nix ./programs/zellij.nix + ./programs/zk.nix ./programs/zoxide.nix ./programs/zplug.nix ./programs/zsh.nix ./programs/zsh/prezto.nix ./programs/zsh/zsh-abbr.nix + ./services/activitywatch.nix + ./services/amberol.nix + ./services/arrpc.nix ./services/autorandr.nix ./services/avizo.nix ./services/barrier.nix ./services/batsignal.nix ./services/betterlockscreen.nix + ./services/blanket.nix ./services/blueman-applet.nix ./services/borgmatic.nix ./services/cachix-agent.nix @@ -265,6 +293,7 @@ let ./services/clipman.nix ./services/clipmenu.nix ./services/comodoro.nix + ./services/conky.nix ./services/copyq.nix ./services/darkman.nix ./services/devilspie2.nix @@ -281,17 +310,19 @@ let ./services/fusuma.nix ./services/getmail.nix ./services/git-sync.nix + ./services/glance.nix ./services/gnome-keyring.nix ./services/gpg-agent.nix ./services/grobi.nix ./services/gromit-mpx.nix ./services/home-manager-auto-upgrade.nix ./services/hound.nix + ./services/hypridle.nix + ./services/hyprpaper.nix ./services/imapnotify.nix ./services/kanshi.nix ./services/kbfs.nix ./services/kdeconnect.nix - ./services/keepassx.nix ./services/keybase.nix ./services/keynav.nix ./services/lieer.nix @@ -309,6 +340,7 @@ let ./services/muchsync.nix ./services/network-manager-applet.nix ./services/nextcloud-client.nix + ./services/nix-gc.nix ./services/notify-osd.nix ./services/opensnitch-ui.nix ./services/osmscout-server.nix @@ -322,24 +354,29 @@ let ./services/plan9port.nix ./services/playerctld.nix ./services/plex-mpv-shim.nix + ./services/podman-linux ./services/polybar.nix ./services/poweralertd.nix + ./services/psd.nix ./services/pueue.nix ./services/pulseeffects.nix ./services/random-background.nix ./services/recoll.nix ./services/redshift-gammastep/gammastep.nix ./services/redshift-gammastep/redshift.nix + ./services/remmina.nix ./services/rsibreak.nix ./services/safeeyes.nix ./services/screen-locker.nix ./services/sctd.nix ./services/signaturepdf.nix + ./services/snixembed.nix ./services/spotifyd.nix ./services/ssh-agent.nix ./services/stalonetray.nix ./services/status-notifier-watcher.nix ./services/swayidle.nix + ./services/swaync.nix ./services/swayosd.nix ./services/sxhkd.nix ./services/syncthing.nix @@ -348,6 +385,7 @@ let ./services/tahoe-lafs.nix ./services/taskwarrior-sync.nix ./services/trayer.nix + ./services/trayscale.nix ./services/twmn.nix ./services/udiskie.nix ./services/unclutter.nix @@ -362,9 +400,11 @@ let ./services/window-managers/i3-sway/i3.nix ./services/window-managers/i3-sway/sway.nix ./services/window-managers/i3-sway/swaynag.nix + ./services/window-managers/river.nix ./services/window-managers/spectrwm.nix ./services/window-managers/xmonad.nix ./services/wlsunset.nix + ./services/wob.nix ./services/xcape.nix ./services/xembed-sni-proxy.nix ./services/xidlehook.nix @@ -383,6 +423,9 @@ let (mkRemovedOptionModule [ "services" "password-store-sync" ] '' Use services.git-sync instead. '') + (mkRemovedOptionModule [ "services" "keepassx" ] '' + KeePassX is no longer maintained. + '') ] ++ optional useNixpkgsModule ./misc/nixpkgs.nix ++ optional (!useNixpkgsModule) ./misc/nixpkgs-disabled.nix; diff --git a/modules/po/ar.po b/modules/po/ar.po new file mode 100644 index 000000000000..c2469fa54d17 --- /dev/null +++ b/modules/po/ar.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" diff --git a/modules/po/ca.po b/modules/po/ca.po index 698b38d43d9c..5f94ebb76d74 100644 --- a/modules/po/ca.po +++ b/modules/po/ca.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+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-Team: Czech =2 && n<=4) ? 1 : 2;\n" "X-Generator: Weblate 5.3-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Vytváření linků na domácí soubory v %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Čištění osiřelých linků z %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Vytvářím profil generace %s" -#: modules/files.nix:280 +#: modules/files.nix:237 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 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "Poté zkuste znova aktivovat vaši Home Manager konfiguraci." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Aktivuji %s" @@ -71,15 +71,15 @@ msgstr "Aktivuji %s" msgid "Migrating profile from %s to %s" msgstr "Migruji profil z %s do %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 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 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Kontrola správnosti oldGenNum a oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -107,34 +107,34 @@ msgstr "" "\n" "a zkusit přepínač home‐manager znova. Hodně štěstí!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 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 +#: modules/lib-bash/activation-init.sh:136 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 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Zapínám aktivaci Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Kontrola správnosti Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Toto je zkušební běh" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Toto je běh na ostro" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Používám Nix verze: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Aktivační proměnné:" diff --git a/modules/po/da.po b/modules/po/da.po index 548f1407b04d..acb4666228d0 100644 --- a/modules/po/da.po +++ b/modules/po/da.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-09-27 11:02+0000\n" "Last-Translator: Emil Heilbo \n" "Language-Team: Danish \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-10-15 21:37+0000\n" +"Last-Translator: Viktor Illmer \n" "Language-Team: German \n" "Language: de\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 5.4-dev\n" +"X-Generator: Weblate 5.8-rc\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Erstelle home Dateiverknpfungen in %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Bereinige verwaiste Links unter %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Erstelle Profilgeneration %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Keine Änderungen. Benutze daher letzte Profilgeneration %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 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:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Aktiviere %s" @@ -72,17 +72,17 @@ msgstr "Aktiviere %s" msgid "Migrating profile from %s to %s" msgstr "Migriere das Profil von %s zu %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" "Es konnte kein passendes Profilverzeichnis gefunden werden, %s und %s wurden " "versucht" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Überprüfe zur Sicherheit oldGenNum und oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -110,35 +110,35 @@ msgstr "" "\n" "Führen Sie danach 'home-manager switch' aus. Viel Glück!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Fehler: USER ist auf \"%s\" gesetzt, aber wir erwarten \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Fehler: HOME ist auf \"%s\" gesetzt, aber wir erwarten \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" -msgstr "Starte Home Manager Aktivierung" +msgstr "Starte Home-Manager-Aktivierung" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Überprüfe zur Sicherheit Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Dies ist ein Probelauf" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Dies ist kein Probelauf" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Nutze Nix Version: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Aktivierungsvariablen:" diff --git a/modules/po/es.po b/modules/po/es.po index d6799102b368..0178e6d8bf7d 100644 --- a/modules/po/es.po +++ b/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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-05-27 12:11+0000\n" "Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" +"Language-Team: Persian \n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.5.3-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -48,7 +51,7 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "" @@ -56,15 +59,15 @@ msgstr "" msgid "Migrating profile from %s to %s" msgstr "" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "بعد از امتحان کردن %s و %s , دایرکتوری مناسب برای پروفایل یافت نشد" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -80,34 +83,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" -msgstr "" +msgstr "چک کردن پایداری Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "" diff --git a/modules/po/fi.po b/modules/po/fi.po index 887c0016ce8a..c16c3080773e 100644 --- a/modules/po/fi.po +++ b/modules/po/fi.po @@ -7,32 +7,35 @@ 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" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-05-31 17:09+0000\n" +"Last-Translator: jarre johansson \n" +"Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" -msgstr "" +msgstr "Luodaan kotitiedostolinkkejä sijaintiin %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" -msgstr "" +msgstr "Siivotaan orpoja linkkejä sijainnista %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -48,23 +51,23 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" -msgstr "" +msgstr "Aktivoidaan %s" #: modules/lib-bash/activation-init.sh:22 msgid "Migrating profile from %s to %s" -msgstr "" +msgstr "Siirretään profiilia sijainnista %s kohteeseen %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Sopivaa profiilihakemistoa ei löytynyt, yritettiin %s ja %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -79,35 +82,48 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" +"Edellinen generaation numero ja polku ovat ristiriidassa! Niiden on oltava " +"joko molemmat tyhjiä tai molemmat määritettyjä, mutta ne ovat nyt asetettu " +"seuraavasti:\n" +"\n" +"'%s' ja '%s'\n" +"\n" +"Jos et välitä menettää aiempia profiilin generointeja, niin helpoin ratkaisu " +"on todennäköisesti suorittaa\n" +"\n" +"rm %s/home-manager*\n" +"rm %s/current-home\n" +"\n" +"ja yrittää sitten uudelleen home-manager switch -komentoa. Onnea matkaan!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" -msgstr "" +msgstr "Home Managerin aktivointi käynnistyy" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" -msgstr "" +msgstr "Nixin eheys tarkistetaan" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" -msgstr "" +msgstr "Tämä on testiajo" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" -msgstr "" +msgstr "Aktivointimuuttujat:" diff --git a/modules/po/fr.po b/modules/po/fr.po index 539d9cc5e520..ca50783dc7b0 100644 --- a/modules/po/fr.po +++ b/modules/po/fr.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-07-15 14:49+0000\n" "Last-Translator: swaps \n" "Language-Team: French 1;\n" "X-Generator: Weblate 5.0-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Création des liens de fichiers personnels dans %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Nettoyage des liens orphelins de %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Création de la génération de profil %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Pas de changement, réutilisation du dernier profil génération %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "Après, essayez encore d'activer votre configuration de Home Manager." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Activation de %s" @@ -71,15 +71,15 @@ msgstr "Activation de %s" msgid "Migrating profile from %s to %s" msgstr "Migration du profil de %s vers %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Impossible de trouver le dossier de profil approprié, essayé %s et %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Vérification de oldGenNum et oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -109,35 +109,35 @@ msgstr "" "\n" "et de réessayer home-manager switch. Bonne chance !" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Erreur : USER vaut « %s » mais nous attendions « %s »" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Erreur : HOME vaut « %s » mais nous attendions « %s »" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Démarrage de l'activation de Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Vérification de Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Ceci est une fausse activation (essai à blanc)" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Ceci est une vraie activation" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Version de Nix : %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Variables d'activation :" diff --git a/modules/po/hi.po b/modules/po/hi.po new file mode 100644 index 000000000000..80781aba5640 --- /dev/null +++ b/modules/po/hi.po @@ -0,0 +1,116 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-10-09 14:31+0000\n" +"Last-Translator: Utkarsh Sharma \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.8-dev\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "%s से ऑर्फे़न लिंक्स मिटाई जा रही है" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" diff --git a/modules/po/hm-modules.pot b/modules/po/hm-modules.pot index 3530936d0eb7..7a33a805a218 100644 --- a/modules/po/hm-modules.pot +++ b/modules/po/hm-modules.pot @@ -8,7 +8,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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,23 +17,23 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 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:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "" @@ -57,15 +57,15 @@ msgstr "" msgid "Migrating profile from %s to %s" msgstr "" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -81,34 +81,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "" diff --git a/modules/po/hu.po b/modules/po/hu.po new file mode 100644 index 000000000000..2b013ccc1154 --- /dev/null +++ b/modules/po/hu.po @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-09-02 17:09+0000\n" +"Last-Translator: Ferenci Ákos \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.8-dev\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "Hivatkozások létrehozása itt: %s" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "Árva hivatkozások kitakarítása innen: %s" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "%s. profil generáció létrehozása" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "Nincs változás, legutóbbi %s. generáció lesz használva" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"Nem található megfelelő profil mappa, %s és %s útvonalak lettek kipróbálva." + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "Nix épségének ellenőrzése" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" diff --git a/modules/po/id.po b/modules/po/id.po index 430822963cf0..78db0232ce77 100644 --- a/modules/po/id.po +++ b/modules/po/id.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-10-04 06:02+0000\n" "Last-Translator: Reza Almanda \n" "Language-Team: Indonesian , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: is\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "" diff --git a/modules/po/it.po b/modules/po/it.po index 086d835ba25b..c39d34955707 100644 --- a/modules/po/it.po +++ b/modules/po/it.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-12-02 23:06+0000\n" "Last-Translator: Lorenzo Brzek \n" "Language-Team: Italian \n" "Language-Team: Japanese \n" "Language-Team: Korean \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \n" "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" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"(n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Weblate 5.4\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Kuriamos home failų nuorodos adresu %s" -#: modules/files.nix:247 +#: modules/files.nix:204 #, fuzzy msgid "Cleaning up orphan links from %s" msgstr "Valomos pamestos nuorodos iš %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Kuriama profilio generacija %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Nėra pakeitimų, naudojama paskutinė profilio generacija %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -66,7 +65,7 @@ msgstr "" "\n" "Tada pabandykite aktyvuoti Home Manager konfigūraciją iš naujo." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Aktyvuojamas %s" @@ -74,15 +73,15 @@ msgstr "Aktyvuojamas %s" msgid "Migrating profile from %s to %s" msgstr "Perkeliamas profilis iš %s į %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Nepavyko rasti tinkamo profilio katalogo, bandyta naudoti %s ir %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -98,35 +97,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Pradedamas Home Manager aktivavymas" -#: modules/lib-bash/activation-init.sh:123 -#, fuzzy +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Nix tikrinamas" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Tai yra sausas vykdymas" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Tai yra gyvas vykdymas" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Naudojama Nix versija: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Aktyvavimo kintamieji:" diff --git a/modules/po/nb_NO.po b/modules/po/nb_NO.po index 189731bd9ccf..b3754af0f4b1 100644 --- a/modules/po/nb_NO.po +++ b/modules/po/nb_NO.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-03-08 07:22+0000\n" -"Last-Translator: \"Kim A. Ødegaard\" \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-02 21:38+0000\n" +"Last-Translator: LilleAila \n" "Language-Team: Norwegian Bokmål \n" "Language: nb_NO\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.16.2-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Lager hjemmefillenker i %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Fjerner frakoblede lenker fra %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Oppretter profil for generering %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Ingen endring, gjenbruker derfor siste profilgenerering %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "for så å aktivere ditt Home Manager-oppsett igjen." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Aktiverer %s" @@ -71,15 +71,15 @@ msgstr "Aktiverer %s" msgid "Migrating profile from %s to %s" msgstr "" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" -msgstr "" +msgstr "Kunne ikke finne en passende profilmappe, prøvde %s og %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Kontrollerer verdiene av oldGenNum og oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -107,35 +107,35 @@ msgstr "" "\n" "for så å forsøke `home-manager switch` igjen. Lykke til!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Feil: USER er satt til \"%s\", men vi forventet \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" -msgstr "" +msgstr "Feil: HOME er satt til \"%s\", men vi forventet \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Starter aktivering av Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Kontrollerer at Nix fungerer" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Dette er en simulert kjøring" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Dette er en virkelig kjøring" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Bruker Nix-versjon: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Aktiveringsvariabler:" diff --git a/modules/po/nl.po b/modules/po/nl.po index 3325b7fba3a6..418594aa14a8 100644 --- a/modules/po/nl.po +++ b/modules/po/nl.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-12-02 23:06+0000\n" "Last-Translator: Zurga \n" "Language-Team: Dutch \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-06-17 09:46+0000\n" +"Last-Translator: Mateusz P \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.18-dev\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Weblate 5.6-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Tworzenie dowiązań plików w %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Czyszczenie osieroconych linków z %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Tworzenie profilu generacji %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Brak zmian więc używam ostatniej generacji profilu %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -65,7 +65,7 @@ msgstr "" "\n" "Po czym spróbuj aktywować swoją konfigurację Home Manager jeszcze raz." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Aktywowanie %s" @@ -73,15 +73,15 @@ msgstr "Aktywowanie %s" msgid "Migrating profile from %s to %s" msgstr "Migracja profilu z %s do %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Nie można znaleźć odpowiedniego katalogu profilu, próbowano %s i %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Sprawdzanie poprawności oldGenNum i oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -109,34 +109,38 @@ msgstr "" "\n" "i spróbować uruchomić home-manager switch raz jeszcze. Powodzenia!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "" +"Błąd: Właściwość USER ma wartość \"%s\" podczas gdy spodziewana wartość to \"" +"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "" +"Błąd: Właściwość HOME ma wartość \"%s\" podczas gdy spodziewana wartość to \"" +"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Rozpoczynam aktywację Home Managera" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Sprawdzanie poprawności Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "To jest wykonanie testowe" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "To jest wykonanie właściwe" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Używając wersji Nix: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Zmienne aktywacyjne:" diff --git a/modules/po/pt.po b/modules/po/pt.po index 9fb5bb415dea..9bd5144a8136 100644 --- a/modules/po/pt.po +++ b/modules/po/pt.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-10-19 04:00+0000\n" "Last-Translator: SrGesus \n" "Language-Team: Portuguese 1;\n" "X-Generator: Weblate 5.1\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "A criar links simbólicos em %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "A limpar links órfãos do directório %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "A criar geração %s para o perfil" -#: modules/files.nix:280 +#: modules/files.nix:237 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:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "E então tente novamente ativar a sua configuração do Home Manager." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Ativando %s" @@ -71,17 +71,17 @@ msgstr "Ativando %s" msgid "Migrating profile from %s to %s" msgstr "A migrar perfil de %s para %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 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 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Revalidando oldGenNum e oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -109,34 +109,34 @@ msgstr "" "\n" "e tentar executar \"home-manager switch\" de novo. Boa sorte!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Erro: USER está definido como \"%s\" mas é esperado \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Erro: HOME está definida como \"%s\" mas é esperado \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Iniciando ativação do Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Revalidando Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Essa é uma execução de teste" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Essa é uma execução de fato" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Usando versão do Nix: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Variáveis durante ativação:" diff --git a/modules/po/pt_BR.po b/modules/po/pt_BR.po index c4858b205615..83d01927c0c1 100644 --- a/modules/po/pt_BR.po +++ b/modules/po/pt_BR.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-11-30 15:04+0000\n" -"Last-Translator: Gabriel Fontes \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-19 17:07+0000\n" +"Last-Translator: Felipe Silva \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\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 5.3-dev\n" +"X-Generator: Weblate 5.5-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Criando links simbólicos em %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" -msgstr "Limpando links órfãos do directório %s" +msgstr "Limpando links órfãos de %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" -msgstr "Criando geração %s para o perfil" +msgstr "Criando perfil de geração %s" -#: modules/files.nix:280 +#: modules/files.nix:237 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:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,7 +63,7 @@ msgstr "" "\n" "E então tente novamente ativar a sua configuração do Home Manager." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Ativando %s" @@ -71,16 +71,16 @@ msgstr "Ativando %s" msgid "Migrating profile from %s to %s" msgstr "Migrando perfil de %s para %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 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" +"Não foi possível encontrar um diretório de perfil apropriado, tentou %s e %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Revalidando oldGenNum e oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -108,34 +108,34 @@ msgstr "" "\n" "e tentar rodar \"home-manager switch\" de novo. Boa sorte!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Erro: USER está definido como \"%s\" mas o esperado é \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Erro: HOME está definido como \"%s\" mas o esperado é \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Iniciando ativação do Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Revalidando Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Essa é uma execução de teste" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Essa é uma execução de fato" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Usando versão do Nix: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Variáveis durante ativação:" diff --git a/modules/po/ro.po b/modules/po/ro.po index 98bd13a80822..71e9243c9b4a 100644 --- a/modules/po/ro.po +++ b/modules/po/ro.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-09-13 23:46+0200\n" -"PO-Revision-Date: 2023-08-11 19:51+0000\n" -"Last-Translator: HeartBlin913861820c094e37 \n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-10-13 22:15+0000\n" +"Last-Translator: AtomicDude \n" "Language-Team: Romanian \n" "Language: ro\n" @@ -18,25 +18,25 @@ msgstr "" "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" +"X-Generator: Weblate 5.8-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Se creează legături ale fișierelor personale în %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" -msgstr "Se curăță legăturiile orfane din %s" +msgstr "Se curăță legăturile orfane din %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Se creează generația %s a profilului" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Nicio schimbare, se reutilizează ultimul profil generat %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "Apoi încearcă să activați configurația ta Home Manager din nou." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Se activează %s" @@ -72,16 +72,16 @@ msgstr "Se activează %s" msgid "Migrating profile from %s to %s" msgstr "Se migrează profilul de la %s la %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 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 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Se verifică corectitudinea oldGenNum și oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -110,34 +110,34 @@ msgstr "" "\n" "și să încerci să rulezi home-manager switch din nou. Mult noroc!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Eroare: USER este setat la \"%s\", dar noi ne așteptam la \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Eroare: HOME este setat la \"%s\", dar noi ne așteptam la \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Se pornește activarea Home Managerului" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Se verifică corectitudinea Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Aceasta este o rulare simulată" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Aceasta este o rulare directă" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Folosind versiunea Nix: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Variabile de activație:" diff --git a/modules/po/ru.po b/modules/po/ru.po index 0cf99a0f37cb..432da018d726 100644 --- a/modules/po/ru.po +++ b/modules/po/ru.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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-12-11 16:06+0000\n" "Last-Translator: Blezz Rot \n" "Language-Team: Russian =20) ? 1 : 2;\n" "X-Generator: Weblate 5.3-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Создаю ссылки в домашней директории %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Удаляю устаревшие ссылки из %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Создаю профиль в поколении %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Изменений нет, переиспользую профиль в последнем поколении %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,7 +64,7 @@ msgstr "" "\n" "После попробуйте активировать конфигурацию снова." -#: modules/home-environment.nix:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Активирую %s" @@ -72,15 +72,15 @@ msgstr "Активирую %s" msgid "Migrating profile from %s to %s" msgstr "Переношу профиль из %s в %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Не найдена подходящая директория профиля, пробовали %s и %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Проверка oldGenNum и oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -109,35 +109,35 @@ msgstr "" "\n" "и повторный запуск 'home-manager switch'. Удачи!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Ошибка: USER установлена в \"%s\", но ожидается \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Ошибка: HOME установлена в \"%s\", но ожидается \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Начинаю активацию Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Проверка работоспособности Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Это пробный запуск" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Это реальный запуск" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Использую Nix версии: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Переменные для активации:" diff --git a/modules/po/sv.po b/modules/po/sv.po index f42ebeb42a39..266a84d8d8be 100644 --- a/modules/po/sv.po +++ b/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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" "PO-Revision-Date: 2023-05-27 12:11+0000\n" "Last-Translator: Robert Helgesson \n" "Language-Team: Swedish \n" "Language-Team: Turkish \n" "Language-Team: Ukrainian =20) ? 1 : 2;\n" "X-Generator: Weblate 5.4-dev\n" -#: modules/files.nix:234 +#: modules/files.nix:191 msgid "Creating home file links in %s" msgstr "Створення посилань на файли в домашньому каталозі в %s" -#: modules/files.nix:247 +#: modules/files.nix:204 msgid "Cleaning up orphan links from %s" msgstr "Очищення невідомих посилань із %s" -#: modules/files.nix:263 +#: modules/files.nix:220 msgid "Creating profile generation %s" msgstr "Створення генерації профілю %s" -#: modules/files.nix:280 +#: modules/files.nix:237 msgid "No change so reusing latest profile generation %s" msgstr "Без змін, тому повторне використання останньої генерації профілю %s" -#: modules/home-environment.nix:640 +#: modules/home-environment.nix:634 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:673 +#: modules/home-environment.nix:667 msgid "Activating %s" msgstr "Активація %s" @@ -72,15 +72,15 @@ msgstr "Активація %s" msgid "Migrating profile from %s to %s" msgstr "Перенесення профілю з %s на %s" -#: modules/lib-bash/activation-init.sh:53 +#: modules/lib-bash/activation-init.sh:54 msgid "Could not find suitable profile directory, tried %s and %s" msgstr "Не вдалося знайти відповідний каталог профілю, спробував %s і %s" -#: modules/lib-bash/activation-init.sh:81 +#: modules/lib-bash/activation-init.sh:83 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Перевірка цілісності oldGenNum та oldGenPath" -#: modules/lib-bash/activation-init.sh:84 +#: modules/lib-bash/activation-init.sh:86 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -109,35 +109,35 @@ msgstr "" "\n" "і знову намагатися переключитися на home-manager switch. Удачі!" -#: modules/lib-bash/activation-init.sh:95 +#: modules/lib-bash/activation-init.sh:127 msgid "Error: USER is set to \"%s\" but we expect \"%s\"" msgstr "Помилка: USER встановлено на \"%s\", але очікувалося \"%s\"" -#: modules/lib-bash/activation-init.sh:104 +#: modules/lib-bash/activation-init.sh:136 msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" msgstr "Помилка: HOME встановлено на \"%s\", але очікувалося \"%s\"" -#: modules/lib-bash/activation-init.sh:119 +#: modules/lib-bash/activation-init.sh:153 msgid "Starting Home Manager activation" msgstr "Початок активації Home Manager" -#: modules/lib-bash/activation-init.sh:123 +#: modules/lib-bash/activation-init.sh:157 msgid "Sanity checking Nix" msgstr "Перевірка адекватності Nix" -#: modules/lib-bash/activation-init.sh:133 +#: modules/lib-bash/activation-init.sh:170 msgid "This is a dry run" msgstr "Це пробний запуск" -#: modules/lib-bash/activation-init.sh:137 +#: modules/lib-bash/activation-init.sh:174 msgid "This is a live run" msgstr "Це справжній запуск" -#: modules/lib-bash/activation-init.sh:143 +#: modules/lib-bash/activation-init.sh:180 msgid "Using Nix version: %s" msgstr "Використання версії Nix: %s" -#: modules/lib-bash/activation-init.sh:146 +#: modules/lib-bash/activation-init.sh:183 msgid "Activation variables:" msgstr "Активація змінних:" diff --git a/modules/po/vi.po b/modules/po/vi.po new file mode 100644 index 000000000000..827e32066dca --- /dev/null +++ b/modules/po/vi.po @@ -0,0 +1,116 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-08-01 04:09+0000\n" +"Last-Translator: goatastronaut0212 \n" +"Language-Team: Vietnamese \n" +"Language: vi\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.7-dev\n" + +#: modules/files.nix:191 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:204 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:220 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:237 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:634 +msgid "" +"Oops, Nix failed to install your new Home Manager profile!\n" +"\n" +"Perhaps there is a conflict with a package that was installed using\n" +"\"%s\"? Try running\n" +"\n" +" %s\n" +"\n" +"and if there is a conflicting package you can remove it with\n" +"\n" +" %s\n" +"\n" +"Then try activating your Home Manager configuration again." +msgstr "" + +#: modules/home-environment.nix:667 +msgid "Activating %s" +msgstr "Đang khởi động %s" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Chuyển đổi hồ sơ từ %s tới %s" + +#: modules/lib-bash/activation-init.sh:54 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Không thể tìm thấy thư mục hồ sơ phù hợp, đã thử %s và %s" + +#: modules/lib-bash/activation-init.sh:83 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:86 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:127 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Lỗi: USER được đặt thành \"%s\" nhưng chúng tôi kỳ vọng \"%s\"" + +#: modules/lib-bash/activation-init.sh:136 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Lỗi: HOME được đặt thành \"%s\" nhưng chúng tôi kỳ vọng \"%s\"" + +#: modules/lib-bash/activation-init.sh:153 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:157 +msgid "Sanity checking Nix" +msgstr "Kiểm tra hợp lệ của Nix" + +#: modules/lib-bash/activation-init.sh:170 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:174 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:180 +msgid "Using Nix version: %s" +msgstr "Phiên bản Nix đươc sử dụng: %s" + +#: modules/lib-bash/activation-init.sh:183 +msgid "Activation variables:" +msgstr "Các biến được kích hoạt:" diff --git a/modules/po/zh_Hans.po b/modules/po/zh_Hans.po index bf5c1c45a874..970dde4affe5 100644 --- a/modules/po/zh_Hans.po +++ b/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-09-13 23:46+0200\n" +"POT-Creation-Date: 2024-04-17 23:19+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) + `from_shell` (optional) : whether the verb must be executed from the parent shell (default: `false`) ''; diff --git a/modules/programs/bun.nix b/modules/programs/bun.nix new file mode 100644 index 000000000000..f186982e2761 --- /dev/null +++ b/modules/programs/bun.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.bun; + tomlFormat = pkgs.formats.toml { }; +in { + meta.maintainers = [ lib.hm.maintainers.jack5079 ]; + + options.programs.bun = { + enable = lib.mkEnableOption "Bun JavaScript runtime"; + + package = lib.mkPackageOption pkgs "bun" { }; + + settings = lib.mkOption { + type = tomlFormat.type; + default = { }; + example = lib.literalExpression '' + { + smol = true; + telemetry = false; + test = { + coverage = true; + coverageThreshold = 0.9; + }; + install.lockfile = { + print = "yarn"; + }; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/.bunfig.toml`. + + See + for the full list of options. + ''; + }; + + enableGitIntegration = lib.mkEnableOption "Git integration" // { + default = true; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile.".bunfig.toml" = lib.mkIf (cfg.settings != { }) { + source = tomlFormat.generate "bun-config" cfg.settings; + }; + + # https://bun.sh/docs/install/lockfile#how-do-i-git-diff-bun-s-lockfile + programs.git.attributes = + lib.mkIf cfg.enableGitIntegration [ "*.lockb binary diff=lockb" ]; + programs.git.extraConfig.diff.lockb = lib.mkIf cfg.enableGitIntegration { + textconv = lib.getExe cfg.package; + binary = true; + }; + }; +} diff --git a/modules/programs/cmus.nix b/modules/programs/cmus.nix new file mode 100644 index 000000000000..ac3e46ee1251 --- /dev/null +++ b/modules/programs/cmus.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.cmus; + +in { + meta.maintainers = [ hm.maintainers.joygnu ]; + + options.programs.cmus = { + enable = mkEnableOption "Enable cmus, the music player."; + + theme = mkOption { + type = types.lines; + default = ""; + example = "gruvbox"; + description = '' + Select color theme. A list of available color themes can be found + here: . + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + example = '' + set audio_backend = "mpd" + set status_display = "default" + ''; + description = "Extra configuration to add to cmus {file}`rc`."; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.cmus ]; + + home.file.".config/cmus/rc".text = '' + ${optionalString (cfg.theme != "") "colorscheme ${cfg.theme}"} + ${cfg.extraConfig} + ''; + }; +} diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index fcbc46346c57..37899c4a2355 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -1,8 +1,8 @@ { config, lib, pkgs, ... }: - -with lib; - let + inherit (lib) + mkOption mkRenamedOptionModule mkRemovedOptionModule mkEnableOption types + mkPackageOption mkIf mkAfter getExe; cfg = config.programs.direnv; @@ -19,7 +19,7 @@ in { "Flake support is now always enabled.") ]; - meta.maintainers = [ maintainers.rycee ]; + meta.maintainers = [ lib.maintainers.rycee lib.maintainers.shikanime ]; options.programs.direnv = { enable = mkEnableOption "direnv, the environment switcher"; @@ -95,6 +95,15 @@ in { package = mkPackageOption pkgs "nix-direnv" { }; }; + mise = { + enable = mkEnableOption '' + [mise](https://mise.jdx.dev/direnv.html), + integration of use_mise for direnv''; + + package = mkPackageOption pkgs "mise" { }; + }; + + silent = mkEnableOption "silent mode, that is, disabling direnv logging"; }; config = mkIf cfg.enable { @@ -104,11 +113,18 @@ in { source = tomlFormat.generate "direnv-config" cfg.config; }; - xdg.configFile."direnv/direnvrc" = let - text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib - ++ optional cfg.nix-direnv.enable - "source ${cfg.nix-direnv.package}/share/nix-direnv/direnvrc"); - in mkIf (text != "") { inherit text; }; + xdg.configFile."direnv/lib/hm-nix-direnv.sh" = mkIf cfg.nix-direnv.enable { + source = "${cfg.nix-direnv.package}/share/nix-direnv/direnvrc"; + }; + + xdg.configFile."direnv/direnvrc" = + lib.mkIf (cfg.stdlib != "") { text = cfg.stdlib; }; + + xdg.configFile."direnv/lib/hm-mise.sh" = mkIf cfg.mise.enable { + text = '' + eval "$(${getExe cfg.mise.package} direnv activate)" + ''; + }; programs.bash.initExtra = mkIf cfg.enableBashIntegration ( # Using mkAfter to make it more likely to appear after other @@ -128,39 +144,34 @@ in { ${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.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 - } - ) - ''); + # Using mkAfter to make it more likely to appear after other + # manipulations of the prompt. + programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration (mkAfter '' + $env.config = ($env.config? | default {}) + $env.config.hooks = ($env.config.hooks? | default {}) + $env.config.hooks.pre_prompt = ( + $env.config.hooks.pre_prompt? + | default [] + | append {|| + ${getExe cfg.package} export json + | from json --strict + | default {} + | items {|key, value| + let value = do ( + $env.ENV_CONVERSIONS? + | default {} + | get -i $key + | get -i from_string + | default {|x| $x} + ) $value + return [ $key $value ] + } + | into record + | load-env + } + ) + ''); + + home.sessionVariables = lib.mkIf cfg.silent { DIRENV_LOG_FORMAT = ""; }; }; } diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index 7f573c79fdd8..d63721494d2b 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -9,7 +9,7 @@ let # Copied from all-packages.nix, with modifications to support # overrides. emacsPackages = let epkgs = pkgs.emacsPackagesFor cfg.package; - in epkgs.overrideScope' cfg.overrides; + in epkgs.overrideScope cfg.overrides; emacsWithPackages = emacsPackages.emacsWithPackages; diff --git a/modules/programs/eww.nix b/modules/programs/eww.nix index 3d178f9420aa..75a109226c79 100644 --- a/modules/programs/eww.nix +++ b/modules/programs/eww.nix @@ -5,6 +5,7 @@ with lib; let cfg = config.programs.eww; + ewwCmd = "${cfg.package}/bin/eww"; in { meta.maintainers = [ hm.maintainers.mainrs ]; @@ -30,10 +31,40 @@ in { {file}`$XDG_CONFIG_HOME/eww`. ''; }; + + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; }; config = mkIf cfg.enable { home.packages = [ cfg.package ]; xdg.configFile."eww".source = cfg.configDir; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration '' + if [[ $TERM != "dumb" ]]; then + eval "$(${ewwCmd} shell-completions --shell bash)" + fi + ''; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + if [[ $TERM != "dumb" ]]; then + eval "$(${ewwCmd} shell-completions --shell zsh)" + fi + ''; + + programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + if test "$TERM" != "dumb" + eval "$(${ewwCmd} shell-completions --shell fish)" + end + ''; }; } diff --git a/modules/programs/eza.nix b/modules/programs/eza.nix index 0c6c5d7e5b56..f35912b8c822 100644 --- a/modules/programs/eza.nix +++ b/modules/programs/eza.nix @@ -4,16 +4,40 @@ with lib; { imports = let + msg = '' + 'programs.eza.enableAliases' has been deprecated and replaced with integration + options per shell, for example, 'programs.eza.enableBashIntegration'. + + Note, the default for these options is 'true' so if you want to enable the + aliases you can simply remove 'programs.eza.enableAliases' from your + configuration.''; mkRenamed = opt: mkRenamedOptionModule [ "programs" "exa" opt ] [ "programs" "eza" opt ]; - in map mkRenamed [ "enable" "enableAliases" "extraOptions" "icons" "git" ]; + in (map mkRenamed [ "enable" "extraOptions" "icons" "git" ]) + ++ [ (mkRemovedOptionModule [ "programs" "eza" "enableAliases" ] msg) ]; meta.maintainers = [ maintainers.cafkafk ]; options.programs.eza = { enable = mkEnableOption "eza, a modern replacement for {command}`ls`"; - enableAliases = mkEnableOption "recommended eza aliases (ls, ll…)"; + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; + + enableIonIntegration = mkEnableOption "Ion integration" // { + default = true; + }; + + enableNushellIntegration = mkEnableOption "Nushell integration"; extraOptions = mkOption { type = types.listOf types.str; @@ -25,10 +49,21 @@ with lib; }; icons = mkOption { - type = types.bool; - default = false; + type = types.enum [ null true false "auto" "always" "never" ]; + default = null; description = '' Display icons next to file names ({option}`--icons` argument). + + Note, the support for Boolean values is deprecated. + Setting this option to `true` corresponds to `--icons=auto`. + ''; + }; + + colors = mkOption { + type = types.enum [ null "auto" "always" "never" ]; + default = null; + description = '' + Use terminal colors in output ({option}`--color` argument). ''; }; @@ -46,12 +81,20 @@ with lib; config = let cfg = config.programs.eza; - args = escapeShellArgs (optional cfg.icons "--icons" + iconsOption = let + v = if isBool cfg.icons then + (if cfg.icons then "auto" else null) + else + cfg.icons; + in optionals (v != null) [ "--icons" v ]; + + args = escapeShellArgs (iconsOption + ++ optionals (cfg.colors != null) [ "--color" cfg.colors ] ++ optional cfg.git "--git" ++ cfg.extraOptions); - aliases = { - eza = "eza ${args}"; - } // optionalAttrs cfg.enableAliases { + optionsAlias = optionalAttrs (args != "") { eza = "eza ${args}"; }; + + aliases = builtins.mapAttrs (_name: value: lib.mkDefault value) { ls = "eza"; ll = "eza -l"; la = "eza -a"; @@ -59,16 +102,36 @@ with lib; lla = "eza -la"; }; in mkIf cfg.enable { + warnings = optional (isBool cfg.icons) '' + Setting programs.eza.icons to a Boolean is deprecated. + Please update your configuration so that + + programs.eza.icons = ${if cfg.icons then ''"auto"'' else "null"}''; + home.packages = [ cfg.package ]; - programs.bash.shellAliases = aliases; + programs.bash.shellAliases = optionsAlias + // optionalAttrs cfg.enableBashIntegration aliases; + + programs.zsh.shellAliases = optionsAlias + // optionalAttrs cfg.enableZshIntegration aliases; - programs.zsh.shellAliases = aliases; + programs.fish = mkMerge [ + (mkIf (!config.programs.fish.preferAbbrs) { + shellAliases = optionsAlias + // optionalAttrs cfg.enableFishIntegration aliases; + }) - programs.fish.shellAliases = aliases; + (mkIf config.programs.fish.preferAbbrs { + shellAliases = optionsAlias; + shellAbbrs = optionalAttrs cfg.enableFishIntegration aliases; + }) + ]; - programs.ion.shellAliases = aliases; + programs.ion.shellAliases = optionsAlias + // optionalAttrs cfg.enableIonIntegration aliases; - programs.nushell.shellAliases = aliases; + programs.nushell.shellAliases = optionsAlias + // optionalAttrs cfg.enableNushellIntegration aliases; }; } diff --git a/modules/programs/fastfetch.nix b/modules/programs/fastfetch.nix new file mode 100644 index 000000000000..55a932f9a14a --- /dev/null +++ b/modules/programs/fastfetch.nix @@ -0,0 +1,67 @@ +{ pkgs, lib, config, ... }: + +let + inherit (lib) mkEnableOption mkPackageOption mkOption mkIf literalExpression; + + cfg = config.programs.fastfetch; + + jsonFormat = pkgs.formats.json { }; +in { + meta.maintainers = with lib.hm.maintainers; [ afresquet ]; + + options.programs.fastfetch = { + enable = mkEnableOption "Fastfetch"; + + package = mkPackageOption pkgs "fastfetch" { }; + + settings = mkOption { + type = jsonFormat.type; + default = { }; + example = literalExpression '' + { + logo = { + source = "nixos_small"; + padding = { + right = 1; + }; + }; + display = { + size = { + binaryPrefix = "si"; + }; + color = "blue"; + separator = "  "; + }; + modules = [ + { + type = "datetime"; + key = "Date"; + format = "{1}-{3}-{11}"; + } + { + type = "datetime"; + key = "Time"; + format = "{14}:{17}:{20}"; + } + "break" + "player" + "media" + ]; + }; + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/fastfetch/config.jsonc`. + See + for the documentation. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."fastfetch/config.jsonc" = mkIf (cfg.settings != { }) { + source = jsonFormat.generate "config.jsonc" cfg.settings; + }; + }; +} diff --git a/modules/programs/fd.nix b/modules/programs/fd.nix new file mode 100644 index 000000000000..f8f59eb5447c --- /dev/null +++ b/modules/programs/fd.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, ... }: +with lib; { + meta.maintainers = [ maintainers.uncenter ]; + + options.programs.fd = { + enable = mkEnableOption + "fd, a simple, fast and user-friendly alternative to {command}`find`"; + + ignores = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ ".git/" "*.bak" ]; + description = "List of paths that should be globally ignored."; + }; + + hidden = mkOption { + type = types.bool; + default = false; + description = '' + Search hidden files and directories ({option}`--hidden` argument). + ''; + }; + + extraOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--no-ignore" "--absolute-path" ]; + description = '' + Extra command line options passed to fd. + ''; + }; + + package = mkPackageOption pkgs "fd" { }; + }; + + config = let + cfg = config.programs.fd; + + args = escapeShellArgs (optional cfg.hidden "--hidden" ++ cfg.extraOptions); + + optionsAlias = optionalAttrs (args != "") { fd = "fd ${args}"; }; + in mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.bash.shellAliases = optionsAlias; + + programs.zsh.shellAliases = optionsAlias; + + programs.fish.shellAliases = optionsAlias; + + programs.ion.shellAliases = optionsAlias; + + programs.nushell.shellAliases = optionsAlias; + + xdg.configFile."fd/ignore" = mkIf (cfg.ignores != [ ]) { + text = concatStringsSep "\n" cfg.ignores + "\n"; + }; + }; +} diff --git a/modules/programs/feh.nix b/modules/programs/feh.nix index f44f184a3132..bef9caac33c7 100644 --- a/modules/programs/feh.nix +++ b/modules/programs/feh.nix @@ -8,6 +8,12 @@ let bindingsOf = t: with types; attrsOf (nullOr (either t (listOf t))); + renderThemes = options: + let + render = + mapAttrsToList (theme: options: "${theme} ${escapeShellArgs options}"); + in concatStringsSep "\n" (render options); + renderBindings = bindings: let enabled = filterAttrs (n: v: v != null) bindings; @@ -41,7 +47,7 @@ in { Override feh's default mouse button mapping. If you want to disable an action, set its value to null. If you want to bind multiple buttons to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; @@ -58,10 +64,37 @@ in { Override feh's default keybindings. If you want to disable a keybinding set its value to null. If you want to bind multiple keys to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; + + themes = mkOption { + default = { }; + type = with types; attrsOf (listOf str); + example = { + feh = [ "--image-bg" "black" ]; + webcam = [ "--multiwindow" "--reload" "20" ]; + present = [ "--full-screen" "--sort" "name" "--hide-pointer" ]; + booth = [ "--full-screen" "--hide-pointer" "--slideshow-delay" "20" ]; + imagemap = [ + "-rVq" + "--thumb-width" + "40" + "--thumb-height" + "30" + "--index-info" + "%n\\n%wx%h" + ]; + example = [ "--info" "foo bar" ]; + }; + description = '' + Define themes for feh. + See for + important guidelines and limitations related to theme configuration. + ''; + }; + }; config = mkIf cfg.enable { @@ -79,5 +112,8 @@ in { xdg.configFile."feh/keys" = mkIf (cfg.keybindings != { }) { text = renderBindings cfg.keybindings + "\n"; }; + + xdg.configFile."feh/themes" = + mkIf (cfg.themes != { }) { text = renderThemes cfg.themes + "\n"; }; }; } diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index 2ce67776d30d..2a2667c35efc 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -1,865 +1,50 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: with lib; let - inherit (pkgs.stdenv.hostPlatform) isDarwin; + modulePath = [ "programs" "firefox" ]; - cfg = config.programs.firefox; + moduleName = concatStringsSep "." modulePath; - jsonFormat = pkgs.formats.json { }; - - mozillaConfigPath = - if isDarwin then "Library/Application Support/Mozilla" else ".mozilla"; - - firefoxConfigPath = if isDarwin then - "Library/Application Support/Firefox" - else - "${mozillaConfigPath}/firefox"; - - profilesPath = - if isDarwin then "${firefoxConfigPath}/Profiles" else firefoxConfigPath; - - # The extensions path shared by all profiles; will not be supported - # by future Firefox versions. - extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; - - profiles = flip mapAttrs' cfg.profiles (_: profile: - nameValuePair "Profile${toString profile.id}" { - Name = profile.name; - Path = if isDarwin then "Profiles/${profile.path}" else profile.path; - IsRelative = 1; - Default = if profile.isDefault then 1 else 0; - }) // { - General = { StartWithLastProfile = 1; }; - }; - - profilesIni = generators.toINI { } profiles; - - userPrefValue = pref: - builtins.toJSON (if isBool pref || isInt pref || isString pref then - pref - else - builtins.toJSON pref); - - mkUserJs = prefs: extraPrefs: bookmarks: - let - prefs' = lib.optionalAttrs ([ ] != bookmarks) { - "browser.bookmarks.file" = toString (firefoxBookmarksFile bookmarks); - "browser.places.importBookmarksHTML" = true; - } // prefs; - in '' - // Generated by Home Manager. - - ${concatStrings (mapAttrsToList (name: value: '' - user_pref("${name}", ${userPrefValue value}); - '') prefs')} - - ${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: - lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); - - bookmarkToHTML = indentLevel: bookmark: - '' - ${indent indentLevel}
${escapeXML bookmark.name}''; - - directoryToHTML = indentLevel: directory: '' - ${indent indentLevel}
${ - if directory.toolbar then - '' -

Bookmarks Toolbar'' - else - ''

${escapeXML directory.name}'' - }

- ${indent indentLevel}

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

''; - - itemToHTMLOrRecurse = indentLevel: item: - if item ? "url" then - bookmarkToHTML indentLevel item - else - directoryToHTML indentLevel item; - - allItemsToHTML = indentLevel: bookmarks: - lib.concatStringsSep "\n" - (map (itemToHTMLOrRecurse indentLevel) bookmarks); - - bookmarkEntries = allItemsToHTML 1 bookmarks; - in pkgs.writeText "firefox-bookmarks.html" '' - - - - Bookmarks -

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 = (old.extraPolicies or { }) // cfg.policies; - }) - else - (pkgs.wrapFirefox.override { config = bcfg; }) package { }; + mkFirefoxModule = import ./firefox/mkFirefoxModule.nix; in { - meta.maintainers = [ maintainers.rycee maintainers.kira-bruneau ]; + meta.maintainers = [ maintainers.rycee hm.maintainers.bricked ]; imports = [ - (mkRemovedOptionModule [ "programs" "firefox" "extensions" ] '' + (mkFirefoxModule { + inherit modulePath; + name = "Firefox"; + wrappedPackageName = "firefox"; + unwrappedPackageName = "firefox-unwrapped"; + visible = true; + + platforms.linux = rec { + vendorPath = ".mozilla"; + configPath = "${vendorPath}/firefox"; + }; + platforms.darwin = { + vendorPath = "Library/Application Support/Mozilla"; + configPath = "Library/Application Support/Firefox"; + }; + }) + + (mkRemovedOptionModule (modulePath ++ [ "extensions" ]) '' Extensions are now managed per-profile. That is, change from - programs.firefox.extensions = [ foo bar ]; + ${moduleName}.extensions = [ foo bar ]; to - programs.firefox.profiles.myprofile.extensions = [ foo bar ];'') - (mkRemovedOptionModule [ "programs" "firefox" "enableAdobeFlash" ] + ${moduleName}.profiles.myprofile.extensions = [ foo bar ];'') + (mkRemovedOptionModule (modulePath ++ [ "enableAdobeFlash" ]) "Support for this option has been removed.") - (mkRemovedOptionModule [ "programs" "firefox" "enableGoogleTalk" ] + (mkRemovedOptionModule (modulePath ++ [ "enableGoogleTalk" ]) "Support for this option has been removed.") - (mkRemovedOptionModule [ "programs" "firefox" "enableIcedTea" ] + (mkRemovedOptionModule (modulePath ++ [ "enableIcedTea" ]) "Support for this option has been removed.") ]; - - options = { - programs.firefox = { - enable = mkEnableOption "Firefox"; - - package = mkOption { - type = with types; nullOr package; - default = if versionAtLeast config.home.stateVersion "19.09" then - pkgs.firefox - else - pkgs.firefox-unwrapped; - defaultText = literalExpression "pkgs.firefox"; - example = literalExpression '' - pkgs.firefox.override { - # See nixpkgs' firefox/wrapper.nix to check which options you can use - nativeMessagingHosts = [ - # Gnome shell native connector - pkgs.gnome-browser-connector - # Tridactyl native connector - 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. - ''; - }; - - 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 = { - name = mkOption { - type = types.str; - default = name; - description = "Profile name."; - }; - - id = mkOption { - type = types.ints.unsigned; - default = 0; - description = '' - Profile ID. This should be set to a unique number per profile. - ''; - }; - - settings = mkOption { - type = types.attrsOf (jsonFormat.type // { - description = - "Firefox preference (int, bool, string, and also attrs, list, float as a JSON string)"; - }); - default = { }; - example = literalExpression '' - { - "browser.startup.homepage" = "https://nixos.org"; - "browser.search.region" = "GB"; - "browser.search.isUS" = false; - "distribution.searchplugins.defaultLocale" = "en-GB"; - "general.useragent.locale" = "en-GB"; - "browser.bookmarks.showMobileBookmarks" = true; - "browser.newtabpage.pinned" = [{ - title = "NixOS"; - url = "https://nixos.org"; - }]; - } - ''; - description = '' - Attribute set of Firefox preferences. - - Firefox only supports int, bool, and string types for - preferences, but home-manager will automatically - convert all other JSON-compatible values into strings. - ''; - }; - - extraConfig = mkOption { - type = types.lines; - default = ""; - description = '' - Extra preferences to add to {file}`user.js`. - ''; - }; - - userChrome = mkOption { - type = types.lines; - default = ""; - description = "Custom Firefox user chrome CSS."; - example = '' - /* Hide tab bar in FF Quantum */ - @-moz-document url("chrome://browser/content/browser.xul") { - #TabsToolbar { - visibility: collapse !important; - margin-bottom: 21px !important; - } - - #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { - visibility: collapse !important; - } - } - ''; - }; - - userContent = mkOption { - type = types.lines; - default = ""; - description = "Custom Firefox user content CSS."; - example = '' - /* Hide scrollbar in FF Quantum */ - *{scrollbar-width:none !important} - ''; - }; - - bookmarks = mkOption { - type = let - bookmarkSubmodule = types.submodule ({ config, name, ... }: { - options = { - name = mkOption { - type = types.str; - default = name; - description = "Bookmark name."; - }; - - tags = mkOption { - type = types.listOf types.str; - default = [ ]; - description = "Bookmark tags."; - }; - - keyword = mkOption { - type = types.nullOr types.str; - default = null; - description = "Bookmark search keyword."; - }; - - url = mkOption { - type = types.str; - description = "Bookmark url, use %s for search terms."; - }; - }; - }) // { - description = "bookmark submodule"; - }; - - bookmarkType = types.addCheck bookmarkSubmodule (x: x ? "url"); - - directoryType = types.submodule ({ config, name, ... }: { - options = { - name = mkOption { - type = types.str; - default = name; - description = "Directory name."; - }; - - bookmarks = mkOption { - type = types.listOf nodeType; - default = [ ]; - description = "Bookmarks within directory."; - }; - - toolbar = mkOption { - type = types.bool; - default = false; - 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. - ''; - }; - }; - }) // { - description = "directory submodule"; - }; - - nodeType = types.either bookmarkType directoryType; - in with types; - coercedTo (attrsOf nodeType) attrValues (listOf nodeType); - default = [ ]; - example = literalExpression '' - [ - { - 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"; - toolbar = true; - bookmarks = [ - { - name = "homepage"; - url = "https://nixos.org/"; - } - { - name = "wiki"; - tags = [ "wiki" "nix" ]; - url = "https://nixos.wiki/"; - } - ]; - } - ] - ''; - description = '' - Preloaded bookmarks. Note, this may silently overwrite any - previously existing bookmarks! - ''; - }; - - path = mkOption { - type = types.str; - default = name; - description = "Profile path."; - }; - - isDefault = mkOption { - type = types.bool; - default = config.id == 0; - defaultText = "true if profile ID is 0"; - description = "Whether this is a default profile."; - }; - - search = { - force = mkOption { - type = with types; bool; - default = false; - description = '' - Whether to force replace the existing search - configuration. This is recommended since Firefox will - replace the symlink for the search configuration on every - launch, but note that you'll lose any existing - configuration by enabling this. - ''; - }; - - default = mkOption { - type = with types; nullOr str; - default = null; - example = "DuckDuckGo"; - description = '' - The default search engine used in the address bar and search bar. - ''; - }; - - 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 = [ ]; - example = [ "DuckDuckGo" "Google" ]; - description = '' - The order the search engines are listed in. Any engines - that aren't included in this list will be listed after - these in an unspecified order. - ''; - }; - - engines = mkOption { - type = with types; attrsOf (attrsOf jsonFormat.type); - default = { }; - example = literalExpression '' - { - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - - icon = "''${pkgs.nixos-icons}/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; # every day - definedAliases = [ "@nw" ]; - }; - - "Bing".metaData.hidden = true; - "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias - } - ''; - description = '' - Attribute set of search engine configurations. Engines - that only have {var}`metaData` specified will - be treated as builtin to Firefox. - - See [SearchEngine.jsm](https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177) - in Firefox's source for available options. We maintain a - mapping to let you specify all options in the referenced - link without underscores, but it may fall out of date with - future options. - - Note, {var}`icon` is also a special option - added by Home Manager to make it convenient to specify - absolute icon paths. - ''; - }; - }; - - 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 = [ ]; - example = literalExpression '' - with pkgs.nur.repos.rycee.firefox-addons; [ - privacy-badger - ] - ''; - description = '' - List of Firefox add-on packages to install for this profile. - Some pre-packaged add-ons are accessible from the - [Nix User Repository](https://github.com/nix-community/NUR). - Once you have NUR installed run - - ```console - $ nix-env -f '' -qaP -A nur.repos.rycee.firefox-addons - ``` - - to list the available Firefox add-ons. - - Note that it is necessary to manually enable these extensions - inside Firefox after the first installation. - ''; - }; - - }; - })); - default = { }; - description = "Attribute set of Firefox profiles."; - }; - - enableGnomeExtensions = mkOption { - type = types.bool; - default = false; - description = '' - Whether to enable the GNOME Shell native host connector. Note, you - also need to set the NixOS option - `services.gnome.gnome-browser-connector.enable` to - `true`. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - assertions = [ - (let - defaults = - catAttrs "name" (filter (a: a.isDefault) (attrValues cfg.profiles)); - in { - assertion = cfg.profiles == { } || length defaults == 1; - message = "Must have exactly one default Firefox profile but found " - + toString (length defaults) + optionalString (length defaults > 1) - (", namely " + concatStringsSep ", " defaults); - }) - - (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 - 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. - ''; - - programs.firefox.finalPackage = wrapPackage cfg.package; - - home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage; - - home.file = mkMerge ([{ - "${firefoxConfigPath}/profiles.ini" = - mkIf (cfg.profiles != { }) { text = profilesIni; }; - }] ++ flip mapAttrsToList cfg.profiles (_: profile: { - "${profilesPath}/${profile.path}/.keep".text = ""; - - "${profilesPath}/${profile.path}/chrome/userChrome.css" = - mkIf (profile.userChrome != "") { text = profile.userChrome; }; - - "${profilesPath}/${profile.path}/chrome/userContent.css" = - mkIf (profile.userContent != "") { text = profile.userContent; }; - - "${profilesPath}/${profile.path}/user.js" = mkIf (profile.settings != { } - || profile.extraConfig != "" || profile.bookmarks != [ ]) { - text = - 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.privateDefault != null - || profile.search.order != [ ] || profile.search.engines != { }) { - force = profile.search.force; - source = let - settings = { - version = 6; - engines = let - # Map of nice field names to internal field names. - # This is intended to be exhaustive and should be - # updated at every version bump. - internalFieldNames = (genAttrs [ - "name" - "isAppProvided" - "loadPath" - "hasPreferredIcon" - "updateInterval" - "updateURL" - "iconUpdateURL" - "iconURL" - "iconMapObj" - "metaData" - "orderHint" - "definedAliases" - "urls" - ] (name: "_${name}")) // { - searchForm = "__searchForm"; - }; - - processCustomEngineInput = input: - (removeAttrs input [ "icon" ]) - // optionalAttrs (input ? icon) { - # Convenience to specify absolute path to icon - iconURL = "file://${input.icon}"; - } // (optionalAttrs (input ? iconUpdateURL) { - # Convenience to default iconURL to iconUpdateURL so - # the icon is immediately downloaded from the URL - iconURL = input.iconURL or input.iconUpdateURL; - } // { - # Required for custom engine configurations, loadPaths - # are unique identifiers that are generally formatted - # like: [source]/path/to/engine.xml - loadPath = '' - [home-manager]/programs.firefox.profiles.${profile.name}.search.engines."${ - replaceStrings [ "\\" ] [ "\\\\" ] input.name - }"''; - }); - - processEngineInput = name: input: - let - requiredInput = { - inherit name; - isAppProvided = input.isAppProvided or removeAttrs input - [ "metaData" ] == { }; - metaData = input.metaData or { }; - }; - in if requiredInput.isAppProvided then - requiredInput - else - processCustomEngineInput (input // requiredInput); - - buildEngineConfig = name: input: - mapAttrs' (name: value: { - name = internalFieldNames.${name} or name; - inherit value; - }) (processEngineInput name input); - - sortEngineConfigs = configs: - let - buildEngineConfigWithOrder = order: name: - let - config = configs.${name} or { - _name = name; - _isAppProvided = true; - _metaData = { }; - }; - in config // { - _metaData = config._metaData // { inherit order; }; - }; - - engineConfigsWithoutOrder = - attrValues (removeAttrs configs profile.search.order); - - sortedEngineConfigs = - (imap buildEngineConfigWithOrder profile.search.order) - ++ engineConfigsWithoutOrder; - in sortedEngineConfigs; - - engineInput = profile.search.engines // { - # Infer profile.search.default as an app provided - # 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 != [ ]; - }; - }; - - # Home Manager doesn't circumvent user consent and isn't acting - # maliciously. We're modifying the search outside of Firefox, but - # a claim by Mozilla to remove this would be very anti-user, and - # is unlikely to be an issue for our use case. - disclaimer = appName: - "By modifying this file, I agree that I am doing so " - + "only within ${appName} itself, using official, user-driven search " - + "engine selection processes, and in a way which does not circumvent " - + "user consent. I acknowledge that any attempt to change this file " - + "from outside of ${appName} is a malicious act, and will be responded " - + "to accordingly."; - - salt = if profile.search.default != null then - 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 privateSalt; - } '' - if [[ -n $salt ]]; then - export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) - 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 - ''; - }; - - "${profilesPath}/${profile.path}/extensions" = - mkIf (profile.extensions != [ ]) { - source = let - extensionsEnvPkg = pkgs.buildEnv { - name = "hm-firefox-extensions"; - paths = profile.extensions; - }; - in "${extensionsEnvPkg}/share/mozilla/${extensionPath}"; - recursive = true; - force = true; - }; - })); - }; } diff --git a/modules/programs/firefox/mkFirefoxModule.nix b/modules/programs/firefox/mkFirefoxModule.nix new file mode 100644 index 000000000000..1bb2253f1054 --- /dev/null +++ b/modules/programs/firefox/mkFirefoxModule.nix @@ -0,0 +1,814 @@ +{ modulePath, name, description ? null, wrappedPackageName ? null +, unwrappedPackageName ? null, platforms, visible ? false +, enableBookmarks ? true }: + +{ config, lib, pkgs, ... }: + +with lib; + +let + + inherit (pkgs.stdenv.hostPlatform) isDarwin; + + moduleName = concatStringsSep "." modulePath; + + cfg = getAttrFromPath modulePath config; + + jsonFormat = pkgs.formats.json { }; + + supportedPlatforms = flatten (attrVals (attrNames platforms) lib.platforms); + + isWrapped = versionAtLeast config.home.stateVersion "19.09" + && wrappedPackageName != null; + + defaultPackageName = + if isWrapped then wrappedPackageName else unwrappedPackageName; + + packageName = if wrappedPackageName != null then + wrappedPackageName + else + unwrappedPackageName; + + profilesPath = + if isDarwin then "${cfg.configPath}/Profiles" else cfg.configPath; + + nativeMessagingHostsPath = if isDarwin then + "${cfg.vendorPath}/NativeMessagingHosts" + else + "${cfg.vendorPath}/native-messaging-hosts"; + + nativeMessagingHostsJoined = pkgs.symlinkJoin { + name = "ff_native-messaging-hosts"; + paths = [ + # Link a .keep file to keep the directory around + (pkgs.writeTextDir "lib/mozilla/native-messaging-hosts/.keep" "") + # Link package configured native messaging hosts (entire browser actually) + cfg.finalPackage + ] + # Link user configured native messaging hosts + ++ cfg.nativeMessagingHosts; + }; + + # The extensions path shared by all profiles; will not be supported + # by future browser versions. + extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; + + profiles = flip mapAttrs' cfg.profiles (_: profile: + nameValuePair "Profile${toString profile.id}" { + Name = profile.name; + Path = if isDarwin then "Profiles/${profile.path}" else profile.path; + IsRelative = 1; + Default = if profile.isDefault then 1 else 0; + }) // { + General = { + StartWithLastProfile = 1; + } // lib.optionalAttrs (cfg.profileVersion != null) { + Version = cfg.profileVersion; + }; + }; + + profilesIni = generators.toINI { } profiles; + + userPrefValue = pref: + builtins.toJSON (if isBool pref || isInt pref || isString pref then + pref + else + builtins.toJSON pref); + + mkUserJs = prefs: extraPrefs: bookmarks: + let + prefs' = lib.optionalAttrs ([ ] != bookmarks) { + "browser.bookmarks.file" = toString (browserBookmarksFile bookmarks); + "browser.places.importBookmarksHTML" = true; + } // prefs; + in '' + // Generated by Home Manager. + + ${concatStrings (mapAttrsToList (name: value: '' + user_pref("${name}", ${userPrefValue value}); + '') prefs')} + + ${extraPrefs} + ''; + + mkContainersJson = containers: + let + containerToIdentity = _: container: { + userContextId = container.id; + name = container.name; + icon = container.icon; + color = container.color; + public = true; + }; + in '' + ${builtins.toJSON { + version = 5; + lastUserContextId = + foldlAttrs (acc: _: value: if value.id > acc then value.id else acc) 0 + containers; + identities = mapAttrsToList containerToIdentity containers ++ [ + { + userContextId = 4294967294; # 2^32 - 2 + name = "userContextIdInternal.thumbnail"; + icon = ""; + color = ""; + accessKey = ""; + public = false; + } + { + userContextId = 4294967295; # 2^32 - 1 + name = "userContextIdInternal.webextStorageLocal"; + icon = ""; + color = ""; + accessKey = ""; + public = false; + } + ]; + }} + ''; + + browserBookmarksFile = bookmarks: + let + indent = level: + lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); + + bookmarkToHTML = indentLevel: bookmark: + '' + ${indent indentLevel}
${escapeXML bookmark.name}''; + + directoryToHTML = indentLevel: directory: '' + ${indent indentLevel}
${ + if directory.toolbar then + '' +

Bookmarks Toolbar'' + else + ''

${escapeXML directory.name}'' + }

+ ${indent indentLevel}

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

''; + + itemToHTMLOrRecurse = indentLevel: item: + if item ? "url" then + bookmarkToHTML indentLevel item + else + directoryToHTML indentLevel item; + + allItemsToHTML = indentLevel: bookmarks: + lib.concatStringsSep "\n" + (map (itemToHTMLOrRecurse indentLevel) bookmarks); + + bookmarkEntries = allItemsToHTML 1 bookmarks; + in pkgs.writeText "${packageName}-bookmarks.html" '' + + + + Bookmarks +

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 ${name} ${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 isWrapped then + package.override (old: { + cfg = old.cfg or { } // fcfg; + extraPolicies = (old.extraPolicies or { }) // cfg.policies; + }) + else + (pkgs.wrapFirefox.override { config = bcfg; }) package { }; + +in { + options = setAttrByPath modulePath { + enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Whether to enable ${name}.${ + optionalString (description != null) " ${description}" + } + ${optionalString (!visible) + "See `programs.firefox` for more configuration options."} + ''; + }; + + package = mkOption { + inherit visible; + type = with types; nullOr package; + default = pkgs.${defaultPackageName}; + defaultText = literalExpression "pkgs.${packageName}"; + example = literalExpression '' + pkgs.${packageName}.override { + # See nixpkgs' firefox/wrapper.nix to check which options you can use + nativeMessagingHosts = [ + # Gnome shell native connector + pkgs.gnome-browser-connector + # Tridactyl native connector + pkgs.tridactyl-native + ]; + } + ''; + description = '' + The ${name} package to use. If state version ≥ 19.09 then + this should be a wrapped ${name} package. For earlier state + versions it should be an unwrapped ${name} package. + Set to `null` to disable installing ${name}. + ''; + }; + + languagePacks = mkOption { + type = types.listOf types.str; + default = [ ]; + description = '' + The language packs to install. Available language codes can be found + on the releases page: + `https://releases.mozilla.org/pub/firefox/releases/''${version}/linux-x86_64/xpi/`, + replacing `''${version}` with the version of Firefox you have. + ''; + example = [ "en-GB" "de" ]; + }; + + name = mkOption { + internal = true; + type = types.str; + default = name; + example = "Firefox"; + description = "The name of the browser."; + }; + + wrappedPackageName = mkOption { + internal = true; + type = with types; nullOr str; + default = wrappedPackageName; + description = "Name of the wrapped browser package."; + }; + + vendorPath = mkOption { + internal = true; + type = with types; nullOr str; + default = with platforms; + if isDarwin then + darwin.vendorPath or null + else + linux.vendorPath or null; + example = ".mozilla"; + description = + "Directory containing the native messaging hosts directory."; + }; + + configPath = mkOption { + internal = true; + type = types.str; + default = with platforms; + if isDarwin then darwin.configPath else linux.configPath; + example = ".mozilla/firefox"; + description = "Directory containing the ${name} configuration files."; + }; + + nativeMessagingHosts = optionalAttrs (cfg.vendorPath != null) (mkOption { + inherit visible; + type = types.listOf types.package; + default = [ ]; + description = '' + Additional packages containing native messaging hosts that should be + made available to ${name} extensions. + ''; + }); + + finalPackage = mkOption { + inherit visible; + type = with types; nullOr package; + readOnly = true; + description = "Resulting ${cfg.name} package."; + }; + + policies = optionalAttrs (wrappedPackageName != null) (mkOption { + inherit visible; + type = types.attrsOf jsonFormat.type; + default = { }; + description = + "[See list of policies](https://mozilla.github.io/policy-templates/)."; + example = { + DefaultDownloadDirectory = "\${home}/Downloads"; + BlockAboutConfig = true; + }; + }); + + profileVersion = mkOption { + internal = true; + type = types.nullOr types.ints.unsigned; + default = if isDarwin then null else 2; + description = "profile version, set null for nix-darwin"; + }; + + profiles = mkOption { + inherit visible; + type = types.attrsOf (types.submodule ({ config, name, ... }: { + options = { + name = mkOption { + type = types.str; + default = name; + description = "Profile name."; + }; + + id = mkOption { + type = types.ints.unsigned; + default = 0; + description = '' + Profile ID. This should be set to a unique number per profile. + ''; + }; + + settings = mkOption { + type = types.attrsOf (jsonFormat.type // { + description = + "${name} preference (int, bool, string, and also attrs, list, float as a JSON string)"; + }); + default = { }; + example = literalExpression '' + { + "browser.startup.homepage" = "https://nixos.org"; + "browser.search.region" = "GB"; + "browser.search.isUS" = false; + "distribution.searchplugins.defaultLocale" = "en-GB"; + "general.useragent.locale" = "en-GB"; + "browser.bookmarks.showMobileBookmarks" = true; + "browser.newtabpage.pinned" = [{ + title = "NixOS"; + url = "https://nixos.org"; + }]; + } + ''; + description = '' + Attribute set of ${name} preferences. + + ${name} only supports int, bool, and string types for + preferences, but home-manager will automatically + convert all other JSON-compatible values into strings. + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra preferences to add to {file}`user.js`. + ''; + }; + + userChrome = mkOption { + type = types.lines; + default = ""; + description = "Custom ${name} user chrome CSS."; + example = '' + /* Hide tab bar in FF Quantum */ + @-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { + #TabsToolbar { + visibility: collapse !important; + margin-bottom: 21px !important; + } + + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + visibility: collapse !important; + } + } + ''; + }; + + userContent = mkOption { + type = types.lines; + default = ""; + description = "Custom ${name} user content CSS."; + example = '' + /* Hide scrollbar in FF Quantum */ + *{scrollbar-width:none !important} + ''; + }; + + bookmarks = mkOption { + internal = !enableBookmarks; + type = let + bookmarkSubmodule = types.submodule ({ config, name, ... }: { + options = { + name = mkOption { + type = types.str; + default = name; + description = "Bookmark name."; + }; + + tags = mkOption { + type = types.listOf types.str; + default = [ ]; + description = "Bookmark tags."; + }; + + keyword = mkOption { + type = types.nullOr types.str; + default = null; + description = "Bookmark search keyword."; + }; + + url = mkOption { + type = types.str; + description = "Bookmark url, use %s for search terms."; + }; + }; + }) // { + description = "bookmark submodule"; + }; + + bookmarkType = types.addCheck bookmarkSubmodule (x: x ? "url"); + + directoryType = types.submodule ({ config, name, ... }: { + options = { + name = mkOption { + type = types.str; + default = name; + description = "Directory name."; + }; + + bookmarks = mkOption { + type = types.listOf nodeType; + default = [ ]; + description = "Bookmarks within directory."; + }; + + toolbar = mkOption { + type = types.bool; + default = false; + 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. + ''; + }; + }; + }) // { + description = "directory submodule"; + }; + + nodeType = types.either bookmarkType directoryType; + in with types; + coercedTo (attrsOf nodeType) attrValues (listOf nodeType); + default = [ ]; + example = literalExpression '' + [ + { + 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"; + toolbar = true; + bookmarks = [ + { + name = "homepage"; + url = "https://nixos.org/"; + } + { + name = "wiki"; + tags = [ "wiki" "nix" ]; + url = "https://wiki.nixos.org/"; + } + ]; + } + ] + ''; + description = '' + Preloaded bookmarks. Note, this may silently overwrite any + previously existing bookmarks! + ''; + }; + + path = mkOption { + type = types.str; + default = name; + description = "Profile path."; + }; + + isDefault = mkOption { + type = types.bool; + default = config.id == 0; + defaultText = "true if profile ID is 0"; + description = "Whether this is a default profile."; + }; + + search = mkOption { + type = types.submodule (args: + import ./profiles/search.nix { + inherit (args) config; + inherit lib pkgs; + appName = cfg.name; + package = cfg.finalPackage; + modulePath = modulePath ++ [ "profiles" name "search" ]; + profilePath = config.path; + }); + default = { }; + description = "Declarative search engine configuration."; + }; + + containersForce = mkOption { + type = types.bool; + default = false; + description = '' + Whether to force replace the existing containers configuration. + This is recommended since Firefox will replace the symlink on + every launch, but note that you'll lose any existing configuration + by enabling this. + ''; + }; + + 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 = [ ]; + example = literalExpression '' + with pkgs.nur.repos.rycee.firefox-addons; [ + privacy-badger + ] + ''; + description = '' + List of ${name} add-on packages to install for this profile. + Some pre-packaged add-ons are accessible from the + [Nix User Repository](https://github.com/nix-community/NUR). + Once you have NUR installed run + + ```console + $ nix-env -f '' -qaP -A nur.repos.rycee.firefox-addons + ``` + + to list the available ${name} add-ons. + + Note that it is necessary to manually enable these extensions + inside ${name} after the first installation. + + To automatically enable extensions add + `"extensions.autoDisableScopes" = 0;` + to + [{option}`${moduleName}.profiles..settings`](#opt-${moduleName}.profiles._name_.settings) + ''; + }; + + }; + })); + default = { }; + description = "Attribute set of ${name} profiles."; + }; + + enableGnomeExtensions = mkOption { + inherit visible; + type = types.bool; + default = false; + description = '' + Whether to enable the GNOME Shell native host connector. Note, you + also need to set the NixOS option + `services.gnome.gnome-browser-connector.enable` to + `true`. + ''; + }; + }; + + config = mkIf cfg.enable ({ + assertions = [ + (hm.assertions.assertPlatform moduleName pkgs supportedPlatforms) + + (let + defaults = + catAttrs "name" (filter (a: a.isDefault) (attrValues cfg.profiles)); + in { + assertion = cfg.profiles == { } || length defaults == 1; + message = "Must have exactly one default ${cfg.name} profile but found " + + toString (length defaults) + optionalString (length defaults > 1) + (", namely " + concatStringsSep ", " defaults); + }) + + (let + getContainers = profiles: + flatten + (mapAttrsToList (_: value: (attrValues value.containers)) profiles); + + findInvalidContainerIds = profiles: + filter (container: container.id >= 4294967294) + (getContainers profiles); + in { + assertion = cfg.profiles == { } + || length (findInvalidContainerIds cfg.profiles) == 0; + message = "Container id must be smaller than 4294967294 (2^32 - 2)"; + }) + + { + assertion = cfg.languagePacks == [ ] || cfg.package != null; + message = '' + 'programs.firefox.languagePacks' requires 'programs.firefox.package' + to be set to a non-null value. + ''; + } + + (mkNoDuplicateAssertion cfg.profiles "profile") + ] ++ (mapAttrsToList + (_: profile: mkNoDuplicateAssertion profile.containers "container") + cfg.profiles); + + warnings = optional (cfg.enableGnomeExtensions or false) '' + Using '${moduleName}.enableGnomeExtensions' has been deprecated and + will be removed in the future. Please change to overriding the package + configuration using '${moduleName}.package' instead. You can refer to + its example for how to do this. + ''; + + home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage; + + home.file = mkMerge ([{ + "${cfg.configPath}/profiles.ini" = + mkIf (cfg.profiles != { }) { text = profilesIni; }; + }] ++ optional (cfg.vendorPath != null) { + "${nativeMessagingHostsPath}" = { + source = + "${nativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts"; + recursive = true; + }; + } ++ flip mapAttrsToList cfg.profiles (_: profile: { + "${profilesPath}/${profile.path}/.keep".text = ""; + + "${profilesPath}/${profile.path}/chrome/userChrome.css" = + mkIf (profile.userChrome != "") { text = profile.userChrome; }; + + "${profilesPath}/${profile.path}/chrome/userContent.css" = + mkIf (profile.userContent != "") { text = profile.userContent; }; + + "${profilesPath}/${profile.path}/user.js" = mkIf (profile.settings != { } + || profile.extraConfig != "" || profile.bookmarks != [ ]) { + text = + mkUserJs profile.settings profile.extraConfig profile.bookmarks; + }; + + "${profilesPath}/${profile.path}/containers.json" = + mkIf (profile.containers != { }) { + text = mkContainersJson profile.containers; + force = profile.containersForce; + }; + + "${profilesPath}/${profile.path}/search.json.mozlz4" = + mkIf (profile.search.enable) { + enable = profile.search.enable; + force = profile.search.force; + source = profile.search.file; + }; + + "${profilesPath}/${profile.path}/extensions" = + mkIf (profile.extensions != [ ]) { + source = let + extensionsEnvPkg = pkgs.buildEnv { + name = "hm-firefox-extensions"; + paths = profile.extensions; + }; + in "${extensionsEnvPkg}/share/mozilla/${extensionPath}"; + recursive = true; + force = true; + }; + })); + } // setAttrByPath modulePath { + finalPackage = wrapPackage cfg.package; + + policies = { + ExtensionSettings = listToAttrs (map (lang: + nameValuePair "langpack-${lang}@firefox.mozilla.org" { + installation_mode = "normal_installed"; + install_url = + "https://releases.mozilla.org/pub/firefox/releases/${cfg.package.version}/linux-x86_64/xpi/${lang}.xpi"; + }) cfg.languagePacks); + }; + }); +} diff --git a/modules/programs/firefox/profiles/search.nix b/modules/programs/firefox/profiles/search.nix new file mode 100644 index 000000000000..99a22674432d --- /dev/null +++ b/modules/programs/firefox/profiles/search.nix @@ -0,0 +1,269 @@ +{ config, lib, pkgs, appName, package, modulePath, profilePath }: + +with lib; + +let + jsonFormat = pkgs.formats.json { }; + + # Map of nice field names to internal field names. + # This is intended to be exhaustive and should be + # updated at every version bump. + internalFieldNames = (genAttrs [ + "name" + "isAppProvided" + "loadPath" + "hasPreferredIcon" + "updateInterval" + "updateURL" + "iconUpdateURL" + "iconURL" + "iconMapObj" + "metaData" + "orderHint" + "definedAliases" + "urls" + ] (name: "_${name}")) // { + searchForm = "__searchForm"; + }; + + processCustomEngineInput = input: + (removeAttrs input [ "icon" ]) // optionalAttrs (input ? icon) { + # Convenience to specify absolute path to icon + iconURL = "file://${input.icon}"; + } // (optionalAttrs (input ? iconUpdateURL) { + # Convenience to default iconURL to iconUpdateURL so + # the icon is immediately downloaded from the URL + iconURL = input.iconURL or input.iconUpdateURL; + } // { + # Required for custom engine configurations, loadPaths + # are unique identifiers that are generally formatted + # like: [source]/path/to/engine.xml + loadPath = "[home-manager]/${ + concatStringsSep "." (map strings.escapeNixIdentifier + (modulePath ++ [ "engines" input.name ])) + }"; + }); + + processEngineInput = name: input: + let + requiredInput = { + inherit name; + isAppProvided = input.isAppProvided or removeAttrs input [ "metaData" ] + == { }; + metaData = input.metaData or { }; + }; + in if requiredInput.isAppProvided then + requiredInput + else + processCustomEngineInput (input // requiredInput); + + buildEngineConfig = name: input: + mapAttrs' (name: value: { + name = internalFieldNames.${name} or name; + inherit value; + }) (processEngineInput name input); + + sortEngineConfigs = configs: + let + buildEngineConfigWithOrder = order: name: + let + config = configs.${name} or { + _name = name; + _isAppProvided = true; + _metaData = { }; + }; + in config // { _metaData = config._metaData // { inherit order; }; }; + + engineConfigsWithoutOrder = attrValues (removeAttrs configs config.order); + + sortedEngineConfigs = (imap buildEngineConfigWithOrder config.order) + ++ engineConfigsWithoutOrder; + in sortedEngineConfigs; + + engineInput = config.engines // { + # Infer config.default as an app provided + # engine if it's not in config.engines + ${config.default} = config.engines.${config.default} or { }; + } // { + ${config.privateDefault} = config.engines.${config.privateDefault} or { }; + }; + + settings = { + version = 6; + engines = sortEngineConfigs (mapAttrs buildEngineConfig engineInput); + + metaData = optionalAttrs (config.default != null) { + current = config.default; + hash = "@hash@"; + } // optionalAttrs (config.privateDefault != null) { + private = config.privateDefault; + privateHash = "@privateHash@"; + } // { + useSavedOrder = config.order != [ ]; + }; + }; + + # Home Manager doesn't circumvent user consent and isn't acting + # maliciously. We're modifying the search outside of the browser, but + # a claim by Mozilla to remove this would be very anti-user, and + # is unlikely to be an issue for our use case. + disclaimer = "By modifying this file, I agree that I am doing so " + + "only within @appName@ itself, using official, user-driven search " + + "engine selection processes, and in a way which does not circumvent " + + "user consent. I acknowledge that any attempt to change this file " + + "from outside of @appName@ is a malicious act, and will be responded " + + "to accordingly."; + + salt = if config.default != null then + profilePath + config.default + disclaimer + else + null; + + privateSalt = if config.privateDefault != null then + profilePath + config.privateDefault + disclaimer + else + null; + + appNameVariable = if package == null then + "appName=${lib.escapeShellArg appName}" + else '' + applicationIni="$(find ${lib.escapeShellArg package} -maxdepth 3 -path ${ + lib.escapeShellArg package + }'/lib/*/application.ini' -print -quit)" + if test -n "$applicationIni"; then + appName="$(sed -n 's/^Name=\(.*\)$/\1/p' "$applicationIni" | head -n1)" + else + appName=${lib.escapeShellArg appName} + fi + ''; + + file = pkgs.runCommand "search.json.mozlz4" { + nativeBuildInputs = with pkgs; [ mozlz4a openssl ]; + json = builtins.toJSON settings; + inherit salt privateSalt; + } '' + ${appNameVariable} + + salt=''${salt//@appName@/"$appName"} + privateSalt=''${privateSalt//@appName@/"$appName"} + + if [[ -n $salt ]]; then + export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) + export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64) + mozlz4a <(substituteStream json search.json.in --subst-var hash --subst-var privateHash) "$out" + else + mozlz4a <(echo "$json") "$out" + fi + ''; +in { + imports = [ (pkgs.path + "/nixos/modules/misc/meta.nix") ]; + + meta.maintainers = with maintainers; [ kira-bruneau ]; + + options = { + enable = mkOption { + type = with types; bool; + default = config.default != null || config.privateDefault != null + || config.order != [ ] || config.engines != { }; + internal = true; + }; + + force = mkOption { + type = with types; bool; + default = false; + description = '' + Whether to force replace the existing search + configuration. This is recommended since ${appName} will + replace the symlink for the search configuration on every + launch, but note that you'll lose any existing configuration + by enabling this. + ''; + }; + + default = mkOption { + type = with types; nullOr str; + default = null; + example = "DuckDuckGo"; + description = '' + The default search engine used in the address bar and search + bar. + ''; + }; + + 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 = [ ]; + example = [ "DuckDuckGo" "Google" ]; + description = '' + The order the search engines are listed in. Any engines that + aren't included in this list will be listed after these in an + unspecified order. + ''; + }; + + engines = mkOption { + type = with types; attrsOf (attrsOf jsonFormat.type); + default = { }; + example = literalExpression '' + { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + + icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + + "NixOS Wiki" = { + urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }]; + iconUpdateURL = "https://wiki.nixos.org/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = [ "@nw" ]; + }; + + "Bing".metaData.hidden = true; + "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias + } + ''; + + description = '' + Attribute set of search engine configurations. Engines that + only have {var}`metaData` specified will be treated as builtin + to ${appName}. + + See [SearchEngine.jsm](https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177) + in ${appName}'s source for available options. We maintain a + mapping to let you specify all options in the referenced link + without underscores, but it may fall out of date with future + options. + + Note, {var}`icon` is also a special option added by Home + Manager to make it convenient to specify absolute icon paths. + ''; + }; + + file = mkOption { + type = with types; path; + default = file; + internal = true; + readOnly = true; + description = '' + Resulting search.json.mozlz4 file. + ''; + }; + }; +} diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 7df9704d0ec1..02141042d36e 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -253,6 +253,12 @@ in { ''; }; + generateCompletions = mkEnableOption + "the automatic generation of completions based upon installed man pages" + // { + default = true; + }; + shellAliases = mkOption { type = with types; attrsOf str; default = { }; @@ -288,6 +294,16 @@ in { ''; }; + preferAbbrs = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + If enabled, abbreviations will be preferred over aliases when + other modules define aliases for fish. + ''; + }; + shellInit = mkOption { type = types.lines; default = ""; @@ -314,6 +330,15 @@ in { initialisation. ''; }; + + shellInitLast = mkOption { + type = types.lines; + default = ""; + description = '' + Shell script code called during interactive fish shell + initialisation, this will be the last thing executed in fish startup. + ''; + }; }; programs.fish.plugins = mkOption { @@ -371,9 +396,9 @@ in { }; config = mkIf cfg.enable (mkMerge [ - { - home.packages = [ cfg.package ]; + { home.packages = [ cfg.package ]; } + (mkIf cfg.generateCompletions { # Support completion for `man` by building a cache for `apropos`. programs.man.generateCaches = mkDefault true; @@ -437,7 +462,9 @@ in { set fish_complete_path $prev "${config.xdg.dataHome}/fish/home-manager_generated_completions" $post end ''; + }) + { xdg.configFile."fish/config.fish".source = fishIndent "config.fish" '' # ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated # automatically by home-manager. @@ -450,14 +477,14 @@ in { ${cfg.shellInit} - status --is-login; and begin + status is-login; and begin # Login shell initialisation ${cfg.loginShellInit} end - status --is-interactive; and begin + status is-interactive; and begin # Abbreviations ${abbrsStr} @@ -469,6 +496,8 @@ in { ${cfg.interactiveShellInit} end + + ${cfg.shellInitLast} ''; } { diff --git a/modules/programs/floorp.nix b/modules/programs/floorp.nix new file mode 100644 index 000000000000..0f231bdf4830 --- /dev/null +++ b/modules/programs/floorp.nix @@ -0,0 +1,29 @@ +{ lib, ... }: + +with lib; + +let + + modulePath = [ "programs" "floorp" ]; + + mkFirefoxModule = import ./firefox/mkFirefoxModule.nix; + +in { + meta.maintainers = [ hm.maintainers.bricked ]; + + imports = [ + (mkFirefoxModule { + inherit modulePath; + name = "Floorp"; + wrappedPackageName = "floorp"; + unwrappedPackageName = "floorp-unwrapped"; + visible = true; + + platforms.linux = { + configPath = ".floorp"; + vendorPath = ".floorp"; + }; + platforms.darwin = { configPath = "Library/Application Support/Floorp"; }; + }) + ]; +} diff --git a/modules/programs/freetube.nix b/modules/programs/freetube.nix new file mode 100644 index 000000000000..77700fe555ac --- /dev/null +++ b/modules/programs/freetube.nix @@ -0,0 +1,60 @@ +{ lib, pkgs, config, ... }: + +let + inherit (lib) + concatStringsSep mapAttrsToList mkIf mkEnableOption mkPackageOption mkOption + literalExpression; + + cfg = config.programs.freetube; + + settings = settings: + let + convertSetting = name: value: + builtins.toJSON { + "_id" = name; + "value" = value; + }; + in concatStringsSep "\n" (mapAttrsToList convertSetting settings) + "\n"; +in { + meta.maintainers = with lib.maintainers; [ vonixxx ]; + + options.programs.freetube = { + enable = mkEnableOption "FreeTube, a YT client for Windows, Mac, and Linux"; + + package = mkPackageOption pkgs "freetube" { }; + + settings = mkOption { + type = lib.types.attrs; + default = { }; + example = literalExpression '' + { + allowDashAv1Formats = true; + checkForUpdates = false; + defaultQuality = "1080"; + baseTheme = "catppuccinMocha"; + } + ''; + description = '' + Configuration settings for FreeTube. + + All configurable options can be deduced by enabling them through the + GUI and observing the changes in {file}`settings.db`. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."FreeTube/hm_settings.db" = { + source = pkgs.writeText "hm_settings.db" (settings cfg.settings); + + onChange = let + hmSettingsDb = "${config.xdg.configHome}/FreeTube/hm_settings.db"; + settingsDb = "${config.xdg.configHome}/FreeTube/settings.db"; + in '' + run install -Dm644 $VERBOSE_ARG '${hmSettingsDb}' '${settingsDb}' + ''; + }; + }; +} diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix index 062df18645ed..31df95de6305 100644 --- a/modules/programs/fzf.nix +++ b/modules/programs/fzf.nix @@ -10,6 +10,35 @@ let concatStringsSep "," (mapAttrsToList (name: value: "${name}:${value}") colors); + hasShellIntegrationEmbedded = lib.versionAtLeast cfg.package.version "0.48.0"; + + bashIntegration = if hasShellIntegrationEmbedded then '' + if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then + eval "$(${getExe cfg.package} --bash)" + fi + '' else '' + if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then + . ${cfg.package}/share/fzf/completion.bash + . ${cfg.package}/share/fzf/key-bindings.bash + fi + ''; + + zshIntegration = if hasShellIntegrationEmbedded then '' + if [[ $options[zle] = on ]]; then + eval "$(${getExe cfg.package} --zsh)" + fi + '' else '' + if [[ $options[zle] = on ]]; then + . ${cfg.package}/share/fzf/completion.zsh + . ${cfg.package}/share/fzf/key-bindings.zsh + fi + ''; + + fishIntegration = if hasShellIntegrationEmbedded then '' + ${getExe cfg.package} --fish | source + '' else '' + source ${cfg.package}/share/fzf/key-bindings.fish && fzf_key_bindings + ''; in { imports = [ (mkRemovedOptionModule [ "programs" "fzf" "historyWidgetCommand" ] @@ -173,26 +202,16 @@ in { # Note, since fzf unconditionally binds C-r we use `mkOrder` to make the # initialization show up a bit earlier. This is to make initialization of # other history managers, like mcfly or atuin, take precedence. - programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 200 '' - if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then - . ${cfg.package}/share/fzf/completion.bash - . ${cfg.package}/share/fzf/key-bindings.bash - fi - ''); + programs.bash.initExtra = + mkIf cfg.enableBashIntegration (mkOrder 200 bashIntegration); # Note, since fzf unconditionally binds C-r we use `mkOrder` to make the # initialization show up a bit earlier. This is to make initialization of # other history managers, like mcfly or atuin, take precedence. - programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 '' - if [[ $options[zle] = on ]]; then - . ${cfg.package}/share/fzf/completion.zsh - . ${cfg.package}/share/fzf/key-bindings.zsh - fi - ''); - - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration - (mkOrder 200 '' - source ${cfg.package}/share/fzf/key-bindings.fish && fzf_key_bindings - ''); + programs.zsh.initExtra = + mkIf cfg.enableZshIntegration (mkOrder 200 zshIntegration); + + programs.fish.interactiveShellInit = + mkIf cfg.enableFishIntegration (mkOrder 200 fishIntegration); }; } diff --git a/modules/programs/gallery-dl.nix b/modules/programs/gallery-dl.nix index accad55fb881..4f566e18bdc2 100644 --- a/modules/programs/gallery-dl.nix +++ b/modules/programs/gallery-dl.nix @@ -14,6 +14,8 @@ in { options.programs.gallery-dl = { enable = mkEnableOption "gallery-dl"; + package = mkPackageOption pkgs "gallery-dl" { }; + settings = mkOption { type = jsonFormat.type; default = { }; @@ -32,7 +34,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.gallery-dl ]; + home.packages = [ cfg.package ]; xdg.configFile."gallery-dl/config.json" = mkIf (cfg.settings != { }) { source = jsonFormat.generate "gallery-dl-settings" cfg.settings; diff --git a/modules/programs/gh-dash.nix b/modules/programs/gh-dash.nix index 69d5482b6ad7..b351bb33a052 100644 --- a/modules/programs/gh-dash.nix +++ b/modules/programs/gh-dash.nix @@ -7,7 +7,7 @@ let yamlFormat = pkgs.formats.yaml { }; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.programs.gh-dash = { enable = lib.mkEnableOption "GitHub CLI dashboard plugin"; diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix index 7e6885497775..03e8feab5304 100644 --- a/modules/programs/gh.nix +++ b/modules/programs/gh.nix @@ -143,7 +143,7 @@ in { 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 + run --silence ${getExe cfg.package} help cp $TMP_DIR/hosts.yml "${ghHosts}" ) fi diff --git a/modules/programs/git-credential-oauth.nix b/modules/programs/git-credential-oauth.nix index 4833e80680d9..499c7c4c16fb 100644 --- a/modules/programs/git-credential-oauth.nix +++ b/modules/programs/git-credential-oauth.nix @@ -12,13 +12,27 @@ in { enable = lib.mkEnableOption "Git authentication handler for OAuth"; package = lib.mkPackageOption pkgs "git-credential-oauth" { }; + + extraFlags = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + example = lib.literalExpression ''[ "-device" ]''; + description = '' + Extra command-line arguments passed to git-credential-oauth. + + For valid arguments, see {manpage}`git-credential-oauth(1)`. + ''; + }; }; }; config = lib.mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.git.extraConfig.credential.helper = - [ "${cfg.package}/bin/git-credential-oauth" ]; + programs.git.extraConfig.credential.helper = lib.mkAfter [ + ("${cfg.package}/bin/git-credential-oauth" + + lib.optionalString (cfg.extraFlags != [ ]) + " ${lib.strings.concatStringsSep " " cfg.extraFlags}") + ]; }; } diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 53728060a221..e76085192b18 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -214,6 +214,59 @@ in { }; }; + maintenance = { + enable = mkEnableOption "" // { + description = '' + Enable the automatic {command}`git maintenance`. + + See . + ''; + }; + + repositories = mkOption { + type = with types; listOf str; + default = [ ]; + description = '' + Repositories on which {command}`git maintenance` should run. + + Should be a list of absolute paths. + ''; + }; + + timers = mkOption { + type = types.attrsOf types.str; + default = { + hourly = "*-*-* 1..23:53:00"; + daily = "Tue..Sun *-*-* 0:53:00"; + weekly = "Mon 0:53:00"; + }; + description = '' + Systemd timers to create for scheduled {command}`git maintenance`. + + Key is passed to `--schedule` argument in {command}`git maintenance run` + and value is passed to `Timer.OnCalendar` in `systemd.user.timers`. + ''; + }; + }; + + diff-highlight = { + enable = mkEnableOption "" // { + description = '' + Enable the contrib {command}`diff-highlight` syntax highlighter. + See , + ''; + }; + + pagerOpts = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--tabs=4" "-RFX" ]; + description = '' + Arguments to be passed to {command}`less`. + ''; + }; + }; + difftastic = { enable = mkEnableOption "" // { description = '' @@ -222,6 +275,8 @@ in { ''; }; + package = mkPackageOption pkgs "difftastic" { }; + background = mkOption { type = types.enum [ "light" "dark" ]; default = "light"; @@ -358,11 +413,15 @@ in { home.packages = [ cfg.package ]; assertions = [{ assertion = let - enabled = - [ cfg.delta.enable cfg.diff-so-fancy.enable cfg.difftastic.enable ]; + enabled = [ + cfg.delta.enable + cfg.diff-so-fancy.enable + cfg.difftastic.enable + cfg.diff-highlight.enable + ]; in count id enabled <= 1; message = - "Only one of 'programs.git.delta.enable' or 'programs.git.difftastic.enable' or 'programs.git.diff-so-fancy.enable' can be set to true at the same time."; + "Only one of 'programs.git.delta.enable' or 'programs.git.difftastic.enable' or 'programs.git.diff-so-fancy.enable' or 'programs.git.diff-highlight' can be set to true at the same time."; }]; programs.git.iniContent.user = { @@ -392,7 +451,7 @@ in { nameValuePair "sendemail.${name}" (if account.msmtp.enable then { smtpServer = "${pkgs.msmtp}/bin/msmtp"; envelopeSender = "auto"; - from = address; + from = "${realName} <${address}>"; } else { smtpEncryption = if smtp.tls.enable then @@ -407,7 +466,7 @@ in { mkIf smtp.tls.enable (toString smtp.tls.certificatesFile); smtpServer = smtp.host; smtpUser = userName; - from = address; + from = "${realName} <${address}>"; } // optionalAttrs (smtp.port != null) { smtpServerPort = smtp.port; }); @@ -477,12 +536,66 @@ in { }; }) + (mkIf cfg.maintenance.enable { + programs.git.iniContent.maintenance.repo = cfg.maintenance.repositories; + + systemd.user.services."git-maintenance@" = { + Unit = { + Description = "Optimize Git repositories data"; + Documentation = [ "man:git-maintenance(1)" ]; + }; + + Service = { + Type = "oneshot"; + ExecStart = let exe = lib.getExe cfg.package; + in '' + "${exe}" for-each-repo --keep-going --config=maintenance.repo maintenance run --schedule=%i + ''; + LockPersonality = "yes"; + MemoryDenyWriteExecute = "yes"; + NoNewPrivileges = "yes"; + RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_VSOCK"; + RestrictNamespaces = "yes"; + RestrictRealtime = "yes"; + RestrictSUIDSGID = "yes"; + SystemCallArchitectures = "native"; + SystemCallFilter = "@system-service"; + }; + }; + + systemd.user.timers = let + toSystemdTimer = name: time: + lib.attrsets.nameValuePair "git-maintenance@${name}" { + Unit.Description = "Optimize Git repositories data"; + + Timer = { + OnCalendar = time; + Persistent = true; + }; + + Install.WantedBy = [ "timers.target" ]; + }; + in lib.attrsets.mapAttrs' toSystemdTimer cfg.maintenance.timers; + }) + + (mkIf cfg.diff-highlight.enable { + programs.git.iniContent = let + dhCommand = + "${cfg.package}/share/git/contrib/diff-highlight/diff-highlight"; + in { + core.pager = "${dhCommand} | ${getExe pkgs.less} ${ + escapeShellArgs cfg.diff-highlight.pagerOpts + }"; + interactive.diffFilter = dhCommand; + }; + }) + (mkIf cfg.difftastic.enable { - home.packages = [ pkgs.difftastic ]; + home.packages = [ cfg.difftastic.package ]; programs.git.iniContent = let difftCommand = concatStringsSep " " [ - "${pkgs.difftastic}/bin/difft" + "${getExe cfg.difftastic.package}" "--color ${cfg.difftastic.color}" "--background ${cfg.difftastic.background}" "--display ${cfg.difftastic.display}" diff --git a/modules/programs/gnome-shell.nix b/modules/programs/gnome-shell.nix new file mode 100644 index 000000000000..36a57cea94f0 --- /dev/null +++ b/modules/programs/gnome-shell.nix @@ -0,0 +1,115 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.programs.gnome-shell; + + extensionOpts = { config, ... }: { + options = { + id = mkOption { + type = types.str; + example = "user-theme@gnome-shell-extensions.gcampax.github.com"; + description = '' + ID of the GNOME Shell extension. If not provided, it + will be obtained from `package.extensionUuid`. + ''; + }; + + package = mkOption { + type = types.package; + example = "pkgs.gnome.gnome-shell-extensions"; + description = '' + Package providing a GNOME Shell extension in + `$out/share/gnome-shell/extensions/''${id}`. + ''; + }; + }; + + config = mkIf (hasAttr "extensionUuid" config.package) { + id = mkDefault config.package.extensionUuid; + }; + }; + + themeOpts = { + options = { + name = mkOption { + type = types.str; + example = "Plata-Noir"; + description = '' + Name of the GNOME Shell theme. + ''; + }; + + package = mkOption { + type = types.nullOr types.package; + default = null; + example = literalExpression "pkgs.plata-theme"; + description = '' + Package providing a GNOME Shell theme in + `$out/share/themes/''${name}/gnome-shell`. + ''; + }; + }; + }; + +in { + meta.maintainers = [ maintainers.terlar ]; + + options.programs.gnome-shell = { + enable = mkEnableOption "GNOME Shell customization"; + + extensions = mkOption { + type = types.listOf (types.submodule extensionOpts); + default = [ ]; + example = literalExpression '' + [ + { package = pkgs.gnomeExtensions.dash-to-panel; } + { + id = "user-theme@gnome-shell-extensions.gcampax.github.com"; + package = pkgs.gnome.gnome-shell-extensions; + } + ] + ''; + description = '' + List of GNOME Shell extensions. + ''; + }; + + theme = mkOption { + type = types.nullOr (types.submodule themeOpts); + default = null; + example = literalExpression '' + { + name = "Plata-Noir"; + package = pkgs.plata-theme; + } + ''; + description = '' + Theme to use for GNOME Shell. + ''; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf (cfg.extensions != [ ]) { + dconf.settings."org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = catAttrs "id" cfg.extensions; + }; + + home.packages = catAttrs "package" cfg.extensions; + }) + + (mkIf (cfg.theme != null) { + dconf.settings."org/gnome/shell/extensions/user-theme".name = + cfg.theme.name; + + programs.gnome-shell.extensions = [{ + id = "user-theme@gnome-shell-extensions.gcampax.github.com"; + package = pkgs.gnome.gnome-shell-extensions; + }]; + + home.packages = [ cfg.theme.package ]; + }) + ]); +} diff --git a/modules/programs/gnome-terminal.nix b/modules/programs/gnome-terminal.nix index 83cfc0274039..dafadb7e9409 100644 --- a/modules/programs/gnome-terminal.nix +++ b/modules/programs/gnome-terminal.nix @@ -316,7 +316,7 @@ in { }) ]; - home.packages = [ pkgs.gnome.gnome-terminal ]; + home.packages = [ pkgs.gnome-terminal ]; dconf.settings = let dconfPath = "org/gnome/terminal/legacy"; in { diff --git a/modules/programs/gpg.nix b/modules/programs/gpg.nix index bc4cf4497946..1453892123fb 100644 --- a/modules/programs/gpg.nix +++ b/modules/programs/gpg.nix @@ -282,7 +282,7 @@ in { home.activation = { createGpgHomedir = hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' - $DRY_RUN_CMD mkdir -m700 -p $VERBOSE_ARG ${escapeShellArg cfg.homedir} + run mkdir -m700 -p $VERBOSE_ARG ${escapeShellArg cfg.homedir} ''; importGpgKeys = let @@ -290,12 +290,11 @@ in { importKey = { source, trust, ... }: # Import mutable keys - optional cfg.mutableKeys - "$DRY_RUN_CMD ${gpg} $QUIET_ARG --import ${source}" + optional cfg.mutableKeys "run ${gpg} $QUIET_ARG --import ${source}" # Import mutable trust ++ optional (trust != null && cfg.mutableTrust) - ''$DRY_RUN_CMD importTrust "${source}" ${toString trust}''; + ''run importTrust "${source}" ${toString trust}''; anyTrust = any (k: k.trust != null) cfg.publicKeys; diff --git a/modules/programs/granted.nix b/modules/programs/granted.nix index a091692509f8..93cdb97df21c 100644 --- a/modules/programs/granted.nix +++ b/modules/programs/granted.nix @@ -28,7 +28,7 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' function assume() { export GRANTED_ALIAS_CONFIGURED="true" - source ${package}/bin/.assume-wrapped "$@" + source ${package}/bin/assume "$@" unset GRANTED_ALIAS_CONFIGURED } ''; diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 9c5519f3ba08..840f5d82f16d 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -15,6 +15,7 @@ in { type = types.package; default = pkgs.helix; defaultText = literalExpression "pkgs.helix"; + example = literalExpression "pkgs.evil-helix"; description = "The package to use for helix."; }; @@ -75,7 +76,6 @@ in { default = { }; example = literalExpression '' { - # the language-server option currently requires helix from the master branch at https://github.com/helix-editor/helix/ language-server.typescript-language-server = with pkgs.nodePackages; { command = "''${typescript-language-server}/bin/typescript-language-server"; args = [ "--stdio" "--tsserver-path=''${typescript}/lib/node_modules/typescript/lib" ]; @@ -96,6 +96,16 @@ in { ''; }; + ignores = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ ".build/" "!.gitignore" ]; + description = '' + List of paths that should be globally ignored for file picker. + Supports the usual ignore and negative ignore (unignore) rules used in `.gitignore` files. + ''; + }; + themes = mkOption { type = types.attrsOf tomlFormat.type; default = { }; @@ -178,7 +188,7 @@ in { nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/hx \ - --prefix PATH : ${lib.makeBinPath cfg.extraPackages} + --suffix PATH : ${lib.makeBinPath cfg.extraPackages} ''; }) ] @@ -195,6 +205,9 @@ in { "helix/languages.toml" = mkIf (cfg.languages != { }) { source = tomlFormat.generate "helix-languages-config" cfg.languages; }; + "helix/ignore" = mkIf (cfg.ignores != [ ]) { + text = concatStringsSep "\n" cfg.ignores + "\n"; + }; }; themes = (mapAttrs' (n: v: diff --git a/modules/programs/himalaya.nix b/modules/programs/himalaya.nix index 9b5a1e398428..2d216c3dced8 100644 --- a/modules/programs/himalaya.nix +++ b/modules/programs/himalaya.nix @@ -8,14 +8,24 @@ let # attrs util that removes entries containing a null value compactAttrs = lib.filterAttrs (_: val: !isNull val); - # Needed for notmuch config, because the DB is here, and not in each account's dir + # needed for notmuch config, because the DB is here, and not in each + # account's dir maildirBasePath = config.accounts.email.maildirBasePath; - # make a himalaya config from a home-manager email account config + # make encryption config based on the given home-manager email + # account TLS config + mkEncryptionConfig = tls: + if tls.useStartTls then + "start-tls" + else if tls.enable then + "tls" + else + "none"; + + # make a himalaya account config based on the given home-manager + # email account config mkAccountConfig = _: account: let - # Use notmuch if it's enabled, otherwise fallback to IMAP then maildir - # Maildir is always set, so there's no easy way to detect if it's being used notmuchEnabled = account.notmuch.enable; imapEnabled = !isNull account.imap && !notmuchEnabled; maildirEnabled = !isNull account.maildir && !imapEnabled @@ -25,7 +35,7 @@ let email = account.address; display-name = account.realName; default = account.primary; - folder-aliases = { + folder.alias = { inbox = account.folders.inbox; sent = account.folders.sent; drafts = account.folders.drafts; @@ -43,202 +53,107 @@ let imapConfig = lib.optionalAttrs imapEnabled (compactAttrs { backend = "imap"; - imap-host = account.imap.host; - imap-port = account.imap.port; - imap-ssl = account.imap.tls.enable; - imap-starttls = account.imap.tls.useStartTls; - imap-login = account.userName; - imap-auth = "passwd"; - imap-passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; + imap.host = account.imap.host; + imap.port = account.imap.port; + imap.encryption = mkEncryptionConfig account.imap.tls; + imap.login = account.userName; + imap.passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; }); maildirConfig = lib.optionalAttrs maildirEnabled (compactAttrs { backend = "maildir"; - maildir-root-dir = account.maildir.absPath; + maildir.root-dir = account.maildir.absPath; }); notmuchConfig = lib.optionalAttrs notmuchEnabled (compactAttrs { backend = "notmuch"; - notmuch-db-path = maildirBasePath; + notmuch.database-path = maildirBasePath; }); smtpConfig = lib.optionalAttrs (!isNull account.smtp) (compactAttrs { - sender = "smtp"; - smtp-host = account.smtp.host; - smtp-port = account.smtp.port; - smtp-ssl = account.smtp.tls.enable; - smtp-starttls = account.smtp.tls.useStartTls; - smtp-login = account.userName; - smtp-auth = "passwd"; - smtp-passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; + message.send.backend = "smtp"; + smtp.host = account.smtp.host; + smtp.port = account.smtp.port; + smtp.encryption = mkEncryptionConfig account.smtp.tls; + smtp.login = account.userName; + smtp.passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; }); sendmailConfig = lib.optionalAttrs (isNull account.smtp && !isNull account.msmtp) { sender = "sendmail"; - sendmail-cmd = "${pkgs.msmtp}/bin/msmtp"; + sendmail.cmd = "${pkgs.msmtp}/bin/msmtp"; }; - config = globalConfig // signatureConfig // imapConfig // maildirConfig - // notmuchConfig // smtpConfig // sendmailConfig; + config = lib.attrsets.mergeAttrsList [ + globalConfig + signatureConfig + imapConfig + maildirConfig + notmuchConfig + smtpConfig + sendmailConfig + ]; in lib.recursiveUpdate config account.himalaya.settings; - # make a systemd service config from a name and a description - mkServiceConfig = name: desc: - let - inherit (config.services."himalaya-${name}") enable environment settings; - optionalArg = key: - if (key ? settings && !isNull settings."${key}") then - [ "--${key} ${settings."${key}"}" ] - else - [ ]; - in { - "himalaya-${name}" = lib.mkIf enable { - Unit = { - Description = desc; - After = [ "network.target" ]; - }; - Install = { WantedBy = [ "default.target" ]; }; - Service = { - ExecStart = lib.concatStringsSep " " - ([ "${himalaya.package}/bin/himalaya" ] ++ optionalArg "account" - ++ [ name ] ++ optionalArg "keepalive"); - ExecSearchPath = "/bin"; - Environment = - lib.mapAttrsToList (key: val: "${key}=${val}") environment; - Restart = "always"; - RestartSec = 10; - }; - }; - }; - in { meta.maintainers = with lib.hm.maintainers; [ soywod toastal ]; options = { programs.himalaya = { - enable = lib.mkEnableOption "the Himalaya email client"; + enable = lib.mkEnableOption "the email client Himalaya CLI"; package = lib.mkPackageOption pkgs "himalaya" { }; settings = lib.mkOption { type = lib.types.submodule { freeformType = tomlFormat.type; }; default = { }; description = '' - Himalaya global configuration. - See for supported values. + Himalaya CLI global configuration. + See for supported values. ''; }; }; - services = { - himalaya-notify = { - enable = lib.mkEnableOption "the Himalaya new emails notifier service"; - - environment = lib.mkOption { - type = with lib.types; attrsOf str; - default = { }; - example = lib.literalExpression '' - { - "PASSWORD_STORE_DIR" = "~/.password-store"; - } - ''; - description = '' - Extra environment variables to be exported in the service. - ''; - }; - - settings = { - account = lib.mkOption { - type = with lib.types; nullOr str; - default = null; - example = "gmail"; - description = '' - Name of the account the notifier should be started for. If - no account is given, the default one is used. - ''; - }; + services.himalaya-watch = { + enable = lib.mkEnableOption + "the email client Himalaya CLI envelopes watcher service"; - keepalive = lib.mkOption { - type = with lib.types; nullOr int; - default = null; - example = "500"; - description = '' - Notifier lifetime of the IDLE session (in seconds). - ''; - }; - }; + environment = lib.mkOption { + type = with lib.types; attrsOf str; + default = { }; + example = lib.literalExpression '' + { + "PASSWORD_STORE_DIR" = "~/.password-store"; + } + ''; + description = '' + Extra environment variables to be exported in the service. + ''; }; - himalaya-watch = { - enable = - lib.mkEnableOption "the Himalaya folder changes watcher service"; - - environment = lib.mkOption { - type = with lib.types; attrsOf str; - default = { }; - example = lib.literalExpression '' - { - "PASSWORD_STORE_DIR" = "~/.password-store"; - } - ''; - description = '' - Extra environment variables to be exported in the service. - ''; - }; - - settings = { - account = lib.mkOption { - type = with lib.types; nullOr str; - default = null; - example = "gmail"; - description = '' - Name of the account the watcher should be started for. If - no account is given, the default one is used. - ''; - }; - - keepalive = lib.mkOption { - type = with lib.types; nullOr int; - default = null; - example = "500"; - description = '' - Watcher lifetime of the IDLE session (in seconds). - ''; - }; - }; + settings.account = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "personal"; + description = '' + Name of the account the watcher should be started for. + If no account is given, the default one is used. + ''; }; }; accounts.email.accounts = lib.mkOption { type = lib.types.attrsOf (lib.types.submodule { options.himalaya = { - enable = lib.mkEnableOption "Himalaya for this email account"; - - # TODO: remove me for the next release - backend = lib.mkOption { - type = with lib.types; nullOr str; - default = null; - description = '' - Specifying {option}`accounts.email.accounts.*.himalaya.backend` is deprecated, - set {option}`accounts.email.accounts.*.himalaya.settings.backend` instead. - ''; - }; - - # TODO: remove me for the next release - sender = lib.mkOption { - type = with lib.types; nullOr str; - description = '' - Specifying {option}`accounts.email.accounts.*.himalaya.sender` is deprecated, - set {option}'accounts.email.accounts.*.himalaya.settings.sender' instead. - ''; - }; + enable = lib.mkEnableOption + "the email client Himalaya CLI for this email account"; settings = lib.mkOption { type = lib.types.submodule { freeformType = tomlFormat.type; }; default = { }; description = '' - Himalaya configuration for this email account. - See for supported values. + Himalaya CLI configuration for this email account. + See for supported values. ''; }; }; @@ -254,17 +169,33 @@ in { config.accounts.email.accounts; accountsConfig = lib.mapAttrs mkAccountConfig enabledAccounts; globalConfig = compactAttrs himalaya.settings; - allConfig = globalConfig // accountsConfig; + allConfig = globalConfig // { accounts = accountsConfig; }; in tomlFormat.generate "himalaya-config.toml" allConfig; - - systemd.user.services = { } - // mkServiceConfig "notify" "Himalaya new emails notifier service" - // mkServiceConfig "watch" "Himalaya folder changes watcher service"; - - # TODO: remove me for the next release - warnings = (lib.optional ("backend" ? himalaya && !isNull himalaya.backend) - "Specifying 'accounts.email.accounts.*.himalaya.backend' is deprecated, set 'accounts.email.accounts.*.himalaya.settings.backend' instead") - ++ (lib.optional ("sender" ? himalaya && !isNull himalaya.sender) - "Specifying 'accounts.email.accounts.*.himalaya.sender' is deprecated, set 'accounts.email.accounts.*.himalaya.settings.sender' instead."); + systemd.user.services = let + inherit (config.services.himalaya-watch) enable environment settings; + optionalArg = key: + if (key ? settings && !isNull settings."${key}") then + [ "--${key} ${settings."${key}"}" ] + else + [ ]; + in { + himalaya-watch = lib.mkIf enable { + Unit = { + Description = "Email client Himalaya CLI envelopes watcher service"; + After = [ "network.target" ]; + }; + Install = { WantedBy = [ "default.target" ]; }; + Service = { + ExecStart = lib.concatStringsSep " " + ([ "${himalaya.package}/bin/himalaya" "envelopes" "watch" ] + ++ optionalArg "account"); + ExecSearchPath = "/bin"; + Environment = + lib.mapAttrsToList (key: val: "${key}=${val}") environment; + Restart = "always"; + RestartSec = 10; + }; + }; + }; }; } diff --git a/modules/programs/htop.nix b/modules/programs/htop.nix index 1c569c4049a5..b4004942ceee 100644 --- a/modules/programs/htop.nix +++ b/modules/programs/htop.nix @@ -113,7 +113,8 @@ in { enable = mkEnableOption "htop"; settings = mkOption { - type = types.attrs; + type = with types; + attrsOf (oneOf [ bool int str (listOf (oneOf [ int str ])) ]); default = { }; example = literalExpression '' { diff --git a/modules/programs/hyfetch.nix b/modules/programs/hyfetch.nix index 726bc94e63b7..485ceb046515 100644 --- a/modules/programs/hyfetch.nix +++ b/modules/programs/hyfetch.nix @@ -7,7 +7,7 @@ let jsonFormat = pkgs.formats.json { }; in { - meta.maintainers = [ maintainers.lilyinstarlight ]; + meta.maintainers = [ hm.maintainers.lilyinstarlight ]; options.programs.hyfetch = { enable = mkEnableOption "hyfetch"; diff --git a/modules/programs/hyprlock.nix b/modules/programs/hyprlock.nix new file mode 100644 index 000000000000..25d87188951a --- /dev/null +++ b/modules/programs/hyprlock.nix @@ -0,0 +1,127 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + + cfg = config.programs.hyprlock; + +in { + meta.maintainers = [ maintainers.khaneliman maintainers.fufexan ]; + + options.programs.hyprlock = { + enable = mkEnableOption "" // { + description = '' + Whether to enable Hyprlock, Hyprland's GPU-accelerated lock screen + utility. + + Note that PAM must be configured to enable hyprlock to perform + authentication. The package installed through home-manager will *not* be + able to unlock the session without this configuration. + + On NixOS, it can be enabled using: + + ```nix + security.pam.services.hyprlock = {}; + ``` + ''; + }; + + package = mkPackageOption pkgs "hyprlock" { }; + + settings = lib.mkOption { + type = with lib.types; + let + valueType = nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "Hyprlock configuration value"; + }; + in valueType; + default = { }; + example = lib.literalExpression '' + { + general = { + disable_loading_bar = true; + grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = '\'Password...'\'; + shadow_passes = 2; + } + ]; + } + ''; + description = '' + Hyprlock configuration written in Nix. Entries with the same key should + be written as lists. Variables' and colors' names should be quoted. See + for more examples. + ''; + }; + + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = '' + Extra configuration lines to add to `~/.config/hypr/hyprlock.conf`. + ''; + }; + + sourceFirst = lib.mkEnableOption '' + putting source entries at the top of the configuration + '' // { + default = true; + }; + + importantPrefixes = lib.mkOption { + type = with lib.types; listOf str; + default = [ "$" "monitor" "size" ] + ++ lib.optionals cfg.sourceFirst [ "source" ]; + example = [ "$" "monitor" "size" ]; + description = '' + List of prefix of attributes to source at the top of the config. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."hypr/hyprlock.conf" = + let shouldGenerate = cfg.extraConfig != "" || cfg.settings != { }; + in mkIf shouldGenerate { + text = lib.optionalString (cfg.settings != { }) + (lib.hm.generators.toHyprconf { + attrs = cfg.settings; + inherit (cfg) importantPrefixes; + }) + lib.optionalString (cfg.extraConfig != null) cfg.extraConfig; + }; + }; +} diff --git a/modules/programs/jetbrains-remote.nix b/modules/programs/jetbrains-remote.nix new file mode 100644 index 000000000000..4a9c045a9c5c --- /dev/null +++ b/modules/programs/jetbrains-remote.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.jetbrains-remote; + +in { + meta.maintainers = with lib.maintainers; [ genericnerdyusername ]; + + options.programs.jetbrains-remote = { + enable = mkEnableOption "JetBrains remote development system"; + + ides = mkOption { + type = types.listOf types.package; + default = [ ]; + example = literalExpression '' + with pkgs.jetbrains; [ clion pycharm-professional ]; + ''; + description = '' + IDEs accessible to the JetBrains remote development system. + ''; + }; + }; + + config = mkIf (cfg.enable && cfg.ides != [ ]) { + home.activation.jetBrainsRemote = let + mkLine = ide: + # Errors out if the symlink already exists + "${ide}/bin/${ide.meta.mainProgram}-remote-dev-server registerBackendLocationForGateway || true"; + lines = map mkLine cfg.ides; + linesStr = '' + rm $HOME/.cache/JetBrains/RemoteDev/userProvidedDist/_nix_store* + '' + concatStringsSep "\n" lines; + in hm.dag.entryAfter [ "writeBoundary" ] linesStr; + }; +} diff --git a/modules/programs/joplin-desktop.nix b/modules/programs/joplin-desktop.nix new file mode 100644 index 000000000000..418abff335c0 --- /dev/null +++ b/modules/programs/joplin-desktop.nix @@ -0,0 +1,135 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.joplin-desktop; + + jsonFormat = pkgs.formats.json { }; + + # config path is the same for linux and mac + configPath = "${config.xdg.configHome}/joplin-desktop/settings.json"; + +in { + meta.maintainers = [ lib.hm.maintainers.zorrobert ]; + + options.programs.joplin-desktop = { + enable = lib.mkEnableOption "joplin-desktop"; + + package = lib.mkPackageOption pkgs "joplin-desktop" { }; + + extraConfig = lib.mkOption { + type = lib.types.attrs; + default = { }; + example = { + "newNoteFocus" = "title"; + "markdown.plugin.mark" = true; + }; + description = '' + Use this to add other options to the Joplin config file. Settings are + written in JSON, so `"sync.interval": 600` would be written as + `"sync.interval" = 600`. + ''; + }; + + ### General + general = { + editor = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + example = "kate"; + description = '' + The editor command (may include arguments) that will be used to open a + note. If none is provided Joplin will try to auto-detect the default + editor. + ''; + }; + }; + + ### Sync + sync = { + target = lib.mkOption { + type = lib.types.enum [ + "undefined" + "none" + "file-system" + "onedrive" + "nextcloud" + "webdav" + "dropbox" + "s3" + "joplin-server" + "joplin-cloud" + ]; + default = "undefined"; + example = "dropbox"; + description = "What is the type of sync target."; + }; + + interval = lib.mkOption { + type = lib.types.enum [ + "undefined" + "disabled" + "5m" + "10m" + "30m" + "1h" + "12h" + "1d" + ]; + default = "undefined"; + example = "10m"; + description = '' + Set the synchronisation interval. + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.activation = { + activateJoplinDesktopConfig = let + newConfig = jsonFormat.generate "joplin-settings.json" + (lib.attrsets.filterAttrs (n: v: (v != null) && (v != "")) ({ + # TODO: find a better way to convert nix attribute names to strings: + # sync.interval = ... -> "sync.interval" = ... + + "editor" = cfg.general.editor; + + "sync.target" = { + "undefined" = null; + "none" = 0; + "file-system" = 2; + "onedrive" = 3; + "nextcloud" = 5; + "webdav" = 6; + "dropbox" = 7; + "s3" = 8; + "joplin-server" = 9; + "joplin-cloud" = 10; + }.${cfg.sync.target}; + + "sync.interval" = { + "undefined" = null; + "disabled" = 0; + "5m" = 300; + "10m" = 600; + "30m" = 1800; + "1h" = 3600; + "12h" = 43200; + "1d" = 86400; + }.${cfg.sync.interval}; + } // cfg.extraConfig)); + in lib.hm.dag.entryAfter [ "linkGeneration" ] '' + # Ensure that settings.json exists. + mkdir -p ${builtins.dirOf configPath} + touch ${configPath} + # Config has to be written to temporary variable because jq cannot edit files in place. + config="$(jq -s '.[0] + .[1]' ${configPath} ${newConfig})" + printf '%s\n' "$config" > ${configPath} + unset config + ''; + }; + }; +} diff --git a/modules/programs/jujutsu.nix b/modules/programs/jujutsu.nix index c511f2dcc2a1..f0e1b425010f 100644 --- a/modules/programs/jujutsu.nix +++ b/modules/programs/jujutsu.nix @@ -7,70 +7,68 @@ let cfg = config.programs.jujutsu; tomlFormat = pkgs.formats.toml { }; + configDir = if pkgs.stdenv.isDarwin then + "Library/Application Support" + else + config.xdg.configHome; + in { meta.maintainers = [ maintainers.shikanime ]; + imports = let + mkRemovedShellIntegration = name: + mkRemovedOptionModule [ "programs" "jujutsu" "enable${name}Integration" ] + "This option is no longer necessary."; + in map mkRemovedShellIntegration [ "Bash" "Fish" "Zsh" ]; + options.programs.jujutsu = { enable = mkEnableOption "a Git-compatible DVCS that is both simple and powerful"; package = mkPackageOption pkgs "jujutsu" { }; + ediff = mkOption { + type = types.bool; + default = config.programs.emacs.enable; + defaultText = literalExpression "config.programs.emacs.enable"; + description = '' + Enable ediff as a merge tool + ''; + }; + settings = mkOption { type = tomlFormat.type; default = { }; - example = literalExpression '' - { - user = { - name = "John Doe"; - email = "jdoe@example.org"; - }; - } - ''; + example = { + user = { + name = "John Doe"; + email = "jdoe@example.org"; + }; + }; description = '' - Options to add to the {file}`.jjconfig.toml` file. See + Options to add to the {file}`config.toml` file. See for options. ''; }; - - enableBashIntegration = mkOption { - type = types.bool; - default = true; - description = "Whether to enable Bash integration."; - }; - - enableZshIntegration = mkOption { - type = types.bool; - default = true; - description = "Whether to enable Zsh integration."; - }; - - enableFishIntegration = mkOption { - type = types.bool; - default = true; - description = "Whether to enable Fish integration."; - }; }; config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.file.".jjconfig.toml" = mkIf (cfg.settings != { }) { - source = tomlFormat.generate "jujutsu-config" cfg.settings; + home.file."${configDir}/jj/config.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "jujutsu-config" (cfg.settings + // optionalAttrs (cfg.ediff) (let + emacsDiffScript = pkgs.writeShellScriptBin "emacs-ediff" '' + set -euxo pipefail + ${config.programs.emacs.package}/bin/emacsclient -c --eval "(ediff-merge-files-with-ancestor \"$1\" \"$2\" \"$3\" nil \"$4\")" + ''; + in { + merge-tools.ediff = { + program = getExe emacsDiffScript; + merge-args = [ "$left" "$right" "$base" "$output" ]; + }; + })); }; - - programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - source <(${pkgs.jujutsu}/bin/jj util completion) - ''; - - programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - source <(${pkgs.jujutsu}/bin/jj util completion --zsh) - compdef _jj ${pkgs.jujutsu}/bin/jj - ''; - - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - ${pkgs.jujutsu}/bin/jj util completion --fish | source - ''; }; } diff --git a/modules/programs/k9s.nix b/modules/programs/k9s.nix index 43de8f79c802..0dd10788395a 100644 --- a/modules/programs/k9s.nix +++ b/modules/programs/k9s.nix @@ -6,9 +6,19 @@ let cfg = config.programs.k9s; yamlFormat = pkgs.formats.yaml { }; + inherit (pkgs.stdenv.hostPlatform) isDarwin; in { - meta.maintainers = with maintainers; [ katexochen liyangau ]; + meta.maintainers = with maintainers; [ liyangau hm.maintainers.LucasWagler ]; + + imports = [ + (mkRenamedOptionModule [ "programs" "k9s" "skin" ] [ + "programs" + "k9s" + "skins" + "skin" + ]) + ]; options.programs.k9s = { enable = @@ -20,7 +30,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Configuration written to {file}`$XDG_CONFIG_HOME/k9s/config.yml`. See + Configuration written to {file}`$XDG_CONFIG_HOME/k9s/config.yaml` (linux) + or {file}`Library/Application Support/k9s/config.yaml` (darwin), See for supported values. ''; example = literalExpression '' @@ -30,19 +41,25 @@ in { ''; }; - skin = mkOption { - type = yamlFormat.type; + skins = mkOption { + type = with types; attrsOf (either yamlFormat.type path); default = { }; description = '' - Skin written to {file}`$XDG_CONFIG_HOME/k9s/skin.yml`. See + Skin files written to {file}`$XDG_CONFIG_HOME/k9s/skins/` (linux) + or {file}`Library/Application Support/k9s/skins/` (darwin). See for supported values. ''; example = literalExpression '' - k9s = { - body = { - fgColor = "dodgerblue"; + { + my_blue_skin = { + k9s = { + body = { + fgColor = "dodgerblue"; + }; + }; }; - }; + my_red_skin = ./red_skin.yaml; + } ''; }; @@ -50,7 +67,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Aliases written to {file}`$XDG_CONFIG_HOME/k9s/aliases.yml`. See + Aliases written to {file}`$XDG_CONFIG_HOME/k9s/aliases.yaml` (linux) + or {file}`Library/Application Support/k9s/aliases.yaml` (darwin). See for supported values. ''; example = literalExpression '' @@ -65,7 +83,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Hotkeys written to {file}`$XDG_CONFIG_HOME/k9s/hotkey.yml`. See + Hotkeys written to {file}`$XDG_CONFIG_HOME/k9s/hotkeys.yaml` (linux) + or {file}`Library/Application Support/k9s/hotkeys.yaml` (darwin). See for supported values. ''; example = literalExpression '' @@ -86,7 +105,8 @@ in { type = yamlFormat.type; default = { }; description = '' - Plugins written to {file}`$XDG_CONFIG_HOME/k9s/plugin.yml`. See + Plugins written to {file}`$XDG_CONFIG_HOME/k9s/plugins.yaml (linux)` + or {file}`Library/Application Support/k9s/plugins.yaml` (darwin). See for supported values. ''; example = literalExpression '' @@ -117,7 +137,9 @@ in { type = yamlFormat.type; default = { }; description = '' - Resource column views written to {file}`$XDG_CONFIG_HOME/k9s/views.yml`. + Resource column views written to + {file}`$XDG_CONFIG_HOME/k9s/views.yaml (linux)` + or {file}`Library/Application Support/k9s/views.yaml` (darwin). See for supported values. ''; example = literalExpression '' @@ -140,31 +162,76 @@ in { }; }; - config = mkIf cfg.enable { + config = let + skinSetting = if (!(cfg.settings ? k9s.ui.skin) && cfg.skins != { }) then { + k9s.ui.skin = "${builtins.elemAt (builtins.attrNames cfg.skins) 0}"; + } else + { }; + + skinFiles = mapAttrs' (name: value: + nameValuePair (if !(isDarwin && !config.xdg.enable) then + "k9s/skins/${name}.yaml" + else + "Library/Application Support/k9s/skins/${name}.yaml") { + source = if lib.types.path.check value then + value + else + yamlFormat.generate "k9s-skin-${name}.yaml" value; + }) cfg.skins; + + enableXdgConfig = !isDarwin || config.xdg.enable; + + in mkIf cfg.enable { home.packages = [ cfg.package ]; - xdg.configFile."k9s/config.yml" = mkIf (cfg.settings != { }) { - source = yamlFormat.generate "k9s-config" cfg.settings; - }; - - xdg.configFile."k9s/skin.yml" = mkIf (cfg.skin != { }) { - source = yamlFormat.generate "k9s-skin" cfg.skin; - }; + xdg.configFile = mkIf enableXdgConfig ({ + "k9s/config.yaml" = mkIf (cfg.settings != { }) { + source = yamlFormat.generate "k9s-config" + (lib.recursiveUpdate skinSetting cfg.settings); + }; + + "k9s/aliases.yaml" = mkIf (cfg.aliases != { }) { + source = yamlFormat.generate "k9s-aliases" cfg.aliases; + }; + + "k9s/hotkeys.yaml" = mkIf (cfg.hotkey != { }) { + source = yamlFormat.generate "k9s-hotkey" cfg.hotkey; + }; + + "k9s/plugins.yaml" = mkIf (cfg.plugin != { }) { + source = yamlFormat.generate "k9s-plugin" cfg.plugin; + }; + + "k9s/views.yaml" = mkIf (cfg.views != { }) { + source = yamlFormat.generate "k9s-views" cfg.views; + }; + } // skinFiles); + + home.file = mkIf (!enableXdgConfig) ({ + "Library/Application Support/k9s/config.yaml" = + mkIf (cfg.settings != { }) { + source = yamlFormat.generate "k9s-config" + (lib.recursiveUpdate skinSetting cfg.settings); + }; - xdg.configFile."k9s/aliases.yml" = mkIf (cfg.aliases != { }) { - source = yamlFormat.generate "k9s-aliases" cfg.aliases; - }; + "Library/Application Support/k9s/aliases.yaml" = + 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; - }; + "Library/Application Support/k9s/hotkeys.yaml" = + 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; - }; + "Library/Application Support/k9s/plugins.yaml" = + 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; - }; + "Library/Application Support/k9s/views.yaml" = mkIf (cfg.views != { }) { + source = yamlFormat.generate "k9s-views" cfg.views; + }; + } // skinFiles); }; } diff --git a/modules/programs/kakoune.nix b/modules/programs/kakoune.nix index da0af0c0610d..5e40952b978a 100644 --- a/modules/programs/kakoune.nix +++ b/modules/programs/kakoune.nix @@ -658,12 +658,30 @@ in { {command}`nix-env -f '' -qaP -A kakounePlugins`. ''; }; + + colorSchemePackage = mkOption { + type = with types; nullOr package; + default = null; + example = literalExpression "pkgs.kakounePlugins.kakoune-catppuccin"; + description = '' + A kakoune color schemes to add to your colors folder. This works + because kakoune recursively checks + {file}`$XDG_CONFIG_HOME/kak/colors/`. To apply the color scheme use + `programs.kakoune.config.colorScheme = "theme"`. + ''; + }; }; }; config = mkIf cfg.enable { home.packages = [ kakouneWithPlugins ]; home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; }; - xdg.configFile."kak/kakrc".source = configFile; + xdg.configFile = mkMerge [ + { "kak/kakrc".source = configFile; } + (mkIf (cfg.colorSchemePackage != null) { + "kak/colors/${cfg.colorSchemePackage.name}".source = + cfg.colorSchemePackage; + }) + ]; }; } diff --git a/modules/programs/khal-accounts.nix b/modules/programs/khal-accounts.nix index ad94adc9952a..bbf222d901e6 100644 --- a/modules/programs/khal-accounts.nix +++ b/modules/programs/khal-accounts.nix @@ -13,5 +13,32 @@ with lib; Keep khal from making any changes to this account. ''; }; + + color = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Color in which events in this calendar are displayed. + For instance 'light green' or an RGB color '#ff0000' + ''; + example = "light green"; + }; + + priority = mkOption { + type = types.int; + default = 10; + description = '' + Priority of a calendar used for coloring (calendar with highest priority is preferred). + ''; + }; + + addresses = mkOption { + type = types.listOf types.str; + default = [ ]; + description = '' + Email addresses to be associated with this account. Used to check the + participation status ("PARTSTAT"), refer to khal documentation. + ''; + }; }; } diff --git a/modules/programs/khal-calendar-accounts.nix b/modules/programs/khal-calendar-accounts.nix index 6910d627a15c..3aa2494e8ef0 100644 --- a/modules/programs/khal-calendar-accounts.nix +++ b/modules/programs/khal-calendar-accounts.nix @@ -5,8 +5,8 @@ with lib; { options.khal = { type = mkOption { - type = types.nullOr (types.enum [ "calendar" "discover" ]); - default = null; + type = types.enum [ "calendar" "discover" ]; + default = "calendar"; description = '' Either a single calendar (calendar which is the default) or a directory with multiple calendars (discover). ''; @@ -20,39 +20,5 @@ with lib; type is set to discover. ''; }; - - color = mkOption { - type = types.nullOr (types.enum [ - "black" - "white" - "brown" - "yellow" - "dark gray" - "dark green" - "dark blue" - "light gray" - "light green" - "light blue" - "dark magenta" - "dark cyan" - "dark red" - "light magenta" - "light cyan" - "light red" - ]); - default = null; - description = '' - Color in which events in this calendar are displayed. - ''; - example = "light green"; - }; - - priority = mkOption { - type = types.int; - default = 10; - description = '' - Priority of a calendar used for coloring. - ''; - }; }; } diff --git a/modules/programs/khal-contact-accounts.nix b/modules/programs/khal-contact-accounts.nix new file mode 100644 index 000000000000..c58ed4d6b4b1 --- /dev/null +++ b/modules/programs/khal-contact-accounts.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: + +with lib; + +{ + options.khal = { + collections = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + description = '' + VCARD collections to be searched for contact birthdays. + ''; + }; + }; +} diff --git a/modules/programs/khal.nix b/modules/programs/khal.nix index 8fc0e0892fc9..a2e28e018136 100644 --- a/modules/programs/khal.nix +++ b/modules/programs/khal.nix @@ -12,13 +12,25 @@ let khalCalendarAccounts = filterAttrs (_: a: a.khal.enable) config.accounts.calendar.accounts; - khalContactAccounts = mapAttrs (_: v: v // { type = "birthdays"; }) - (filterAttrs (_: a: a.khal.enable) config.accounts.contact.accounts); + # a contact account may have multiple collections, each a separate calendar + expandContactAccount = name: acct: + if acct.khal.collections != null then + listToAttrs (map (c: { + name = "${name}-${c}"; + value = recursiveUpdate acct { khal.thisCollection = c; }; + }) acct.khal.collections) + else { + ${name} = acct; + }; + + khalContactAccounts = concatMapAttrs expandContactAccount + (mapAttrs (_: v: recursiveUpdate v { khal.type = "birthdays"; }) + (filterAttrs (_: a: a.khal.enable) config.accounts.contact.accounts)); khalAccounts = khalCalendarAccounts // khalContactAccounts; primaryAccount = findSingle (a: a.primary) null null - (mapAttrsToList (n: v: v // { name = n; }) khalAccounts); + (mapAttrsToList (n: v: v // { name = n; }) khalCalendarAccounts); definedAttrs = filterAttrs (_: v: !isNull v); @@ -30,10 +42,16 @@ let "path = ${ value.local.path + "/" + (optionalString (value.khal.type == "discover") value.khal.glob) + + (optionalString + (value.khal.type == "birthdays" && value.khal ? thisCollection) + value.khal.thisCollection) }" - ] ++ optional (value.khal.readOnly) "readonly = True" ++ [ - (toKeyValueIfDefined (getAttrs [ "type" "color" "priority" ] value.khal)) - ] ++ [ "\n" ]); + ] ++ optional (value.khal.readOnly) "readonly = True" + ++ optional (value.khal.addresses != [ ]) + "addresses= ${lib.concatStringsSep ", " value.khal.addresses}" + ++ optional (value.khal.color != null) "color = '${value.khal.color}'" + ++ [ (toKeyValueIfDefined (getAttrs [ "type" "priority" ] value.khal)) ] + ++ [ "\n" ]); localeFormatOptions = let T = lib.types; @@ -150,10 +168,12 @@ in { options.programs.khal = { enable = mkEnableOption "khal, a CLI calendar application"; + package = mkPackageOption pkgs "khal" { }; + locale = mkOption { type = lib.types.submodule { options = localeOptions; }; description = '' - khal locale settings. + khal locale settings. ''; default = { }; }; @@ -179,7 +199,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.khal ]; + home.packages = [ cfg.package ]; xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ] ++ mapAttrsToList genCalendarStr khalAccounts ++ [ diff --git a/modules/programs/khard.nix b/modules/programs/khard.nix index a3e73fb07624..cbd8c1f0792e 100644 --- a/modules/programs/khard.nix +++ b/modules/programs/khard.nix @@ -68,6 +68,11 @@ in { type = with lib.types; attrsOf (submodule { options.khard.enable = lib.mkEnableOption "khard access"; + options.khard.defaultCollection = lib.mkOption { + type = types.str; + default = ""; + description = "VCARD collection to be searched by khard."; + }; }); }; }; @@ -75,11 +80,17 @@ in { config = lib.mkIf cfg.enable { home.packages = [ pkgs.khard ]; - xdg.configFile."khard/khard.conf".text = '' + xdg.configFile."khard/khard.conf".text = let + makePath = anAccount: + builtins.toString (/. + lib.concatStringsSep "/" [ + anAccount.local.path + anAccount.khard.defaultCollection + ]); + in '' [addressbooks] ${lib.concatMapStringsSep "\n" (acc: '' [[${acc.name}]] - path = ${acc.local.path} + path = ${makePath acc} '') (lib.attrValues accounts)} ${renderSettings cfg.settings} diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index e010ba09f1dd..9854fe69c2c3 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -3,10 +3,9 @@ with lib; let - cfg = config.programs.kitty; - eitherStrBoolInt = with types; either str (either bool int); + settingsValueType = with types; oneOf [ str bool int float ]; optionalPackage = opt: optional (opt != null && opt.package != null) opt.package; @@ -29,17 +28,20 @@ let shellIntegrationInit = { bash = '' if test -n "$KITTY_INSTALLATION_DIR"; then + export KITTY_SHELL_INTEGRATION="${cfg.shellIntegration.mode}" source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash" fi ''; fish = '' if set -q KITTY_INSTALLATION_DIR + set --global KITTY_SHELL_INTEGRATION "${cfg.shellIntegration.mode}" source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" end ''; zsh = '' if test -n "$KITTY_INSTALLATION_DIR"; then + export KITTY_SHELL_INTEGRATION="${cfg.shellIntegration.mode}" autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration kitty-integration unfunction kitty-integration @@ -48,12 +50,32 @@ let }; shellIntegrationDefaultOpt = { - default = cfg.shellIntegration.mode != "disabled"; + default = !(elem "disabled" (splitString " " cfg.shellIntegration.mode)); defaultText = literalExpression '' - config.programs.kitty.shellIntegration.mode != "disabled" + !(elem "disabled" (splitString " " config.programs.kitty.shellIntegration.mode)) ''; }; in { + imports = [ + (mkChangedOptionModule [ "programs" "kitty" "theme" ] [ + "programs" + "kitty" + "themeFile" + ] (config: + let value = getAttrFromPath [ "programs" "kitty" "theme" ] config; + in if value != null then + (let + matching = filter (x: x.name == value) (builtins.fromJSON + (builtins.readFile + "${pkgs.kitty-themes}/share/kitty-themes/themes.json")); + in throwIf (length matching == 0) + "kitty-themes does not contain a theme named ${value}" + strings.removeSuffix ".conf" + (strings.removePrefix "themes/" (head matching).file)) + else + null)) + ]; + options.programs.kitty = { enable = mkEnableOption "Kitty terminal emulator"; @@ -80,7 +102,7 @@ in { }; settings = mkOption { - type = types.attrsOf eitherStrBoolInt; + type = types.attrsOf settingsValueType; default = { }; example = literalExpression '' { @@ -97,16 +119,16 @@ in { ''; }; - theme = mkOption { + themeFile = mkOption { type = types.nullOr types.str; default = null; description = '' - Apply a Kitty color theme. This option takes the friendly name of - any theme given by the command {command}`kitty +kitten themes`. - See - for more details. + Apply a Kitty color theme. This option takes the file name of a theme + in `kitty-themes`, without the `.conf` suffix. See + for a + list of themes. ''; - example = "Space Gray Eighties"; + example = "SpaceGray_Eighties"; }; font = mkOption { @@ -141,8 +163,13 @@ in { shellIntegration = { mode = mkOption { type = types.str; - default = "enabled"; + default = "no-rc"; example = "no-cursor"; + apply = o: + let + modes = splitString " " o; + filtered = filter (m: m != "no-rc") modes; + in concatStringsSep " " (concatLists [ [ "no-rc" ] filtered ]); description = '' Set the mode of the shell integration. This accepts the same options as the `shell_integration` option of Kitty. Note that @@ -176,40 +203,41 @@ in { text = '' # Generated by Home Manager. # See https://sw.kovidgoyal.net/kitty/conf.html - '' + concatStringsSep "\n" ([ - + '' + concatStringsSep "\n" [ (optionalString (cfg.font != null) '' font_family ${cfg.font.name} ${optionalString (cfg.font.size != null) "font_size ${toString cfg.font.size}"} '') - (optionalString (cfg.theme != null) '' - include ${pkgs.kitty-themes}/share/kitty-themes/${ - let - matching = filter (x: x.name == cfg.theme) (builtins.fromJSON - (builtins.readFile - "${pkgs.kitty-themes}/share/kitty-themes/themes.json")); - in throwIf (length matching == 0) - "kitty-themes does not contain a theme named ${cfg.theme}" - (head matching).file - } + (optionalString (cfg.themeFile != null) '' + include ${pkgs.kitty-themes}/share/kitty-themes/themes/${cfg.themeFile}.conf '') '' # Shell integration is sourced and configured manually - shell_integration no-rc ${cfg.shellIntegration.mode} + shell_integration ${cfg.shellIntegration.mode} '' (toKittyConfig cfg.settings) (toKittyKeybindings cfg.keybindings) (toKittyEnv cfg.environment) cfg.extraConfig - ]); + ]; } // optionalAttrs pkgs.stdenv.hostPlatform.isLinux { onChange = '' ${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true ''; }; + home.activation.checkKittyTheme = mkIf (cfg.themeFile != null) (let + themePath = + "${pkgs.kitty-themes}/share/kitty-themes/themes/${cfg.themeFile}.conf"; + in hm.dag.entryBefore [ "writeBoundary" ] '' + if [[ ! -f "${themePath}" ]]; then + errorEcho "kitty-themes does not contain the theme file ${themePath}!" + exit 1 + fi + ''); + xdg.configFile."kitty/macos-launch-services-cmdline" = mkIf (cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) { text = concatStringsSep " " cfg.darwinLaunchOptions; diff --git a/modules/programs/kubecolor.nix b/modules/programs/kubecolor.nix new file mode 100644 index 000000000000..d187c34d0b37 --- /dev/null +++ b/modules/programs/kubecolor.nix @@ -0,0 +1,87 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.kubecolor; + yamlFormat = pkgs.formats.yaml { }; + inherit (pkgs.stdenv.hostPlatform) isDarwin; + +in { + meta.maintainers = with maintainers; [ ajgon ]; + + options.programs.kubecolor = { + enable = mkEnableOption "kubecolor - Colorize your kubectl output"; + + package = mkPackageOption pkgs "kubecolor" { }; + + enableAlias = mkOption { + type = types.bool; + default = false; + description = '' + When set to true, it will create an alias for kubectl pointing to + kubecolor, thus making kubecolor the default kubectl client. + ''; + }; + + settings = mkOption { + type = yamlFormat.type; + default = { }; + example = literalExpression '' + kubectl = lib.getExe pkgs.kubectl + preset = "dark"; + paging = "auto"; + ''; + description = '' + Configuration written to {file}`~/.kube/color.yaml` (Linux) + or {file}`Library/Application Support/kube/color.yaml` (Darwin). + See for supported + values. + ''; + }; + }; + + config = let + preferXdgDirectories = config.home.preferXdgDirectories + && (!isDarwin || config.xdg.enable); + + # https://github.com/kubecolor/kubecolor/pull/145 + configPathSuffix = if cfg.package.pname == "kubecolor" + && lib.strings.toInt (lib.versions.major cfg.package.version) == 0 + && lib.strings.toInt (lib.versions.minor cfg.package.version) < 4 then + "kube/" + else + "kube/color.yaml"; + + in mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.sessionVariables = if preferXdgDirectories then { + KUBECOLOR_CONFIG = "${config.xdg.configHome}/${configPathSuffix}"; + } else if isDarwin then { + KUBECOLOR_CONFIG = + "${config.home.homeDirectory}/Library/Application Support/${configPathSuffix}"; + } else + { }; + + xdg.configFile = mkIf preferXdgDirectories { + "kube/color.yaml" = mkIf (cfg.settings != { }) { + source = yamlFormat.generate "kubecolor-settings" cfg.settings; + }; + }; + + home.file = mkIf (!preferXdgDirectories) { + "Library/Application Support/kube/color.yaml" = + mkIf (isDarwin && cfg.settings != { }) { + source = yamlFormat.generate "kubecolor-settings" cfg.settings; + }; + ".kube/color.yaml" = mkIf (!isDarwin && cfg.settings != { }) { + source = yamlFormat.generate "kubecolor-settings" cfg.settings; + }; + }; + + home.shellAliases = + lib.mkIf cfg.enableAlias { kubectl = lib.getExe cfg.package; }; + }; +} diff --git a/modules/programs/librewolf.nix b/modules/programs/librewolf.nix index d8b6dfabba72..7363d9e53907 100644 --- a/modules/programs/librewolf.nix +++ b/modules/programs/librewolf.nix @@ -14,20 +14,35 @@ let '') prefs)} ''; + modulePath = [ "programs" "librewolf" ]; + + mkFirefoxModule = import ./firefox/mkFirefoxModule.nix; + in { - meta.maintainers = [ maintainers.onny ]; + meta.maintainers = [ maintainers.chayleaf maintainers.onny ]; - options.programs.librewolf = { - enable = - mkEnableOption "Librewolf browser, a privacy enhanced Firefox fork"; - - package = mkOption { - type = types.package; - default = pkgs.librewolf; - defaultText = literalExpression "pkgs.librewolf"; - description = "The LibreWolf package to use."; - }; + imports = [ + (mkFirefoxModule { + inherit modulePath; + name = "LibreWolf"; + description = "LibreWolf is a privacy enhanced Firefox fork."; + wrappedPackageName = "librewolf"; + unwrappedPackageName = "librewolf-unwrapped"; + platforms.linux = { + vendorPath = ".librewolf"; + configPath = ".librewolf"; + }; + platforms.darwin = { + vendorPath = "Library/Application Support/LibreWolf"; + configPath = "Library/Application Support/LibreWolf"; + }; + + enableBookmarks = false; + }) + ]; + + options.programs.librewolf = { settings = mkOption { type = with types; attrsOf (either bool (either int str)); default = { }; @@ -38,7 +53,7 @@ in { } ''; description = '' - Attribute set of LibreWolf settings and overrides. Refer to + Attribute set of global LibreWolf settings and overrides. Refer to for details on supported values. ''; @@ -51,9 +66,7 @@ in { lib.platforms.linux) ]; - home.packages = [ cfg.package ]; - - home.file.".librewolf/librewolf.overrides.cfg".text = - mkOverridesFile cfg.settings; + home.file.".librewolf/librewolf.overrides.cfg" = + lib.mkIf (cfg.settings != { }) { text = mkOverridesFile cfg.settings; }; }; } diff --git a/modules/programs/lsd.nix b/modules/programs/lsd.nix index c333918a88fe..0053a494fbd9 100644 --- a/modules/programs/lsd.nix +++ b/modules/programs/lsd.nix @@ -74,7 +74,15 @@ in { programs.zsh.shellAliases = mkIf cfg.enableAliases aliases; - programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.fish = mkMerge [ + (mkIf (!config.programs.fish.preferAbbrs) { + shellAliases = mkIf cfg.enableAliases aliases; + }) + + (mkIf config.programs.fish.preferAbbrs { + shellAbbrs = mkIf cfg.enableAliases aliases; + }) + ]; programs.lsd = mkIf (cfg.colors != { }) { settings.color.theme = "custom"; }; diff --git a/modules/programs/mangohud.nix b/modules/programs/mangohud.nix index f0e35a3a3c48..a62587a2d919 100644 --- a/modules/programs/mangohud.nix +++ b/modules/programs/mangohud.nix @@ -68,7 +68,7 @@ in { { mpv = { no_display = true; - } + }; } ''; description = '' diff --git a/modules/programs/mbsync.nix b/modules/programs/mbsync.nix index d43f645555c5..3437602e955d 100644 --- a/modules/programs/mbsync.nix +++ b/modules/programs/mbsync.nix @@ -287,7 +287,7 @@ in { home.activation = mkIf (mbsyncAccounts != [ ]) { createMaildir = hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' - $DRY_RUN_CMD mkdir -m700 -p $VERBOSE_ARG ${ + run mkdir -m700 -p $VERBOSE_ARG ${ concatMapStringsSep " " (a: a.maildir.absPath) mbsyncAccounts } ''; diff --git a/modules/programs/mcfly.nix b/modules/programs/mcfly.nix index 75f6f2b3161e..d0dddba21133 100644 --- a/modules/programs/mcfly.nix +++ b/modules/programs/mcfly.nix @@ -5,6 +5,26 @@ let cfg = config.programs.mcfly; + tomlFormat = pkgs.formats.toml { }; + + bashIntegration = '' + eval "$(${getExe pkgs.mcfly} init bash)" + '' + optionalString cfg.fzf.enable '' + eval "$(${getExe pkgs.mcfly-fzf} init bash)" + ''; + + fishIntegration = '' + ${getExe pkgs.mcfly} init fish | source + '' + optionalString cfg.fzf.enable '' + ${getExe pkgs.mcfly-fzf} init fish | source + ''; + + zshIntegration = '' + eval "$(${getExe pkgs.mcfly} init zsh)" + '' + optionalString cfg.fzf.enable '' + eval "$(${getExe pkgs.mcfly-fzf} init zsh)" + ''; + in { meta.maintainers = [ ]; @@ -22,6 +42,37 @@ in { options.programs.mcfly = { enable = mkEnableOption "mcfly"; + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + colors = { + menubar = { + bg = "black"; + fg = "red"; + }; + darkmode = { + prompt = "cyan"; + timing = "yellow"; + results_selection_fg = "cyan"; + results_selection_bg = "black"; + results_selection_hl = "red"; + }; + }; + } + ''; + description = '' + Settings written to {file}`~/.config/mcfly/config.toml`. + + Note, if your McFly database is currently in {file}`~/.mcfly`, + then this option has no effect. + Move the database to {file}`$XDG_DATA_DIR/mcfly/history.db` and + remove {file}`~/.mcfly` to make the settings take effect. See + . + ''; + }; + keyScheme = mkOption { type = types.enum [ "emacs" "vim" ]; default = "emacs"; @@ -30,6 +81,16 @@ in { ''; }; + interfaceView = mkOption { + type = types.enum [ "TOP" "BOTTOM" ]; + default = "TOP"; + description = '' + Interface view to use. + ''; + }; + + fzf.enable = mkEnableOption "McFly fzf integration"; + enableLightTheme = mkOption { default = false; type = types.bool; @@ -75,21 +136,22 @@ in { config = mkIf cfg.enable (mkMerge [ { - home.packages = [ pkgs.mcfly ]; + home.packages = [ pkgs.mcfly ] ++ optional cfg.fzf.enable pkgs.mcfly-fzf; - programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - eval "$(${pkgs.mcfly}/bin/mcfly init bash)" - ''; + # Oddly enough, McFly expects this in the data path, not in config. + xdg.dataFile."mcfly/config.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "mcfly-config.toml" cfg.settings; + }; - programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${pkgs.mcfly}/bin/mcfly init zsh)" - ''; + programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration; - programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - ${pkgs.mcfly}/bin/mcfly init fish | source - ''; + programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration fishIntegration; home.sessionVariables.MCFLY_KEY_SCHEME = cfg.keyScheme; + + home.sessionVariables.MCFLY_INTERFACE_VIEW = cfg.interfaceView; } (mkIf cfg.enableLightTheme { home.sessionVariables.MCFLY_LIGHT = "TRUE"; }) diff --git a/modules/programs/micro.nix b/modules/programs/micro.nix index 0093e25f0a80..bf34f8e62c8a 100644 --- a/modules/programs/micro.nix +++ b/modules/programs/micro.nix @@ -15,6 +15,8 @@ in { programs.micro = { enable = mkEnableOption "micro, a terminal-based text editor"; + package = mkPackageOption pkgs "micro" { }; + settings = mkOption { type = jsonFormat.type; default = { }; @@ -35,7 +37,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.micro ]; + home.packages = [ cfg.package ]; xdg.configFile."micro/settings.json".source = jsonFormat.generate "micro-settings" cfg.settings; diff --git a/modules/programs/mise.nix b/modules/programs/mise.nix new file mode 100644 index 000000000000..404f1bf9ca4b --- /dev/null +++ b/modules/programs/mise.nix @@ -0,0 +1,111 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.mise; + tomlFormat = pkgs.formats.toml { }; +in { + meta.maintainers = [ hm.maintainers.pedorich-n ]; + + imports = let + mkRemovedWarning = opt: + (mkRemovedOptionModule [ "programs" "rtx" opt ] '' + The `rtx` package has been replaced by `mise`, please switch over to + using the options under `programs.mise.*` instead. + ''); + + in map mkRemovedWarning [ + "enable" + "package" + "enableBashIntegration" + "enableZshIntegration" + "enableFishIntegration" + "settings" + ]; + + options = { + programs.mise = { + enable = mkEnableOption "mise"; + + package = mkPackageOption pkgs "mise" { }; + + enableBashIntegration = mkEnableOption "Bash Integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh Integration" // { + default = true; + }; + + enableFishIntegration = mkEnableOption "Fish Integration" // { + default = true; + }; + + globalConfig = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + tools = { + node = "lts"; + python = ["3.10" "3.11"]; + }; + + aliases = { + my_custom_node = "20"; + }; + ''; + description = '' + Config written to {file}`$XDG_CONFIG_HOME/mise/config.toml`. + + See + for details on supported values. + ''; + }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + verbose = false; + experimental = false; + disable_tools = ["node"]; + ''; + description = '' + Settings written to {file}`$XDG_CONFIG_HOME/mise/settings.toml`. + + See + for details on supported values. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile = { + "mise/config.toml" = mkIf (cfg.globalConfig != { }) { + source = tomlFormat.generate "mise-config" cfg.globalConfig; + }; + + "mise/settings.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "mise-settings" cfg.settings; + }; + }; + + programs = { + bash.initExtra = mkIf cfg.enableBashIntegration '' + eval "$(${getExe cfg.package} activate bash)" + ''; + + zsh.initExtra = mkIf cfg.enableZshIntegration '' + eval "$(${getExe cfg.package} activate zsh)" + ''; + + fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + ${getExe cfg.package} activate fish | source + ''; + }; + }; +} diff --git a/modules/programs/mpv.nix b/modules/programs/mpv.nix index eb9c9c4a7833..f2664e71a6ca 100644 --- a/modules/programs/mpv.nix +++ b/modules/programs/mpv.nix @@ -55,8 +55,10 @@ let mpvPackage = if cfg.scripts == [ ] then cfg.package + else if hasAttr "wrapMpv" pkgs then + pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; } else - pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; }; + pkgs.mpv.override { scripts = cfg.scripts; }; in { options = { @@ -176,6 +178,20 @@ in { } ''; }; + + extraInput = mkOption { + description = '' + Additional lines that are appended to {file}`$XDG_CONFIG_HOME/mpv/input.conf`. + See {manpage}`mpv(1)` for the full list of options. + ''; + type = with types; lines; + default = ""; + example = '' + esc quit #! Quit + # script-binding uosc/video #! Video tracks + # additional comments + ''; + }; }; }; @@ -199,8 +215,11 @@ in { ${optionalString (cfg.profiles != { }) (renderProfiles cfg.profiles)} ''; }) - (mkIf (cfg.bindings != { }) { - xdg.configFile."mpv/input.conf".text = renderBindings cfg.bindings; + (mkIf (cfg.bindings != { } || cfg.extraInput != "") { + xdg.configFile."mpv/input.conf".text = mkMerge [ + (mkIf (cfg.bindings != { }) (renderBindings cfg.bindings)) + (mkIf (cfg.extraInput != "") cfg.extraInput) + ]; }) { xdg.configFile = mapAttrs' (name: value: @@ -210,5 +229,5 @@ in { } ]); - meta.maintainers = with maintainers; [ tadeokondrak thiagokokada chuangzhu ]; + meta.maintainers = with maintainers; [ thiagokokada chuangzhu ]; } diff --git a/modules/programs/mu.nix b/modules/programs/mu.nix index 04b0558e39a6..4d051d4daef0 100644 --- a/modules/programs/mu.nix +++ b/modules/programs/mu.nix @@ -54,7 +54,7 @@ in { # In theory, mu is the only thing that creates that directory, and it is # only created during the initial index. if [[ ! -d "${dbLocation}" ]]; then - $DRY_RUN_CMD ${ + run ${ getExe cfg.package } init ${maildirOption} ${myAddresses} $VERBOSE_ARG; fi diff --git a/modules/programs/neomutt-accounts.nix b/modules/programs/neomutt-accounts.nix index 27e3b12290dc..bdeda863e7ac 100644 --- a/modules/programs/neomutt-accounts.nix +++ b/modules/programs/neomutt-accounts.nix @@ -17,6 +17,14 @@ let default = null; description = "Name to display"; }; + + type = mkOption { + type = types.nullOr (types.enum [ "maildir" "imap" ]); + example = "imap"; + default = null; + description = + "Whether this mailbox is a maildir folder or an IMAP mailbox"; + }; }; }; @@ -68,6 +76,12 @@ in { ''; }; + showDefaultMailbox = mkOption { + type = types.bool; + default = true; + description = "Show the default mailbox (INBOX)"; + }; + mailboxName = mkOption { type = types.nullOr types.str; default = null; @@ -75,6 +89,14 @@ in { description = "Use a different name as mailbox name"; }; + mailboxType = mkOption { + type = types.enum [ "maildir" "imap" ]; + default = "maildir"; + example = "imap"; + description = + "Whether this account uses maildir folders or IMAP mailboxes"; + }; + extraMailboxes = mkOption { type = with types; listOf (either str (submodule extraMailboxOptions)); default = [ ]; diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index 968036f27efc..588b801e4b21 100644 --- a/modules/programs/neomutt.nix +++ b/modules/programs/neomutt.nix @@ -8,6 +8,59 @@ let neomuttAccounts = filter (a: a.neomutt.enable) (attrValues config.accounts.email.accounts); + accountCommandNeeded = any (a: + a.neomutt.enable && (a.neomutt.mailboxType == "imap" + || (any (m: !isString m && m.type == "imap") a.neomutt.extraMailboxes))) + (attrValues config.accounts.email.accounts); + + accountCommand = let + imapAccounts = filter (a: + a.neomutt.enable && a.imap.host != null && a.userName != null + && a.passwordCommand != null) (attrValues config.accounts.email.accounts); + accountCase = account: + let passwordCmd = toString account.passwordCommand; + in '' + ${account.userName}@${account.imap.host}) + found=1 + username="${account.userName}" + password="$(${passwordCmd})" + ;;''; + in pkgs.writeShellScriptBin "account-command.sh" '' + # Automatically set login variables based on the current account. + # This requires NeoMutt >= 2022-05-16 + + while [ ! -z "$1" ]; do + case "$1" in + --hostname) + shift + hostname="$1" + ;; + --username) + shift + username="$1@" + ;; + --type) + shift + type="$1" + ;; + *) + exit 1 + ;; + esac + shift + done + + found= + case "''${username}''${hostname}" in + ${concatMapStringsSep "\n" accountCase imapAccounts} + esac + + if [ -n "$found" ]; then + echo "username: $username" + echo "password: $password" + fi + ''; + sidebarModule = types.submodule { options = { enable = mkEnableOption "sidebar support"; @@ -101,6 +154,21 @@ let accountFilename = account: config.xdg.configHome + "/neomutt/" + account.name; + accountRootIMAP = account: + let + userName = + lib.optionalString (account.userName != null) "${account.userName}@"; + port = lib.optionalString (account.imap.port != null) + ":${toString account.imap.port}"; + protocol = if account.imap.tls.enable then "imaps" else "imap"; + in "${protocol}://${userName}${account.imap.host}${port}"; + + accountRoot = account: + if account.neomutt.mailboxType == "imap" then + accountRootIMAP account + else + account.maildir.absPath; + genCommonFolderHooks = account: with account; { from = "'${address}'"; @@ -128,12 +196,12 @@ let smtp_pass = ''"`${passCmd}`"''; }; - genMaildirAccountConfig = account: + genAccountConfig = account: with account; let folderHook = mapAttrsToList setOption (genCommonFolderHooks account // optionalAttrs cfg.changeFolderWhenSourcingAccount { - folder = "'${account.maildir.absPath}'"; + folder = "'${accountRoot account}'"; }); in '' ${concatStringsSep "\n" folderHook} @@ -145,29 +213,41 @@ let "mailboxes" else ''named-mailboxes "${account.neomutt.mailboxName}"''; + mailroot = accountRoot account; + hookName = if account.neomutt.mailboxType == "imap" then + "account-hook" + else + "folder-hook"; extraMailboxes = concatMapStringsSep "\n" (extra: - if isString extra then - ''mailboxes "${account.maildir.absPath}/${extra}"'' + let + mailboxroot = if !isString extra && extra.type == "imap" then + accountRootIMAP account + else if !isString extra && extra.type == "maildir" then + account.maildir.absPath + else + mailroot; + in if isString extra then + ''mailboxes "${mailboxroot}/${extra}"'' else if extra.name == null then - ''mailboxes "${account.maildir.absPath}/${extra.mailbox}"'' + ''mailboxes "${mailboxroot}/${extra.mailbox}"'' else - '' - named-mailboxes "${extra.name}" "${account.maildir.absPath}/${extra.mailbox}"'') + ''named-mailboxes "${extra.name}" "${mailboxroot}/${extra.mailbox}"'') account.neomutt.extraMailboxes; in with account; '' # register account ${name} - ${mailboxes} "${maildir.absPath}/${folders.inbox}" + ${optionalString account.neomutt.showDefaultMailbox + ''${mailboxes} "${mailroot}/${folders.inbox}"''} ${extraMailboxes} - folder-hook ${maildir.absPath}/ " \ + ${hookName} ${mailroot}/ " \ source ${accountFilename account} " ''; mraSection = account: with account; - if account.maildir != null then - genMaildirAccountConfig account + if account.imap.host != null || account.maildir != null then + genAccountConfig account else - throw "Only maildir is supported at the moment"; + throw "Only maildir and IMAP is supported at the moment"; optionsStr = attrs: concatStringsSep "\n" (mapAttrsToList setOption attrs); @@ -217,14 +297,18 @@ let pkgs.writeText "signature.txt" account.signature.text }"; in '' - # Generated by Home Manager. + # Generated by Home Manager.${ + optionalString cfg.unmailboxes '' + + unmailboxes * + '' + } set ssl_force_tls = ${ - lib.hm.booleans.yesNo (smtp.tls.enable || smtp.tls.useStartTls) + lib.hm.booleans.yesNo (imap.tls.enable || imap.tls.useStartTls) } set certificate_file=${toString config.accounts.email.certificatesFile} # GPG section - set crypt_use_gpgme = yes set crypt_autosign = ${lib.hm.booleans.yesNo (gpg.signByDefault or false)} set crypt_opportunistic_encrypt = ${ lib.hm.booleans.yesNo (gpg.encryptByDefault or false) @@ -319,6 +403,22 @@ in { default = true; }; + sourcePrimaryAccount = + mkEnableOption "source the primary account by default" // { + default = true; + }; + + unmailboxes = mkOption { + type = types.bool; + default = false; + description = '' + Set `unmailboxes *` at the start of account configurations. + It removes previous sidebar mailboxes when sourcing an account configuration. + + See for more information. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -351,25 +451,31 @@ in { set message_cachedir = "${config.xdg.cacheHome}/neomutt/messages/" set editor = "${cfg.editor}" set implicit_autoview = yes + set crypt_use_gpgme = yes alternative_order text/enriched text/plain text set delete = yes + ${optionalString cfg.vimKeys + "source ${pkgs.neomutt}/share/doc/neomutt/vim-keys/vim-keys.rc"} + # Binds ${bindSection} # Macros ${macroSection} - ${optionalString cfg.vimKeys - "source ${pkgs.neomutt}/share/doc/neomutt/vim-keys/vim-keys.rc"} - # Register accounts - ${concatMapStringsSep "\n" registerAccount neomuttAccounts} + ${ + optionalString (accountCommandNeeded) '' + set account_command = '${accountCommand}/bin/account-command.sh' + '' + }${concatMapStringsSep "\n" registerAccount neomuttAccounts} - # Source primary account - source ${accountFilename primary} + ${optionalString cfg.sourcePrimaryAccount '' + # Source primary account + source ${accountFilename primary}''} # Extra configuration ${optionsStr cfg.settings} diff --git a/modules/programs/neovide.nix b/modules/programs/neovide.nix new file mode 100644 index 000000000000..3b40fb3ebb60 --- /dev/null +++ b/modules/programs/neovide.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.neovide; + settingsFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ lib.hm.maintainers.NitroSniper ]; + + options.programs.neovide = { + enable = lib.mkEnableOption "Neovide, No Nonsense Neovim Client in Rust"; + + package = lib.mkPackageOption pkgs "neovide" { }; + + settings = lib.mkOption { + type = settingsFormat.type; + example = lib.literalExpression '' + { + fork = false; + frame = "full"; + idle = true; + maximized = false; + neovim-bin = "/usr/bin/nvim"; + no-multigrid = false; + srgb = false; + tabs = true; + theme = "auto"; + title-hidden = true; + vsync = true; + wsl = false; + + font = { + normal = []; + size = 14.0; + }; + } + ''; + description = '' + Neovide configuration. + For available settings see . + For any option not found will need to be done in your neovim's config instead. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + xdg.configFile."neovide/config.toml".source = + settingsFormat.generate "config.toml" cfg.settings; + }; +} diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index a3b87ea24e1c..e8be25f9219b 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -198,6 +198,28 @@ in { ''; }; + extraWrapperArgs = mkOption { + type = with types; listOf str; + default = [ ]; + example = literalExpression '' + [ + "--suffix" + "LIBRARY_PATH" + ":" + "''${lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.zlib ]}" + "--suffix" + "PKG_CONFIG_PATH" + ":" + "''${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.stdenv.cc.cc pkgs.zlib ]}" + ] + ''; + description = '' + Extra arguments to be passed to the neovim wrapper. + This option sets environment variables required for building and running binaries + with external package managers like mason.nvim. + ''; + }; + generatedConfigViml = mkOption { type = types.lines; visible = true; @@ -376,6 +398,13 @@ in { customRC = cfg.extraConfig; }; + wrappedNeovim' = pkgs.wrapNeovimUnstable cfg.package (neovimConfig // { + wrapperArgs = + (lib.escapeShellArgs (neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs)) + + " " + extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " " + + extraMakeWrapperLuaArgs; + wrapRc = false; + }); in mkIf cfg.enable { programs.neovim.generatedConfigViml = neovimConfig.neovimRcContent; @@ -392,17 +421,18 @@ in { home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; }; + home.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; }; + xdg.configFile = let hasLuaConfig = hasAttr "lua" config.programs.neovim.generatedConfigs; in mkMerge ( # writes runtime (map (x: x.runtime) pluginsNormalized) ++ [{ "nvim/init.lua" = let - luaRcContent = - lib.optionalString (neovimConfig.neovimRcContent != "") + luaRcContent = lib.optionalString (wrappedNeovim'.initRc != "") "vim.cmd [[source ${ pkgs.writeText "nvim-init-home-manager.vim" - neovimConfig.neovimRcContent + wrappedNeovim'.initRc }]]" + config.programs.neovim.extraLuaConfig + lib.optionalString hasLuaConfig config.programs.neovim.generatedConfigs.lua; @@ -413,16 +443,6 @@ in { }; }]); - programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package - (neovimConfig // { - wrapperArgs = (lib.escapeShellArgs neovimConfig.wrapperArgs) + " " - + extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " " - + extraMakeWrapperLuaArgs; - wrapRc = false; - }); - - programs.bash.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; }; - programs.fish.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; }; - programs.zsh.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; }; + programs.neovim.finalPackage = wrappedNeovim'; }; } diff --git a/modules/programs/nh.nix b/modules/programs/nh.nix new file mode 100644 index 000000000000..a5e8dcfafa0c --- /dev/null +++ b/modules/programs/nh.nix @@ -0,0 +1,94 @@ +{ config, osConfig, lib, pkgs, ... }: + +let + + cfg = config.programs.nh; + +in { + meta.maintainers = with lib.maintainers; [ johnrtitor ]; + + options.programs.nh = { + enable = lib.mkEnableOption "nh, yet another Nix CLI helper"; + + package = lib.mkPackageOption pkgs "nh" { }; + + flake = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = '' + The path that will be used for the {env}`FLAKE` environment variable. + + {env}`FLAKE` is used by nh as the default flake for performing actions, + like {command}`nh os switch`. + ''; + }; + + clean = { + enable = lib.mkEnableOption '' + periodic garbage collection for user profile and nix store with nh clean + user''; + + dates = lib.mkOption { + type = lib.types.singleLineStr; + default = "weekly"; + description = '' + How often cleanup is performed. + + The format is described in {manpage}`systemd.time(7)`. + ''; + }; + + extraArgs = lib.mkOption { + type = lib.types.singleLineStr; + default = ""; + example = "--keep 5 --keep-since 3d"; + description = '' + Options given to nh clean when the service is run automatically. + + See `nh clean all --help` for more information. + ''; + }; + }; + }; + + config = { + warnings = lib.optionals (!(cfg.clean.enable -> !osConfig.nix.gc.automatic)) + [ + "programs.nh.clean.enable and nix.gc.automatic (system-wide in configuration.nix) are both enabled. Please use one or the other to avoid conflict." + ]; + + assertions = [{ + assertion = (cfg.flake != null) -> !(lib.hasSuffix ".nix" cfg.flake); + message = "nh.flake must be a directory, not a nix file"; + }]; + + home = lib.mkIf cfg.enable { + packages = [ cfg.package ]; + sessionVariables = lib.mkIf (cfg.flake != null) { FLAKE = cfg.flake; }; + }; + + systemd.user = lib.mkIf cfg.clean.enable { + services.nh-clean = { + Unit.Description = "Nh clean (user)"; + + Service = { + Type = "oneshot"; + ExecStart = + "exec ${lib.getExe cfg.package} clean user ${cfg.clean.extraArgs}"; + Environment = "PATH=$PATH:${config.nix.package}"; + }; + }; + + timers.nh-clean = { + Unit.Description = "Run nh clean"; + + Timer = { + OnCalendar = cfg.clean.dates; + Persistent = true; + }; + + Install.WantedBy = [ "timers.target" ]; + }; + }; + }; +} diff --git a/modules/programs/nix-your-shell.nix b/modules/programs/nix-your-shell.nix new file mode 100644 index 000000000000..20b5fd19eaa0 --- /dev/null +++ b/modules/programs/nix-your-shell.nix @@ -0,0 +1,56 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.nix-your-shell; + +in { + meta.maintainers = [ maintainers.terlar ]; + + options.programs.nix-your-shell = { + enable = mkEnableOption '' + {command}`nix-your-shell`, a wrapper for `nix develop` or `nix-shell` + to retain the same shell inside the new environment''; + + package = mkPackageOption pkgs "nix-your-shell" { }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; + + enableNushellIntegration = mkEnableOption "Nushell integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs = { + fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + ${cfg.package}/bin/nix-your-shell fish | source + ''; + + nushell = mkIf cfg.enableNushellIntegration { + extraEnv = '' + mkdir ${config.xdg.cacheHome}/nix-your-shell + ${cfg.package}/bin/nix-your-shell nu | save --force ${config.xdg.cacheHome}/nix-your-shell/init.nu + ''; + + extraConfig = '' + source ${config.xdg.cacheHome}/nix-your-shell/init.nu + ''; + }; + + zsh.initExtra = mkIf cfg.enableZshIntegration '' + ${cfg.package}/bin/nix-your-shell zsh | source /dev/stdin + ''; + }; + }; +} diff --git a/modules/programs/nushell.nix b/modules/programs/nushell.nix index 5141997168c5..6586d1e1abed 100644 --- a/modules/programs/nushell.nix +++ b/modules/programs/nushell.nix @@ -6,7 +6,7 @@ let cfg = config.programs.nushell; - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "Library/Application Support/nushell" else "${config.xdg.configHome}/nushell"; @@ -39,7 +39,7 @@ let }; }); in { - meta.maintainers = [ maintainers.Philipp-M ]; + meta.maintainers = [ maintainers.Philipp-M maintainers.joaquintrinanes ]; imports = [ (mkRemovedOptionModule [ "programs" "nushell" "settings" ] '' @@ -145,11 +145,24 @@ in { }; environmentVariables = mkOption { - type = types.attrsOf types.str; + type = types.attrsOf hm.types.nushellValue; default = { }; - example = { FOO = "BAR"; }; + example = literalExpression '' + { + FOO = "BAR"; + LIST_VALUE = [ "foo" "bar" ]; + NU_LIB_DIRS = lib.concatStringsSep ":" [ ./scripts ]; + PROMPT_COMMAND = lib.hm.nushell.mkNushellInline '''{|| "> "}'''; + ENV_CONVERSIONS.PATH = { + from_string = lib.hm.nushell.mkNushellInline "{|s| $s | split row (char esep) }"; + to_string = lib.hm.nushell.mkNushellInline "{|v| $v | str join (char esep) }"; + }; + } + ''; description = '' - An attribute set that maps an environment variable to a shell interpreted string. + Environment variables to be set. + + Inline values can be set with `lib.hm.nushell.mkNushellInline`. ''; }; }; @@ -173,9 +186,11 @@ in { }) (let - envVarsStr = concatStringsSep "\n" - (mapAttrsToList (k: v: "$env.${k} = ${v}") cfg.environmentVariables); - in mkIf (cfg.envFile != null || cfg.extraEnv != "" || envVarsStr != "") { + hasEnvVars = cfg.environmentVariables != { }; + envVarsStr = '' + load-env ${hm.nushell.toNushell { } cfg.environmentVariables} + ''; + in mkIf (cfg.envFile != null || cfg.extraEnv != "" || hasEnvVars) { "${configDir}/env.nu".text = mkMerge [ (mkIf (cfg.envFile != null) cfg.envFile.text) cfg.extraEnv diff --git a/modules/programs/offlineimap.nix b/modules/programs/offlineimap.nix index 1a1845c0ff99..fcafec060d20 100644 --- a/modules/programs/offlineimap.nix +++ b/modules/programs/offlineimap.nix @@ -42,6 +42,7 @@ let starttls = imap.tls.useStartTls; } else { ssl = false; + starttls = false; }; remotePassEval = diff --git a/modules/programs/papis.nix b/modules/programs/papis.nix index b110172d9ae8..837bfc274422 100644 --- a/modules/programs/papis.nix +++ b/modules/programs/papis.nix @@ -19,6 +19,8 @@ in { options.programs.papis = { enable = mkEnableOption "papis"; + package = mkPackageOption pkgs "papis" { }; + settings = mkOption { type = with types; attrsOf (oneOf [ bool int str ]); default = { }; @@ -84,7 +86,7 @@ in { (", namely " + concatStringsSep "," defaultLibraries); }]; - home.packages = [ pkgs.papis ]; + home.packages = [ cfg.package ]; xdg.configFile."papis/config" = mkIf (cfg.libraries != { }) { text = generators.toINI { } settingsIni; }; diff --git a/modules/programs/pls.nix b/modules/programs/pls.nix index c56c4b01f65b..8abb82618a11 100644 --- a/modules/programs/pls.nix +++ b/modules/programs/pls.nix @@ -9,7 +9,7 @@ let aliases = { ls = "${cfg.package}/bin/pls"; ll = - "${cfg.package}/bin/pls -d perms -d user -d group -d size -d mtime -d git"; + "${cfg.package}/bin/pls -d perm -d user -d group -d size -d mtime -d git"; }; in { @@ -28,7 +28,15 @@ in { programs.bash.shellAliases = mkIf cfg.enableAliases aliases; - programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.fish = mkMerge [ + (mkIf (!config.programs.fish.preferAbbrs) { + shellAliases = mkIf cfg.enableAliases aliases; + }) + + (mkIf config.programs.fish.preferAbbrs { + shellAbbrs = mkIf cfg.enableAliases aliases; + }) + ]; programs.zsh.shellAliases = mkIf cfg.enableAliases aliases; }; diff --git a/modules/programs/poetry.nix b/modules/programs/poetry.nix new file mode 100644 index 000000000000..d297f0c78432 --- /dev/null +++ b/modules/programs/poetry.nix @@ -0,0 +1,55 @@ +{ pkgs, config, lib, ... }: + +let + + inherit (lib) mkEnableOption mkPackageOption mkOption literalExpression; + + tomlFormat = pkgs.formats.toml { }; + + configDir = if pkgs.stdenv.isDarwin then + "Library/Application Support" + else + config.xdg.configHome; + + cfg = config.programs.poetry; + +in { + meta.maintainers = with lib.maintainers; [ mirkolenz ]; + + options.programs.poetry = { + enable = mkEnableOption "poetry"; + + package = mkPackageOption pkgs "poetry" { + example = "pkgs.poetry.withPlugins (ps: with ps; [ poetry-plugin-up ])"; + extraDescription = "May be used to install custom poetry plugins."; + }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + virtualenvs.create = true; + virtualenvs.in-project = true; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/pypoetry/config.toml` on Linux or + {file}`$HOME/Library/Application Support/pypoetry/config.toml` on Darwin. + See + + for more information. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.file."${configDir}/pypoetry/config.toml" = + lib.mkIf (cfg.settings != { }) { + source = tomlFormat.generate "poetry-config" cfg.settings; + }; + }; +} diff --git a/modules/programs/pqiv.nix b/modules/programs/pqiv.nix index 046ed9aa96cb..a99b28de8710 100644 --- a/modules/programs/pqiv.nix +++ b/modules/programs/pqiv.nix @@ -3,12 +3,10 @@ with lib; let - cfg = config.programs.pqiv; iniFormat = pkgs.formats.ini { }; - in { - meta.maintainers = with lib.maintainers; [ donovanglover ]; + meta.maintainers = with lib.maintainers; [ donovanglover iynaix ]; options.programs.pqiv = { enable = mkEnableOption "pqiv image viewer"; @@ -24,16 +22,14 @@ in { 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. + Configuration written to {file}`$XDG_CONFIG_HOME/pqivrc`. See + {manpage}`pqiv(1)` for a list of available options. ''; example = literalExpression '' { options = { - lazy-load = 1; - hide-info-box = 1; + lazy-load = true; + hide-info-box = true; background-pattern = "black"; thumbnail-size = "256x256"; command-1 = "thunar"; @@ -41,6 +37,25 @@ in { }; ''; }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra lines to be added to {file}`$XDG_CONFIG_HOME/pqivrc`. See + {manpage}`pqiv(1)` for a list of available options. + ''; + example = literalExpression '' + [actions] + set_cursor_auto_hide(1) + + [keybindings] + t { montage_mode_enter() } + @MONTAGE { + t { montage_mode_return_cancel() } + } + ''; + }; }; config = mkIf cfg.enable { @@ -49,8 +64,20 @@ in { home.packages = [ cfg.package ]; - xdg.configFile."pqivrc" = mkIf (cfg.settings != { }) { - source = iniFormat.generate "pqivrc" cfg.settings; - }; + xdg.configFile."pqivrc" = + mkIf (cfg.settings != { } && cfg.extraConfig != "") { + text = lib.concatLines [ + (generators.toINI { + mkKeyValue = key: value: + let + value' = if isBool value then + (if value then "1" else "0") + else + toString value; + in "${key} = ${value'}"; + } cfg.settings) + cfg.extraConfig + ]; + }; }; } diff --git a/modules/programs/qutebrowser.nix b/modules/programs/qutebrowser.nix index b6cc41ead8af..04e5423d4f49 100644 --- a/modules/programs/qutebrowser.nix +++ b/modules/programs/qutebrowser.nix @@ -9,7 +9,7 @@ let formatLine = o: n: v: let formatValue = v: - if builtins.isNull v then + if v == null then "None" else if builtins.isBool v then (if v then "True" else "False") @@ -29,7 +29,10 @@ let formatKeyBindings = m: b: let formatKeyBinding = m: k: c: - ''config.bind("${k}", "${escape [ ''"'' ] c}", mode="${m}")''; + if c == null then + ''config.unbind("${k}", mode="${m}")'' + else + ''config.bind("${k}", "${escape [ ''"'' ] c}", mode="${m}")''; in concatStringsSep "\n" (mapAttrsToList (formatKeyBinding m) b); formatQuickmarks = n: s: "${n} ${s}"; @@ -81,7 +84,7 @@ in { { w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1"; aw = "https://wiki.archlinux.org/?search={}"; - nw = "https://nixos.wiki/index.php?search={}"; + nw = "https://wiki.nixos.org/index.php?search={}"; g = "https://www.google.com/search?hl=en&q={}"; } ''; @@ -131,7 +134,7 @@ in { }; keyBindings = mkOption { - type = with types; attrsOf (attrsOf (separatedString " ;; ")); + type = with types; attrsOf (attrsOf (nullOr (separatedString " ;; "))); default = { }; description = '' Key bindings mapping keys to commands in different modes. This setting diff --git a/modules/programs/ranger.nix b/modules/programs/ranger.nix new file mode 100644 index 000000000000..63d33fad319d --- /dev/null +++ b/modules/programs/ranger.nix @@ -0,0 +1,182 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let cfg = config.programs.ranger; + +in { + options.programs.ranger = { + enable = mkEnableOption "ranger file manager"; + + package = mkOption { + type = types.package; + default = pkgs.ranger; + defaultText = literalExpression "pkgs.ranger"; + description = "The ranger package to use."; + }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = [ ]; + description = "Extra packages added to ranger."; + }; + + finalPackage = mkOption { + type = types.package; + readOnly = true; + visible = false; + description = "Resulting ranger package."; + }; + + settings = mkOption { + type = types.attrsOf + (types.oneOf [ types.bool types.float types.int types.str ]); + default = { }; + description = '' + Settings written to {file}`$XDG_CONFIG_HOME/ranger/rc.conf`. + ''; + example = { + column_ratios = "1,3,3"; + confirm_on_delete = "never"; + unicode_ellipsis = true; + scroll_offset = 8; + }; + }; + + aliases = mkOption { + type = types.attrsOf types.str; + default = { }; + description = '' + Aliases written to {file}`$XDG_CONFIG_HOME/ranger/rc.conf`. + ''; + example = { + e = "edit"; + setl = "setlocal"; + filter = "scout -prts"; + }; + }; + + mappings = mkOption { + type = types.attrsOf types.str; + default = { }; + description = '' + Mappings written to {file}`$XDG_CONFIG_HOME/ranger/rc.conf`. + ''; + example = { + Q = "quitall"; + q = "quit"; + }; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra configuration lines to add to + {file}`$XDG_CONFIG_HOME/ranger/rc.conf`. + ''; + }; + + plugins = mkOption { + type = types.listOf (types.submodule { + options = { + name = mkOption { + type = types.str; + description = '' + Name of the plugin linked to + {file}`$XDG_CONFIG_HOME/ranger/plugins/`. In the case of a + single-file plugin, it must also have `.py` suffix. + ''; + }; + src = mkOption { + type = types.path; + description = '' + The plugin file or directory. + ''; + }; + }; + }); + default = [ ]; + description = '' + List of files to be added to {file}`$XDG_CONFIG_HOME/ranger/plugins/`. + ''; + example = literalExpression '' + [ + { + name = "zoxide"; + src = builtins.fetchGit { + url = "https://github.com/jchook/ranger-zoxide.git"; + rev = "363df97af34c96ea873c5b13b035413f56b12ead"; + }; + } + ] + ''; + }; + + rifle = mkOption { + type = types.listOf (types.submodule { + options = { + condition = mkOption { + type = types.str; + description = '' + A condition to match a file. + ''; + example = "mime ^text, label editor"; + }; + command = mkOption { + type = types.str; + description = '' + A command to run for the matching file. + ''; + example = literalExpression ''"${pkgs.vim}/bin/vim -- \"$@\""''; + }; + }; + }); + default = [ ]; + description = '' + Settings written to {file}`$XDG_CONFIG_HOME/ranger/rifle.conf`. + ''; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + { + programs.ranger.finalPackage = cfg.package.overrideAttrs (oldAttrs: { + propagatedBuildInputs = oldAttrs.propagatedBuildInputs + ++ cfg.extraPackages; + }); + + home.packages = [ cfg.finalPackage ]; + + xdg.configFile."ranger/rc.conf".text = let + mkString = generators.mkValueStringDefault { }; + mkConfig = cmd: + generators.toKeyValue { + mkKeyValue = k: v: "${cmd} ${k} ${mkString v}"; + }; + in '' + ${mkConfig "set" cfg.settings} + ${mkConfig "alias" cfg.aliases} + ${mkConfig "map" cfg.mappings} + ${cfg.extraConfig} + ''; + } + + (mkIf (cfg.plugins != [ ]) { + xdg.configFile = let + toAttrs = i: { + name = "ranger/plugins/${i.name}"; + value.source = i.src; + }; + in listToAttrs (map toAttrs cfg.plugins); + }) + + (mkIf (cfg.rifle != [ ]) { + xdg.configFile."ranger/rifle.conf".text = + let lines = map (i: "${i.condition} = ${i.command}") cfg.rifle; + in concatLines lines; + }) + ]); + + meta.maintainers = [ hm.maintainers.fpob ]; +} diff --git a/modules/programs/rbw.nix b/modules/programs/rbw.nix index b6369dbc455f..b7381c67208d 100644 --- a/modules/programs/rbw.nix +++ b/modules/programs/rbw.nix @@ -19,7 +19,7 @@ let base_url = mkOption { type = with types; nullOr str; default = null; - example = "bitwarden.example.com"; + example = "https://bitwarden.example.com/"; description = "The base-url for a self-hosted bitwarden installation."; }; @@ -27,7 +27,7 @@ let identity_url = mkOption { type = with types; nullOr str; default = null; - example = "identity.example.com"; + example = "https://identity.example.com/"; description = "The identity url for your bitwarden installation."; }; @@ -41,9 +41,9 @@ let }; pinentry = mkOption { - type = with types; either package (enum pkgs.pinentry.flavors); - example = "gnome3"; - default = "gtk2"; + type = types.nullOr types.package; + example = literalExpression "pkgs.pinentry-gnome3"; + default = null; description = '' Which pinentry interface to use. Beware that `pinentry-gnome3` may not work on non-Gnome @@ -52,15 +52,9 @@ let ```nix services.dbus.packages = [ pkgs.gcr ]; ``` - For this reason, the default is `gtk2` for - now. ''; # we want the program in the config - apply = val: - if builtins.isString val then - "${pkgs.pinentry.${val}}/bin/pinentry" - else - "${val}/${val.binaryPath or "bin/pinentry"}"; + apply = val: if val == null then val else lib.getExe val; }; }; }; @@ -87,7 +81,7 @@ in { { email = "name@example.com"; lock_timeout = 300; - pinentry = "gnome3"; + pinentry = pkgs.pinentry-gnome3; } ''; description = '' diff --git a/modules/programs/readline.nix b/modules/programs/readline.nix index b8739e37ad34..56e8ea985429 100644 --- a/modules/programs/readline.nix +++ b/modules/programs/readline.nix @@ -68,8 +68,8 @@ in { }; }; - config = mkIf cfg.enable { - home.file.".inputrc".text = let + config = mkIf cfg.enable (let + finalConfig = let configStr = concatStringsSep "\n" (optional cfg.includeSystemConfig "$include /etc/inputrc" ++ mapAttrsToList mkSetVariableStr cfg.variables @@ -80,5 +80,13 @@ in { ${configStr} ${cfg.extraConfig} ''; - }; + in mkMerge [ + (mkIf (!config.home.preferXdgDirectories) { + home.file.".inputrc".text = finalConfig; + }) + (mkIf config.home.preferXdgDirectories { + xdg.configFile.inputrc.text = finalConfig; + home.sessionVariables.INPUTRC = "${config.xdg.configHome}/inputrc"; + }) + ]); } diff --git a/modules/programs/rio.nix b/modules/programs/rio.nix index 6d66c99d6d37..5a5ce6fa3e97 100644 --- a/modules/programs/rio.nix +++ b/modules/programs/rio.nix @@ -3,12 +3,10 @@ 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 '' + description = '' 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. ''; @@ -20,9 +18,8 @@ in { 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. + Configuration written to {file}`$XDG_CONFIG_HOME/rio/config.toml`. See + for options. ''; }; }; @@ -34,19 +31,11 @@ in { } # Only manage configuration if not empty - (lib.mkIf (cfg.settings != { } && !isDarwin) { + (lib.mkIf (cfg.settings != { }) { 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/modules/programs/rtx.nix b/modules/programs/rtx.nix deleted file mode 100644 index 5fa9b5631b90..000000000000 --- a/modules/programs/rtx.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.programs.rtx; - tomlFormat = pkgs.formats.toml { }; -in { - meta.maintainers = [ hm.maintainers.pedorich-n ]; - - options = { - programs.rtx = { - enable = mkEnableOption "RTX. Runtime Executor (asdf Rust clone)"; - - package = mkPackageOption pkgs "rtx" { }; - - enableBashIntegration = mkEnableOption "Bash Integration" // { - default = true; - }; - - enableZshIntegration = mkEnableOption "Zsh Integration" // { - default = true; - }; - - enableFishIntegration = mkEnableOption "Fish Integration" // { - default = true; - }; - - settings = mkOption { - type = tomlFormat.type; - default = { }; - example = literalExpression '' - tools = { - node = "lts"; - python = ["3.10" "3.11"]; - }; - - settings = { - verbose = false; - experimental = false; - }; - ''; - description = '' - Settings written to {file}`$XDG_CONFIG_HOME/rtx/config.toml`. - - See - for details on supported values. - - ::: {.warning} - Modifying the `tools` section doesn't make RTX install them. - You have to manually run `rtx install` to install the tools. - ::: - ''; - }; - }; - }; - - config = mkIf cfg.enable { - home.packages = [ cfg.package ]; - - xdg.configFile."rtx/config.toml" = mkIf (cfg.settings != { }) { - source = tomlFormat.generate "rtx-settings" cfg.settings; - }; - - programs = { - bash.initExtra = mkIf cfg.enableBashIntegration '' - eval "$(${getExe cfg.package} activate bash)" - ''; - - zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${getExe cfg.package} activate zsh)" - ''; - - fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - ${getExe cfg.package} activate fish | source - ''; - }; - }; -} diff --git a/modules/programs/script-directory.nix b/modules/programs/script-directory.nix index 9f5abf65a414..bd6b3b40138e 100644 --- a/modules/programs/script-directory.nix +++ b/modules/programs/script-directory.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: let cfg = config.programs.script-directory; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.programs.script-directory = { enable = lib.mkEnableOption "script-directory"; diff --git a/modules/programs/senpai.nix b/modules/programs/senpai.nix index 24256e764915..1aaac393e82b 100644 --- a/modules/programs/senpai.nix +++ b/modules/programs/senpai.nix @@ -2,9 +2,7 @@ with lib; -let - cfg = config.programs.senpai; - cfgFmt = pkgs.formats.yaml { }; +let cfg = config.programs.senpai; in { options.programs.senpai = { enable = mkEnableOption "senpai"; @@ -16,23 +14,30 @@ in { }; config = mkOption { type = types.submodule { - freeformType = cfgFmt.type; + freeformType = types.attrsOf types.anything; options = { - addr = mkOption { + address = mkOption { type = types.str; description = '' - The address (host[:port]) of the IRC server. senpai uses TLS - connections by default unless you specify no-tls option. TLS - connections default to port 6697, plain-text use port 6667. + The address (`host[:port]`) of the IRC server. senpai uses TLS + connections by default unless you specify tls option to be false. + TLS connections default to port 6697, plain-text use port 6667. + + UR`ircs://`, `irc://`, and `irc+insecure://` URLs are supported, + in which case only the hostname and port parts will be used. If + the scheme is `ircs/irc+insecure`, tls will be overriden and set + to true/false accordingly. ''; }; - nick = mkOption { + + nickname = mkOption { type = types.str; description = '' Your nickname, sent with a NICK IRC message. It mustn't contain spaces or colons (:). ''; }; + password = mkOption { type = types.nullOr types.str; default = null; @@ -41,17 +46,28 @@ in { reside world-readable in the Nix store. ''; }; - no-tls = mkOption { - type = types.bool; - default = false; - description = "Disables TLS encryption."; + + password-cmd = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ "gopass" "show" "irc/guest" ]; + description = '' + Alternatively to providing your SASL authentication password + directly in plaintext, you can specify a command to be run to + fetch the password at runtime. This is useful if you store your + passwords in a separate (probably encrypted) file using `gpg` or a + command line password manager such as `pass` or `gopass`. If a + password-cmd is provided, the value of password will be ignored + and the first line of the output of `password-cmd` will be used + for login. + ''; }; }; }; example = literalExpression '' { - addr = "libera.chat:6697"; - nick = "nicholas"; + address = "libera.chat:6697"; + nickname = "nicholas"; password = "verysecurepassword"; } ''; @@ -63,9 +79,27 @@ in { }; config = mkIf cfg.enable { + assertions = with cfg.config; [ + { + assertion = !isNull password-cmd -> isNull password; + message = "senpai: password-cmd overrides password!"; + } + { + assertion = !cfg.config ? addr; + message = "senpai: addr is deprecated, use address instead"; + } + { + assertion = !cfg.config ? nick; + message = "senpai: nick is deprecated, use nickname instead"; + } + { + assertion = !cfg.config ? no-tls; + message = "senpai: no-tls is deprecated, use tls instead"; + } + ]; home.packages = [ cfg.package ]; - xdg.configFile."senpai/senpai.yaml".source = - cfgFmt.generate "senpai.yaml" cfg.config; + xdg.configFile."senpai/senpai.scfg".text = + lib.hm.generators.toSCFG { } cfg.config; }; meta.maintainers = [ hm.maintainers.malvo ]; diff --git a/modules/programs/sm64ex.nix b/modules/programs/sm64ex.nix index 35d608baba9a..23b75808fc3e 100644 --- a/modules/programs/sm64ex.nix +++ b/modules/programs/sm64ex.nix @@ -29,7 +29,7 @@ let in "${key} ${generatedValue}"; in { - meta.maintainers = [ maintainers.ivar ]; + meta.maintainers = [ ]; options.programs.sm64ex = { enable = mkEnableOption "sm64ex"; diff --git a/modules/programs/spotify-player.nix b/modules/programs/spotify-player.nix new file mode 100644 index 000000000000..35d3933bc6c7 --- /dev/null +++ b/modules/programs/spotify-player.nix @@ -0,0 +1,184 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkEnableOption mkPackageOption mkOption literalExpression mkIf; + inherit (lib.types) listOf; + + cfg = config.programs.spotify-player; + tomlFormat = pkgs.formats.toml { }; + tomlType = tomlFormat.type; +in { + meta.maintainers = with lib.hm.maintainers; [ diniamo ]; + + options.programs.spotify-player = { + enable = mkEnableOption "spotify-player"; + + package = mkPackageOption pkgs "spotify-player" { }; + + settings = mkOption { + type = tomlType; + default = { }; + example = literalExpression '' + { + theme = "default"; + playback_window_position = "Top"; + copy_command = { + command = "wl-copy"; + args = []; + }; + device = { + audio_cache = false; + normalization = false; + }; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/spotify-player/app.toml`. + + See + + for the full list of options. + ''; + }; + + themes = mkOption { + type = listOf tomlType; + default = [ ]; + example = literalExpression '' + [ + { + name = "default2"; + palette = { + black = "black"; + red = "red"; + green = "green"; + yellow = "yellow"; + blue = "blue"; + magenta = "magenta"; + cyan = "cyan"; + white = "white"; + bright_black = "bright_black"; + bright_red = "bright_red"; + bright_green = "bright_green"; + bright_yellow = "bright_yellow"; + bright_blue = "bright_blue"; + bright_magenta = "bright_magenta"; + bright_cyan = "bright_cyan"; + bright_white = "bright_white"; + }; + component_style = { + block_title = { fg = "Magenta"; }; + border = {}; + playback_track = { fg = "Cyan"; modifiers = ["Bold"]; }; + playback_artists = { fg = "Cyan"; modifiers = ["Bold"]; }; + playback_album = { fg = "Yellow"; }; + playback_metadata = { fg = "BrightBlack"; }; + playback_progress_bar = { bg = "BrightBlack"; fg = "Green"; }; + current_playing = { fg = "Green"; modifiers = ["Bold"]; }; + page_desc = { fg = "Cyan"; modifiers = ["Bold"]; }; + table_header = { fg = "Blue"; }; + selection = { modifiers = ["Bold" "Reversed"]; }; + }; + } + ] + ''; + description = '' + Configuration written to the `themes` field of + {file}`$XDG_CONFIG_HOME/spotify-player/theme.toml`. + + See + + for the full list of options. + ''; + }; + + keymaps = mkOption { + type = listOf tomlType; + default = [ ]; + example = literalExpression '' + [ + { + command = "NextTrack"; + key_sequence = "g n"; + } + { + command = "PreviousTrack"; + key_sequence = "g p"; + } + { + command = "Search"; + key_sequence = "C-c C-x /"; + } + { + command = "ResumePause"; + key_sequence = "M-enter"; + } + { + command = "None"; + key_sequence = "q"; + } + ] + ''; + description = '' + Configuration written to the `keymaps` field of + {file}`$XDG_CONFIG_HOME/spotify-player/keymap.toml`. + + See + + for the full list of options. + ''; + }; + + actions = mkOption { + type = listOf tomlType; + default = [ ]; + example = literalExpression '' + [ + { + action = "GoToArtist"; + key_sequence = "g A"; + } + { + action = "GoToAlbum"; + key_sequence = "g B"; + target = "PlayingTrack"; + } + { + action = "ToggleLiked"; + key_sequence = "C-l"; + } + ] + ''; + description = '' + Configuration written to the `actions` field of + {file}`$XDG_CONFIG_HOME/spotify-player/keymap.toml`. + + See + + for the full list of options. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile = { + "spotify-player/app.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "spotify-player-app" cfg.settings; + }; + + "spotify-player/theme.toml" = mkIf (cfg.themes != [ ]) { + source = + tomlFormat.generate "spotify-player-theme" { inherit (cfg) themes; }; + }; + + "spotify-player/keymap.toml" = mkIf (cfg.keymaps != [ ]) { + source = tomlFormat.generate "spotify-player-keymap" { + inherit (cfg) keymaps actions; + }; + }; + }; + }; +} diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index f253fa7f07cf..654c43fca61d 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -10,6 +10,8 @@ let starshipCmd = "${config.home.profileDirectory}/bin/starship"; + initFish = + if cfg.enableInteractive then "interactiveShellInit" else "shellInitLast"; in { meta.maintainers = [ ]; @@ -24,14 +26,7 @@ in { }; settings = mkOption { - type = with types; - let - prim = either bool (either int str); - primOrPrimAttrs = either prim (attrsOf prim); - entry = either prim (listOf primOrPrimAttrs); - entryOrAttrsOf = t: either entry (attrsOf t); - entries = entryOrAttrsOf (entryOrAttrsOf entry); - in attrsOf entries // { description = "Starship configuration"; }; + type = tomlFormat.type; default = { }; example = literalExpression '' { @@ -78,6 +73,17 @@ in { default = true; }; + enableInteractive = mkOption { + type = types.bool; + default = true; + description = '' + Only enable starship when the shell is interactive. This option is only + valid for the Fish shell. + + Some plugins require this to be set to `false` to function correctly. + ''; + }; + enableTransience = mkOption { type = types.bool; default = false; @@ -111,9 +117,9 @@ in { fi ''; - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + programs.fish.${initFish} = mkIf cfg.enableFishIntegration '' if test "$TERM" != "dumb" - eval (${starshipCmd} init fish) + ${starshipCmd} init fish | source ${lib.optionalString cfg.enableTransience "enable_transience"} end ''; diff --git a/modules/programs/taskwarrior.nix b/modules/programs/taskwarrior.nix index 5c4f0bf8aef4..9b5af43ee345 100644 --- a/modules/programs/taskwarrior.nix +++ b/modules/programs/taskwarrior.nix @@ -85,7 +85,8 @@ in { ''; }; - package = mkPackageOption pkgs "taskwarrior" { }; + package = + mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; }; }; }; @@ -105,18 +106,18 @@ in { ''; home.activation.regenDotTaskRc = hm.dag.entryAfter [ "writeBoundary" ] '' - $VERBOSE_ECHO "Ensuring generated taskwarrior config included in taskrc" + verboseEcho "Ensuring generated taskwarrior config included in taskrc" if [[ ! -s "${userConf}" ]]; then # Ensure file's existence if [[ -v DRY_RUN ]]; then - $DRY_RUN_CMD echo "include ${homeConf}" ">" "${userConf}" + run echo "include ${homeConf}" ">" "${userConf}" else echo "include ${homeConf}" > "${userConf}" fi elif ! grep -qF "include ${homeConf}" ${escapeShellArg userConf}; then # Add include statement for Home Manager generated config. - $DRY_RUN_CMD sed -i '1i include ${homeConf}' ${escapeShellArg userConf} + run sed -i '1i include ${homeConf}' ${escapeShellArg userConf} fi ''; }; diff --git a/modules/programs/tealdeer.nix b/modules/programs/tealdeer.nix index f0e610c2d4fa..d9318d102247 100644 --- a/modules/programs/tealdeer.nix +++ b/modules/programs/tealdeer.nix @@ -4,23 +4,64 @@ with lib; let cfg = config.programs.tealdeer; - tomlFormat = pkgs.formats.toml { }; - configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else config.xdg.configHome; + tomlFormat = pkgs.formats.toml { }; + + settingsFormat = let + updatesSection = types.submodule { + options = { + auto_update = mkEnableOption "auto-update"; + + auto_update_interval_hours = mkOption { + type = types.ints.positive; + default = 720; + example = literalExpression "24"; + description = '' + Duration, since the last cache update, after which the cache will be refreshed. + This parameter is ignored if {var}`auto_update` is set to `false`. + ''; + }; + }; + }; + in types.submodule { + freeformType = tomlFormat.type; + options = { + updates = mkOption { + type = updatesSection; + default = { }; + description = '' + Tealdeer can refresh the cache automatically when it is outdated. + This behavior can be configured in the updates section. + ''; + }; + }; + }; + in { - meta.maintainers = [ ]; + meta.maintainers = [ hm.maintainers.pedorich-n ]; + + imports = [ + (mkRemovedOptionModule [ "programs" "tealdeer" "updateOnActivation" ] '' + Updating tealdeer's cache requires network access. + The activation script should be fast and idempotent, so the option was removed. + Please use + + `programs.tealdeer.settings.updates.auto_update = true` + + instead, to make sure tealdeer's cache is updated periodically. + '') + ]; options.programs.tealdeer = { enable = mkEnableOption "Tealdeer"; settings = mkOption { - type = tomlFormat.type; - default = { }; - defaultText = literalExpression "{ }"; + type = types.nullOr settingsFormat; + default = null; example = literalExpression '' { display = { @@ -35,10 +76,8 @@ in { description = '' Configuration written to {file}`$XDG_CONFIG_HOME/tealdeer/config.toml` on Linux or - {file}`$HOME/Library/Application Support/tealdeer/config.toml` - on Darwin. See - - for more information. + {file}`$HOME/Library/Application Support/tealdeer/config.toml` on Darwin. + See for more information. ''; }; }; @@ -46,8 +85,9 @@ in { config = mkIf cfg.enable { home.packages = [ pkgs.tealdeer ]; - home.file."${configDir}/tealdeer/config.toml" = mkIf (cfg.settings != { }) { - source = tomlFormat.generate "tealdeer-config" cfg.settings; - }; + home.file."${configDir}/tealdeer/config.toml" = + mkIf (cfg.settings != null && cfg.settings != { }) { + source = tomlFormat.generate "tealdeer-config" cfg.settings; + }; }; } diff --git a/modules/programs/thefuck.nix b/modules/programs/thefuck.nix index 2cad4c3386ed..ab56ea0167c3 100644 --- a/modules/programs/thefuck.nix +++ b/modules/programs/thefuck.nix @@ -32,6 +32,14 @@ with lib; Whether to enable Zsh integration. ''; }; + + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; }; config = let @@ -66,5 +74,11 @@ with lib; }; programs.zsh.initExtra = mkIf cfg.enableZshIntegration shEvalCmd; + + programs.nushell = mkIf cfg.enableNushellIntegration { + extraConfig = '' + alias fuck = ${cfg.package}/bin/thefuck $"(history | last 1 | get command | get 0)" + ''; + }; }; } diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index c15a946ec663..b3713f6553ea 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -7,6 +7,11 @@ let cfg = config.programs.thunderbird; + thunderbirdJson = types.attrsOf (pkgs.formats.json { }).type // { + description = + "Thunderbird preference (int, bool, string, and also attrs, list, float as a JSON string)"; + }; + enabledAccounts = attrValues (filterAttrs (_: a: a.thunderbird.enable) config.accounts.email.accounts); @@ -161,11 +166,21 @@ in { }; settings = mkOption { - type = with types; attrsOf (oneOf [ bool int str ]); + type = thunderbirdJson; default = { }; example = literalExpression '' { "mail.spellcheck.inline" = false; + "mailnews.database.global.views.global.columns" = { + selectCol = { + visible = false; + ordinal = 1; + }; + threadCol = { + visible = true; + ordinal = 2; + }; + }; } ''; description = '' @@ -210,13 +225,28 @@ in { Extra preferences to add to {file}`user.js`. ''; }; + + search = mkOption { + type = types.submodule (args: + import ./firefox/profiles/search.nix { + inherit (args) config; + inherit lib pkgs; + appName = "Thunderbird"; + package = cfg.package; + modulePath = + [ "programs" "thunderbird" "profiles" name "search" ]; + profilePath = name; + }); + default = { }; + description = "Declarative search engine configuration."; + }; }; })); description = "Attribute set of Thunderbird profiles."; }; settings = mkOption { - type = with types; attrsOf (oneOf [ bool int str ]); + type = thunderbirdJson; default = { }; example = literalExpression '' { @@ -378,6 +408,13 @@ in { ] ++ (map (a: toThunderbirdAccount a profile) accounts))) profile.extraConfig; }; + + "${thunderbirdProfilesPath}/${name}/search.json.mozlz4" = + mkIf (profile.search.enable) { + enable = profile.search.enable; + force = profile.search.force; + source = profile.search.file; + }; })); }; } diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index b68fd8d5e8e4..85052c9fd1d9 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -95,6 +95,7 @@ let ''} set -g mouse ${boolToStr cfg.mouse} + set -g focus-events ${boolToStr cfg.focusEvents} setw -g aggressive-resize ${boolToStr cfg.aggressiveResize} setw -g clock-mode-style ${if cfg.clock24 then "24" else "12"} set -s escape-time ${toString cfg.escapeTime} @@ -191,6 +192,15 @@ in { ''; }; + focusEvents = mkOption { + default = false; + type = types.bool; + description = '' + On supported terminals, request focus events and pass them through to + applications running in tmux. + ''; + }; + historyLimit = mkOption { default = 2000; example = 5000; @@ -239,7 +249,7 @@ in { sensibleOnTop = mkOption { type = types.bool; - default = true; + default = false; description = '' Run the sensible plugin at the top of the configuration. It is possible to override the sensible settings using the diff --git a/modules/programs/tofi.nix b/modules/programs/tofi.nix new file mode 100644 index 000000000000..acc1a994d385 --- /dev/null +++ b/modules/programs/tofi.nix @@ -0,0 +1,63 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.tofi; + +in { + meta.maintainers = [ hm.maintainers.henrisota ]; + + options.programs.tofi = { + enable = mkEnableOption "Tofi, a tiny dynamic menu for Wayland"; + + package = mkPackageOption pkgs "tofi" { }; + + settings = mkOption { + type = with types; + let primitive = either (either str int) bool; + in attrsOf primitive; + default = { }; + example = literalExpression '' + { + background-color = "#000000"; + border-width = 0; + font = "monospace"; + height = "100%"; + num-results = 5; + outline-width = 0; + padding-left = "35%"; + padding-top = "35%"; + result-spacing = 25; + width = "100%"; + } + ''; + description = '' + Settings to be written to the Tofi configuration file. + + See + for the full list of options. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.tofi" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."tofi/config" = mkIf (cfg.settings != { }) { + text = let + renderedSettings = generators.toINIWithGlobalSection { } { + globalSection = cfg.settings; + }; + in removeSuffix "\n\n" '' + # Generated by Home Manager. + + ${renderedSettings} + ''; + }; + }; +} diff --git a/modules/programs/topgrade.nix b/modules/programs/topgrade.nix index a49f897baa8e..0630ccabda0c 100644 --- a/modules/programs/topgrade.nix +++ b/modules/programs/topgrade.nix @@ -28,13 +28,15 @@ in { defaultText = literalExpression "{ }"; example = literalExpression '' { - assume_yes = true; - disable = [ - "flutter" - "node" - ]; - set_title = false; - cleanup = true; + misc = { + assume_yes = true; + disable = [ + "flutter" + "node" + ]; + set_title = false; + cleanup = true; + }; commands = { "Run garbage collection on Nix store" = "nix-collect-garbage"; }; diff --git a/modules/programs/vdirsyncer-accounts.nix b/modules/programs/vdirsyncer-accounts.nix index 35badb927f9e..7ab9521c1ab7 100644 --- a/modules/programs/vdirsyncer-accounts.nix +++ b/modules/programs/vdirsyncer-accounts.nix @@ -10,6 +10,20 @@ in { options.vdirsyncer = { enable = mkEnableOption "synchronization using vdirsyncer"; + urlCommand = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ "~/get-url.sh" ]; + description = "A command that prints the URL of the storage."; + }; + + userNameCommand = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ "~/get-username.sh" ]; + description = "A command that prints the user name to standard output."; + }; + collections = mkOption { type = types.nullOr (types.listOf collection); default = null; @@ -93,9 +107,10 @@ in { }; verify = mkOption { - type = types.nullOr types.bool; + type = types.nullOr types.path; default = null; - description = "Verify SSL certificate."; + description = "Null or path to certificate to verify SSL against"; + example = "/path/to/cert.pem"; }; verifyFingerprint = mkOption { @@ -137,8 +152,8 @@ in { }; postHook = mkOption { - type = types.lines; - default = ""; + type = types.nullOr types.lines; + default = null; description = '' Command to call for each item creation and modification. The command will be called with the path of the new/updated diff --git a/modules/programs/vdirsyncer.nix b/modules/programs/vdirsyncer.nix index ec1b387968b9..2e013af06119 100644 --- a/modules/programs/vdirsyncer.nix +++ b/modules/programs/vdirsyncer.nix @@ -26,32 +26,33 @@ let filterAttrs (_: v: v != null) ((getAttrs [ "type" "fileExt" "encoding" ] a.local) // { path = a.local.path; - postHook = pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook - + "/bin/post-hook"; + postHook = if a.vdirsyncer.postHook != null then + (pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook + + "/bin/post-hook") + else + null; }); remoteStorage = a: - filterAttrs (_: v: v != null) ((getAttrs [ - "type" - "url" - "userName" - #"userNameCommand" - "passwordCommand" - ] a.remote) // (if a.vdirsyncer == null then - { } - else - getAttrs [ - "itemTypes" - "verify" - "verifyFingerprint" - "auth" - "authCert" - "userAgent" - "tokenFile" - "clientIdCommand" - "clientSecretCommand" - "timeRange" - ] a.vdirsyncer)); + filterAttrs (_: v: v != null) + ((getAttrs [ "type" "url" "userName" "passwordCommand" ] a.remote) + // (if a.vdirsyncer == null then + { } + else + getAttrs [ + "urlCommand" + "userNameCommand" + "itemTypes" + "verify" + "verifyFingerprint" + "auth" + "authCert" + "userAgent" + "tokenFile" + "clientIdCommand" + "clientSecretCommand" + "timeRange" + ] a.vdirsyncer)); pair = a: with a.vdirsyncer; @@ -76,6 +77,8 @@ let ''post_hook = "${v}"'' else if (n == "url") then ''url = "${v}"'' + else if (n == "urlCommand") then + "url.fetch = ${listString (map wrap ([ "command" ] ++ v))}" else if (n == "timeRange") then '' start_date = "${v.start}" end_date = "${v.end}"'' else if (n == "itemTypes") then @@ -91,7 +94,7 @@ let else if (n == "passwordPrompt") then ''password.fetch = ["prompt", "${v}"]'' else if (n == "verify") then - "verify = ${if v then "true" else "false"}" + ''verify = "${v}"'' else if (n == "verifyFingerprint") then ''verify_fingerprint = "${v}"'' else if (n == "auth") then @@ -195,6 +198,9 @@ in { config = mkIf cfg.enable { assertions = let + mutuallyExclusiveOptions = + [ [ "url" "urlCommand" ] [ "userName" "userNameCommand" ] ]; + requiredOptions = t: if (t == "caldav" || t == "carddav" || t == "http") then [ "url" ] @@ -212,6 +218,7 @@ in { allowedOptions = let remoteOptions = [ + "urlCommand" "userName" "userNameCommand" "password" @@ -263,7 +270,16 @@ in { Storage ${n} is of type ${v.type}, but required option ${a} is not set. ''; - }]) required)) (removeAttrs v [ "type" "_module" ]); + }]) required) ++ map (attrs: + let + defined = attrNames (filterAttrs (n: v: v != null) + (genAttrs attrs (a: v.${a} or null))); + in { + assertion = length defined <= 1; + message = "Storage ${n} has mutually exclusive options: ${ + concatStringsSep ", " defined + }"; + }) mutuallyExclusiveOptions) (removeAttrs v [ "type" "_module" ]); storageAssertions = flatten (mapAttrsToList assertStorage localStorages) ++ flatten (mapAttrsToList assertStorage remoteStorages); diff --git a/modules/programs/vifm.nix b/modules/programs/vifm.nix new file mode 100644 index 000000000000..2bf31d52d32a --- /dev/null +++ b/modules/programs/vifm.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib) mkIf mkOption types; + + cfg = config.programs.vifm; + +in { + meta.maintainers = [ lib.hm.maintainers.aabccd021 ]; + + options.programs.vifm = { + enable = lib.mkEnableOption "vifm, a Vim-like file manager"; + + package = lib.mkPackageOption pkgs "vifm" { }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + example = "mark h ~/"; + description = '' + Extra lines added to the {file}`$XDG_CONFIG_HOME/vifm/vifmrc` file. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."vifm/vifmrc" = + mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; }; + }; +} diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix index 5ea6be8b497d..f77937d66cc5 100644 --- a/modules/programs/vscode.nix +++ b/modules/programs/vscode.nix @@ -15,12 +15,14 @@ let "vscode" = "Code"; "vscode-insiders" = "Code - Insiders"; "vscodium" = "VSCodium"; + "openvscode-server" = "OpenVSCode Server"; }.${vscodePname}; extensionDir = { "vscode" = "vscode"; "vscode-insiders" = "vscode-insiders"; "vscodium" = "vscode-oss"; + "openvscode-server" = "openvscode-server"; }.${vscodePname}; userDir = if pkgs.stdenv.hostPlatform.isDarwin then @@ -257,9 +259,9 @@ in { "${extensionPath}/.extensions-immutable.json" = { text = extensionJson; onChange = '' - $DRY_RUN_CMD rm $VERBOSE_ARG -f ${extensionPath}/{extensions.json,.init-default-profile-extensions} - $VERBOSE_ECHO "Regenerating VSCode extensions.json" - $DRY_RUN_CMD ${getExe cfg.package} --list-extensions > /dev/null + run rm $VERBOSE_ARG -f ${extensionPath}/{extensions.json,.init-default-profile-extensions} + verboseEcho "Regenerating VSCode extensions.json" + run ${getExe cfg.package} --list-extensions > /dev/null ''; }; }) diff --git a/modules/programs/watson.nix b/modules/programs/watson.nix index b30dec09603c..c842c519a997 100644 --- a/modules/programs/watson.nix +++ b/modules/programs/watson.nix @@ -14,7 +14,7 @@ let config.xdg.configHome; in { - meta.maintainers = [ maintainers.polykernel ]; + meta.maintainers = [ ]; options.programs.watson = { enable = mkEnableOption "watson, a wonderful CLI to track your time"; diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 9925effc926a..72d247323fb8 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -69,8 +69,8 @@ let }; modules-left = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed on the left."; example = literalExpression '' [ "sway/workspaces" "sway/mode" "wlr/taskbar" ] @@ -78,8 +78,8 @@ let }; modules-center = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed in the center."; example = literalExpression '' [ "sway/window" ] @@ -87,8 +87,8 @@ let }; modules-right = mkOption { - type = listOf str; - default = [ ]; + type = nullOr (listOf str); + default = null; description = "Modules that will be displayed on the right."; example = literalExpression '' [ "mpd" "custom/mymodule#with-css-id" "temperature" ] diff --git a/modules/programs/wezterm.nix b/modules/programs/wezterm.nix index b02099a6c63c..bd3be4686ebc 100644 --- a/modules/programs/wezterm.nix +++ b/modules/programs/wezterm.nix @@ -100,7 +100,7 @@ in { -- Generated by Home Manager. -- See https://wezfurlong.org/wezterm/ - local wezterm = require 'wezterm'; + local wezterm = require 'wezterm' ${cfg.extraConfig} ''; diff --git a/modules/programs/yambar.nix b/modules/programs/yambar.nix new file mode 100644 index 000000000000..f4e0a434ae34 --- /dev/null +++ b/modules/programs/yambar.nix @@ -0,0 +1,55 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.yambar; + yamlFormat = pkgs.formats.yaml { }; + +in { + meta.maintainers = [ lib.maintainers.carpinchomug ]; + + options.programs.yambar = { + enable = lib.mkEnableOption "Yambar"; + + package = lib.mkPackageOption pkgs "yambar" { }; + + settings = lib.mkOption { + type = yamlFormat.type; + default = { }; + example = lib.literalExpression '' + bar = { + location = "top"; + height = 26; + background = "00000066"; + + right = [ + { + clock.content = [ + { + string.text = "{time}"; + } + ]; + } + ]; + }; + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/yambar/config.yml`. + See {manpage}`yambar(5)` for options. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "programs.yambar" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."yambar/config.yml" = lib.mkIf (cfg.settings != { }) { + source = yamlFormat.generate "config.yml" cfg.settings; + }; + }; +} diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index d0d941d139f7..9c47345f5000 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -7,78 +7,86 @@ let tomlFormat = pkgs.formats.toml { }; bashIntegration = '' - function ya() { - tmp="$(mktemp -t "yazi-cwd.XXXXX")" + function ${cfg.shellWrapperName}() { + local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } ''; fishIntegration = '' - function ya + function ${cfg.shellWrapperName} set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end ''; nushellIntegration = '' - def --env ya [args?] { + def --env ${cfg.shellWrapperName} [...args] { let tmp = (mktemp -t "yazi-cwd.XXXXX") - if ($args == null) { - yazi --cwd-file $tmp - } else { - yazi $args --cwd-file $tmp - } + yazi ...$args --cwd-file $tmp let cwd = (open $tmp) if $cwd != "" and $cwd != $env.PWD { cd $cwd } - rm -f $tmp + rm -fp $tmp } ''; in { - meta.maintainers = [ maintainers.xyenon ]; + meta.maintainers = with maintainers; [ xyenon eljamm ]; options.programs.yazi = { enable = mkEnableOption "yazi"; - package = mkOption { - type = types.package; - default = pkgs.yazi; - defaultText = literalExpression "pkgs.yazi"; - description = "Yazi package to install."; + package = mkPackageOption pkgs "yazi" { }; + + shellWrapperName = mkOption { + type = types.str; + default = "yy"; + example = "y"; + description = '' + Name of the shell wrapper to be called. + ''; }; - enableBashIntegration = mkEnableOption "Bash integration"; + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; - enableZshIntegration = mkEnableOption "Zsh integration"; + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; - enableFishIntegration = mkEnableOption "Fish integration"; + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; - enableNushellIntegration = mkEnableOption "Nushell integration"; + enableNushellIntegration = mkEnableOption "Nushell integration" // { + default = true; + }; keymap = mkOption { type = tomlFormat.type; default = { }; example = literalExpression '' { - input.keymap = [ - { exec = "close"; on = [ "" ]; } - { exec = "close --submit"; on = [ "" ]; } - { exec = "escape"; on = [ "" ]; } - { exec = "backspace"; on = [ "" ]; } + input.prepend_keymap = [ + { run = "close"; on = [ "" ]; } + { run = "close --submit"; on = [ "" ]; } + { run = "escape"; on = [ "" ]; } + { run = "backspace"; on = [ "" ]; } ]; - manager.keymap = [ - { exec = "escape"; on = [ "" ]; } - { exec = "quit"; on = [ "q" ]; } - { exec = "close"; on = [ "" ]; } + manager.prepend_keymap = [ + { run = "escape"; on = [ "" ]; } + { run = "quit"; on = [ "q" ]; } + { run = "close"; on = [ "" ]; } ]; } ''; @@ -139,6 +147,52 @@ in { for the full list of options ''; }; + + initLua = mkOption { + type = with types; nullOr (either path lines); + default = null; + description = '' + The init.lua for Yazi itself. + ''; + example = literalExpression "./init.lua"; + }; + + plugins = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Lua plugins. + Values should be a package or path containing an `init.lua` file. + Will be linked to {file}`$XDG_CONFIG_HOME/yazi/plugins/.yazi`. + + See + for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; + + flavors = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Pre-made themes. + Values should be a package or path containing the required files. + Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`. + + See for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; }; config = mkIf cfg.enable { @@ -164,6 +218,69 @@ in { "yazi/theme.toml" = mkIf (cfg.theme != { }) { source = tomlFormat.generate "yazi-theme" cfg.theme; }; - }; + "yazi/init.lua" = mkIf (cfg.initLua != null) + (if builtins.isPath cfg.initLua then { + source = cfg.initLua; + } else { + text = cfg.initLua; + }); + } // (mapAttrs' (name: value: + nameValuePair "yazi/flavors/${name}.yazi" { source = value; }) + cfg.flavors) // (mapAttrs' (name: value: + nameValuePair "yazi/plugins/${name}.yazi" { source = value; }) + cfg.plugins); + + warnings = filter (s: s != "") (concatLists [ + (mapAttrsToList (name: value: + optionalString (hasSuffix ".yazi" name) '' + Flavors like `programs.yazi.flavors."${name}"` should no longer have the suffix ".yazi" in their attribute name. + The flavor will be linked to `$XDG_CONFIG_HOME/yazi/flavors/${name}.yazi`. + You probably want to rename it to `programs.yazi.flavors."${ + removeSuffix ".yazi" name + }"`. + '') cfg.flavors) + (mapAttrsToList (name: value: + optionalString (hasSuffix ".yazi" name) '' + Plugins like `programs.yazi.plugins."${name}"` should no longer have the suffix ".yazi" in their attribute name. + The plugin will be linked to `$XDG_CONFIG_HOME/yazi/plugins/${name}.yazi`. + You probably want to rename it to `programs.yazi.plugins."${ + removeSuffix ".yazi" name + }"`. + '') cfg.plugins) + ]); + + assertions = let + mkAsserts = opt: requiredFiles: + mapAttrsToList (name: value: + let + isDir = pathIsDirectory "${value}"; + msgNotDir = optionalString (!isDir) + "The path or package should be a directory, not a single file."; + isFileMissing = file: + !(pathExists "${value}/${file}") + || pathIsDirectory "${value}/${file}"; + missingFiles = filter isFileMissing requiredFiles; + msgFilesMissing = optionalString (missingFiles != [ ]) + "The ${singularOpt} is missing these files: ${ + toString missingFiles + }"; + singularOpt = removeSuffix "s" opt; + in { + assertion = isDir && missingFiles == [ ]; + message = '' + Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}. + ${msgNotDir} + ${msgFilesMissing} + Evaluated value: `${value}` + ''; + }) cfg.${opt}; + in (mkAsserts "flavors" [ + "flavor.toml" + "tmtheme.xml" + "README.md" + "preview.png" + "LICENSE" + "LICENSE-tmtheme" + ]) ++ (mkAsserts "plugins" [ "init.lua" ]); }; } diff --git a/modules/programs/z-lua.nix b/modules/programs/z-lua.nix index 37a8479eea08..74dee31dcac9 100644 --- a/modules/programs/z-lua.nix +++ b/modules/programs/z-lua.nix @@ -77,16 +77,26 @@ in { })" ''; - programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - source (${pkgs.z-lua}/bin/z --init fish ${ - concatStringsSep " " cfg.options - } | psub) - ''; - programs.bash.shellAliases = mkIf cfg.enableAliases aliases; programs.zsh.shellAliases = mkIf cfg.enableAliases aliases; - programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.fish = mkMerge [ + { + shellInit = mkIf cfg.enableFishIntegration '' + source (${pkgs.z-lua}/bin/z --init fish ${ + concatStringsSep " " cfg.options + } | psub) + ''; + } + + (mkIf (!config.programs.fish.preferAbbrs) { + shellAliases = mkIf cfg.enableAliases aliases; + }) + + (mkIf config.programs.fish.preferAbbrs { + shellAbbrs = mkIf cfg.enableAliases aliases; + }) + ]; }; } diff --git a/modules/programs/zathura.nix b/modules/programs/zathura.nix index ba34af59075d..3e41256d3910 100644 --- a/modules/programs/zathura.nix +++ b/modules/programs/zathura.nix @@ -31,7 +31,7 @@ in { options = mkOption { default = { }; - type = with types; attrsOf (either str (either bool int)); + type = with types; attrsOf (oneOf [ str bool int float ]); description = '' Add {option}`:set` command options to zathura and make them permanent. See diff --git a/modules/programs/zed-editor.nix b/modules/programs/zed-editor.nix new file mode 100644 index 000000000000..a9baebf90bd8 --- /dev/null +++ b/modules/programs/zed-editor.nix @@ -0,0 +1,111 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.zed-editor; + jsonFormat = pkgs.formats.json { }; + + mergedSettings = cfg.userSettings // { + # this part by @cmacrae + auto_install_extensions = lib.genAttrs cfg.extensions (_: true); + }; +in { + meta.maintainers = [ hm.maintainers.libewa ]; + + options = { + # TODO: add vscode option parity (installing extensions, configuring + # keybinds with nix etc.) + programs.zed-editor = { + enable = mkEnableOption + "Zed, the high performance, multiplayer code editor from the creators of Atom and Tree-sitter"; + + package = mkPackageOption pkgs "zed-editor" { }; + + extraPackages = mkOption { + type = with types; listOf package; + default = [ ]; + example = literalExpression "[ pkgs.nixd ]"; + description = "Extra packages available to Zed."; + }; + + userSettings = mkOption { + type = jsonFormat.type; + default = { }; + example = literalExpression '' + { + features = { + copilot = false; + }; + telemetry = { + metrics = false; + }; + vim_mode = false; + ui_font_size = 16; + buffer_font_size = 16; + } + ''; + description = '' + Configuration written to Zed's {file}`settings.json`. + ''; + }; + + userKeymaps = mkOption { + type = jsonFormat.type; + default = { }; + example = literalExpression '' + [ + { + context = "Workspace"; + bindings = { + ctrl-shift-t = "workspace::NewTerminal"; + }; + }; + ] + ''; + description = '' + Configuration written to Zed's {file}`keymap.json`. + ''; + }; + + extensions = mkOption { + type = types.listOf types.str; + default = [ ]; + example = literalExpression '' + [ "swift" "nix" "xy-zed" ] + ''; + description = '' + A list of the extensions Zed should install on startup. + Use the name of a repository in the [extension list](https://github.com/zed-industries/extensions/tree/main/extensions). + ''; + }; + }; + }; + + config = mkIf cfg.enable { + 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/zeditor \ + --suffix PATH : ${lib.makeBinPath cfg.extraPackages} + ''; + }) + ] + else + [ cfg.package ]; + + xdg.configFile."zed/settings.json" = (mkIf (mergedSettings != { }) { + source = jsonFormat.generate "zed-user-settings" mergedSettings; + }); + + xdg.configFile."zed/keymap.json" = (mkIf (cfg.userKeymaps != { }) { + source = jsonFormat.generate "zed-user-keymaps" cfg.userKeymaps; + }); + }; +} diff --git a/modules/programs/zellij.nix b/modules/programs/zellij.nix index 44a3d69f4c3d..0906a028dd64 100644 --- a/modules/programs/zellij.nix +++ b/modules/programs/zellij.nix @@ -6,6 +6,7 @@ let cfg = config.programs.zellij; yamlFormat = pkgs.formats.yaml { }; + zellijCmd = getExe cfg.package; in { meta.maintainers = [ hm.maintainers.mainrs ]; @@ -69,16 +70,16 @@ in { }; programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 200 '' - eval "$(zellij setup --generate-auto-start bash)" + eval "$(${zellijCmd} setup --generate-auto-start bash)" ''); programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 '' - eval "$(zellij setup --generate-auto-start zsh)" + eval "$(${zellijCmd} setup --generate-auto-start zsh)" ''); programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration (mkOrder 200 '' - eval (zellij setup --generate-auto-start fish | string collect) + eval (${zellijCmd} setup --generate-auto-start fish | string collect) ''); }; } diff --git a/modules/programs/zk.nix b/modules/programs/zk.nix new file mode 100644 index 000000000000..d4abfe2797fd --- /dev/null +++ b/modules/programs/zk.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.zk; + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ lib.hm.maintainers.silmarp ]; + + options.programs.zk = { + enable = lib.mkEnableOption "zk"; + + package = lib.mkPackageOption pkgs "zk" { }; + + settings = lib.mkOption { + type = tomlFormat.type; + default = { }; + example = lib.literalExpression '' + { + note = { + language = "en"; + default-title = "Untitled"; + filename = "{{id}}-{{slug title}}"; + extension = "md"; + template = "default.md"; + id-charset = "alphanum"; + id-length = 4; + id-case = "lower"; + }; + extra = { + author = "Mickaël"; + }; + } + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/zk/config.toml`. + + See for + available options and documentation. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."zk/config.toml" = lib.mkIf (cfg.settings != { }) { + source = tomlFormat.generate "config.toml" cfg.settings; + }; + }; +} diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index fe82ffc25eec..f5e258af9aa3 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -26,9 +26,9 @@ in { options = mkOption { type = types.listOf types.str; default = [ ]; - example = [ "--no-aliases" ]; + example = [ "--no-cmd" ]; description = '' - List of options to pass to zoxide. + List of options to pass to zoxide init. ''; }; @@ -68,9 +68,9 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.initExtra = mkIf cfg.enableBashIntegration '' + programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 150 '' eval "$(${cfg.package}/bin/zoxide init bash ${cfgOptions})" - ''; + ''); programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' eval "$(${cfg.package}/bin/zoxide init zsh ${cfgOptions})" @@ -87,7 +87,6 @@ in { mkdir $zoxide_cache } ${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 = '' diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index c375b57cff3b..50f8055c06f0 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -15,14 +15,14 @@ let localVarsStr = config.lib.zsh.defineAll cfg.localVariables; aliasesStr = concatStringsSep "\n" ( - mapAttrsToList (k: v: "alias ${k}=${lib.escapeShellArg v}") cfg.shellAliases + mapAttrsToList (k: v: "alias -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") cfg.shellAliases ); dirHashesStr = concatStringsSep "\n" ( mapAttrsToList (k: v: ''hash -d ${k}="${v}"'') cfg.dirHashes ); - zdotdir = "$HOME/" + cfg.dotDir; + zdotdir = "$HOME/" + lib.escapeShellArg cfg.dotDir; bindkeyCommands = { emacs = "bindkey -e"; @@ -34,6 +34,21 @@ let historyModule = types.submodule ({ config, ... }: { options = { + append = mkOption { + type = types.bool; + default = false; + description = '' + If set, zsh sessions will append their history list to the history + file, rather than replace it. Thus, multiple parallel zsh sessions + will all have the new entries from their history lists added to the + history file, in the order that they exit. + + This file will still be periodically re-written to trim it when the + number of lines grows 20% beyond the value specified by + `programs.zsh.history.save`. + ''; + }; + size = mkOption { type = types.int; default = 10000; @@ -236,13 +251,23 @@ let ''; }; + patterns = mkOption { + type = types.attrsOf types.str; + default = {}; + example = { "rm -rf *" = "fg=white,bold,bg=red"; }; + description = '' + Custom syntax highlighting for user-defined patterns. + Reference: + ''; + }; + styles = mkOption { type = types.attrsOf types.str; default = {}; example = { comment = "fg=black,bold"; }; description = '' Custom styles for syntax highlighting. - See each highlighter's options: + See each highlighter style option: ''; }; }; @@ -252,6 +277,7 @@ in { imports = [ + (mkRenamedOptionModule [ "programs" "zsh" "enableAutosuggestions" ] [ "programs" "zsh" "autosuggestion" "enable" ]) (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) (mkRenamedOptionModule [ "programs" "zsh" "zproof" ] [ "programs" "zsh" "zprof" ]) ]; @@ -352,11 +378,6 @@ in type = types.lines; }; - enableAutosuggestions = mkOption { - default = false; - description = "Enable zsh autosuggestions"; - }; - zprof.enable = mkOption { default = false; description = '' @@ -376,6 +397,43 @@ in description = "Options related to zsh-history-substring-search."; }; + autosuggestion = { + enable = mkOption { + type = types.bool; + default = false; + description = "Enable zsh autosuggestions"; + }; + + highlight = mkOption { + type = types.nullOr types.str; + default = null; + example = "fg=#ff00ff,bg=cyan,bold,underline"; + description = '' + Custom styles for autosuggestion highlighting. See + {manpage}`zshzle(1)` for syntax. + ''; + }; + + strategy = mkOption { + type = types.listOf (types.enum [ "history" "completion" "match_prev_cmd" ]); + default = [ "history" ]; + description = '' + `ZSH_AUTOSUGGEST_STRATEGY` is an array that specifies how suggestions should be generated. + The strategies in the array are tried successively until a suggestion is found. + There are currently three built-in strategies to choose from: + + - `history`: Chooses the most recent match from history. + - `completion`: Chooses a suggestion based on what tab-completion would suggest. (requires `zpty` module) + - `match_prev_cmd`: Like `history`, but chooses the most recent match whose preceding history item matches + the most recently executed command. Note that this strategy won't work as expected with ZSH options that + don't preserve the history order such as `HIST_IGNORE_ALL_DUPS` or `HIST_EXPIRE_DUPS_FIRST`. + + Setting the option to an empty list `[]` will make ZSH_AUTOSUGGESTION_STRATEGY not be set automatically, + allowing the variable to be declared in {option}`programs.zsh.localVariables` or {option}`programs.zsh.sessionVariables` + ''; + }; + }; + history = mkOption { type = historyModule; default = {}; @@ -582,13 +640,20 @@ in # as all $fpath entries will be traversed again. ${optionalString (cfg.enableCompletion && !cfg.oh-my-zsh.enable && !cfg.prezto.enable) cfg.completionInit - } + }'' - ${optionalString cfg.enableAutosuggestions - "source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh" - } + (optionalString cfg.autosuggestion.enable '' + source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh + ${optionalString (cfg.autosuggestion.strategy != []) '' + ZSH_AUTOSUGGEST_STRATEGY=(${concatStringsSep " " cfg.autosuggestion.strategy}) + '' + } + '') + (optionalString (cfg.autosuggestion.enable && cfg.autosuggestion.highlight != null) '' + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="${cfg.autosuggestion.highlight}" + '') - ${optionalString cfg.oh-my-zsh.enable '' + (optionalString cfg.oh-my-zsh.enable '' # oh-my-zsh extra settings for plugins ${cfg.oh-my-zsh.extraConfig} # oh-my-zsh configuration generated by NixOS @@ -602,8 +667,9 @@ in "ZSH_THEME=\"${cfg.oh-my-zsh.theme}\"" } source $ZSH/oh-my-zsh.sh - ''} + '') + '' ${optionalString cfg.prezto.enable (builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")} @@ -624,6 +690,7 @@ in mkdir -p "$(dirname "$HISTFILE")" setopt HIST_FCNTL_LOCK + ${if cfg.history.append then "setopt" else "unsetopt"} APPEND_HISTORY ${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS ${if cfg.history.ignoreAllDups then "setopt" else "unsetopt"} HIST_IGNORE_ALL_DUPS ${if cfg.history.ignoreSpace then "setopt" else "unsetopt"} HIST_IGNORE_SPACE @@ -637,8 +704,8 @@ in # Aliases ${aliasesStr} '' - ] - ++ (mapAttrsToList (k: v: "alias -g ${k}=${lib.escapeShellArg v}") cfg.shellGlobalAliases) + ] + ++ (mapAttrsToList (k: v: "alias -g -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") cfg.shellGlobalAliases) ++ [ ('' # Named Directory Hashes ${dirHashesStr} @@ -655,6 +722,11 @@ in (name: value: "ZSH_HIGHLIGHT_STYLES+=(${lib.escapeShellArg name} ${lib.escapeShellArg value})") cfg.syntaxHighlighting.styles )} + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList + (name: value: "ZSH_HIGHLIGHT_PATTERNS+=(${lib.escapeShellArg name} ${lib.escapeShellArg value})") + cfg.syntaxHighlighting.patterns + )} '') (optionalString (cfg.historySubstringSearch.enable or false) diff --git a/modules/programs/zsh/prezto.nix b/modules/programs/zsh/prezto.nix index 1aa3af1e9b44..9a94f23856fa 100644 --- a/modules/programs/zsh/prezto.nix +++ b/modules/programs/zsh/prezto.nix @@ -16,7 +16,8 @@ let caseSensitive = mkOption { type = types.nullOr types.bool; - default = null; + # See . + default = true; example = true; description = "Set case-sensitivity for completion, history lookup, etc."; diff --git a/modules/programs/zsh/zsh-abbr.nix b/modules/programs/zsh/zsh-abbr.nix index 8b6189c52c6d..096e5da5ae5d 100644 --- a/modules/programs/zsh/zsh-abbr.nix +++ b/modules/programs/zsh/zsh-abbr.nix @@ -9,6 +9,8 @@ in { enable = mkEnableOption "zsh-abbr - zsh manager for auto-expanding abbreviations"; + package = mkPackageOption pkgs "zsh-abbr" { }; + abbreviations = mkOption { type = types.attrsOf types.str; default = { }; @@ -27,8 +29,8 @@ in { config = mkIf cfg.enable { programs.zsh.plugins = [{ name = "zsh-abbr"; - src = pkgs.zsh-abbr; - file = "/share/zsh/zsh-abbr/abbr.plugin.zsh"; + src = cfg.package; + file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh"; }]; xdg.configFile = { diff --git a/modules/services/activitywatch.nix b/modules/services/activitywatch.nix new file mode 100644 index 000000000000..ac80725776fd --- /dev/null +++ b/modules/services/activitywatch.nix @@ -0,0 +1,266 @@ +{ config, options, lib, pkgs, ... }: + +let + inherit (lib) mkOption; + + cfg = config.services.activitywatch; + + mkWatcherService = name: cfg: + let jobName = "activitywatch-watcher-${cfg.name}"; + in lib.nameValuePair jobName { + Unit = { + Description = "ActivityWatch watcher '${cfg.name}'"; + After = [ "activitywatch.service" ]; + BindsTo = [ "activitywatch.target" ]; + }; + + Service = { + ExecStart = "${lib.getExe' cfg.package cfg.executable} ${ + lib.escapeShellArgs cfg.extraOptions + }"; + + # Some sandboxing. + LockPersonality = true; + NoNewPrivileges = true; + RestrictNamespaces = true; + }; + + Install.WantedBy = [ "activitywatch.target" ]; + }; + + # Most ActivityWatch client libraries has a function that loads with a + # certain configuration format for all watchers and itself which is nice for + # us but watchers can load configuration in any location. We just hope + # they're following it. + watcherSettingsFormat = pkgs.formats.toml { }; + + # The module interface for the watchers. + watcherType = { name, config, options, ... }: { + options = { + name = mkOption { + type = lib.types.str; + default = name; + example = "aw-watcher-afk"; + description = '' + The name of the watcher. This will be used as the directory name for + {file}`$XDG_CONFIG_HOME/activitywatch/$NAME` when + {option}`services.activitywatch.watchers..settings` is set. + ''; + }; + + package = mkOption { + type = lib.types.package; + example = lib.literalExpression "pkgs.activitywatch"; + description = '' + The derivation containing the watcher executable. + ''; + }; + + executable = mkOption { + type = lib.types.str; + default = config.name; + description = '' + The name of the executable of the watcher. This is useful in case the + watcher name is different from the executable. By default, this + option uses the watcher name. + ''; + }; + + settings = mkOption { + type = watcherSettingsFormat.type; + default = { }; + example = { + timeout = 300; + poll_time = 2; + }; + description = '' + The settings for the individual watcher in TOML format. If set, a + file will be generated at + {file}`$XDG_CONFIG_HOME/activitywatch/$NAME/$FILENAME`. + + To set the basename of the settings file, see + [](#opt-services.activitywatch.watchers._name_.settingsFilename). + ''; + }; + + settingsFilename = mkOption { + type = lib.types.str; + default = "${config.name}.toml"; + example = "config.toml"; + description = '' + The filename of the generated settings file. By default, this uses + the watcher name to be generated at + {file}`$XDG_CONFIG_HOME/activitywatch/$NAME/$NAME.toml`. + + This is useful in case the watcher requires a different name for the + configuration file. + ''; + }; + + extraOptions = mkOption { + type = with lib.types; listOf str; + default = [ ]; + example = [ "--host" "127.0.0.1" ]; + description = '' + Extra arguments to be passed to the watcher executable. + ''; + }; + }; + }; + + generateWatchersConfig = name: cfg: + let + # We're only assuming the generated filepath this since most watchers + # uses the ActivityWatch client library which has `load_config_toml` + # utility function for easily loading the configuration files. + filename = "activitywatch/${cfg.name}/${cfg.settingsFilename}"; + in lib.nameValuePair filename (lib.mkIf (cfg.settings != { }) { + source = watcherSettingsFormat.generate + "activitywatch-watcher-${cfg.name}-settings" cfg.settings; + }); +in { + meta.maintainers = with lib.maintainers; [ foo-dogsquared ]; + + options.services.activitywatch = { + enable = lib.mkEnableOption "ActivityWatch, an automated time tracker"; + + package = mkOption { + description = '' + Package containing [the Rust implementation of ActivityWatch + server](https://github.com/ActivityWatch/aw-server-rust). + ''; + type = lib.types.package; + default = pkgs.activitywatch; + defaultText = lib.literalExpression "pkgs.activitywatch"; + example = lib.literalExpression "pkgs.aw-server-rust"; + }; + + settings = mkOption { + description = '' + Configuration for `aw-server-rust` to be generated at + {file}`$XDG_CONFIG_HOME/activitywatch/aw-server-rust/config.toml`. + ''; + type = watcherSettingsFormat.type; + default = { }; + example = lib.literalExpression '' + { + port = 3012; + + custom_static = { + my-custom-watcher = "''${pkgs.my-custom-watcher}/share/my-custom-watcher/static"; + aw-keywatcher = "''${pkgs.aw-keywatcher}/share/aw-keywatcher/static"; + }; + } + ''; + }; + + extraOptions = mkOption { + description = '' + Additional arguments to be passed on to the ActivityWatch server. + ''; + type = with lib.types; listOf str; + default = [ ]; + example = [ "--port" "5999" ]; + }; + + watchers = mkOption { + description = '' + Watchers to be included with the service alongside with their + configuration. + + If a configuration is set, a file will be generated in + {file}`$XDG_CONFIG_HOME/activitywatch/$WATCHER_NAME/$WATCHER_SETTINGS_FILENAME`. + + ::: {.note} + The watchers are run with the service manager and the settings format + of the configuration is only assumed to be in TOML. Furthermore, it + assumes the watcher program is using the official client libraries + which has functions to store it in the appropriate location. + ::: + ''; + type = with lib.types; attrsOf (submodule watcherType); + default = { }; + example = lib.literalExpression '' + { + aw-watcher-afk = { + package = pkgs.activitywatch; + settings = { + timeout = 300; + poll_time = 2; + }; + }; + + aw-watcher-windows = { + package = pkgs.activitywatch; + settings = { + poll_time = 1; + exclude_title = true; + }; + }; + + my-custom-watcher = { + package = pkgs.my-custom-watcher; + executable = "mcw"; + settings = { + hello = "there"; + enable_greetings = true; + poll_time = 5; + }; + settingsFilename = "config.toml"; + }; + } + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.activitywatch" pkgs + lib.platforms.linux) + ]; + + # We'll group these services with a target to make it easier to manage for + # the maintainers and the user. Win-win. + systemd.user.targets.activitywatch = { + Unit = { + Description = "ActivityWatch server"; + Requires = [ "default.target" ]; + After = [ "default.target" ]; + }; + + Install.WantedBy = [ "default.target" ]; + }; + + systemd.user.services = lib.mapAttrs' mkWatcherService cfg.watchers // { + activitywatch = { + Unit = { + Description = "ActivityWatch time tracker server"; + Documentation = [ "https://docs.activitywatch.net" ]; + BindsTo = [ "activitywatch.target" ]; + }; + + Service = { + ExecStart = "${lib.getExe' cfg.package "aw-server"} ${ + lib.escapeShellArgs cfg.extraOptions + }"; + Restart = "on-failure"; + + # Some sandboxing. + LockPersonality = true; + NoNewPrivileges = true; + RestrictNamespaces = true; + }; + + Install.WantedBy = [ "activitywatch.target" ]; + }; + }; + + xdg.configFile = lib.mapAttrs' generateWatchersConfig cfg.watchers + // lib.optionalAttrs (cfg.settings != { }) { + "activitywatch/aw-server-rust/config.toml" = { + source = watcherSettingsFormat.generate + "activitywatch-server-rust-config.toml" cfg.settings; + }; + }; + }; +} diff --git a/modules/services/amberol.nix b/modules/services/amberol.nix new file mode 100644 index 000000000000..a630124478dc --- /dev/null +++ b/modules/services/amberol.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.services.amberol; + +in { + meta.maintainers = with lib.maintainers; [ surfaceflinger ]; + + options.services.amberol = { + enable = lib.mkEnableOption "" // { + description = '' + Whether to enable Amberol music player as a daemon. + + Note, it is necessary to add + ```nix + programs.dconf.enable = true; + ``` + to your system configuration for the daemon to work correctly. + ''; + }; + + package = lib.mkPackageOption pkgs "amberol" { }; + + enableRecoloring = lib.mkOption { + type = lib.types.bool; + default = true; + description = "UI recoloring using the album art."; + }; + + replaygain = lib.mkOption { + type = lib.types.enum [ "album" "track" "off" ]; + default = "track"; + description = "ReplayGain mode."; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.amberol" pkgs + lib.platforms.linux) + ]; + + # Running amberol will just attach itself to gapplication service. + home.packages = [ cfg.package ]; + + dconf.settings."io/bassi/Amberol" = { + background-play = true; + enable-recoloring = cfg.enableRecoloring; + replay-gain = cfg.replaygain; + }; + + systemd.user.services.amberol = { + Unit = { + Description = "Amberol music player daemon"; + Requires = [ "dbus.service" ]; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service = { + ExecStart = "${lib.getExe cfg.package} --gapplication-service"; + Restart = "on-failure"; + RestartSec = 5; + }; + }; + }; +} diff --git a/modules/services/arrpc.nix b/modules/services/arrpc.nix new file mode 100644 index 000000000000..ec003257bbf9 --- /dev/null +++ b/modules/services/arrpc.nix @@ -0,0 +1,39 @@ +{ config, pkgs, lib, ... }: +let + inherit (lib) mkIf mkOption mkPackageOption mkEnableOption types; + + cfg = config.services.arrpc; +in { + meta.maintainers = [ lib.maintainers.NotAShelf ]; + + options.services.arrpc = { + enable = mkEnableOption "arrpc"; + package = mkPackageOption pkgs "arrpc" { }; + + systemdTarget = mkOption { + type = types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + Systemd target to bind to. + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services.arRPC = { + Unit = { + Description = + "Discord Rich Presence for browsers, and some custom clients"; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = lib.getExe cfg.package; + Restart = "always"; + }; + + Install.WantedBy = [ cfg.systemdTarget ]; + }; + }; +} diff --git a/modules/services/blanket.nix b/modules/services/blanket.nix new file mode 100644 index 000000000000..5eeb2ab1e150 --- /dev/null +++ b/modules/services/blanket.nix @@ -0,0 +1,40 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.services.blanket; + + inherit (lib) mkIf mkEnableOption mkPackageOption hm platforms; +in { + meta.maintainers = [ lib.maintainers.daru-san ]; + + options.services.blanket = { + enable = mkEnableOption "blanket"; + + package = mkPackageOption pkgs "blanket" { }; + }; + + config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.blanket" pkgs platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + systemd.user.services.blanket = { + Unit = { + Description = "Blanket daemon"; + Requires = [ "dbus.service" ]; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" "pipewire.service" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service = { + ExecStart = "${cfg.package}/bin/blanket --gapplication-service"; + Restart = "on-failure"; + RestartSec = 5; + }; + }; + }; +} diff --git a/modules/services/borgmatic.nix b/modules/services/borgmatic.nix index 1e1813946165..ad9ace87bad9 100644 --- a/modules/services/borgmatic.nix +++ b/modules/services/borgmatic.nix @@ -46,7 +46,6 @@ in { # Lower CPU and I/O priority: Nice = 19; - CPUSchedulingPolicy = "batch"; IOSchedulingClass = "best-effort"; IOSchedulingPriority = 7; IOWeight = 100; diff --git a/modules/services/cliphist.nix b/modules/services/cliphist.nix index 6ba733fa5e87..1877a6de0ff2 100644 --- a/modules/services/cliphist.nix +++ b/modules/services/cliphist.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.services.cliphist; in { - meta.maintainers = [ lib.maintainers.janik ]; + meta.maintainers = [ lib.hm.maintainers.janik ]; options.services.cliphist = { enable = @@ -9,6 +9,22 @@ in { package = lib.mkPackageOption pkgs "cliphist" { }; + allowImages = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Store images in clipboard history. + ''; + }; + + extraOptions = lib.mkOption { + type = with lib.types; listOf str; + default = [ "-max-dedupe-search" "10" "-max-items" "500" ]; + description = '' + Flags to append to the cliphist command. + ''; + }; + systemdTarget = lib.mkOption { type = lib.types.str; default = "graphical-session.target"; @@ -23,7 +39,8 @@ in { }; }; - config = lib.mkIf cfg.enable { + config = let extraOptionsStr = lib.escapeShellArgs cfg.extraOptions; + in lib.mkIf cfg.enable { assertions = [ (lib.hm.assertions.assertPlatform "services.cliphist" pkgs lib.platforms.linux) @@ -40,7 +57,23 @@ in { Service = { Type = "simple"; ExecStart = - "${pkgs.wl-clipboard}/bin/wl-paste --watch ${cfg.package}/bin/cliphist store"; + "${pkgs.wl-clipboard}/bin/wl-paste --watch ${cfg.package}/bin/cliphist ${extraOptionsStr} store"; + Restart = "on-failure"; + }; + + Install = { WantedBy = [ cfg.systemdTarget ]; }; + }; + + systemd.user.services.cliphist-images = lib.mkIf cfg.allowImages { + Unit = { + Description = "Clipboard management daemon - images"; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + Type = "simple"; + ExecStart = + "${pkgs.wl-clipboard}/bin/wl-paste --type image --watch ${cfg.package}/bin/cliphist ${extraOptionsStr} store"; Restart = "on-failure"; }; diff --git a/modules/services/conky.nix b/modules/services/conky.nix new file mode 100644 index 000000000000..657c29bf54fe --- /dev/null +++ b/modules/services/conky.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.services.conky; + +in with lib; { + meta.maintainers = [ hm.maintainers.kaleo ]; + + options = { + services.conky = { + enable = mkEnableOption "Conky, a light-weight system monitor"; + + package = mkPackageOption pkgs "conky" { }; + + extraConfig = lib.mkOption { + type = types.lines; + default = ""; + description = '' + Configuration used by the Conky daemon. Check + for + options. If not set, the default configuration, as described by + {command}`conky --print-config`, will be used. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "services.conky" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + systemd.user.services.conky = { + Unit = { + Description = "Conky - Lightweight system monitor"; + After = [ "graphical-session.target" ]; + }; + + Service = { + Restart = "always"; + RestartSec = "3"; + ExecStart = toString ([ "${cfg.package}/bin/conky" ] + ++ optional (cfg.extraConfig != "") + "--config ${pkgs.writeText "conky.conf" cfg.extraConfig}"); + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; +} + diff --git a/modules/services/darkman.nix b/modules/services/darkman.nix index d11f03244edd..b399dad862ba 100644 --- a/modules/services/darkman.nix +++ b/modules/services/darkman.nix @@ -52,6 +52,7 @@ in { settings = mkOption { type = types.submodule { freeformType = yamlFormat.type; }; + default = { }; example = literalExpression '' { lat = 52.3; @@ -96,7 +97,7 @@ in { Documentation = "man:darkman(1)"; PartOf = [ "graphical-session.target" ]; BindsTo = [ "graphical-session.target" ]; - X-Restart-Triggers = + X-Restart-Triggers = mkIf (cfg.settings != { }) [ "${config.xdg.configFile."darkman/config.yaml".source}" ]; }; diff --git a/modules/services/dropbox.nix b/modules/services/dropbox.nix index 941f4d82e978..b4e7359c0963 100644 --- a/modules/services/dropbox.nix +++ b/modules/services/dropbox.nix @@ -55,17 +55,17 @@ in { ExecStop = "${dropboxCmd} stop"; ExecStart = toString (pkgs.writeShellScript "dropbox-start" '' # ensure we have the dirs we need - $DRY_RUN_CMD ${pkgs.coreutils}/bin/mkdir $VERBOSE_ARG -p \ + run ${pkgs.coreutils}/bin/mkdir $VERBOSE_ARG -p \ ${homeBaseDir}/{.dropbox,.dropbox-dist,Dropbox} # symlink them as needed if [[ ! -d ${config.home.homeDirectory}/.dropbox ]]; then - $DRY_RUN_CMD ${pkgs.coreutils}/bin/ln $VERBOSE_ARG -s \ + run ${pkgs.coreutils}/bin/ln $VERBOSE_ARG -s \ ${homeBaseDir}/.dropbox ${config.home.homeDirectory}/.dropbox fi if [[ ! -d ${escapeShellArg cfg.path} ]]; then - $DRY_RUN_CMD ${pkgs.coreutils}/bin/ln $VERBOSE_ARG -s \ + run ${pkgs.coreutils}/bin/ln $VERBOSE_ARG -s \ ${homeBaseDir}/Dropbox ${escapeShellArg cfg.path} fi diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index daa800cf0cd8..6b2727b3fee2 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -25,7 +25,7 @@ let options = { package = mkOption { type = types.package; - example = literalExpression "pkgs.gnome.adwaita-icon-theme"; + example = literalExpression "pkgs.adwaita-icon-theme"; description = "Package providing the theme."; }; @@ -65,9 +65,8 @@ in { }; configFile = mkOption { - type = with types; either str path; - default = "${config.xdg.configHome}/dunst/dunstrc"; - defaultText = "$XDG_CONFIG_HOME/dunst/dunstrc"; + type = with types; nullOr (either str path); + default = null; description = '' Path to the configuration file read by dunst. @@ -170,9 +169,9 @@ in { "stock" ]; - mkPath = { basePath, theme, category }: + mkPath = { basePath, theme, category, }: "${basePath}/share/icons/${theme.name}/${theme.size}/${category}"; - in concatMapStringsSep ":" mkPath (cartesianProductOfSets { + in concatMapStringsSep ":" mkPath (cartesianProduct { basePath = basePaths; theme = themes; category = categories; @@ -188,7 +187,9 @@ in { Service = { Type = "dbus"; BusName = "org.freedesktop.Notifications"; - ExecStart = "${cfg.package}/bin/dunst -config ${cfg.configFile}"; + ExecStart = escapeShellArgs ([ "${cfg.package}/bin/dunst" ] ++ + # Using `-config` breaks dunst's drop-ins, so only use it when an alternative path is set + optionals (cfg.configFile != null) [ "-config" cfg.configFile ]); Environment = optionalString (cfg.waylandDisplay != "") "WAYLAND_DISPLAY=${cfg.waylandDisplay}"; }; diff --git a/modules/services/emacs.nix b/modules/services/emacs.nix index d319abf0107c..e280b3219f16 100644 --- a/modules/services/emacs.nix +++ b/modules/services/emacs.nix @@ -41,7 +41,6 @@ let # to work without wrapping it. socketDir = "%t/emacs"; socketPath = "${socketDir}/server"; - in { meta.maintainers = [ maintainers.tadfisher ]; @@ -112,12 +111,7 @@ in { }; config = mkIf cfg.enable (mkMerge [ - { - assertions = [ - (lib.hm.assertions.assertPlatform "services.emacs" pkgs - lib.platforms.linux) - ]; - + (mkIf pkgs.stdenv.isLinux { systemd.user.services.emacs = { Unit = { Description = "Emacs text editor"; @@ -190,9 +184,9 @@ in { }/bin/emacsclient "''${@:---create-frame}"''); }; }; - } + }) - (mkIf cfg.socketActivation.enable { + (mkIf (cfg.socketActivation.enable && pkgs.stdenv.isLinux) { systemd.user.sockets.emacs = { Unit = { Description = "Emacs text editor"; @@ -222,5 +216,20 @@ in { }; }; }) + + (mkIf pkgs.stdenv.isDarwin { + launchd.agents.emacs = { + enable = true; + config = { + ProgramArguments = [ "${cfg.package}/bin/emacs" "--fg-daemon" ] + ++ cfg.extraOptions; + RunAtLoad = true; + KeepAlive = { + Crashed = true; + SuccessfulExit = false; + }; + }; + }; + }) ]); } diff --git a/modules/services/espanso.nix b/modules/services/espanso.nix index 404dfecd8582..dbfa0587556a 100644 --- a/modules/services/espanso.nix +++ b/modules/services/espanso.nix @@ -1,11 +1,9 @@ { pkgs, config, lib, ... }: let inherit (lib) - mkOption mkEnableOption mkIf maintainers literalExpression types platforms + mkOption mkEnableOption mkIf maintainers literalExpression types mkRemovedOptionModule versionAtLeast; - inherit (lib.hm.assertions) assertPlatform; - cfg = config.services.espanso; espansoVersion = cfg.package.version; @@ -19,6 +17,7 @@ in { maintainers.lucasew maintainers.bobvanderlinden lib.hm.maintainers.liyangau + maintainers.n8henrie ]; options = { services.espanso = { @@ -99,15 +98,12 @@ in { }; config = mkIf cfg.enable { - assertions = [ - (assertPlatform "services.espanso" pkgs platforms.linux) - { - assertion = versionAtLeast espansoVersion "2"; - message = '' - The services.espanso module only supports Espanso version 2 or later. - ''; - } - ]; + assertions = [{ + assertion = versionAtLeast espansoVersion "2"; + message = '' + The services.espanso module only supports Espanso version 2 or later. + ''; + }]; home.packages = [ cfg.package ]; @@ -125,11 +121,25 @@ in { systemd.user.services.espanso = { Unit = { Description = "Espanso: cross platform text expander in Rust"; }; Service = { - Type = "exec"; - ExecStart = "${cfg.package}/bin/espanso daemon"; + ExecStart = "${cfg.package}/bin/espanso launcher"; Restart = "on-failure"; + RestartSec = 3; }; Install = { WantedBy = [ "default.target" ]; }; }; + + launchd.agents.espanso = { + enable = true; + config = { + ProgramArguments = [ "${cfg.package}/bin/espanso" "launcher" ]; + EnvironmentVariables.PATH = + "${cfg.package}/bin:/usr/bin:/bin:/usr/sbin:/sbin"; + KeepAlive = { + Crashed = true; + SuccessfulExit = false; + }; + RunAtLoad = true; + }; + }; }; } diff --git a/modules/services/etesync-dav.nix b/modules/services/etesync-dav.nix index 5fd58d092605..fe83e5391153 100644 --- a/modules/services/etesync-dav.nix +++ b/modules/services/etesync-dav.nix @@ -25,7 +25,7 @@ in { serverUrl = mkOption { type = types.str; - default = "https://api.etesync.com/"; + default = "https://api.etebase.com/partner/etesync/"; description = "The URL to the etesync server."; }; diff --git a/modules/services/flameshot.nix b/modules/services/flameshot.nix index 0c2435aeb732..ebdfd0067e4f 100644 --- a/modules/services/flameshot.nix +++ b/modules/services/flameshot.nix @@ -24,7 +24,7 @@ in { }; settings = mkOption { - type = iniFormat.type; + inherit (iniFormat) type; default = { }; example = { General = { @@ -64,7 +64,7 @@ in { Install = { WantedBy = [ "graphical-session.target" ]; }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; ExecStart = "${cfg.package}/bin/flameshot"; Restart = "on-abort"; diff --git a/modules/services/fnott.nix b/modules/services/fnott.nix index 3d2d1dd8a028..ecbd0fd15974 100644 --- a/modules/services/fnott.nix +++ b/modules/services/fnott.nix @@ -9,7 +9,7 @@ let iniFormat = pkgs.formats.ini { }; in { - meta.maintainers = with maintainers; [ polykernel ]; + meta.maintainers = [ ]; options = { services.fnott = { diff --git a/modules/services/fusuma.nix b/modules/services/fusuma.nix index e0ced97693a4..17d8b14311ca 100644 --- a/modules/services/fusuma.nix +++ b/modules/services/fusuma.nix @@ -96,10 +96,11 @@ in { extraPackages = mkOption { type = types.listOf types.package; - default = with pkgs; [ coreutils ]; - defaultText = literalExpression "pkgs.coreutils"; + default = with pkgs; [ xdotool coreutils xorg.xprop ]; + defaultText = + literalExpression "pkgs.xdotool pkgs.coreutils pkgs.xorg.xprop"; example = literalExpression '' - with pkgs; [ coreutils xdotool ]; + with pkgs; [ xdotool coreutils xorg.xprop ]; ''; description = '' Extra packages needs to bring to the scope of fusuma service. @@ -113,7 +114,7 @@ in { lib.platforms.linux) ]; - xdg.configFile."fusuma/config.yaml".source = configYaml; + xdg.configFile."fusuma/config.yml".source = configYaml; systemd.user.services.fusuma = { Unit = { @@ -124,8 +125,7 @@ in { Service = { Environment = with pkgs; "PATH=${makeBinPath cfg.extraPackages}"; - ExecStart = - "${cfg.package}/bin/fusuma -c ${config.xdg.configHome}/fusuma/config.yaml"; + ExecStart = "${cfg.package}/bin/fusuma"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index a274da8f4886..ba16085b39dd 100644 --- a/modules/services/git-sync.nix +++ b/modules/services/git-sync.nix @@ -13,10 +13,12 @@ let Service = { Environment = [ - "PATH=${lib.makeBinPath (with pkgs; [ openssh git ])}" - "GIT_SYNC_DIRECTORY=${repo.path}" + "PATH=${ + lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages) + }" + "GIT_SYNC_DIRECTORY=${strings.escapeShellArg repo.path}" "GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync" - "GIT_SYNC_REPOSITORY=${repo.uri}" + "GIT_SYNC_REPOSITORY=${strings.escapeShellArg repo.uri}" "GIT_SYNC_INTERVAL=${toString repo.interval}" ]; ExecStart = "${cfg.package}/bin/git-sync-on-inotify"; @@ -76,6 +78,15 @@ let be triggered even without filesystem changes. ''; }; + + extraPackages = mkOption { + type = with types; listOf package; + default = [ ]; + example = literalExpression "with pkgs; [ git-crypt ]"; + description = '' + Extra packages available to git-sync. + ''; + }; }; }); @@ -101,6 +112,15 @@ in { description = '' The repositories that should be synchronized. ''; + example = literalExpression '' + { + xyz = { + path = "''${config.home.homeDirectory}/foo/home-manager"; + uri = "git@github.com:nix-community/home-manager.git"; + interval = 1000; + }; + } + ''; }; }; }; diff --git a/modules/services/glance.nix b/modules/services/glance.nix new file mode 100644 index 000000000000..fa4f1a8d70ef --- /dev/null +++ b/modules/services/glance.nix @@ -0,0 +1,77 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.glance; + + inherit (lib) mkEnableOption mkPackageOption mkOption mkIf getExe; + + settingsFormat = pkgs.formats.yaml { }; + + settingsFile = settingsFormat.generate "glance.yml" cfg.settings; + + configFilePath = "${config.xdg.configHome}/glance/glance.yml"; +in { + meta.maintainers = [ pkgs.lib.maintainers.gepbird ]; + + options.services.glance = { + enable = mkEnableOption "glance"; + + package = mkPackageOption pkgs "glance" { }; + + settings = mkOption { + type = settingsFormat.type; + default = { + pages = [{ + name = "Calendar"; + columns = [{ + size = "full"; + widgets = [{ type = "calendar"; }]; + }]; + }]; + }; + example = { + server.port = 5678; + pages = [{ + name = "Home"; + columns = [{ + size = "full"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + location = "London, United Kingdom"; + } + ]; + }]; + }]; + }; + description = '' + Configuration written to a yaml file that is read by glance. See + + for more. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.glance" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."glance/glance.yml".source = settingsFile; + + systemd.user.services.glance = { + Unit = { + Description = "Glance feed dashboard server"; + PartOf = [ "graphical-session.target" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service.ExecStart = "${getExe cfg.package} --config ${configFilePath}"; + }; + }; +} diff --git a/modules/services/gnome-keyring.nix b/modules/services/gnome-keyring.nix index 460e4abd15e6..2cfa33d03852 100644 --- a/modules/services/gnome-keyring.nix +++ b/modules/services/gnome-keyring.nix @@ -49,7 +49,7 @@ in { args = concatStringsSep " " ([ "--start" "--foreground" ] ++ optional (cfg.components != [ ]) ("--components=" + concatStringsSep "," cfg.components)); - in "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon ${args}"; + in "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon ${args}"; Restart = "on-abort"; }; diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix index 70e4df0a5972..8bfe68aae3ec 100644 --- a/modules/services/gpg-agent.nix +++ b/modules/services/gpg-agent.nix @@ -18,6 +18,10 @@ let export GPG_TTY '' + optionalString cfg.enableSshSupport gpgSshSupportStr; + gpgZshInitStr = '' + export GPG_TTY=$TTY + '' + optionalString cfg.enableSshSupport gpgSshSupportStr; + gpgFishInitStr = '' set -gx GPG_TTY (tty) '' + optionalString cfg.enableSshSupport gpgSshSupportStr; @@ -27,12 +31,10 @@ let '' + 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) - } + $env.SSH_AUTH_SOCK = ($env.SSH_AUTH_SOCK? | default (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket)) ''; - # mimic `gpgconf` output for use in `systemd` unit definitions. + # mimic `gpgconf` output for use in the service definitions. # we cannot use `gpgconf` directly because it heavily depends on system # state, but we need the values at build time. original: # https://github.com/gpg/gnupg/blob/c6702d77d936b3e9d91b34d8fdee9599ab94ee1b/common/homedir.c#L672-L681 @@ -40,19 +42,22 @@ let let hash = substring 0 24 (hexStringToBase32 (builtins.hashString "sha1" homedir)); - in if homedir == options.programs.gpg.homedir.default then - "%t/gnupg/${dir}" + subdir = if homedir == options.programs.gpg.homedir.default then + "${dir}" + else + "d.${hash}/${dir}"; + in if pkgs.stdenv.isDarwin then + "/private/var/run/org.nix-community.home.gpg-agent/${subdir}" else - "%t/gnupg/d.${hash}/${dir}"; + "%t/gnupg/${subdir}"; # Act like `xxd -r -p | base32` but with z-base-32 alphabet and no trailing padding. # Written in Nix for purity. hexStringToBase32 = let mod = a: b: a - a / b * b; pow2 = elemAt [ 1 2 4 8 16 32 64 128 256 ]; - splitChars = s: init (tail (splitString "" s)); - base32Alphabet = splitChars "ybndrfg8ejkmcpqxot1uwisza345h769"; + base32Alphabet = stringToCharacters "ybndrfg8ejkmcpqxot1uwisza345h769"; hexToIntTable = listToAttrs (genList (x: { name = toLower (toHexString x); value = x; @@ -78,11 +83,42 @@ let buf = buf'; bufBits = bufBits'; }; - in hexString: (foldl' go initState (splitChars hexString)).ret; + in hexString: (foldl' go initState (stringToCharacters hexString)).ret; + + # Systemd socket unit generator. + mkSocket = { desc, docs, stream, fdName }: { + Unit = { + Description = desc; + Documentation = docs; + }; + + Socket = { + ListenStream = gpgconf "${stream}"; + FileDescriptorName = "${fdName}"; + Service = "gpg-agent.service"; + SocketMode = "0600"; + DirectoryMode = "0700"; + }; + + Install = { WantedBy = [ "sockets.target" ]; }; + }; + + # Launchd agent socket generator. + mkAgentSock = name: { + SockType = "stream"; + SockPathName = gpgconf name; + SockPathMode = + 384; # Property lists don't support octal literals (0600 = 384). + }; in { meta.maintainers = [ maintainers.rycee ]; + imports = [ + (mkRemovedOptionModule [ "services" "gpg-agent" "pinentryFlavor" ] + "Use services.gpg-agent.pinentryPackage instead") + ]; + options = { services.gpg-agent = { enable = mkEnableOption "GnuPG private key agent"; @@ -194,10 +230,9 @@ in { configuration file. ''; }; - - pinentryFlavor = mkOption { - type = types.nullOr (types.enum pkgs.pinentry.flavors); - example = "gnome3"; + pinentryPackage = mkOption { + type = types.nullOr types.package; + example = literalExpression "pkgs.pinentry-gnome3"; default = null; description = '' Which pinentry interface to use. If not @@ -245,8 +280,8 @@ in { "max-cache-ttl ${toString cfg.maxCacheTtl}" ++ optional (cfg.maxCacheTtlSsh != null) "max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}" - ++ optional (cfg.pinentryFlavor != null) - "pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry" + ++ optional (cfg.pinentryPackage != null) + "pinentry-program ${lib.getExe cfg.pinentryPackage}" ++ [ cfg.extraConfig ]); home.sessionVariablesExtra = optionalString cfg.enableSshSupport '' @@ -256,7 +291,7 @@ in { ''; programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgInitStr; - programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgInitStr; + programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgZshInitStr; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration gpgFishInitStr; @@ -271,90 +306,74 @@ in { '') cfg.sshKeys; }) - # The systemd units below are direct translations of the - # descriptions in the - # - # ${gpgPkg}/share/doc/gnupg/examples/systemd-user - # - # directory. - { - assertions = [ - (hm.assertions.assertPlatform "services.gpg-agent" pkgs platforms.linux) - ]; - - systemd.user.services.gpg-agent = { - Unit = { - Description = "GnuPG cryptographic agent and passphrase cache"; - Documentation = "man:gpg-agent(1)"; - Requires = "gpg-agent.socket"; - After = "gpg-agent.socket"; - # This is a socket-activated service: - RefuseManualStart = true; - }; - - Service = { - ExecStart = "${gpgPkg}/bin/gpg-agent --supervised" - + optionalString cfg.verbose " --verbose"; - ExecReload = "${gpgPkg}/bin/gpgconf --reload gpg-agent"; - Environment = [ "GNUPGHOME=${homedir}" ]; - }; - }; - - systemd.user.sockets.gpg-agent = { - Unit = { - Description = "GnuPG cryptographic agent and passphrase cache"; - Documentation = "man:gpg-agent(1)"; + (mkMerge [ + (mkIf pkgs.stdenv.isLinux { + systemd.user.services.gpg-agent = { + Unit = { + Description = "GnuPG cryptographic agent and passphrase cache"; + Documentation = "man:gpg-agent(1)"; + Requires = "gpg-agent.socket"; + After = "gpg-agent.socket"; + # This is a socket-activated service: + RefuseManualStart = true; + }; + + Service = { + ExecStart = "${gpgPkg}/bin/gpg-agent --supervised" + + optionalString cfg.verbose " --verbose"; + ExecReload = "${gpgPkg}/bin/gpgconf --reload gpg-agent"; + Environment = [ "GNUPGHOME=${homedir}" ]; + }; }; - Socket = { - ListenStream = gpgconf "S.gpg-agent"; - FileDescriptorName = "std"; - SocketMode = "0600"; - DirectoryMode = "0700"; + systemd.user.sockets.gpg-agent = mkSocket { + desc = "GnuPG cryptographic agent and passphrase cache"; + docs = "man:gpg-agent(1)"; + stream = "S.gpg-agent"; + fdName = "std"; }; - Install = { WantedBy = [ "sockets.target" ]; }; - }; - } - - (mkIf cfg.enableSshSupport { - systemd.user.sockets.gpg-agent-ssh = { - Unit = { - Description = "GnuPG cryptographic agent (ssh-agent emulation)"; - Documentation = - "man:gpg-agent(1) man:ssh-add(1) man:ssh-agent(1) man:ssh(1)"; + systemd.user.sockets.gpg-agent-ssh = mkIf cfg.enableSshSupport + (mkSocket ({ + desc = "GnuPG cryptographic agent (ssh-agent emulation)"; + docs = + "man:gpg-agent(1) man:ssh-add(1) man:ssh-agent(1) man:ssh(1)"; + stream = "S.gpg-agent.ssh"; + fdName = "ssh"; + })); + + systemd.user.sockets.gpg-agent-extra = mkIf cfg.enableExtraSocket + (mkSocket { + desc = + "GnuPG cryptographic agent and passphrase cache (restricted)"; + docs = "man:gpg-agent(1) man:ssh(1)"; + stream = "S.gpg-agent.extra"; + fdName = "extra"; + }); + }) + + (mkIf pkgs.stdenv.isDarwin { + launchd.agents.gpg-agent = { + enable = true; + config = { + ProgramArguments = [ "${gpgPkg}/bin/gpg-agent" "--supervised" ] + ++ optional cfg.verbose "--verbose"; + EnvironmentVariables = { GNUPGHOME = homedir; }; + KeepAlive = { + Crashed = true; + SuccessfulExit = false; + }; + ProcessType = "Background"; + RunAtLoad = cfg.enableSshSupport; + Sockets = { + Agent = mkAgentSock "S.gpg-agent"; + Ssh = mkIf cfg.enableSshSupport (mkAgentSock "S.gpg-agent.ssh"); + Extra = + mkIf cfg.enableExtraSocket (mkAgentSock "S.gpg-agent.extra"); + }; + }; }; - - Socket = { - ListenStream = gpgconf "S.gpg-agent.ssh"; - FileDescriptorName = "ssh"; - Service = "gpg-agent.service"; - SocketMode = "0600"; - DirectoryMode = "0700"; - }; - - Install = { WantedBy = [ "sockets.target" ]; }; - }; - }) - - (mkIf cfg.enableExtraSocket { - systemd.user.sockets.gpg-agent-extra = { - Unit = { - Description = - "GnuPG cryptographic agent and passphrase cache (restricted)"; - Documentation = "man:gpg-agent(1) man:ssh(1)"; - }; - - Socket = { - ListenStream = gpgconf "S.gpg-agent.extra"; - FileDescriptorName = "extra"; - Service = "gpg-agent.service"; - SocketMode = "0600"; - DirectoryMode = "0700"; - }; - - Install = { WantedBy = [ "sockets.target" ]; }; - }; - }) + }) + ]) ]); } diff --git a/modules/services/grobi.nix b/modules/services/grobi.nix index e656a763f260..9031089c99e2 100644 --- a/modules/services/grobi.nix +++ b/modules/services/grobi.nix @@ -88,7 +88,7 @@ in { ExecStart = "${pkgs.grobi}/bin/grobi watch -v"; Restart = "always"; RestartSec = "2s"; - Environment = "PATH=${pkgs.xorg.xrandr}/bin:${pkgs.bash}/bin"; + Environment = [ "PATH=${pkgs.xorg.xrandr}/bin:${pkgs.bash}/bin" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/modules/services/hound.nix b/modules/services/hound.nix index ff18a381ad8c..3aaf93200b55 100644 --- a/modules/services/hound.nix +++ b/modules/services/hound.nix @@ -72,7 +72,7 @@ in { Install = { WantedBy = [ "default.target" ]; }; Service = { - Environment = "PATH=${makeBinPath [ pkgs.mercurial pkgs.git ]}"; + Environment = [ "PATH=${makeBinPath [ pkgs.mercurial pkgs.git ]}" ]; ExecStart = "${pkgs.hound}/bin/houndd ${concatStringsSep " " houndOptions}"; }; diff --git a/modules/services/hypridle.nix b/modules/services/hypridle.nix new file mode 100644 index 000000000000..0d8a337b43db --- /dev/null +++ b/modules/services/hypridle.nix @@ -0,0 +1,95 @@ +{ config, lib, pkgs, ... }: +with lib; +let + + cfg = config.services.hypridle; +in { + meta.maintainers = [ maintainers.khaneliman maintainers.fufexan ]; + + options.services.hypridle = { + enable = mkEnableOption "Hypridle, Hyprland's idle daemon"; + + package = mkPackageOption pkgs "hypridle" { }; + + settings = lib.mkOption { + type = with lib.types; + let + valueType = nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "Hypridle configuration value"; + }; + in valueType; + default = { }; + description = '' + Hypridle configuration written in Nix. Entries with the same key + should be written as lists. Variables' and colors' names should be + quoted. See for more examples. + ''; + example = lib.literalExpression '' + { + general = { + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "hyprlock"; + }; + + listener = [ + { + timeout = 900; + on-timeout = "hyprlock"; + } + { + timeout = 1200; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + } + ''; + }; + + importantPrefixes = lib.mkOption { + type = with lib.types; listOf str; + default = [ "$" ]; + example = [ "$" ]; + description = '' + List of prefix of attributes to source at the top of the config. + ''; + }; + }; + + config = mkIf cfg.enable { + xdg.configFile."hypr/hypridle.conf" = mkIf (cfg.settings != { }) { + text = lib.hm.generators.toHyprconf { + attrs = cfg.settings; + inherit (cfg) importantPrefixes; + }; + }; + + systemd.user.services.hypridle = { + Install = { WantedBy = [ "graphical-session.target" ]; }; + + Unit = { + ConditionEnvironment = "WAYLAND_DISPLAY"; + Description = "hypridle"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + X-Restart-Triggers = mkIf (cfg.settings != { }) + [ "${config.xdg.configFile."hypr/hypridle.conf".source}" ]; + }; + + Service = { + ExecStart = "${getExe cfg.package}"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} diff --git a/modules/services/hyprpaper.nix b/modules/services/hyprpaper.nix new file mode 100644 index 000000000000..6c9ddb2cfa07 --- /dev/null +++ b/modules/services/hyprpaper.nix @@ -0,0 +1,89 @@ +{ config, lib, pkgs, ... }: +with lib; +let + + cfg = config.services.hyprpaper; +in { + meta.maintainers = [ maintainers.khaneliman maintainers.fufexan ]; + + options.services.hyprpaper = { + enable = mkEnableOption "Hyprpaper, Hyprland's wallpaper daemon"; + + package = mkPackageOption pkgs "hyprpaper" { }; + + settings = lib.mkOption { + type = with lib.types; + let + valueType = nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "Hyprpaper configuration value"; + }; + in valueType; + default = { }; + description = '' + hyprpaper configuration written in Nix. Entries with the same key + should be written as lists. Variables' and colors' names should be + quoted. See for more examples. + ''; + example = lib.literalExpression '' + { + ipc = "on"; + splash = false; + splash_offset = 2.0; + + preload = + [ "/share/wallpapers/buttons.png" "/share/wallpapers/cat_pacman.png" ]; + + wallpaper = [ + "DP-3,/share/wallpapers/buttons.png" + "DP-1,/share/wallpapers/cat_pacman.png" + ]; + } + ''; + }; + + importantPrefixes = lib.mkOption { + type = with lib.types; listOf str; + default = [ "$" ]; + example = [ "$" ]; + description = '' + List of prefix of attributes to source at the top of the config. + ''; + }; + }; + + config = mkIf cfg.enable { + xdg.configFile."hypr/hyprpaper.conf" = mkIf (cfg.settings != { }) { + text = lib.hm.generators.toHyprconf { + attrs = cfg.settings; + inherit (cfg) importantPrefixes; + }; + }; + + systemd.user.services.hyprpaper = { + Install = { WantedBy = [ "graphical-session.target" ]; }; + + Unit = { + ConditionEnvironment = "WAYLAND_DISPLAY"; + Description = "hyprpaper"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + X-Restart-Triggers = mkIf (cfg.settings != { }) + [ "${config.xdg.configFile."hypr/hyprpaper.conf".source}" ]; + }; + + Service = { + ExecStart = "${getExe cfg.package}"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} diff --git a/modules/services/imapnotify.nix b/modules/services/imapnotify.nix index a79cba35ec6e..a52b86e9712d 100644 --- a/modules/services/imapnotify.nix +++ b/modules/services/imapnotify.nix @@ -27,8 +27,8 @@ let Restart = "always"; RestartSec = 30; Type = "simple"; - } // optionalAttrs account.notmuch.enable { - Environment = + Environment = [ "PATH=${cfg.path}" ] + ++ optional account.notmuch.enable "NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/default/config"; }; @@ -72,6 +72,7 @@ let inherit (account.imap) host; inherit port; tls = account.imap.tls.enable; + tlsOptions.starttls = account.imap.tls.useStartTls; username = account.userName; passwordCmd = lib.concatMapStringsSep " " lib.escapeShellArg account.passwordCommand; @@ -96,6 +97,17 @@ in { example = literalExpression "pkgs.imapnotify"; description = "The imapnotify package to use"; }; + + path = mkOption { + type = types.listOf types.package; + apply = lib.makeBinPath; + default = [ ]; + description = '' + List of packages to provide in PATH for the imapnotify service. + + Note, this does not apply to the Darwin launchd service. + ''; + }; }; accounts.email.accounts = mkOption { @@ -121,6 +133,12 @@ in { (checkAccounts (a: a.userName == null) "username") ]; + services.imapnotify.path = lib.mkMerge [ + (lib.mkIf config.programs.notmuch.enable [ pkgs.notmuch ]) + (lib.mkIf config.programs.mbsync.enable + [ config.programs.mbsync.package ]) + ]; + systemd.user.services = listToAttrs (map genAccountUnit imapnotifyAccounts); launchd.agents = listToAttrs (map genAccountAgent imapnotifyAccounts); diff --git a/modules/services/kanshi.nix b/modules/services/kanshi.nix index 02fe8e3cfca3..2eda7487629c 100644 --- a/modules/services/kanshi.nix +++ b/modules/services/kanshi.nix @@ -6,6 +6,48 @@ let cfg = config.services.kanshi; + directivesTag = types.attrTag { + profile = mkOption { + type = profileModule; + description = '' + profile attribute set. + ''; + }; + output = mkOption { + type = outputModule; + description = '' + output attribute set. + ''; + }; + include = mkOption { + type = types.str; + description = '' + Include as another file from _path_. + Expands shell syntax (see *wordexp*(3) for details). + ''; + }; + }; + + tagToStr = x: + if x ? profile then + profileStr x.profile + else if x ? output then + outputStr x.output + else if x ? include then + ''include "${x.include}"'' + else + throw "Unknown tags ${attrNames x}"; + + directivesStr = '' + ${concatStringsSep "\n" (map tagToStr cfg.settings)} + ''; + + oldDirectivesStr = '' + ${concatStringsSep "\n" + (mapAttrsToList (n: v: profileStr (v // { name = n; })) cfg.profiles)} + ${cfg.extraConfig} + ''; + outputModule = types.submodule { options = { @@ -81,6 +123,15 @@ let ''; }; + alias = mkOption { + type = types.nullOr types.str; + default = null; + example = "laptopMonitor"; + description = '' + Defines an alias for the output + ''; + }; + adaptiveSync = mkOption { type = types.nullOr types.bool; default = null; @@ -93,15 +144,16 @@ let }; }; - outputStr = - { criteria, status, mode, position, scale, transform, adaptiveSync, ... }: + outputStr = { criteria, status, mode, position, scale, transform, adaptiveSync + , alias, ... }: ''output "${criteria}"'' + optionalString (status != null) " ${status}" + optionalString (mode != null) " mode ${mode}" + optionalString (position != null) " position ${position}" + optionalString (scale != null) " scale ${toString scale}" + optionalString (transform != null) " transform ${transform}" + optionalString (adaptiveSync != null) - " adaptive_sync ${if adaptiveSync then "on" else "off"}"; + " adaptive_sync ${if adaptiveSync then "on" else "off"}" + + optionalString (alias != null) " alias \$${alias}"; profileModule = types.submodule { options = { @@ -113,6 +165,14 @@ let ''; }; + name = mkOption { + type = types.str; + default = ""; + description = '' + Profile name + ''; + }; + exec = mkOption { type = with types; coercedTo str singleton (listOf str); default = [ ]; @@ -127,15 +187,14 @@ let }; }; - profileStr = name: - { outputs, exec, ... }: '' - profile ${name} { - ${ - concatStringsSep "\n " - (map outputStr outputs ++ map (cmd: "exec ${cmd}") exec) - } + profileStr = { outputs, exec, ... }@args: '' + profile ${args.name or ""} { + ${ + concatStringsSep "\n " + (map outputStr outputs ++ map (cmd: "exec ${cmd}") exec) } - ''; + } + ''; in { meta.maintainers = [ hm.maintainers.nurelin ]; @@ -157,27 +216,29 @@ in { type = types.attrsOf profileModule; default = { }; description = '' - List of profiles. + Attribute set of profiles. ''; example = literalExpression '' - undocked = { - outputs = [ - { - criteria = "eDP-1"; - } - ]; - }; - docked = { - outputs = [ - { - criteria = "eDP-1"; - } - { - criteria = "Some Company ASDF 4242"; - transform = "90"; - } - ]; - }; + { + undocked = { + outputs = [ + { + criteria = "eDP-1"; + } + ]; + }; + docked = { + outputs = [ + { + criteria = "eDP-1"; + } + { + criteria = "Some Company ASDF 4242"; + transform = "90"; + } + ]; + }; + } ''; }; @@ -190,6 +251,41 @@ in { ''; }; + settings = mkOption { + type = types.listOf directivesTag; + default = [ ]; + description = '' + Ordered list of directives. + See kanshi(5) for informations. + ''; + example = literalExpression '' + [ + { include = "path/to/included/files"; } + { output.criteria = "eDP-1"; + output.scale = 2; + } + { profile.name = "undocked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + ]; + } + { profile.name = "docked"; + profile.outputs = [ + { + criteria = "eDP-1"; + } + { + criteria = "Some Company ASDF 4242"; + transform = "90"; + } + ]; + } + ] + ''; + }; + systemdTarget = mkOption { type = types.str; default = "sway-session.target"; @@ -199,33 +295,66 @@ in { }; }; - config = mkIf cfg.enable { - assertions = [ - (lib.hm.assertions.assertPlatform "services.kanshi" pkgs - lib.platforms.linux) - ]; - - xdg.configFile."kanshi/config".text = '' - ${concatStringsSep "\n" (mapAttrsToList profileStr cfg.profiles)} - ${cfg.extraConfig} - ''; - - systemd.user.services.kanshi = { - Unit = { - Description = "Dynamic output configuration"; - Documentation = "man:kanshi(1)"; - PartOf = cfg.systemdTarget; - Requires = cfg.systemdTarget; - After = cfg.systemdTarget; - }; + config = mkIf cfg.enable (mkMerge [ + { + assertions = [ + (lib.hm.assertions.assertPlatform "services.kanshi" pkgs + lib.platforms.linux) + { + assertion = (cfg.profiles == { } && cfg.extraConfig == "") + || (length cfg.settings) == 0; + message = + "Cannot mix kanshi.settings with kanshi.profiles or kanshi.extraConfig"; + } + { + assertion = let profiles = filter (x: x ? profile) cfg.settings; + in length + (filter (x: any (a: a ? alias && a.alias != null) x.profile.outputs) + profiles) == 0; + message = + "Output kanshi.*.output.alias can only be defined on global scope"; + } + ]; + } - Service = { - Type = "simple"; - ExecStart = "${cfg.package}/bin/kanshi"; - Restart = "always"; - }; + (mkIf (cfg.profiles != { }) { + warnings = [ + "kanshi.profiles option is deprecated. Use kanshi.settings instead." + ]; + }) - Install = { WantedBy = [ cfg.systemdTarget ]; }; - }; - }; + (mkIf (cfg.extraConfig != "") { + warnings = [ + "kanshi.extraConfig option is deprecated. Use kanshi.settings instead." + ]; + }) + + { + home.packages = [ cfg.package ]; + + xdg.configFile."kanshi/config".text = + if cfg.profiles == { } && cfg.extraConfig == "" then + directivesStr + else + oldDirectivesStr; + + systemd.user.services.kanshi = { + Unit = { + Description = "Dynamic output configuration"; + Documentation = "man:kanshi(1)"; + PartOf = cfg.systemdTarget; + Requires = cfg.systemdTarget; + After = cfg.systemdTarget; + }; + + Service = { + Type = "simple"; + ExecStart = "${cfg.package}/bin/kanshi"; + Restart = "always"; + }; + + Install = { WantedBy = [ cfg.systemdTarget ]; }; + }; + } + ]); } diff --git a/modules/services/kbfs.nix b/modules/services/kbfs.nix index a541a32ca177..21e962968744 100644 --- a/modules/services/kbfs.nix +++ b/modules/services/kbfs.nix @@ -46,13 +46,12 @@ in { Service = let mountPoint = ''"%h/${cfg.mountPoint}"''; in { - Environment = "PATH=/run/wrappers/bin KEYBASE_SYSTEMD=1"; + Environment = [ "PATH=/run/wrappers/bin" "KEYBASE_SYSTEMD=1" ]; ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${mountPoint}"; ExecStart = "${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${mountPoint}"; ExecStopPost = "/run/wrappers/bin/fusermount -u ${mountPoint}"; Restart = "on-failure"; - PrivateTmp = true; }; Install.WantedBy = [ "default.target" ]; diff --git a/modules/services/kdeconnect.nix b/modules/services/kdeconnect.nix index 0c6aac31e80f..f30d79fc5711 100644 --- a/modules/services/kdeconnect.nix +++ b/modules/services/kdeconnect.nix @@ -5,7 +5,6 @@ with lib; let cfg = config.services.kdeconnect; - package = pkgs.plasma5Packages.kdeconnect-kde; in { meta.maintainers = [ maintainers.adisbladis ]; @@ -13,19 +12,24 @@ in { options = { services.kdeconnect = { enable = mkEnableOption "KDE connect"; + package = mkOption { + type = types.package; + default = pkgs.kdePackages.kdeconnect-kde; + example = literalExpression "pkgs.plasma5Packages.kdeconnect-kde"; + description = "The KDE connect package to use"; + }; indicator = mkOption { type = types.bool; default = false; description = "Whether to enable kdeconnect-indicator service."; }; - }; }; config = mkMerge [ (mkIf cfg.enable { - home.packages = [ package ]; + home.packages = [ cfg.package ]; assertions = [ (hm.assertions.assertPlatform "services.kdeconnect" pkgs @@ -43,8 +47,13 @@ in { Install = { WantedBy = [ "graphical-session.target" ]; }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${package}/libexec/kdeconnectd"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; + ExecStart = + if strings.versionAtLeast (versions.majorMinor cfg.package.version) + "24.05" then + "${cfg.package}/bin/kdeconnectd" + else + "${cfg.package}/libexec/kdeconnectd"; Restart = "on-abort"; }; }; @@ -66,17 +75,17 @@ in { "stalonetray.service" ]; PartOf = [ "graphical-session.target" ]; + Requires = [ "tray.target" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${package}/bin/kdeconnect-indicator"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; + ExecStart = "${cfg.package}/bin/kdeconnect-indicator"; Restart = "on-abort"; }; }; }) - ]; } diff --git a/modules/services/keepassx.nix b/modules/services/keepassx.nix deleted file mode 100644 index 7f85823619d8..000000000000 --- a/modules/services/keepassx.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - meta.maintainers = [ maintainers.rycee ]; - - options = { - services.keepassx = { - enable = mkEnableOption "the KeePassX password manager"; - }; - }; - - config = mkIf config.services.keepassx.enable { - assertions = [ - (hm.assertions.assertPlatform "services.keepassx" pkgs platforms.linux) - ]; - - systemd.user.services.keepassx = { - Unit = { - Description = "KeePassX password manager"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; - }; - - Install = { WantedBy = [ "graphical-session.target" ]; }; - - Service = { ExecStart = "${pkgs.keepassx}/bin/keepassx -min -lock"; }; - }; - }; -} diff --git a/modules/services/listenbrainz-mpd.nix b/modules/services/listenbrainz-mpd.nix index 5b949ebe5f39..3cc2422167e6 100644 --- a/modules/services/listenbrainz-mpd.nix +++ b/modules/services/listenbrainz-mpd.nix @@ -24,7 +24,7 @@ in { Configuration for listenbrainz-mpd written to {file}`$XDG_CONFIG_HOME/listenbrainz-mpd/config.toml`. ''; - example = { submission.tokenFile = "/run/secrets/listenbrainz-mpd"; }; + example = { submission.token_file = "/run/secrets/listenbrainz-mpd"; }; }; }; diff --git a/modules/services/lorri.nix b/modules/services/lorri.nix index f782ff880d7f..93673dd8fe10 100644 --- a/modules/services/lorri.nix +++ b/modules/services/lorri.nix @@ -7,7 +7,7 @@ let cfg = config.services.lorri; in { - meta.maintainers = [ maintainers.gerschtli ]; + meta.maintainers = [ maintainers.gerschtli maintainers.nyarly ]; options.services.lorri = { enable = mkEnableOption "lorri build daemon"; @@ -55,7 +55,10 @@ in { ReadWritePaths = [ # /run/user/1000 for the socket "%t" - "/nix/var/nix/gcroots/per-user/%u" + # Needs to update own cache + "%C/lorri" + # Needs %C/nix/fetcher-cache-v1.sqlite + "%C/nix" ]; CacheDirectory = [ "lorri" ]; Restart = "on-failure"; diff --git a/modules/services/megasync.nix b/modules/services/megasync.nix index c519ba51f041..03eab490abc1 100644 --- a/modules/services/megasync.nix +++ b/modules/services/megasync.nix @@ -28,7 +28,7 @@ in { systemd.user.services.megasync = { Unit = { Description = "megasync"; - After = [ "graphical-session-pre.target" ]; + After = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ]; }; diff --git a/modules/services/mopidy.nix b/modules/services/mopidy.nix index 37642a2903af..397ed287e696 100644 --- a/modules/services/mopidy.nix +++ b/modules/services/mopidy.nix @@ -23,7 +23,8 @@ let name = "mopidy-with-extensions-${pkgs.mopidy.version}"; paths = closePropagation cfg.extensionPackages; pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ]; - buildInputs = [ pkgs.makeWrapper ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + ignoreCollisions = true; postBuild = '' makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \ --prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages} @@ -48,6 +49,8 @@ let configFilePaths = concatStringsSep ":" ([ "${config.xdg.configHome}/mopidy/mopidy.conf" ] ++ cfg.extraConfigFiles); + hasMopidyLocal = builtins.elem pkgs.mopidy-local cfg.extensionPackages; + in { meta.maintainers = [ hm.maintainers.foo-dogsquared ]; @@ -124,16 +127,19 @@ in { Description = "mopidy music player daemon"; Documentation = [ "https://mopidy.com/" ]; After = [ "network.target" "sound.target" ]; + X-Restart-Triggers = mkIf (cfg.settings != { }) + [ "${config.xdg.configFile."mopidy/mopidy.conf".source}" ]; }; Service = { ExecStart = "${mopidyEnv}/bin/mopidy --config ${configFilePaths}"; + Restart = "on-failure"; }; Install.WantedBy = [ "default.target" ]; }; - systemd.user.services.mopidy-scan = { + systemd.user.services.mopidy-scan = mkIf hasMopidyLocal { Unit = { Description = "mopidy local files scanner"; Documentation = [ "https://mopidy.com/" ]; diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix index a0011b0213a5..8787ad667a78 100644 --- a/modules/services/mpd.nix +++ b/modules/services/mpd.nix @@ -171,17 +171,24 @@ in { ]; systemd.user.services.mpd = { - Unit = { - After = [ "network.target" "sound.target" ]; - Description = "Music Player Daemon"; - }; + Unit = mkMerge [ + { + Description = "Music Player Daemon"; + After = [ "network.target" "sound.target" ]; + } + + (mkIf cfg.network.startWhenNeeded { + Requires = [ "mpd.socket" ]; + After = [ "mpd.socket" ]; + }) + ]; Install = mkIf (!cfg.network.startWhenNeeded) { WantedBy = [ "default.target" ]; }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; ExecStart = "${cfg.package}/bin/mpd --no-daemon ${mpdConf} ${ escapeShellArgs cfg.extraArgs }"; diff --git a/modules/services/network-manager-applet.nix b/modules/services/network-manager-applet.nix index b90855dd5c58..524921b71d9a 100644 --- a/modules/services/network-manager-applet.nix +++ b/modules/services/network-manager-applet.nix @@ -21,6 +21,9 @@ in { lib.platforms.linux) ]; + # The package provides some icons that are good to have available. + xdg.systemDirs.data = [ "${pkgs.networkmanagerapplet}/share" ]; + systemd.user.services.network-manager-applet = { Unit = { Description = "Network Manager applet"; diff --git a/modules/services/nextcloud-client.nix b/modules/services/nextcloud-client.nix index b436488d1662..24b3c99dd353 100644 --- a/modules/services/nextcloud-client.nix +++ b/modules/services/nextcloud-client.nix @@ -41,7 +41,7 @@ in { }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; ExecStart = "${cfg.package}/bin/nextcloud" + (optionalString cfg.startInBackground " --background"); }; diff --git a/modules/services/nix-gc.nix b/modules/services/nix-gc.nix new file mode 100644 index 000000000000..7789aeffbb47 --- /dev/null +++ b/modules/services/nix-gc.nix @@ -0,0 +1,162 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.nix.gc; + darwinIntervals = + [ "hourly" "daily" "weekly" "monthly" "semiannually" "annually" ]; + + mkCalendarInterval = frequency: + let + freq = { + "hourly" = [{ Minute = 0; }]; + "daily" = [{ + Hour = 0; + Minute = 0; + }]; + "weekly" = [{ + Weekday = 1; + Hour = 0; + Minute = 0; + }]; + "monthly" = [{ + Day = 1; + Hour = 0; + Minute = 0; + }]; + "semiannually" = [ + { + Month = 1; + Day = 1; + Hour = 0; + Minute = 0; + } + { + Month = 7; + Day = 1; + Hour = 0; + Minute = 0; + } + ]; + "annually" = [{ + Month = 1; + Day = 1; + Hour = 0; + Minute = 0; + }]; + }; + in freq.${frequency}; + + nixPackage = if config.nix.enable && config.nix.package != null then + config.nix.package + else + pkgs.nix; +in { + meta.maintainers = [ maintainers.shivaraj-bh ]; + + options = { + nix.gc = { + automatic = mkOption { + type = types.bool; + default = false; + description = '' + Automatically run the garbage collector at a specific time. + + Note: This will only garbage collect the current user's profiles. + ''; + }; + + frequency = mkOption { + type = types.str; + default = "weekly"; + example = "03:15"; + description = '' + When to run the Nix garbage collector. + + On Linux this is a string as defined by {manpage}`systemd.time(7)`. + + On Darwin it must be one of: ${toString darwinIntervals}, which are + implemented as defined in the manual page above. + ''; + }; + + randomizedDelaySec = lib.mkOption { + default = "0"; + type = lib.types.singleLineStr; + example = "45min"; + description = '' + Add a randomized delay before each garbage collection. + The delay will be chosen between zero and this value. + This value must be a time span in the format specified by + {manpage}`systemd.time(7)` + ''; + }; + + options = mkOption { + type = types.nullOr types.str; + default = null; + example = "--max-freed $((64 * 1024**3))"; + description = '' + Options given to {file}`nix-collect-garbage` when the + garbage collector is run automatically. + ''; + }; + + persistent = mkOption { + type = types.bool; + default = true; + example = false; + description = '' + If true, the time when the service unit was last triggered is + stored on disk. When the timer is activated, the service unit is + triggered immediately if it would have been triggered at least once + during the time when the timer was inactive. + ''; + }; + }; + }; + + config = lib.mkIf cfg.automatic (mkMerge [ + (mkIf pkgs.stdenv.isLinux { + systemd.user.services.nix-gc = { + Unit = { Description = "Nix Garbage Collector"; }; + Service = { + Type = "oneshot"; + ExecStart = toString (pkgs.writeShellScript "nix-gc" + "exec ${nixPackage}/bin/nix-collect-garbage ${ + lib.optionalString (cfg.options != null) cfg.options + }"); + }; + }; + systemd.user.timers.nix-gc = { + Unit = { Description = "Nix Garbage Collector"; }; + Timer = { + OnCalendar = "${cfg.frequency}"; + RandomizedDelaySec = cfg.randomizedDelaySec; + Persistent = cfg.persistent; + Unit = "nix-gc.service"; + }; + Install = { WantedBy = [ "timers.target" ]; }; + }; + }) + + (mkIf pkgs.stdenv.isDarwin { + assertions = [{ + assertion = elem cfg.frequency darwinIntervals; + message = "On Darwin nix.gc.frequency must be one of: ${ + toString darwinIntervals + }."; + }]; + + launchd.agents.nix-gc = { + enable = true; + config = { + ProgramArguments = [ "${nixPackage}/bin/nix-collect-garbage" ] + ++ lib.optional (cfg.options != null) cfg.options; + StartCalendarInterval = mkCalendarInterval cfg.frequency; + }; + }; + }) + ]); +} diff --git a/modules/services/opensnitch-ui.nix b/modules/services/opensnitch-ui.nix index a086554cad2d..f45ee9cdbf8b 100644 --- a/modules/services/opensnitch-ui.nix +++ b/modules/services/opensnitch-ui.nix @@ -28,7 +28,7 @@ in { }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; ExecStart = "${pkgs.opensnitch-ui}/bin/opensnitch-ui"; }; diff --git a/modules/services/owncloud-client.nix b/modules/services/owncloud-client.nix index 2884affe41a4..3235dac9cea5 100644 --- a/modules/services/owncloud-client.nix +++ b/modules/services/owncloud-client.nix @@ -29,7 +29,7 @@ in { }; Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; + Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; ExecStart = "${cfg.package}/bin/owncloud"; }; diff --git a/modules/services/pass-secret-service.nix b/modules/services/pass-secret-service.nix index db494337e80d..c6ea599188c1 100644 --- a/modules/services/pass-secret-service.nix +++ b/modules/services/pass-secret-service.nix @@ -58,6 +58,7 @@ in { optionalString (cfg.storePath != null) "--path ${cfg.storePath}" }"; BusName = busName; + Environment = [ "GNUPGHOME=${config.programs.gpg.homedir}" ]; }; Install.WantedBy = [ "default.target" ]; diff --git a/modules/services/pbgopy.nix b/modules/services/pbgopy.nix index fecc64ca0f4e..3a3499e52007 100644 --- a/modules/services/pbgopy.nix +++ b/modules/services/pbgopy.nix @@ -15,7 +15,7 @@ let "--basic-auth ${escapeShellArg cfg.httpAuth}"); in { - meta.maintainers = [ maintainers.ivar ]; + meta.maintainers = [ ]; options.services.pbgopy = { enable = mkEnableOption "pbgopy"; diff --git a/modules/services/podman-linux/activation.nix b/modules/services/podman-linux/activation.nix new file mode 100644 index 000000000000..5791f19b0693 --- /dev/null +++ b/modules/services/podman-linux/activation.nix @@ -0,0 +1,99 @@ +{ config, podman-lib, ... }: + +{ + cleanup = '' + PATH=$PATH:${podman-lib.newuidmapPaths} + export VERBOSE=true + + DRYRUN_ENABLED() { + return $([ -n "''${DRY_RUN:-}" ] && echo 0 || echo 1) + } + + VERBOSE_ENABLED() { + return $([ -n "''${VERBOSE:-}" ] && echo 0 || echo 1) + } + + cleanup() { + local resourceType=$1 + local manifestFile="${config.xdg.configHome}/podman/$2" + local extraListCommands="''${3:-}" + [[ $resourceType = "container" ]] && extraListCommands+=" -a" + + [ ! -f "$manifestFile" ] && VERBOSE_ENABLED && echo "Manifest does not exist: $manifestFile" && return 0 + + VERBOSE_ENABLED && echo "Cleaning up ''${resourceType}s not in manifest..." || true + + loadManifest "$manifestFile" + + formatString="{{.Name}}" + [[ $resourceType = "container" ]] && formatString="{{.Names}}" + + local listOutput=$(${config.services.podman.package}/bin/podman $resourceType ls $extraListCommands --filter 'label=nix.home-manager.managed=true' --format "$formatString") + + IFS=$'\n' read -r -d "" -a podmanResources <<< "$listOutput" || true + + if [ ''${#podmanResources[@]} -eq 0 ]; then + VERBOSE_ENABLED && echo "No ''${resourceType}s available to process." || true + else + for resource in "''${podmanResources[@]}"; do + if ! isResourceInManifest "$resource"; then + removeResource "$resourceType" "$resource" + else + VERBOSE_ENABLED && echo "Keeping managed $resourceType: $resource" || true + fi + done + fi + } + + isResourceInManifest() { + local resource="$1" + for manifestEntry in "''${resourceManifest[@]}"; do + if [ "$resource" = "$manifestEntry" ]; then + return 0 # Resource found in manifest + fi + done + return 1 # Resource not found in manifest + } + + # Function to fill resourceManifest from the manifest file + loadManifest() { + local manifestFile="$1" + VERBOSE_ENABLED && echo "Loading manifest from $manifestFile..." || true + IFS=$'\n' read -r -d "" -a resourceManifest <<< "$(cat "$manifestFile")" || true + } + + removeResource() { + local resourceType="$1" + local resource="$2" + echo "Removing orphaned $resourceType: $resource" + commands=() + case "$resourceType" in + "container") + commands+="${config.services.podman.package}/bin/podman $resourceType stop $resource" + commands+="${config.services.podman.package}/bin/podman $resourceType rm -f $resource" + ;; + "network") + commands+="${config.services.podman.package}/bin/podman $resourceType rm $resource" + ;; + esac + for command in "''${commands[@]}"; do + command=$(echo $command | tr -d ';&|`') + DRYRUN_ENABLED && echo "Would run: $command" && continue || true + VERBOSE_ENABLED && echo "Running: $command" || true + if [[ "$(eval "$command")" != "$resource" ]]; then + echo -e "\tCommand failed: ''${command}" + usedByContainers=$(${config.services.podman.package}/bin/podman container ls -a --filter "$resourceType=$resource" --format "{{.Names}}") + echo -e "\t$resource in use by containers: $usedByContainers" + fi + done + } + + resourceManifest=() + [[ "$@" == *"--verbose"* ]] && VERBOSE="true" + [[ "$@" == *"--dry-run"* ]] && DRY_RUN="true" + + for type in "container" "network"; do + cleanup "$type" "''${type}s.manifest" + done + ''; +} diff --git a/modules/services/podman-linux/containers.nix b/modules/services/podman-linux/containers.nix new file mode 100644 index 000000000000..41ab291309e0 --- /dev/null +++ b/modules/services/podman-linux/containers.nix @@ -0,0 +1,313 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.podman; + + podman-lib = import ./podman-lib.nix { inherit lib config; }; + + createQuadletSource = name: containerDef: + let + mapHmNetworks = network: + if builtins.hasAttr network cfg.networks then + "podman-${network}-network.service" + else + null; + + finalConfig = let + managedNetworks = if lib.isList containerDef.network then + map mapHmNetworks containerDef.network + else if containerDef.network != null then + map mapHmNetworks [ containerDef.network ] + else + [ ]; + in (podman-lib.deepMerge { + Container = { + AddCapability = containerDef.addCapabilities; + AddDevice = containerDef.devices; + AutoUpdate = containerDef.autoUpdate; + ContainerName = name; + DropCapability = containerDef.dropCapabilities; + Entrypoint = containerDef.entrypoint; + Environment = containerDef.environment; + EnvironmentFile = containerDef.environmentFile; + Exec = containerDef.exec; + Group = containerDef.group; + Image = containerDef.image; + IP = containerDef.ip4; + IP6 = containerDef.ip6; + Label = + (containerDef.labels // { "nix.home-manager.managed" = true; }); + Network = containerDef.network; + NetworkAlias = containerDef.networkAlias; + PodmanArgs = containerDef.extraPodmanArgs; + PublishPort = containerDef.ports; + UserNS = containerDef.userNS; + User = containerDef.user; + Volume = containerDef.volumes; + }; + Install = { + WantedBy = (if containerDef.autoStart then [ + "default.target" + "multi-user.target" + ] else + [ ]); + }; + Service = { + Environment = { + PATH = (builtins.concatStringsSep ":" [ + "/run/wrappers/bin" + "/run/current-system/sw/bin" + "${config.home.homeDirectory}/.nix-profile/bin" + ]); + }; + Restart = "always"; + TimeoutStopSec = 30; + }; + Unit = { + After = [ "network.target" ] ++ managedNetworks; + Requires = managedNetworks; + Description = (if (builtins.isString containerDef.description) then + containerDef.description + else + "Service for container ${name}"); + }; + } containerDef.extraConfig); + in '' + # Automatically generated by home-manager podman container configuration + # DO NOT EDIT THIS FILE DIRECTLY + # + # ${name}.container + ${podman-lib.toQuadletIni finalConfig} + ''; + + toQuadletInternal = name: containerDef: { + assertions = podman-lib.buildConfigAsserts name containerDef.extraConfig; + resourceType = "container"; + serviceName = + "podman-${name}"; # quadlet service name: 'podman-.service' + source = + podman-lib.removeBlankLines (createQuadletSource name containerDef); + }; + + # Define the container user type as the user interface + containerDefinitionType = types.submodule { + options = { + + addCapabilities = mkOption { + type = with types; listOf str; + default = [ ]; + example = [ "CAP_DAC_OVERRIDE" "CAP_IPC_OWNER" ]; + description = "The capabilities to add to the container."; + }; + + autoStart = mkOption { + type = types.bool; + default = true; + description = '' + Whether to start the container on boot (requires user lingering). + ''; + }; + + autoUpdate = mkOption { + type = types.enum [ null "registry" "local" ]; + default = null; + example = "registry"; + description = "The autoupdate policy for the container."; + }; + + description = mkOption { + type = with types; nullOr str; + default = null; + example = "My Container"; + description = "The description of the container."; + }; + + devices = mkOption { + type = with types; listOf str; + default = [ ]; + example = [ "/dev/:/dev/" ]; + description = "The devices to mount into the container"; + }; + + dropCapabilities = mkOption { + type = with types; listOf str; + default = [ ]; + example = [ "CAP_DAC_OVERRIDE" "CAP_IPC_OWNER" ]; + description = "The capabilities to drop from the container."; + }; + + entrypoint = mkOption { + type = with types; nullOr str; + default = null; + example = "/foo.sh"; + description = "The container entrypoint."; + }; + + environment = mkOption { + type = podman-lib.primitiveAttrs; + default = { }; + example = literalExpression '' + { + VAR1 = "0:100"; + VAR2 = true; + VAR3 = 5; + } + ''; + description = "Environment variables to set in the container."; + }; + + environmentFile = mkOption { + type = with types; listOf str; + default = [ ]; + example = [ "/etc/environment" "/etc/other-env" ]; + description = '' + Paths to files containing container environment variables. + ''; + }; + + exec = mkOption { + type = with types; nullOr str; + default = null; + example = "sleep inf"; + description = "The command to run after the container start."; + }; + + extraPodmanArgs = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "--security-opt=no-new-privileges" + "--security-opt=seccomp=unconfined" + ]; + description = "Extra arguments to pass to the podman run command."; + }; + + extraConfig = mkOption { + type = podman-lib.extraConfigType; + default = { }; + example = literalExpression '' + { + Container = { + User = 1000; + }; + Service = { + TimeoutStartSec = 15; + }; + } + ''; + description = '' + INI sections and values to populate the Container Quadlet. + ''; + }; + + group = mkOption { + type = with types; nullOr (either int str); + default = null; + description = "The group ID inside the container."; + }; + + image = mkOption { + type = types.str; + example = "registry.access.redhat.com/ubi9-minimal:latest"; + description = "The container image."; + }; + + ip4 = mkOption { + type = with types; nullOr str; + default = null; + description = "Set an IPv4 address for the container."; + }; + + ip6 = mkOption { + type = with types; nullOr str; + default = null; + description = "Set an IPv6 address for the container."; + }; + + labels = mkOption { + type = with types; attrsOf str; + default = { }; + example = { + app = "myapp"; + some-label = "somelabel"; + }; + description = "The labels to apply to the container."; + }; + + network = mkOption { + type = with types; either str (listOf str); + default = [ ]; + apply = value: if isString value then [ value ] else value; + example = literalMD '' + `"host"` + or + `"bridge_network_1"` + or + `[ "bridge_network_1" "bridge_network_2" ]` + ''; + description = '' + The network mode or network/s to connect the container to. Equivalent + to `podman run --network=