From 4d19ca4703ea040dd28ce4b4cc774ca608cd0fc0 Mon Sep 17 00:00:00 2001 From: Default email Date: Tue, 4 Jun 2024 11:23:39 -0700 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: a7117efb3725e6197dd95424136f79147aa35e5b --- third_party/home-manager/.builds/manual.yml | 3 +- .../home-manager/.github/dependabot.yml | 4 +- third_party/home-manager/.github/labeler.yml | 64 ++-- .../.github/workflows/github_pages.yml | 6 +- .../.github/workflows/labeler.yml | 3 +- .../home-manager/.github/workflows/test.yml | 7 +- .../.github/workflows/update-flake.yml | 4 +- third_party/home-manager/README.md | 10 +- third_party/home-manager/docs/default.nix | 52 +-- third_party/home-manager/docs/flake.lock | 45 +++ third_party/home-manager/docs/flake.nix | 54 +++ .../home-manager/docs/highlight-style.css | 8 - .../home-manager/docs/home-manager-manual.nix | 23 +- third_party/home-manager/docs/home-manager.1 | 2 +- .../docs/manual/contributing/guidelines.md | 14 +- third_party/home-manager/docs/manual/faq.md | 2 +- ...age-module.md => change-package-module.md} | 30 +- .../home-manager/docs/manual/installation.md | 2 +- .../docs/manual/installation/nix-darwin.md | 6 +- .../docs/manual/installation/nixos.md | 6 +- .../docs/manual/installation/standalone.md | 4 +- .../home-manager/docs/manual/nix-flakes.md | 2 +- .../docs/manual/nix-flakes/standalone.md | 8 +- .../docs/manual/usage/configuration.md | 4 +- .../docs/release-notes/release-notes.md | 1 + .../docs/release-notes/rl-2405.md | 78 ++++- .../docs/release-notes/rl-2411.md | 18 + .../home-manager/docs/static/style.css | 7 + .../home-manager/docs/static/style.scss | 310 ++++++++++++++++++ .../docs/static/tomorrow-night.min.css | 7 + .../home-manager/docs/static/tomorrow.min.css | 7 + third_party/home-manager/flake.lock | 6 +- third_party/home-manager/flake.nix | 14 +- third_party/home-manager/format | 6 - .../home-manager/home-manager/home-manager | 144 ++++---- .../home-manager/home-manager/po/ca.po | 97 +++--- .../home-manager/home-manager/po/cs.po | 99 +++--- .../home-manager/home-manager/po/da.po | 109 +++--- .../home-manager/home-manager/po/de.po | 103 +++--- .../home-manager/home-manager/po/es.po | 95 +++--- .../home-manager/home-manager/po/fa.po | 182 ++++++---- .../home-manager/home-manager/po/fi.po | 144 ++++---- .../home-manager/home-manager/po/fr.po | 97 +++--- .../home-manager/po/home-manager.pot | 85 ++--- .../home-manager/home-manager/po/id.po | 97 +++--- .../home-manager/home-manager/po/is.po | 223 +++++++++++++ .../home-manager/home-manager/po/it.po | 101 +++--- .../home-manager/home-manager/po/ja.po | 120 ++++--- .../home-manager/home-manager/po/ko.po | 97 +++--- .../home-manager/home-manager/po/lt.po | 102 +++--- .../home-manager/home-manager/po/nb_NO.po | 109 +++--- .../home-manager/home-manager/po/nl.po | 97 +++--- .../home-manager/home-manager/po/pl.po | 101 +++--- .../home-manager/home-manager/po/pt.po | 97 +++--- .../home-manager/home-manager/po/pt_BR.po | 99 +++--- .../home-manager/home-manager/po/ro.po | 97 +++--- .../home-manager/home-manager/po/ru.po | 101 +++--- .../home-manager/home-manager/po/sv.po | 97 +++--- .../home-manager/home-manager/po/th.po | 85 ++--- .../home-manager/home-manager/po/tr.po | 117 ++++--- .../home-manager/home-manager/po/uk.po | 101 +++--- .../home-manager/home-manager/po/vi.po | 251 ++++++++++++++ .../home-manager/home-manager/po/zh_Hans.po | 97 +++--- .../home-manager/home-manager/po/zh_Hant.po | 97 +++--- .../home-manager/lib/bash/home-manager.sh | 42 +++ .../modules/accounts/calendar.nix | 20 +- .../modules/accounts/contacts.nix | 1 + .../home-manager/modules/accounts/email.nix | 7 +- third_party/home-manager/modules/default.nix | 72 ++-- third_party/home-manager/modules/files.nix | 85 ++--- .../modules/files/check-link-targets.sh | 59 ++++ .../home-manager/modules/home-environment.nix | 84 +++-- .../modules/i18n/input-method/fcitx5.nix | 3 +- .../modules/i18n/input-method/kime.nix | 44 ++- .../home-manager/modules/launchd/default.nix | 10 +- .../modules/lib-bash/activation-init.sh | 67 +++- .../home-manager/modules/lib/file-type.nix | 31 +- .../home-manager/modules/lib/generators.nix | 136 ++++++++ .../home-manager/modules/lib/maintainers.nix | 77 +++++ third_party/home-manager/modules/manual.nix | 7 - .../home-manager/modules/misc/dconf.nix | 6 +- .../home-manager/modules/misc/fontconfig.nix | 100 +++++- .../home-manager/modules/misc/news.nix | 289 +++++++++++++++- third_party/home-manager/modules/misc/nix.nix | 36 +- third_party/home-manager/modules/misc/qt.nix | 161 ++++++--- .../home-manager/modules/misc/qt/kconfig.nix | 73 +++++ .../home-manager/modules/misc/uninstall.nix | 50 +++ .../home-manager/modules/misc/version.nix | 1 + .../home-manager/modules/misc/xdg-portal.nix | 85 ++--- .../modules/misc/xdg-user-dirs.nix | 3 +- .../home-manager/modules/misc/xfconf.nix | 10 +- third_party/home-manager/modules/modules.nix | 34 +- third_party/home-manager/modules/po/ca.po | 36 +- third_party/home-manager/modules/po/cs.po | 36 +- third_party/home-manager/modules/po/da.po | 36 +- third_party/home-manager/modules/po/de.po | 36 +- third_party/home-manager/modules/po/es.po | 36 +- third_party/home-manager/modules/po/fa.po | 49 +-- third_party/home-manager/modules/po/fi.po | 76 +++-- third_party/home-manager/modules/po/fr.po | 36 +- .../home-manager/modules/po/hm-modules.pot | 36 +- third_party/home-manager/modules/po/id.po | 36 +- third_party/home-manager/modules/po/is.po | 113 +++++++ third_party/home-manager/modules/po/it.po | 36 +- third_party/home-manager/modules/po/ja.po | 36 +- third_party/home-manager/modules/po/ko.po | 36 +- third_party/home-manager/modules/po/lt.po | 48 ++- third_party/home-manager/modules/po/nb_NO.po | 48 +-- third_party/home-manager/modules/po/nl.po | 36 +- third_party/home-manager/modules/po/pl.po | 36 +- third_party/home-manager/modules/po/pt.po | 36 +- third_party/home-manager/modules/po/pt_BR.po | 48 +-- third_party/home-manager/modules/po/ro.po | 36 +- third_party/home-manager/modules/po/ru.po | 36 +- third_party/home-manager/modules/po/sv.po | 36 +- third_party/home-manager/modules/po/th.po | 36 +- third_party/home-manager/modules/po/tr.po | 36 +- third_party/home-manager/modules/po/uk.po | 36 +- third_party/home-manager/modules/po/vi.po | 116 +++++++ .../home-manager/modules/po/zh_Hans.po | 36 +- .../home-manager/modules/po/zh_Hant.po | 36 +- .../modules/programs/alacritty.nix | 33 +- .../modules/programs/antidote.nix | 2 +- .../home-manager/modules/programs/bacon.nix | 5 +- .../home-manager/modules/programs/bash.nix | 6 +- .../home-manager/modules/programs/bat.nix | 14 +- .../home-manager/modules/programs/beets.nix | 4 +- .../home-manager/modules/programs/bemenu.nix | 3 +- .../modules/programs/borgmatic.nix | 46 ++- .../home-manager/modules/programs/bun.nix | 59 ++++ .../home-manager/modules/programs/direnv.nix | 19 +- .../home-manager/modules/programs/emacs.nix | 2 +- .../home-manager/modules/programs/eza.nix | 49 ++- .../modules/programs/fastfetch.nix | 65 ++++ .../home-manager/modules/programs/fd.nix | 59 ++++ .../home-manager/modules/programs/firefox.nix | 90 ++++- .../home-manager/modules/programs/fish.nix | 15 +- .../modules/programs/freetube.nix | 60 ++++ .../home-manager/modules/programs/fzf.nix | 51 ++- .../modules/programs/gallery-dl.nix | 4 +- .../home-manager/modules/programs/gh.nix | 6 +- .../home-manager/modules/programs/git.nix | 4 +- .../modules/programs/gnome-shell.nix | 115 +++++++ .../home-manager/modules/programs/gpg.nix | 7 +- .../home-manager/modules/programs/gradle.nix | 6 +- .../home-manager/modules/programs/helix.nix | 13 + .../modules/programs/himalaya.nix | 257 ++++++--------- .../modules/programs/hyprlock.nix | 127 +++++++ .../modules/programs/jetbrains-remote.nix | 38 +++ .../modules/programs/joplin-desktop.nix | 135 ++++++++ .../home-manager/modules/programs/jujutsu.nix | 77 ++--- .../home-manager/modules/programs/k9s.nix | 127 +++++-- .../modules/programs/khal-accounts.nix | 27 ++ .../programs/khal-calendar-accounts.nix | 38 +-- .../programs/khal-contact-accounts.nix | 15 + .../home-manager/modules/programs/khal.nix | 36 +- .../home-manager/modules/programs/kitty.nix | 16 +- .../home-manager/modules/programs/mbsync.nix | 2 +- .../home-manager/modules/programs/mcfly.nix | 44 ++- .../home-manager/modules/programs/mise.nix | 111 +++++++ .../home-manager/modules/programs/mpv.nix | 21 +- .../home-manager/modules/programs/mu.nix | 2 +- .../modules/programs/neomutt-accounts.nix | 22 ++ .../home-manager/modules/programs/neomutt.nix | 148 +++++++-- .../home-manager/modules/programs/neovim.nix | 25 +- .../home-manager/modules/programs/nushell.nix | 2 +- .../modules/programs/offlineimap.nix | 1 + .../home-manager/modules/programs/poetry.nix | 55 ++++ .../home-manager/modules/programs/pqiv.nix | 40 ++- .../modules/programs/qutebrowser.nix | 11 +- .../home-manager/modules/programs/ranger.nix | 182 ++++++++++ .../home-manager/modules/programs/rbw.nix | 16 +- .../modules/programs/readline.nix | 14 +- .../home-manager/modules/programs/rio.nix | 19 +- .../home-manager/modules/programs/rtx.nix | 79 ----- .../home-manager/modules/programs/senpai.nix | 68 +++- .../modules/programs/spotify-player.nix | 154 +++++++++ .../home-manager/modules/programs/ssh.nix | 195 ++++++----- .../modules/programs/taskwarrior.nix | 6 +- .../modules/programs/tealdeer.nix | 66 +++- .../home-manager/modules/programs/thefuck.nix | 14 + .../modules/programs/thunderbird.nix | 5 + .../home-manager/modules/programs/tofi.nix | 63 ++++ .../modules/programs/topgrade.nix | 16 +- .../modules/programs/vdirsyncer-accounts.nix | 23 +- .../modules/programs/vdirsyncer.nix | 66 ++-- .../home-manager/modules/programs/vscode.nix | 8 +- .../home-manager/modules/programs/yambar.nix | 55 ++++ .../home-manager/modules/programs/yazi.nix | 74 ++++- .../home-manager/modules/programs/zellij.nix | 7 +- .../home-manager/modules/programs/zk.nix | 52 +++ .../home-manager/modules/programs/zoxide.nix | 1 - .../home-manager/modules/programs/zsh.nix | 65 +++- .../modules/programs/zsh/prezto.nix | 3 +- .../modules/services/activitywatch.nix | 266 +++++++++++++++ .../home-manager/modules/services/amberol.nix | 70 ++++ .../home-manager/modules/services/arrpc.nix | 39 +++ .../modules/services/cliphist.nix | 37 ++- .../home-manager/modules/services/conky.nix | 53 +++ .../home-manager/modules/services/darkman.nix | 3 +- .../home-manager/modules/services/dropbox.nix | 6 +- .../home-manager/modules/services/espanso.nix | 34 +- .../home-manager/modules/services/fusuma.nix | 12 +- .../modules/services/git-sync.nix | 13 +- .../modules/services/gpg-agent.nix | 25 +- .../modules/services/hypridle.nix | 95 ++++++ .../modules/services/hyprpaper.nix | 89 +++++ .../modules/services/imapnotify.nix | 1 + .../home-manager/modules/services/kanshi.nix | 215 +++++++++--- .../modules/services/kdeconnect.nix | 21 +- .../modules/services/keepassx.nix | 31 -- .../modules/services/listenbrainz-mpd.nix | 6 +- .../home-manager/modules/services/lorri.nix | 6 +- .../home-manager/modules/services/mopidy.nix | 4 +- .../services/network-manager-applet.nix | 3 + .../home-manager/modules/services/nix-gc.nix | 147 +++++++++ .../home-manager/modules/services/psd.nix | 88 +++++ .../home-manager/modules/services/pueue.nix | 6 +- .../home-manager/modules/services/remmina.nix | 74 +++++ .../modules/services/swayidle.nix | 1 + .../home-manager/modules/services/swaync.nix | 113 +++++++ .../home-manager/modules/services/swayosd.nix | 36 +- .../services/window-managers/hyprland.nix | 108 +++--- .../services/window-managers/i3-sway/i3.nix | 2 +- .../services/window-managers/i3-sway/sway.nix | 177 ++++++---- .../services/window-managers/river.nix | 212 ++++++++++++ .../services/window-managers/xmonad.nix | 1 + .../modules/services/wlsunset.nix | 82 ++++- .../home-manager/modules/services/wob.nix | 79 +++++ .../modules/services/xscreensaver.nix | 13 +- .../home-manager/modules/systemd-activate.sh | 7 +- third_party/home-manager/modules/systemd.nix | 16 +- .../modules/targets/darwin/fonts.nix | 21 +- .../modules/targets/darwin/keybindings.nix | 4 +- .../targets/darwin/user-defaults/default.nix | 8 +- .../darwin/user-defaults/opts-allhosts.nix | 100 +++++- .../modules/targets/generic-linux.nix | 6 +- third_party/home-manager/modules/xsession.nix | 1 + third_party/home-manager/nixos/common.nix | 1 + third_party/home-manager/release.json | 2 +- third_party/home-manager/tests/default.nix | 79 +++-- .../tests/integration/default.nix | 20 ++ .../tests/integration/nixos/basics.nix | 95 ++++++ .../standalone/alice-flake-init.nix | 29 ++ .../standalone/alice-home-init.nix | 76 +++++ .../standalone/alice-home-next.nix | 19 ++ .../integration/standalone/flake-basics.nix | 130 ++++++++ .../standalone/standard-basics.nix | 127 +++++++ .../tests/lib/generators/default.nix | 6 +- .../tests/lib/generators/tokdl.nix | 4 +- .../lib/generators/toscfg-empty-result.txt | 0 .../tests/lib/generators/toscfg-empty.nix | 11 + .../generators/toscfg-err-dir-empty-name.nix | 12 + .../lib/generators/toscfg-example-result.txt | 10 + .../tests/lib/generators/toscfg-example.nix | 24 ++ .../i18n/input-method/fcitx5-stubs.nix | 36 +- .../i18n/input-method/kime-configuration.nix | 37 ++- .../tests/modules/misc/qt/qt-basic.nix | 2 - .../misc/qt/qt-platform-theme-gnome.nix | 7 +- .../modules/misc/qt/qt-platform-theme-gtk.nix | 4 +- .../misc/qt/qt-platform-theme-gtk3.nix | 4 +- .../tests/modules/misc/xdg/portal.nix | 24 +- .../programs/alacritty/empty-settings.nix | 4 - .../alacritty/example-settings-expected.toml | 2 +- .../programs/alacritty/example-settings.nix | 8 +- .../alacritty/settings-merging-expected.yml | 1 - .../programs/alacritty/settings-merging.nix | 14 +- .../alacritty/settings-toml-expected.toml | 2 +- .../programs/alacritty/toml_config.nix | 4 +- .../tests/modules/programs/beets/mpdstats.nix | 6 +- .../programs/bemenu/basic-configuration.nix | 5 +- .../programs/bemenu/empty-configuration.nix | 2 + .../both-sourcedirectories-and-patterns.nix | 26 ++ .../modules/programs/borgmatic/default.nix | 5 + ...neither-sourcedirectories-nor-patterns.nix | 18 + .../borgmatic/patterns-configuration.nix | 58 ++++ .../modules/programs/carapace/nushell.nix | 4 +- .../modules/programs/direnv/nix-direnv.nix | 4 +- .../tests/modules/programs/direnv/nushell.nix | 4 +- .../programs/direnv/stdlib-and-nix-direnv.nix | 4 +- .../tests/modules/programs/direnv/stdlib.nix | 1 + .../fastfetch/basic-configuration.jsonc | 28 ++ .../fastfetch/basic-configuration.nix | 39 +++ .../fastfetch/default-configuration.nix | 9 + .../modules/programs/fastfetch/default.nix | 4 + .../firefox/container-id-out-of-range.nix | 27 ++ .../modules/programs/firefox/default.nix | 1 + .../modules/programs/firefox/policies.nix | 10 + .../profile-settings-expected-bookmarks.html | 6 +- .../profile-settings-expected-containers.json | 2 +- .../profile-settings-expected-search.json | 6 +- .../programs/firefox/profile-settings.nix | 11 +- .../programs/freetube/basic-configuration.db | 8 + .../programs/freetube/basic-configuration.nix | 30 ++ .../modules/programs/freetube/default.nix | 1 + .../programs/gallery-dl/gallery-dl.nix | 4 +- .../programs/git/git-with-email-expected.conf | 4 +- .../modules/programs/git/git-with-email.nix | 4 +- .../programs/git/git-with-msmtp-expected.conf | 4 +- .../modules/programs/git/git-with-msmtp.nix | 5 +- .../modules/programs/gnome-shell/default.nix | 1 + .../programs/gnome-shell/gnome-shell.nix | 94 ++++++ .../programs/gpg/immutable-keyfiles.nix | 6 +- .../modules/programs/gpg/mutable-keyfiles.nix | 6 +- .../programs/helix/example-settings.nix | 5 + .../modules/programs/helix/ignore-expected | 2 + .../programs/himalaya/basic-expected.toml | 36 +- .../tests/modules/programs/himalaya/basic.nix | 2 - .../modules/programs/himalaya/default.nix | 7 +- .../programs/himalaya/imap-smtp-expected.toml | 35 -- .../modules/programs/himalaya/imap-smtp.nix | 58 ---- .../himalaya/maildir-sendmail-expected.toml | 16 - .../programs/himalaya/maildir-sendmail.nix | 35 -- .../himalaya/notmuch-sendmail-expected.toml | 16 - .../programs/himalaya/notmuch-sendmail.nix | 36 -- .../hyprlock/basic-configuration.conf | 27 ++ .../programs/hyprlock/basic-configuration.nix | 45 +++ .../hyprlock/complex-configuration.conf | 167 ++++++++++ .../hyprlock/complex-configuration.nix | 183 +++++++++++ .../modules/programs/hyprlock/default.nix | 4 + .../joplin-desktop/basic-configuration.json | 6 + .../joplin-desktop/basic-configuration.nix | 23 ++ .../programs/joplin-desktop/default.nix | 1 + .../modules/programs/jujutsu/empty-config.nix | 2 +- .../programs/jujutsu/example-config.nix | 4 +- .../tests/modules/programs/k9s/default.nix | 2 + .../programs/k9s/deprecated-options.nix | 33 ++ .../modules/programs/k9s/empty-settings.nix | 14 +- ...cted.yml => example-aliases-expected.yaml} | 0 ...ected.yml => example-config-expected.yaml} | 2 + ...ected.yml => example-hotkey-expected.yaml} | 0 ...ected.yml => example-plugin-expected.yaml} | 0 .../modules/programs/k9s/example-settings.nix | 85 +++-- .../k9s/example-skin-expected-alt.yaml | 8 + ...xpected.yml => example-skin-expected.yaml} | 0 ...pected.yml => example-views-expected.yaml} | 0 .../k9s/partial-skin-settings-expected.yaml | 7 + .../programs/k9s/partial-skin-settings.nix | 55 ++++ .../tests/modules/programs/khal/config.nix | 59 ++++ .../programs/khal/khal-config-expected | 38 +++ .../kitty/example-settings-expected.conf | 2 +- .../programs/mise/bash-integration.nix | 16 + .../modules/programs/mise/custom-settings.nix | 45 +++ .../programs/mise/default-settings.nix | 13 + .../tests/modules/programs/mise/default.nix | 7 + .../{rtx => mise}/fish-integration.nix | 6 +- .../modules/programs/mise/zsh-integration.nix | 16 + .../mpv-example-settings-expected-bindings | 3 +- .../programs/mpv/mpv-example-settings.nix | 88 ++--- .../programs/mpv/mpv-invalid-settings.nix | 29 +- .../tests/modules/programs/mpv/mpv-stubs.nix | 29 ++ .../programs/mu/basic-configuration.nix | 2 +- .../neomutt/account-command.sh-expected | 39 +++ .../modules/programs/neomutt/default.nix | 3 + .../programs/neomutt/hm-example.com-expected | 1 - .../neomutt/hm-example.com-gpg-expected.conf | 1 - .../neomutt/hm-example.com-imap-expected.conf | 34 ++ .../hm-example.com-msmtp-expected.conf | 1 - ...example.com-no-folder-change-expected.conf | 1 - .../hm-example.com-signature-command-expected | 1 - .../neomutt/hm-example.com-signature-expected | 1 - .../neomutt/hm-example.com-starttls-expected | 1 - .../hm-example.com-unmailboxes-expected.conf | 34 ++ .../programs/neomutt/neomutt-expected.conf | 5 +- .../neomutt/neomutt-not-primary-expected.conf | 5 +- .../programs/neomutt/neomutt-unmailboxes.nix | 30 ++ .../neomutt/neomutt-with-binds-expected.conf | 5 +- .../neomutt/neomutt-with-imap-expected.conf | 35 ++ ...utt-with-imap-type-mailboxes-expected.conf | 37 +++ .../neomutt-with-imap-type-mailboxes.nix | 57 ++++ .../programs/neomutt/neomutt-with-imap.nix | 44 +++ ...neomutt-with-named-mailboxes-expected.conf | 5 +- .../tests/modules/programs/neovim/runtime.nix | 14 + .../programs/nushell/example-settings.nix | 4 +- .../modules/programs/oh-my-posh/nushell.nix | 6 +- .../tests/modules/programs/pls/zsh.nix | 4 +- .../programs/poetry/custom-settings.nix | 27 ++ .../programs/poetry/default-settings.nix | 15 + .../tests/modules/programs/poetry/default.nix | 4 + .../tests/modules/programs/pqiv/settings.nix | 8 + .../programs/qutebrowser/keybindings.nix | 2 + .../programs/ranger/configuration-rc.conf | 13 + .../programs/ranger/configuration-rifle.conf | 2 + .../modules/programs/ranger/configuration.nix | 43 +++ .../tests/modules/programs/ranger/default.nix | 1 + .../tests/modules/programs/rbw/rbw-stubs.nix | 8 +- .../tests/modules/programs/rbw/settings.nix | 4 +- .../modules/programs/rbw/simple-settings.nix | 2 +- .../modules/programs/readline/default.nix | 5 +- .../programs/readline/prefer-xdg-dirs.nix | 28 ++ .../modules/programs/rio/example-settings.nix | 11 +- .../modules/programs/rtx/bash-integration.nix | 16 - .../modules/programs/rtx/custom-settings.nix | 35 -- .../modules/programs/rtx/default-settings.nix | 12 - .../tests/modules/programs/rtx/default.nix | 7 - .../modules/programs/rtx/zsh-integration.nix | 16 - .../tests/modules/programs/senpai/default.nix | 4 + .../senpai/empty-settings-expected.conf | 2 + .../programs/senpai/empty-settings.nix | 20 ++ .../senpai/example-settings-expected.conf | 13 + .../programs/senpai/example-settings.nix | 27 ++ .../modules/programs/spotify-player/app.toml | 9 + .../programs/spotify-player/default.nix | 1 + .../programs/spotify-player/keymap.toml | 19 ++ .../programs/spotify-player/settings.nix | 103 ++++++ .../programs/spotify-player/theme.toml | 58 ++++ .../programs/tealdeer/custom-settings.nix | 35 ++ .../programs/tealdeer/default-settings.nix | 18 + .../modules/programs/tealdeer/default.nix | 4 + .../programs/thefuck/integration-disabled.nix | 3 + .../programs/thefuck/integration-enabled.nix | 6 + .../thunderbird/thunderbird-expected-first.js | 3 + .../thunderbird-expected-second.js | 1 + .../programs/thunderbird/thunderbird.nix | 5 + .../programs/tofi/basic-configuration.conf | 12 + .../programs/tofi/basic-configuration.nix | 28 ++ .../tests/modules/programs/tofi/default.nix | 1 + .../programs/topgrade/settings-expected.toml | 7 +- .../modules/programs/topgrade/settings.nix | 14 +- .../tests/modules/programs/yambar/default.nix | 4 + .../programs/yambar/empty-settings.nix | 11 + .../yambar/example-settings-expected.yml | 9 + .../programs/yambar/example-settings.nix | 35 ++ .../yazi/bash-integration-enabled.nix | 4 +- .../yazi/fish-integration-enabled.nix | 2 +- .../modules/programs/yazi/flavor/init.lua | 1 + .../tests/modules/programs/yazi/init.lua | 3 + .../yazi/nushell-integration-enabled.nix | 14 +- .../modules/programs/yazi/plugin/init.lua | 1 + .../tests/modules/programs/yazi/settings.nix | 9 + .../programs/yazi/zsh-integration-enabled.nix | 4 +- .../modules/programs/zellij/enable-shells.nix | 6 +- .../tests/modules/programs/zk/default.nix | 1 + .../tests/modules/programs/zk/expected.toml | 15 + .../tests/modules/programs/zk/zk.nix | 30 ++ .../programs/zsh/syntax-highlighting.nix | 1 + .../services/activitywatch/basic-setup.nix | 53 +++ .../services/activitywatch/default.nix | 4 + .../activitywatch/empty-server-settings.nix | 14 + .../cliphist/cliphist-extra-options.nix | 24 ++ .../modules/services/cliphist/default.nix | 5 +- .../services/conky/basic-configuration.conf | 7 + .../services/conky/basic-configuration.nix | 30 ++ .../tests/modules/services/conky/default.nix | 1 + .../modules/services/darkman/default.nix | 5 +- .../services/darkman/no-configuration.nix | 37 +++ .../espanso-darwin/basic-configuration.nix | 55 ++++ .../services/espanso-darwin/default.nix | 1 + .../services/espanso-darwin/launchd.plist | 27 ++ .../services/fusuma/expected-service.service | 4 +- .../tests/modules/services/fusuma/service.nix | 1 + .../modules/services/fusuma/settings.nix | 2 +- .../services/gpg-agent/default-homedir.nix | 12 +- .../services/gpg-agent/override-homedir.nix | 2 +- .../services/hypridle/basic-configuration.nix | 38 +++ .../modules/services/hypridle/default.nix | 1 + .../modules/services/hypridle/hypridle.conf | 16 + .../hyprpaper/basic-configuration.nix | 30 ++ .../modules/services/hyprpaper/default.nix | 1 + .../modules/services/hyprpaper/hyprpaper.conf | 7 + .../imapnotify/imapnotify-config.json | 1 + .../services/imapnotify/imapnotify.nix | 5 + .../services/kanshi/basic-configuration.nix | 5 + .../tests/modules/services/kanshi/default.nix | 5 +- .../services/kanshi/new-configuration.conf | 19 ++ .../services/kanshi/new-configuration.nix | 63 ++++ .../services/mopidy/basic-configuration.nix | 3 +- .../tests/modules/services/mopidy/default.nix | 6 +- .../modules/services/mopidy/mopidy-scan.nix | 13 + .../modules/services/nix-gc-darwin/basic.nix | 19 ++ .../services/nix-gc-darwin/default.nix | 1 + .../nix-gc-darwin/expected-agent.plist | 24 ++ .../tests/modules/services/nix-gc/basic.nix | 29 ++ .../tests/modules/services/nix-gc/default.nix | 1 + .../modules/services/nix-gc/expected.service | 5 + .../modules/services/nix-gc/expected.timer | 10 + .../modules/services/remmina/basic-config.nix | 26 ++ .../services/remmina/default-config.nix | 20 ++ .../modules/services/remmina/default.nix | 4 + .../tests/modules/services/swaync/default.nix | 1 + .../tests/modules/services/swaync/swaync.nix | 35 ++ .../modules/services/swayosd/swayosd.nix | 6 +- .../window-managers/hyprland/default.nix | 2 + .../hyprland/multiple-devices-config.conf | 60 ++++ .../hyprland/multiple-devices-config.nix | 88 +++++ .../hyprland/simple-config.conf | 18 +- .../hyprland/simple-config.nix | 12 + .../hyprland/sourceFirst-false-config.conf | 13 + .../hyprland/sourceFirst-false-config.nix | 34 ++ .../window-managers/river/configuration.nix | 95 ++++++ .../window-managers/river/default.nix | 1 + .../services/window-managers/river/init | 67 ++++ .../services/window-managers/sway/default.nix | 2 + .../sway/sway-bar-focused-colors.conf | 4 +- .../sway/sway-bar-focused-colors.nix | 1 + ...way-bindkeys-to-code-and-extra-config.conf | 4 +- ...sway-bindkeys-to-code-and-extra-config.nix | 1 + .../sway/sway-check-config.nix | 12 + .../window-managers/sway/sway-default.conf | 4 +- .../window-managers/sway/sway-default.nix | 1 + .../sway/sway-followmouse-expected.conf | 4 +- .../sway-followmouse-legacy-expected.conf | 4 +- .../sway/sway-followmouse-legacy.nix | 1 + .../window-managers/sway/sway-followmouse.nix | 1 + .../window-managers/sway/sway-modules.conf | 4 +- .../window-managers/sway/sway-modules.nix | 1 + .../window-managers/sway/sway-no-xwayland.nix | 1 + .../window-managers/sway/sway-null-config.nix | 1 + .../sway/sway-null-package.conf | 4 +- .../sway/sway-null-package.nix | 1 + .../window-managers/sway/sway-post-2003.conf | 4 +- .../window-managers/sway/sway-post-2003.nix | 1 + .../sway/sway-systemd-autostart.nix | 1 + .../sway/sway-systemd-variables.conf | 108 ++++++ .../sway/sway-systemd-variables.nix | 21 ++ .../sway/sway-workspace-default-expected.conf | 4 +- .../sway/sway-workspace-default.nix | 1 + .../sway/sway-workspace-output-expected.conf | 4 +- .../sway/sway-workspace-output.nix | 1 + .../wlsunset-service-expected.service | 2 +- .../tests/modules/services/wob/default.nix | 1 + .../services/wob/wob-service-expected.ini | 2 + .../services/wob/wob-service-expected.service | 13 + .../services/wob/wob-service-expected.socket | 8 + .../modules/services/wob/wob-service.nix | 29 ++ third_party/home-manager/tests/stubs.nix | 7 +- third_party/home-manager/xgettext | 2 + 527 files changed, 13844 insertions(+), 4001 deletions(-) create mode 100644 third_party/home-manager/docs/flake.lock create mode 100644 third_party/home-manager/docs/flake.nix delete mode 100644 third_party/home-manager/docs/highlight-style.css rename third_party/home-manager/docs/manual/faq/{override-package-module.md => change-package-module.md} (53%) create mode 100644 third_party/home-manager/docs/release-notes/rl-2411.md create mode 100644 third_party/home-manager/docs/static/style.css create mode 100644 third_party/home-manager/docs/static/style.scss create mode 100644 third_party/home-manager/docs/static/tomorrow-night.min.css create mode 100644 third_party/home-manager/docs/static/tomorrow.min.css create mode 100644 third_party/home-manager/home-manager/po/is.po create mode 100644 third_party/home-manager/home-manager/po/vi.po create mode 100644 third_party/home-manager/modules/files/check-link-targets.sh create mode 100644 third_party/home-manager/modules/misc/qt/kconfig.nix create mode 100644 third_party/home-manager/modules/misc/uninstall.nix create mode 100644 third_party/home-manager/modules/po/is.po create mode 100644 third_party/home-manager/modules/po/vi.po create mode 100644 third_party/home-manager/modules/programs/bun.nix create mode 100644 third_party/home-manager/modules/programs/fastfetch.nix create mode 100644 third_party/home-manager/modules/programs/fd.nix create mode 100644 third_party/home-manager/modules/programs/freetube.nix create mode 100644 third_party/home-manager/modules/programs/gnome-shell.nix create mode 100644 third_party/home-manager/modules/programs/hyprlock.nix create mode 100644 third_party/home-manager/modules/programs/jetbrains-remote.nix create mode 100644 third_party/home-manager/modules/programs/joplin-desktop.nix create mode 100644 third_party/home-manager/modules/programs/khal-contact-accounts.nix create mode 100644 third_party/home-manager/modules/programs/mise.nix create mode 100644 third_party/home-manager/modules/programs/poetry.nix create mode 100644 third_party/home-manager/modules/programs/ranger.nix delete mode 100644 third_party/home-manager/modules/programs/rtx.nix create mode 100644 third_party/home-manager/modules/programs/spotify-player.nix create mode 100644 third_party/home-manager/modules/programs/tofi.nix create mode 100644 third_party/home-manager/modules/programs/yambar.nix create mode 100644 third_party/home-manager/modules/programs/zk.nix create mode 100644 third_party/home-manager/modules/services/activitywatch.nix create mode 100644 third_party/home-manager/modules/services/amberol.nix create mode 100644 third_party/home-manager/modules/services/arrpc.nix create mode 100644 third_party/home-manager/modules/services/conky.nix create mode 100644 third_party/home-manager/modules/services/hypridle.nix create mode 100644 third_party/home-manager/modules/services/hyprpaper.nix delete mode 100644 third_party/home-manager/modules/services/keepassx.nix create mode 100644 third_party/home-manager/modules/services/nix-gc.nix create mode 100644 third_party/home-manager/modules/services/psd.nix create mode 100644 third_party/home-manager/modules/services/remmina.nix create mode 100644 third_party/home-manager/modules/services/swaync.nix create mode 100644 third_party/home-manager/modules/services/window-managers/river.nix create mode 100644 third_party/home-manager/modules/services/wob.nix create mode 100644 third_party/home-manager/tests/integration/default.nix create mode 100644 third_party/home-manager/tests/integration/nixos/basics.nix create mode 100644 third_party/home-manager/tests/integration/standalone/alice-flake-init.nix create mode 100644 third_party/home-manager/tests/integration/standalone/alice-home-init.nix create mode 100644 third_party/home-manager/tests/integration/standalone/alice-home-next.nix create mode 100644 third_party/home-manager/tests/integration/standalone/flake-basics.nix create mode 100644 third_party/home-manager/tests/integration/standalone/standard-basics.nix create mode 100644 third_party/home-manager/tests/lib/generators/toscfg-empty-result.txt create mode 100644 third_party/home-manager/tests/lib/generators/toscfg-empty.nix create mode 100644 third_party/home-manager/tests/lib/generators/toscfg-err-dir-empty-name.nix create mode 100644 third_party/home-manager/tests/lib/generators/toscfg-example-result.txt create mode 100644 third_party/home-manager/tests/lib/generators/toscfg-example.nix delete mode 100644 third_party/home-manager/tests/modules/programs/alacritty/settings-merging-expected.yml create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/both-sourcedirectories-and-patterns.nix create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/neither-sourcedirectories-nor-patterns.nix create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/patterns-configuration.nix create mode 100755 third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.jsonc create mode 100644 third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/fastfetch/default-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/fastfetch/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/firefox/container-id-out-of-range.nix create mode 100644 third_party/home-manager/tests/modules/programs/freetube/basic-configuration.db create mode 100644 third_party/home-manager/tests/modules/programs/freetube/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/freetube/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/gnome-shell/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/gnome-shell/gnome-shell.nix create mode 100644 third_party/home-manager/tests/modules/programs/helix/ignore-expected delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix create mode 100644 third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.conf create mode 100644 third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.conf create mode 100644 third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/hyprlock/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.json create mode 100644 third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/joplin-desktop/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/k9s/deprecated-options.nix rename third_party/home-manager/tests/modules/programs/k9s/{example-aliases-expected.yml => example-aliases-expected.yaml} (100%) rename third_party/home-manager/tests/modules/programs/k9s/{example-config-expected.yml => example-config-expected.yaml} (76%) rename third_party/home-manager/tests/modules/programs/k9s/{example-hotkey-expected.yml => example-hotkey-expected.yaml} (100%) rename third_party/home-manager/tests/modules/programs/k9s/{example-plugin-expected.yml => example-plugin-expected.yaml} (100%) create mode 100644 third_party/home-manager/tests/modules/programs/k9s/example-skin-expected-alt.yaml rename third_party/home-manager/tests/modules/programs/k9s/{example-skin-expected.yml => example-skin-expected.yaml} (100%) rename third_party/home-manager/tests/modules/programs/k9s/{example-views-expected.yml => example-views-expected.yaml} (100%) create mode 100644 third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings-expected.yaml create mode 100644 third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/mise/bash-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/mise/custom-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/mise/default-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/mise/default.nix rename third_party/home-manager/tests/modules/programs/{rtx => mise}/fish-integration.nix (63%) create mode 100644 third_party/home-manager/tests/modules/programs/mise/zsh-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/mpv/mpv-stubs.nix create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/account-command.sh-expected create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-imap-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-unmailboxes-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/neomutt-unmailboxes.nix create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes.nix create mode 100644 third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap.nix create mode 100644 third_party/home-manager/tests/modules/programs/poetry/custom-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/poetry/default-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/poetry/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/ranger/configuration-rc.conf create mode 100644 third_party/home-manager/tests/modules/programs/ranger/configuration-rifle.conf create mode 100644 third_party/home-manager/tests/modules/programs/ranger/configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/ranger/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/readline/prefer-xdg-dirs.nix delete mode 100644 third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix delete mode 100644 third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix delete mode 100644 third_party/home-manager/tests/modules/programs/rtx/default-settings.nix delete mode 100644 third_party/home-manager/tests/modules/programs/rtx/default.nix delete mode 100644 third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/senpai/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/senpai/empty-settings-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/senpai/empty-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/senpai/example-settings-expected.conf create mode 100644 third_party/home-manager/tests/modules/programs/senpai/example-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/spotify-player/app.toml create mode 100644 third_party/home-manager/tests/modules/programs/spotify-player/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/spotify-player/keymap.toml create mode 100644 third_party/home-manager/tests/modules/programs/spotify-player/settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/spotify-player/theme.toml create mode 100644 third_party/home-manager/tests/modules/programs/tealdeer/custom-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/tealdeer/default-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/tealdeer/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/tofi/basic-configuration.conf create mode 100644 third_party/home-manager/tests/modules/programs/tofi/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/tofi/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/yambar/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/yambar/empty-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/yambar/example-settings-expected.yml create mode 100644 third_party/home-manager/tests/modules/programs/yambar/example-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/yazi/flavor/init.lua create mode 100644 third_party/home-manager/tests/modules/programs/yazi/init.lua create mode 100644 third_party/home-manager/tests/modules/programs/yazi/plugin/init.lua create mode 100644 third_party/home-manager/tests/modules/programs/zk/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/zk/expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/zk/zk.nix create mode 100644 third_party/home-manager/tests/modules/services/activitywatch/basic-setup.nix create mode 100644 third_party/home-manager/tests/modules/services/activitywatch/default.nix create mode 100644 third_party/home-manager/tests/modules/services/activitywatch/empty-server-settings.nix create mode 100644 third_party/home-manager/tests/modules/services/cliphist/cliphist-extra-options.nix create mode 100644 third_party/home-manager/tests/modules/services/conky/basic-configuration.conf create mode 100644 third_party/home-manager/tests/modules/services/conky/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/conky/default.nix create mode 100644 third_party/home-manager/tests/modules/services/darkman/no-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/espanso-darwin/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/espanso-darwin/default.nix create mode 100644 third_party/home-manager/tests/modules/services/espanso-darwin/launchd.plist create mode 100644 third_party/home-manager/tests/modules/services/hypridle/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/hypridle/default.nix create mode 100644 third_party/home-manager/tests/modules/services/hypridle/hypridle.conf create mode 100644 third_party/home-manager/tests/modules/services/hyprpaper/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/hyprpaper/default.nix create mode 100644 third_party/home-manager/tests/modules/services/hyprpaper/hyprpaper.conf create mode 100644 third_party/home-manager/tests/modules/services/imapnotify/imapnotify-config.json create mode 100644 third_party/home-manager/tests/modules/services/kanshi/new-configuration.conf create mode 100644 third_party/home-manager/tests/modules/services/kanshi/new-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/mopidy/mopidy-scan.nix create mode 100644 third_party/home-manager/tests/modules/services/nix-gc-darwin/basic.nix create mode 100644 third_party/home-manager/tests/modules/services/nix-gc-darwin/default.nix create mode 100644 third_party/home-manager/tests/modules/services/nix-gc-darwin/expected-agent.plist create mode 100644 third_party/home-manager/tests/modules/services/nix-gc/basic.nix create mode 100644 third_party/home-manager/tests/modules/services/nix-gc/default.nix create mode 100644 third_party/home-manager/tests/modules/services/nix-gc/expected.service create mode 100644 third_party/home-manager/tests/modules/services/nix-gc/expected.timer create mode 100644 third_party/home-manager/tests/modules/services/remmina/basic-config.nix create mode 100644 third_party/home-manager/tests/modules/services/remmina/default-config.nix create mode 100644 third_party/home-manager/tests/modules/services/remmina/default.nix create mode 100644 third_party/home-manager/tests/modules/services/swaync/default.nix create mode 100644 third_party/home-manager/tests/modules/services/swaync/swaync.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.conf create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/river/configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/river/default.nix create mode 100755 third_party/home-manager/tests/modules/services/window-managers/river/init create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-check-config.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.conf create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.nix create mode 100644 third_party/home-manager/tests/modules/services/wob/default.nix create mode 100644 third_party/home-manager/tests/modules/services/wob/wob-service-expected.ini create mode 100644 third_party/home-manager/tests/modules/services/wob/wob-service-expected.service create mode 100644 third_party/home-manager/tests/modules/services/wob/wob-service-expected.socket create mode 100644 third_party/home-manager/tests/modules/services/wob/wob-service.nix diff --git a/third_party/home-manager/.builds/manual.yml b/third_party/home-manager/.builds/manual.yml index af257412cf..4072e5a4dc 100644 --- a/third_party/home-manager/.builds/manual.yml +++ b/third_party/home-manager/.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/third_party/home-manager/.github/dependabot.yml b/third_party/home-manager/.github/dependabot.yml index 76b9adfa72..6ba7256db5 100644 --- a/third_party/home-manager/.github/dependabot.yml +++ b/third_party/home-manager/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.05" + target-branch: "release-23.11" schedule: interval: "weekly" commit-message: @@ -18,7 +18,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" - target-branch: "release-23.11" + target-branch: "release-24.05" schedule: interval: "weekly" commit-message: diff --git a/third_party/home-manager/.github/labeler.yml b/third_party/home-manager/.github/labeler.yml index b03251e89a..cab1b54387 100644 --- a/third_party/home-manager/.github/labeler.yml +++ b/third_party/home-manager/.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/third_party/home-manager/.github/workflows/github_pages.yml b/third_party/home-manager/.github/workflows/github_pages.yml index 238cb8436d..9f49d49a86 100644 --- a/third_party/home-manager/.github/workflows/github_pages.yml +++ b/third_party/home-manager/.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@v27 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/third_party/home-manager/.github/workflows/labeler.yml b/third_party/home-manager/.github/workflows/labeler.yml index daea610a3a..81585d8597 100644 --- a/third_party/home-manager/.github/workflows/labeler.yml +++ b/third_party/home-manager/.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/third_party/home-manager/.github/workflows/test.yml b/third_party/home-manager/.github/workflows/test.yml index 701a04c8b1..05d04163b5 100644 --- a/third_party/home-manager/.github/workflows/test.yml +++ b/third_party/home-manager/.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@v27 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 @@ -27,4 +23,5 @@ jobs: - run: nix-build --show-trace -A docs.jsonModuleMaintainers - run: ./format -c - 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 diff --git a/third_party/home-manager/.github/workflows/update-flake.yml b/third_party/home-manager/.github/workflows/update-flake.yml index 2f1eb8c658..9df8060df4 100644 --- a/third_party/home-manager/.github/workflows/update-flake.yml +++ b/third_party/home-manager/.github/workflows/update-flake.yml @@ -12,9 +12,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v27 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v20 + uses: DeterminateSystems/update-flake-lock@v22 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies diff --git a/third_party/home-manager/README.md b/third_party/home-manager/README.md index 805d2cfcca..075ccaae8e 100644 --- a/third_party/home-manager/README.md +++ b/third_party/home-manager/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.05`). These branches get fixes, but usually not new modules. If you need a module to be backported, then feel free to open an issue. @@ -49,7 +49,7 @@ dconf store and cannot tell whether a configuration that it is about to be overwritten was from a previous Home Manager generation or from manual configuration. -Home Manager targets [NixOS][] unstable and NixOS version 23.11 (the current +Home Manager targets [NixOS][] unstable and NixOS version 24.05 (the current stable version), it may or may not work on other Linux distributions and NixOS versions. @@ -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/third_party/home-manager/docs/default.nix b/third_party/home-manager/docs/default.nix index ecef00c320..21f00fb48c 100644 --- a/third_party/home-manager/docs/default.nix +++ b/third_party/home-manager/docs/default.nix @@ -7,29 +7,37 @@ let - nmdSrc = fetchTarball { - url = - "https://git.sr.ht/~rycee/nmd/archive/f18defadcc25e69e95b04493ee02682005472255.tar.gz"; - sha256 = "14fazjqbc6sfsxycwadfhcymi37xg5wmrlvg3jb8d4mpbcdwfwz4"; - }; - - 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 { }; }; }]; @@ -47,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 @@ -114,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; @@ -125,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. @@ -155,6 +164,7 @@ in { inherit lib pkgs; check = false; } ++ [ scrubbedPkgsModule ]; + class = "homeManager"; }; in builtins.toJSON result.config.meta.maintainers); } diff --git a/third_party/home-manager/docs/flake.lock b/third_party/home-manager/docs/flake.lock new file mode 100644 index 0000000000..4b53be8111 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/docs/flake.nix b/third_party/home-manager/docs/flake.nix new file mode 100644 index 0000000000..f4aa9567c2 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/docs/highlight-style.css b/third_party/home-manager/docs/highlight-style.css deleted file mode 100644 index 0b360281cc..0000000000 --- a/third_party/home-manager/docs/highlight-style.css +++ /dev/null @@ -1,8 +0,0 @@ -pre { - padding: 0; -} - -pre code.hljs { - border: none; - margin: 0; -} diff --git a/third_party/home-manager/docs/home-manager-manual.nix b/third_party/home-manager/docs/home-manager-manual.nix index 6a14c5099d..34196d4237 100644 --- a/third_party/home-manager/docs/home-manager-manual.nix +++ b/third_party/home-manager/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,21 @@ 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 ${./static/style.css} out/style.css cp -r ${./release-notes} release-notes @@ -43,8 +40,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 \ diff --git a/third_party/home-manager/docs/home-manager.1 b/third_party/home-manager/docs/home-manager.1 index 1747735e11..41406aca0f 100644 --- a/third_party/home-manager/docs/home-manager.1 +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/contributing/guidelines.md b/third_party/home-manager/docs/manual/contributing/guidelines.md index 6094539e64..3493ae5697 100644 --- a/third_party/home-manager/docs/manual/contributing/guidelines.md +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/faq.md b/third_party/home-manager/docs/manual/faq.md index bc50174d57..ea308f7883 100644 --- a/third_party/home-manager/docs/manual/faq.md +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/faq/override-package-module.md b/third_party/home-manager/docs/manual/faq/change-package-module.md similarity index 53% rename from third_party/home-manager/docs/manual/faq/override-package-module.md rename to third_party/home-manager/docs/manual/faq/change-package-module.md index 60b847625c..bcb943bafb 100644 --- a/third_party/home-manager/docs/manual/faq/override-package-module.md +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/installation.md b/third_party/home-manager/docs/manual/installation.md index b663b68806..07b1392d51 100644 --- a/third_party/home-manager/docs/manual/installation.md +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/installation/nix-darwin.md b/third_party/home-manager/docs/manual/installation/nix-darwin.md index afa93e8f94..f102530645 100644 --- a/third_party/home-manager/docs/manual/installation/nix-darwin.md +++ b/third_party/home-manager/docs/manual/installation/nix-darwin.md @@ -15,10 +15,10 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master $ nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.05 channel, you can run ``` shell -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager +$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ nix-channel --update ``` @@ -45,7 +45,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; }; ``` diff --git a/third_party/home-manager/docs/manual/installation/nixos.md b/third_party/home-manager/docs/manual/installation/nixos.md index 18a60e96cf..d432a54be1 100644 --- a/third_party/home-manager/docs/manual/installation/nixos.md +++ b/third_party/home-manager/docs/manual/installation/nixos.md @@ -17,10 +17,10 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m $ sudo nix-channel --update ``` -and if you follow a Nixpkgs version 23.11 channel, you can run +and if you follow a Nixpkgs version 24.05 channel, you can run ``` shell -$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager +$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ sudo nix-channel --update ``` @@ -44,7 +44,7 @@ home-manager.users.eve = { pkgs, ... }: { # The state version is required and should stay at the version you # originally installed. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; }; ``` diff --git a/third_party/home-manager/docs/manual/installation/standalone.md b/third_party/home-manager/docs/manual/installation/standalone.md index 7ca38ef652..4afb7f3477 100644 --- a/third_party/home-manager/docs/manual/installation/standalone.md +++ b/third_party/home-manager/docs/manual/installation/standalone.md @@ -19,10 +19,10 @@ $ nix-channel --update ``` - and if you follow a Nixpkgs version 23.11 channel you can run + and if you follow a Nixpkgs version 24.05 channel you can run ``` shell - $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager + $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager $ nix-channel --update ``` diff --git a/third_party/home-manager/docs/manual/nix-flakes.md b/third_party/home-manager/docs/manual/nix-flakes.md index 9ac5c0cf16..93f71feb86 100644 --- a/third_party/home-manager/docs/manual/nix-flakes.md +++ b/third_party/home-manager/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/third_party/home-manager/docs/manual/nix-flakes/standalone.md b/third_party/home-manager/docs/manual/nix-flakes/standalone.md index 428f29bc5a..fc967f4609 100644 --- a/third_party/home-manager/docs/manual/nix-flakes/standalone.md +++ b/third_party/home-manager/docs/manual/nix-flakes/standalone.md @@ -11,10 +11,10 @@ then to generate and activate a basic configuration run the command $ nix run home-manager/master -- init --switch ``` -For Nixpkgs or NixOS version 23.11 run +For Nixpkgs or NixOS version 24.05 run ``` shell -$ nix run home-manager/release-23.11 -- init --switch +$ nix run home-manager/release-24.05 -- init --switch ``` This will generate a `flake.nix` and a `home.nix` file in @@ -30,7 +30,7 @@ $ # Edit files in ~/.config/home-manager $ nix run home-manager/$branch -- init --switch ``` -Where `$branch` is one of `master` or `release-23.11`. +Where `$branch` is one of `master` or `release-24.05`. After the initial activation has completed successfully then building and activating your flake-based configuration is as simple as @@ -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/third_party/home-manager/docs/manual/usage/configuration.md b/third_party/home-manager/docs/manual/usage/configuration.md index d611ec1857..deb046a6ba 100644 --- a/third_party/home-manager/docs/manual/usage/configuration.md +++ b/third_party/home-manager/docs/manual/usage/configuration.md @@ -20,7 +20,7 @@ A fresh install of Home Manager will generate a minimal # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -65,7 +65,7 @@ follows: # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/third_party/home-manager/docs/release-notes/release-notes.md b/third_party/home-manager/docs/release-notes/release-notes.md index 91fc2ed5d7..dabeba0c9e 100644 --- a/third_party/home-manager/docs/release-notes/release-notes.md +++ b/third_party/home-manager/docs/release-notes/release-notes.md @@ -4,6 +4,7 @@ This section lists the release notes for stable versions of Home Manager and the current unstable version. ```{=include=} chapters +rl-2411.md rl-2405.md rl-2311.md rl-2305.md diff --git a/third_party/home-manager/docs/release-notes/rl-2405.md b/third_party/home-manager/docs/release-notes/rl-2405.md index 6cf2c95742..9bb629f72f 100644 --- a/third_party/home-manager/docs/release-notes/rl-2405.md +++ b/third_party/home-manager/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} @@ -10,10 +9,83 @@ This release has the following notable changes: - The `.release` file in the Home Manager project root has been removed. Please use the `release.json` file instead. +- The {command}`home-manager uninstall` command has been reworked to, + hopefully, be more robust. The new implementation makes use of a new + Boolean configuration option [uninstall](#opt-uninstall) that can + also be used in a pure Nix Flake setup. + + Specifically, if you are using a Flake only installation, then you + can clean up a Home Manager installation by adding + + ``` nix + uninstall = true; + ``` + + to your existing configuration and then build and activate. This + will override any other configuration and cause, for example, the + removal of all managed files. + + Please be very careful when enabling this option since activating + the built configuration will not only remove the managed files but + _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/third_party/home-manager/docs/release-notes/rl-2411.md b/third_party/home-manager/docs/release-notes/rl-2411.md new file mode 100644 index 0000000000..85eae034f9 --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2411.md @@ -0,0 +1,18 @@ +# Release 24.11 {#sec-release-24.11} + +This is the current unstable branch and the information in this section +is therefore not final. + +## Highlights {#sec-release-24.11-highlights} + +This release has the following notable changes: + +- No changes. + +## State Version Changes {#sec-release-24.11-state-version-changes} + +The state version in this release includes the changes below. These +changes are only active if the `home.stateVersion` option is set to +\"24.11\" or later. + +- No changes. diff --git a/third_party/home-manager/docs/static/style.css b/third_party/home-manager/docs/static/style.css new file mode 100644 index 0000000000..6e654ed4a5 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/docs/static/style.scss b/third_party/home-manager/docs/static/style.scss new file mode 100644 index 0000000000..3eb0e631f1 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/docs/static/tomorrow-night.min.css b/third_party/home-manager/docs/static/tomorrow-night.min.css new file mode 100644 index 0000000000..a0b3f625aa --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/docs/static/tomorrow.min.css b/third_party/home-manager/docs/static/tomorrow.min.css new file mode 100644 index 0000000000..5785f6efcc --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/flake.lock b/third_party/home-manager/flake.lock index 6cde8df2e1..865072042d 100644 --- a/third_party/home-manager/flake.lock +++ b/third_party/home-manager/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "type": "github" }, "original": { diff --git a/third_party/home-manager/flake.nix b/third_party/home-manager/flake.nix index 81d2d606b9..3a90f89c0f 100644 --- a/third_party/home-manager/flake.nix +++ b/third_party/home-manager/flake.nix @@ -55,7 +55,7 @@ - 'system' have been removed. Instead use the arguments 'pkgs' and - 'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.html#sec-release-22.11-highlights + 'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.xhtml#sec-release-22.11-highlights ''; throwForRemovedArgs = v: @@ -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/third_party/home-manager/format b/third_party/home-manager/format index ff4b32e476..4f46c7b9ec 100755 --- a/third_party/home-manager/format +++ b/third_party/home-manager/format @@ -26,15 +26,9 @@ done # The excludes are for files touched by open pull requests and we want # to avoid merge conflicts. excludes=( - modules/default.nix modules/files.nix modules/home-environment.nix - modules/lib/default.nix - modules/lib/file-type.nix - modules/misc/news.nix - modules/programs/ssh.nix modules/programs/zsh.nix - tests/default.nix ) exclude_args=() diff --git a/third_party/home-manager/home-manager/home-manager b/third_party/home-manager/home-manager/home-manager index 88b3b142d9..5bf796b476 100644 --- a/third_party/home-manager/home-manager/home-manager +++ b/third_party/home-manager/home-manager/home-manager @@ -11,21 +11,10 @@ export TEXTDOMAINDIR=@OUT@/share/locale # shellcheck disable=1091 source @HOME_MANAGER_LIB@ -function nixProfileList() { - # We attempt to use `--json` first (added in Nix 2.17). Otherwise attempt to - # parse the legacy output format. - { - nix profile list --json 2>/dev/null \ - | jq -r --arg name "$1" '.elements[].storePaths[] | select(endswith($name))' - } || { - nix profile list \ - | { grep "$1\$" || test $? = 1; } \ - | cut -d ' ' -f 4 - } -} - -function removeByName() { - nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG +function errMissingOptArg() { + # translators: For example: "home-manager: missing argument for --cores" + _iError "%s: missing argument for %s" "$0" "$1" >&2 + exit 1 } function setNixProfileCommands() { @@ -33,25 +22,17 @@ function setNixProfileCommands() { || -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then LIST_OUTPATH_CMD="nix profile list" - REMOVE_CMD="removeByName" else LIST_OUTPATH_CMD="nix-env -q --out-path" - REMOVE_CMD="nix-env --uninstall" 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() { @@ -162,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" @@ -179,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 } @@ -213,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 @@ -283,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 @@ -294,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 @@ -361,7 +359,7 @@ $xdgVars # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. + home.stateVersion = "24.05"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. @@ -400,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 # @@ -444,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"; }; }; @@ -590,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 @@ -680,7 +683,7 @@ function doListGens() { # generations to remove. function doRmGenerations() { setHomeManagerPathVariables - setVerboseAndDryRun + setVerboseArg pushd "$HM_PROFILE_DIR" > /dev/null @@ -693,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 @@ -739,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. @@ -774,7 +781,7 @@ function buildNews() { done local readIdsFile - readIdsFile=$(newsReadIdsFile) + readIdsFile="$(newsReadIdsFile)" nix-instantiate \ --no-build-output --strict \ @@ -793,7 +800,7 @@ function doShowNews() { buildNews "$newsNixFile" local readIdsFile - readIdsFile=$(newsReadIdsFile) + readIdsFile="$(newsReadIdsFile)" local news @@ -828,7 +835,6 @@ function doShowNews() { function doUninstall() { setHomeManagerPathVariables - setVerboseAndDryRun setNixProfileCommands _i 'This will remove Home Manager from your system.' @@ -846,30 +852,17 @@ function doUninstall() { y|Y) _i "Switching to empty Home Manager configuration..." HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)" - echo "{ lib, ... }: {" > "$HOME_MANAGER_CONFIG" - echo " home.file = lib.mkForce {};" >> "$HOME_MANAGER_CONFIG" - echo " home.stateVersion = \"18.09\";" >> "$HOME_MANAGER_CONFIG" - echo " manual.manpages.enable = false;" >> "$HOME_MANAGER_CONFIG" - echo "}" >> "$HOME_MANAGER_CONFIG" - doSwitch - $DRY_RUN_CMD $REMOVE_CMD home-manager-path || true - rm "$HOME_MANAGER_CONFIG" - - if [[ -e $HM_DATA_HOME ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG -r "$HM_DATA_HOME" - fi - - if [[ -e $HM_STATE_DIR ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG -r "$HM_STATE_DIR" - fi - - if [[ -e $HM_PROFILE_DIR ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG "$HM_PROFILE_DIR/home-manager"* - fi - - if [[ -e $HM_GCROOT_LEGACY_PATH ]]; then - $DRY_RUN_CMD rm $VERBOSE_ARG "$HM_GCROOT_LEGACY_PATH" - fi + cat > "$HOME_MANAGER_CONFIG" <\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-04-05 11:01+0000\n" +"Last-Translator: Leix b \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.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 "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/third_party/home-manager/home-manager/po/cs.po b/third_party/home-manager/home-manager/po/cs.po index c01cbe518a..2fe4019b3b 100644 --- a/third_party/home-manager/home-manager/po/cs.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/da.po b/third_party/home-manager/home-manager/po/da.po index 70f22ad3d0..b05d5c231e 100644 --- a/third_party/home-manager/home-manager/po/da.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/de.po b/third_party/home-manager/home-manager/po/de.po index ae35be2ec5..dddccb3755 100644 --- a/third_party/home-manager/home-manager/po/de.po +++ b/third_party/home-manager/home-manager/po/de.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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" +" { programs.home-manager.path = \"%s\"; }\n" +"\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/third_party/home-manager/home-manager/po/es.po b/third_party/home-manager/home-manager/po/es.po index c3c20ac3a3..cafc9a0a60 100644 --- a/third_party/home-manager/home-manager/po/es.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/fa.po b/third_party/home-manager/home-manager/po/fa.po index 4e677def37..b3aceeb1a3 100644 --- a/third_party/home-manager/home-manager/po/fa.po +++ b/third_party/home-manager/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: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 "" +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/third_party/home-manager/home-manager/po/fi.po b/third_party/home-manager/home-manager/po/fi.po index 466b6890a2..2ac20911db 100644 --- a/third_party/home-manager/home-manager/po/fi.po +++ b/third_party/home-manager/home-manager/po/fi.po @@ -7,46 +7,53 @@ 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-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" -#: 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 "Konfiguraatiotiedostoa ei löytynyt sijainnista %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 "" +msgstr "Konfiguraatiotiedostoa ei löytynyt. Luo sellainen sijaintiin %s" -#: 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 +74,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 +120,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 +130,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 +142,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/third_party/home-manager/home-manager/po/fr.po b/third_party/home-manager/home-manager/po/fr.po index 6b1df46378..de1c061bf9 100644 --- a/third_party/home-manager/home-manager/po/fr.po +++ b/third_party/home-manager/home-manager/po/fr.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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/third_party/home-manager/home-manager/po/home-manager.pot b/third_party/home-manager/home-manager/po/home-manager.pot index e5937eeccc..2fcdc5a606 100644 --- a/third_party/home-manager/home-manager/po/home-manager.pot +++ b/third_party/home-manager/home-manager/po/home-manager.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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/third_party/home-manager/home-manager/po/id.po b/third_party/home-manager/home-manager/po/id.po index a36e493d8d..2dd2c14d21 100644 --- a/third_party/home-manager/home-manager/po/id.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/is.po b/third_party/home-manager/home-manager/po/is.po new file mode 100644 index 0000000000..8c29d2a246 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/it.po b/third_party/home-manager/home-manager/po/it.po index 266ce46ddd..8ffe648f41 100644 --- a/third_party/home-manager/home-manager/po/it.po +++ b/third_party/home-manager/home-manager/po/it.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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-02-29 10:10+0000\n" +"Last-Translator: FedFer98123 \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.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 "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/third_party/home-manager/home-manager/po/ja.po b/third_party/home-manager/home-manager/po/ja.po index 9236d53f56..5a558d365f 100644 --- a/third_party/home-manager/home-manager/po/ja.po +++ b/third_party/home-manager/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: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" @@ -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/third_party/home-manager/home-manager/po/ko.po b/third_party/home-manager/home-manager/po/ko.po index c68ef7f79a..96eae07120 100644 --- a/third_party/home-manager/home-manager/po/ko.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/lt.po b/third_party/home-manager/home-manager/po/lt.po index 708d8de697..458ac14a78 100644 --- a/third_party/home-manager/home-manager/po/lt.po +++ b/third_party/home-manager/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-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" -#: 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 "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,23 @@ 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 "" #. 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" @@ -74,38 +78,42 @@ msgid "" " $ rm -r \"%s\"" msgstr "" -#: 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 +132,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 +147,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 +168,73 @@ 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 "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:612 #, fuzzy 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 +243,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/third_party/home-manager/home-manager/po/nb_NO.po b/third_party/home-manager/home-manager/po/nb_NO.po index 2fc2c818f4..41f5035c48 100644 --- a/third_party/home-manager/home-manager/po/nb_NO.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/nl.po b/third_party/home-manager/home-manager/po/nl.po index 04a398eaec..9f614ab10a 100644 --- a/third_party/home-manager/home-manager/po/nl.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/pl.po b/third_party/home-manager/home-manager/po/pl.po index 030b88a014..c8fa742f06 100644 --- a/third_party/home-manager/home-manager/po/pl.po +++ b/third_party/home-manager/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-02-16 22:01+0000\n" +"Last-Translator: Robert Helgesson \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.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 "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 "" -#: 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/third_party/home-manager/home-manager/po/pt.po b/third_party/home-manager/home-manager/po/pt.po index 251da89b3a..a5de344bd9 100644 --- a/third_party/home-manager/home-manager/po/pt.po +++ b/third_party/home-manager/home-manager/po/pt.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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/third_party/home-manager/home-manager/po/pt_BR.po b/third_party/home-manager/home-manager/po/pt_BR.po index aa311d80cf..a3075d41e4 100644 --- a/third_party/home-manager/home-manager/po/pt_BR.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/ro.po b/third_party/home-manager/home-manager/po/ro.po index b58a2eb605..bd48a4a833 100644 --- a/third_party/home-manager/home-manager/po/ro.po +++ b/third_party/home-manager/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-03-31 22:01+0000\n" +"Last-Translator: SMFloris \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.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 "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/third_party/home-manager/home-manager/po/ru.po b/third_party/home-manager/home-manager/po/ru.po index 97c4dd0047..5a3f811a3c 100644 --- a/third_party/home-manager/home-manager/po/ru.po +++ b/third_party/home-manager/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-03-31 22:01+0000\n" +"Last-Translator: Petr Portnov | PROgrm_JARvis \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.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 "Не найден файл конфигурации в %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/third_party/home-manager/home-manager/po/sv.po b/third_party/home-manager/home-manager/po/sv.po index 5d7d65bac9..15930e49f8 100644 --- a/third_party/home-manager/home-manager/po/sv.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/th.po b/third_party/home-manager/home-manager/po/th.po index 0e7e7f4436..174b1c0a8a 100644 --- a/third_party/home-manager/home-manager/po/th.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/tr.po b/third_party/home-manager/home-manager/po/tr.po index ef686c7e48..66c89e608f 100644 --- a/third_party/home-manager/home-manager/po/tr.po +++ b/third_party/home-manager/home-manager/po/tr.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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:174 +#: home-manager/home-manager:146 +msgid "Sanity checking Nix" +msgstr "Nix denetleniyor" + +#: 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/third_party/home-manager/home-manager/po/uk.po b/third_party/home-manager/home-manager/po/uk.po index fd3d88a976..55aa12de07 100644 --- a/third_party/home-manager/home-manager/po/uk.po +++ b/third_party/home-manager/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-02-18 14:02+0000\n" +"Last-Translator: Сергій \n" "Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 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.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" @@ -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/third_party/home-manager/home-manager/po/vi.po b/third_party/home-manager/home-manager/po/vi.po new file mode 100644 index 0000000000..85baac38bc --- /dev/null +++ b/third_party/home-manager/home-manager/po/vi.po @@ -0,0 +1,251 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2024-04-17 23:19+0200\n" +"PO-Revision-Date: 2024-06-02 08:12+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.6-dev\n" + +#. translators: For example: "home-manager: missing argument for --cores" +#: home-manager/home-manager:16 +msgid "%s: missing argument for %s" +msgstr "%s: 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] "" +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 "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 "" + +#: 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 "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/home-manager:1091 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: 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/third_party/home-manager/home-manager/po/zh_Hans.po b/third_party/home-manager/home-manager/po/zh_Hans.po index 8aaee206cd..6e773fcab6 100644 --- a/third_party/home-manager/home-manager/po/zh_Hans.po +++ b/third_party/home-manager/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/third_party/home-manager/home-manager/po/zh_Hant.po b/third_party/home-manager/home-manager/po/zh_Hant.po index 6562e19569..c3b9336d75 100644 --- a/third_party/home-manager/home-manager/po/zh_Hant.po +++ b/third_party/home-manager/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/third_party/home-manager/lib/bash/home-manager.sh b/third_party/home-manager/lib/bash/home-manager.sh index b7f3f42b28..2b9c2d01e6 100644 --- a/third_party/home-manager/lib/bash/home-manager.sh +++ b/third_party/home-manager/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/third_party/home-manager/modules/accounts/calendar.nix b/third_party/home-manager/modules/accounts/calendar.nix index e96f2f2dd7..bfbc3e124f 100644 --- a/third_party/home-manager/modules/accounts/calendar.nix +++ b/third_party/home-manager/modules/accounts/calendar.nix @@ -18,12 +18,13 @@ let 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 +58,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 +90,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 +99,8 @@ let }; local = mkOption { - type = types.nullOr (localModule name); - default = null; + type = localModule name; + default = { }; description = '' Local configuration for the calendar. ''; @@ -129,6 +122,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/third_party/home-manager/modules/accounts/contacts.nix b/third_party/home-manager/modules/accounts/contacts.nix index 83f57d8e24..272594b189 100644 --- a/third_party/home-manager/modules/accounts/contacts.nix +++ b/third_party/home-manager/modules/accounts/contacts.nix @@ -126,6 +126,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/third_party/home-manager/modules/accounts/email.nix b/third_party/home-manager/modules/accounts/email.nix index 8657c4cbd3..f3996195d2 100644 --- a/third_party/home-manager/modules/accounts/email.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/default.nix b/third_party/home-manager/modules/default.nix index 02be152fdd..6c54148abd 100644 --- a/third_party/home-manager/modules/default.nix +++ b/third_party/home-manager/modules/default.nix @@ -1,12 +1,9 @@ -{ configuration -, pkgs -, lib ? pkgs.lib +{ configuration, pkgs, lib ? pkgs.lib # Whether to check that each option has a matching declaration. , check ? true # Extra arguments passed to specialArgs. -, extraSpecialArgs ? { } -}: +, extraSpecialArgs ? { } }: with lib; @@ -16,51 +13,50 @@ let map (x: x.message) (filter (x: !x.assertion) cfg.assertions); showWarnings = res: - let - f = w: x: builtins.trace "warning: ${w}" x; - in - fold f res res.config.warnings; + let f = w: x: builtins.trace "warning: ${w}" x; + in fold f res res.config.warnings; extendedLib = import ./lib/stdlib-extended.nix lib; - hmModules = - import ./modules.nix { - inherit check pkgs; - lib = extendedLib; - }; + hmModules = import ./modules.nix { + inherit check pkgs; + lib = extendedLib; + }; rawModule = extendedLib.evalModules { modules = [ configuration ] ++ hmModules; - specialArgs = { - modulesPath = builtins.toString ./.; - } // extraSpecialArgs; + class = "homeManager"; + specialArgs = { modulesPath = builtins.toString ./.; } // extraSpecialArgs; }; - module = showWarnings ( - let - failed = collectFailed rawModule.config; + moduleChecks = raw: + showWarnings (let + failed = collectFailed raw.config; failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed); - in - if failed == [] - then rawModule - else throw "\nFailed assertions:\n${failedStr}" - ); + in if failed == [ ] then + raw + else + throw '' -in + Failed assertions: + ${failedStr}''); -{ - 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/third_party/home-manager/modules/files.nix b/third_party/home-manager/modules/files.nix index c869df1d86..59e9c25783 100644 --- a/third_party/home-manager/modules/files.nix +++ b/third_party/home-manager/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} + storeDir = escapeShellArg builtins.storeDir; - # 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/*" + check = pkgs.substituteAll { + src = ./files/check-link-targets.sh; - 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 - $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 - - 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/third_party/home-manager/modules/files/check-link-targets.sh b/third_party/home-manager/modules/files/check-link-targets.sh new file mode 100644 index 0000000000..215ff6c370 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/home-environment.nix b/third_party/home-manager/modules/home-environment.nix index e4b2ebbee5..59497ec4a9 100644 --- a/third_party/home-manager/modules/home-environment.nix +++ b/third_party/home-manager/modules/home-environment.nix @@ -374,7 +374,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 +396,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 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: - 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. + {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. ''; }; @@ -459,6 +473,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 = { @@ -585,46 +605,16 @@ in if config.submoduleSupport.externalPackageInstall then '' - # We don't use `cfg.profileDirectory` here because it defaults to - # `/etc/profiles/per-user/` which is constructed by NixOS or - # nix-darwin and won't require uninstalling `home-manager-path`. - if [[ -e $HOME/.nix-profile/manifest.json \ - || -e "''${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json" ]] ; then - nix profile list \ - | { grep 'home-manager-path$' || test $? = 1; } \ - | cut -d ' ' -f 4 \ - | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG - else - if nix-env -q | grep '^home-manager-path$'; then - $DRY_RUN_CMD nix-env -e home-manager-path - fi - fi + nixProfileRemove home-manager-path '' else '' - function nixProfileList() { - # We attempt to use `--json` first (added in Nix 2.17). Otherwise attempt to - # parse the legacy output format. - { - nix profile list --json 2>/dev/null \ - | jq -r --arg name "$1" '.elements[].storePaths[] | select(endswith($name))' - } || { - nix profile list \ - | { grep "$1\$" || test $? = 1; } \ - | cut -d ' ' -f 4 - } - } - - function nixRemoveProfileByName() { - nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG - } - function nixReplaceProfile() { local oldNix="$(command -v nix)" - nixRemoveProfileByName 'home-manager-path' + nixProfileRemove 'home-manager-path' - $DRY_RUN_CMD $oldNix profile install $1 + run $oldNix profile install $1 } if [[ -e ${cfg.profileDirectory}/manifest.json ]] ; then @@ -634,7 +624,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 @@ -644,7 +634,7 @@ in _iError $'Oops, Nix failed to install your new Home Manager profile!\n\nPerhaps there is a conflict with a package that was installed using\n"%s"? Try running\n\n %s\n\nand if there is a conflicting package you can remove it with\n\n %s\n\nThen try activating your Home Manager configuration again.' "$INSTALL_CMD" "$LIST_CMD" "$REMOVE_CMD_SYNTAX" exit 1 fi - unset -f nixProfileList nixRemoveProfileByName nixReplaceProfile + unset -f nixReplaceProfile unset INSTALL_CMD INSTALL_CMD_ACTUAL LIST_CMD REMOVE_CMD_SYNTAX '' ); diff --git a/third_party/home-manager/modules/i18n/input-method/fcitx5.nix b/third_party/home-manager/modules/i18n/input-method/fcitx5.nix index 3599fd2dc8..3c2d1c191b 100644 --- a/third_party/home-manager/modules/i18n/input-method/fcitx5.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/i18n/input-method/kime.nix b/third_party/home-manager/modules/i18n/input-method/kime.nix index 5608b54e43..0416515f64 100644 --- a/third_party/home-manager/modules/i18n/input-method/kime.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/launchd/default.nix b/third_party/home-manager/modules/launchd/default.nix index 90e5360de1..6a9c44efd7 100644 --- a/third_party/home-manager/modules/launchd/default.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/lib-bash/activation-init.sh b/third_party/home-manager/modules/lib-bash/activation-init.sh index 881b63a8f5..91111e5d0d 100755 --- a/third_party/home-manager/modules/lib-bash/activation-init.sh +++ b/third_party/home-manager/modules/lib-bash/activation-init.sh @@ -34,7 +34,8 @@ function migrateProfile() { function setupVars() { declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}" declare -r userNixStateDir="$stateHome/nix" - declare -r hmGcrootsDir="$stateHome/home-manager/gcroots" + declare -gr hmStatePath="$stateHome/home-manager" + declare -r hmGcrootsDir="$hmStatePath/gcroots" declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}" declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER" @@ -55,6 +56,7 @@ function setupVars() { exit 1 fi + declare -gr hmDataPath="${XDG_DATA_HOME:-$HOME/.local/share}/home-manager" declare -gr genProfilePath="$profilesDir/home-manager" declare -gr newGenPath="@GENERATION_DIR@"; declare -gr newGenGcPath="$hmGcrootsDir/current-home" @@ -78,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!' \ @@ -88,6 +90,36 @@ function setupVars() { fi } +# Helper used to list content of a `nix profile` profile. +function nixProfileList() { + # We attempt to use `--json` first (added in Nix 2.17). Otherwise attempt to + # parse the legacy output format. + { + nix profile list --json 2>/dev/null \ + | jq -r --arg name "$1" '.elements[].storePaths[] | select(endswith($name))' + } || { + nix profile list \ + | { grep "$1\$" || test $? = 1; } \ + | cut -d ' ' -f 4 + } +} + +# Helper used to remove a package from a Nix profile. Supports both `nix-env` +# and `nix profile`. +function nixProfileRemove() { + # We don't use `cfg.profileDirectory` here because it defaults to + # `/etc/profiles/per-user/` which is constructed by NixOS or + # nix-darwin and won't require uninstalling `home-manager-path`. + if [[ -e $HOME/.nix-profile/manifest.json \ + || -e ${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile/manifest.json ]] ; then + nixProfileList "$1" | xargs -rt $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + else + if nix-env -q | grep -q "^$1$"; then + run --quiet nix-env -e "$1" + fi + fi +} + function checkUsername() { local expectedUser="$1" @@ -106,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" @@ -120,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 @@ -129,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 @@ -143,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/third_party/home-manager/modules/lib/file-type.nix b/third_party/home-manager/modules/lib/file-type.nix index cd3a3a627f..3fb51fd56e 100644 --- a/third_party/home-manager/modules/lib/file-type.nix +++ b/third_party/home-manager/modules/lib/file-type.nix @@ -1,9 +1,9 @@ { homeDirectory, lib, pkgs }: let - inherit (lib) hasPrefix hm literalExpression mkDefault mkIf mkOption removePrefix types; -in -{ + inherit (lib) + hasPrefix hm literalExpression mkDefault mkIf mkOption removePrefix types; +in { # Constructs a type suitable for a `home.file` like option. The # target path may be either absolute or relative, in which case it # is relative the `basePath` argument (which itself must be an @@ -13,8 +13,8 @@ in # - opt the name of the option, for self-references # - basePathDesc docbook compatible description of the base path # - basePath the file base path - fileType = opt: basePathDesc: basePath: types.attrsOf (types.submodule ( - { name, config, ... }: { + fileType = opt: basePathDesc: basePath: + types.attrsOf (types.submodule ({ name, config, ... }: { options = { enable = mkOption { type = types.bool; @@ -27,10 +27,8 @@ in target = mkOption { type = types.str; apply = p: - let - absPath = if hasPrefix "/" p then p else "${basePath}/${p}"; - in - removePrefix (homeDirectory + "/") absPath; + let absPath = if hasPrefix "/" p then p else "${basePath}/${p}"; + in removePrefix (homeDirectory + "/") absPath; defaultText = literalExpression "name"; description = '' Path to target file relative to ${basePathDesc}. @@ -113,14 +111,11 @@ in config = { target = mkDefault name; - source = mkIf (config.text != null) ( - mkDefault (pkgs.writeTextFile { - inherit (config) text; - executable = config.executable == true; # can be null - name = hm.strings.storeFileName name; - }) - ); + source = mkIf (config.text != null) (mkDefault (pkgs.writeTextFile { + inherit (config) text; + executable = config.executable == true; # can be null + name = hm.strings.storeFileName name; + })); }; - } - )); + })); } diff --git a/third_party/home-manager/modules/lib/generators.nix b/third_party/home-manager/modules/lib/generators.nix index 98a03ba210..2aebd92c99 100644 --- a/third_party/home-manager/modules/lib/generators.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/lib/maintainers.nix b/third_party/home-manager/modules/lib/maintainers.nix index e75541d932..b5175a8751 100644 --- a/third_party/home-manager/modules/lib/maintainers.nix +++ b/third_party/home-manager/modules/lib/maintainers.nix @@ -7,6 +7,18 @@ # [1] https://github.com/NixOS/nixpkgs/blob/fca0d6e093c82b31103dc0dacc48da2a9b06e24b/maintainers/maintainer-list.nix#LC1 { + 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"; @@ -55,6 +67,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 +89,30 @@ 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; + }; jkarlson = { email = "jekarlson@gmail.com"; github = "jkarlson"; @@ -89,6 +125,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 +155,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"; @@ -159,6 +207,12 @@ 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"; @@ -199,6 +253,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 +277,11 @@ githubId = 33058747; name = "Gaetan Lepage"; }; + genericnerdyusername = { + email = "genericnerdyusername@proton.me"; + github = "genericnerdyusername"; + githubId = 111183546; + }; maximsmol = { email = "maximsmol@gmail.com"; github = "maximsmol"; @@ -477,4 +542,16 @@ github = "9p4"; githubId = 17993169; }; + britter = { + name = "Benedikt Ritter"; + email = "beneritter@gmail.com"; + github = "britter"; + githubId = 1327662; + }; + zorrobert = { + name = "zorrobert"; + email = "zorrobert@mailbox.org"; + github = "zorrobert"; + githubId = 118135271; + }; } diff --git a/third_party/home-manager/modules/manual.nix b/third_party/home-manager/modules/manual.nix index 84ec7eda0e..23963c3c04 100644 --- a/third_party/home-manager/modules/manual.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/misc/dconf.nix b/third_party/home-manager/modules/misc/dconf.nix index 24e02a1299..b4863a1390 100644 --- a/third_party/home-manager/modules/misc/dconf.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/misc/fontconfig.nix b/third_party/home-manager/modules/misc/fontconfig.nix index 49fef96a98..9bc6ac47b3 100644 --- a/third_party/home-manager/modules/misc/fontconfig.nix +++ b/third_party/home-manager/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,27 +119,53 @@ in { fi ''; - xdg.configFile = { - "fontconfig/conf.d/10-hm-fonts.conf".text = '' + xdg.configFile = let + mkFontconfigConf = conf: '' - Add fonts in the Nix user profile - - ${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/fontconfig/cache + ${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}/lib/X11/fonts + ${config.home.path}/share/fonts + ${profileDirectory}/lib/X11/fonts + ${profileDirectory}/share/fonts + + ${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/third_party/home-manager/modules/misc/news.nix b/third_party/home-manager/modules/misc/news.nix index 4e0f08a753..2164d66a5b 100644 --- a/third_party/home-manager/modules/misc/news.nix +++ b/third_party/home-manager/modules/misc/news.nix @@ -42,14 +42,10 @@ let }; }; - config = { - id = mkDefault (builtins.hashString "sha256" config.message); - }; + config = { id = mkDefault (builtins.hashString "sha256" config.message); }; }); -in - -{ +in { meta.maintainers = [ maintainers.rycee ]; options = { @@ -97,9 +93,8 @@ in }; config = { - news.json.output = pkgs.writeText "hm-news.json" (builtins.toJSON { - inherit (cfg) display entries; - }); + news.json.output = pkgs.writeText "hm-news.json" + (builtins.toJSON { inherit (cfg) display entries; }); # Add news entries in chronological order (i.e., latest time # should be at the bottom of the list). The time should be @@ -255,7 +250,8 @@ in { time = "2021-09-23T17:04:48+00:00"; - condition = hostPlatform.isLinux && config.services.screen-locker.enable; + condition = hostPlatform.isLinux + && config.services.screen-locker.enable; message = '' 'xautolock' is now optional in 'services.screen-locker', and the 'services.screen-locker' options have been reorganized for clarity. @@ -1387,6 +1383,279 @@ 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. + ''; + } ]; }; } diff --git a/third_party/home-manager/modules/misc/nix.nix b/third_party/home-manager/modules/misc/nix.nix index 9e24914366..a4456946e5 100644 --- a/third_party/home-manager/modules/misc/nix.nix +++ b/third_party/home-manager/modules/misc/nix.nix @@ -52,22 +52,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; diff --git a/third_party/home-manager/modules/misc/qt.nix b/third_party/home-manager/modules/misc/qt.nix index f02bc186e8..a36bd56737 100644 --- a/third_party/home-manager/modules/misc/qt.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/misc/qt/kconfig.nix b/third_party/home-manager/modules/misc/qt/kconfig.nix new file mode 100644 index 0000000000..f7c35573b9 --- /dev/null +++ b/third_party/home-manager/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}`kwriteconfig5`. + + The example value would cause the following command to run in the + activation script: + + ``` shell + kwriteconfig5 --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 test -f '${configHome}/${file}' && run ${pkgs.libsForQt5.kconfig}/bin/kwriteconfig5 --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.libsForQt5.qttools.bin}/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/third_party/home-manager/modules/misc/uninstall.nix b/third_party/home-manager/modules/misc/uninstall.nix new file mode 100644 index 0000000000..b34732b0b9 --- /dev/null +++ b/third_party/home-manager/modules/misc/uninstall.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib) mkIf mkOption types; + +in { + options.uninstall = mkOption { + type = types.bool; + default = false; + description = '' + Whether to set up a minimal configuration that will remove all managed + files and packages. + + Use this with extreme care since running the generated activation script + will remove all Home Manager state from your user environment. This + includes removing all your historic Home Manager generations. + ''; + }; + + config = mkIf config.uninstall { + home.packages = lib.mkForce [ ]; + home.file = lib.mkForce { }; + home.stateVersion = lib.mkForce "24.05"; + home.enableNixpkgsReleaseCheck = lib.mkForce false; + manual.manpages.enable = lib.mkForce false; + news.display = lib.mkForce "silent"; + + home.activation.uninstall = + lib.hm.dag.entryAfter [ "installPackages" "linkGeneration" ] '' + nixProfileRemove home-manager-path + + if [[ -e $hmDataPath ]]; then + run rm $VERBOSE_ARG -r "$hmDataPath" + fi + + if [[ -e $hmStatePath ]]; then + run rm $VERBOSE_ARG -r "$hmStatePath" + fi + + if [[ -e $genProfilePath ]]; then + run rm $VERBOSE_ARG "$genProfilePath"* + fi + + if [[ -e $legacyGenGcPath ]]; then + run rm $VERBOSE_ARG "$legacyGenGcPath" + fi + ''; + }; +} diff --git a/third_party/home-manager/modules/misc/version.nix b/third_party/home-manager/modules/misc/version.nix index 048f784abc..d068a38692 100644 --- a/third_party/home-manager/modules/misc/version.nix +++ b/third_party/home-manager/modules/misc/version.nix @@ -21,6 +21,7 @@ in { "23.05" "23.11" "24.05" + "24.11" ]; description = '' It is occasionally necessary for Home Manager to change diff --git a/third_party/home-manager/modules/misc/xdg-portal.nix b/third_party/home-manager/modules/misc/xdg-portal.nix index 500e02e008..b863b23ec6 100644 --- a/third_party/home-manager/modules/misc/xdg-portal.nix +++ b/third_party/home-manager/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.sessionVariables = { + 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"; - }; - }; + 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/third_party/home-manager/modules/misc/xdg-user-dirs.nix b/third_party/home-manager/modules/misc/xdg-user-dirs.nix index fcc0742cd1..1198ea039c 100644 --- a/third_party/home-manager/modules/misc/xdg-user-dirs.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/misc/xfconf.nix b/third_party/home-manager/modules/misc/xfconf.nix index ec0cd82d03..0870400856 100644 --- a/third_party/home-manager/modules/misc/xfconf.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/modules.nix b/third_party/home-manager/modules/modules.nix index 16b7837bf9..4e1f0e201a 100644 --- a/third_party/home-manager/modules/modules.nix +++ b/third_party/home-manager/modules/modules.nix @@ -34,9 +34,11 @@ let ./misc/numlock.nix ./misc/pam.nix ./misc/qt.nix + ./misc/qt/kconfig.nix ./misc/specialisation.nix ./misc/submodule-support.nix ./misc/tmpfiles.nix + ./misc/uninstall.nix ./misc/version.nix ./misc/vte.nix ./misc/xdg-desktop-entries.nix @@ -71,6 +73,7 @@ let ./programs/broot.nix ./programs/browserpass.nix ./programs/btop.nix + ./programs/bun.nix ./programs/carapace.nix ./programs/cava.nix ./programs/chromium.nix @@ -84,10 +87,13 @@ 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/foot.nix + ./programs/freetube.nix ./programs/fuzzel.nix ./programs/fzf.nix ./programs/gallery-dl.nix @@ -98,6 +104,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 @@ -111,6 +118,7 @@ let ./programs/hstr.nix ./programs/htop.nix ./programs/hyfetch.nix + ./programs/hyprlock.nix ./programs/i3blocks.nix ./programs/i3status-rust.nix ./programs/i3status.nix @@ -119,9 +127,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 @@ -146,6 +156,7 @@ let ./programs/mcfly.nix ./programs/mercurial.nix ./programs/micro.nix + ./programs/mise.nix ./programs/mpv.nix ./programs/mr.nix ./programs/msmtp.nix @@ -179,6 +190,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 @@ -186,6 +198,7 @@ let ./programs/pylint.nix ./programs/qcal.nix ./programs/qutebrowser.nix + ./programs/ranger.nix ./programs/rbw.nix ./programs/readline.nix ./programs/rio.nix @@ -193,7 +206,6 @@ let ./programs/rofi-pass.nix ./programs/rofi.nix ./programs/rtorrent.nix - ./programs/rtx.nix ./programs/ruff.nix ./programs/sagemath.nix ./programs/sapling.nix @@ -205,6 +217,7 @@ let ./programs/sioyek.nix ./programs/skim.nix ./programs/sm64ex.nix + ./programs/spotify-player.nix ./programs/sqls.nix ./programs/ssh.nix ./programs/starship.nix @@ -222,6 +235,7 @@ let ./programs/tiny.nix ./programs/tmate.nix ./programs/tmux.nix + ./programs/tofi.nix ./programs/topgrade.nix ./programs/translate-shell.nix ./programs/urxvt.nix @@ -240,16 +254,21 @@ 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/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 @@ -264,6 +283,7 @@ let ./services/clipman.nix ./services/clipmenu.nix ./services/comodoro.nix + ./services/conky.nix ./services/copyq.nix ./services/darkman.nix ./services/devilspie2.nix @@ -286,11 +306,12 @@ let ./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 @@ -308,6 +329,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 @@ -323,12 +345,14 @@ let ./services/plex-mpv-shim.nix ./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 @@ -339,6 +363,7 @@ let ./services/stalonetray.nix ./services/status-notifier-watcher.nix ./services/swayidle.nix + ./services/swaync.nix ./services/swayosd.nix ./services/sxhkd.nix ./services/syncthing.nix @@ -361,9 +386,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 @@ -382,6 +409,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/third_party/home-manager/modules/po/ca.po b/third_party/home-manager/modules/po/ca.po index 698b38d43d..5f94ebb76d 100644 --- a/third_party/home-manager/modules/po/ca.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/da.po b/third_party/home-manager/modules/po/da.po index 548f1407b0..acb4666228 100644 --- a/third_party/home-manager/modules/po/da.po +++ b/third_party/home-manager/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" "Language-Team: German \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/third_party/home-manager/modules/po/fi.po b/third_party/home-manager/modules/po/fi.po index 887c0016ce..c16c308077 100644 --- a/third_party/home-manager/modules/po/fi.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/fr.po b/third_party/home-manager/modules/po/fr.po index 539d9cc5e5..ca50783dc7 100644 --- a/third_party/home-manager/modules/po/fr.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/hm-modules.pot b/third_party/home-manager/modules/po/hm-modules.pot index 3530936d0e..7a33a805a2 100644 --- a/third_party/home-manager/modules/po/hm-modules.pot +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/id.po b/third_party/home-manager/modules/po/id.po index 430822963c..78db0232ce 100644 --- a/third_party/home-manager/modules/po/id.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/it.po b/third_party/home-manager/modules/po/it.po index 086d835ba2..c39d349557 100644 --- a/third_party/home-manager/modules/po/it.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/nb_NO.po b/third_party/home-manager/modules/po/nb_NO.po index 189731bd9c..b3754af0f4 100644 --- a/third_party/home-manager/modules/po/nb_NO.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/nl.po b/third_party/home-manager/modules/po/nl.po index 3325b7fba3..418594aa14 100644 --- a/third_party/home-manager/modules/po/nl.po +++ b/third_party/home-manager/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" "Language-Team: Polish =20) ? 1 : 2;\n" "X-Generator: Weblate 4.18-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,34 @@ 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 "" -#: 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 "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/third_party/home-manager/modules/po/pt.po b/third_party/home-manager/modules/po/pt.po index 9fb5bb415d..9bd5144a81 100644 --- a/third_party/home-manager/modules/po/pt.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/pt_BR.po b/third_party/home-manager/modules/po/pt_BR.po index c4858b2056..83d01927c0 100644 --- a/third_party/home-manager/modules/po/pt_BR.po +++ b/third_party/home-manager/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/third_party/home-manager/modules/po/ro.po b/third_party/home-manager/modules/po/ro.po index 98bd13a808..d817496a79 100644 --- a/third_party/home-manager/modules/po/ro.po +++ b/third_party/home-manager/modules/po/ro.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-08-11 19:51+0000\n" "Last-Translator: HeartBlin913861820c094e37 \n" "Language-Team: Romanian \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/third_party/home-manager/modules/po/sv.po b/third_party/home-manager/modules/po/sv.po index f42ebeb42a..266a84d8d8 100644 --- a/third_party/home-manager/modules/po/sv.po +++ b/third_party/home-manager/modules/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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/third_party/home-manager/modules/po/vi.po b/third_party/home-manager/modules/po/vi.po new file mode 100644 index 0000000000..09b510df83 --- /dev/null +++ b/third_party/home-manager/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-06-02 08:12+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.6-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 "" + +#: 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 "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 "" + +#: 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 "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/third_party/home-manager/modules/po/zh_Hans.po b/third_party/home-manager/modules/po/zh_Hans.po index bf5c1c45a8..970dde4aff 100644 --- a/third_party/home-manager/modules/po/zh_Hans.po +++ b/third_party/home-manager/modules/po/zh_Hans.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2023-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) + 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/third_party/home-manager/modules/programs/direnv.nix b/third_party/home-manager/modules/programs/direnv.nix index fcbc46346c..add2c8fca8 100644 --- a/third_party/home-manager/modules/programs/direnv.nix +++ b/third_party/home-manager/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 ]; options.programs.direnv = { enable = mkEnableOption "direnv, the environment switcher"; @@ -104,11 +104,12 @@ 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; }; programs.bash.initExtra = mkIf cfg.enableBashIntegration ( # Using mkAfter to make it more likely to appear after other diff --git a/third_party/home-manager/modules/programs/emacs.nix b/third_party/home-manager/modules/programs/emacs.nix index 7f573c79fd..d63721494d 100644 --- a/third_party/home-manager/modules/programs/emacs.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/eza.nix b/third_party/home-manager/modules/programs/eza.nix index 0c6c5d7e5b..7e002a12ea 100644 --- a/third_party/home-manager/modules/programs/eza.nix +++ b/third_party/home-manager/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; @@ -49,9 +73,9 @@ with lib; args = escapeShellArgs (optional cfg.icons "--icons" ++ 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"; @@ -61,14 +85,19 @@ with lib; in mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.shellAliases = aliases; + programs.bash.shellAliases = optionsAlias + // optionalAttrs cfg.enableBashIntegration aliases; - programs.zsh.shellAliases = aliases; + programs.zsh.shellAliases = optionsAlias + // optionalAttrs cfg.enableZshIntegration aliases; - programs.fish.shellAliases = aliases; + programs.fish.shellAliases = optionsAlias + // 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/third_party/home-manager/modules/programs/fastfetch.nix b/third_party/home-manager/modules/programs/fastfetch.nix new file mode 100644 index 0000000000..32021611d0 --- /dev/null +++ b/third_party/home-manager/modules/programs/fastfetch.nix @@ -0,0 +1,65 @@ +{ 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 = { + 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/third_party/home-manager/modules/programs/fd.nix b/third_party/home-manager/modules/programs/fd.nix new file mode 100644 index 0000000000..f8f59eb544 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/firefox.nix b/third_party/home-manager/modules/programs/firefox.nix index 145a0334ed..1370d4c28f 100644 --- a/third_party/home-manager/modules/programs/firefox.nix +++ b/third_party/home-manager/modules/programs/firefox.nix @@ -21,6 +21,23 @@ let profilesPath = if isDarwin then "${firefoxConfigPath}/Profiles" else firefoxConfigPath; + nativeMessagingHostsPath = if isDarwin then + "${mozillaConfigPath}/NativeMessagingHosts" + else + "${mozillaConfigPath}/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 Firefox actually) + cfg.finalPackage + ] + # Link user configured native messaging hosts + ++ cfg.nativeMessagingHosts; + }; + # The extensions path shared by all profiles; will not be supported # by future Firefox versions. extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; @@ -73,7 +90,24 @@ let version = 4; lastUserContextId = elemAt (mapAttrsToList (_: container: container.id) containers) 0; - identities = mapAttrsToList containerToIdentity 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; + } + ]; }} ''; @@ -172,7 +206,7 @@ let else if versionAtLeast config.home.stateVersion "19.09" then package.override (old: { cfg = old.cfg or { } // fcfg; - extraPolicies = cfg.policies; + extraPolicies = (old.extraPolicies or { }) // cfg.policies; }) else (pkgs.wrapFirefox.override { config = bcfg; }) package { }; @@ -228,6 +262,15 @@ in { ''; }; + nativeMessagingHosts = mkOption { + type = types.listOf types.package; + default = [ ]; + description = '' + Additional packages containing native messaging hosts that should be + made available to Firefox extensions. + ''; + }; + finalPackage = mkOption { type = with types; nullOr package; readOnly = true; @@ -416,7 +459,7 @@ in { { name = "wiki"; tags = [ "wiki" "nix" ]; - url = "https://nixos.wiki/"; + url = "https://wiki.nixos.org/"; } ]; } @@ -502,8 +545,8 @@ in { }; "NixOS Wiki" = { - urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; - iconUpdateURL = "https://nixos.wiki/favicon.png"; + 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" ]; }; @@ -530,6 +573,17 @@ in { }; }; + 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 = { @@ -629,6 +683,11 @@ in { Note that it is necessary to manually enable these extensions inside Firefox after the first installation. + + To automatically enable extensions add + `"extensions.autoDisableScopes" = 0;` + to + [{option}`programs.firefox.profiles..settings`](#opt-programs.firefox.profiles._name_.settings) ''; }; @@ -663,6 +722,20 @@ in { (", 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)"; + }) + (mkNoDuplicateAssertion cfg.profiles "profile") ] ++ (mapAttrsToList (_: profile: mkNoDuplicateAssertion profile.containers "container") @@ -682,6 +755,12 @@ in { home.file = mkMerge ([{ "${firefoxConfigPath}/profiles.ini" = mkIf (cfg.profiles != { }) { text = profilesIni; }; + + "${nativeMessagingHostsPath}" = { + source = + "${nativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts"; + recursive = true; + }; }] ++ flip mapAttrsToList cfg.profiles (_: profile: { "${profilesPath}/${profile.path}/.keep".text = ""; @@ -699,6 +778,7 @@ in { "${profilesPath}/${profile.path}/containers.json" = mkIf (profile.containers != { }) { + force = profile.containersForce; text = mkContainersJson profile.containers; }; diff --git a/third_party/home-manager/modules/programs/fish.nix b/third_party/home-manager/modules/programs/fish.nix index 7df9704d0e..fc11e51241 100644 --- a/third_party/home-manager/modules/programs/fish.nix +++ b/third_party/home-manager/modules/programs/fish.nix @@ -314,6 +314,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 { @@ -450,14 +459,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 +478,8 @@ in { ${cfg.interactiveShellInit} end + + ${cfg.shellInitLast} ''; } { diff --git a/third_party/home-manager/modules/programs/freetube.nix b/third_party/home-manager/modules/programs/freetube.nix new file mode 100644 index 0000000000..77700fe555 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/fzf.nix b/third_party/home-manager/modules/programs/fzf.nix index 062df18645..31df95de63 100644 --- a/third_party/home-manager/modules/programs/fzf.nix +++ b/third_party/home-manager/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.zsh.initExtra = + mkIf cfg.enableZshIntegration (mkOrder 200 zshIntegration); - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration - (mkOrder 200 '' - source ${cfg.package}/share/fzf/key-bindings.fish && fzf_key_bindings - ''); + programs.fish.interactiveShellInit = + mkIf cfg.enableFishIntegration (mkOrder 200 fishIntegration); }; } diff --git a/third_party/home-manager/modules/programs/gallery-dl.nix b/third_party/home-manager/modules/programs/gallery-dl.nix index accad55fb8..4f566e18bd 100644 --- a/third_party/home-manager/modules/programs/gallery-dl.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/gh.nix b/third_party/home-manager/modules/programs/gh.nix index bdd939deee..03e8feab53 100644 --- a/third_party/home-manager/modules/programs/gh.nix +++ b/third_party/home-manager/modules/programs/gh.nix @@ -104,7 +104,7 @@ in { hosts = mkOption { type = types.listOf types.str; - default = [ "https://github.com" ]; + default = [ "https://github.com" "https://gist.github.com" ]; description = "GitHub hosts to enable the gh git credential helper for"; example = literalExpression '' [ "https://github.com" "https://github.example.com" ] @@ -137,13 +137,13 @@ in { home.activation.migrateGhAccounts = let ghHosts = "${config.xdg.configHome}/gh/hosts.yml"; in hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' - if [[ ! -L "${ghHosts}" && -f "${ghHosts}" ]]; then + if [[ ! -L "${ghHosts}" && -f "${ghHosts}" && $(grep --invert-match --quiet '^version:' ${ghHosts}) ]]; then ( TMP_DIR=$(mktemp -d) trap "rm --force --recursive $TMP_DIR" EXIT cp "${ghHosts}" $TMP_DIR/ export GH_CONFIG_DIR=$TMP_DIR - $DRY_RUN_CMD ${getExe cfg.package} help 2>&1 > $DRY_RUN_NULL + run --silence ${getExe cfg.package} help cp $TMP_DIR/hosts.yml "${ghHosts}" ) fi diff --git a/third_party/home-manager/modules/programs/git.nix b/third_party/home-manager/modules/programs/git.nix index 53728060a2..3061feff77 100644 --- a/third_party/home-manager/modules/programs/git.nix +++ b/third_party/home-manager/modules/programs/git.nix @@ -392,7 +392,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 +407,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; }); diff --git a/third_party/home-manager/modules/programs/gnome-shell.nix b/third_party/home-manager/modules/programs/gnome-shell.nix new file mode 100644 index 0000000000..36a57cea94 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/gpg.nix b/third_party/home-manager/modules/programs/gpg.nix index bc4cf44979..1453892123 100644 --- a/third_party/home-manager/modules/programs/gpg.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/gradle.nix b/third_party/home-manager/modules/programs/gradle.nix index 9a060581ae..8bf5d7898e 100644 --- a/third_party/home-manager/modules/programs/gradle.nix +++ b/third_party/home-manager/modules/programs/gradle.nix @@ -34,9 +34,7 @@ let })); }); in { - meta.maintainers = [ - # maintainers.britter - ]; + meta.maintainers = [ hm.maintainers.britter ]; options.programs.gradle = { enable = mkEnableOption "Gradle Build Tool"; @@ -110,7 +108,5 @@ in { home.sessionVariables = mkIf (cfg.home != defaultHomeDirectory) { GRADLE_USER_HOME = gradleHome; }; - - programs.java.enable = true; }; } diff --git a/third_party/home-manager/modules/programs/helix.nix b/third_party/home-manager/modules/programs/helix.nix index 9c5519f3ba..96c5bdbf18 100644 --- a/third_party/home-manager/modules/programs/helix.nix +++ b/third_party/home-manager/modules/programs/helix.nix @@ -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 = { }; @@ -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/third_party/home-manager/modules/programs/himalaya.nix b/third_party/home-manager/modules/programs/himalaya.nix index 9b5a1e3984..2d216c3dce 100644 --- a/third_party/home-manager/modules/programs/himalaya.nix +++ b/third_party/home-manager/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"; + services.himalaya-watch = { + enable = lib.mkEnableOption + "the email client Himalaya CLI envelopes 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 notifier 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 = '' - 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/third_party/home-manager/modules/programs/hyprlock.nix b/third_party/home-manager/modules/programs/hyprlock.nix new file mode 100644 index 0000000000..25d8718895 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/jetbrains-remote.nix b/third_party/home-manager/modules/programs/jetbrains-remote.nix new file mode 100644 index 0000000000..4a9c045a9c --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/joplin-desktop.nix b/third_party/home-manager/modules/programs/joplin-desktop.nix new file mode 100644 index 0000000000..418abff335 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/jujutsu.nix b/third_party/home-manager/modules/programs/jujutsu.nix index c511f2dcc2..a21c710872 100644 --- a/third_party/home-manager/modules/programs/jujutsu.nix +++ b/third_party/home-manager/modules/programs/jujutsu.nix @@ -10,67 +10,60 @@ let 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; + xdg.configFile."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/third_party/home-manager/modules/programs/k9s.nix b/third_party/home-manager/modules/programs/k9s.nix index 43de8f79c8..6ef53291ad 100644 --- a/third_party/home-manager/modules/programs/k9s.nix +++ b/third_party/home-manager/modules/programs/k9s.nix @@ -6,9 +6,23 @@ 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; [ + katexochen + liyangau + hm.maintainers.LucasWagler + ]; + + imports = [ + (mkRenamedOptionModule [ "programs" "k9s" "skin" ] [ + "programs" + "k9s" + "skins" + "skin" + ]) + ]; options.programs.k9s = { enable = @@ -20,7 +34,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,17 +45,20 @@ in { ''; }; - skin = mkOption { - type = yamlFormat.type; + skins = mkOption { + type = types.attrsOf yamlFormat.type; 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"; + }; }; }; ''; @@ -50,7 +68,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 +84,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 +106,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 +138,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 +163,73 @@ 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 = 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 = mkIf enableXdgConfig ({ + "k9s/config.yaml" = mkIf (cfg.settings != { }) { + source = yamlFormat.generate "k9s-config" + (lib.recursiveUpdate skinSetting cfg.settings); + }; - xdg.configFile."k9s/skin.yml" = mkIf (cfg.skin != { }) { - source = yamlFormat.generate "k9s-skin" cfg.skin; - }; + "k9s/aliases.yaml" = mkIf (cfg.aliases != { }) { + source = yamlFormat.generate "k9s-aliases" cfg.aliases; + }; - xdg.configFile."k9s/aliases.yml" = mkIf (cfg.aliases != { }) { - source = yamlFormat.generate "k9s-aliases" cfg.aliases; - }; + "k9s/hotkeys.yaml" = mkIf (cfg.hotkey != { }) { + source = yamlFormat.generate "k9s-hotkey" cfg.hotkey; + }; - xdg.configFile."k9s/hotkey.yml" = mkIf (cfg.hotkey != { }) { - source = yamlFormat.generate "k9s-hotkey" cfg.hotkey; - }; + "k9s/plugins.yaml" = mkIf (cfg.plugin != { }) { + source = yamlFormat.generate "k9s-plugin" cfg.plugin; + }; - xdg.configFile."k9s/plugin.yml" = mkIf (cfg.plugin != { }) { - source = yamlFormat.generate "k9s-plugin" cfg.plugin; - }; + "k9s/views.yaml" = mkIf (cfg.views != { }) { + source = yamlFormat.generate "k9s-views" cfg.views; + }; + } // skinFiles); - xdg.configFile."k9s/views.yml" = mkIf (cfg.views != { }) { - source = yamlFormat.generate "k9s-views" cfg.views; - }; + home.file = mkIf (!enableXdgConfig) ({ + "Library/Application Support/k9s/config.yaml" = + mkIf (cfg.settings != { }) { + source = yamlFormat.generate "k9s-config" + (lib.recursiveUpdate skinSetting cfg.settings); + }; + + "Library/Application Support/k9s/aliases.yaml" = + mkIf (cfg.aliases != { }) { + source = yamlFormat.generate "k9s-aliases" cfg.aliases; + }; + + "Library/Application Support/k9s/hotkeys.yaml" = + mkIf (cfg.hotkey != { }) { + source = yamlFormat.generate "k9s-hotkey" cfg.hotkey; + }; + + "Library/Application Support/k9s/plugins.yaml" = + mkIf (cfg.plugin != { }) { + source = yamlFormat.generate "k9s-plugin" cfg.plugin; + }; + + "Library/Application Support/k9s/views.yaml" = mkIf (cfg.views != { }) { + source = yamlFormat.generate "k9s-views" cfg.views; + }; + } // skinFiles); }; } diff --git a/third_party/home-manager/modules/programs/khal-accounts.nix b/third_party/home-manager/modules/programs/khal-accounts.nix index ad94adc995..bbf222d901 100644 --- a/third_party/home-manager/modules/programs/khal-accounts.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/khal-calendar-accounts.nix b/third_party/home-manager/modules/programs/khal-calendar-accounts.nix index 6910d627a1..3aa2494e8e 100644 --- a/third_party/home-manager/modules/programs/khal-calendar-accounts.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/khal-contact-accounts.nix b/third_party/home-manager/modules/programs/khal-contact-accounts.nix new file mode 100644 index 0000000000..c58ed4d6b4 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/khal.nix b/third_party/home-manager/modules/programs/khal.nix index 8fc0e0892f..a2e28e0181 100644 --- a/third_party/home-manager/modules/programs/khal.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/kitty.nix b/third_party/home-manager/modules/programs/kitty.nix index e010ba09f1..48ec13da41 100644 --- a/third_party/home-manager/modules/programs/kitty.nix +++ b/third_party/home-manager/modules/programs/kitty.nix @@ -29,17 +29,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,9 +51,9 @@ 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 { @@ -141,8 +144,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 @@ -197,7 +205,7 @@ in { '') '' # 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) diff --git a/third_party/home-manager/modules/programs/mbsync.nix b/third_party/home-manager/modules/programs/mbsync.nix index d43f645555..3437602e95 100644 --- a/third_party/home-manager/modules/programs/mbsync.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/mcfly.nix b/third_party/home-manager/modules/programs/mcfly.nix index 75f6f2b316..450a27380c 100644 --- a/third_party/home-manager/modules/programs/mcfly.nix +++ b/third_party/home-manager/modules/programs/mcfly.nix @@ -5,6 +5,24 @@ let cfg = config.programs.mcfly; + 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 = [ ]; @@ -30,6 +48,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 +103,17 @@ 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)" - ''; + programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration; - programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${pkgs.mcfly}/bin/mcfly init zsh)" - ''; + programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration; - programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - ${pkgs.mcfly}/bin/mcfly init fish | source - ''; + 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/third_party/home-manager/modules/programs/mise.nix b/third_party/home-manager/modules/programs/mise.nix new file mode 100644 index 0000000000..404f1bf9ca --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/mpv.nix b/third_party/home-manager/modules/programs/mpv.nix index eb9c9c4a78..26cad11128 100644 --- a/third_party/home-manager/modules/programs/mpv.nix +++ b/third_party/home-manager/modules/programs/mpv.nix @@ -176,6 +176,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 +213,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: diff --git a/third_party/home-manager/modules/programs/mu.nix b/third_party/home-manager/modules/programs/mu.nix index 04b0558e39..4d051d4dae 100644 --- a/third_party/home-manager/modules/programs/mu.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/neomutt-accounts.nix b/third_party/home-manager/modules/programs/neomutt-accounts.nix index 27e3b12290..bdeda863e7 100644 --- a/third_party/home-manager/modules/programs/neomutt-accounts.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/neomutt.nix b/third_party/home-manager/modules/programs/neomutt.nix index 968036f27e..588b801e4b 100644 --- a/third_party/home-manager/modules/programs/neomutt.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/neovim.nix b/third_party/home-manager/modules/programs/neovim.nix index a3b87ea24e..fad05c1c49 100644 --- a/third_party/home-manager/modules/programs/neovim.nix +++ b/third_party/home-manager/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; @@ -415,7 +437,8 @@ in { programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package (neovimConfig // { - wrapperArgs = (lib.escapeShellArgs neovimConfig.wrapperArgs) + " " + wrapperArgs = (lib.escapeShellArgs + (neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs)) + " " + extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " " + extraMakeWrapperLuaArgs; wrapRc = false; diff --git a/third_party/home-manager/modules/programs/nushell.nix b/third_party/home-manager/modules/programs/nushell.nix index 5141997168..2ebd9554c9 100644 --- a/third_party/home-manager/modules/programs/nushell.nix +++ b/third_party/home-manager/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"; diff --git a/third_party/home-manager/modules/programs/offlineimap.nix b/third_party/home-manager/modules/programs/offlineimap.nix index 1a1845c0ff..fcafec060d 100644 --- a/third_party/home-manager/modules/programs/offlineimap.nix +++ b/third_party/home-manager/modules/programs/offlineimap.nix @@ -42,6 +42,7 @@ let starttls = imap.tls.useStartTls; } else { ssl = false; + starttls = false; }; remotePassEval = diff --git a/third_party/home-manager/modules/programs/poetry.nix b/third_party/home-manager/modules/programs/poetry.nix new file mode 100644 index 0000000000..d297f0c784 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/pqiv.nix b/third_party/home-manager/modules/programs/pqiv.nix index 046ed9aa96..ed1a0b2809 100644 --- a/third_party/home-manager/modules/programs/pqiv.nix +++ b/third_party/home-manager/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,10 +22,9 @@ 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. To set a + boolean flag, set the value to 1. ''; example = literalExpression '' { @@ -41,6 +38,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 +65,12 @@ 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 { } cfg.settings) + cfg.extraConfig + ]; + }; }; } diff --git a/third_party/home-manager/modules/programs/qutebrowser.nix b/third_party/home-manager/modules/programs/qutebrowser.nix index b6cc41ead8..04e5423d4f 100644 --- a/third_party/home-manager/modules/programs/qutebrowser.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/ranger.nix b/third_party/home-manager/modules/programs/ranger.nix new file mode 100644 index 0000000000..63d33fad31 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/rbw.nix b/third_party/home-manager/modules/programs/rbw.nix index b6369dbc45..5dd751d07c 100644 --- a/third_party/home-manager/modules/programs/rbw.nix +++ b/third_party/home-manager/modules/programs/rbw.nix @@ -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/third_party/home-manager/modules/programs/readline.nix b/third_party/home-manager/modules/programs/readline.nix index b8739e37ad..56e8ea9854 100644 --- a/third_party/home-manager/modules/programs/readline.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/rio.nix b/third_party/home-manager/modules/programs/rio.nix index 6d66c99d6d..5a5ce6fa3e 100644 --- a/third_party/home-manager/modules/programs/rio.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/rtx.nix b/third_party/home-manager/modules/programs/rtx.nix deleted file mode 100644 index 5fa9b5631b..0000000000 --- a/third_party/home-manager/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/third_party/home-manager/modules/programs/senpai.nix b/third_party/home-manager/modules/programs/senpai.nix index 24256e7649..1aaac393e8 100644 --- a/third_party/home-manager/modules/programs/senpai.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/spotify-player.nix b/third_party/home-manager/modules/programs/spotify-player.nix new file mode 100644 index 0000000000..83eefe12d2 --- /dev/null +++ b/third_party/home-manager/modules/programs/spotify-player.nix @@ -0,0 +1,154 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) + mkEnableOption mkPackageOption mkOption types literalExpression mkIf; + + cfg = config.programs.spotify-player; + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = with lib.hm.maintainers; [ diniamo ]; + + options.programs.spotify-player = { + enable = mkEnableOption "spotify-player"; + + package = mkPackageOption pkgs "spotify-player" { }; + + settings = mkOption { + type = tomlFormat.type; + 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 = types.listOf tomlFormat.type; + 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 = types.listOf tomlFormat.type; + 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. + ''; + }; + }; + + 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; + }; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/ssh.nix b/third_party/home-manager/modules/programs/ssh.nix index 5d038075f6..e062b23244 100644 --- a/third_party/home-manager/modules/programs/ssh.nix +++ b/third_party/home-manager/modules/programs/ssh.nix @@ -9,17 +9,17 @@ let isPath = x: builtins.substring 0 1 (toString x) == "/"; addressPort = entry: - if isPath entry.address - then " ${entry.address}" - else " [${entry.address}]:${toString entry.port}"; + if isPath entry.address then + " ${entry.address}" + else + " [${entry.address}]:${toString entry.port}"; unwords = builtins.concatStringsSep " "; - mkSetEnvStr = envStr: unwords - (mapAttrsToList - (name: value: ''${name}="${escape [ "\"" "\\" ] (toString value)}"'') - envStr - ); + mkSetEnvStr = envStr: + unwords (mapAttrsToList + (name: value: ''${name}="${escape [ ''"'' "\\" ] (toString value)}"'') + envStr); bindOptions = { address = mkOption { @@ -37,9 +37,7 @@ let }; }; - dynamicForwardModule = types.submodule { - options = bindOptions; - }; + dynamicForwardModule = types.submodule { options = bindOptions; }; forwardModule = types.submodule { options = { @@ -83,7 +81,9 @@ let match = mkOption { type = types.nullOr types.str; default = null; - example = "host canonical\nhost exec \"ping -c1 -q 192.168.17.1\""; + example = '' + host canonical + host exec "ping -c1 -q 192.168.17.1"''; description = '' `Match` block conditions used by this block. See {manpage}`ssh_config(5)` @@ -141,11 +141,8 @@ let identityFile = mkOption { type = with types; either (listOf str) (nullOr str); - default = []; - apply = p: - if p == null then [] - else if isString p then [p] - else p; + default = [ ]; + apply = p: if p == null then [ ] else if isString p then [ p ] else p; description = '' Specifies files from which the user identity is read. Identities will be tried in the given order. @@ -182,7 +179,7 @@ let sendEnv = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; description = '' Environment variables to send from the local host to the server. @@ -191,7 +188,7 @@ let setEnv = mkOption { type = with types; attrsOf (oneOf [ str path int float ]); - default = {}; + default = { }; description = '' Environment variables and their value to send to the server. ''; @@ -229,11 +226,8 @@ let certificateFile = mkOption { type = with types; either (listOf str) (nullOr str); - default = []; - apply = p: - if p == null then [] - else if isString p then [p] - else p; + default = [ ]; + apply = p: if p == null then [ ] else if isString p then [ p ] else p; description = '' Specifies files from which the user certificate is read. ''; @@ -241,7 +235,7 @@ let addressFamily = mkOption { default = null; - type = types.nullOr (types.enum ["any" "inet" "inet6"]); + type = types.nullOr (types.enum [ "any" "inet" "inet6" ]); description = '' Specifies which address family to use when connecting. ''; @@ -249,7 +243,7 @@ let localForwards = mkOption { type = types.listOf forwardModule; - default = []; + default = [ ]; example = literalExpression '' [ { @@ -267,7 +261,7 @@ let remoteForwards = mkOption { type = types.listOf forwardModule; - default = []; + default = [ ]; example = literalExpression '' [ { @@ -285,7 +279,7 @@ let dynamicForwards = mkOption { type = types.listOf dynamicForwardModule; - default = []; + default = [ ]; example = literalExpression '' [ { port = 8080; } ]; ''; @@ -297,50 +291,52 @@ let extraOptions = mkOption { type = types.attrsOf types.str; - default = {}; + default = { }; description = "Extra configuration options for the host."; }; }; -# config.host = mkDefault dagName; + # config.host = mkDefault dagName; }); - matchBlockStr = key: cf: concatStringsSep "\n" ( - let + matchBlockStr = key: cf: + concatStringsSep "\n" (let hostOrDagName = if cf.host != null then cf.host else key; - matchHead = if cf.match != null - then "Match ${cf.match}" - else "Host ${hostOrDagName}"; + matchHead = if cf.match != null then + "Match ${cf.match}" + else + "Host ${hostOrDagName}"; in [ "${matchHead}" ] - ++ optional (cf.port != null) " Port ${toString cf.port}" - ++ optional (cf.forwardAgent != null) " ForwardAgent ${lib.hm.booleans.yesNo cf.forwardAgent}" - ++ optional cf.forwardX11 " ForwardX11 yes" - ++ optional cf.forwardX11Trusted " ForwardX11Trusted yes" - ++ optional cf.identitiesOnly " IdentitiesOnly yes" - ++ optional (cf.user != null) " User ${cf.user}" - ++ optional (cf.hostname != null) " HostName ${cf.hostname}" - ++ optional (cf.addressFamily != null) " AddressFamily ${cf.addressFamily}" - ++ optional (cf.sendEnv != []) " SendEnv ${unwords cf.sendEnv}" - ++ optional (cf.setEnv != {}) " SetEnv ${mkSetEnvStr cf.setEnv}" + ++ optional (cf.port != null) " Port ${toString cf.port}" + ++ optional (cf.forwardAgent != null) + " ForwardAgent ${lib.hm.booleans.yesNo cf.forwardAgent}" + ++ optional cf.forwardX11 " ForwardX11 yes" + ++ optional cf.forwardX11Trusted " ForwardX11Trusted yes" + ++ optional cf.identitiesOnly " IdentitiesOnly yes" + ++ optional (cf.user != null) " User ${cf.user}" + ++ optional (cf.hostname != null) " HostName ${cf.hostname}" + ++ optional (cf.addressFamily != null) " AddressFamily ${cf.addressFamily}" + ++ optional (cf.sendEnv != [ ]) " SendEnv ${unwords cf.sendEnv}" + ++ optional (cf.setEnv != { }) " SetEnv ${mkSetEnvStr cf.setEnv}" ++ optional (cf.serverAliveInterval != 0) - " ServerAliveInterval ${toString cf.serverAliveInterval}" + " ServerAliveInterval ${toString cf.serverAliveInterval}" ++ optional (cf.serverAliveCountMax != 3) - " ServerAliveCountMax ${toString cf.serverAliveCountMax}" - ++ optional (cf.compression != null) " Compression ${lib.hm.booleans.yesNo cf.compression}" - ++ optional (!cf.checkHostIP) " CheckHostIP no" - ++ optional (cf.proxyCommand != null) " ProxyCommand ${cf.proxyCommand}" - ++ optional (cf.proxyJump != null) " ProxyJump ${cf.proxyJump}" + " ServerAliveCountMax ${toString cf.serverAliveCountMax}" + ++ optional (cf.compression != null) + " Compression ${lib.hm.booleans.yesNo cf.compression}" + ++ optional (!cf.checkHostIP) " CheckHostIP no" + ++ optional (cf.proxyCommand != null) " ProxyCommand ${cf.proxyCommand}" + ++ optional (cf.proxyJump != null) " ProxyJump ${cf.proxyJump}" ++ map (file: " IdentityFile ${file}") cf.identityFile ++ map (file: " CertificateFile ${file}") cf.certificateFile - ++ map (f: " LocalForward" + addressPort f.bind + addressPort f.host) cf.localForwards - ++ map (f: " RemoteForward" + addressPort f.bind + addressPort f.host) cf.remoteForwards + ++ map (f: " LocalForward" + addressPort f.bind + addressPort f.host) + cf.localForwards + ++ map (f: " RemoteForward" + addressPort f.bind + addressPort f.host) + cf.remoteForwards ++ map (f: " DynamicForward" + addressPort f) cf.dynamicForwards - ++ mapAttrsToList (n: v: " ${n} ${v}") cf.extraOptions - ); + ++ mapAttrsToList (n: v: " ${n} ${v}") cf.extraOptions); -in - -{ +in { meta.maintainers = [ maintainers.rycee ]; options.programs.ssh = { @@ -349,7 +345,8 @@ in package = mkPackageOption pkgs "openssh" { nullable = true; default = null; - extraDescription = "By default, the client provided by your system is used."; + extraDescription = + "By default, the client provided by your system is used."; }; forwardAgent = mkOption { @@ -418,7 +415,7 @@ in controlMaster = mkOption { default = "no"; - type = types.enum ["yes" "no" "ask" "auto" "autoask"]; + type = types.enum [ "yes" "no" "ask" "auto" "autoask" ]; description = '' Configure sharing of multiple sessions over a single network connection. ''; @@ -451,7 +448,7 @@ in extraOptionOverrides = mkOption { type = types.attrsOf types.str; - default = {}; + default = { }; description = '' Extra SSH configuration options that take precedence over any host specific configuration. @@ -460,7 +457,7 @@ in includes = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; description = '' File globs of ssh config files that should be included via the `Include` directive. @@ -473,7 +470,7 @@ in matchBlocks = mkOption { type = hm.types.dagOf matchBlockModule; - default = {}; + default = { }; example = literalExpression '' { "john.example.com" = { @@ -499,43 +496,41 @@ in }; config = mkIf cfg.enable { - assertions = [ - { - assertion = - let - # `builtins.any`/`lib.lists.any` does not return `true` if there are no elements. - any' = pred: items: if items == [] then true else any pred items; - # Check that if `entry.address` is defined, and is a path, that `entry.port` has not - # been defined. - noPathWithPort = entry: entry.address != null && isPath entry.address -> entry.port == null; - checkDynamic = block: any' noPathWithPort block.dynamicForwards; - checkBindAndHost = fwd: noPathWithPort fwd.bind && noPathWithPort fwd.host; - checkLocal = block: any' checkBindAndHost block.localForwards; - checkRemote = block: any' checkBindAndHost block.remoteForwards; - checkMatchBlock = block: all (fn: fn block) [ checkLocal checkRemote checkDynamic ]; - in any' checkMatchBlock (map (block: block.data) (builtins.attrValues cfg.matchBlocks)); - message = "Forwarded paths cannot have ports."; - } - ]; + assertions = [{ + assertion = let + # `builtins.any`/`lib.lists.any` does not return `true` if there are no elements. + any' = pred: items: if items == [ ] then true else any pred items; + # Check that if `entry.address` is defined, and is a path, that `entry.port` has not + # been defined. + noPathWithPort = entry: + entry.address != null && isPath entry.address -> entry.port == null; + checkDynamic = block: any' noPathWithPort block.dynamicForwards; + checkBindAndHost = fwd: + noPathWithPort fwd.bind && noPathWithPort fwd.host; + checkLocal = block: any' checkBindAndHost block.localForwards; + checkRemote = block: any' checkBindAndHost block.remoteForwards; + checkMatchBlock = block: + all (fn: fn block) [ checkLocal checkRemote checkDynamic ]; + in any' checkMatchBlock + (map (block: block.data) (builtins.attrValues cfg.matchBlocks)); + message = "Forwarded paths cannot have ports."; + }]; home.packages = optional (cfg.package != null) cfg.package; - home.file.".ssh/config".text = - let - sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks; - sortedMatchBlocksStr = builtins.toJSON sortedMatchBlocks; - matchBlocks = - if sortedMatchBlocks ? result - then sortedMatchBlocks.result - else abort "Dependency cycle in SSH match blocks: ${sortedMatchBlocksStr}"; - in '' - ${concatStringsSep "\n" ( - (mapAttrsToList (n: v: "${n} ${v}") cfg.extraOptionOverrides) + home.file.".ssh/config".text = let + sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks; + sortedMatchBlocksStr = builtins.toJSON sortedMatchBlocks; + matchBlocks = if sortedMatchBlocks ? result then + sortedMatchBlocks.result + else + abort "Dependency cycle in SSH match blocks: ${sortedMatchBlocksStr}"; + in '' + ${concatStringsSep "\n" + ((mapAttrsToList (n: v: "${n} ${v}") cfg.extraOptionOverrides) ++ (optional (cfg.includes != [ ]) '' Include ${concatStringsSep " " cfg.includes} - '') - ++ (map (block: matchBlockStr block.name block.data) matchBlocks) - )} + '') ++ (map (block: matchBlockStr block.name block.data) matchBlocks))} Host * ForwardAgent ${lib.hm.booleans.yesNo cfg.forwardAgent} @@ -549,11 +544,13 @@ in ControlPath ${cfg.controlPath} ControlPersist ${cfg.controlPersist} - ${replaceStrings ["\n"] ["\n "] cfg.extraConfig} + ${replaceStrings [ "\n" ] [ "\n " ] cfg.extraConfig} ''; - warnings = mapAttrsToList - (n: v: "The SSH config match block `programs.ssh.matchBlocks.${n}` sets both of the host and match options.\nThe match option takes precedence.") - (filterAttrs (n: v: v.data.host != null && v.data.match != null) cfg.matchBlocks); + warnings = mapAttrsToList (n: v: '' + The SSH config match block `programs.ssh.matchBlocks.${n}` sets both of the host and match options. + The match option takes precedence.'') + (filterAttrs (n: v: v.data.host != null && v.data.match != null) + cfg.matchBlocks); }; } diff --git a/third_party/home-manager/modules/programs/taskwarrior.nix b/third_party/home-manager/modules/programs/taskwarrior.nix index 5c4f0bf8ae..e90b1eb237 100644 --- a/third_party/home-manager/modules/programs/taskwarrior.nix +++ b/third_party/home-manager/modules/programs/taskwarrior.nix @@ -105,18 +105,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/third_party/home-manager/modules/programs/tealdeer.nix b/third_party/home-manager/modules/programs/tealdeer.nix index f0e610c2d4..d9318d1022 100644 --- a/third_party/home-manager/modules/programs/tealdeer.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/thefuck.nix b/third_party/home-manager/modules/programs/thefuck.nix index 2cad4c3386..ab56ea0167 100644 --- a/third_party/home-manager/modules/programs/thefuck.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/thunderbird.nix b/third_party/home-manager/modules/programs/thunderbird.nix index 8b14628a14..c15a946ec6 100644 --- a/third_party/home-manager/modules/programs/thunderbird.nix +++ b/third_party/home-manager/modules/programs/thunderbird.nix @@ -49,6 +49,11 @@ let "mail.identity.id_${id}.fullName" = account.realName; "mail.identity.id_${id}.useremail" = address; "mail.identity.id_${id}.valid" = true; + "mail.identity.id_${id}.htmlSigText" = + if account.signature.showSignature == "none" then + "" + else + account.signature.text; } // optionalAttrs (account.gpg != null) { "mail.identity.id_${id}.attachPgpKey" = false; "mail.identity.id_${id}.autoEncryptDrafts" = true; diff --git a/third_party/home-manager/modules/programs/tofi.nix b/third_party/home-manager/modules/programs/tofi.nix new file mode 100644 index 0000000000..acc1a994d3 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/topgrade.nix b/third_party/home-manager/modules/programs/topgrade.nix index a49f897baa..0630ccabda 100644 --- a/third_party/home-manager/modules/programs/topgrade.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix b/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix index 35badb927f..7ab9521c1a 100644 --- a/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/vdirsyncer.nix b/third_party/home-manager/modules/programs/vdirsyncer.nix index ec1b387968..2e013af061 100644 --- a/third_party/home-manager/modules/programs/vdirsyncer.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/vscode.nix b/third_party/home-manager/modules/programs/vscode.nix index 5ea6be8b49..f77937d66c 100644 --- a/third_party/home-manager/modules/programs/vscode.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/yambar.nix b/third_party/home-manager/modules/programs/yambar.nix new file mode 100644 index 0000000000..f4e0a434ae --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/yazi.nix b/third_party/home-manager/modules/programs/yazi.nix index d0d941d139..11f4e75cf1 100644 --- a/third_party/home-manager/modules/programs/yazi.nix +++ b/third_party/home-manager/modules/programs/yazi.nix @@ -8,10 +8,10 @@ let bashIntegration = '' function ya() { - tmp="$(mktemp -t "yazi-cwd.XXXXX")" + local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } @@ -22,39 +22,30 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end ''; nushellIntegration = '' - def --env ya [args?] { + def --env ya [...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 ]; options.programs.yazi = { enable = mkEnableOption "yazi"; - package = mkOption { - type = types.package; - default = pkgs.yazi; - defaultText = literalExpression "pkgs.yazi"; - description = "Yazi package to install."; - }; + package = mkPackageOption pkgs "yazi" { }; enableBashIntegration = mkEnableOption "Bash integration"; @@ -139,6 +130,48 @@ in { for the full list of options ''; }; + + initLua = mkOption { + type = with types; nullOr path; + default = null; + description = '' + The init.lua for Yazi itself. + ''; + example = literalExpression "./init.lua"; + }; + + plugins = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Lua plugins. + + See https://yazi-rs.github.io/docs/plugins/overview/ for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; + + flavors = mkOption { + type = with types; attrsOf (oneOf [ path package ]); + default = { }; + description = '' + Pre-made themes. + + See https://yazi-rs.github.io/docs/flavors/overview/ for documentation. + ''; + example = literalExpression '' + { + foo = ./foo; + bar = pkgs.bar; + } + ''; + }; + }; config = mkIf cfg.enable { @@ -164,6 +197,11 @@ in { "yazi/theme.toml" = mkIf (cfg.theme != { }) { source = tomlFormat.generate "yazi-theme" cfg.theme; }; - }; + "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; + } // (mapAttrs' + (name: value: nameValuePair "yazi/plugins/${name}" { source = value; }) + cfg.plugins) // (mapAttrs' + (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) + cfg.flavors); }; } diff --git a/third_party/home-manager/modules/programs/zellij.nix b/third_party/home-manager/modules/programs/zellij.nix index 44a3d69f4c..0906a028dd 100644 --- a/third_party/home-manager/modules/programs/zellij.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/zk.nix b/third_party/home-manager/modules/programs/zk.nix new file mode 100644 index 0000000000..d4abfe2797 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/programs/zoxide.nix b/third_party/home-manager/modules/programs/zoxide.nix index fe82ffc25e..3dcbbd67bb 100644 --- a/third_party/home-manager/modules/programs/zoxide.nix +++ b/third_party/home-manager/modules/programs/zoxide.nix @@ -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/third_party/home-manager/modules/programs/zsh.nix b/third_party/home-manager/modules/programs/zsh.nix index c375b57cff..3ec73f30d0 100644 --- a/third_party/home-manager/modules/programs/zsh.nix +++ b/third_party/home-manager/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"; @@ -236,13 +236,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 +262,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 +363,6 @@ in type = types.lines; }; - enableAutosuggestions = mkOption { - default = false; - description = "Enable zsh autosuggestions"; - }; - zprof.enable = mkOption { default = false; description = '' @@ -376,6 +382,24 @@ 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. + ''; + }; + }; + history = mkOption { type = historyModule; default = {}; @@ -582,13 +606,16 @@ 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.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 +629,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")} @@ -637,8 +665,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 +683,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/third_party/home-manager/modules/programs/zsh/prezto.nix b/third_party/home-manager/modules/programs/zsh/prezto.nix index 1aa3af1e9b..9a94f23856 100644 --- a/third_party/home-manager/modules/programs/zsh/prezto.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/activitywatch.nix b/third_party/home-manager/modules/services/activitywatch.nix new file mode 100644 index 0000000000..ac80725776 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/amberol.nix b/third_party/home-manager/modules/services/amberol.nix new file mode 100644 index 0000000000..a630124478 --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/arrpc.nix b/third_party/home-manager/modules/services/arrpc.nix new file mode 100644 index 0000000000..ec003257bb --- /dev/null +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/cliphist.nix b/third_party/home-manager/modules/services/cliphist.nix index 6ba733fa5e..3599557f05 100644 --- a/third_party/home-manager/modules/services/cliphist.nix +++ b/third_party/home-manager/modules/services/cliphist.nix @@ -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/third_party/home-manager/modules/services/conky.nix b/third_party/home-manager/modules/services/conky.nix new file mode 100644 index 0000000000..bf7eeea8b2 --- /dev/null +++ b/third_party/home-manager/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 ([ "${pkgs.conky}/bin/conky" ] + ++ optional (cfg.extraConfig != "") + "--config ${pkgs.writeText "conky.conf" cfg.extraConfig}"); + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; +} + diff --git a/third_party/home-manager/modules/services/darkman.nix b/third_party/home-manager/modules/services/darkman.nix index d11f03244e..b399dad862 100644 --- a/third_party/home-manager/modules/services/darkman.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/dropbox.nix b/third_party/home-manager/modules/services/dropbox.nix index 941f4d82e9..b4e7359c09 100644 --- a/third_party/home-manager/modules/services/dropbox.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/espanso.nix b/third_party/home-manager/modules/services/espanso.nix index 404dfecd85..f6e27e7965 100644 --- a/third_party/home-manager/modules/services/espanso.nix +++ b/third_party/home-manager/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 ]; @@ -131,5 +127,19 @@ in { }; 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/third_party/home-manager/modules/services/fusuma.nix b/third_party/home-manager/modules/services/fusuma.nix index e0ced97693..17d8b14311 100644 --- a/third_party/home-manager/modules/services/fusuma.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/git-sync.nix b/third_party/home-manager/modules/services/git-sync.nix index a274da8f48..2d90d6331b 100644 --- a/third_party/home-manager/modules/services/git-sync.nix +++ b/third_party/home-manager/modules/services/git-sync.nix @@ -13,7 +13,9 @@ let Service = { Environment = [ - "PATH=${lib.makeBinPath (with pkgs; [ openssh git ])}" + "PATH=${ + lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages) + }" "GIT_SYNC_DIRECTORY=${repo.path}" "GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync" "GIT_SYNC_REPOSITORY=${repo.uri}" @@ -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. + ''; + }; }; }); diff --git a/third_party/home-manager/modules/services/gpg-agent.nix b/third_party/home-manager/modules/services/gpg-agent.nix index 70e4df0a59..cce5ac1910 100644 --- a/third_party/home-manager/modules/services/gpg-agent.nix +++ b/third_party/home-manager/modules/services/gpg-agent.nix @@ -27,9 +27,7 @@ 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. @@ -50,9 +48,8 @@ let hexStringToBase32 = let mod = a: b: a - a / b * b; pow2 = elemAt [ 1 2 4 8 16 32 64 128 256 ]; - splitChars = s: init (tail (splitString "" s)); - base32Alphabet = splitChars "ybndrfg8ejkmcpqxot1uwisza345h769"; + base32Alphabet = stringToCharacters "ybndrfg8ejkmcpqxot1uwisza345h769"; hexToIntTable = listToAttrs (genList (x: { name = toLower (toHexString x); value = x; @@ -78,11 +75,16 @@ let buf = buf'; bufBits = bufBits'; }; - in hexString: (foldl' go initState (splitChars hexString)).ret; + in hexString: (foldl' go initState (stringToCharacters hexString)).ret; in { meta.maintainers = [ maintainers.rycee ]; + imports = [ + (mkRemovedOptionModule [ "services" "gpg-agent" "pinentryFlavor" ] + "Use services.gpg-agent.pinentryPackage instead") + ]; + options = { services.gpg-agent = { enable = mkEnableOption "GnuPG private key agent"; @@ -194,10 +196,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 +246,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 '' diff --git a/third_party/home-manager/modules/services/hypridle.nix b/third_party/home-manager/modules/services/hypridle.nix new file mode 100644 index 0000000000..0e28c54380 --- /dev/null +++ b/third_party/home-manager/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 = + [ "${config.xdg.configFile."hypr/hypridle.conf".source}" ]; + }; + + Service = { + ExecStart = "${getExe cfg.package}"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/hyprpaper.nix b/third_party/home-manager/modules/services/hyprpaper.nix new file mode 100644 index 0000000000..ede09b258c --- /dev/null +++ b/third_party/home-manager/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 = + [ "${config.xdg.configFile."hypr/hyprpaper.conf".source}" ]; + }; + + Service = { + ExecStart = "${getExe cfg.package}"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/imapnotify.nix b/third_party/home-manager/modules/services/imapnotify.nix index a79cba35ec..63e61e7c7c 100644 --- a/third_party/home-manager/modules/services/imapnotify.nix +++ b/third_party/home-manager/modules/services/imapnotify.nix @@ -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; diff --git a/third_party/home-manager/modules/services/kanshi.nix b/third_party/home-manager/modules/services/kanshi.nix index 02fe8e3cfc..b503ffc7f7 100644 --- a/third_party/home-manager/modules/services/kanshi.nix +++ b/third_party/home-manager/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 = { @@ -113,6 +155,14 @@ let ''; }; + name = mkOption { + type = types.str; + default = ""; + description = '' + Profile name + ''; + }; + exec = mkOption { type = with types; coercedTo str singleton (listOf str); default = [ ]; @@ -127,15 +177,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 +206,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 +241,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 +285,56 @@ in { }; }; - config = mkIf cfg.enable { - assertions = [ - (lib.hm.assertions.assertPlatform "services.kanshi" pkgs - lib.platforms.linux) - ]; + 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"; + } + ]; + } - xdg.configFile."kanshi/config".text = '' - ${concatStringsSep "\n" (mapAttrsToList profileStr cfg.profiles)} - ${cfg.extraConfig} - ''; + (mkIf (cfg.profiles != { }) { + warnings = [ + "kanshi.profiles option is deprecated. Use kanshi.settings instead." + ]; + }) - systemd.user.services.kanshi = { - Unit = { - Description = "Dynamic output configuration"; - Documentation = "man:kanshi(1)"; - PartOf = cfg.systemdTarget; - Requires = cfg.systemdTarget; - After = cfg.systemdTarget; + (mkIf (cfg.extraConfig != "") { + warnings = [ + "kanshi.extraConfig option is deprecated. Use kanshi.settings instead." + ]; + }) + + { + 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 ]; }; }; - - Service = { - Type = "simple"; - ExecStart = "${cfg.package}/bin/kanshi"; - Restart = "always"; - }; - - Install = { WantedBy = [ cfg.systemdTarget ]; }; - }; - }; + } + ]); } diff --git a/third_party/home-manager/modules/services/kdeconnect.nix b/third_party/home-manager/modules/services/kdeconnect.nix index 0c6aac31e8..656a8c9a61 100644 --- a/third_party/home-manager/modules/services/kdeconnect.nix +++ b/third_party/home-manager/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.plasma5Packages.kdeconnect-kde; + example = literalExpression "pkgs.kdePackages.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 @@ -44,7 +48,12 @@ in { Service = { Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${package}/libexec/kdeconnectd"; + ExecStart = + if strings.versionAtLeast (versions.majorMinor cfg.package.version) + "24.05" then + "${cfg.package}/bin/kdeconnectd" + else + "${cfg.package}/libexec/kdeconnectd"; Restart = "on-abort"; }; }; @@ -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"; + ExecStart = "${cfg.package}/bin/kdeconnect-indicator"; Restart = "on-abort"; }; }; }) - ]; } diff --git a/third_party/home-manager/modules/services/keepassx.nix b/third_party/home-manager/modules/services/keepassx.nix deleted file mode 100644 index 7f85823619..0000000000 --- a/third_party/home-manager/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/third_party/home-manager/modules/services/listenbrainz-mpd.nix b/third_party/home-manager/modules/services/listenbrainz-mpd.nix index 0a55a9e46f..3cc2422167 100644 --- a/third_party/home-manager/modules/services/listenbrainz-mpd.nix +++ b/third_party/home-manager/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"; }; }; }; @@ -40,6 +40,10 @@ in { ExecStart = "${cfg.package}/bin/listenbrainz-mpd"; Restart = "always"; RestartSec = 5; + Type = if lib.versionAtLeast cfg.package.version "2.3.2" then + "notify" + else + "simple"; }; Install.WantedBy = [ "default.target" ]; }; diff --git a/third_party/home-manager/modules/services/lorri.nix b/third_party/home-manager/modules/services/lorri.nix index f782ff880d..533a534416 100644 --- a/third_party/home-manager/modules/services/lorri.nix +++ b/third_party/home-manager/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,6 +55,10 @@ in { ReadWritePaths = [ # /run/user/1000 for the socket "%t" + # Needs to update own cache + "%C/lorri" + # Needs %C/nix/fetcher-cache-v1.sqlite + "%C/nix" "/nix/var/nix/gcroots/per-user/%u" ]; CacheDirectory = [ "lorri" ]; diff --git a/third_party/home-manager/modules/services/mopidy.nix b/third_party/home-manager/modules/services/mopidy.nix index 37642a2903..b027085783 100644 --- a/third_party/home-manager/modules/services/mopidy.nix +++ b/third_party/home-manager/modules/services/mopidy.nix @@ -48,6 +48,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 ]; @@ -133,7 +135,7 @@ in { 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/third_party/home-manager/modules/services/network-manager-applet.nix b/third_party/home-manager/modules/services/network-manager-applet.nix index b90855dd5c..524921b71d 100644 --- a/third_party/home-manager/modules/services/network-manager-applet.nix +++ b/third_party/home-manager/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/third_party/home-manager/modules/services/nix-gc.nix b/third_party/home-manager/modules/services/nix-gc.nix new file mode 100644 index 0000000000..652c575ac1 --- /dev/null +++ b/third_party/home-manager/modules/services/nix-gc.nix @@ -0,0 +1,147 @@ +{ 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. + ''; + }; + + 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 = { + ExecStart = "${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}"; + 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/third_party/home-manager/modules/services/psd.nix b/third_party/home-manager/modules/services/psd.nix new file mode 100644 index 0000000000..477176aa38 --- /dev/null +++ b/third_party/home-manager/modules/services/psd.nix @@ -0,0 +1,88 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.services.psd; + +in { + meta.maintainers = [ lib.hm.maintainers.danjujan ]; + + options.services.psd = { + enable = lib.mkEnableOption "Profile-sync-daemon service"; + + resyncTimer = lib.mkOption { + type = lib.types.str; + default = "1h"; + example = "1h 30min"; + description = '' + The amount of time to wait before syncing browser profiles back to the + disk. + + Takes a systemd time span, see {manpage}`systemd.time(7)`. The time unit + defaults to seconds if omitted. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.psd" pkgs lib.platforms.linux) + ]; + + home.packages = [ pkgs.profile-sync-daemon ]; + + systemd.user = { + services = let + exe = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon"; + envPath = lib.makeBinPath (with pkgs; [ + rsync + kmod + gawk + nettools + util-linux + profile-sync-daemon + ]); + in { + psd = { + Unit = { + Description = "Profile-sync-daemon"; + Wants = [ "psd-resync.service" ]; + RequiresMountsFor = [ "/home/" ]; + After = "winbindd.service"; + }; + Service = { + Type = "oneshot"; + RemainAfterExit = "yes"; + ExecStart = "${exe} startup"; + ExecStop = "${exe} unsync"; + Environment = [ "LAUNCHED_BY_SYSTEMD=1" "PATH=$PATH:${envPath}" ]; + }; + Install = { WantedBy = [ "default.target" ]; }; + }; + + psd-resync = { + Unit = { + Description = "Timed profile resync"; + After = [ "psd.service" ]; + Wants = [ "psd-resync.timer" ]; + PartOf = [ "psd.service" ]; + }; + Service = { + Type = "oneshot"; + ExecStart = "${exe} resync"; + Environment = [ "PATH=$PATH:${envPath}" ]; + }; + Install = { WantedBy = [ "default.target" ]; }; + }; + }; + + timers.psd-resync = { + Unit = { + Description = "Timer for Profile-sync-daemon"; + PartOf = [ "psd-resync.service" "psd.service" ]; + }; + Timer = { OnUnitActiveSec = cfg.resyncTimer; }; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/pueue.nix b/third_party/home-manager/modules/services/pueue.nix index 1431c1cd71..f0603bb471 100644 --- a/third_party/home-manager/modules/services/pueue.nix +++ b/third_party/home-manager/modules/services/pueue.nix @@ -6,7 +6,8 @@ let cfg = config.services.pueue; yamlFormat = pkgs.formats.yaml { }; - configFile = yamlFormat.generate "pueue.yaml" cfg.settings; + configFile = + yamlFormat.generate "pueue.yaml" ({ shared = { }; } // cfg.settings); in { meta.maintainers = [ maintainers.AndersonTorres ]; @@ -39,8 +40,7 @@ in { home.packages = [ cfg.package ]; - xdg.configFile = - mkIf (cfg.settings != { }) { "pueue/pueue.yml".source = configFile; }; + xdg.configFile."pueue/pueue.yml".source = configFile; systemd.user = { services.pueued = { diff --git a/third_party/home-manager/modules/services/remmina.nix b/third_party/home-manager/modules/services/remmina.nix new file mode 100644 index 0000000000..dac0471dbf --- /dev/null +++ b/third_party/home-manager/modules/services/remmina.nix @@ -0,0 +1,74 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib) mkIf mkMerge mkEnableOption mkPackageOption mkOption; + + cfg = config.services.remmina; + +in { + meta.maintainers = with lib.maintainers; [ cyntheticfox ]; + + options.services.remmina = { + enable = mkEnableOption "Remmina"; + + package = mkPackageOption pkgs "remmina" { }; + + addRdpMimeTypeAssoc = mkEnableOption "Remmina RDP file open option" // { + default = true; + }; + + systemdService = { + enable = mkEnableOption "systemd Remmina service" // { default = true; }; + + startupFlags = mkOption { + type = with lib.types; listOf str; + default = [ "--icon" ]; + description = '' + Startup flags documented in the manpage to run at service startup. + ''; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + { home.packages = [ cfg.package ]; } + + (mkIf cfg.systemdService.enable { + systemd.user.services.remmina = { + Unit = { + Description = "Remmina remote desktop client"; + Documentation = "man:remmina(1)"; + Requires = [ "graphical-session-pre.target" ]; + }; + + Service = { + Type = "simple"; + ExecStart = "${lib.getExe cfg.package} ${ + lib.escapeShellArgs cfg.systemdService.startupFlags + }"; + Restart = "on-failure"; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }) + + (mkIf (config.xdg.mimeApps.enable && cfg.addRdpMimeTypeAssoc) { + xdg.mimeApps.associations.added."application/x-rdp" = + "org.remmina.Remmina.desktop"; + + xdg.dataFile."mime/packages/application-x-rdp.xml".text = '' + + + + rdp file + + + + + + ''; + }) + ]); +} diff --git a/third_party/home-manager/modules/services/swayidle.nix b/third_party/home-manager/modules/services/swayidle.nix index b28de6f0ee..80317e42ac 100644 --- a/third_party/home-manager/modules/services/swayidle.nix +++ b/third_party/home-manager/modules/services/swayidle.nix @@ -118,6 +118,7 @@ in { Unit = { Description = "Idle manager for Wayland"; Documentation = "man:swayidle(1)"; + ConditionEnvironment = "WAYLAND_DISPLAY"; PartOf = [ "graphical-session.target" ]; }; diff --git a/third_party/home-manager/modules/services/swaync.nix b/third_party/home-manager/modules/services/swaync.nix new file mode 100644 index 0000000000..60bcc913b7 --- /dev/null +++ b/third_party/home-manager/modules/services/swaync.nix @@ -0,0 +1,113 @@ +{ pkgs, lib, config, ... }: + +let + + cfg = config.services.swaync; + + jsonFormat = pkgs.formats.json { }; + +in { + meta.maintainers = [ lib.hm.maintainers.abayomi185 ]; + + options.services.swaync = { + enable = lib.mkEnableOption "Swaync notification daemon"; + + package = lib.mkPackageOption pkgs "swaynotificationcenter" { }; + + style = lib.mkOption { + type = lib.types.nullOr (lib.types.either lib.types.path lib.types.lines); + default = null; + example = '' + .notification-row { + outline: none; + } + + .notification-row:focus, + .notification-row:hover { + background: @noti-bg-focus; + } + + .notification { + border-radius: 12px; + margin: 6px 12px; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), + 0 2px 6px 2px rgba(0, 0, 0, 0.3); + padding: 0; + } + ''; + description = '' + CSS style of the bar. See + + for the documentation. + + If the value is set to a path literal, then the path will be used as the CSS file. + ''; + }; + + settings = lib.mkOption { + type = jsonFormat.type; + default = { }; + example = lib.literalExpression '' + { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "application"; + control-center-margin-top = 0; + control-center-margin-bottom = 0; + control-center-margin-right = 0; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200 + }; + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/swaync/config.json`. + See + + for the documentation. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + # at-spi2-core is to minimize journalctl noise of: + # "AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files" + home.packages = [ cfg.package pkgs.at-spi2-core ]; + + xdg.configFile = { + "swaync/config.json".source = + jsonFormat.generate "config.json" cfg.settings; + "swaync/style.css" = lib.mkIf (cfg.style != null) { + source = if builtins.isPath cfg.style || lib.isStorePath cfg.style then + cfg.style + else + pkgs.writeText "swaync/style.css" cfg.style; + }; + }; + + systemd.user.services.swaync = { + Unit = { + Description = "Swaync notification daemon"; + Documentation = "https://github.com/ErikReider/SwayNotificationCenter"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session-pre.target" ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; + }; + + Service = { + Type = "dbus"; + BusName = "org.freedesktop.Notifications"; + ExecStart = "${cfg.package}/bin/swaync"; + Restart = "on-failure"; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; +} diff --git a/third_party/home-manager/modules/services/swayosd.nix b/third_party/home-manager/modules/services/swayosd.nix index 067c104c31..79ca7f5ee4 100644 --- a/third_party/home-manager/modules/services/swayosd.nix +++ b/third_party/home-manager/modules/services/swayosd.nix @@ -16,12 +16,31 @@ in { package = mkPackageOption pkgs "swayosd" { }; - maxVolume = mkOption { - type = types.nullOr types.ints.unsigned; + topMargin = mkOption { + type = types.nullOr (types.addCheck types.float (f: f >= 0.0 && f <= 1.0) + // { + description = "float between 0.0 and 1.0 (inclusive)"; + }); default = null; - example = 120; + example = 1.0; + description = "OSD margin from top edge (0.5 would be screen center)."; + }; + + stylePath = mkOption { + type = types.nullOr types.path; + default = null; + example = "/etc/xdg/swayosd/style.css"; description = '' - Sets the maximum volume. + Use a custom Stylesheet file instead of looking for one. + ''; + }; + + display = mkOption { + type = types.nullOr types.str; + default = null; + example = "eDP-1"; + description = '' + X display to use. ''; }; }; @@ -45,9 +64,12 @@ in { Service = { Type = "simple"; - ExecStart = "${cfg.package}/bin/swayosd" - + (optionalString (cfg.maxVolume != null) - " --max-volume ${toString cfg.maxVolume}"); + ExecStart = "${cfg.package}/bin/swayosd-server" + + (optionalString (cfg.display != null) " --display ${cfg.display}") + + (optionalString (cfg.stylePath != null) + " --style ${escapeShellArg cfg.stylePath}") + + (optionalString (cfg.topMargin != null) + " --top-margin ${toString cfg.topMargin}"); Restart = "always"; }; diff --git a/third_party/home-manager/modules/services/window-managers/hyprland.nix b/third_party/home-manager/modules/services/window-managers/hyprland.nix index 9bf9cb2946..6b79248bae 100644 --- a/third_party/home-manager/modules/services/window-managers/hyprland.nix +++ b/third_party/home-manager/modules/services/window-managers/hyprland.nix @@ -9,7 +9,6 @@ let systemdActivation = '' exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd ${variables} ${extraCommands} ''; - in { meta.maintainers = [ lib.maintainers.fufexan ]; @@ -28,9 +27,12 @@ in { [ "wayland" "windowManager" "hyprland" "xwayland" "hidpi" ] "HiDPI patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland") - (lib.mkRenamedOptionModule # \ + (lib.mkRemovedOptionModule # \ [ "wayland" "windowManager" "hyprland" "nvidiaPatches" ] # \ - [ "wayland" "windowManager" "hyprland" "enableNvidiaPatches" ]) + "Nvidia patches are no longer needed") + (lib.mkRemovedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "enableNvidiaPatches" ] # \ + "Nvidia patches are no longer needed") (lib.mkRenamedOptionModule # \ [ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \ @@ -45,10 +47,7 @@ in { finalPackage = lib.mkOption { type = lib.types.package; readOnly = true; - default = cfg.package.override { - enableXWayland = cfg.xwayland.enable; - enableNvidiaPatches = cfg.enableNvidiaPatches; - }; + default = cfg.package.override { enableXWayland = cfg.xwayland.enable; }; defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration"; description = '' @@ -88,7 +87,7 @@ in { "WAYLAND_DISPLAY" "XDG_CURRENT_DESKTOP" ]; - example = [ "-all" ]; + example = [ "--all" ]; description = '' Environment variables to be imported in the systemd & D-Bus user environment. @@ -103,13 +102,14 @@ in { ]; description = "Extra commands to be run after D-Bus activation."; }; + + enableXdgAutostart = lib.mkEnableOption '' + autostart of applications using + {manpage}`systemd-xdg-autostart-generator(8)`''; }; xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; }; - enableNvidiaPatches = - lib.mkEnableOption "patching wlroots for better Nvidia support"; - settings = lib.mkOption { type = with lib.types; let @@ -181,6 +181,16 @@ in { '' // { default = true; }; + + importantPrefixes = lib.mkOption { + type = with lib.types; listOf str; + default = [ "$" "bezier" "name" ] + ++ lib.optionals cfg.sourceFirst [ "source" ]; + example = [ "$" "bezier" ]; + description = '' + List of prefix of attributes to source at the top of the config. + ''; + }; }; config = lib.mkIf cfg.enable { @@ -199,56 +209,40 @@ in { home.packages = lib.optional (cfg.package != null) cfg.finalPackage; xdg.configFile."hypr/hyprland.conf" = let - combinedSettings = cfg.settings // { - plugin = let - mkEntry = entry: - if lib.types.package.check entry then - "${entry}/lib/lib${entry.pname}.so" - else - entry; - in map mkEntry cfg.plugins; - }; - shouldGenerate = cfg.systemd.enable || cfg.extraConfig != "" - || combinedSettings != { }; + || cfg.settings != { } || cfg.plugins != [ ]; - toHyprconf = with lib; - attrs: indentLevel: - let - indent = concatStrings (replicate indentLevel " "); - - mkSection = n: attrs: '' - ${indent}${n} { - ${toHyprconf attrs (indentLevel + 1)}${indent}} - ''; - sections = filterAttrs (n: v: isAttrs v) attrs; - - mkFields = generators.toKeyValue { - listsAsDuplicateKeys = true; - inherit indent; + pluginsToHyprconf = plugins: + lib.hm.generators.toHyprconf { + attrs = { + plugin = let + mkEntry = entry: + if lib.types.package.check entry then + "${entry}/lib/lib${entry.pname}.so" + else + entry; + in map mkEntry cfg.plugins; }; - allFields = filterAttrs (n: v: !(isAttrs v)) attrs; - importantFields = filterAttrs (n: _: - (hasPrefix "$" n) || (hasPrefix "bezier" n) || (n == "plugin") - || (cfg.sourceFirst && (hasPrefix "source" n))) allFields; - fields = builtins.removeAttrs allFields - (mapAttrsToList (n: _: n) importantFields); - in mkFields importantFields - + concatStringsSep "\n" (mapAttrsToList mkSection sections) - + mkFields fields; + inherit (cfg) importantPrefixes; + }; in lib.mkIf shouldGenerate { text = lib.optionalString cfg.systemd.enable systemdActivation - + lib.optionalString (combinedSettings != { }) - (toHyprconf combinedSettings 0) - + lib.optionalString (cfg.extraConfig != "") cfg.extraConfig; + + lib.optionalString (cfg.plugins != [ ]) + (pluginsToHyprconf cfg.plugins) + + lib.optionalString (cfg.settings != { }) + (lib.hm.generators.toHyprconf { + attrs = cfg.settings; + inherit (cfg) importantPrefixes; + }) + lib.optionalString (cfg.extraConfig != "") cfg.extraConfig; onChange = lib.mkIf (cfg.package != null) '' - ( # Execute in subshell so we don't poision environment with vars - # This var must be set for hyprctl to function, but the value doesn't matter. - export HYPRLAND_INSTANCE_SIGNATURE="bogus" - for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do - HYPRLAND_INSTANCE_SIGNATURE=$i ${cfg.finalPackage}/bin/hyprctl reload config-only - done + ( + XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} + if [[ -d "/tmp/hypr" || -d "$XDG_RUNTIME_DIR/hypr" ]]; then + for i in $(${cfg.finalPackage}/bin/hyprctl instances -j | jq ".[].instance" -r); do + ${cfg.finalPackage}/bin/hyprctl -i "$i" reload config-only + done + fi ) ''; }; @@ -258,8 +252,12 @@ in { Description = "Hyprland compositor session"; Documentation = [ "man:systemd.special(7)" ]; BindsTo = [ "graphical-session.target" ]; - Wants = [ "graphical-session-pre.target" ]; + Wants = [ "graphical-session-pre.target" ] + ++ lib.optional cfg.systemd.enableXdgAutostart + "xdg-desktop-autostart.target"; After = [ "graphical-session-pre.target" ]; + Before = lib.mkIf cfg.systemd.enableXdgAutostart + [ "xdg-desktop-autostart.target" ]; }; }; diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/i3.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/i3.nix index 183463d313..8c64aee448 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/i3.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/i3.nix @@ -202,7 +202,7 @@ let ''; in { - meta.maintainers = with maintainers; [ sumnerevans sebtm ]; + meta.maintainers = with maintainers; [ sumnerevans ]; options = { xsession.windowManager.i3 = { diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/sway.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/sway.nix index 9031a0a70e..bc20e9d9bd 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/sway.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/sway.nix @@ -91,6 +91,7 @@ let "${cfg.config.modifier}+7" = "workspace number 7"; "${cfg.config.modifier}+8" = "workspace number 8"; "${cfg.config.modifier}+9" = "workspace number 9"; + "${cfg.config.modifier}+0" = "workspace number 10"; "${cfg.config.modifier}+Shift+1" = "move container to workspace number 1"; @@ -110,6 +111,8 @@ let "move container to workspace number 8"; "${cfg.config.modifier}+Shift+9" = "move container to workspace number 9"; + "${cfg.config.modifier}+Shift+0" = + "move container to workspace number 10"; "${cfg.config.modifier}+Shift+minus" = "move scratchpad"; "${cfg.config.modifier}+minus" = "scratchpad show"; @@ -253,63 +256,80 @@ let outputStr = moduleStr "output"; seatStr = moduleStr "seat"; - configFile = pkgs.writeText "sway.conf" (concatStringsSep "\n" - ((optional (cfg.extraConfigEarly != "") cfg.extraConfigEarly) - ++ (if cfg.config != null then - with cfg.config; - ([ - (fontConfigStr fonts) - "floating_modifier ${floating.modifier}" - (windowBorderString window floating) - "hide_edge_borders ${window.hideEdgeBorders}" - "focus_wrapping ${focus.wrapping}" - "focus_follows_mouse ${focus.followMouse}" - "focus_on_window_activation ${focus.newWindow}" - "mouse_warping ${ - if builtins.isString (focus.mouseWarping) then - focus.mouseWarping - else if focus.mouseWarping then - "output" - else - "none" - }" - "workspace_layout ${workspaceLayout}" - "workspace_auto_back_and_forth ${ - lib.hm.booleans.yesNo workspaceAutoBackAndForth - }" - "client.focused ${colorSetStr colors.focused}" - "client.focused_inactive ${colorSetStr colors.focusedInactive}" - "client.unfocused ${colorSetStr colors.unfocused}" - "client.urgent ${colorSetStr colors.urgent}" - "client.placeholder ${colorSetStr colors.placeholder}" - "client.background ${colors.background}" - (keybindingsStr { - keybindings = keybindingDefaultWorkspace; - bindsymArgs = - lib.optionalString (cfg.config.bindkeysToCode) "--to-code"; - }) - (keybindingsStr { - keybindings = keybindingsRest; - bindsymArgs = - lib.optionalString (cfg.config.bindkeysToCode) "--to-code"; - }) - (keycodebindingsStr keycodebindings) - ] ++ mapAttrsToList inputStr input - ++ mapAttrsToList outputStr output # outputs - ++ mapAttrsToList seatStr seat # seats - ++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes - ++ mapAttrsToList assignStr assigns # assigns - ++ map barStr bars # bars - ++ optional (gaps != null) gapsStr # gaps - ++ map floatingCriteriaStr floating.criteria # floating - ++ map windowCommandsStr window.commands # window commands - ++ map startupEntryStr startup # startup - ++ map workspaceOutputStr workspaceOutputAssign # custom mapping - ) - else - [ ]) ++ (optional cfg.systemd.enable '' - exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target"'') - ++ (optional (!cfg.xwayland) "xwayland disable") ++ [ cfg.extraConfig ])); + variables = concatStringsSep " " cfg.systemd.variables; + extraCommands = concatStringsSep " && " cfg.systemd.extraCommands; + swayPackage = if cfg.package == null then pkgs.sway else cfg.package; + systemdActivation = '' + exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd ${variables}; ${extraCommands}"''; + + configFile = pkgs.writeTextFile { + name = "sway.conf"; + + # Sway always does some init, see https://github.com/swaywm/sway/issues/4691 + checkPhase = lib.optionalString cfg.checkConfig '' + export DBUS_SESSION_BUS_ADDRESS=/dev/null + export XDG_RUNTIME_DIR=$(mktemp -d) + ${pkgs.xvfb-run}/bin/xvfb-run ${swayPackage}/bin/sway --config "$target" --validate --unsupported-gpu + ''; + + text = concatStringsSep "\n" + ((optional (cfg.extraConfigEarly != "") cfg.extraConfigEarly) + ++ (if cfg.config != null then + with cfg.config; + ([ + (fontConfigStr fonts) + "floating_modifier ${floating.modifier}" + (windowBorderString window floating) + "hide_edge_borders ${window.hideEdgeBorders}" + "focus_wrapping ${focus.wrapping}" + "focus_follows_mouse ${focus.followMouse}" + "focus_on_window_activation ${focus.newWindow}" + "mouse_warping ${ + if builtins.isString (focus.mouseWarping) then + focus.mouseWarping + else if focus.mouseWarping then + "output" + else + "none" + }" + "workspace_layout ${workspaceLayout}" + "workspace_auto_back_and_forth ${ + lib.hm.booleans.yesNo workspaceAutoBackAndForth + }" + "client.focused ${colorSetStr colors.focused}" + "client.focused_inactive ${colorSetStr colors.focusedInactive}" + "client.unfocused ${colorSetStr colors.unfocused}" + "client.urgent ${colorSetStr colors.urgent}" + "client.placeholder ${colorSetStr colors.placeholder}" + "client.background ${colors.background}" + (keybindingsStr { + keybindings = keybindingDefaultWorkspace; + bindsymArgs = + lib.optionalString (cfg.config.bindkeysToCode) "--to-code"; + }) + (keybindingsStr { + keybindings = keybindingsRest; + bindsymArgs = + lib.optionalString (cfg.config.bindkeysToCode) "--to-code"; + }) + (keycodebindingsStr keycodebindings) + ] ++ mapAttrsToList inputStr input + ++ mapAttrsToList outputStr output # outputs + ++ mapAttrsToList seatStr seat # seats + ++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes + ++ mapAttrsToList assignStr assigns # assigns + ++ map barStr bars # bars + ++ optional (gaps != null) gapsStr # gaps + ++ map floatingCriteriaStr floating.criteria # floating + ++ map windowCommandsStr window.commands # window commands + ++ map startupEntryStr startup # startup + ++ map workspaceOutputStr workspaceOutputAssign # custom mapping + ) + else + [ ]) ++ (optional cfg.systemd.enable systemdActivation) + ++ (optional (!cfg.xwayland) "xwayland disable") + ++ [ cfg.extraConfig ]); + }; defaultSwayPackage = pkgs.sway.override { extraSessionCommands = cfg.extraSessionCommands; @@ -323,7 +343,6 @@ in { Scrumplex alexarice sumnerevans - sebtm oxalica ]; @@ -364,6 +383,37 @@ in { * {env}`WAYLAND_DISPLAY` * {env}`SWAYSOCK` * {env}`XDG_CURRENT_DESKTOP` + * {env}`XDG_SESSION_TYPE` + * {env}`NIXOS_OZONE_WL` + * {env}`XCURSOR_THEME` + * {env}`XCURSOR_SIZE` + You can extend this list using the `systemd.variables` option. + ''; + }; + + variables = mkOption { + type = types.listOf types.str; + default = [ + "DISPLAY" + "WAYLAND_DISPLAY" + "SWAYSOCK" + "XDG_CURRENT_DESKTOP" + "XDG_SESSION_TYPE" + "NIXOS_OZONE_WL" + "XCURSOR_THEME" + "XCURSOR_SIZE" + ]; + example = [ "-all" ]; + description = '' + Environment variables imported into the systemd and D-Bus user environment. + ''; + }; + + extraCommands = mkOption { + type = types.listOf types.str; + default = [ "systemctl --user start sway-session.target" ]; + description = '' + Extra commands to run after D-Bus activation. ''; }; @@ -428,6 +478,13 @@ in { description = "Sway configuration options."; }; + checkConfig = mkOption { + type = types.bool; + default = true; + description = + "If enabled (the default), validates the generated config file."; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -465,9 +522,7 @@ in { home.packages = optional (cfg.package != null) cfg.package ++ optional cfg.xwayland pkgs.xwayland; - xdg.configFile."sway/config" = let - swayPackage = if cfg.package == null then pkgs.sway else cfg.package; - in { + xdg.configFile."sway/config" = { source = configFile; onChange = '' swaySocket="''${XDG_RUNTIME_DIR:-/run/user/$UID}/sway-ipc.$UID.$(${pkgs.procps}/bin/pgrep --uid $UID -x sway || true).sock" diff --git a/third_party/home-manager/modules/services/window-managers/river.nix b/third_party/home-manager/modules/services/window-managers/river.nix new file mode 100644 index 0000000000..06d458411d --- /dev/null +++ b/third_party/home-manager/modules/services/window-managers/river.nix @@ -0,0 +1,212 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) types; + cfg = config.wayland.windowManager.river; + + # Systemd integration + variables = builtins.concatStringsSep " " cfg.systemd.variables; + extraCommands = builtins.concatStringsSep " " + (map (f: "&& ${f}") cfg.systemd.extraCommands); + systemdActivation = '' + ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd ${variables} ${extraCommands} + ''; + + toValue = val: + if lib.isString val || lib.isDerivation val then + toString val + else if true == val then + "enabled" + else if false == val then + "disabled" + else if lib.isInt val then + toString val + else if lib.isFloat val then + lib.strings.floatToString val + else + abort "unsupported type ${builtins.typeOf val}"; + + # Intermediary function that converts some value (attrs, str, ...) to one or several commands. + toArgs = path: value: + + let + stringValue = lib.concatStringsSep " " (path ++ [ (toValue value) ]); + finalValue = if lib.isAttrs value then + toCommand path value + else if lib.isList value then + lib.lists.flatten (map (x: toArgs path x) value) + else if value == null then + [ ] + else + [ stringValue ]; + in finalValue; + + # toCommand :: [string] -> attrs -> [string] + # Recursive function that converts an attrs to a list of commands that can be written to the + # config file. + toCommand = basePath: attrs: + lib.concatLists (lib.mapAttrsToList + (key: value: let path = basePath ++ [ key ]; in toArgs path value) attrs); + +in { + meta.maintainers = [ lib.maintainers.GaetanLepage ]; + + options.wayland.windowManager.river = { + enable = lib.mkEnableOption "the river window manager"; + + package = lib.mkPackageOption pkgs "river" { + nullable = true; + extraDescription = '' + Set to `null` to not add any river package to your path. + This should be done if you want to use the NixOS river module to install river. + ''; + }; + + xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; }; + + systemd = { + enable = lib.mkEnableOption null // { + default = true; + description = '' + Whether to enable {file}`river-session.target` on + river startup. This links to {file}`graphical-session.target`}. + Some important environment variables will be imported to systemd + and D-Bus user environment before reaching the target, including + - `DISPLAY` + - `WAYLAND_DISPLAY` + - `XDG_CURRENT_DESKTOP` + - `NIXOS_OZONE_WL` + - `XCURSOR_THEME` + - `XCURSOR_SIZE` + ''; + }; + + variables = lib.mkOption { + type = types.listOf types.str; + default = [ + "DISPLAY" + "WAYLAND_DISPLAY" + "XDG_CURRENT_DESKTOP" + "NIXOS_OZONE_WL" + "XCURSOR_THEME" + "XCURSOR_SIZE" + ]; + example = [ "-all" ]; + description = '' + Environment variables to be imported in the systemd & D-Bus user + environment. + ''; + }; + + extraCommands = lib.mkOption { + type = types.listOf types.str; + default = [ + "systemctl --user stop river-session.target" + "systemctl --user start river-session.target" + ]; + description = "Extra commands to be run after D-Bus activation."; + }; + }; + + extraSessionVariables = lib.mkOption { + type = types.attrs; + default = { }; + description = "Extra session variables set when running the compositor."; + example = { MOZ_ENABLE_WAYLAND = "1"; }; + }; + + settings = lib.mkOption { + type = let + valueType = with types; + nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "River configuration value"; + }; + in valueType; + default = { }; + description = "General settings given to `riverctl`."; + example = { + border-width = 2; + declare-mode = [ "locked" "normal" "passthrough" ]; + map.normal."Alt Q" = "close"; + input.pointer-foo-bar = { + accel-profile = "flat"; + events = true; + pointer-accel = -0.3; + tap = false; + }; + rule-add."-app-id" = { + "'bar'" = "csd"; + "'float*'"."-title"."'foo'" = "float"; + }; + set-cursor-warp = "on-output-change"; + set-repeat = "50 300"; + xcursor-theme = "someGreatTheme 12"; + spawn = [ "firefox" "'foot -a terminal'" ]; + }; + }; + + extraConfig = lib.mkOption { + type = types.lines; + default = ""; + example = '' + rivertile -view-padding 6 -outer-padding 6 & + ''; + description = + "Extra lines appended to {file}`$XDG_CONFIG_HOME/river/init`."; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "wayland.windowManager.river" pkgs + lib.platforms.linux) + ]; + + home.packages = lib.optional (cfg.package != null) cfg.package + ++ lib.optional cfg.xwayland.enable pkgs.xwayland; + + # Configuration file ~/.config/river/init + xdg.configFile."river/init".source = pkgs.writeShellScript "init" ('' + ### This file was generated with Nix. Don't modify this file directly. + + ### SHELL VARIABLES ### + ${config.lib.shell.exportAll cfg.extraSessionVariables} + + ### CONFIGURATION ### + ${lib.concatStringsSep "\n" (toCommand [ "riverctl" ] cfg.settings)} + + ### EXTRA CONFIGURATION ### + ${cfg.extraConfig} + + '' + (lib.optionalString cfg.systemd.enable '' + ### SYSTEMD INTEGRATION ### + ${systemdActivation} + '')); + + # Systemd integration + systemd.user.targets.river-session = lib.mkIf cfg.systemd.enable { + Unit = { + Description = "river compositor session"; + Documentation = [ "man:systemd.special(7)" ]; + BindsTo = [ "graphical-session.target" ]; + Wants = [ "graphical-session-pre.target" ]; + After = [ "graphical-session-pre.target" ]; + }; + }; + + systemd.user.targets.tray = { + Unit = { + Description = "Home Manager System Tray"; + Requires = [ "graphical-session-pre.target" ]; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/window-managers/xmonad.nix b/third_party/home-manager/modules/services/window-managers/xmonad.nix index 59b403d306..076f3cd47b 100644 --- a/third_party/home-manager/modules/services/window-managers/xmonad.nix +++ b/third_party/home-manager/modules/services/window-managers/xmonad.nix @@ -124,6 +124,7 @@ in { cfg.libFiles) }) for key in "''${!libFiles[@]}"; do + mkdir -p "xmonad-config/lib/$(dirname "$key")" cp "''${libFiles[$key]}" "xmonad-config/lib/$key"; done diff --git a/third_party/home-manager/modules/services/wlsunset.nix b/third_party/home-manager/modules/services/wlsunset.nix index 3bc3f2f74c..f3352750c1 100644 --- a/third_party/home-manager/modules/services/wlsunset.nix +++ b/third_party/home-manager/modules/services/wlsunset.nix @@ -11,7 +11,7 @@ in { enable = mkEnableOption "wlsunset"; package = mkOption { - type = types.package; + type = with types; package; default = pkgs.wlsunset; defaultText = "pkgs.wlsunset"; description = '' @@ -20,7 +20,9 @@ in { }; latitude = mkOption { - type = types.str; + type = with types; nullOr (either str (either float int)); + default = null; + example = -74.3; description = '' Your current latitude, between `-90.0` and `90.0`. @@ -28,7 +30,9 @@ in { }; longitude = mkOption { - type = types.str; + type = with types; nullOr (either str (either float int)); + default = null; + example = 12.5; description = '' Your current longitude, between `-180.0` and `180.0`. @@ -37,7 +41,7 @@ in { temperature = { day = mkOption { - type = types.int; + type = with types; int; default = 6500; description = '' Colour temperature to use during the day, in Kelvin (K). @@ -46,7 +50,7 @@ in { }; night = mkOption { - type = types.int; + type = with types; int; default = 4000; description = '' Colour temperature to use during the night, in Kelvin (K). @@ -56,15 +60,42 @@ in { }; gamma = mkOption { - type = types.str; - default = "1.0"; + type = with types; (either str (either float int)); + default = 1.0; + example = 0.6; description = '' Gamma value to use. ''; }; + output = mkOption { + type = with types; nullOr str; + default = null; + description = '' + Name of output to use, by default all outputs are used. + ''; + }; + + sunrise = mkOption { + type = with types; nullOr str; + default = null; + example = "06:30"; + description = '' + The time when the sun rises (in 24 hour format). + ''; + }; + + sunset = mkOption { + type = with types; nullOr str; + default = null; + example = "18:00"; + description = '' + The time when the sun sets (in 24 hour format). + ''; + }; + systemdTarget = mkOption { - type = types.str; + type = with types; str; default = "graphical-session.target"; description = '' Systemd target to bind to. @@ -76,6 +107,22 @@ in { assertions = [ (lib.hm.assertions.assertPlatform "services.wlsunset" pkgs lib.platforms.linux) + { + assertion = (cfg.sunrise != null || cfg.sunset != null) + != (cfg.latitude != null || cfg.longitude != null); + message = + "Either `sunrise` and `sunset` together or `longitude` and `latitude` together must be set for wlsunset"; + } + { + assertion = (cfg.sunrise != null) == (cfg.sunset != null); + message = + "Both `sunset` and `sunrise` together must be set for wlsunset"; + } + { + assertion = (cfg.latitude != null) == (cfg.longitude != null); + message = + "Both `latitude and `longitude` together must be set for wlsunset"; + } ]; systemd.user.services.wlsunset = { @@ -86,14 +133,17 @@ in { Service = { ExecStart = let - args = [ - "-l ${cfg.latitude}" - "-L ${cfg.longitude}" - "-t ${toString cfg.temperature.night}" - "-T ${toString cfg.temperature.day}" - "-g ${cfg.gamma}" - ]; - in "${cfg.package}/bin/wlsunset ${concatStringsSep " " args}"; + args = cli.toGNUCommandLineShell { } { + t = cfg.temperature.night; + T = cfg.temperature.day; + g = cfg.gamma; + l = cfg.latitude; + L = cfg.longitude; + S = cfg.sunrise; + s = cfg.sunset; + o = cfg.output; + }; + in "${cfg.package}/bin/wlsunset ${args}"; }; Install = { WantedBy = [ cfg.systemdTarget ]; }; diff --git a/third_party/home-manager/modules/services/wob.nix b/third_party/home-manager/modules/services/wob.nix new file mode 100644 index 0000000000..8ca1befa84 --- /dev/null +++ b/third_party/home-manager/modules/services/wob.nix @@ -0,0 +1,79 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) + getExe literalExpression mkEnableOption mkIf mkOption mkPackageOption + optional; + + cfg = config.services.wob; + settingsFormat = pkgs.formats.ini { }; + + configFile = settingsFormat.generate "wob.ini" cfg.settings; +in { + meta.maintainers = with lib.maintainers; [ Scrumplex ]; + + options.services.wob = { + enable = mkEnableOption "wob"; + package = mkPackageOption pkgs "wob" { }; + + settings = mkOption { + type = settingsFormat.type; + default = { }; + example = literalExpression '' + { + "" = { + border_size = 10; + height = 50; + }; + "output.foo".name = "DP-1"; + "style.muted".background_color = "032cfc"; + } + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/wob/wob.ini`. + See {manpage}`wob.ini(5)` for documentation. + ''; + }; + + systemd = mkEnableOption "systemd service and socket for wob" + // mkOption { default = true; }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.wob" pkgs lib.platforms.linux) + ]; + + systemd.user = mkIf cfg.systemd { + services.wob = { + Unit = { + Description = + "A lightweight overlay volume/backlight/progress/anything bar for Wayland"; + Documentation = "man:wob(1)"; + PartOf = "graphical-session.target"; + After = "graphical-session.target"; + ConditionEnvironment = "WAYLAND_DISPLAY"; + }; + Service = { + StandardInput = "socket"; + ExecStart = builtins.concatStringsSep " " ([ (getExe cfg.package) ] + ++ optional (cfg.settings != { }) "--config ${configFile}"); + }; + Install.WantedBy = [ "graphical-session.target" ]; + }; + + sockets.wob = { + Socket = { + ListenFIFO = "%t/wob.sock"; + SocketMode = "0600"; + RemoveOnStop = "yes"; + FlushPending = "yes"; + }; + Install.WantedBy = [ "sockets.target" ]; + }; + }; + + xdg.configFile."wob/wob.ini" = + mkIf (cfg.settings != { }) { source = configFile; }; + }; +} diff --git a/third_party/home-manager/modules/services/xscreensaver.nix b/third_party/home-manager/modules/services/xscreensaver.nix index 3ae92658f0..6205e3ee81 100644 --- a/third_party/home-manager/modules/services/xscreensaver.nix +++ b/third_party/home-manager/modules/services/xscreensaver.nix @@ -25,6 +25,13 @@ in { The settings to use for XScreenSaver. ''; }; + + package = mkOption { + type = with types; package; + default = pkgs.xscreensaver; + defaultText = lib.literalExpression "pkgs.xscreensaver"; + description = "Which xscreensaver package to use."; + }; }; }; @@ -35,7 +42,7 @@ in { ]; # To make the xscreensaver-command tool available. - home.packages = [ pkgs.xscreensaver ]; + home.packages = [ cfg.package ]; xresources.properties = mapAttrs' (n: nameValuePair "xscreensaver.${n}") cfg.settings; @@ -52,8 +59,8 @@ in { }; Service = { - ExecStart = "${pkgs.xscreensaver}/bin/xscreensaver -no-splash"; - Environment = "PATH=${makeBinPath [ pkgs.xscreensaver ]}"; + ExecStart = "${cfg.package}/bin/xscreensaver -no-splash"; + Environment = "PATH=${makeBinPath [ cfg.package ]}"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/third_party/home-manager/modules/systemd-activate.sh b/third_party/home-manager/modules/systemd-activate.sh index 1c464693cf..235f1a241c 100644 --- a/third_party/home-manager/modules/systemd-activate.sh +++ b/third_party/home-manager/modules/systemd-activate.sh @@ -110,5 +110,10 @@ function systemdPostReload() { oldGenPath="$1" newGenPath="$2" -$DRY_RUN_CMD systemctl --user daemon-reload +if [[ -v DRY_RUN ]]; then + echo systemctl --user daemon-reload +else + systemctl --user daemon-reload +fi + systemdPostReload diff --git a/third_party/home-manager/modules/systemd.nix b/third_party/home-manager/modules/systemd.nix index 041b9dfacb..f209f65dd4 100644 --- a/third_party/home-manager/modules/systemd.nix +++ b/third_party/home-manager/modules/systemd.nix @@ -5,8 +5,8 @@ let cfg = config.systemd.user; inherit (lib) - any attrValues getAttr hm isBool literalExpression mkIf mkMerge mkOption - types; + any attrValues getAttr hm isBool literalExpression mkIf mkMerge + mkEnableOption mkOption types; settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; @@ -105,6 +105,11 @@ in { options = { systemd.user = { + enable = mkEnableOption "the user systemd service manager" // { + default = pkgs.stdenv.isLinux; + defaultText = literalExpression "pkgs.stdenv.isLinux"; + }; + systemctlPath = mkOption { default = "${pkgs.systemd}/bin/systemctl"; defaultText = literalExpression ''"''${pkgs.systemd}/bin/systemctl"''; @@ -286,7 +291,12 @@ in { # If we run under a Linux system we assume that systemd is # available, in particular we assume that systemctl is in PATH. # Do not install any user services if username is root. - config = mkIf (pkgs.stdenv.isLinux && config.home.username != "root") { + config = mkIf (cfg.enable && config.home.username != "root") { + assertions = [{ + assertion = pkgs.stdenv.isLinux; + message = "This module is only available on Linux."; + }]; + xdg.configFile = mkMerge [ (lib.listToAttrs ((buildServices "service" cfg.services) ++ (buildServices "slice" cfg.slices) diff --git a/third_party/home-manager/modules/targets/darwin/fonts.nix b/third_party/home-manager/modules/targets/darwin/fonts.nix index 2c55822787..988c5edc97 100644 --- a/third_party/home-manager/modules/targets/darwin/fonts.nix +++ b/third_party/home-manager/modules/targets/darwin/fonts.nix @@ -10,20 +10,17 @@ let pathsToLink = "/share/fonts"; }; fonts = "${fontsEnv}/share/fonts"; + installDir = "${homeDir}/Library/Fonts/HomeManager"; in { # macOS won't recognize symlinked fonts config = mkIf pkgs.stdenv.hostPlatform.isDarwin { - home.activation.copyFonts = hm.dag.entryAfter [ "writeBoundary" ] '' - copyFonts() { - rm -rf ${homeDir}/Library/Fonts/HomeManager || : - - local f - find -L "${fonts}" -type f -printf '%P\0' | while IFS= read -rd "" f; do - $DRY_RUN_CMD install $VERBOSE_ARG -Dm644 -T \ - "${fonts}/$f" "${homeDir}/Library/Fonts/HomeManager/$f" - done - } - copyFonts - ''; + home.file."Library/Fonts/.home-manager-fonts-version" = { + text = "${fontsEnv}"; + onChange = '' + run mkdir -p ${escapeShellArg installDir} + run ${pkgs.rsync}/bin/rsync $VERBOSE_ARG -acL --chmod=u+w --delete \ + ${escapeShellArgs [ "${fonts}/" installDir ]} + ''; + }; }; } diff --git a/third_party/home-manager/modules/targets/darwin/keybindings.nix b/third_party/home-manager/modules/targets/darwin/keybindings.nix index c4348333fe..96800073c1 100644 --- a/third_party/home-manager/modules/targets/darwin/keybindings.nix +++ b/third_party/home-manager/modules/targets/darwin/keybindings.nix @@ -37,8 +37,8 @@ in { # NOTE: just copy the files because symlinks won't be recognized by macOS home.activation.setCocoaKeybindings = hm.dag.entryAfter [ "writeBoundary" ] '' - $VERBOSE_ECHO "Configuring keybindings for the Cocoa Text System" - $DRY_RUN_CMD install -Dm644 $VERBOSE_ARG \ + verboseEcho "Configuring keybindings for the Cocoa Text System" + run install -Dm644 $VERBOSE_ARG \ "${confFile}" "${homeDir}/Library/KeyBindings/DefaultKeyBinding.dict" ''; }; diff --git a/third_party/home-manager/modules/targets/darwin/user-defaults/default.nix b/third_party/home-manager/modules/targets/darwin/user-defaults/default.nix index 8d4e17a208..97342d36bb 100644 --- a/third_party/home-manager/modules/targets/darwin/user-defaults/default.nix +++ b/third_party/home-manager/modules/targets/darwin/user-defaults/default.nix @@ -13,9 +13,9 @@ let cliFlags = lib.optionalString isLocal "-currentHost"; toActivationCmd = domain: attrs: - "$DRY_RUN_CMD /usr/bin/defaults ${cliFlags} import ${ - escapeShellArg domain - } ${toDefaultsFile domain attrs}"; + "run /usr/bin/defaults ${cliFlags} import ${escapeShellArg domain} ${ + toDefaultsFile domain attrs + }"; nonNullDefaults = mapAttrs (domain: attrs: (filterAttrs (n: v: v != null) attrs)) @@ -100,7 +100,7 @@ in { ''; home.activation.setDarwinDefaults = hm.dag.entryAfter [ "writeBoundary" ] '' - $VERBOSE_ECHO "Configuring macOS user defaults" + verboseEcho "Configuring macOS user defaults" ${concatStringsSep "\n" activationCmds} ''; }; diff --git a/third_party/home-manager/modules/targets/darwin/user-defaults/opts-allhosts.nix b/third_party/home-manager/modules/targets/darwin/user-defaults/opts-allhosts.nix index 820f05b3d8..4a4f106718 100644 --- a/third_party/home-manager/modules/targets/darwin/user-defaults/opts-allhosts.nix +++ b/third_party/home-manager/modules/targets/darwin/user-defaults/opts-allhosts.nix @@ -41,6 +41,19 @@ in { description = "Sets the measurement unit."; }; + ApplePressAndHoldEnabled = mkNullableOption { + type = types.bool; + example = true; + description = + "Repeat a key when it is held down (false) or display the accented character selector (true)"; + }; + + AppleShowAllExtensions = mkNullableOption { + type = types.bool; + example = true; + description = "Always show file extensions in Finder"; + }; + AppleTemperatureUnit = mkNullableOption { type = types.enum [ "Celsius" "Fahrenheit" ]; example = "Celsius"; @@ -49,6 +62,16 @@ in { AppleMetricUnits = mkNullableEnableOption "the metric system"; + KeyRepeat = mkNullableOption { + type = types.int; + example = 2; + description = '' + Interval between key repetitions when holding down a key. Lower is + faster. When setting through the control panel, 2 is the lowest value, + and 120 the highest. + ''; + }; + NSAutomaticCapitalizationEnabled = mkNullableEnableOption "automatic capitalization"; @@ -85,14 +108,50 @@ in { }; "com.apple.dock" = { + autohide = mkNullableOption { + type = types.bool; + example = true; + description = "Hide the Dock automatically"; + }; + expose-group-apps = mkNullableEnableOption + "grouping of windows by application in Mission Control"; + orientation = mkNullableOption { + type = types.enum [ "left" "bottom" "right" ]; + example = "left"; + description = "Position of the Dock on the screen"; + }; + size-immutable = mkNullableEnableOption "locking of the dock size"; tilesize = mkNullableOption { type = types.int; example = 64; description = "Sets the size of the dock."; }; - size-immutable = mkNullableEnableOption "locking of the dock size"; - expose-group-apps = mkNullableEnableOption - "grouping of windows by application in Mission Control"; + }; + + "com.apple.finder" = { + AppleShowAllFiles = mkNullableOption { + type = types.bool; + example = true; + description = "Show hidden files in Finder"; + }; + + FXRemoveOldTrashItems = mkNullableOption { + type = types.bool; + example = true; + description = "Automatically delete items from trash after 30 days"; + }; + + ShowPathBar = mkNullableOption { + type = types.bool; + example = true; + description = "Show the path bar at the bottom of a Finder window"; + }; + + ShowStatusBar = mkNullableOption { + type = types.bool; + example = true; + description = "Show the status bar at the bottom of a Finder window"; + }; }; "com.apple.menuextra.battery".ShowPercent = mkNullableOption { @@ -106,6 +165,41 @@ in { ''; }; + "com.apple.menuextra.clock" = { + IsAnalog = mkNullableEnableOption + "showing an analog clock instead of a digital one"; + + Show24Hour = mkNullableEnableOption + "showing a 24-hour clock, instead of a 12-hour clock"; + + ShowAMPM = mkNullableOption { + type = types.bool; + description = '' + Show the AM/PM label. Useful if Show24Hour is false. Default is null. + ''; + }; + + ShowDate = mkNullableOption { + type = types.enum [ 0 1 2 ]; + description = '' + Show the full date. Default is null. + + 0 = Show the date + 1 = Don't show + 2 = Don't show + + TODO: I don't know what the difference is between 1 and 2. + ''; + }; + + ShowDayOfMonth = mkNullableEnableOption "showing the day of the month"; + + ShowDayOfWeek = mkNullableEnableOption "showing the day of the week"; + + ShowSeconds = mkNullableEnableOption + "showing the clock with second precision, instead of minutes"; + }; + "com.apple.Safari" = { AutoOpenSafeDownloads = mkNullableEnableOption "opening of downloaded files"; diff --git a/third_party/home-manager/modules/targets/generic-linux.nix b/third_party/home-manager/modules/targets/generic-linux.nix index b5a07d5fac..9dce9f5c84 100644 --- a/third_party/home-manager/modules/targets/generic-linux.nix +++ b/third_party/home-manager/modules/targets/generic-linux.nix @@ -99,7 +99,11 @@ in { "/usr/share/terminfo" # package default, all distros ]; in { - NIX_PATH = "$HOME/.nix-defexpr/channels\${NIX_PATH:+:}$NIX_PATH"; + NIX_PATH = if config.nix.enable + && (config.nix.settings.use-xdg-base-directories or false) then + "${config.xdg.stateHome}/nix/defexpr/channels\${NIX_PATH:+:}$NIX_PATH" + else + "$HOME/.nix-defexpr/channels\${NIX_PATH:+:}$NIX_PATH"; TERMINFO_DIRS = "${profileDirectory}/share/terminfo:$TERMINFO_DIRS\${TERMINFO_DIRS:+:}${distroTerminfoDirs}"; }; diff --git a/third_party/home-manager/modules/xsession.nix b/third_party/home-manager/modules/xsession.nix index d8e2a71c22..269ce1fa0d 100644 --- a/third_party/home-manager/modules/xsession.nix +++ b/third_party/home-manager/modules/xsession.nix @@ -139,6 +139,7 @@ in { Service = { Type = "forking"; + Restart = "on-failure"; ExecStart = let script = pkgs.writeShellScript "xplugrc" '' case "$1,$3" in diff --git a/third_party/home-manager/nixos/common.nix b/third_party/home-manager/nixos/common.nix index 5da3240b97..08491be9b1 100644 --- a/third_party/home-manager/nixos/common.nix +++ b/third_party/home-manager/nixos/common.nix @@ -13,6 +13,7 @@ let hmModule = types.submoduleWith { description = "Home Manager module"; + class = "homeManager"; specialArgs = { lib = extendedLib; osConfig = config; diff --git a/third_party/home-manager/release.json b/third_party/home-manager/release.json index c5b5ecfdd3..e5d3102cf2 100644 --- a/third_party/home-manager/release.json +++ b/third_party/home-manager/release.json @@ -1,4 +1,4 @@ { - "release": "24.05", + "release": "24.11", "isReleaseBranch": false } diff --git a/third_party/home-manager/tests/default.nix b/third_party/home-manager/tests/default.nix index d5a5be7065..4d8d49d456 100644 --- a/third_party/home-manager/tests/default.nix +++ b/third_party/home-manager/tests/default.nix @@ -1,49 +1,44 @@ -{ pkgs ? import {}, enableBig ? true }: +{ pkgs ? import { }, enableBig ? true }: let lib = import ../modules/lib/stdlib-extended.nix pkgs.lib; - nmt = fetchTarball { - url = - "https://gitlab.com/api/v4/projects/rycee%2Fnmt/repository/archive.tar.gz?sha=4df00c569b1badfedffecd7ccd60f794550486db"; - sha256 = "1cyly1zazgj8z6bazml4js7lqaqvpp8lw045aqchlpvp42bl1lp4"; + nmtSrc = fetchTarball { + url = "https://git.sr.ht/~rycee/nmt/archive/v0.5.1.tar.gz"; + sha256 = "0qhn7nnwdwzh910ss78ga2d00v42b0lspfd7ybl61mpfgz3lmdcj"; }; modules = import ../modules/modules.nix { inherit lib pkgs; check = false; - } ++ [ - { - # Bypass reference inside modules/modules.nix to make the test - # suite more pure. - _module.args.pkgsPath = pkgs.path; + } ++ [{ + # Bypass reference inside modules/modules.nix to make the test + # suite more pure. + _module.args.pkgsPath = pkgs.path; - # Fix impurities. Without these some of the user's environment - # will leak into the tests through `builtins.getEnv`. - xdg.enable = true; - home = { - username = "hm-user"; - homeDirectory = "/home/hm-user"; - stateVersion = lib.mkDefault "18.09"; - }; + # Fix impurities. Without these some of the user's environment + # will leak into the tests through `builtins.getEnv`. + xdg.enable = true; + home = { + username = "hm-user"; + homeDirectory = "/home/hm-user"; + stateVersion = lib.mkDefault "18.09"; + }; - # Avoid including documentation since this will cause - # unnecessary rebuilds of the tests. - manual.manpages.enable = lib.mkDefault false; + # Avoid including documentation since this will cause + # unnecessary rebuilds of the tests. + manual.manpages.enable = lib.mkDefault false; - imports = [ ./asserts.nix ./big-test.nix ./stubs.nix ]; + imports = [ ./asserts.nix ./big-test.nix ./stubs.nix ]; - test.enableBig = enableBig; - } - ]; + test.enableBig = enableBig; + }]; isDarwin = pkgs.stdenv.hostPlatform.isDarwin; isLinux = pkgs.stdenv.hostPlatform.isLinux; -in - -import nmt { +in import nmtSrc { inherit lib pkgs modules; testedAttrPath = [ "home" "activationPackage" ]; tests = builtins.foldl' (a: b: a // (import b)) { } ([ @@ -76,6 +71,7 @@ import nmt { ./modules/programs/dircolors ./modules/programs/direnv ./modules/programs/emacs + ./modules/programs/fastfetch ./modules/programs/feh ./modules/programs/fish ./modules/programs/gallery-dl @@ -93,6 +89,7 @@ import nmt { ./modules/programs/i3status ./modules/programs/irssi ./modules/programs/jujutsu + ./modules/programs/joplin-desktop ./modules/programs/k9s ./modules/programs/kakoune ./modules/programs/khal @@ -106,6 +103,7 @@ import nmt { ./modules/programs/man ./modules/programs/mbsync ./modules/programs/micro + ./modules/programs/mise ./modules/programs/mpv ./modules/programs/mu ./modules/programs/mujmap @@ -125,26 +123,30 @@ import nmt { ./modules/programs/pet ./modules/programs/pistol ./modules/programs/pls + ./modules/programs/poetry ./modules/programs/powerline-go ./modules/programs/pubs ./modules/programs/pyenv ./modules/programs/qcal ./modules/programs/qutebrowser + ./modules/programs/ranger ./modules/programs/readline ./modules/programs/rio ./modules/programs/ripgrep - ./modules/programs/rtx ./modules/programs/ruff ./modules/programs/sagemath ./modules/programs/sapling ./modules/programs/sbt ./modules/programs/scmpuff + ./modules/programs/senpai ./modules/programs/sftpman ./modules/programs/sioyek ./modules/programs/sm64ex + ./modules/programs/spotify-player ./modules/programs/ssh ./modules/programs/starship ./modules/programs/taskwarrior + ./modules/programs/tealdeer ./modules/programs/texlive ./modules/programs/thefuck ./modules/programs/tmate @@ -157,14 +159,17 @@ import nmt { ./modules/programs/wezterm ./modules/programs/yazi ./modules/programs/zellij + ./modules/programs/zk ./modules/programs/zplug ./modules/programs/zsh ./modules/services/syncthing/common ./modules/xresources ] ++ lib.optionals isDarwin [ ./modules/launchd + ./modules/services/espanso-darwin ./modules/services/git-sync-darwin ./modules/services/imapnotify-darwin + ./modules/services/nix-gc-darwin ./modules/targets-darwin ] ++ lib.optionals isLinux [ ./modules/config/i18n @@ -180,16 +185,19 @@ import nmt { ./modules/programs/abook ./modules/programs/autorandr ./modules/programs/awscli - ./modules/programs/beets # One test relies on services.mpd + ./modules/programs/beets # One test relies on services.mpd ./modules/programs/bemenu ./modules/programs/borgmatic ./modules/programs/boxxy ./modules/programs/firefox ./modules/programs/foot + ./modules/programs/freetube ./modules/programs/fuzzel ./modules/programs/getmail + ./modules/programs/gnome-shell ./modules/programs/gnome-terminal ./modules/programs/hexchat + ./modules/programs/hyprlock ./modules/programs/i3blocks ./modules/programs/i3status-rust ./modules/programs/imv @@ -205,12 +213,15 @@ import nmt { ./modules/programs/swayr ./modules/programs/terminator ./modules/programs/thunderbird + ./modules/programs/tofi ./modules/programs/waybar ./modules/programs/wlogout ./modules/programs/wofi ./modules/programs/wpaperd ./modules/programs/xmobar + ./modules/programs/yambar ./modules/programs/yt-dlp + ./modules/services/activitywatch ./modules/services/avizo ./modules/services/barrier ./modules/services/borgmatic @@ -218,6 +229,7 @@ import nmt { ./modules/services/cliphist ./modules/services/clipman ./modules/services/comodoro + ./modules/services/conky ./modules/services/darkman ./modules/services/devilspie2 ./modules/services/dropbox @@ -231,6 +243,8 @@ import nmt { ./modules/services/gpg-agent ./modules/services/gromit-mpx ./modules/services/home-manager-auto-upgrade + ./modules/services/hypridle + ./modules/services/hyprpaper ./modules/services/imapnotify ./modules/services/kanshi ./modules/services/lieer @@ -238,6 +252,7 @@ import nmt { ./modules/services/mpd ./modules/services/mpd-mpris ./modules/services/mpdris2 + ./modules/services/nix-gc ./modules/services/osmscout-server ./modules/services/pantalaimon ./modules/services/parcellite @@ -249,9 +264,11 @@ import nmt { ./modules/services/polybar ./modules/services/recoll ./modules/services/redshift-gammastep + ./modules/services/remmina ./modules/services/screen-locker ./modules/services/signaturepdf ./modules/services/swayidle + ./modules/services/swaync ./modules/services/swayosd ./modules/services/sxhkd ./modules/services/syncthing/linux @@ -262,9 +279,11 @@ import nmt { ./modules/services/window-managers/herbstluftwm ./modules/services/window-managers/hyprland ./modules/services/window-managers/i3 + ./modules/services/window-managers/river ./modules/services/window-managers/spectrwm ./modules/services/window-managers/sway ./modules/services/wlsunset + ./modules/services/wob ./modules/services/xsettingsd ./modules/systemd ./modules/targets-linux diff --git a/third_party/home-manager/tests/integration/default.nix b/third_party/home-manager/tests/integration/default.nix new file mode 100644 index 0000000000..c31030172c --- /dev/null +++ b/third_party/home-manager/tests/integration/default.nix @@ -0,0 +1,20 @@ +{ pkgs }: + +let + nixosLib = import "${pkgs.path}/nixos/lib" { }; + + runTest = test: + nixosLib.runTest { + imports = [ test { node.pkgs = pkgs; } ]; + hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs + }; + + tests = { + nixos-basics = runTest ./nixos/basics.nix; + standalone-flake-basics = runTest ./standalone/flake-basics.nix; + standalone-standard-basics = runTest ./standalone/standard-basics.nix; + }; +in tests // { + all = pkgs.linkFarm "all" + (pkgs.lib.mapAttrsToList (name: path: { inherit name path; }) tests); +} diff --git a/third_party/home-manager/tests/integration/nixos/basics.nix b/third_party/home-manager/tests/integration/nixos/basics.nix new file mode 100644 index 0000000000..001623ca55 --- /dev/null +++ b/third_party/home-manager/tests/integration/nixos/basics.nix @@ -0,0 +1,95 @@ +{ pkgs, ... }: + +{ + name = "nixos-basics"; + meta.maintainers = [ pkgs.lib.maintainers.rycee ]; + + nodes.machine = { ... }: { + imports = [ ../../../nixos ]; # Import the HM NixOS module. + + users.users.alice = { + isNormalUser = true; + description = "Alice Foobar"; + password = "foobar"; + uid = 1000; + }; + + home-manager.users.alice = { ... }: { + home.stateVersion = "24.05"; + home.file.test.text = "testfile"; + # Enable a light-weight systemd service. + services.pueue.enable = true; + # We focus on sd-switch since that hopefully will become the default in + # the future. + systemd.user.startServices = "sd-switch"; + }; + }; + + testScript = '' + def login_as_alice(): + machine.wait_until_tty_matches("1", "login: ") + machine.send_chars("alice\n") + machine.wait_until_tty_matches("1", "Password: ") + machine.send_chars("foobar\n") + machine.wait_until_tty_matches("1", "alice\@machine") + + def logout_alice(): + machine.send_chars("exit\n") + + def alice_cmd(cmd): + return f"su -l alice --shell /bin/sh -c $'export XDG_RUNTIME_DIR=/run/user/$UID ; {cmd}'" + + def succeed_as_alice(cmd): + return machine.succeed(alice_cmd(cmd)) + + def fail_as_alice(cmd): + return machine.fail(alice_cmd(cmd)) + + start_all() + + machine.wait_for_unit("home-manager-alice.service") + + with subtest("Home Manager file"): + # The file should be linked with the expected content. + path = "/home/alice/test" + machine.succeed(f"test -L {path}") + actual = machine.succeed(f"cat {path}") + expected = "testfile" + assert actual == expected, f"expected {path} to contain {expected}, but got {actual}" + + with subtest("Pueue service"): + login_as_alice() + + actual = succeed_as_alice("pueue status") + expected = "running" + assert expected in actual, f"expected pueue status to contain {expected}, but got {actual}" + + # Shut down pueue, then run the activation again. Afterwards, the service + # should be running. + machine.succeed("systemctl --user -M alice@.host stop pueued.service") + + fail_as_alice("pueue status") + + machine.systemctl("restart home-manager-alice.service") + machine.wait_for_unit("home-manager-alice.service") + + actual = succeed_as_alice("pueue status") + expected = "running" + assert expected in actual, f"expected pueue status to contain {expected}, but got {actual}" + + logout_alice() + + with subtest("GC root and profile"): + # There should be a GC root and Home Manager profile and they should point + # to the same path in the Nix store. + gcroot = "/home/alice/.local/state/home-manager/gcroots/current-home" + gcrootTarget = machine.succeed(f"readlink {gcroot}") + + profile = "/home/alice/.local/state/nix/profiles" + profileTarget = machine.succeed(f"readlink {profile}/home-manager") + profile1Target = machine.succeed(f"readlink {profile}/{profileTarget}") + + assert gcrootTarget == profile1Target, \ + f"expected GC root and profile to point to same, but pointed to {gcrootTarget} and {profile1Target}" + ''; +} diff --git a/third_party/home-manager/tests/integration/standalone/alice-flake-init.nix b/third_party/home-manager/tests/integration/standalone/alice-flake-init.nix new file mode 100644 index 0000000000..323b4b52f9 --- /dev/null +++ b/third_party/home-manager/tests/integration/standalone/alice-flake-init.nix @@ -0,0 +1,29 @@ +{ + description = "Home Manager configuration of alice"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "nixpkgs"; + home-manager = { + url = "home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + homeConfigurations."alice" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./home.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + }; + }; +} diff --git a/third_party/home-manager/tests/integration/standalone/alice-home-init.nix b/third_party/home-manager/tests/integration/standalone/alice-home-init.nix new file mode 100644 index 0000000000..ab9786f804 --- /dev/null +++ b/third_party/home-manager/tests/integration/standalone/alice-home-init.nix @@ -0,0 +1,76 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "alice"; + home.homeDirectory = "/home/alice"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You 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 = "24.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = [ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # Home Manager can also manage your environment variables through + # '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 + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/alice/etc/profile.d/hm-session-vars.sh + # + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/third_party/home-manager/tests/integration/standalone/alice-home-next.nix b/third_party/home-manager/tests/integration/standalone/alice-home-next.nix new file mode 100644 index 0000000000..6f948b0b47 --- /dev/null +++ b/third_party/home-manager/tests/integration/standalone/alice-home-next.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + home.username = "alice"; + home.homeDirectory = "/home/alice"; + home.stateVersion = "24.05"; + home.packages = [ pkgs.hello ]; + home.file.test.text = "test"; + home.sessionVariables.EDITOR = "emacs"; + programs.bash.enable = true; + programs.home-manager.enable = true; + + # Enable a light-weight systemd service. + services.pueue.enable = true; + + # We focus on sd-switch since that hopefully will become the default in the + # future. + systemd.user.startServices = "sd-switch"; +} diff --git a/third_party/home-manager/tests/integration/standalone/flake-basics.nix b/third_party/home-manager/tests/integration/standalone/flake-basics.nix new file mode 100644 index 0000000000..8f9627d9f4 --- /dev/null +++ b/third_party/home-manager/tests/integration/standalone/flake-basics.nix @@ -0,0 +1,130 @@ +{ pkgs, ... }: + +{ + name = "standalone-flake-basics"; + meta.maintainers = [ pkgs.lib.maintainers.rycee ]; + + nodes.machine = { ... }: { + imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ]; + virtualisation.memorySize = 2048; + nix = { + registry.home-manager.to = { + type = "path"; + path = ../../..; + }; + settings.extra-experimental-features = [ "nix-command" "flakes" ]; + }; + users.users.alice = { + isNormalUser = true; + description = "Alice Foobar"; + password = "foobar"; + uid = 1000; + }; + }; + + testScript = '' + start_all() + machine.wait_for_unit("network-online.target") + machine.wait_for_unit("multi-user.target") + + def login_as_alice(): + machine.wait_until_tty_matches("1", "login: ") + machine.send_chars("alice\n") + machine.wait_until_tty_matches("1", "Password: ") + machine.send_chars("foobar\n") + machine.wait_until_tty_matches("1", "alice\@machine") + + def logout_alice(): + machine.send_chars("exit\n") + + def alice_cmd(cmd): + return f"su -l alice --shell /bin/sh -c $'export XDG_RUNTIME_DIR=/run/user/$UID ; {cmd}'" + + def succeed_as_alice(cmd): + return machine.succeed(alice_cmd(cmd)) + + def fail_as_alice(cmd): + return machine.fail(alice_cmd(cmd)) + + # Create a persistent login so that Alice has a systemd session. + login_as_alice() + + with subtest("Home Manager installation"): + succeed_as_alice("nix run home-manager -- init --home-manager-url home-manager --nixpkgs-url nixpkgs --switch") + + actual = machine.succeed("ls /home/alice/.config/home-manager") + expected = "flake.lock\nflake.nix\nhome.nix\n" + assert actual == expected, \ + f"unexpected content of /home/alice/.config/home-manager: {actual}" + + machine.succeed("diff -u ${ + ./alice-home-init.nix + } /home/alice/.config/home-manager/home.nix") + machine.succeed("diff -u ${ + ./alice-flake-init.nix + } /home/alice/.config/home-manager/flake.nix") + + # The default configuration creates this link on activation. + machine.succeed("test -L /home/alice/.cache/.keep") + + with subtest("GC root and profile"): + # There should be a GC root and Home Manager profile and they should point + # to the same path in the Nix store. + gcroot = "/home/alice/.local/state/home-manager/gcroots/current-home" + gcrootTarget = machine.succeed(f"readlink {gcroot}") + + profile = "/home/alice/.local/state/nix/profiles" + profileTarget = machine.succeed(f"readlink {profile}/home-manager") + profile1Target = machine.succeed(f"readlink {profile}/{profileTarget}") + + assert gcrootTarget == profile1Target, \ + f"expected GC root and profile to point to same, but pointed to {gcrootTarget} and {profile1Target}" + + with subtest("Home Manager switch"): + fail_as_alice("hello") + + succeed_as_alice("cp ${ + ./alice-home-next.nix + } /home/alice/.config/home-manager/home.nix") + + actual = succeed_as_alice("home-manager switch") + expected = "Started pueued.service - active" + assert expected in actual, \ + f"expected home-manager switch to contain {expected}, but got {actual}" + + succeed_as_alice("hello") + + actual = succeed_as_alice("echo $EDITOR").strip() + assert "emacs" == actual, \ + f"expected $EDITOR to contain emacs, but found {actual}" + + actual = machine.succeed("systemctl --user -M alice@.host status pueued.service") + expected = "running" + assert expected in actual, \ + f"expected systemctl status pueued status to contain {expected}, but got {actual}" + + actual = succeed_as_alice("pueue status") + expected = "running" + assert expected in actual, \ + f"expected pueue status to contain {expected}, but got {actual}" + + with subtest("Home Manager generations"): + actual = succeed_as_alice("home-manager generations") + expected = ": id 1 ->" + assert expected in actual, \ + f"expected generations to contain {expected}, but found {actual}" + + with subtest("Home Manager uninstallation"): + succeed_as_alice("yes | home-manager uninstall -L") + + fail_as_alice("hello") + machine.succeed("test ! -e /home/alice/.cache/.keep") + + # TODO: Fix uninstall to fully remove the share directory. + machine.succeed("test ! -e /home/alice/.local/share/home-manager/gcroots") + machine.succeed("test ! -e /home/alice/.local/state/home-manager") + machine.succeed("test ! -e /home/alice/.local/state/nix/profiles/home-manager") + + logout_alice() + ''; +} diff --git a/third_party/home-manager/tests/integration/standalone/standard-basics.nix b/third_party/home-manager/tests/integration/standalone/standard-basics.nix new file mode 100644 index 0000000000..d4cac249a5 --- /dev/null +++ b/third_party/home-manager/tests/integration/standalone/standard-basics.nix @@ -0,0 +1,127 @@ +{ pkgs, ... }: + +{ + name = "standalone-standard-basics"; + meta.maintainers = [ pkgs.lib.maintainers.rycee ]; + + nodes.machine = { ... }: { + imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ]; + virtualisation.memorySize = 2048; + users.users.alice = { + isNormalUser = true; + description = "Alice Foobar"; + password = "foobar"; + uid = 1000; + }; + }; + + testScript = '' + start_all() + machine.wait_for_unit("network.target") + machine.wait_for_unit("multi-user.target") + + home_manager = "${../../..}" + + def login_as_alice(): + machine.wait_until_tty_matches("1", "login: ") + machine.send_chars("alice\n") + machine.wait_until_tty_matches("1", "Password: ") + machine.send_chars("foobar\n") + machine.wait_until_tty_matches("1", "alice\@machine") + + def logout_alice(): + machine.send_chars("exit\n") + + def alice_cmd(cmd): + return f"su -l alice --shell /bin/sh -c $'export XDG_RUNTIME_DIR=/run/user/$UID ; {cmd}'" + + def succeed_as_alice(cmd): + return machine.succeed(alice_cmd(cmd)) + + def fail_as_alice(cmd): + return machine.fail(alice_cmd(cmd)) + + # Create a persistent login so that Alice has a systemd session. + login_as_alice() + + # Set up a home-manager channel. + succeed_as_alice(" ; ".join([ + "mkdir -p /home/alice/.nix-defexpr/channels", + f"ln -s {home_manager} /home/alice/.nix-defexpr/channels/home-manager" + ])) + + with subtest("Home Manager installation"): + succeed_as_alice("nix-shell \"\" -A install") + + actual = machine.succeed("ls /home/alice/.config/home-manager") + assert actual == "home.nix\n", \ + f"unexpected content of /home/alice/.config/home-manager: {actual}" + + machine.succeed("diff -u ${ + ./alice-home-init.nix + } /home/alice/.config/home-manager/home.nix") + + # The default configuration creates this link on activation. + machine.succeed("test -L /home/alice/.cache/.keep") + + with subtest("GC root and profile"): + # There should be a GC root and Home Manager profile and they should point + # to the same path in the Nix store. + gcroot = "/home/alice/.local/state/home-manager/gcroots/current-home" + gcrootTarget = machine.succeed(f"readlink {gcroot}") + + profile = "/home/alice/.local/state/nix/profiles" + profileTarget = machine.succeed(f"readlink {profile}/home-manager") + profile1Target = machine.succeed(f"readlink {profile}/{profileTarget}") + + assert gcrootTarget == profile1Target, \ + f"expected GC root and profile to point to same, but pointed to {gcrootTarget} and {profile1Target}" + + with subtest("Home Manager switch"): + fail_as_alice("hello") + + succeed_as_alice("cp ${ + ./alice-home-next.nix + } /home/alice/.config/home-manager/home.nix") + + actual = succeed_as_alice("home-manager switch") + expected = "Started pueued.service - active" + assert expected in actual, \ + f"expected home-manager switch to contain {expected}, but got {actual}" + + succeed_as_alice("hello") + + actual = succeed_as_alice("echo $EDITOR").strip() + assert "emacs" == actual, \ + f"expected $EDITOR to contain emacs, but found {actual}" + + actual = machine.succeed("systemctl --user -M alice@.host status pueued.service") + expected = "running" + assert expected in actual, \ + f"expected systemctl status pueued status to contain {expected}, but got {actual}" + + actual = succeed_as_alice("pueue status") + expected = "running" + assert expected in actual, \ + f"expected pueue status to contain {expected}, but got {actual}" + + with subtest("Home Manager generations"): + actual = succeed_as_alice("home-manager generations") + expected = ": id 1 ->" + assert expected in actual, \ + f"expected generations to contain {expected}, but found {actual}" + + with subtest("Home Manager uninstallation"): + succeed_as_alice("yes | home-manager uninstall -L") + + fail_as_alice("hello") + machine.succeed("test ! -e /home/alice/.cache/.keep") + + # TODO: Fix uninstall to fully remove the share directory. + machine.succeed("test ! -e /home/alice/.local/share/home-manager/gcroots") + machine.succeed("test ! -e /home/alice/.local/state/home-manager") + machine.succeed("test ! -e /home/alice/.local/state/nix/profiles/home-manager") + + logout_alice() + ''; +} diff --git a/third_party/home-manager/tests/lib/generators/default.nix b/third_party/home-manager/tests/lib/generators/default.nix index 37bb200478..da52640d12 100644 --- a/third_party/home-manager/tests/lib/generators/default.nix +++ b/third_party/home-manager/tests/lib/generators/default.nix @@ -1 +1,5 @@ -{ generators-tokdl = ./tokdl.nix; } +{ + generators-tokdl = ./tokdl.nix; + generators-toscfg-empty = ./toscfg-empty.nix; + generators-toscfg-example = ./toscfg-example.nix; +} diff --git a/third_party/home-manager/tests/lib/generators/tokdl.nix b/third_party/home-manager/tests/lib/generators/tokdl.nix index 88c5752b87..6e4a4047b7 100644 --- a/third_party/home-manager/tests/lib/generators/tokdl.nix +++ b/third_party/home-manager/tests/lib/generators/tokdl.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - home.file."result.txt".text = lib.hm.generators.toKDL { } { + home.file."tokdl-result.txt".text = lib.hm.generators.toKDL { } { a = 1; b = "string"; c = '' @@ -47,7 +47,7 @@ nmt.script = '' assertFileContent \ - home-files/result.txt \ + home-files/tokdl-result.txt \ ${./tokdl-result.txt} ''; } diff --git a/third_party/home-manager/tests/lib/generators/toscfg-empty-result.txt b/third_party/home-manager/tests/lib/generators/toscfg-empty-result.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/home-manager/tests/lib/generators/toscfg-empty.nix b/third_party/home-manager/tests/lib/generators/toscfg-empty.nix new file mode 100644 index 0000000000..e6800481f1 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/toscfg-empty.nix @@ -0,0 +1,11 @@ +{ config, lib, ... }: + +{ + home.file."toscfg-empty-result.txt".text = lib.hm.generators.toSCFG { } { }; + + nmt.script = '' + assertFileContent \ + home-files/toscfg-empty-result.txt \ + ${./toscfg-empty-result.txt} + ''; +} diff --git a/third_party/home-manager/tests/lib/generators/toscfg-err-dir-empty-name.nix b/third_party/home-manager/tests/lib/generators/toscfg-err-dir-empty-name.nix new file mode 100644 index 0000000000..f9b8dcdec9 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/toscfg-err-dir-empty-name.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + home.file."toscfg-err-dir-empty-name-result.txt".text = + lib.hm.generators.toSCFG { } { "" = [ ]; }; + + nmt.script = '' + assertFileContent \ + home-files/toscfg-err-dir-empty-name-result.txt \ + ${./toscfg-err-dir-empty-name-result.txt} + ''; +} diff --git a/third_party/home-manager/tests/lib/generators/toscfg-example-result.txt b/third_party/home-manager/tests/lib/generators/toscfg-example-result.txt new file mode 100644 index 0000000000..7a538d5a10 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/toscfg-example-result.txt @@ -0,0 +1,10 @@ +dir { + blk1 p1 "\"p2\"" { + sub1 arg11 arg12 + sub2 arg21 arg22 + sub3 arg31 arg32 { + sub-sub1 + sub-sub2 arg321 arg322 + } + } +} diff --git a/third_party/home-manager/tests/lib/generators/toscfg-example.nix b/third_party/home-manager/tests/lib/generators/toscfg-example.nix new file mode 100644 index 0000000000..d38568dcd7 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/toscfg-example.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: + +{ + home.file."toscfg-example-result.txt".text = lib.hm.generators.toSCFG { } { + dir = { + blk1 = { + _params = [ "p1" ''"p2"'' ]; + sub1 = [ "arg11" "arg12" ]; + sub2 = [ "arg21" "arg22" ]; + sub3 = { + _params = [ "arg31" "arg32" ]; + sub-sub1 = [ ]; + sub-sub2 = [ "arg321" "arg322" ]; + }; + }; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/toscfg-example-result.txt \ + ${./toscfg-example-result.txt} + ''; +} diff --git a/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix b/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix index 7710aa3c51..2390ddde89 100644 --- a/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix +++ b/third_party/home-manager/tests/modules/i18n/input-method/fcitx5-stubs.nix @@ -13,17 +13,41 @@ $out/bin/fcitx5-config-qt ''; }; - fcitx5-configtool = { outPath = null; }; fcitx5-lua = { outPath = null; }; - fcitx5-qt = { outPath = null; }; fcitx5-gtk = { outPath = null; }; - fcitx5-chinese-addons = { outPath = null; }; + + gtk2 = { + buildScript = '' + mkdir -p $out/bin + echo '#/usr/bin/env bash' > $out/bin/gtk-query-immodules-2.0 + chmod +x $out/bin/* + ''; + }; + gtk3 = { + buildScript = '' + mkdir -p $out/bin + echo '#/usr/bin/env bash' > $out/bin/gtk-query-immodules-3.0 + chmod +x $out/bin/* + ''; + }; }; nixpkgs.overlays = [ - (self: super: { - fcitx5-with-addons = - super.fcitx5-with-addons.override { inherit (self) fcitx5-qt; }; + (final: prev: { + libsForQt5 = prev.libsForQt5.overrideScope (qt5final: qt5prev: { + fcitx5-chinese-addons = prev.mkStubPackage { outPath = null; }; + fcitx5-configtool = prev.mkStubPackage { outPath = null; }; + fcitx5-qt = prev.mkStubPackage { outPath = null; }; + + fcitx5-with-addons = qt5prev.fcitx5-with-addons.override { + inherit (final) libsForQt5 qt6Packages; + }; + }); + + qt6Packages = prev.qt6Packages.overrideScope (qt6final: qt6prev: { + fcitx5-qt = prev.mkStubPackage { outPath = null; }; + }); + }) ]; } diff --git a/third_party/home-manager/tests/modules/i18n/input-method/kime-configuration.nix b/third_party/home-manager/tests/modules/i18n/input-method/kime-configuration.nix index fe50273fbc..b79694608a 100644 --- a/third_party/home-manager/tests/modules/i18n/input-method/kime-configuration.nix +++ b/third_party/home-manager/tests/modules/i18n/input-method/kime-configuration.nix @@ -1,14 +1,45 @@ { config, pkgs, ... }: -{ +let + + kimeConfig = '' + daemon: + modules: [Xim,Indicator] + indicator: + icon_color: White + engine: + hangul: + layout: dubeolsik + ''; + +in { i18n.inputMethod = { enabled = "kime"; - kime.config = { engine = { hangul = { layout = "dubeolsik"; }; }; }; + kime.extraConfig = kimeConfig; }; - test.stubs.kime = { outPath = null; }; + test.stubs = { + kime = { outPath = null; }; + gtk2 = { + buildScript = '' + mkdir -p $out/bin + echo '#/usr/bin/env bash' > $out/bin/gtk-query-immodules-2.0 + chmod +x $out/bin/* + ''; + }; + gtk3 = { + buildScript = '' + mkdir -p $out/bin + echo '#/usr/bin/env bash' > $out/bin/gtk-query-immodules-3.0 + chmod +x $out/bin/* + ''; + }; + }; nmt.script = '' assertFileExists home-files/.config/systemd/user/kime-daemon.service + assertFileExists home-files/.config/kime/config.yaml + assertFileContent home-files/.config/kime/config.yaml \ + ${builtins.toFile "kime-expected.yaml" kimeConfig} ''; } diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix b/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix index 9ddddb3574..a4cadcb73f 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-basic.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { config = { qt.enable = true; diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix index d95ef704a2..ab65f146a0 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gnome.nix @@ -1,9 +1,8 @@ -{ config, lib, pkgs, ... }: - { config = { qt = { enable = true; + # Check if still backwards compatible platformTheme = "gnome"; style.name = "adwaita"; }; @@ -20,5 +19,9 @@ assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ 'QML2_IMPORT_PATH' ''; + test.asserts.warnings.expected = [ + "The option `qt.platformTheme` has been renamed to `qt.platformTheme.name`." + "The value `gnome` for option `qt.platformTheme` is deprecated. Use `adwaita` instead." + ]; }; } diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix index 070c8020a2..76a6512f87 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk.nix @@ -1,10 +1,8 @@ -{ config, lib, pkgs, ... }: - { config = { qt = { enable = true; - platformTheme = "gtk"; + platformTheme.name = "gtk"; }; i18n.inputMethod.enabled = "fcitx5"; diff --git a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix index 2b3ade9dd2..2640881864 100644 --- a/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix +++ b/third_party/home-manager/tests/modules/misc/qt/qt-platform-theme-gtk3.nix @@ -1,10 +1,8 @@ -{ config, lib, pkgs, ... }: - { config = { qt = { enable = true; - platformTheme = "gtk3"; + platformTheme.name = "gtk3"; }; nmt.script = '' diff --git a/third_party/home-manager/tests/modules/misc/xdg/portal.nix b/third_party/home-manager/tests/modules/misc/xdg/portal.nix index 5c6e469958..e9ac8e381f 100644 --- a/third_party/home-manager/tests/modules/misc/xdg/portal.nix +++ b/third_party/home-manager/tests/modules/misc/xdg/portal.nix @@ -10,28 +10,18 @@ lib.mkIf config.test.enableBig { }; nmt.script = '' - xdgDesktopPortal=home-files/.config/systemd/user/xdg-desktop-portal.service - assertFileExists $xdgDesktopPortal + assertFileExists home-path/share/systemd/user/xdg-desktop-portal.service + assertFileExists home-path/share/systemd/user/xdg-desktop-portal-wlr.service + assertFileExists home-path/share/systemd/user/xdg-desktop-portal-hyprland.service - xdgDesktopPortalWlr=home-path/share/systemd/user/xdg-desktop-portal-wlr.service - assertFileExists $xdgDesktopPortalWlr - - xdgDesktopPortalHyprland=home-path/share/systemd/user/xdg-desktop-portal-hyprland.service - assertFileExists $xdgDesktopPortalHyprland - - portalsDir="$(cat $TESTED/$xdgDesktopPortal | grep Environment=XDG_DESKTOP_PORTAL_DIR | cut -d '=' -f3)" - portalConfigsDir="$(cat $TESTED/$xdgDesktopPortal | grep Environment=NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR | cut -d '=' -f3)" - - assertFileContent $portalsDir/hyprland.portal \ + assertFileContent home-path/share/xdg-desktop-portal/portals/hyprland.portal \ ${pkgs.xdg-desktop-portal-hyprland}/share/xdg-desktop-portal/portals/hyprland.portal - - assertFileContent $portalsDir/wlr.portal \ + assertFileContent home-path/share/xdg-desktop-portal/portals/wlr.portal \ ${pkgs.xdg-desktop-portal-wlr}/share/xdg-desktop-portal/portals/wlr.portal - assertFileContent $portalConfigsDir/hyprland-portals.conf \ + assertFileContent home-path/share/xdg-desktop-portal/hyprland-portals.conf \ ${pkgs.hyprland}/share/xdg-desktop-portal/hyprland-portals.conf - - assertFileContent $portalConfigsDir/sway-portals.conf \ + assertFileContent home-files/.config/xdg-desktop-portal/sway-portals.conf \ ${./sway-portals-expected.conf} ''; } diff --git a/third_party/home-manager/tests/modules/programs/alacritty/empty-settings.nix b/third_party/home-manager/tests/modules/programs/alacritty/empty-settings.nix index ecc6df35a7..c587018e5f 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/empty-settings.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/empty-settings.nix @@ -1,7 +1,3 @@ -{ config, lib, pkgs, ... }: - -with lib; - { config = { programs.alacritty.enable = true; diff --git a/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml b/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml index 723f1874c8..7b08aae84f 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml +++ b/third_party/home-manager/tests/modules/programs/alacritty/example-settings-expected.toml @@ -1,5 +1,5 @@ [[keyboard.bindings]] -chars = "\x0c" +chars = "\u000c" key = "K" mods = "Control" diff --git a/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix b/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix index 8aa013808c..c8ecb206c8 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/example-settings.nix @@ -1,12 +1,10 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ config, ... }: { config = { programs.alacritty = { enable = true; - package = config.lib.test.mkStubPackage { version = "0.13.0"; }; + package = config.lib.test.mkStubPackage { }; settings = { window.dimensions = { @@ -17,7 +15,7 @@ with lib; keyboard.bindings = [{ key = "K"; mods = "Control"; - chars = "\\x0c"; + chars = "\\u000c"; }]; }; }; diff --git a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging-expected.yml b/third_party/home-manager/tests/modules/programs/alacritty/settings-merging-expected.yml deleted file mode 100644 index 49d92a614e..0000000000 --- a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging-expected.yml +++ /dev/null @@ -1 +0,0 @@ -{"font":{"bold":{"family":"SFMono"},"normal":{"family":"SFMono"}},"key_bindings":[{"chars":"\x0c","key":"K","mods":"Control"}],"window":{"dimensions":{"columns":200,"lines":3}}} \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix b/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix index 76aedf4f64..e08c96ebc8 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/settings-merging.nix @@ -1,12 +1,10 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ config, lib, ... }: { config = { programs.alacritty = { enable = true; - package = config.lib.test.mkStubPackage { version = "0.12.3"; }; + package = config.lib.test.mkStubPackage { }; settings = { window.dimensions = { @@ -14,10 +12,10 @@ with lib; columns = 200; }; - key_bindings = [{ + keyboard.bindings = [{ key = "K"; mods = "Control"; - chars = "\\x0c"; + chars = "\\u000c"; }]; font = let @@ -32,8 +30,8 @@ with lib; nmt.script = '' assertFileContent \ - home-files/.config/alacritty/alacritty.yml \ - ${./settings-merging-expected.yml} + home-files/.config/alacritty/alacritty.toml \ + ${./settings-toml-expected.toml} ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml b/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml index 9b0867ee70..018881bcde 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml +++ b/third_party/home-manager/tests/modules/programs/alacritty/settings-toml-expected.toml @@ -6,7 +6,7 @@ family = "SFMono" family = "SFMono" [[keyboard.bindings]] -chars = "\x0c" +chars = "\u000c" key = "K" mods = "Control" diff --git a/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix b/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix index 4f15e70b8b..7094f9a9dd 100644 --- a/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix +++ b/third_party/home-manager/tests/modules/programs/alacritty/toml_config.nix @@ -4,7 +4,7 @@ config = { programs.alacritty = { enable = true; - package = config.lib.test.mkStubPackage { version = "0.13.0"; }; + package = config.lib.test.mkStubPackage { }; settings = { window.dimensions = { @@ -15,7 +15,7 @@ keyboard.bindings = [{ key = "K"; mods = "Control"; - chars = "\\x0c"; + chars = "\\u000c"; }]; font = { diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix b/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix index 781eaa84a1..d825f85bd7 100644 --- a/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix @@ -11,10 +11,14 @@ programs.beets = { enable = true; - package = config.lib.test.mkStubPackage { outPath = "@beets@"; }; mpdIntegration.enableStats = true; }; + test.stubs = { + beets = { }; + mpd = { }; + }; + nmt.script = '' assertFileExists home-files/.config/beets/config.yaml assertFileContent \ diff --git a/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix index 3284975ca9..b8d84469cb 100644 --- a/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/programs/bemenu/basic-configuration.nix @@ -15,12 +15,15 @@ hf = "#f9e2af"; af = "#cdd6f4"; ab = "#1e1e2e"; + width-factor = 0.3; }; }; + test.stubs.bemenu = { }; + nmt.script = '' assertFileExists home-path/etc/profile.d/hm-session-vars.sh assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ - "export BEMENU_OPTS=\"'--ab' '#1e1e2e' '--af' '#cdd6f4' '--fb' '#1e1e2e' '--ff' '#cdd6f4' '--hb' '#1e1e2e' '--hf' '#f9e2af' '--ignorecase' '--line-height' '28' '--nb' '#1e1e2e' '--nf' '#cdd6f4' '--prompt' 'open' '--tb' '#1e1e2e' '--tf' '#f38ba8'\"" + "export BEMENU_OPTS=\"'--ab' '#1e1e2e' '--af' '#cdd6f4' '--fb' '#1e1e2e' '--ff' '#cdd6f4' '--hb' '#1e1e2e' '--hf' '#f9e2af' '--ignorecase' '--line-height' '28' '--nb' '#1e1e2e' '--nf' '#cdd6f4' '--prompt' 'open' '--tb' '#1e1e2e' '--tf' '#f38ba8' '--width-factor' '0.300000'\"" ''; } diff --git a/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix b/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix index 5e56d9ed7f..d9e7296969 100644 --- a/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix +++ b/third_party/home-manager/tests/modules/programs/bemenu/empty-configuration.nix @@ -1,6 +1,8 @@ { programs.bemenu = { enable = true; }; + test.stubs.bemenu = { }; + nmt.script = '' assertFileExists home-path/etc/profile.d/hm-session-vars.sh assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh \ diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/both-sourcedirectories-and-patterns.nix b/third_party/home-manager/tests/modules/programs/borgmatic/both-sourcedirectories-and-patterns.nix new file mode 100644 index 0000000000..106a0c18ce --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/both-sourcedirectories-and-patterns.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +let + + backups = config.programs.borgmatic.backups; + +in { + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + sourceDirectories = [ "/my-stuff-to-backup" ]; + patterns = [ "R /" "+ my-stuff-to-backup" ]; + repositories = [ "/mnt/disk1" ]; + }; + }; + }; + }; + + test.stubs.borgmatic = { }; + + test.asserts.assertions.expected = ['' + Borgmatic backup configuration "main" cannot specify both 'location.sourceDirectories' and 'location.patterns'. + '']; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/default.nix b/third_party/home-manager/tests/modules/programs/borgmatic/default.nix index 53ea9be89b..8cc0f924d4 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/default.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/default.nix @@ -1,5 +1,10 @@ { borgmatic-program-basic-configuration = ./basic-configuration.nix; + borgmatic-program-patterns-configuration = ./patterns-configuration.nix; + borgmatic-program-both-sourcedirectories-and-patterns = + ./both-sourcedirectories-and-patterns.nix; + borgmatic-program-neither-sourcedirectories-nor-patterns = + ./neither-sourcedirectories-nor-patterns.nix; borgmatic-program-include-hm-symlinks = ./include-hm-symlinks.nix; borgmatic-program-exclude-hm-symlinks = ./exclude-hm-symlinks.nix; borgmatic-program-exclude-hm-symlinks-nothing-else = diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/neither-sourcedirectories-nor-patterns.nix b/third_party/home-manager/tests/modules/programs/borgmatic/neither-sourcedirectories-nor-patterns.nix new file mode 100644 index 0000000000..596fdf1cd6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/neither-sourcedirectories-nor-patterns.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +let + + backups = config.programs.borgmatic.backups; + +in { + programs.borgmatic = { + enable = true; + backups = { main = { location = { repositories = [ "/mnt/disk1" ]; }; }; }; + }; + + test.stubs.borgmatic = { }; + + test.asserts.assertions.expected = ['' + Borgmatic backup configuration "main" must specify one of 'location.sourceDirectories' or 'location.patterns'. + '']; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/patterns-configuration.nix b/third_party/home-manager/tests/modules/programs/borgmatic/patterns-configuration.nix new file mode 100644 index 0000000000..098708cad3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/patterns-configuration.nix @@ -0,0 +1,58 @@ +{ config, pkgs, ... }: + +let + + boolToString = bool: if bool then "true" else "false"; + backups = config.programs.borgmatic.backups; + +in { + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + patterns = [ + "R /home/user" + "+ home/user/stuff-to-backup" + "+ home/user/junk/important-file" + "- home/user/junk" + ]; + repositories = [ "/mnt/backup-drive" ]; + }; + }; + }; + }; + + test.stubs.borgmatic = { }; + + nmt.script = '' + config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml + assertFileExists $config_file + + declare -A expectations + + expectations[patterns[0]]="${ + builtins.elemAt backups.main.location.patterns 0 + }" + expectations[patterns[1]]="${ + builtins.elemAt backups.main.location.patterns 1 + }" + expectations[patterns[2]]="${ + builtins.elemAt backups.main.location.patterns 2 + }" + expectations[patterns[3]]="${ + builtins.elemAt backups.main.location.patterns 3 + }" + + yq=${pkgs.yq-go}/bin/yq + + for filter in "''${!expectations[@]}"; do + expected_value="''${expectations[$filter]}" + actual_value="$($yq ".$filter" $config_file)" + + if [[ "$actual_value" != "$expected_value" ]]; then + fail "Expected '$filter' to be '$expected_value' but was '$actual_value'" + fi + done + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/carapace/nushell.nix b/third_party/home-manager/tests/modules/programs/carapace/nushell.nix index a025da18c3..d97fa89858 100644 --- a/third_party/home-manager/tests/modules/programs/carapace/nushell.nix +++ b/third_party/home-manager/tests/modules/programs/carapace/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs = { @@ -7,7 +7,7 @@ }; nmt.script = let - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell" else "home-files/.config/nushell"; diff --git a/third_party/home-manager/tests/modules/programs/direnv/nix-direnv.nix b/third_party/home-manager/tests/modules/programs/direnv/nix-direnv.nix index 4c17309773..588cd6ed63 100644 --- a/third_party/home-manager/tests/modules/programs/direnv/nix-direnv.nix +++ b/third_party/home-manager/tests/modules/programs/direnv/nix-direnv.nix @@ -10,9 +10,7 @@ with lib; nmt.script = '' assertFileExists home-files/.bashrc - assertFileRegex \ - home-files/.config/direnv/direnvrc \ - 'source /nix/store/.*nix-direnv.*/share/nix-direnv/direnvrc' + assertFileExists home-files/.config/direnv/lib/hm-nix-direnv.sh ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/direnv/nushell.nix b/third_party/home-manager/tests/modules/programs/direnv/nushell.nix index 46f34ebd8a..6655f01a8c 100644 --- a/third_party/home-manager/tests/modules/programs/direnv/nushell.nix +++ b/third_party/home-manager/tests/modules/programs/direnv/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.nushell.enable = true; @@ -7,7 +7,7 @@ test.stubs.nushell = { }; nmt.script = let - configFile = if pkgs.stdenv.isDarwin then + configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu"; diff --git a/third_party/home-manager/tests/modules/programs/direnv/stdlib-and-nix-direnv.nix b/third_party/home-manager/tests/modules/programs/direnv/stdlib-and-nix-direnv.nix index 4e5efb8732..3bfd768c40 100644 --- a/third_party/home-manager/tests/modules/programs/direnv/stdlib-and-nix-direnv.nix +++ b/third_party/home-manager/tests/modules/programs/direnv/stdlib-and-nix-direnv.nix @@ -12,9 +12,7 @@ in { nmt.script = '' assertFileExists home-files/.bashrc - assertFileRegex \ - home-files/.config/direnv/direnvrc \ - 'source /nix/store/.*nix-direnv.*/share/nix-direnv/direnvrc' + assertFileExists home-files/.config/direnv/lib/hm-nix-direnv.sh assertFileRegex \ home-files/.config/direnv/direnvrc \ '${expectedContent}' diff --git a/third_party/home-manager/tests/modules/programs/direnv/stdlib.nix b/third_party/home-manager/tests/modules/programs/direnv/stdlib.nix index 1d06a0bc2a..2a859132f8 100644 --- a/third_party/home-manager/tests/modules/programs/direnv/stdlib.nix +++ b/third_party/home-manager/tests/modules/programs/direnv/stdlib.nix @@ -10,6 +10,7 @@ in { programs.direnv.stdlib = expectedContent; nmt.script = '' + assertPathNotExists home-files/.config/direnv/lib/hm-nix-direnv.sh assertFileExists home-files/.bashrc assertFileRegex \ home-files/.config/direnv/direnvrc \ diff --git a/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.jsonc b/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.jsonc new file mode 100755 index 0000000000..70eabbd654 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.jsonc @@ -0,0 +1,28 @@ +{ + "display": { + "binaryPrefix": "si", + "color": "blue", + "separator": "  " + }, + "logo": { + "padding": { + "right": 1 + }, + "source": "nixos_small" + }, + "modules": [ + { + "format": "{1}-{3}-{11}", + "key": "Date", + "type": "datetime" + }, + { + "format": "{14}:{17}:{20}", + "key": "Time", + "type": "datetime" + }, + "break", + "player", + "media" + ] +} diff --git a/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.nix new file mode 100644 index 0000000000..a0b6783a85 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fastfetch/basic-configuration.nix @@ -0,0 +1,39 @@ +{ + programs.fastfetch = { + enable = true; + settings = { + logo = { + source = "nixos_small"; + padding = { right = 1; }; + }; + display = { + 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" + ]; + }; + }; + + test.stubs.fastfetch = { }; + + nmt.script = let configFile = "home-files/.config/fastfetch/config.jsonc"; + in '' + assertFileExists "${configFile}" + assertFileContent "${configFile}" ${./basic-configuration.jsonc} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/fastfetch/default-configuration.nix b/third_party/home-manager/tests/modules/programs/fastfetch/default-configuration.nix new file mode 100644 index 0000000000..428081d4d9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fastfetch/default-configuration.nix @@ -0,0 +1,9 @@ +{ + programs.fastfetch.enable = true; + + test.stubs.fastfetch = { }; + + nmt.script = '' + assertPathNotExists "home-files/.config/fastfetch/config.jsonc" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/fastfetch/default.nix b/third_party/home-manager/tests/modules/programs/fastfetch/default.nix new file mode 100644 index 0000000000..d347e562e4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fastfetch/default.nix @@ -0,0 +1,4 @@ +{ + fastfetch-default-configuration = ./default-configuration.nix; + fastfetch-basic-configuration = ./basic-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/container-id-out-of-range.nix b/third_party/home-manager/tests/modules/programs/firefox/container-id-out-of-range.nix new file mode 100644 index 0000000000..5dbeaedda8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/container-id-out-of-range.nix @@ -0,0 +1,27 @@ +{ config, lib, ... }: + +{ + imports = [ ./setup-firefox-mock-overlay.nix ]; + + config = lib.mkIf config.test.enableBig { + test.asserts.assertions.expected = + [ "Container id must be smaller than 4294967294 (2^32 - 2)" ]; + + programs.firefox = { + enable = true; + + profiles.my-profile = { + isDefault = true; + id = 1; + + containers = { + "shopping" = { + id = 4294967294; + color = "blue"; + icon = "circle"; + }; + }; + }; + }; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/default.nix b/third_party/home-manager/tests/modules/programs/firefox/default.nix index b0c4fadb6a..1cd462f2e7 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/default.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/default.nix @@ -4,5 +4,6 @@ firefox-deprecated-native-messenger = ./deprecated-native-messenger.nix; firefox-duplicate-profile-ids = ./duplicate-profile-ids.nix; firefox-duplicate-container-ids = ./duplicate-container-ids.nix; + firefox-container-id-out-of-range = ./container-id-out-of-range.nix; firefox-policies = ./policies.nix; } diff --git a/third_party/home-manager/tests/modules/programs/firefox/policies.nix b/third_party/home-manager/tests/modules/programs/firefox/policies.nix index b855ee8701..7b503d3d8b 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/policies.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/policies.nix @@ -9,6 +9,9 @@ programs.firefox = { enable = true; policies = { BlockAboutConfig = true; }; + package = pkgs.firefox.override { + extraPolicies = { DownloadDirectory = "/foo"; }; + }; }; nmt.script = '' @@ -16,11 +19,18 @@ config_file="${config.programs.firefox.finalPackage}/lib/firefox/distribution/policies.json" assertFileExists "$config_file" + blockAboutConfig_actual_value="$($jq ".policies.BlockAboutConfig" $config_file)" if [[ $blockAboutConfig_actual_value != "true" ]]; then fail "Expected '$config_file' to set 'policies.BlockAboutConfig' to true" fi + + downloadDirectory_actual_value="$($jq ".policies.DownloadDirectory" $config_file)" + + if [[ $downloadDirectory_actual_value != "\"/foo\"" ]]; then + fail "Expected '$config_file' to set 'policies.DownloadDirectory' to \"/foo\"" + fi ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html index d19eab612e..93bc195fb3 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html @@ -8,18 +8,18 @@

Bookmarks Toolbar

-

Home Manager +
Home Manager

wikipedia
kernel.org

Nix sites

homepage -
wiki +
wiki

Nix sites

homepage -
wiki +
wiki

diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json index d1727cc2a8..8eea55558a 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-containers.json @@ -1 +1 @@ -{"identities":[{"color":"yellow","icon":"circle","name":"shopping","public":true,"userContextId":6}],"lastUserContextId":6,"version":4} +{"identities":[{"color":"yellow","icon":"circle","name":"shopping","public":true,"userContextId":6},{"accessKey":"","color":"","icon":"","name":"userContextIdInternal.thumbnail","public":false,"userContextId":4294967294},{"accessKey":"","color":"","icon":"","name":"userContextIdInternal.webextStorageLocal","public":false,"userContextId":4294967295}],"lastUserContextId":6,"version":4} diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json index f17a0b91ef..832b6c09c1 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search.json @@ -31,8 +31,8 @@ "_definedAliases": [ "@nw" ], - "_iconURL": "https://nixos.wiki/favicon.png", - "_iconUpdateURL": "https://nixos.wiki/favicon.png", + "_iconURL": "https://wiki.nixos.org/favicon.png", + "_iconUpdateURL": "https://wiki.nixos.org/favicon.png", "_isAppProvided": false, "_loadPath": "[home-manager]/programs.firefox.profiles.search.search.engines.\"NixOS Wiki\"", "_metaData": { @@ -42,7 +42,7 @@ "_updateInterval": 86400000, "_urls": [ { - "template": "https://nixos.wiki/index.php?search={searchTerms}" + "template": "https://wiki.nixos.org/index.php?search={searchTerms}" } ] }, diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix b/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix index 94fa9436ee..8b781552b0 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings.nix @@ -27,7 +27,7 @@ toolbar = true; bookmarks = [{ name = "Home Manager"; - url = "https://nixos.wiki/wiki/Home_Manager"; + url = "https://wiki.nixos.org/wiki/Home_Manager"; }]; } { @@ -51,7 +51,7 @@ { name = "wiki"; tags = [ "wiki" "nix" ]; - url = "https://nixos.wiki/"; + url = "https://wiki.nixos.org/"; } { name = "Nix sites"; @@ -62,7 +62,7 @@ } { name = "wiki"; - url = "https://nixos.wiki/"; + url = "https://wiki.nixos.org/"; } ]; } @@ -102,9 +102,10 @@ "NixOS Wiki" = { urls = [{ - template = "https://nixos.wiki/index.php?search={searchTerms}"; + template = + "https://wiki.nixos.org/index.php?search={searchTerms}"; }]; - iconUpdateURL = "https://nixos.wiki/favicon.png"; + iconUpdateURL = "https://wiki.nixos.org/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@nw" ]; }; diff --git a/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.db b/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.db new file mode 100644 index 0000000000..50d43a1149 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.db @@ -0,0 +1,8 @@ +{"_id":"allowDashAv1Formats","value":true} +{"_id":"checkForBlogPosts","value":false} +{"_id":"checkForUpdates","value":false} +{"_id":"commentAutoLoadEnabled","value":true} +{"_id":"defaultQuality","value":"1080"} +{"_id":"hideHeaderLogo","value":true} +{"_id":"listType","value":"list"} +{"_id":"useRssFeeds","value":true} diff --git a/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.nix new file mode 100644 index 0000000000..a30d3bed46 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/freetube/basic-configuration.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + programs.freetube = { + enable = true; + settings = { + useRssFeeds = true; + hideHeaderLogo = true; + allowDashAv1Formats = true; + commentAutoLoadEnabled = true; + + checkForUpdates = false; + checkForBlogPosts = false; + + listType = "list"; + defaultQuality = "1080"; + }; + }; + + test.stubs.freetube = { }; + + nmt.script = '' + assertFileExists home-files/.config/FreeTube/hm_settings.db + assertFileContent home-files/.config/FreeTube/hm_settings.db \ + ${./basic-configuration.db} + + assertFileContains activate \ + "install -Dm644 \$VERBOSE_ARG '/home/hm-user/.config/FreeTube/hm_settings.db' '/home/hm-user/.config/FreeTube/settings.db'" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/freetube/default.nix b/third_party/home-manager/tests/modules/programs/freetube/default.nix new file mode 100644 index 0000000000..cb6fd4d2f9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/freetube/default.nix @@ -0,0 +1 @@ +{ freetube-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/gallery-dl/gallery-dl.nix b/third_party/home-manager/tests/modules/programs/gallery-dl/gallery-dl.nix index 43d0daa9f7..2cc94e1e08 100644 --- a/third_party/home-manager/tests/modules/programs/gallery-dl/gallery-dl.nix +++ b/third_party/home-manager/tests/modules/programs/gallery-dl/gallery-dl.nix @@ -1,9 +1,11 @@ -{ ... }: +{ config, ... }: { programs.gallery-dl = { enable = true; + package = config.lib.test.mkStubPackage { }; + settings = { cache.file = "~/gallery-dl/cache.sqlite3"; extractor.base-directory = "~/gallery-dl/"; diff --git a/third_party/home-manager/tests/modules/programs/git/git-with-email-expected.conf b/third_party/home-manager/tests/modules/programs/git/git-with-email-expected.conf index c34ab1d79e..fa027422f0 100644 --- a/third_party/home-manager/tests/modules/programs/git/git-with-email-expected.conf +++ b/third_party/home-manager/tests/modules/programs/git/git-with-email-expected.conf @@ -1,12 +1,12 @@ [sendemail "hm-account"] - from = "hm@example.org" + from = "H. M. Test Jr. " smtpEncryption = "tls" smtpServer = "smtp.example.org" smtpSslCertPath = "/etc/test/certificates.crt" smtpUser = "home.manager.jr" [sendemail "hm@example.com"] - from = "hm@example.com" + from = "H. M. Test " smtpEncryption = "ssl" smtpServer = "smtp.example.com" smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt" diff --git a/third_party/home-manager/tests/modules/programs/git/git-with-email.nix b/third_party/home-manager/tests/modules/programs/git/git-with-email.nix index ec18ecb92e..0999eaa87a 100644 --- a/third_party/home-manager/tests/modules/programs/git/git-with-email.nix +++ b/third_party/home-manager/tests/modules/programs/git/git-with-email.nix @@ -33,8 +33,8 @@ with lib; ./git-with-email-expected.conf } - assertGitConfig "sendemail.hm@example.com.from" "hm@example.com" - assertGitConfig "sendemail.hm-account.from" "hm@example.org" + assertGitConfig "sendemail.hm@example.com.from" "H. M. Test " + assertGitConfig "sendemail.hm-account.from" "H. M. Test Jr. " ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/git/git-with-msmtp-expected.conf b/third_party/home-manager/tests/modules/programs/git/git-with-msmtp-expected.conf index 1f2c7b794b..8cd5d86f0f 100644 --- a/third_party/home-manager/tests/modules/programs/git/git-with-msmtp-expected.conf +++ b/third_party/home-manager/tests/modules/programs/git/git-with-msmtp-expected.conf @@ -1,5 +1,5 @@ [sendemail "hm-account"] - from = "hm@example.org" + from = "H. M. Test Jr. " smtpEncryption = "tls" smtpServer = "smtp.example.org" smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt" @@ -7,7 +7,7 @@ [sendemail "hm@example.com"] envelopeSender = "auto" - from = "hm@example.com" + from = "H. M. Test " smtpServer = "@msmtp@/bin/msmtp" [user] diff --git a/third_party/home-manager/tests/modules/programs/git/git-with-msmtp.nix b/third_party/home-manager/tests/modules/programs/git/git-with-msmtp.nix index dc6ba465e9..80e082c97f 100644 --- a/third_party/home-manager/tests/modules/programs/git/git-with-msmtp.nix +++ b/third_party/home-manager/tests/modules/programs/git/git-with-msmtp.nix @@ -7,6 +7,7 @@ with lib; config = { accounts.email.accounts."hm@example.com".msmtp.enable = true; + programs.git = { enable = true; package = pkgs.gitMinimal; @@ -33,8 +34,8 @@ with lib; assertFileContent home-files/.config/git/config \ ${./git-with-msmtp-expected.conf} - assertGitConfig "sendemail.hm@example.com.from" "hm@example.com" - assertGitConfig "sendemail.hm-account.from" "hm@example.org" + assertGitConfig "sendemail.hm@example.com.from" "H. M. Test " + assertGitConfig "sendemail.hm-account.from" "H. M. Test Jr. " assertGitConfig "sendemail.hm@example.com.smtpServer" "${pkgs.msmtp}/bin/msmtp" assertGitConfig "sendemail.hm@example.com.envelopeSender" "auto" ''; diff --git a/third_party/home-manager/tests/modules/programs/gnome-shell/default.nix b/third_party/home-manager/tests/modules/programs/gnome-shell/default.nix new file mode 100644 index 0000000000..58e4598f8e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gnome-shell/default.nix @@ -0,0 +1 @@ +{ gnome-shell = ./gnome-shell.nix; } diff --git a/third_party/home-manager/tests/modules/programs/gnome-shell/gnome-shell.nix b/third_party/home-manager/tests/modules/programs/gnome-shell/gnome-shell.nix new file mode 100644 index 0000000000..02f44e0c33 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gnome-shell/gnome-shell.nix @@ -0,0 +1,94 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + dummy-gnome-shell-extensions = pkgs.runCommand "dummy-package" { } '' + mkdir -p $out/share/gnome-shell/extensions/dummy-package + touch $out/share/gnome-shell/extensions/dummy-package/test + ''; + + test-extension = pkgs.runCommand "test-extension" { } '' + mkdir -p $out/share/gnome-shell/extensions/test-extension + touch $out/share/gnome-shell/extensions/test-extension/test + ''; + + test-extension-uuid = pkgs.runCommand "test-extension-uuid" { + passthru.extensionUuid = "test-extension-uuid"; + } '' + mkdir -p $out/share/gnome-shell/extensions/test-extension-uuid + touch $out/share/gnome-shell/extensions/test-extension-uuid/test + ''; + + test-theme = pkgs.runCommand "test-theme" { } '' + mkdir -p $out/share/themes/Test/gnome-shell + touch $out/share/themes/Test/gnome-shell/test + ''; + + expectedEnabledExtensions = [ + "user-theme@gnome-shell-extensions.gcampax.github.com" + "test-extension" + "test-extension-uuid" + ]; + + actualEnabledExtensions = catAttrs "value" + config.dconf.settings."org/gnome/shell".enabled-extensions.value; + +in { + nixpkgs.overlays = [ + (self: super: { + gnome = super.gnome.overrideScope (gself: gsuper: { + gnome-shell-extensions = dummy-gnome-shell-extensions; + }); + }) + ]; + + programs.gnome-shell.enable = true; + + programs.gnome-shell.extensions = [ + { + id = "test-extension"; + package = test-extension; + } + { package = test-extension-uuid; } + ]; + + programs.gnome-shell.theme = { + name = "Test"; + package = test-theme; + }; + + assertions = [ + { + assertion = + config.dconf.settings."org/gnome/shell".disable-user-extensions + == false; + message = "Expected disable-user-extensions to be false."; + } + { + assertion = + all (e: elem e actualEnabledExtensions) expectedEnabledExtensions; + message = '' + Expected enabled-extensions to contain all of: + ${toString expectedEnabledExtensions} + But it was: + ${toString actualEnabledExtensions} + ''; + } + { + assertion = + config.dconf.settings."org/gnome/shell/extensions/user-theme".name + == "Test"; + message = "Expected extensions/user-theme/name to be 'Test'."; + } + ]; + + test.stubs.dconf = { }; + + nmt.script = '' + assertFileExists home-path/share/gnome-shell/extensions/dummy-package/test + assertFileExists home-path/share/gnome-shell/extensions/test-extension/test + assertFileExists home-path/share/gnome-shell/extensions/test-extension-uuid/test + assertFileExists home-path/share/themes/Test/gnome-shell/test + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/gpg/immutable-keyfiles.nix b/third_party/home-manager/tests/modules/programs/gpg/immutable-keyfiles.nix index 4e3e2bbcc5..15dd2b9e78 100644 --- a/third_party/home-manager/tests/modules/programs/gpg/immutable-keyfiles.nix +++ b/third_party/home-manager/tests/modules/programs/gpg/immutable-keyfiles.nix @@ -11,8 +11,8 @@ { source = pkgs.fetchurl { url = - "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x36cacf52d098cc0e78fb0cb13573356c25c424d4"; - hash = "sha256-9Zjsb/TtOyiPzMO/Jg3CtJwSxuw7QmX0pcfZT2/1w5E="; + "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x44CF42371ADF842E12F116EAA9D3F98FCCF5460B"; + hash = "sha256-u01QTYEFSY1feJWX3JJjXB6thiVO4WOnrqNmzg6vIDs="; }; trust = 1; # "unknown" } @@ -44,7 +44,7 @@ # Check Trust assertFileRegex $WORKDIR/gpgtrust.txt \ - '^36CACF52D098CC0E78FB0CB13573356C25C424D4:2:$' + '^44CF42371ADF842E12F116EAA9D3F98FCCF5460B:2:$' assertFileRegex $WORKDIR/gpgtrust.txt \ '^BB847B5A69EF343CEF511B29073C282D7D6F806C:3:$' diff --git a/third_party/home-manager/tests/modules/programs/gpg/mutable-keyfiles.nix b/third_party/home-manager/tests/modules/programs/gpg/mutable-keyfiles.nix index d2028e4b4d..ea87a3e0a8 100644 --- a/third_party/home-manager/tests/modules/programs/gpg/mutable-keyfiles.nix +++ b/third_party/home-manager/tests/modules/programs/gpg/mutable-keyfiles.nix @@ -22,10 +22,10 @@ assertFileContains activate "unset GNUPGHOME QUIET_ARG keyId importTrust" assertFileRegex activate \ - '^\$DRY_RUN_CMD @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key1$' + '^run @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key1$' assertFileRegex activate \ - '^\$DRY_RUN_CMD importTrust "/nix/store/[0-9a-z]*-key1" 1$' + '^run importTrust "/nix/store/[0-9a-z]*-key1" 1$' assertFileRegex activate \ - '^\$DRY_RUN_CMD @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key2$' + '^run @gnupg@/bin/gpg \$QUIET_ARG --import /nix/store/[0-9a-z]*-key2$' ''; } diff --git a/third_party/home-manager/tests/modules/programs/helix/example-settings.nix b/third_party/home-manager/tests/modules/programs/helix/example-settings.nix index 86c6766a89..c60883a124 100644 --- a/third_party/home-manager/tests/modules/programs/helix/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/helix/example-settings.nix @@ -43,6 +43,8 @@ with lib; }]; }; + ignores = [ ".build/" "!.gitignore" ]; + themes = { base16 = let transparent = "none"; @@ -131,6 +133,9 @@ with lib; assertFileContent \ home-files/.config/helix/languages.toml \ ${./languages-expected.toml} + assertFileContent \ + home-files/.config/helix/ignore \ + ${./ignore-expected} assertFileContent \ home-files/.config/helix/themes/base16.toml \ ${./theme-base16-expected.toml} diff --git a/third_party/home-manager/tests/modules/programs/helix/ignore-expected b/third_party/home-manager/tests/modules/programs/helix/ignore-expected new file mode 100644 index 0000000000..fe1c7398a8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/helix/ignore-expected @@ -0,0 +1,2 @@ +.build/ +!.gitignore diff --git a/third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml b/third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml index 2df6b85fac..16c70c8683 100644 --- a/third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml +++ b/third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml @@ -1,30 +1,32 @@ -["hm@example.com"] +[accounts."hm@example.com"] backend = "imap" default = true display-name = "H. M. Test" email = "hm@example.com" -imap-auth = "passwd" -imap-host = "imap.example.com" -imap-login = "home.manager" -imap-port = 993 -imap-ssl = true -imap-starttls = false -sender = "smtp" -smtp-auth = "passwd" -smtp-host = "smtp.example.com" -smtp-login = "home.manager" -smtp-port = 465 -smtp-ssl = true -smtp-starttls = false -["hm@example.com".folder-aliases] +[accounts."hm@example.com".folder.alias] drafts = "Drafts" inbox = "Inbox" sent = "Sent" trash = "Trash" -["hm@example.com".imap-passwd] +[accounts."hm@example.com".imap] +encryption = "tls" +host = "imap.example.com" +login = "home.manager" +port = 993 + +[accounts."hm@example.com".imap.passwd] cmd = "password-command" -["hm@example.com".smtp-passwd] +[accounts."hm@example.com".message.send] +backend = "smtp" + +[accounts."hm@example.com".smtp] +encryption = "tls" +host = "smtp.example.com" +login = "home.manager" +port = 465 + +[accounts."hm@example.com".smtp.passwd] cmd = "password-command" diff --git a/third_party/home-manager/tests/modules/programs/himalaya/basic.nix b/third_party/home-manager/tests/modules/programs/himalaya/basic.nix index 1555d1e95b..f31a8464c4 100644 --- a/third_party/home-manager/tests/modules/programs/himalaya/basic.nix +++ b/third_party/home-manager/tests/modules/programs/himalaya/basic.nix @@ -10,8 +10,6 @@ with lib; imap.port = 993; smtp.port = 465; himalaya.enable = true; - himalaya.backend = test.asserts.warnings.expected; - himalaya.sender = test.asserts.warnings.expected; }; }; diff --git a/third_party/home-manager/tests/modules/programs/himalaya/default.nix b/third_party/home-manager/tests/modules/programs/himalaya/default.nix index b357361e20..1cc0870520 100644 --- a/third_party/home-manager/tests/modules/programs/himalaya/default.nix +++ b/third_party/home-manager/tests/modules/programs/himalaya/default.nix @@ -1,6 +1 @@ -{ - himalaya-basic = ./basic.nix; - himalaya-imap-smtp = ./imap-smtp.nix; - himalaya-maildir-sendmail = ./maildir-sendmail.nix; - himalaya-notmuch-sendmail = ./notmuch-sendmail.nix; -} +{ himalaya-basic = ./basic.nix; } diff --git a/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml b/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml deleted file mode 100644 index 6db2542df5..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml +++ /dev/null @@ -1,35 +0,0 @@ -email-listing-page-size = 40 - -["hm@example.com"] -backend = "imap" -default = true -display-name = "H. M. Test" -email = "hm@example.com" -email-listing-page-size = 50 -folder-listing-page-size = 50 -imap-auth = "passwd" -imap-host = "imap.example.com" -imap-login = "home.manager" -imap-port = 143 -imap-ssl = false -imap-starttls = false -sender = "smtp" -smtp-auth = "passwd" -smtp-host = "smtp.example.com" -smtp-login = "home.manager" -smtp-port = 465 -smtp-ssl = true -smtp-starttls = true - -["hm@example.com".folder-aliases] -custom = "Custom" -drafts = "D" -inbox = "In2" -sent = "Out" -trash = "Trash" - -["hm@example.com".imap-passwd] -cmd = "password-command" - -["hm@example.com".smtp-passwd] -cmd = "password-command" diff --git a/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix b/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix deleted file mode 100644 index c1347d23c4..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - accounts.email.accounts = { - "hm@example.com" = { - primary = true; - address = "hm@example.com"; - userName = "home.manager"; - realName = "H. M. Test"; - passwordCommand = "password-command"; - imap = { - host = "imap.example.com"; - port = 143; - tls = { enable = false; }; - }; - smtp = { - host = "smtp.example.com"; - port = 465; - tls = { - enable = true; - useStartTls = true; - }; - }; - folders = { - inbox = "In"; - sent = "Out"; - drafts = "D"; - }; - himalaya = { - enable = true; - settings = { - folder-listing-page-size = 50; - email-listing-page-size = 50; - folder-aliases = { - inbox = "In2"; - custom = "Custom"; - }; - }; - }; - }; - }; - - programs.himalaya = { - enable = true; - settings = { email-listing-page-size = 40; }; - }; - - test.stubs.himalaya = { }; - - nmt.script = '' - assertFileExists home-files/.config/himalaya/config.toml - assertFileContent home-files/.config/himalaya/config.toml ${ - ./imap-smtp-expected.toml - } - ''; -} diff --git a/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml b/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml deleted file mode 100644 index 61ae940ded..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml +++ /dev/null @@ -1,16 +0,0 @@ -email-listing-page-size = 50 - -["hm@example.com"] -backend = "maildir" -default = true -display-name = "H. M. Test" -email = "hm@example.com" -maildir-root-dir = "/home/hm-user/Maildir/hm@example.com" -sender = "sendmail" -sendmail-cmd = "msmtp" - -["hm@example.com".folder-aliases] -drafts = "Drafts" -inbox = "Inbox" -sent = "Sent" -trash = "Deleted" diff --git a/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix b/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix deleted file mode 100644 index d40f39ba86..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - accounts.email.accounts = { - "hm@example.com" = { - primary = true; - address = "hm@example.com"; - userName = "home.manager"; - realName = "H. M. Test"; - passwordCommand = "password-command"; - folders = { trash = "Deleted"; }; - msmtp.enable = true; - himalaya = { - enable = true; - settings = { sendmail-cmd = "msmtp"; }; - }; - }; - }; - - programs.himalaya = { - enable = true; - settings = { email-listing-page-size = 50; }; - }; - - test.stubs.himalaya = { }; - - nmt.script = '' - assertFileExists home-files/.config/himalaya/config.toml - assertFileContent home-files/.config/himalaya/config.toml ${ - ./maildir-sendmail-expected.toml - } - ''; -} diff --git a/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml b/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml deleted file mode 100644 index fcc00c7c8e..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml +++ /dev/null @@ -1,16 +0,0 @@ -email-listing-page-size = 50 - -["hm@example.com"] -backend = "notmuch" -default = true -display-name = "H. M. Test" -email = "hm@example.com" -notmuch-db-path = "/home/hm-user/Maildir" -sender = "sendmail" -sendmail-cmd = "msmtp" - -["hm@example.com".folder-aliases] -drafts = "Drafts" -inbox = "Inbox" -sent = "Sent" -trash = "Deleted" diff --git a/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix b/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix deleted file mode 100644 index ff96dfd1f2..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - accounts.email.accounts = { - "hm@example.com" = { - primary = true; - address = "hm@example.com"; - userName = "home.manager"; - realName = "H. M. Test"; - passwordCommand = "password-command"; - folders = { trash = "Deleted"; }; - notmuch.enable = true; - msmtp.enable = true; - himalaya = { - enable = true; - settings = { sendmail-cmd = "msmtp"; }; - }; - }; - }; - - programs.himalaya = { - enable = true; - settings = { email-listing-page-size = 50; }; - }; - - test.stubs.himalaya = { }; - - nmt.script = '' - assertFileExists home-files/.config/himalaya/config.toml - assertFileContent home-files/.config/himalaya/config.toml ${ - ./notmuch-sendmail-expected.toml - } - ''; -} diff --git a/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.conf b/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.conf new file mode 100644 index 0000000000..3fdf9ce3d7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.conf @@ -0,0 +1,27 @@ +background { + monitor= + blur_passes=3 + blur_size=8 + path=screenshot +} + +general { + disable_loading_bar=true + grace=300 + hide_cursor=true + no_fade_in=false +} + +input-field { + monitor= + size=200, 50 + 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... + position=0, -80 + shadow_passes=2 +} diff --git a/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.nix new file mode 100644 index 0000000000..c4f6821e6c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/hyprlock/basic-configuration.nix @@ -0,0 +1,45 @@ +{ ... }: + +{ + programs.hyprlock = { + enable = true; + + settings = { + general = { + disable_loading_bar = true; + grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [{ + monitor = ""; + 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; + }]; + }; + }; + + test.stubs.hyprlock = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/hypr/hyprlock.conf \ + ${./basic-configuration.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.conf b/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.conf new file mode 100644 index 0000000000..1936f43f9e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.conf @@ -0,0 +1,167 @@ +background { + monitor= + blur_passes=3 + blur_size=8 + brightness=0.817200 + color=rgba(25, 20, 20, 1.0) + contrast=0.891700 + noise=0.011700 + path=screenshot + vibrancy=0.168600 + vibrancy_darkness=0.050000 +} + +general { + disable_loading_bar=true + grace=300 + hide_cursor=true + ignore_empty_input=false + no_fade_in=false + no_fade_out=false +} + +image { + monitor= + size=120 + border_color=rgb(202, 211, 245) + border_size=5 + halign=center + path=/home/$USER/.face + position=0, 45 + reload_cmd= + reload_time=-1 + rotate=0.000000 + rounding=-1 + shadow_passes=1 + valign=center +} + +input-field { + monitor= + size=200, 50 + bothlock_color=-1 + capslock_color=-1 + check_color=rgb(204, 136, 34) + dots_center=true + dots_rounding=-1 + dots_size=0.330000 + dots_spacing=0.150000 + fade_on_empty=false + fade_timeout=2000 + fail_color=rgb(204, 34, 34) + fail_text=$FAIL + fail_transition=300 + font_color=rgb(202, 211, 245) + halign=center + hide_input=false + inner_color=rgb(91, 96, 120) + invert_numlock=false + numlock_color=-1 + outer_color=rgb(24, 25, 38) + outline_thickness=5 + placeholder_text=Password... + position=0, -80 + rounding=-1 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=2 + shadow_size=3 + swap_font_color=false + valign=center +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=100 + halign=center + position=0, 330 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=2 + shadow_size=3 + text=$TIME + valign=center +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=25 + halign=left + position=10, 0 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=1 + shadow_size=3 + text= $USER + valign=top +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=50 + halign=center + position=15, -350 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=1 + shadow_size=3 + text=󰌾 + valign=center +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=25 + halign=center + position=0, -430 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=1 + shadow_size=3 + text=Locked + valign=center +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=30 + halign=center + position=0, 210 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=1 + shadow_size=3 + text=cmd[update:120000] echo "$(date +'%a %d %B')" + valign=center +} + +label { + monitor= + color=rgb(202, 211, 245) + font_family=MonaspiceNe Nerd Font + font_size=25 + halign=right + position=5, 8 + rotate=0.000000 + shadow_boost=1.200000 + shadow_color=rgba(0, 0, 0, 1.0) + shadow_passes=1 + shadow_size=3 + text= + valign=bottom +} diff --git a/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.nix b/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.nix new file mode 100644 index 0000000000..8544a8c52e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/hyprlock/complex-configuration.nix @@ -0,0 +1,183 @@ +{ ... }: + +{ + programs.hyprlock = { + enable = true; + + settings = { + general = { + disable_loading_bar = true; + hide_cursor = true; + ignore_empty_input = false; + grace = 300; + no_fade_in = false; + no_fade_out = false; + }; + + background = [{ + monitor = ""; + brightness = "0.817200"; + color = "rgba(25, 20, 20, 1.0)"; + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + contrast = "0.891700"; + noise = "0.011700"; + vibrancy = "0.168600"; + vibrancy_darkness = "0.050000"; + }]; + + input-field = [{ + monitor = ""; + size = "200, 50"; + position = "0, -80"; + outline_thickness = 5; + dots_center = true; + outer_color = "rgb(24, 25, 38)"; + inner_color = "rgb(91, 96, 120)"; + font_color = "rgb(202, 211, 245)"; + fade_on_empty = false; + placeholder_text = ''Password...''; + shadow_passes = 2; + bothlock_color = -1; + capslock_color = "-1"; + check_color = "rgb(204, 136, 34)"; + dots_rounding = "-1"; + dots_size = "0.330000"; + dots_spacing = "0.150000"; + fade_timeout = "2000"; + fail_color = "rgb(204, 34, 34)"; + fail_text = "$FAIL"; + fail_transition = 300; + halign = "center"; + hide_input = false; + invert_numlock = false; + numlock_color = -1; + rounding = -1; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + swap_font_color = false; + valign = "center"; + }]; + + image = [{ + monitor = ""; + size = 120; + position = "0, 45"; + path = "/home/$USER/.face"; + border_color = "rgb(202, 211, 245)"; + border_size = 5; + halign = "center"; + valign = "center"; + shadow_passes = 1; + reload_cmd = ""; + reload_time = -1; + rotate = "0.000000"; + rounding = "-1"; + }]; + + label = [ + { + monitor = ""; + text = ''$TIME''; + color = "rgb(202, 211, 245)"; + font_size = 100; + font_family = "MonaspiceNe Nerd Font"; + valign = "center"; + halign = "center"; + position = "0, 330"; + shadow_passes = 2; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + } + { + monitor = ""; + text = '' $USER''; + color = "rgb(202, 211, 245)"; + font_size = 25; + font_family = "MonaspiceNe Nerd Font"; + valign = "top"; + halign = "left"; + position = "10, 0"; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + shadow_passes = 1; + } + { + monitor = ""; + text = ''󰌾 ''; + color = "rgb(202, 211, 245)"; + font_size = 50; + font_family = "MonaspiceNe Nerd Font"; + valign = "center"; + halign = "center"; + position = "15, -350"; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + shadow_passes = 1; + } + { + monitor = ""; + text = ''Locked''; + color = "rgb(202, 211, 245)"; + font_size = 25; + font_family = "MonaspiceNe Nerd Font"; + valign = "center"; + halign = "center"; + position = "0, -430"; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + shadow_passes = 1; + } + { + monitor = ""; + text = '' + cmd[update:120000] echo "$(date +'%a %d %B')"''; + color = "rgb(202, 211, 245)"; + font_size = 30; + font_family = "MonaspiceNe Nerd Font"; + valign = "center"; + halign = "center"; + position = "0, 210"; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + shadow_passes = 1; + } + { + monitor = ""; + text = '' ''; + color = "rgb(202, 211, 245)"; + font_size = 25; + font_family = "MonaspiceNe Nerd Font"; + valign = "bottom"; + halign = "right"; + position = "5, 8"; + rotate = "0.000000"; + shadow_boost = "1.200000"; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_size = 3; + shadow_passes = 1; + } + ]; + }; + }; + + test.stubs.hyprlock = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/hypr/hyprlock.conf \ + ${./complex-configuration.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/hyprlock/default.nix b/third_party/home-manager/tests/modules/programs/hyprlock/default.nix new file mode 100644 index 0000000000..3ea18c021f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/hyprlock/default.nix @@ -0,0 +1,4 @@ +{ + hyprlock-basic-configuration = ./basic-configuration.nix; + hyprlock-complex-configuration = ./complex-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.json b/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.json new file mode 100644 index 0000000000..63e105ae7b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.json @@ -0,0 +1,6 @@ +{ + "newNoteFocus": "title", + "richTextBannerDismissed": true, + "sync.interval": 600, + "sync.target": 7 +} diff --git a/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.nix new file mode 100644 index 0000000000..9f986798fb --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/joplin-desktop/basic-configuration.nix @@ -0,0 +1,23 @@ +{ + programs.joplin-desktop = { + enable = true; + sync = { + target = "dropbox"; + interval = "10m"; + }; + extraConfig = { + "richTextBannerDismissed" = true; + "newNoteFocus" = "title"; + }; + }; + + test.stubs.joplin-desktop = { }; + + nmt.script = '' + assertFileContains activate \ + '/home/hm-user/.config/joplin-desktop/settings.json' + + generated="$(grep -o '/nix/store/.*-joplin-settings.json' $TESTED/activate)" + diff -u "$generated" ${./basic-configuration.json} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/joplin-desktop/default.nix b/third_party/home-manager/tests/modules/programs/joplin-desktop/default.nix new file mode 100644 index 0000000000..3ccd7320bc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/joplin-desktop/default.nix @@ -0,0 +1 @@ +{ joplin-desktop-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix b/third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix index 12c4a2f54f..10dd12589d 100644 --- a/third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix +++ b/third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix @@ -6,6 +6,6 @@ test.stubs.jujutsu = { }; nmt.script = '' - assertPathNotExists home-files/.jjconfig.toml + assertPathNotExists home-files/.config/jj/config.toml ''; } diff --git a/third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix b/third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix index 06b68f18c0..d83b552b22 100644 --- a/third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix +++ b/third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix @@ -13,9 +13,9 @@ }; nmt.script = '' - assertFileExists home-files/.jjconfig.toml + assertFileExists home-files/.config/jj/config.toml assertFileContent \ - home-files/.jjconfig.toml \ + home-files/.config/jj/config.toml \ ${ builtins.toFile "expected.toml" '' [user] diff --git a/third_party/home-manager/tests/modules/programs/k9s/default.nix b/third_party/home-manager/tests/modules/programs/k9s/default.nix index 58d9f32f3e..6f5b1ba2a1 100644 --- a/third_party/home-manager/tests/modules/programs/k9s/default.nix +++ b/third_party/home-manager/tests/modules/programs/k9s/default.nix @@ -1,4 +1,6 @@ { k9s-example-settings = ./example-settings.nix; k9s-empty-settings = ./empty-settings.nix; + k9s-deprecated-options = ./deprecated-options.nix; + k9s-partial-skin-settings = ./partial-skin-settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/k9s/deprecated-options.nix b/third_party/home-manager/tests/modules/programs/k9s/deprecated-options.nix new file mode 100644 index 0000000000..a2bf4685aa --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/deprecated-options.nix @@ -0,0 +1,33 @@ +{ config, lib, options, ... }: { + programs.k9s = { + enable = true; + skin = { + k9s = { + body = { + fgColor = "dodgerblue"; + bgColor = "#ffffff"; + logoColor = "#0000ff"; + }; + info = { + fgColor = "lightskyblue"; + sectionColor = "steelblue"; + }; + }; + }; + }; + + test.stubs.k9s = { }; + + test.asserts.warnings.enable = true; + test.asserts.warnings.expected = [ + "The option `programs.k9s.skin' defined in ${ + lib.showFiles options.programs.k9s.skin.files + } has been renamed to `programs.k9s.skins.skin'." + ]; + nmt.script = '' + assertFileExists home-files/.config/k9s/skins/skin.yaml + assertFileContent \ + home-files/.config/k9s/skins/skin.yaml \ + ${./example-skin-expected.yaml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/k9s/empty-settings.nix b/third_party/home-manager/tests/modules/programs/k9s/empty-settings.nix index 5084be4fe0..355340054e 100644 --- a/third_party/home-manager/tests/modules/programs/k9s/empty-settings.nix +++ b/third_party/home-manager/tests/modules/programs/k9s/empty-settings.nix @@ -1,11 +1,17 @@ -{ ... }: +{ pkgs, lib, ... }: { -{ programs.k9s.enable = true; + xdg.enable = lib.mkIf pkgs.stdenv.isDarwin (lib.mkForce false); + test.stubs.k9s = { }; - nmt.script = '' - assertPathNotExists home-files/.config/k9s + nmt.script = let + configDir = if !pkgs.stdenv.isDarwin then + ".config/k9s" + else + "Library/Application Support/k9s"; + in '' + assertPathNotExists home-files/${configDir} ''; } diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yaml similarity index 100% rename from third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-aliases-expected.yaml diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yaml similarity index 76% rename from third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yaml index 019ee7a727..5f4c43ffae 100644 --- a/third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yml +++ b/third_party/home-manager/tests/modules/programs/k9s/example-config-expected.yaml @@ -3,3 +3,5 @@ k9s: headless: false maxConnRetry: 5 refreshRate: 2 + ui: + skin: default diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yaml similarity index 100% rename from third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-hotkey-expected.yaml diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yaml similarity index 100% rename from third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-plugin-expected.yaml diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix b/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix index 3c935aa6fc..23a42120b3 100644 --- a/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/k9s/example-settings.nix @@ -1,6 +1,8 @@ -{ config, ... }: +{ config, pkgs, lib, ... }: { + xdg.enable = lib.mkIf pkgs.stdenv.isDarwin (lib.mkForce false); + programs.k9s = { enable = true; package = config.lib.test.mkStubPackage { }; @@ -11,6 +13,7 @@ maxConnRetry = 5; enableMouse = true; headless = false; + ui.skin = "default"; }; }; hotkey = { @@ -22,16 +25,31 @@ }; }; }; - skin = { - k9s = { - body = { - fgColor = "dodgerblue"; - bgColor = "#ffffff"; - logoColor = "#0000ff"; + skins = { + "default" = { + k9s = { + body = { + fgColor = "dodgerblue"; + bgColor = "#ffffff"; + logoColor = "#0000ff"; + }; + info = { + fgColor = "lightskyblue"; + sectionColor = "steelblue"; + }; }; - info = { - fgColor = "lightskyblue"; - sectionColor = "steelblue"; + }; + "alt-skin" = { + k9s = { + body = { + fgColor = "orangered"; + bgColor = "#ffffff"; + logoColor = "#0000ff"; + }; + info = { + fgColor = "red"; + sectionColor = "mediumvioletred"; + }; }; }; }; @@ -60,30 +78,39 @@ }; }; - nmt.script = '' - assertFileExists home-files/.config/k9s/config.yml + nmt.script = let + configDir = if !pkgs.stdenv.isDarwin then + ".config/k9s" + else + "Library/Application Support/k9s"; + in '' + assertFileExists "home-files/${configDir}/config.yaml" assertFileContent \ - home-files/.config/k9s/config.yml \ - ${./example-config-expected.yml} - assertFileExists home-files/.config/k9s/skin.yml + "home-files/${configDir}/config.yaml" \ + ${./example-config-expected.yaml} + assertFileExists "home-files/${configDir}/skins/default.yaml" assertFileContent \ - home-files/.config/k9s/skin.yml \ - ${./example-skin-expected.yml} - assertFileExists home-files/.config/k9s/hotkey.yml + "home-files/${configDir}/skins/default.yaml" \ + ${./example-skin-expected.yaml} + assertFileExists "home-files/${configDir}/skins/alt-skin.yaml" assertFileContent \ - home-files/.config/k9s/hotkey.yml \ - ${./example-hotkey-expected.yml} - assertFileExists home-files/.config/k9s/aliases.yml + "home-files/${configDir}/skins/alt-skin.yaml" \ + ${./example-skin-expected-alt.yaml} + assertFileExists "home-files/${configDir}/hotkeys.yaml" assertFileContent \ - home-files/.config/k9s/aliases.yml \ - ${./example-aliases-expected.yml} - assertFileExists home-files/.config/k9s/plugin.yml + "home-files/${configDir}/hotkeys.yaml" \ + ${./example-hotkey-expected.yaml} + assertFileExists "home-files/${configDir}/aliases.yaml" assertFileContent \ - home-files/.config/k9s/plugin.yml \ - ${./example-plugin-expected.yml} - assertFileExists home-files/.config/k9s/views.yml + "home-files/${configDir}/aliases.yaml" \ + ${./example-aliases-expected.yaml} + assertFileExists "home-files/${configDir}/plugins.yaml" assertFileContent \ - home-files/.config/k9s/views.yml \ - ${./example-views-expected.yml} + "home-files/${configDir}/plugins.yaml" \ + ${./example-plugin-expected.yaml} + assertFileExists "home-files/${configDir}/views.yaml" + assertFileContent \ + "home-files/${configDir}/views.yaml" \ + ${./example-views-expected.yaml} ''; } diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-skin-expected-alt.yaml b/third_party/home-manager/tests/modules/programs/k9s/example-skin-expected-alt.yaml new file mode 100644 index 0000000000..e78242ab05 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/example-skin-expected-alt.yaml @@ -0,0 +1,8 @@ +k9s: + body: + bgColor: '#ffffff' + fgColor: orangered + logoColor: '#0000ff' + info: + fgColor: red + sectionColor: mediumvioletred diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-skin-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-skin-expected.yaml similarity index 100% rename from third_party/home-manager/tests/modules/programs/k9s/example-skin-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-skin-expected.yaml diff --git a/third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yml b/third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yaml similarity index 100% rename from third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yml rename to third_party/home-manager/tests/modules/programs/k9s/example-views-expected.yaml diff --git a/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings-expected.yaml b/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings-expected.yaml new file mode 100644 index 0000000000..8d8b0ef7db --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings-expected.yaml @@ -0,0 +1,7 @@ +k9s: + enableMouse: true + headless: false + maxConnRetry: 5 + refreshRate: 2 + ui: + skin: alt-skin diff --git a/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings.nix b/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings.nix new file mode 100644 index 0000000000..ba2a61ce52 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/k9s/partial-skin-settings.nix @@ -0,0 +1,55 @@ +{ config, ... }: + +# When not specified in `programs.k9s.settings.ui.skin`, +# test that the first skin name (alphabetically) is used in the config file + +{ + programs.k9s = { + enable = true; + settings = { + k9s = { + refreshRate = 2; + maxConnRetry = 5; + enableMouse = true; + headless = false; + }; + }; + skins = { + "default" = { + k9s = { + body = { + fgColor = "dodgerblue"; + bgColor = "#ffffff"; + logoColor = "#0000ff"; + }; + info = { + fgColor = "lightskyblue"; + sectionColor = "steelblue"; + }; + }; + }; + "alt-skin" = { + k9s = { + body = { + fgColor = "orangered"; + bgColor = "#ffffff"; + logoColor = "#0000ff"; + }; + info = { + fgColor = "red"; + sectionColor = "mediumvioletred"; + }; + }; + }; + }; + }; + + test.stubs.k9s = { }; + + nmt.script = '' + assertFileExists home-files/.config/k9s/config.yaml + assertFileContent \ + home-files/.config/k9s/config.yaml \ + ${./partial-skin-settings-expected.yaml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khal/config.nix b/third_party/home-manager/tests/modules/programs/khal/config.nix index a2eb8bf138..c4a3594588 100644 --- a/third_party/home-manager/tests/modules/programs/khal/config.nix +++ b/third_party/home-manager/tests/modules/programs/khal/config.nix @@ -19,6 +19,7 @@ khal = { enable = true; readOnly = true; + color = "#ff0000"; type = "calendar"; }; local.type = "filesystem"; @@ -29,6 +30,64 @@ url = "https://example.com/events.ical"; }; }; + testWithAddresss = { + khal = { + enable = true; + addresses = [ "john.doe@email.com" ]; + }; + local = { + type = "filesystem"; + fileExt = ".ics"; + }; + remote = { + type = "http"; + url = "https://example.com/events.ical"; + }; + }; + testWithMultipleAddresss = { + khal = { + enable = true; + addresses = [ "john.doe@email.com" "another.brick@on.the.wall" ]; + }; + local = { + type = "filesystem"; + fileExt = ".ics"; + }; + remote = { + type = "http"; + url = "https://example.com/events.ical"; + }; + }; + }; + }; + + accounts.contact = { + basePath = "$XDG_CONFIG_HOME/card"; + accounts = { + testcontacts = { + khal = { + enable = true; + collections = [ "default" "automaticallyCollected" ]; + }; + local.type = "filesystem"; + local.fileExt = ".vcf"; + name = "testcontacts"; + remote = { + type = "http"; + url = "https://example.com/contacts.vcf"; + }; + }; + + testcontactsNoCollections = { + khal.enable = true; + local.type = "filesystem"; + local.fileExt = ".vcf"; + name = "testcontactsNoCollections"; + remote = { + type = "http"; + url = "https://example.com/contacts.vcf"; + }; + }; }; }; diff --git a/third_party/home-manager/tests/modules/programs/khal/khal-config-expected b/third_party/home-manager/tests/modules/programs/khal/khal-config-expected index 361db2d680..32fe7270f8 100644 --- a/third_party/home-manager/tests/modules/programs/khal/khal-config-expected +++ b/third_party/home-manager/tests/modules/programs/khal/khal-config-expected @@ -2,11 +2,49 @@ [[test]] path = /home/hm-user/$XDG_CONFIG_HOME/cal/test/ readonly = True +color = '#ff0000' priority=10 type=calendar +[[testWithAddresss]] +path = /home/hm-user/$XDG_CONFIG_HOME/cal/testWithAddresss/ +addresses= john.doe@email.com +priority=10 +type=calendar + + + +[[testWithMultipleAddresss]] +path = /home/hm-user/$XDG_CONFIG_HOME/cal/testWithMultipleAddresss/ +addresses= john.doe@email.com, another.brick@on.the.wall +priority=10 +type=calendar + + + +[[testcontacts-automaticallyCollected]] +path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/automaticallyCollected +priority=10 +type=birthdays + + + +[[testcontacts-default]] +path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/default +priority=10 +type=birthdays + + + +[[testcontactsNoCollections]] +path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontactsNoCollections/ +priority=10 +type=birthdays + + + [default] default_calendar=test highlight_event_days=true diff --git a/third_party/home-manager/tests/modules/programs/kitty/example-settings-expected.conf b/third_party/home-manager/tests/modules/programs/kitty/example-settings-expected.conf index 41a209eae2..aca1b0c189 100644 --- a/third_party/home-manager/tests/modules/programs/kitty/example-settings-expected.conf +++ b/third_party/home-manager/tests/modules/programs/kitty/example-settings-expected.conf @@ -5,7 +5,7 @@ font_size 8 # Shell integration is sourced and configured manually -shell_integration no-rc enabled +shell_integration no-rc enable_audio_bell no scrollback_lines 10000 diff --git a/third_party/home-manager/tests/modules/programs/mise/bash-integration.nix b/third_party/home-manager/tests/modules/programs/mise/bash-integration.nix new file mode 100644 index 0000000000..552db2ffad --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mise/bash-integration.nix @@ -0,0 +1,16 @@ +{ config, ... }: { + programs = { + mise = { + package = config.lib.test.mkStubPackage { name = "mise"; }; + enable = true; + enableBashIntegration = true; + }; + + bash.enable = true; + }; + + nmt.script = '' + assertFileRegex home-files/.bashrc 'eval "$(/nix/store/.*mise.*/bin/mise activate bash)"' + ''; +} + diff --git a/third_party/home-manager/tests/modules/programs/mise/custom-settings.nix b/third_party/home-manager/tests/modules/programs/mise/custom-settings.nix new file mode 100644 index 0000000000..ddc45353cc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mise/custom-settings.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: { + programs = { + mise = { + package = config.lib.test.mkStubPackage { name = "mise"; }; + enable = true; + globalConfig = { + tools = { + node = "lts"; + python = [ "3.10" "3.11" ]; + }; + + aliases = { my_custom_node = "20"; }; + }; + settings = { + verbose = false; + experimental = true; + disable_tools = [ "node" ]; + }; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/mise/config.toml + assertFileExists home-files/.config/mise/settings.toml + + assertFileContent home-files/.config/mise/config.toml ${ + pkgs.writeText "mise.config.expected" '' + [aliases] + my_custom_node = "20" + + [tools] + node = "lts" + python = ["3.10", "3.11"] + '' + } + + assertFileContent home-files/.config/mise/settings.toml ${ + pkgs.writeText "mise.settings.expected" '' + disable_tools = ["node"] + experimental = true + verbose = false + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/mise/default-settings.nix b/third_party/home-manager/tests/modules/programs/mise/default-settings.nix new file mode 100644 index 0000000000..de59e6297b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mise/default-settings.nix @@ -0,0 +1,13 @@ +{ config, ... }: { + config = { + programs.mise = { + package = config.lib.test.mkStubPackage { name = "mise"; }; + enable = true; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/mise/config.toml + assertPathNotExists home-files/.config/mise/settings.toml + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/mise/default.nix b/third_party/home-manager/tests/modules/programs/mise/default.nix new file mode 100644 index 0000000000..511082a128 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mise/default.nix @@ -0,0 +1,7 @@ +{ + mise-default-settings = ./default-settings.nix; + mise-custom-settings = ./custom-settings.nix; + mise-bash-integration = ./bash-integration.nix; + mise-zsh-integration = ./zsh-integration.nix; + mise-fish-integration = ./fish-integration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix b/third_party/home-manager/tests/modules/programs/mise/fish-integration.nix similarity index 63% rename from third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix rename to third_party/home-manager/tests/modules/programs/mise/fish-integration.nix index edc752bd25..cb58919311 100644 --- a/third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix +++ b/third_party/home-manager/tests/modules/programs/mise/fish-integration.nix @@ -1,7 +1,7 @@ { config, ... }: { programs = { - rtx = { - package = config.lib.test.mkStubPackage { name = "rtx"; }; + mise = { + package = config.lib.test.mkStubPackage { name = "mise"; }; enable = true; enableFishIntegration = true; }; @@ -10,7 +10,7 @@ }; nmt.script = '' - assertFileRegex home-files/.config/fish/config.fish '/nix/store/.*rtx.*/bin/rtx activate fish | source' + assertFileRegex home-files/.config/fish/config.fish '/nix/store/.*mise.*/bin/mise activate fish | source' ''; } diff --git a/third_party/home-manager/tests/modules/programs/mise/zsh-integration.nix b/third_party/home-manager/tests/modules/programs/mise/zsh-integration.nix new file mode 100644 index 0000000000..d9b2cdd903 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mise/zsh-integration.nix @@ -0,0 +1,16 @@ +{ config, ... }: { + programs = { + mise = { + package = config.lib.test.mkStubPackage { name = "mise"; }; + enable = true; + enableZshIntegration = true; + }; + + zsh.enable = true; + }; + + nmt.script = '' + assertFileRegex home-files/.zshrc 'eval "$(/nix/store/.*mise.*/bin/mise activate zsh)"' + ''; +} + diff --git a/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-bindings b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-bindings index 7a2ee13b03..d4ff9c4d08 100644 --- a/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-bindings +++ b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-bindings @@ -1,3 +1,4 @@ Alt+0 set window-scale 0.5 WHEEL_DOWN seek -10 -WHEEL_UP seek 10 \ No newline at end of file +WHEEL_UP seek 10 +# script-binding uosc/video #! Video tracks diff --git a/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings.nix b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings.nix index 58467de0b8..002e071c16 100644 --- a/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings.nix @@ -1,55 +1,55 @@ { config, lib, pkgs, ... }: { - config = { - programs.mpv = { - enable = true; - package = pkgs.mpvDummy; + imports = [ ./mpv-stubs.nix ]; - bindings = { - WHEEL_UP = "seek 10"; - WHEEL_DOWN = "seek -10"; - "Alt+0" = "set window-scale 0.5"; - }; + programs.mpv = { + enable = true; - config = { - force-window = true; - ytdl-format = "bestvideo+bestaudio"; - cache-default = 4000000; - }; - - scriptOpts = { - osc = { - scalewindowed = 2.0; - vidscale = false; - visibility = "always"; - }; - }; - - profiles = { - fast = { vo = "vdpau"; }; - "protocol.dvd" = { - profile-desc = "profile for dvd:// streams"; - alang = "en"; - }; - }; - - defaultProfiles = [ "gpu-hq" ]; + bindings = { + WHEEL_UP = "seek 10"; + WHEEL_DOWN = "seek -10"; + "Alt+0" = "set window-scale 0.5"; }; - test.stubs.mpvDummy = { }; - - nmt.script = '' - assertFileContent \ - home-files/.config/mpv/mpv.conf \ - ${./mpv-example-settings-expected-config} - assertFileContent \ - home-files/.config/mpv/input.conf \ - ${./mpv-example-settings-expected-bindings} - assertFileContent \ - home-files/.config/mpv/script-opts/osc.conf \ - ${./mpv-example-settings-expected-osc-opts} + extraInput = '' + # script-binding uosc/video #! Video tracks ''; + + config = { + force-window = true; + ytdl-format = "bestvideo+bestaudio"; + cache-default = 4000000; + }; + + scriptOpts = { + osc = { + scalewindowed = 2.0; + vidscale = false; + visibility = "always"; + }; + }; + + profiles = { + fast = { vo = "vdpau"; }; + "protocol.dvd" = { + profile-desc = "profile for dvd:// streams"; + alang = "en"; + }; + }; + + defaultProfiles = [ "gpu-hq" ]; }; + nmt.script = '' + assertFileContent \ + home-files/.config/mpv/mpv.conf \ + ${./mpv-example-settings-expected-config} + assertFileContent \ + home-files/.config/mpv/input.conf \ + ${./mpv-example-settings-expected-bindings} + assertFileContent \ + home-files/.config/mpv/script-opts/osc.conf \ + ${./mpv-example-settings-expected-osc-opts} + ''; } diff --git a/third_party/home-manager/tests/modules/programs/mpv/mpv-invalid-settings.nix b/third_party/home-manager/tests/modules/programs/mpv/mpv-invalid-settings.nix index 701c823fb3..896e34fa7b 100644 --- a/third_party/home-manager/tests/modules/programs/mpv/mpv-invalid-settings.nix +++ b/third_party/home-manager/tests/modules/programs/mpv/mpv-invalid-settings.nix @@ -1,25 +1,16 @@ { config, lib, pkgs, ... }: { - config = { - programs.mpv = { - enable = true; - package = pkgs.mpvDummy; - scripts = [ pkgs.mpvScript ]; - }; + imports = [ ./mpv-stubs.nix ]; - nixpkgs.overlays = [ - (self: super: { - mpvScript = - pkgs.runCommandLocal "mpvScript" { scriptName = "something"; } - "mkdir $out"; - }) - ]; - test.stubs.mpvDummy = { }; - - test.asserts.assertions.expected = [ - '' - The programs.mpv "package" option is mutually exclusive with "scripts" option.'' - ]; + programs.mpv = { + enable = true; + package = pkgs.emptyDirectory; + scripts = [ pkgs.mpvScript ]; }; + + test.asserts.assertions.expected = [ + '' + The programs.mpv "package" option is mutually exclusive with "scripts" option.'' + ]; } diff --git a/third_party/home-manager/tests/modules/programs/mpv/mpv-stubs.nix b/third_party/home-manager/tests/modules/programs/mpv/mpv-stubs.nix new file mode 100644 index 0000000000..caef8e69d3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mpv/mpv-stubs.nix @@ -0,0 +1,29 @@ +{ + nixpkgs.overlays = [ + (final: prev: { + mpvScript = prev.runCommandLocal "mpvScript" { scriptName = "something"; } + "mkdir $out"; + + mpv-unwrapped = let + lua = prev.emptyDirectory.overrideAttrs { + luaversion = "0"; + passthru.withPackages = pkgsFn: prev.emptyDirectory; + }; + mpv-unwrapped' = prev.mpv-unwrapped.override { inherit lua; }; + in mpv-unwrapped'.overrideAttrs { + buildInputs = [ ]; + nativeBuildInputs = [ ]; + builder = prev.writeShellScript "dummy" '' + PATH=${final.coreutils}/bin + mkdir -p $dev $doc $man $out/bin $out/Applications/mpv.app/Contents/MacOS + touch $out/bin/{mpv,umpv} \ + $out/Applications/mpv.app/Contents/MacOS/{mpv,mpv-bundle} + chmod +x $out/bin/{mpv,umpv} \ + $out/Applications/mpv.app/Contents/MacOS/{mpv,mpv-bundle} + ''; + }; + }) + ]; + + test.stubs = { yt-dlp = { }; }; +} diff --git a/third_party/home-manager/tests/modules/programs/mu/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/mu/basic-configuration.nix index 70b66fb9ae..93e870da63 100644 --- a/third_party/home-manager/tests/modules/programs/mu/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/programs/mu/basic-configuration.nix @@ -19,6 +19,6 @@ 'if [[ ! -d "/home/hm-user/.cache/mu" ]]; then' assertFileContains activate \ - '$DRY_RUN_CMD @mu@/bin/mu init --maildir=/home/hm-user/Mail --my-address=hm@example.com --my-address=foo@example.com $VERBOSE_ARG;' + 'run @mu@/bin/mu init --maildir=/home/hm-user/Mail --my-address=hm@example.com --my-address=foo@example.com $VERBOSE_ARG;' ''; } diff --git a/third_party/home-manager/tests/modules/programs/neomutt/account-command.sh-expected b/third_party/home-manager/tests/modules/programs/neomutt/account-command.sh-expected new file mode 100644 index 0000000000..5698cf99cc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/account-command.sh-expected @@ -0,0 +1,39 @@ +#!/nix/store/00000000000000000000000000000000-bash/bin/bash +# 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 + home.manager@imap.example.com) + found=1 + username="home.manager" + password="$(password-command)" + ;; +esac + +if [ -n "$found" ]; then + echo "username: $username" + echo "password: $password" +fi + diff --git a/third_party/home-manager/tests/modules/programs/neomutt/default.nix b/third_party/home-manager/tests/modules/programs/neomutt/default.nix index 88e90c1d4b..5666ade098 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/default.nix +++ b/third_party/home-manager/tests/modules/programs/neomutt/default.nix @@ -1,6 +1,7 @@ { neomutt-simple = ./neomutt.nix; neomutt-with-msmtp = ./neomutt-with-msmtp.nix; + neomutt-with-imap = ./neomutt-with-imap.nix; neomutt-not-primary = ./neomutt-not-primary.nix; neomutt-with-binds = ./neomutt-with-binds.nix; neomutt-with-binds-with-warning = ./neomutt-with-binds-with-warning.nix; @@ -9,7 +10,9 @@ neomutt-with-gpg = ./neomutt-with-gpg.nix; neomutt-no-folder-change = ./neomutt-no-folder-change.nix; neomutt-with-named-mailboxes = ./neomutt-with-named-mailboxes.nix; + neomutt-with-imap-type-mailboxes = ./neomutt-with-imap-type-mailboxes.nix; neomutt-with-signature = ./neomutt-with-signature.nix; neomutt-with-signature-command = ./neomutt-with-signature-command.nix; neomutt-with-starttls = ./neomutt-with-starttls.nix; + neomutt-unmailboxes = ./neomutt-unmailboxes.nix; } diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-expected b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-expected index 51fdcc6ec7..e31f0d01ac 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-expected +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-expected @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf index 576064243d..f377107192 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = yes set crypt_opportunistic_encrypt = yes set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-imap-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-imap-expected.conf new file mode 100644 index 0000000000..f5e9116d16 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-imap-expected.conf @@ -0,0 +1,34 @@ +# Generated by Home Manager. +set ssl_force_tls = yes +set certificate_file=/etc/ssl/certs/ca-certificates.crt + +# GPG section +set crypt_autosign = no +set crypt_opportunistic_encrypt = no +set pgp_use_gpg_agent = yes +set mbox_type = Maildir +set sort = "threads" + +# MTA section +set smtp_pass="`password-command`" +set smtp_url='smtps://home.manager@smtp.example.com' + + + + + +# MRA section +set folder='imaps://home.manager@imap.example.com:993' +set from='hm@example.com' +set postponed='+Drafts' +set realname='H. M. Test' +set record='+Sent' +set spoolfile='+Inbox' +set trash='+Trash' + + +# Extra configuration +color status cyan default + + +unset signature diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf index 354cc43ee6..6d4a845d01 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf index e5dee06168..44def8ae7b 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-command-expected b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-command-expected index c3b3506704..57825af4eb 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-command-expected +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-command-expected @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-expected b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-expected index 66e941c180..c17314ed52 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-expected +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-signature-expected @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected index 1e5b15cac4..59aa3d1cdd 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-starttls-expected @@ -3,7 +3,6 @@ set ssl_force_tls = yes set certificate_file=/etc/ssl/certs/ca-certificates.crt # GPG section -set crypt_use_gpgme = yes set crypt_autosign = no set crypt_opportunistic_encrypt = no set pgp_use_gpg_agent = yes diff --git a/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-unmailboxes-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-unmailboxes-expected.conf new file mode 100644 index 0000000000..35822ceee6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/hm-example.com-unmailboxes-expected.conf @@ -0,0 +1,34 @@ +# Generated by Home Manager. +unmailboxes * + +set ssl_force_tls = yes +set certificate_file=/etc/ssl/certs/ca-certificates.crt + +# GPG section +set crypt_autosign = no +set crypt_opportunistic_encrypt = no +set pgp_use_gpg_agent = yes +set mbox_type = Maildir +set sort = "threads" + +# MTA section +set sendmail='msmtpq --read-envelope-from --read-recipients' + + + + + +# MRA section +set folder='/home/hm-user/Mail/hm@example.com' +set from='hm@example.com' +set postponed='+Drafts' +set realname='H. M. Test' +set record='+Sent' +set spoolfile='+Inbox' +set trash='+Trash' + + +# Extra configuration + + +unset signature diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-expected.conf index 7c0e5d28a8..2a45234dd9 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-expected.conf @@ -3,19 +3,20 @@ set header_cache = "/home/hm-user/.cache/neomutt/headers/" set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" set editor = "$EDITOR" set implicit_autoview = yes +set crypt_use_gpgme = yes alternative_order text/enriched text/plain text set delete = yes + + # Binds # Macros - - # Register accounts # register account hm@example.com mailboxes "/home/hm-user/Mail/hm@example.com/Inbox" diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-not-primary-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-not-primary-expected.conf index 4a583a02d6..47dc817398 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-not-primary-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-not-primary-expected.conf @@ -3,19 +3,20 @@ set header_cache = "/home/hm-user/.cache/neomutt/headers/" set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" set editor = "$EDITOR" set implicit_autoview = yes +set crypt_use_gpgme = yes alternative_order text/enriched text/plain text set delete = yes + + # Binds # Macros - - # Register accounts # register account hm-account mailboxes "/home/hm-user/Mail/hm-account/Inbox" diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-unmailboxes.nix b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-unmailboxes.nix new file mode 100644 index 0000000000..162379b809 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-unmailboxes.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + config = { + accounts.email.accounts = { + "hm@example.com" = { + msmtp.enable = true; + neomutt.enable = true; + imap.port = 993; + }; + }; + + programs.neomutt.enable = true; + programs.neomutt.unmailboxes = true; + + test.stubs.neomutt = { }; + + nmt.script = '' + assertFileExists home-files/.config/neomutt/hm@example.com + assertFileContent home-files/.config/neomutt/hm@example.com ${ + ./hm-example.com-unmailboxes-expected.conf + } + ''; + }; +} + diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-expected.conf index 8b4bb7bce2..05736749f9 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-expected.conf @@ -3,11 +3,14 @@ set header_cache = "/home/hm-user/.cache/neomutt/headers/" set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" set editor = "$EDITOR" set implicit_autoview = yes +set crypt_use_gpgme = yes alternative_order text/enriched text/plain text set delete = yes + + # Binds bind editor "complete-query" bind index,pager \Cp "sidebar-prev" @@ -16,8 +19,6 @@ bind index,pager \Cp "sidebar-prev" macro index s "?" macro index,pager c "?^K=" - - # Register accounts # register account hm@example.com mailboxes "/home/hm-user/Mail/hm@example.com/Inbox" diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-expected.conf new file mode 100644 index 0000000000..02f03f6ec2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-expected.conf @@ -0,0 +1,35 @@ +# Generated by Home Manager. +set header_cache = "/home/hm-user/.cache/neomutt/headers/" +set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" +set editor = "$EDITOR" +set implicit_autoview = yes +set crypt_use_gpgme = yes + +alternative_order text/enriched text/plain text + +set delete = yes + + + +# Binds + + +# Macros + + +# Register accounts +set account_command = '/nix/store/00000000000000000000000000000000-account-command.sh/bin/account-command.sh' +# register account hm@example.com +mailboxes "imaps://home.manager@imap.example.com:993/Inbox" + +account-hook imaps://home.manager@imap.example.com:993/ " \ + source /home/hm-user/.config/neomutt/hm@example.com " + + +# Source primary account +source /home/hm-user/.config/neomutt/hm@example.com + +# Extra configuration + + + diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes-expected.conf new file mode 100644 index 0000000000..51c6c6b9f3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes-expected.conf @@ -0,0 +1,37 @@ +# Generated by Home Manager. +set header_cache = "/home/hm-user/.cache/neomutt/headers/" +set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" +set editor = "$EDITOR" +set implicit_autoview = yes +set crypt_use_gpgme = yes + +alternative_order text/enriched text/plain text + +set delete = yes + + + +# Binds + + +# Macros + + +# Register accounts +set account_command = '/nix/store/00000000000000000000000000000000-account-command.sh/bin/account-command.sh' +# register account hm@example.com +named-mailboxes "someCustomName" "/home/hm-user/Mail/hm@example.com/Inbox" +mailboxes "/home/hm-user/Mail/hm@example.com/Sent" +named-mailboxes "Spam" "imaps://home.manager@imap.example.com:993/Junk Email" +mailboxes "/home/hm-user/Mail/hm@example.com/Trash" +folder-hook /home/hm-user/Mail/hm@example.com/ " \ + source /home/hm-user/.config/neomutt/hm@example.com " + + +# Source primary account +source /home/hm-user/.config/neomutt/hm@example.com + +# Extra configuration + + + diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes.nix b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes.nix new file mode 100644 index 0000000000..10dcdbed66 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap-type-mailboxes.nix @@ -0,0 +1,57 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + config = { + accounts.email.accounts = { + "hm@example.com" = { + notmuch.enable = true; + neomutt = { + enable = true; + extraConfig = '' + color status cyan default + ''; + mailboxName = "someCustomName"; + extraMailboxes = [ + "Sent" + { + mailbox = "Junk Email"; + name = "Spam"; + type = "imap"; + } + { mailbox = "Trash"; } + ]; + }; + imap.port = 993; + }; + }; + + programs.neomutt = { + enable = true; + vimKeys = false; + }; + + test.stubs.neomutt = { }; + + nmt.script = '' + assertFileExists home-files/.config/neomutt/neomuttrc + assertFileExists home-files/.config/neomutt/hm@example.com + assertFileContent $(normalizeStorePaths home-files/.config/neomutt/neomuttrc) ${ + ./neomutt-with-imap-type-mailboxes-expected.conf + } + assertFileContent home-files/.config/neomutt/hm@example.com ${ + ./hm-example.com-expected + } + + confFile=$(grep -o \ + '/nix/store/.*-account-command.sh/bin/account-command.sh' \ + $TESTED/home-files/.config/neomutt/neomuttrc) + assertFileContent "$(normalizeStorePaths "$confFile")" ${ + ./account-command.sh-expected + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap.nix b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap.nix new file mode 100644 index 0000000000..3f234fde7c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-imap.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + config = { + accounts.email.accounts = { + "hm@example.com" = { + neomutt = { + enable = true; + mailboxType = "imap"; + extraConfig = '' + color status cyan default + ''; + }; + imap.port = 993; + }; + }; + + programs.neomutt.enable = true; + + test.stubs.neomutt = { }; + + nmt.script = '' + assertFileExists home-files/.config/neomutt/neomuttrc + assertFileExists home-files/.config/neomutt/hm@example.com + assertFileContent $(normalizeStorePaths home-files/.config/neomutt/neomuttrc) ${ + ./neomutt-with-imap-expected.conf + } + assertFileContent home-files/.config/neomutt/hm@example.com ${ + ./hm-example.com-imap-expected.conf + } + + confFile=$(grep -o \ + '/nix/store/.*-account-command.sh/bin/account-command.sh' \ + $TESTED/home-files/.config/neomutt/neomuttrc) + assertFileContent "$(normalizeStorePaths "$confFile")" ${ + ./account-command.sh-expected + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-named-mailboxes-expected.conf b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-named-mailboxes-expected.conf index e58660fc76..605b5ed6de 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-named-mailboxes-expected.conf +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-named-mailboxes-expected.conf @@ -3,19 +3,20 @@ set header_cache = "/home/hm-user/.cache/neomutt/headers/" set message_cachedir = "/home/hm-user/.cache/neomutt/messages/" set editor = "$EDITOR" set implicit_autoview = yes +set crypt_use_gpgme = yes alternative_order text/enriched text/plain text set delete = yes + + # Binds # Macros - - # Register accounts # register account hm@example.com named-mailboxes "someCustomName" "/home/hm-user/Mail/hm@example.com/Inbox" diff --git a/third_party/home-manager/tests/modules/programs/neovim/runtime.nix b/third_party/home-manager/tests/modules/programs/neovim/runtime.nix index b9d9638a8b..7f39c84616 100644 --- a/third_party/home-manager/tests/modules/programs/neovim/runtime.nix +++ b/third_party/home-manager/tests/modules/programs/neovim/runtime.nix @@ -20,6 +20,17 @@ with lib; }; } ]; + extraWrapperArgs = let buildDeps = with pkgs; [ stdenv.cc.cc zlib ]; + in [ + "--suffix" + "LIBRARY_PATH" + ":" + "${lib.makeLibraryPath buildDeps}" + "--suffix" + "PKG_CONFIG_PATH" + ":" + "${lib.makeSearchPathOutput "dev" "lib/pkgconfig" buildDeps}" + ]; } { extraPython3Packages = ps: with ps; [ jedi pynvim ]; @@ -33,7 +44,10 @@ with lib; nmt.script = '' ftplugin="home-files/.config/nvim/after/ftplugin/c.vim" + nvimbin="home-path/bin/nvim" assertFileExists "$ftplugin" + assertFileRegex "$nvimbin" 'LIBRARY_PATH' + assertFileRegex "$nvimbin" 'PKG_CONFIG_PATH' ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/nushell/example-settings.nix b/third_party/home-manager/tests/modules/programs/nushell/example-settings.nix index 73038584b6..d870eb9db0 100644 --- a/third_party/home-manager/tests/modules/programs/nushell/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/nushell/example-settings.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.nushell = { @@ -34,7 +34,7 @@ test.stubs.nushell = { }; nmt.script = let - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell" else "home-files/.config/nushell"; diff --git a/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix b/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix index ad77f821aa..da4ffafd36 100644 --- a/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix +++ b/third_party/home-manager/tests/modules/programs/oh-my-posh/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs = { @@ -16,12 +16,12 @@ }; nmt.script = let - configFile = if pkgs.stdenv.isDarwin then + configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu"; - envFile = if pkgs.stdenv.isDarwin then + envFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/env.nu" else "home-files/.config/nushell/env.nu"; diff --git a/third_party/home-manager/tests/modules/programs/pls/zsh.nix b/third_party/home-manager/tests/modules/programs/pls/zsh.nix index f3bcbf2a8f..3a27c4d3e5 100644 --- a/third_party/home-manager/tests/modules/programs/pls/zsh.nix +++ b/third_party/home-manager/tests/modules/programs/pls/zsh.nix @@ -23,10 +23,10 @@ with lib; assertFileExists home-files/.zshrc assertFileContains \ home-files/.zshrc \ - "alias ls='@pls@/bin/pls'" + "alias -- 'ls'='@pls@/bin/pls'" assertFileContains \ home-files/.zshrc \ - "alias ll='@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'" + "alias -- 'll'='@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'" ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/poetry/custom-settings.nix b/third_party/home-manager/tests/modules/programs/poetry/custom-settings.nix new file mode 100644 index 0000000000..fc9793067e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/poetry/custom-settings.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + programs.poetry = { + enable = true; + settings = { + virtualenvs.create = true; + virtualenvs.in-project = true; + }; + }; + + test.stubs.poetry = { }; + + nmt.script = let + expectedConfDir = + if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config"; + expectedConfigPath = "home-files/${expectedConfDir}/pypoetry/config.toml"; + expectedConfigContent = pkgs.writeText "poetry.config-custom.expected" '' + [virtualenvs] + create = true + in-project = true + ''; + in '' + assertFileExists "${expectedConfigPath}" + assertFileContent "${expectedConfigPath}" "${expectedConfigContent}" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/poetry/default-settings.nix b/third_party/home-manager/tests/modules/programs/poetry/default-settings.nix new file mode 100644 index 0000000000..145cf18adb --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/poetry/default-settings.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + programs.poetry = { enable = true; }; + + test.stubs.poetry = { }; + + nmt.script = let + expectedConfDir = + if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config"; + expectedConfigPath = "home-files/${expectedConfDir}/pypoetry/config.toml"; + in '' + assertPathNotExists "${expectedConfigPath}" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/poetry/default.nix b/third_party/home-manager/tests/modules/programs/poetry/default.nix new file mode 100644 index 0000000000..50af2a33d0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/poetry/default.nix @@ -0,0 +1,4 @@ +{ + poetry-default-settings = ./default-settings.nix; + poetry-custom-settings = ./custom-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/pqiv/settings.nix b/third_party/home-manager/tests/modules/programs/pqiv/settings.nix index 6a5abe6046..277203da53 100644 --- a/third_party/home-manager/tests/modules/programs/pqiv/settings.nix +++ b/third_party/home-manager/tests/modules/programs/pqiv/settings.nix @@ -10,6 +10,10 @@ thumbnail-size = "256x256"; }; }; + extraConfig = '' + [keybindings] + t { montage_mode_enter() } + ''; }; nmt.script = '' @@ -19,6 +23,10 @@ [options] hide-info-box=1 thumbnail-size=256x256 + + [keybindings] + t { montage_mode_enter() } + '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix b/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix index 00e730efa1..37ccfeba3d 100644 --- a/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix @@ -8,6 +8,7 @@ keyBindings = { normal = { + ":" = null; "" = "spawn mpv {url}"; ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]''; "" = lib.mkMerge [ @@ -35,6 +36,7 @@ config.load_autoconfig(False) c.bindings.default = {} config.bind(",l", "config-cycle spellcheck.languages [\"en-GB\"] [\"en-US\"]", mode="normal") + config.unbind(":", mode="normal") config.bind("", "spawn mpv {url}", mode="normal") config.bind("", "config-cycle tabs.show never always ;; config-cycle statusbar.show in-mode always ;; config-cycle scrolling.bar never always", mode="normal") config.bind("", "prompt-yes", mode="prompt")'' diff --git a/third_party/home-manager/tests/modules/programs/ranger/configuration-rc.conf b/third_party/home-manager/tests/modules/programs/ranger/configuration-rc.conf new file mode 100644 index 0000000000..ee18f4c612 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ranger/configuration-rc.conf @@ -0,0 +1,13 @@ +set column_ratios 1,3,3 +set confirm_on_delete never +set scroll_offset 8 +set unicode_ellipsis true + +alias e edit +alias filter scout -prts +alias setl setlocal + +map Q quitall +map q quit + +unmap gd diff --git a/third_party/home-manager/tests/modules/programs/ranger/configuration-rifle.conf b/third_party/home-manager/tests/modules/programs/ranger/configuration-rifle.conf new file mode 100644 index 0000000000..7a8671a1bd --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ranger/configuration-rifle.conf @@ -0,0 +1,2 @@ +mime ^text, label editor = vim -- "$@" +mime ^text, label pager = less -- "$@" diff --git a/third_party/home-manager/tests/modules/programs/ranger/configuration.nix b/third_party/home-manager/tests/modules/programs/ranger/configuration.nix new file mode 100644 index 0000000000..5d534e49c1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ranger/configuration.nix @@ -0,0 +1,43 @@ +{ ... }: + +{ + programs.ranger = { + enable = true; + settings = { + column_ratios = "1,3,3"; + confirm_on_delete = "never"; + unicode_ellipsis = true; + scroll_offset = 8; + }; + aliases = { + e = "edit"; + setl = "setlocal"; + filter = "scout -prts"; + }; + mappings = { + Q = "quitall"; + q = "quit"; + }; + extraConfig = "unmap gd"; + rifle = [ + { + condition = "mime ^text, label editor"; + command = ''vim -- "$@"''; + } + { + condition = "mime ^text, label pager"; + command = ''less -- "$@"''; + } + ]; + }; + + nmt.script = '' + assertFileExists home-files/.config/ranger/rc.conf + assertFileContent home-files/.config/ranger/rc.conf \ + ${./configuration-rc.conf} + + assertFileExists home-files/.config/ranger/rifle.conf + assertFileContent home-files/.config/ranger/rifle.conf \ + ${./configuration-rifle.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/ranger/default.nix b/third_party/home-manager/tests/modules/programs/ranger/default.nix new file mode 100644 index 0000000000..84579d5376 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ranger/default.nix @@ -0,0 +1 @@ +{ ranger-configuration = ./configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/rbw/rbw-stubs.nix b/third_party/home-manager/tests/modules/programs/rbw/rbw-stubs.nix index c48d88be61..77436232dc 100644 --- a/third_party/home-manager/tests/modules/programs/rbw/rbw-stubs.nix +++ b/third_party/home-manager/tests/modules/programs/rbw/rbw-stubs.nix @@ -5,12 +5,8 @@ nixpkgs.overlays = [ (self: super: { - pinentry = { - gnome3 = - config.lib.test.mkStubPackage { outPath = "@pinentry-gnome3@"; }; - gtk2 = config.lib.test.mkStubPackage { outPath = "@pinentry-gtk2@"; }; - flavors = [ "gnome3" "gtk2" ]; - }; + pinentry-gnome3 = + config.lib.test.mkStubPackage { outPath = "@pinentry-gnome3@"; }; }) ]; } diff --git a/third_party/home-manager/tests/modules/programs/rbw/settings.nix b/third_party/home-manager/tests/modules/programs/rbw/settings.nix index 8cf9572bb5..ac58201863 100644 --- a/third_party/home-manager/tests/modules/programs/rbw/settings.nix +++ b/third_party/home-manager/tests/modules/programs/rbw/settings.nix @@ -14,7 +14,7 @@ let "email": "name@example.com", "identity_url": "identity.example.com", "lock_timeout": 300, - "pinentry": "@pinentry-gnome3@/bin/pinentry" + "pinentry": "@pinentry-gnome3@/bin/dummy" } ''; in { @@ -27,7 +27,7 @@ in { base_url = "bitwarden.example.com"; identity_url = "identity.example.com"; lock_timeout = 300; - pinentry = "gnome3"; + pinentry = pkgs.pinentry-gnome3; }; }; diff --git a/third_party/home-manager/tests/modules/programs/rbw/simple-settings.nix b/third_party/home-manager/tests/modules/programs/rbw/simple-settings.nix index becf9fad19..b690659a95 100644 --- a/third_party/home-manager/tests/modules/programs/rbw/simple-settings.nix +++ b/third_party/home-manager/tests/modules/programs/rbw/simple-settings.nix @@ -14,7 +14,7 @@ let "email": "name@example.com", "identity_url": null, "lock_timeout": 3600, - "pinentry": "@pinentry-gtk2@/bin/pinentry" + "pinentry": null } ''; in { diff --git a/third_party/home-manager/tests/modules/programs/readline/default.nix b/third_party/home-manager/tests/modules/programs/readline/default.nix index c95745d19c..614b4ce9e2 100644 --- a/third_party/home-manager/tests/modules/programs/readline/default.nix +++ b/third_party/home-manager/tests/modules/programs/readline/default.nix @@ -1 +1,4 @@ -{ readline-using-all-options = ./using-all-options.nix; } +{ + readline-using-all-options = ./using-all-options.nix; + readline-prefer-xdg-dirs = ./prefer-xdg-dirs.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/readline/prefer-xdg-dirs.nix b/third_party/home-manager/tests/modules/programs/readline/prefer-xdg-dirs.nix new file mode 100644 index 0000000000..869b8a2cb3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/readline/prefer-xdg-dirs.nix @@ -0,0 +1,28 @@ +{ ... }: + +{ + home.preferXdgDirectories = true; + + programs.readline = { + enable = true; + variables.bell-style = "audible"; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/inputrc \ + ${ + builtins.toFile "readline-expected" '' + # Generated by Home Manager. + + $include /etc/inputrc + set bell-style audible + + '' + } + + assertFileContains \ + home-path/etc/profile.d/hm-session-vars.sh \ + 'export INPUTRC="/home/hm-user/.config/inputrc"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/rio/example-settings.nix b/third_party/home-manager/tests/modules/programs/rio/example-settings.nix index f3e116f038..68fec35779 100644 --- a/third_party/home-manager/tests/modules/programs/rio/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/rio/example-settings.nix @@ -1,13 +1,6 @@ { config, pkgs, ... }: let - inherit (pkgs.stdenv.hostPlatform) isDarwin; - - path = if isDarwin then - "Library/Application Support/rio/config.toml" - else - ".config/rio/config.toml"; - expected = pkgs.writeText "rio-expected.toml" '' cursor = "_" padding-x = 0 @@ -26,7 +19,7 @@ in { }; nmt.script = '' - assertFileExists home-files/"${path}" - assertFileContent home-files/"${path}" '${expected}' + assertFileExists home-files/.config/rio/config.toml + assertFileContent home-files/.config/rio/config.toml '${expected}' ''; } diff --git a/third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix b/third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix deleted file mode 100644 index 3c05c25cb5..0000000000 --- a/third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, ... }: { - programs = { - rtx = { - package = config.lib.test.mkStubPackage { name = "rtx"; }; - enable = true; - enableBashIntegration = true; - }; - - bash.enable = true; - }; - - nmt.script = '' - assertFileRegex home-files/.bashrc 'eval "$(/nix/store/.*rtx.*/bin/rtx activate bash)"' - ''; -} - diff --git a/third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix b/third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix deleted file mode 100644 index 74c52f9439..0000000000 --- a/third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, ... }: { - programs = { - rtx = { - package = config.lib.test.mkStubPackage { name = "rtx"; }; - enable = true; - settings = { - tools = { - node = "lts"; - python = [ "3.10" "3.11" ]; - }; - - settings = { - verbose = false; - experimental = false; - }; - }; - }; - }; - - nmt.script = '' - assertFileExists home-files/.config/rtx/config.toml - - assertFileContent home-files/.config/rtx/config.toml ${ - pkgs.writeText "rtx.expected" '' - [settings] - experimental = false - verbose = false - - [tools] - node = "lts" - python = ["3.10", "3.11"] - '' - } - ''; -} diff --git a/third_party/home-manager/tests/modules/programs/rtx/default-settings.nix b/third_party/home-manager/tests/modules/programs/rtx/default-settings.nix deleted file mode 100644 index c1a0e7ae5e..0000000000 --- a/third_party/home-manager/tests/modules/programs/rtx/default-settings.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, ... }: { - config = { - programs.rtx = { - package = config.lib.test.mkStubPackage { name = "rtx"; }; - enable = true; - }; - - nmt.script = '' - assertPathNotExists home-files/.config/rtx/config.toml - ''; - }; -} diff --git a/third_party/home-manager/tests/modules/programs/rtx/default.nix b/third_party/home-manager/tests/modules/programs/rtx/default.nix deleted file mode 100644 index 250b5ec6fd..0000000000 --- a/third_party/home-manager/tests/modules/programs/rtx/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - rtx-default-settings = ./default-settings.nix; - rtx-custom-settings = ./custom-settings.nix; - rtx-bash-integration = ./bash-integration.nix; - rtx-zsh-integration = ./zsh-integration.nix; - rtx-fish-integration = ./fish-integration.nix; -} diff --git a/third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix b/third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix deleted file mode 100644 index fcff308d05..0000000000 --- a/third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, ... }: { - programs = { - rtx = { - package = config.lib.test.mkStubPackage { name = "rtx"; }; - enable = true; - enableZshIntegration = true; - }; - - zsh.enable = true; - }; - - nmt.script = '' - assertFileRegex home-files/.zshrc 'eval "$(/nix/store/.*rtx.*/bin/rtx activate zsh)"' - ''; -} - diff --git a/third_party/home-manager/tests/modules/programs/senpai/default.nix b/third_party/home-manager/tests/modules/programs/senpai/default.nix new file mode 100644 index 0000000000..d1a2ba467a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/senpai/default.nix @@ -0,0 +1,4 @@ +{ + senpai-example-settings = ./example-settings.nix; + senpai-empty-settings = ./empty-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/senpai/empty-settings-expected.conf b/third_party/home-manager/tests/modules/programs/senpai/empty-settings-expected.conf new file mode 100644 index 0000000000..9e41645499 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/senpai/empty-settings-expected.conf @@ -0,0 +1,2 @@ +address irc.libera.chat +nickname Guest123456 diff --git a/third_party/home-manager/tests/modules/programs/senpai/empty-settings.nix b/third_party/home-manager/tests/modules/programs/senpai/empty-settings.nix new file mode 100644 index 0000000000..eeed8a39c8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/senpai/empty-settings.nix @@ -0,0 +1,20 @@ +{ config, ... }: + +{ + config = { + programs.senpai = { + enable = true; + package = config.lib.test.mkStubPackage { }; + config = { + address = "irc.libera.chat"; + nickname = "Guest123456"; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/senpai/senpai.scfg \ + ${./empty-settings-expected.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/senpai/example-settings-expected.conf b/third_party/home-manager/tests/modules/programs/senpai/example-settings-expected.conf new file mode 100644 index 0000000000..39d5b11f2c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/senpai/example-settings-expected.conf @@ -0,0 +1,13 @@ +address irc.libera.chat +channel #rahxephon +colors { + prompt 2 +} +highlight guest senpai lenon +nickname Guest123456 +pane-widths { + nicknames 16 +} +password-cmd gopass show irc/guest +realname "Guest von Lenon" +username senpai diff --git a/third_party/home-manager/tests/modules/programs/senpai/example-settings.nix b/third_party/home-manager/tests/modules/programs/senpai/example-settings.nix new file mode 100644 index 0000000000..5b0a5aa267 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/senpai/example-settings.nix @@ -0,0 +1,27 @@ +{ config, ... }: + +{ + config = { + programs.senpai = { + enable = true; + package = config.lib.test.mkStubPackage { }; + config = { + address = "irc.libera.chat"; + nickname = "Guest123456"; + password-cmd = [ "gopass" "show" "irc/guest" ]; + username = "senpai"; + realname = "Guest von Lenon"; + channel = [ "#rahxephon" ]; + highlight = [ "guest" "senpai" "lenon" ]; + pane-widths = { nicknames = 16; }; + colors = { prompt = 2; }; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/senpai/senpai.scfg \ + ${./example-settings-expected.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/spotify-player/app.toml b/third_party/home-manager/tests/modules/programs/spotify-player/app.toml new file mode 100644 index 0000000000..408e84b0dd --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/spotify-player/app.toml @@ -0,0 +1,9 @@ +playback_window_position = "Top" +theme = "default" +[copy_command] +args = [] +command = "wl-copy" + +[device] +audio_cache = false +normalization = false diff --git a/third_party/home-manager/tests/modules/programs/spotify-player/default.nix b/third_party/home-manager/tests/modules/programs/spotify-player/default.nix new file mode 100644 index 0000000000..9812b12812 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/spotify-player/default.nix @@ -0,0 +1 @@ +{ spotify-player-settings = ./settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/spotify-player/keymap.toml b/third_party/home-manager/tests/modules/programs/spotify-player/keymap.toml new file mode 100644 index 0000000000..d11c86e41f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/spotify-player/keymap.toml @@ -0,0 +1,19 @@ +[[keymaps]] +command = "NextTrack" +key_sequence = "g n" + +[[keymaps]] +command = "PreviousTrack" +key_sequence = "g p" + +[[keymaps]] +command = "Search" +key_sequence = "C-c C-x /" + +[[keymaps]] +command = "ResumePause" +key_sequence = "M-enter" + +[[keymaps]] +command = "None" +key_sequence = "q" diff --git a/third_party/home-manager/tests/modules/programs/spotify-player/settings.nix b/third_party/home-manager/tests/modules/programs/spotify-player/settings.nix new file mode 100644 index 0000000000..dc7fe8c6af --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/spotify-player/settings.nix @@ -0,0 +1,103 @@ +{ + programs.spotify-player = { + enable = true; + + settings = { + theme = "default"; + playback_window_position = "Top"; + copy_command = { + command = "wl-copy"; + args = [ ]; + }; + device = { + audio_cache = false; + normalization = false; + }; + }; + + themes = [{ + 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" ]; }; + }; + }]; + + keymaps = [ + { + 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"; + } + ]; + }; + + test.stubs.spotify-player = { }; + + nmt.script = '' + assertFileContent home-files/.config/spotify-player/app.toml ${./app.toml} + assertFileContent home-files/.config/spotify-player/theme.toml ${ + ./theme.toml + } + assertFileContent home-files/.config/spotify-player/keymap.toml ${ + ./keymap.toml + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/spotify-player/theme.toml b/third_party/home-manager/tests/modules/programs/spotify-player/theme.toml new file mode 100644 index 0000000000..cb5fa99d49 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/spotify-player/theme.toml @@ -0,0 +1,58 @@ +[[themes]] +name = "default2" + +[themes.component_style] +[themes.component_style.block_title] +fg = "Magenta" + +[themes.component_style.border] + +[themes.component_style.current_playing] +fg = "Green" +modifiers = ["Bold"] + +[themes.component_style.page_desc] +fg = "Cyan" +modifiers = ["Bold"] + +[themes.component_style.playback_album] +fg = "Yellow" + +[themes.component_style.playback_artists] +fg = "Cyan" +modifiers = ["Bold"] + +[themes.component_style.playback_metadata] +fg = "BrightBlack" + +[themes.component_style.playback_progress_bar] +bg = "BrightBlack" +fg = "Green" + +[themes.component_style.playback_track] +fg = "Cyan" +modifiers = ["Bold"] + +[themes.component_style.selection] +modifiers = ["Bold", "Reversed"] + +[themes.component_style.table_header] +fg = "Blue" + +[themes.palette] +black = "black" +blue = "blue" +bright_black = "bright_black" +bright_blue = "bright_blue" +bright_cyan = "bright_cyan" +bright_green = "bright_green" +bright_magenta = "bright_magenta" +bright_red = "bright_red" +bright_white = "bright_white" +bright_yellow = "bright_yellow" +cyan = "cyan" +green = "green" +magenta = "magenta" +red = "red" +white = "white" +yellow = "yellow" diff --git a/third_party/home-manager/tests/modules/programs/tealdeer/custom-settings.nix b/third_party/home-manager/tests/modules/programs/tealdeer/custom-settings.nix new file mode 100644 index 0000000000..aa9768cf77 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tealdeer/custom-settings.nix @@ -0,0 +1,35 @@ +{ config, pkgs, ... }: { + config = { + programs.tealdeer = { + package = config.lib.test.mkStubPackage { name = "tldr"; }; + enable = true; + settings = { + updates = { + auto_update = true; + auto_update_interval_hours = 72; + }; + display = { use_pager = false; }; + }; + }; + + nmt.script = let + expectedConfDir = if pkgs.stdenv.isDarwin then + "Library/Application Support" + else + ".config"; + expectedConfigPath = "home-files/${expectedConfDir}/tealdeer/config.toml"; + in '' + assertFileExists "${expectedConfigPath}" + assertFileContent "${expectedConfigPath}" ${ + pkgs.writeText "tealdeer.config-custom.expected" '' + [display] + use_pager = false + + [updates] + auto_update = true + auto_update_interval_hours = 72 + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/tealdeer/default-settings.nix b/third_party/home-manager/tests/modules/programs/tealdeer/default-settings.nix new file mode 100644 index 0000000000..438b6edd19 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tealdeer/default-settings.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: { + config = { + programs.tealdeer = { + package = config.lib.test.mkStubPackage { name = "tldr"; }; + enable = true; + }; + + nmt.script = let + expectedConfDir = if pkgs.stdenv.isDarwin then + "Library/Application Support" + else + ".config"; + expectedConfigPath = "home-files/${expectedConfDir}/tealdeer/config.toml"; + in '' + assertPathNotExists "${expectedConfigPath}" + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/tealdeer/default.nix b/third_party/home-manager/tests/modules/programs/tealdeer/default.nix new file mode 100644 index 0000000000..147a664ea1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tealdeer/default.nix @@ -0,0 +1,4 @@ +{ + tealdeer-default-settings = ./default-settings.nix; + tealdeer-custom-settings = ./custom-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix b/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix index 9a55efac08..4569635966 100644 --- a/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix +++ b/third_party/home-manager/tests/modules/programs/thefuck/integration-disabled.nix @@ -6,8 +6,10 @@ thefuck.enableBashIntegration = false; thefuck.enableFishIntegration = false; thefuck.enableZshIntegration = false; + thefuck.enableNushellIntegration = false; bash.enable = true; zsh.enable = true; + nushell.enable = true; }; test.stubs.thefuck = { }; @@ -16,5 +18,6 @@ assertFileNotRegex home-files/.bashrc '@thefuck@/bin/thefuck' assertPathNotExists home-files/.config/fish/functions/fuck.fish assertFileNotRegex home-files/.zshrc '@thefuck@/bin/thefuck' + assertFileNotRegex home-files/.config/nushell/config.nu '@thefuck@/bin/thefuck' ''; } diff --git a/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix index 79cadaf81c..54d6b794e5 100644 --- a/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/thefuck/integration-enabled.nix @@ -6,6 +6,7 @@ bash.enable = true; fish.enable = true; zsh.enable = true; + nushell.enable = true; }; test.stubs.thefuck = { }; @@ -33,5 +34,10 @@ assertFileContains \ home-files/.zshrc \ 'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"')"' + + assertFileExists home-files/.config/nushell/config.nu + assertFileContains \ + home-files/.config/nushell/config.nu \ + 'alias fuck = @thefuck@/bin/thefuck $"(history | last 1 | get command | get 0)"' ''; } diff --git a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-first.js b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-first.js index 0c5a65a828..a0876893b0 100644 --- a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-first.js +++ b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-first.js @@ -12,6 +12,7 @@ user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ec user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.e2etechpref", 0); user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.encryptionpolicy", 0); user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.fullName", "H. M. Test"); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.htmlSigText", "signature"); user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.is_gnupg_key_id", true); user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.last_entered_external_gnupg_key_id", "ABC"); user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.openpgp_key_id", "ABC"); @@ -21,6 +22,7 @@ user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ec user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.valid", true); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.autoEncryptDrafts", false); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.fullName", "H. M. Test Jr."); +user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.htmlSigText", ""); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.protectSubject", false); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.smtpServer", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc"); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.org"); @@ -30,6 +32,7 @@ user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.e2etechpref", 0); user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.encryptionpolicy", 0); user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.fullName", "H. M. Test"); +user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.htmlSigText", "signature"); user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.is_gnupg_key_id", true); user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.last_entered_external_gnupg_key_id", "ABC"); user_pref("mail.identity.id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.openpgp_key_id", "ABC"); diff --git a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-second.js b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-second.js index a7c32fd865..085182cbee 100644 --- a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-second.js +++ b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird-expected-second.js @@ -6,6 +6,7 @@ user_pref("mail.account.account_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da user_pref("mail.accountmanager.accounts", "account_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc"); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.autoEncryptDrafts", false); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.fullName", "H. M. Test Jr."); +user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.htmlSigText", ""); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.protectSubject", false); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.smtpServer", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc"); user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.org"); diff --git a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix index 1b0441a1d9..f65f80bdfa 100644 --- a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix +++ b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix @@ -17,6 +17,11 @@ tls.enable = true; }; smtp.port = 456; + + signature = { + text = "signature"; + showSignature = "append"; + }; }; hm-account = { diff --git a/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.conf b/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.conf new file mode 100644 index 0000000000..3a95c23e06 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.conf @@ -0,0 +1,12 @@ +# Generated by Home Manager. + +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% diff --git a/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.nix new file mode 100644 index 0000000000..28b2899697 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tofi/basic-configuration.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: { + config = { + programs.tofi = { + enable = true; + package = pkgs.tofi; + settings = { + 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%"; + }; + }; + + test.stubs.tofi = { }; + + nmt.script = '' + assertFileExists home-files/.config/tofi/config + assertFileContent home-files/.config/tofi/config \ + ${./basic-configuration.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/tofi/default.nix b/third_party/home-manager/tests/modules/programs/tofi/default.nix new file mode 100644 index 0000000000..22b89d8092 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tofi/default.nix @@ -0,0 +1 @@ +{ tofi-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/topgrade/settings-expected.toml b/third_party/home-manager/tests/modules/programs/topgrade/settings-expected.toml index aeed3d14b0..5e2a47ae69 100644 --- a/third_party/home-manager/tests/modules/programs/topgrade/settings-expected.toml +++ b/third_party/home-manager/tests/modules/programs/topgrade/settings-expected.toml @@ -1,8 +1,9 @@ +[commands] +"Purge unused APT packages" = "sudo apt autoremove" + +[misc] cleanup = true disable = ["sdkman", "flutter", "node", "nix", "home_manager"] remote_topgrade_path = "bin/topgrade" remote_topgrades = ["backup", "ci"] set_title = false - -[commands] -"Purge unused APT packages" = "sudo apt autoremove" diff --git a/third_party/home-manager/tests/modules/programs/topgrade/settings.nix b/third_party/home-manager/tests/modules/programs/topgrade/settings.nix index e80e98b860..1e893eb47d 100644 --- a/third_party/home-manager/tests/modules/programs/topgrade/settings.nix +++ b/third_party/home-manager/tests/modules/programs/topgrade/settings.nix @@ -6,17 +6,21 @@ settings = lib.mkMerge [ { - disable = [ "sdkman" "flutter" "node" "nix" "home_manager" ]; + misc = { + disable = [ "sdkman" "flutter" "node" "nix" "home_manager" ]; - remote_topgrades = [ "backup" "ci" ]; + remote_topgrades = [ "backup" "ci" ]; - remote_topgrade_path = "bin/topgrade"; + remote_topgrade_path = "bin/topgrade"; + }; } { - set_title = false; - cleanup = true; + misc = { + set_title = false; + cleanup = true; + }; commands = { "Purge unused APT packages" = "sudo apt autoremove"; }; } ]; diff --git a/third_party/home-manager/tests/modules/programs/yambar/default.nix b/third_party/home-manager/tests/modules/programs/yambar/default.nix new file mode 100644 index 0000000000..26de56732c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yambar/default.nix @@ -0,0 +1,4 @@ +{ + yambar-empty-settings = ./empty-settings.nix; + yambar-example-settings = ./example-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/yambar/empty-settings.nix b/third_party/home-manager/tests/modules/programs/yambar/empty-settings.nix new file mode 100644 index 0000000000..56cdf27d05 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yambar/empty-settings.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + programs.yambar.enable = true; + + test.stubs.yambar = { }; + + nmt.script = '' + assertPathNotExists home-files/.config/yambar + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yambar/example-settings-expected.yml b/third_party/home-manager/tests/modules/programs/yambar/example-settings-expected.yml new file mode 100644 index 0000000000..0bd9120a9d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yambar/example-settings-expected.yml @@ -0,0 +1,9 @@ +bar: + background: '00000066' + height: 26 + location: top + right: + - clock: + content: + - string: + text: '{time}' diff --git a/third_party/home-manager/tests/modules/programs/yambar/example-settings.nix b/third_party/home-manager/tests/modules/programs/yambar/example-settings.nix new file mode 100644 index 0000000000..de572090c3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yambar/example-settings.nix @@ -0,0 +1,35 @@ +{ config, ... }: + +{ + programs.yambar = { + enable = true; + package = config.lib.test.mkStubPackage { }; + + settings = { + bar = { + location = "top"; + height = 26; + background = "00000066"; + right = [{ clock.content = [{ string.text = "{time}"; }]; }]; + }; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/yambar/config.yml \ + ${ + builtins.toFile "yambar-expected.yml" '' + bar: + background: '00000066' + height: 26 + location: top + right: + - clock: + content: + - string: + text: '{time}' + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix index 9a8c18bf26..ac2e497960 100644 --- a/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -3,10 +3,10 @@ let shellIntegration = '' function ya() { - tmp="$(mktemp -t "yazi-cwd.XXXXX")" + local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } diff --git a/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix index 02506b266b..6d2b9fa313 100644 --- a/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -6,7 +6,7 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end diff --git a/third_party/home-manager/tests/modules/programs/yazi/flavor/init.lua b/third_party/home-manager/tests/modules/programs/yazi/flavor/init.lua new file mode 100644 index 0000000000..8d06fa7a9b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/flavor/init.lua @@ -0,0 +1 @@ +-- This is a flavor. diff --git a/third_party/home-manager/tests/modules/programs/yazi/init.lua b/third_party/home-manager/tests/modules/programs/yazi/init.lua new file mode 100644 index 0000000000..a22493df73 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/init.lua @@ -0,0 +1,3 @@ +require("zoxide"):setup { + update_db = true, +} diff --git a/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix index 121e275671..9adbaa9828 100644 --- a/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -1,19 +1,15 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: let shellIntegration = '' - def --env ya [args?] { + def --env ya [...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 { @@ -27,7 +23,7 @@ in { test.stubs.yazi = { }; nmt.script = let - configPath = if pkgs.stdenv.isDarwin then + configPath = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu"; diff --git a/third_party/home-manager/tests/modules/programs/yazi/plugin/init.lua b/third_party/home-manager/tests/modules/programs/yazi/plugin/init.lua new file mode 100644 index 0000000000..a9286c3d6d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yazi/plugin/init.lua @@ -0,0 +1 @@ +-- This is a plugin. diff --git a/third_party/home-manager/tests/modules/programs/yazi/settings.nix b/third_party/home-manager/tests/modules/programs/yazi/settings.nix index 5a540cafb4..4655ae8b35 100644 --- a/third_party/home-manager/tests/modules/programs/yazi/settings.nix +++ b/third_party/home-manager/tests/modules/programs/yazi/settings.nix @@ -69,6 +69,9 @@ ]; }; }; + initLua = ./init.lua; + plugins = { "test.yazi" = ./plugin; }; + flavors = { "test.yazi" = ./flavor; }; }; test.stubs.yazi = { }; @@ -80,5 +83,11 @@ ${./settings-expected.toml} assertFileContent home-files/.config/yazi/theme.toml \ ${./theme-expected.toml} + assertFileContent home-files/.config/yazi/init.lua \ + ${./init.lua} + assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ + ${./plugin/init.lua} + assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ + ${./flavor/init.lua} ''; } diff --git a/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix index ef7960c592..d5090a6a84 100644 --- a/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -3,10 +3,10 @@ let shellIntegration = '' function ya() { - tmp="$(mktemp -t "yazi-cwd.XXXXX")" + local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } diff --git a/third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix b/third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix index b8f8009399..c648cf7dd8 100644 --- a/third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix +++ b/third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix @@ -26,16 +26,16 @@ assertFileExists home-files/.bashrc assertFileContains \ home-files/.bashrc \ - 'eval "$(zellij setup --generate-auto-start bash)"' + 'eval "$(@zellij@/bin/dummy setup --generate-auto-start bash)"' assertFileExists home-files/.zshrc assertFileContains \ home-files/.zshrc \ - 'eval "$(zellij setup --generate-auto-start zsh)"' + 'eval "$(@zellij@/bin/dummy setup --generate-auto-start zsh)"' assertFileExists home-files/.config/fish/config.fish assertFileContains \ home-files/.config/fish/config.fish \ - 'eval (zellij setup --generate-auto-start fish | string collect)' + 'eval (@zellij@/bin/dummy setup --generate-auto-start fish | string collect)' ''; } diff --git a/third_party/home-manager/tests/modules/programs/zk/default.nix b/third_party/home-manager/tests/modules/programs/zk/default.nix new file mode 100644 index 0000000000..5c3288d96b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zk/default.nix @@ -0,0 +1 @@ +{ zk = ./zk.nix; } diff --git a/third_party/home-manager/tests/modules/programs/zk/expected.toml b/third_party/home-manager/tests/modules/programs/zk/expected.toml new file mode 100644 index 0000000000..688349e8e4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zk/expected.toml @@ -0,0 +1,15 @@ +[extra] +author = "Mickaël" + +[note] +default-title = "Untitled" +extension = "md" +filename = "{{id}}-{{slug title}}" +id-case = "lower" +id-charset = "alphanum" +id-length = 4 +language = "en" +template = "default.md" + +[notebook] +dir = "~/notebook" diff --git a/third_party/home-manager/tests/modules/programs/zk/zk.nix b/third_party/home-manager/tests/modules/programs/zk/zk.nix new file mode 100644 index 0000000000..8907d1677a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zk/zk.nix @@ -0,0 +1,30 @@ +{ ... }: + +{ + programs.zk = { + enable = true; + settings = { + extra = { author = "Mickaël"; }; + + note = { + default-title = "Untitled"; + extension = "md"; + filename = "{{id}}-{{slug title}}"; + id-case = "lower"; + id-charset = "alphanum"; + id-length = 4; + template = "default.md"; + language = "en"; + }; + + notebook = { dir = "~/notebook"; }; + }; + }; + + test.stubs.zk = { }; + + nmt.script = '' + assertFileExists home-files/.config/zk/config.toml + assertFileContent home-files/.config/zk/config.toml ${./expected.toml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix b/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix index 9baf1e4377..981cefb633 100644 --- a/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix +++ b/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix @@ -11,6 +11,7 @@ with lib; package = pkgs.hello; highlighters = [ "brackets" "pattern" "cursor" ]; styles.comment = "fg=#6c6c6c"; + patterns."rm -rf *" = "fg=white,bold,bg=red"; }; }; diff --git a/third_party/home-manager/tests/modules/services/activitywatch/basic-setup.nix b/third_party/home-manager/tests/modules/services/activitywatch/basic-setup.nix new file mode 100644 index 0000000000..d3a14ae875 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/activitywatch/basic-setup.nix @@ -0,0 +1,53 @@ +{ config, ... }: + +let stubPackage = config.lib.test.mkStubPackage { }; + +in { + services.activitywatch = { + enable = true; + settings = { + port = 3012; + custom_static = { custom-watcher = stubPackage; }; + }; + watchers = { + # These are basically examples of a real world usage. + aw-watcher-afk.package = stubPackage; + aw-watcher-window.package = stubPackage; + + custom-watcher = { + package = stubPackage; + settings = { + foo = "bar"; + baz = 8; + }; + settingsFilename = "config.toml"; + }; + + another-custom-watcher = { + package = stubPackage; + settings = { + hello = "there"; + world = "plan"; + }; + }; + }; + }; + + nmt.script = '' + # Basic check for the bare setup. + assertFileExists home-files/.config/systemd/user/activitywatch.service + assertFileExists home-files/.config/systemd/user/activitywatch.target + + # Basic check for the watchers setup. + assertFileExists home-files/.config/systemd/user/activitywatch-watcher-aw-watcher-afk.service + assertFileExists home-files/.config/systemd/user/activitywatch-watcher-aw-watcher-window.service + + # Checking for the generated configurations (and the ones that is not + # supposed to exist). + assertFileExists home-files/.config/activitywatch/aw-server-rust/config.toml + assertFileExists home-files/.config/activitywatch/custom-watcher/config.toml + assertFileExists home-files/.config/activitywatch/another-custom-watcher/another-custom-watcher.toml + assertPathNotExists home-files/.config/activitywatch/aw-watcher-afk/aw-watcher-afk.toml + assertPathNotExists home-files/.config/activitywatch/aw-watcher-window/aw-watcher-window.toml + ''; +} diff --git a/third_party/home-manager/tests/modules/services/activitywatch/default.nix b/third_party/home-manager/tests/modules/services/activitywatch/default.nix new file mode 100644 index 0000000000..3b3f432171 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/activitywatch/default.nix @@ -0,0 +1,4 @@ +{ + activitywatch-basic-setup = ./basic-setup.nix; + activitywatch-empty-server-settings = ./empty-server-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/services/activitywatch/empty-server-settings.nix b/third_party/home-manager/tests/modules/services/activitywatch/empty-server-settings.nix new file mode 100644 index 0000000000..89c65b1f0d --- /dev/null +++ b/third_party/home-manager/tests/modules/services/activitywatch/empty-server-settings.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + services.activitywatch.enable = true; + + test.stubs.activitywatch = { }; + + nmt.script = '' + assertFileExists home-files/.config/systemd/user/activitywatch.service + assertFileExists home-files/.config/systemd/user/activitywatch.target + + assertPathNotExists home-files/.config/activitywatch/aw-server-rust/config.toml + ''; +} diff --git a/third_party/home-manager/tests/modules/services/cliphist/cliphist-extra-options.nix b/third_party/home-manager/tests/modules/services/cliphist/cliphist-extra-options.nix new file mode 100644 index 0000000000..65d4fdca1c --- /dev/null +++ b/third_party/home-manager/tests/modules/services/cliphist/cliphist-extra-options.nix @@ -0,0 +1,24 @@ +{ ... }: { + services.cliphist = { + enable = true; + allowImages = true; + extraOptions = [ "-max-dedupe-search" "10" "-max-items" "500" ]; + }; + + test.stubs = { + cliphist = { }; + wl-clipboard = { }; + }; + + nmt.script = '' + servicePath=home-files/.config/systemd/user + + assertFileExists $servicePath/cliphist.service + assertFileExists $servicePath/cliphist-images.service + + assertFileRegex $servicePath/cliphist.service " '-max-dedupe-search' '10' " + assertFileRegex $servicePath/cliphist.service " '-max-items' '500' " + assertFileRegex $servicePath/cliphist-images.service " '-max-dedupe-search' '10' " + assertFileRegex $servicePath/cliphist-images.service " '-max-items' '500' " + ''; +} diff --git a/third_party/home-manager/tests/modules/services/cliphist/default.nix b/third_party/home-manager/tests/modules/services/cliphist/default.nix index 0110133223..d74a469b1b 100644 --- a/third_party/home-manager/tests/modules/services/cliphist/default.nix +++ b/third_party/home-manager/tests/modules/services/cliphist/default.nix @@ -1 +1,4 @@ -{ cliphist-sway-session-target = ./cliphist-sway-session-target.nix; } +{ + cliphist-sway-session-target = ./cliphist-sway-session-target.nix; + cliphist-extra-options = ./cliphist-extra-options.nix; +} diff --git a/third_party/home-manager/tests/modules/services/conky/basic-configuration.conf b/third_party/home-manager/tests/modules/services/conky/basic-configuration.conf new file mode 100644 index 0000000000..010eac3741 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/conky/basic-configuration.conf @@ -0,0 +1,7 @@ +conky.text = [[ + S Y S T E M I N F O + $hr + Host:$alignr $nodename + Uptime:$alignr $uptime + RAM:$alignr $mem/$memmax +]] diff --git a/third_party/home-manager/tests/modules/services/conky/basic-configuration.nix b/third_party/home-manager/tests/modules/services/conky/basic-configuration.nix new file mode 100644 index 0000000000..479a192393 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/conky/basic-configuration.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + services.conky = { + enable = true; + extraConfig = '' + conky.text = [[ + S Y S T E M I N F O + $hr + Host:$alignr $nodename + Uptime:$alignr $uptime + RAM:$alignr $mem/$memmax + ]] + ''; + }; + + test.stubs.conky = { }; + + nmt.script = '' + serviceFile="$TESTED/home-files/.config/systemd/user/conky.service" + + assertFileExists $serviceFile + assertFileRegex "$serviceFile" \ + 'ExecStart=@conky@/bin/conky --config .*conky.conf' + + configFile="$(grep -o '/nix.*conky.conf' "$serviceFile")" + assertFileContent "$configFile" \ + ${./basic-configuration.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/conky/default.nix b/third_party/home-manager/tests/modules/services/conky/default.nix new file mode 100644 index 0000000000..e4ca38e067 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/conky/default.nix @@ -0,0 +1 @@ +{ conky-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/darkman/default.nix b/third_party/home-manager/tests/modules/services/darkman/default.nix index 6c03491b96..d14067b040 100644 --- a/third_party/home-manager/tests/modules/services/darkman/default.nix +++ b/third_party/home-manager/tests/modules/services/darkman/default.nix @@ -1 +1,4 @@ -{ darkman-basic-configuration = ./basic-configuration.nix; } +{ + darkman-basic-configuration = ./basic-configuration.nix; + darkman-no-configuration = ./no-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/services/darkman/no-configuration.nix b/third_party/home-manager/tests/modules/services/darkman/no-configuration.nix new file mode 100644 index 0000000000..1ab6346f41 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/darkman/no-configuration.nix @@ -0,0 +1,37 @@ +{ + services.darkman.enable = true; + + test.stubs = { + python = { }; + darkman = { }; + }; + + nmt.script = '' + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/darkman.service) + + assertFileExists $serviceFile + assertFileContent $serviceFile ${ + builtins.toFile "expected" '' + [Install] + WantedBy=graphical-session.target + + [Service] + BusName=nl.whynothugo.darkman + ExecStart=@darkman@/bin/dummy run + Restart=on-failure + Slice=background.slice + TimeoutStopSec=15 + Type=dbus + + [Unit] + BindsTo=graphical-session.target + Description=Darkman system service + Documentation=man:darkman(1) + PartOf=graphical-session.target + '' + } + assertPathNotExists home-files/.local/share/dark-mode.d/color-scheme-dark + assertPathNotExists home-files/.local/share/light-mode.d/color-scheme-light + ''; +} + diff --git a/third_party/home-manager/tests/modules/services/espanso-darwin/basic-configuration.nix b/third_party/home-manager/tests/modules/services/espanso-darwin/basic-configuration.nix new file mode 100644 index 0000000000..4a2f2ee778 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/espanso-darwin/basic-configuration.nix @@ -0,0 +1,55 @@ +{ ... }: { + services.espanso = { + enable = true; + configs = { default = { show_notifications = false; }; }; + matches = { + base = { + matches = [ + { + trigger = ":now"; + replace = "It's {{currentdate}} {{currenttime}}"; + } + { + trigger = ":hello"; + replace = '' + line1 + line2''; + } + { + regex = ":hi(?P.*)\\."; + replace = "Hi {{person}}!"; + } + ]; + global_vars = [ + { + name = "currentdate"; + type = "date"; + params = { format = "%d/%m/%Y"; }; + } + { + name = "currenttime"; + type = "date"; + params = { format = "%R"; }; + } + ]; + }; + }; + }; + + test.stubs.espanso = { }; + + nmt.script = '' + serviceFile="LaunchAgents/org.nix-community.home.espanso.plist" + serviceFileNormalized="$(normalizeStorePaths "$serviceFile")" + assertFileExists $serviceFile + assertFileContent $serviceFileNormalized ${./launchd.plist} + + configFile=home-files/.config/espanso/config/default.yml + assertFileExists "$configFile" + assertFileContent "$configFile" ${../espanso/basic-configuration.yaml} + + matchFile=home-files/.config/espanso/match/base.yml + assertFileExists "$matchFile" + assertFileContent "$matchFile" ${../espanso/basic-matches.yaml} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/espanso-darwin/default.nix b/third_party/home-manager/tests/modules/services/espanso-darwin/default.nix new file mode 100644 index 0000000000..6acb2f8d46 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/espanso-darwin/default.nix @@ -0,0 +1 @@ +{ espanso-darwin-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/espanso-darwin/launchd.plist b/third_party/home-manager/tests/modules/services/espanso-darwin/launchd.plist new file mode 100644 index 0000000000..ac8ff53ea3 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/espanso-darwin/launchd.plist @@ -0,0 +1,27 @@ + + + + + EnvironmentVariables + + PATH + @espanso@/bin:/usr/bin:/bin:/usr/sbin:/sbin + + KeepAlive + + Crashed + + SuccessfulExit + + + Label + org.nix-community.home.espanso + ProgramArguments + + @espanso@/bin/espanso + launcher + + RunAtLoad + + + \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/fusuma/expected-service.service b/third_party/home-manager/tests/modules/services/fusuma/expected-service.service index a86627f4c5..585d8a85ea 100644 --- a/third_party/home-manager/tests/modules/services/fusuma/expected-service.service +++ b/third_party/home-manager/tests/modules/services/fusuma/expected-service.service @@ -2,8 +2,8 @@ WantedBy=graphical-session.target [Service] -Environment=PATH=@coreutils@/bin:@xdotool@/bin -ExecStart=@fusuma@/bin/fusuma -c /home/hm-user/.config/fusuma/config.yaml +Environment=PATH=@coreutils@/bin:@xdotool@/bin:@xorg.xprop@/bin +ExecStart=@fusuma@/bin/fusuma [Unit] After=graphical-session-pre.target diff --git a/third_party/home-manager/tests/modules/services/fusuma/service.nix b/third_party/home-manager/tests/modules/services/fusuma/service.nix index d02a75f52e..8041bf7b80 100644 --- a/third_party/home-manager/tests/modules/services/fusuma/service.nix +++ b/third_party/home-manager/tests/modules/services/fusuma/service.nix @@ -7,6 +7,7 @@ extraPackages = [ (config.lib.test.mkStubPackage { outPath = "@coreutils@"; }) (config.lib.test.mkStubPackage { outPath = "@xdotool@"; }) + (config.lib.test.mkStubPackage { outPath = "@xorg.xprop@"; }) ]; settings = { }; }; diff --git a/third_party/home-manager/tests/modules/services/fusuma/settings.nix b/third_party/home-manager/tests/modules/services/fusuma/settings.nix index 303a132725..a1500cb216 100644 --- a/third_party/home-manager/tests/modules/services/fusuma/settings.nix +++ b/third_party/home-manager/tests/modules/services/fusuma/settings.nix @@ -18,7 +18,7 @@ nmt.script = '' assertFileContent \ - home-files/.config/fusuma/config.yaml \ + home-files/.config/fusuma/config.yml \ ${./expected-settings.yaml} ''; } diff --git a/third_party/home-manager/tests/modules/services/gpg-agent/default-homedir.nix b/third_party/home-manager/tests/modules/services/gpg-agent/default-homedir.nix index 9e21eb6dba..e23de764da 100644 --- a/third_party/home-manager/tests/modules/services/gpg-agent/default-homedir.nix +++ b/third_party/home-manager/tests/modules/services/gpg-agent/default-homedir.nix @@ -5,11 +5,14 @@ with lib; { config = { services.gpg-agent.enable = true; - services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package. + services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; programs.gpg.enable = true; - test.stubs.gnupg = { }; - test.stubs.systemd = { }; # depends on gnupg.override + test.stubs = { + gnupg = { }; + systemd = { }; # depends on gnupg.override + pinentry-gnome3 = { }; + }; nmt.script = '' in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}" @@ -18,6 +21,9 @@ with lib; echo $in fail "gpg-agent socket directory not set to default value" fi + + configFile=home-files/.gnupg/gpg-agent.conf + assertFileRegex $configFile "pinentry-program @pinentry-gnome3@/bin/dummy" ''; }; } diff --git a/third_party/home-manager/tests/modules/services/gpg-agent/override-homedir.nix b/third_party/home-manager/tests/modules/services/gpg-agent/override-homedir.nix index 1a314e4143..c507867396 100644 --- a/third_party/home-manager/tests/modules/services/gpg-agent/override-homedir.nix +++ b/third_party/home-manager/tests/modules/services/gpg-agent/override-homedir.nix @@ -5,7 +5,7 @@ with lib; { config = { services.gpg-agent.enable = true; - services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package. + services.gpg-agent.pinentryPackage = null; # Don't build pinentry package. programs.gpg = { enable = true; homedir = "/path/to/hash"; diff --git a/third_party/home-manager/tests/modules/services/hypridle/basic-configuration.nix b/third_party/home-manager/tests/modules/services/hypridle/basic-configuration.nix new file mode 100644 index 0000000000..461f70a517 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hypridle/basic-configuration.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: + +{ + services.hypridle = { + enable = true; + package = pkgs.hypridle; + + settings = { + 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"; + } + ]; + }; + }; + + test.stubs.hypridle = { }; + + nmt.script = '' + config=home-files/.config/hypr/hypridle.conf + clientServiceFile=home-files/.config/systemd/user/hypridle.service + assertFileExists $config + assertFileExists $clientServiceFile + assertFileContent $config ${./hypridle.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/hypridle/default.nix b/third_party/home-manager/tests/modules/services/hypridle/default.nix new file mode 100644 index 0000000000..c959983c04 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hypridle/default.nix @@ -0,0 +1 @@ +{ hypridle-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/hypridle/hypridle.conf b/third_party/home-manager/tests/modules/services/hypridle/hypridle.conf new file mode 100644 index 0000000000..ee29633753 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hypridle/hypridle.conf @@ -0,0 +1,16 @@ +general { + after_sleep_cmd=hyprctl dispatch dpms on + ignore_dbus_inhibit=false + lock_cmd=hyprlock +} + +listener { + on-timeout=hyprlock + timeout=900 +} + +listener { + on-resume=hyprctl dispatch dpms on + on-timeout=hyprctl dispatch dpms off + timeout=1200 +} diff --git a/third_party/home-manager/tests/modules/services/hyprpaper/basic-configuration.nix b/third_party/home-manager/tests/modules/services/hyprpaper/basic-configuration.nix new file mode 100644 index 0000000000..7bf944fbda --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hyprpaper/basic-configuration.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: + +{ + services.hyprpaper = { + enable = true; + settings = { + 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" + ]; + }; + }; + + test.stubs.hyprpaper = { }; + + nmt.script = '' + config=home-files/.config/hypr/hyprpaper.conf + clientServiceFile=home-files/.config/systemd/user/hyprpaper.service + assertFileExists $config + assertFileExists $clientServiceFile + assertFileContent $config ${./hyprpaper.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/hyprpaper/default.nix b/third_party/home-manager/tests/modules/services/hyprpaper/default.nix new file mode 100644 index 0000000000..2a5abbfedf --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hyprpaper/default.nix @@ -0,0 +1 @@ +{ hyprpaper-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/hyprpaper/hyprpaper.conf b/third_party/home-manager/tests/modules/services/hyprpaper/hyprpaper.conf new file mode 100644 index 0000000000..d7b4ccb4fc --- /dev/null +++ b/third_party/home-manager/tests/modules/services/hyprpaper/hyprpaper.conf @@ -0,0 +1,7 @@ +ipc=on +preload=/share/wallpapers/buttons.png +preload=/share/wallpapers/cat_pacman.png +splash=false +splash_offset=2.000000 +wallpaper=DP-3,/share/wallpapers/buttons.png +wallpaper=DP-1,/share/wallpapers/cat_pacman.png diff --git a/third_party/home-manager/tests/modules/services/imapnotify/imapnotify-config.json b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify-config.json new file mode 100644 index 0000000000..21276857dd --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify-config.json @@ -0,0 +1 @@ +{"boxes":["Inbox"],"host":"imap.example.com","onNewMail":"@notmuch@/bin/notmuch new\n","passwordCmd":"'password-command'","port":993,"tls":true,"tlsOptions":{"starttls":false},"username":"home.manager"} \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix index c607c042c2..5a9e2b0034 100644 --- a/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix +++ b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix @@ -35,5 +35,10 @@ with lib; serviceFileNormalized="$(normalizeStorePaths "$serviceFile")" assertFileExists $serviceFile assertFileContent $serviceFileNormalized ${./imapnotify.service} + + configFile="home-files/.config/imapnotify/imapnotify-hm-example.com-config.json" + configFileNormalized="$(normalizeStorePaths "$configFile")" + assertFileExists $configFile + assertFileContent $configFileNormalized ${./imapnotify-config.json} ''; } diff --git a/third_party/home-manager/tests/modules/services/kanshi/basic-configuration.nix b/third_party/home-manager/tests/modules/services/kanshi/basic-configuration.nix index c5706e635a..ffb6db7b18 100644 --- a/third_party/home-manager/tests/modules/services/kanshi/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/kanshi/basic-configuration.nix @@ -47,6 +47,11 @@ ''; }; + test.asserts.warnings.expected = [ + "kanshi.profiles option is deprecated. Use kanshi.settings instead." + "kanshi.extraConfig option is deprecated. Use kanshi.settings instead." + ]; + nmt.script = '' serviceFile=home-files/.config/systemd/user/kanshi.service assertFileExists $serviceFile diff --git a/third_party/home-manager/tests/modules/services/kanshi/default.nix b/third_party/home-manager/tests/modules/services/kanshi/default.nix index cb6b2a6b79..b7704b1127 100644 --- a/third_party/home-manager/tests/modules/services/kanshi/default.nix +++ b/third_party/home-manager/tests/modules/services/kanshi/default.nix @@ -1 +1,4 @@ -{ kanshi-basic-configuration = ./basic-configuration.nix; } +{ + kanshi-basic-configuration = ./basic-configuration.nix; + kanshi-new-configuration = ./new-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/services/kanshi/new-configuration.conf b/third_party/home-manager/tests/modules/services/kanshi/new-configuration.conf new file mode 100644 index 0000000000..c0858a0480 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/kanshi/new-configuration.conf @@ -0,0 +1,19 @@ +include "path/to/included/file" +output "*" enable +profile nomad { + output "eDP-1" enable +} + +profile desktop { + output "eDP-1" disable + output "Iiyama North America PLE2483H-DP" enable position 0,0 + output "Iiyama North America PLE2483H-DP 1158765348486" enable mode 1920x1080 position 1920,0 scale 2.100000 transform flipped-270 + exec echo "1 two 3" + exec echo "4 five 6" +} + +profile { + output "LVDS-1" enable + exec echo "7 eight 9" +} + diff --git a/third_party/home-manager/tests/modules/services/kanshi/new-configuration.nix b/third_party/home-manager/tests/modules/services/kanshi/new-configuration.nix new file mode 100644 index 0000000000..9b3a36478a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/kanshi/new-configuration.nix @@ -0,0 +1,63 @@ +{ config, pkgs, ... }: { + config = { + services.kanshi = { + enable = true; + package = config.lib.test.mkStubPackage { }; + settings = [ + { include = "path/to/included/file"; } + { + output = { + criteria = "*"; + status = "enable"; + }; + } + { + profile.name = "nomad"; + profile.outputs = [{ + criteria = "eDP-1"; + status = "enable"; + }]; + } + { + profile.name = "desktop"; + profile.exec = [ ''echo "1 two 3"'' ''echo "4 five 6"'' ]; + profile.outputs = [ + { + criteria = "eDP-1"; + status = "disable"; + } + { + criteria = "Iiyama North America PLE2483H-DP"; + status = "enable"; + position = "0,0"; + } + { + criteria = "Iiyama North America PLE2483H-DP 1158765348486"; + status = "enable"; + position = "1920,0"; + scale = 2.1; + mode = "1920x1080"; + transform = "flipped-270"; + } + ]; + } + { + profile.outputs = [{ + criteria = "LVDS-1"; + status = "enable"; + }]; + profile.exec = ''echo "7 eight 9"''; + } + ]; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/kanshi.service + assertFileExists $serviceFile + + assertFileExists home-files/.config/kanshi/config + assertFileContent home-files/.config/kanshi/config \ + ${./new-configuration.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/services/mopidy/basic-configuration.nix b/third_party/home-manager/tests/modules/services/mopidy/basic-configuration.nix index 418bfde1f6..2bffbd6819 100644 --- a/third_party/home-manager/tests/modules/services/mopidy/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/mopidy/basic-configuration.nix @@ -3,6 +3,7 @@ { services.mopidy = { enable = true; + extensionPackages = [ ]; settings = { file = { enabled = true; @@ -29,7 +30,7 @@ nmt.script = '' assertFileExists home-files/.config/systemd/user/mopidy.service - assertFileExists home-files/.config/systemd/user/mopidy-scan.service + assertPathNotExists home-files/.config/systemd/user/mopidy-scan.service assertFileExists home-files/.config/mopidy/mopidy.conf assertFileContent home-files/.config/mopidy/mopidy.conf \ diff --git a/third_party/home-manager/tests/modules/services/mopidy/default.nix b/third_party/home-manager/tests/modules/services/mopidy/default.nix index 2f2c33d235..6d71e1f546 100644 --- a/third_party/home-manager/tests/modules/services/mopidy/default.nix +++ b/third_party/home-manager/tests/modules/services/mopidy/default.nix @@ -1 +1,5 @@ -{ mopidy-basic-configuration = ./basic-configuration.nix; } +{ + mopidy-basic-configuration = ./basic-configuration.nix; + mopidy-scan = ./mopidy-scan.nix; +} + diff --git a/third_party/home-manager/tests/modules/services/mopidy/mopidy-scan.nix b/third_party/home-manager/tests/modules/services/mopidy/mopidy-scan.nix new file mode 100644 index 0000000000..58a035a6ad --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mopidy/mopidy-scan.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + services.mopidy = { + enable = true; + extensionPackages = [ pkgs.mopidy-local ]; + }; + + nmt.script = '' + assertFileExists home-files/.config/systemd/user/mopidy.service + assertFileExists home-files/.config/systemd/user/mopidy-scan.service + ''; +} diff --git a/third_party/home-manager/tests/modules/services/nix-gc-darwin/basic.nix b/third_party/home-manager/tests/modules/services/nix-gc-darwin/basic.nix new file mode 100644 index 0000000000..f09309fe04 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc-darwin/basic.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + nix.gc = { + automatic = true; + frequency = "monthly"; + options = "--delete-older-than 30d"; + }; + + test.stubs.nix = { name = "nix"; }; + + nmt.script = '' + serviceFile=LaunchAgents/org.nix-community.home.nix-gc.plist + + assertFileExists "$serviceFile" + + assertFileContent "$serviceFile" ${./expected-agent.plist} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/nix-gc-darwin/default.nix b/third_party/home-manager/tests/modules/services/nix-gc-darwin/default.nix new file mode 100644 index 0000000000..f2fc20aa72 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc-darwin/default.nix @@ -0,0 +1 @@ +{ nix-gc = ./basic.nix; } diff --git a/third_party/home-manager/tests/modules/services/nix-gc-darwin/expected-agent.plist b/third_party/home-manager/tests/modules/services/nix-gc-darwin/expected-agent.plist new file mode 100644 index 0000000000..13b16c16a0 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc-darwin/expected-agent.plist @@ -0,0 +1,24 @@ + + + + + Label + org.nix-community.home.nix-gc + ProgramArguments + + @nix@/bin/nix-collect-garbage + --delete-older-than 30d + + StartCalendarInterval + + + Day + 1 + Hour + 0 + Minute + 0 + + + + \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/nix-gc/basic.nix b/third_party/home-manager/tests/modules/services/nix-gc/basic.nix new file mode 100644 index 0000000000..d6511a171a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc/basic.nix @@ -0,0 +1,29 @@ +{ ... }: + +{ + nix.gc = { + automatic = true; + frequency = "monthly"; + options = "--delete-older-than 30d"; + }; + + test.stubs.nix = { name = "nix"; }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/nix-gc.service + + assertFileExists $serviceFile + + serviceFile=$(normalizeStorePaths $serviceFile) + + assertFileContent $serviceFile ${./expected.service} + + timerFile=home-files/.config/systemd/user/nix-gc.timer + + assertFileExists $timerFile + + timerFile=$(normalizeStorePaths $timerFile) + + assertFileContent $timerFile ${./expected.timer} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/nix-gc/default.nix b/third_party/home-manager/tests/modules/services/nix-gc/default.nix new file mode 100644 index 0000000000..f2fc20aa72 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc/default.nix @@ -0,0 +1 @@ +{ nix-gc = ./basic.nix; } diff --git a/third_party/home-manager/tests/modules/services/nix-gc/expected.service b/third_party/home-manager/tests/modules/services/nix-gc/expected.service new file mode 100644 index 0000000000..4aafd6af82 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc/expected.service @@ -0,0 +1,5 @@ +[Service] +ExecStart=@nix@/bin/nix-collect-garbage --delete-older-than 30d + +[Unit] +Description=Nix Garbage Collector diff --git a/third_party/home-manager/tests/modules/services/nix-gc/expected.timer b/third_party/home-manager/tests/modules/services/nix-gc/expected.timer new file mode 100644 index 0000000000..ef30df4359 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/nix-gc/expected.timer @@ -0,0 +1,10 @@ +[Install] +WantedBy=timers.target + +[Timer] +OnCalendar=monthly +Persistent=true +Unit=nix-gc.service + +[Unit] +Description=Nix Garbage Collector diff --git a/third_party/home-manager/tests/modules/services/remmina/basic-config.nix b/third_party/home-manager/tests/modules/services/remmina/basic-config.nix new file mode 100644 index 0000000000..2741353aee --- /dev/null +++ b/third_party/home-manager/tests/modules/services/remmina/basic-config.nix @@ -0,0 +1,26 @@ +{ config, ... }: { + xdg.mimeApps.enable = true; + + services.remmina = { + enable = true; + package = config.lib.test.mkStubPackage { }; + + addRdpMimeTypeAssoc = false; + systemdService = { + enable = true; + startupFlags = [ "--icon" "--enable-extra-hardening" ]; + }; + }; + + nmt.script = '' + serviceFile='./home-files/.config/systemd/user/remmina.service' + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*/bin/dummy' + assertFileRegex $serviceFile "dummy '--icon' '--enable-extra-hardening'" + + mimetypeFile='./home-files/.local/share/mime/packages/application-x-rdp.xml' + + assertPathNotExists $mimetypeFile + ''; +} diff --git a/third_party/home-manager/tests/modules/services/remmina/default-config.nix b/third_party/home-manager/tests/modules/services/remmina/default-config.nix new file mode 100644 index 0000000000..747623aff3 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/remmina/default-config.nix @@ -0,0 +1,20 @@ +{ config, ... }: { + xdg.mimeApps.enable = true; + + services.remmina = { + enable = true; + package = config.lib.test.mkStubPackage { }; + }; + + nmt.script = '' + serviceFile='./home-files/.config/systemd/user/remmina.service' + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*--icon' + + mimetypeFile='./home-files/.local/share/mime/packages/application-x-rdp.xml' + + assertFileExists $mimetypeFile + assertFileRegex $mimetypeFile '' + ''; +} diff --git a/third_party/home-manager/tests/modules/services/remmina/default.nix b/third_party/home-manager/tests/modules/services/remmina/default.nix new file mode 100644 index 0000000000..43fa48940a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/remmina/default.nix @@ -0,0 +1,4 @@ +{ + remmina-default-config = ./default-config.nix; + remmina-basic-config = ./basic-config.nix; +} diff --git a/third_party/home-manager/tests/modules/services/swaync/default.nix b/third_party/home-manager/tests/modules/services/swaync/default.nix new file mode 100644 index 0000000000..d5682daa3e --- /dev/null +++ b/third_party/home-manager/tests/modules/services/swaync/default.nix @@ -0,0 +1 @@ +{ swaync = ./swaync.nix; } diff --git a/third_party/home-manager/tests/modules/services/swaync/swaync.nix b/third_party/home-manager/tests/modules/services/swaync/swaync.nix new file mode 100644 index 0000000000..ceb3bf0650 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/swaync/swaync.nix @@ -0,0 +1,35 @@ +{ config, ... }: + +{ + services.swaync = { + enable = true; + package = config.lib.test.mkStubPackage { + name = "swaync"; + outPath = "@swaync@"; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/systemd/user/swaync.service \ + ${ + builtins.toFile "swaync.service" '' + [Install] + WantedBy=graphical-session.target + + [Service] + BusName=org.freedesktop.Notifications + ExecStart=@swaync@/bin/swaync + Restart=on-failure + Type=dbus + + [Unit] + After=graphical-session-pre.target + ConditionEnvironment=WAYLAND_DISPLAY + Description=Swaync notification daemon + Documentation=https://github.com/ErikReider/SwayNotificationCenter + PartOf=graphical-session.target + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix b/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix index b371d86ad6..88a7c53625 100644 --- a/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix +++ b/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix @@ -7,7 +7,9 @@ name = "swayosd"; outPath = "@swayosd@"; }; - maxVolume = 10; + display = "DISPLAY"; + stylePath = "/etc/xdg/swayosd/style.css"; + topMargin = 0.1; }; nmt.script = '' @@ -19,7 +21,7 @@ WantedBy=graphical-session.target [Service] - ExecStart=@swayosd@/bin/swayosd --max-volume 10 + ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --style '/etc/xdg/swayosd/style.css' --top-margin 0.100000 Restart=always Type=simple diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix index 96cae5e453..ae431939cf 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix @@ -1,4 +1,6 @@ { hyprland-simple-config = ./simple-config.nix; + hyprland-multiple-devices-config = ./multiple-devices-config.nix; + hyprland-sourceFirst-false-config = ./sourceFirst-false-config.nix; hyprland-inconsistent-config = ./inconsistent-config.nix; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf b/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf new file mode 100644 index 0000000000..5d9102973a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf @@ -0,0 +1,60 @@ +exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +plugin=/path/to/plugin1 +plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +$mod=SUPER +bezier=smoothOut, 0.36, 0, 0.66, -0.56 +bezier=smoothIn, 0.25, 1, 0.5, 1 +bezier=overshot, 0.4,0.8,0.2,1.2 +source=sourced.conf +animations { + animation=border, 1, 2, smoothIn + animation=fade, 1, 4, smoothOut + animation=windows, 1, 3, overshot, popin 80% + enabled=true +} + +decoration { + col.shadow=rgba(00000099) + shadow_offset=0 5 +} + +device { + name=some:device + enable=true +} + +device { + name=some:device-secondary + enable=true +} + +input { + touchpad { + scroll_factor=0.300000 + } + accel_profile=flat + follow_mouse=1 + kb_layout=ro +} + +plugin { + plugin1 { + section { + other=dummy setting + } + dummy=plugin setting + } +} +bindm=$mod, mouse:272, movewindow +bindm=$mod, mouse:273, resizewindow +bindm=$mod ALT, mouse:272, resizewindow +# window resize +bind = $mod, S, submap, resize + +submap = resize +binde = , right, resizeactive, 10 0 +binde = , left, resizeactive, -10 0 +binde = , up, resizeactive, 0 -10 +binde = , down, resizeactive, 0 10 +bind = , escape, submap, reset +submap = reset diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.nix new file mode 100644 index 0000000000..86d60c6329 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/multiple-devices-config.nix @@ -0,0 +1,88 @@ +{ config, lib, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + package = lib.makeOverridable + (attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { }; + plugins = + [ "/path/to/plugin1" (config.lib.test.mkStubPackage { name = "foo"; }) ]; + settings = { + source = [ "sourced.conf" ]; + + decoration = { + shadow_offset = "0 5"; + "col.shadow" = "rgba(00000099)"; + }; + + "$mod" = "SUPER"; + + animations = { + enabled = true; + animation = [ + "border, 1, 2, smoothIn" + "fade, 1, 4, smoothOut" + "windows, 1, 3, overshot, popin 80%" + ]; + }; + + bezier = [ + "smoothOut, 0.36, 0, 0.66, -0.56" + "smoothIn, 0.25, 1, 0.5, 1" + "overshot, 0.4,0.8,0.2,1.2" + ]; + + input = { + kb_layout = "ro"; + follow_mouse = 1; + accel_profile = "flat"; + touchpad = { scroll_factor = 0.3; }; + }; + + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + + device = [ + { + name = "some:device"; + enable = true; + } + { + name = "some:device-secondary"; + enable = true; + } + ]; + + plugin = { + plugin1 = { + dummy = "plugin setting"; + section = { other = "dummy setting"; }; + }; + }; + }; + extraConfig = '' + # window resize + bind = $mod, S, submap, resize + + submap = resize + binde = , right, resizeactive, 10 0 + binde = , left, resizeactive, -10 0 + binde = , up, resizeactive, 0 -10 + binde = , down, resizeactive, 0 10 + bind = , escape, submap, reset + submap = reset + ''; + }; + + nmt.script = '' + config=home-files/.config/hypr/hyprland.conf + assertFileExists "$config" + + normalizedConfig=$(normalizeStorePaths "$config") + assertFileContent "$normalizedConfig" ${./multiple-devices-config.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf index d715fad0b0..29dcd7cd8c 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf @@ -1,10 +1,10 @@ exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +plugin=/path/to/plugin1 +plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so $mod=SUPER bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=overshot, 0.4,0.8,0.2,1.2 -plugin=/path/to/plugin1 -plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so source=sourced.conf animations { animation=border, 1, 2, smoothIn @@ -18,6 +18,11 @@ decoration { shadow_offset=0 5 } +device { + name=some:device + enable=true +} + input { touchpad { scroll_factor=0.300000 @@ -26,6 +31,15 @@ input { follow_mouse=1 kb_layout=ro } + +plugin { + plugin1 { + section { + other=dummy setting + } + dummy=plugin setting + } +} bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow bindm=$mod ALT, mouse:272, resizewindow diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix index 31fe043201..e7b11ffe1d 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix @@ -45,6 +45,18 @@ "$mod, mouse:273, resizewindow" "$mod ALT, mouse:272, resizewindow" ]; + + device = { + name = "some:device"; + enable = true; + }; + + plugin = { + plugin1 = { + dummy = "plugin setting"; + section = { other = "dummy setting"; }; + }; + }; }; extraConfig = '' # window resize diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.conf b/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.conf new file mode 100644 index 0000000000..3dc8c39c0a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.conf @@ -0,0 +1,13 @@ +exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target +bezier=smoothOut, 0.36, 0, 0.66, -0.56 +bezier=smoothIn, 0.25, 1, 0.5, 1 +bezier=overshot, 0.4,0.8,0.2,1.2 +input { + touchpad { + scroll_factor=0.300000 + } + accel_profile=flat + follow_mouse=1 + kb_layout=ro +} +source=sourced.conf diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.nix new file mode 100644 index 0000000000..4161cd7515 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/sourceFirst-false-config.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + package = lib.makeOverridable + (attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { }; + settings = { + source = [ "sourced.conf" ]; + + bezier = [ + "smoothOut, 0.36, 0, 0.66, -0.56" + "smoothIn, 0.25, 1, 0.5, 1" + "overshot, 0.4,0.8,0.2,1.2" + ]; + + input = { + kb_layout = "ro"; + follow_mouse = 1; + accel_profile = "flat"; + touchpad = { scroll_factor = 0.3; }; + }; + }; + sourceFirst = false; + }; + + nmt.script = '' + config=home-files/.config/hypr/hyprland.conf + assertFileExists "$config" + + normalizedConfig=$(normalizeStorePaths "$config") + assertFileContent "$normalizedConfig" ${./sourceFirst-false-config.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/river/configuration.nix b/third_party/home-manager/tests/modules/services/window-managers/river/configuration.nix new file mode 100644 index 0000000000..9a01992157 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/river/configuration.nix @@ -0,0 +1,95 @@ +{ ... }: + +{ + wayland.windowManager.river = { + enable = true; + xwayland.enable = true; + extraSessionVariables = { + FOO = "foo"; + BAR = "bar"; + FOURTY_TWO = 42; + }; + # systemdIntegration = true; + settings = { + attach-mode = "bottom"; + background-color = "0x002b36"; + border-color-focused = "0x93a1a1"; + border-color-unfocused = "0x586e75"; + border-color-urgent = "0xff0000"; + border-width = 2; + csd-filter-add.app-id = [ "bar" "foo" ]; + declare-mode = [ "locked" "normal" "passthrough" ]; + default-layout = "rivertile"; + float-filter-add.app-id = "mpd"; + float-filter-add.title = "popup title with spaces"; + focus-follows-cursor = "normal"; + hide-cursor.timeout = 2; + hide-cursor.when-typing = true; + input.pointer-foo-bar = { + accel-profile = "flat"; + events = true; + pointer-accel = -0.3; + tap = false; + }; + keyboard-layout."-variant".colemak."-options"."altwin:swap_alt_wincaps:escapegrp:alt_shift_toggle" = + "us,de"; + map.locked.None.XF86AudioLowerVolume.spawn = "'pamixer -d 5'"; + map.locked.None.XF86AudioRaiseVolume.spawn = "'pamixer -i 5'"; + map.normal."Alt E" = "toggle-fullscreen"; + map.normal."Alt P" = "enter-mode passthrough"; + map.normal."Alt Q" = "close"; + map.normal."Alt Return" = "spawn foot"; + map.normal."Alt T" = "toggle-float"; + map.passthrough."Alt P" = "enter-mode normal"; + map-pointer.normal."Alt BTN_LEFT" = "move-view"; + map-pointer.normal."Super BTN_LEFT" = "move-view"; + map-pointer.normal."Super BTN_MIDDLE" = "toggle-float"; + map-pointer.normal."Super BTN_RIGHT" = "resize-view"; + map-switch = { + locked = { + lid.open = "foo"; + tablet.on = "foo"; + }; + normal = { + lid = { + close = "foo"; + open = "foo"; + }; + tablet = { + off = "foo bar"; + on = "foo"; + }; + }; + }; + rule-add."-app-id" = { + "'bar'" = "csd"; + "'float*'"."-title"."'foo'" = "float"; + }; + set-cursor-warp = "on-output-change"; + set-repeat = "50 300"; + xcursor-theme = "someGreatTheme 12"; + spawn = [ "firefox" "'foot -a terminal'" ]; + }; + + extraConfig = '' + rivertile -view-padding 6 -outer-padding 6 & + some + extra config + ''; + }; + + test.stubs = { + dbus = { }; + river = { }; + xwayland = { }; + }; + + nmt.script = '' + riverInit=home-files/.config/river/init + assertFileExists "$riverInit" + assertFileIsExecutable "$riverInit" + + normalizedConfig=$(normalizeStorePaths "$riverInit") + assertFileContent "$normalizedConfig" "${./init}" + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/river/default.nix b/third_party/home-manager/tests/modules/services/window-managers/river/default.nix new file mode 100644 index 0000000000..5d17f3f110 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/river/default.nix @@ -0,0 +1 @@ +{ river-configuration = ./configuration.nix; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/river/init b/third_party/home-manager/tests/modules/services/window-managers/river/init new file mode 100755 index 0000000000..c266ca9e9c --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/river/init @@ -0,0 +1,67 @@ +#!/nix/store/00000000000000000000000000000000-bash/bin/bash +### This file was generated with Nix. Don't modify this file directly. + +### SHELL VARIABLES ### +export BAR="bar" +export FOO="foo" +export FOURTY_TWO="42" + +### CONFIGURATION ### +riverctl attach-mode bottom +riverctl background-color 0x002b36 +riverctl border-color-focused 0x93a1a1 +riverctl border-color-unfocused 0x586e75 +riverctl border-color-urgent 0xff0000 +riverctl border-width 2 +riverctl csd-filter-add app-id bar +riverctl csd-filter-add app-id foo +riverctl declare-mode locked +riverctl declare-mode normal +riverctl declare-mode passthrough +riverctl default-layout rivertile +riverctl float-filter-add app-id mpd +riverctl float-filter-add title popup title with spaces +riverctl focus-follows-cursor normal +riverctl hide-cursor timeout 2 +riverctl hide-cursor when-typing enabled +riverctl input pointer-foo-bar accel-profile flat +riverctl input pointer-foo-bar events enabled +riverctl input pointer-foo-bar pointer-accel -0.300000 +riverctl input pointer-foo-bar tap disabled +riverctl keyboard-layout -variant colemak -options altwin:swap_alt_wincaps:escapegrp:alt_shift_toggle us,de +riverctl map locked None XF86AudioLowerVolume spawn 'pamixer -d 5' +riverctl map locked None XF86AudioRaiseVolume spawn 'pamixer -i 5' +riverctl map normal Alt E toggle-fullscreen +riverctl map normal Alt P enter-mode passthrough +riverctl map normal Alt Q close +riverctl map normal Alt Return spawn foot +riverctl map normal Alt T toggle-float +riverctl map passthrough Alt P enter-mode normal +riverctl map-pointer normal Alt BTN_LEFT move-view +riverctl map-pointer normal Super BTN_LEFT move-view +riverctl map-pointer normal Super BTN_MIDDLE toggle-float +riverctl map-pointer normal Super BTN_RIGHT resize-view +riverctl map-switch locked lid open foo +riverctl map-switch locked tablet on foo +riverctl map-switch normal lid close foo +riverctl map-switch normal lid open foo +riverctl map-switch normal tablet off foo bar +riverctl map-switch normal tablet on foo +riverctl rule-add -app-id 'bar' csd +riverctl rule-add -app-id 'float*' -title 'foo' float +riverctl set-cursor-warp on-output-change +riverctl set-repeat 50 300 +riverctl spawn firefox +riverctl spawn 'foot -a terminal' +riverctl xcursor-theme someGreatTheme 12 + +### EXTRA CONFIGURATION ### +rivertile -view-padding 6 -outer-padding 6 & +some +extra config + + +### SYSTEMD INTEGRATION ### +@dbus@/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE && systemctl --user stop river-session.target && systemctl --user start river-session.target + + diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/default.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/default.nix index 2c7f5ff763..7627aab043 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/default.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/default.nix @@ -5,12 +5,14 @@ sway-default = ./sway-default.nix; sway-followmouse = ./sway-followmouse.nix; sway-followmouse-legacy = ./sway-followmouse-legacy.nix; + sway-check-config = ./sway-check-config.nix; sway-modules = ./sway-modules.nix; sway-no-xwayland = ./sway-no-xwayland.nix; sway-null-config = ./sway-null-config.nix; sway-null-package = ./sway-null-package.nix; sway-post-2003 = ./sway-post-2003.nix; sway-systemd-autostart = ./sway-systemd-autostart.nix; + sway-systemd-variables = ./sway-systemd-variables.nix; sway-workspace-default = ./sway-workspace-default.nix; sway-workspace-output = ./sway-workspace-output.nix; swaynag-example-settings = ./swaynag-example-settings.nix; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf index 953e664cc4..448c41f47f 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -106,4 +108,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.nix index 399790fbed..9488d00f6e 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bar-focused-colors.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf index 28254b2b7c..d11f6f2bca 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf @@ -18,6 +18,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym --to-code Mod1+0 workspace number 10 bindsym --to-code Mod1+1 workspace number 1 bindsym --to-code Mod1+2 workspace number 2 bindsym --to-code Mod1+3 workspace number 3 @@ -31,6 +32,7 @@ bindsym --to-code Mod1+Down focus down bindsym --to-code Mod1+Left focus left bindsym --to-code Mod1+Return exec @foot@/bin/foot bindsym --to-code Mod1+Right focus right +bindsym --to-code Mod1+Shift+0 move container to workspace number 10 bindsym --to-code Mod1+Shift+1 move container to workspace number 1 bindsym --to-code Mod1+Shift+2 move container to workspace number 2 bindsym --to-code Mod1+Shift+3 move container to workspace number 3 @@ -105,5 +107,5 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" exec_always pkill flashfocus; flasfocus & diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.nix index 0817837acc..cf316988be 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; config.bindkeysToCode = true; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-check-config.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-check-config.nix new file mode 100644 index 0000000000..e566e4fdab --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-check-config.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +lib.mkIf config.test.enableBig { + wayland.windowManager.sway = { + enable = true; + checkConfig = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/sway/config + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf index 3a956c9ecb..71a0b13fb5 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -103,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.nix index 59527247b4..c62effbe80 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf index 19bed2a745..af259face8 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -81,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf index 7389a67ab7..1fd0003fc6 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -81,4 +83,4 @@ mode "resize" { bindsym l resize grow width 10 px } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy.nix index 03f64fc24d..3bce48507a 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse-legacy.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; config = { focus.followMouse = false; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse.nix index b8a2bc1693..de2e91b393 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-followmouse.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; config = { focus.followMouse = "always"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf index 78119a2cda..766d61de7f 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -115,4 +117,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.nix index b8aa58c56c..287dec1765 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-modules.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config = { menu = "${pkgs.dmenu}/bin/dmenu_run"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-no-xwayland.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-no-xwayland.nix index b40912671a..5eded3b886 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-no-xwayland.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-no-xwayland.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; config = null; systemd.enable = false; xwayland = false; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-config.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-config.nix index a859e04e67..46e4df23e1 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-config.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; config = null; systemd.enable = false; }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.conf index be91606202..67073371ff 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -103,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.nix index a449b42c49..042830d180 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-null-package.nix @@ -9,6 +9,7 @@ wayland.windowManager.sway = { enable = true; package = null; + checkConfig = false; config.menu = "${pkgs.dmenu}/bin/dmenu_run"; }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf index be91606202..67073371ff 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -103,4 +105,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix index 13aac533c0..3617a3b1cb 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-post-2003.nix @@ -8,6 +8,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix index 5a1d90e293..5c32c19cdd 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.conf new file mode 100644 index 0000000000..1cbb92c323 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.conf @@ -0,0 +1,108 @@ +font pango:monospace 8.000000 +floating_modifier Mod1 +default_border pixel 2 +default_floating_border pixel 2 +hide_edge_borders none +focus_wrapping no +focus_follows_mouse yes +focus_on_window_activation smart +mouse_warping output +workspace_layout default +workspace_auto_back_and_forth no +client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577 +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c +client.background #ffffff + +bindsym Mod1+0 workspace number 10 +bindsym Mod1+1 workspace number 1 +bindsym Mod1+2 workspace number 2 +bindsym Mod1+3 workspace number 3 +bindsym Mod1+4 workspace number 4 +bindsym Mod1+5 workspace number 5 +bindsym Mod1+6 workspace number 6 +bindsym Mod1+7 workspace number 7 +bindsym Mod1+8 workspace number 8 +bindsym Mod1+9 workspace number 9 +bindsym Mod1+Down focus down +bindsym Mod1+Left focus left +bindsym Mod1+Return exec @foot@/bin/foot +bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 +bindsym Mod1+Shift+1 move container to workspace number 1 +bindsym Mod1+Shift+2 move container to workspace number 2 +bindsym Mod1+Shift+3 move container to workspace number 3 +bindsym Mod1+Shift+4 move container to workspace number 4 +bindsym Mod1+Shift+5 move container to workspace number 5 +bindsym Mod1+Shift+6 move container to workspace number 6 +bindsym Mod1+Shift+7 move container to workspace number 7 +bindsym Mod1+Shift+8 move container to workspace number 8 +bindsym Mod1+Shift+9 move container to workspace number 9 +bindsym Mod1+Shift+Down move down +bindsym Mod1+Shift+Left move left +bindsym Mod1+Shift+Right move right +bindsym Mod1+Shift+Up move up +bindsym Mod1+Shift+c reload +bindsym Mod1+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' +bindsym Mod1+Shift+h move left +bindsym Mod1+Shift+j move down +bindsym Mod1+Shift+k move up +bindsym Mod1+Shift+l move right +bindsym Mod1+Shift+minus move scratchpad +bindsym Mod1+Shift+q kill +bindsym Mod1+Shift+space floating toggle +bindsym Mod1+Up focus up +bindsym Mod1+a focus parent +bindsym Mod1+b splith +bindsym Mod1+d exec @dmenu@/bin/dmenu_run +bindsym Mod1+e layout toggle split +bindsym Mod1+f fullscreen toggle +bindsym Mod1+h focus left +bindsym Mod1+j focus down +bindsym Mod1+k focus up +bindsym Mod1+l focus right +bindsym Mod1+minus scratchpad show +bindsym Mod1+r mode resize +bindsym Mod1+s layout stacking +bindsym Mod1+space focus mode_toggle +bindsym Mod1+v splitv +bindsym Mod1+w layout tabbed + +mode "resize" { + bindsym Down resize grow height 10 px + bindsym Escape mode default + bindsym Left resize shrink width 10 px + bindsym Return mode default + bindsym Right resize grow width 10 px + bindsym Up resize shrink height 10 px + bindsym h resize shrink width 10 px + bindsym j resize grow height 10 px + bindsym k resize shrink height 10 px + bindsym l resize grow width 10 px +} + +bar { + font pango:monospace 8.000000 + mode dock + hidden_state hide + position bottom + status_command @i3status@/bin/i3status + swaybar_command @sway@/bin/swaybar + workspace_buttons yes + strip_workspace_numbers no + tray_output * + colors { + background #000000 + statusline #ffffff + separator #666666 + focused_workspace #4c7899 #285577 #ffffff + active_workspace #333333 #5f676a #ffffff + inactive_workspace #333333 #222222 #888888 + urgent_workspace #2f343a #900000 #ffffff + binding_mode #2f343a #900000 #ffffff + } +} + +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.nix new file mode 100644 index 0000000000..f0b42ecc1f --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-variables.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./sway-stubs.nix ]; + + wayland.windowManager.sway = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; + # overriding findutils causes issues + config.menu = "${pkgs.dmenu}/bin/dmenu_run"; + + systemd.variables = [ "XCURSOR_THEME" "XCURSOR_SIZE" ]; + }; + + nmt.script = '' + assertFileExists home-files/.config/sway/config + assertFileContent $(normalizeStorePaths home-files/.config/sway/config) \ + ${./sway-systemd-variables.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf index 3647ca246d..5233c0bb2a 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff bindsym Mod1+9 workspace number 9 +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -28,6 +29,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -102,4 +104,4 @@ bar { } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default.nix index 6af944eb01..e5637fd943 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-default.nix @@ -6,6 +6,7 @@ wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; config.defaultWorkspace = "workspace number 9"; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf index 1fc0bac4d7..32dfd7344d 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf @@ -16,6 +16,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff +bindsym Mod1+0 workspace number 10 bindsym Mod1+1 workspace number 1 bindsym Mod1+2 workspace number 2 bindsym Mod1+3 workspace number 3 @@ -29,6 +30,7 @@ bindsym Mod1+Down focus down bindsym Mod1+Left focus left bindsym Mod1+Return exec @foot@/bin/foot bindsym Mod1+Right focus right +bindsym Mod1+Shift+0 move container to workspace number 10 bindsym Mod1+Shift+1 move container to workspace number 1 bindsym Mod1+Shift+2 move container to workspace number 2 bindsym Mod1+Shift+3 move container to workspace number 3 @@ -108,4 +110,4 @@ workspace "ABC" output "DP" workspace "3: Test" output "HDMI" workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI" workspace "Multiple" output "DVI" "HDMI" "DP" -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target" +exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target" diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output.nix index 47fb7527e2..dcbff91e1b 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-workspace-output.nix @@ -15,6 +15,7 @@ in { wayland.windowManager.sway = { enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + checkConfig = false; # overriding findutils causes issues config.menu = "${pkgs.dmenu}/bin/dmenu_run"; diff --git a/third_party/home-manager/tests/modules/services/wlsunset/wlsunset-service-expected.service b/third_party/home-manager/tests/modules/services/wlsunset/wlsunset-service-expected.service index f0cf96f3ad..f311d900ec 100644 --- a/third_party/home-manager/tests/modules/services/wlsunset/wlsunset-service-expected.service +++ b/third_party/home-manager/tests/modules/services/wlsunset/wlsunset-service-expected.service @@ -2,7 +2,7 @@ WantedBy=test.target [Service] -ExecStart=@wlsunset@/bin/wlsunset -l 12.3 -L 128.8 -t 3500 -T 6000 -g 0.6 +ExecStart=@wlsunset@/bin/wlsunset '-L' '128.8' '-T' '6000' '-g' '0.6' '-l' '12.3' '-t' '3500' [Unit] Description=Day/night gamma adjustments for Wayland compositors. diff --git a/third_party/home-manager/tests/modules/services/wob/default.nix b/third_party/home-manager/tests/modules/services/wob/default.nix new file mode 100644 index 0000000000..22ed60358c --- /dev/null +++ b/third_party/home-manager/tests/modules/services/wob/default.nix @@ -0,0 +1 @@ +{ wob-service = ./wob-service.nix; } diff --git a/third_party/home-manager/tests/modules/services/wob/wob-service-expected.ini b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.ini new file mode 100644 index 0000000000..25b9eba327 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.ini @@ -0,0 +1,2 @@ +[] +background_color=ddddddff diff --git a/third_party/home-manager/tests/modules/services/wob/wob-service-expected.service b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.service new file mode 100644 index 0000000000..a91d5aeaeb --- /dev/null +++ b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.service @@ -0,0 +1,13 @@ +[Install] +WantedBy=graphical-session.target + +[Service] +ExecStart=@wob@/bin/wob --config /nix/store/00000000000000000000000000000000-wob.ini +StandardInput=socket + +[Unit] +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY +Description=A lightweight overlay volume/backlight/progress/anything bar for Wayland +Documentation=man:wob(1) +PartOf=graphical-session.target diff --git a/third_party/home-manager/tests/modules/services/wob/wob-service-expected.socket b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.socket new file mode 100644 index 0000000000..4f00493099 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/wob/wob-service-expected.socket @@ -0,0 +1,8 @@ +[Install] +WantedBy=sockets.target + +[Socket] +FlushPending=yes +ListenFIFO=%t/wob.sock +RemoveOnStop=yes +SocketMode=0600 diff --git a/third_party/home-manager/tests/modules/services/wob/wob-service.nix b/third_party/home-manager/tests/modules/services/wob/wob-service.nix new file mode 100644 index 0000000000..ecef9eee7f --- /dev/null +++ b/third_party/home-manager/tests/modules/services/wob/wob-service.nix @@ -0,0 +1,29 @@ +{ config, ... }: + +{ + services.wob = { + enable = true; + package = config.lib.test.mkStubPackage { + name = "wob"; + outPath = "@wob@"; + }; + systemd = true; + + settings."".background_color = "ddddddff"; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/wob.service + socketFile=home-files/.config/systemd/user/wob.socket + configFile=home-files/.config/wob/wob.ini + + assertFileExists $serviceFile + assertFileExists $socketFile + assertFileExists $configFile + assertFileContent $(normalizeStorePaths $serviceFile) ${ + ./wob-service-expected.service + } + assertFileContent $socketFile ${./wob-service-expected.socket} + assertFileContent $configFile ${./wob-service-expected.ini} + ''; +} diff --git a/third_party/home-manager/tests/stubs.nix b/third_party/home-manager/tests/stubs.nix index e9ecbed703..b9c933ac85 100644 --- a/third_party/home-manager/tests/stubs.nix +++ b/third_party/home-manager/tests/stubs.nix @@ -70,12 +70,11 @@ in { config = { lib.test.mkStubPackage = mkStubPackage; - nixpkgs.overlays = mkIf (config.test.stubs != { }) [ - (self: super: + nixpkgs.overlays = [ (self: super: { inherit mkStubPackage; }) ] + ++ optional (config.test.stubs != { }) (self: super: mapAttrs (n: v: mkStubPackage (v // optionalAttrs (v.version == null) { version = super.${n}.version or null; - })) config.test.stubs) - ]; + })) config.test.stubs); }; } diff --git a/third_party/home-manager/xgettext b/third_party/home-manager/xgettext index 8580a324f9..6a5f8b00be 100755 --- a/third_party/home-manager/xgettext +++ b/third_party/home-manager/xgettext @@ -18,10 +18,12 @@ function run() { -k_iError:1 --flag=_i:1:c-format \ -k_iWarn:1 --flag=_i:1:c-format \ -k_iNote:1 --flag=_i:1:c-format \ + -k_iVerbose:1 --flag=_i:1:c-format \ -k_ip:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \ -k_ipError:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \ -k_ipWarn:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \ -k_ipNote:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \ + -k_ipVerbose:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \ --add-comments=translators: \ -o "$output" -d "$domain" "$@" }