From 75fa0ae5af19195c6c0dead5ebce28e0157f2990 Mon Sep 17 00:00:00 2001 From: Default email Date: Tue, 8 Aug 2023 12:19:01 +0200 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906 --- third_party/home-manager/.builds/manual.yml | 34 ++ third_party/home-manager/.github/CODEOWNERS | 566 ----------------- .../.github/PULL_REQUEST_TEMPLATE.md | 9 +- .../home-manager/.github/dependabot.yml | 2 +- third_party/home-manager/.github/labeler.yml | 17 + .../.github/workflows/github_pages.yml | 2 +- .../home-manager/.github/workflows/test.yml | 8 +- .../.github/workflows/update-flake.yml | 4 +- third_party/home-manager/.release | 2 +- third_party/home-manager/LICENSE | 2 +- third_party/home-manager/README.md | 33 +- third_party/home-manager/default.nix | 6 +- third_party/home-manager/docs/3rd-party.adoc | 22 + .../home-manager/docs/contributing.adoc | 23 +- third_party/home-manager/docs/default.nix | 106 +++- third_party/home-manager/docs/faq.adoc | 5 +- .../home-manager/docs/installation.adoc | 41 +- .../home-manager/docs/man-configuration.xml | 8 +- .../home-manager/docs/man-home-manager.xml | 59 +- third_party/home-manager/docs/manual.xml | 7 +- third_party/home-manager/docs/nix-flakes.adoc | 145 ++--- .../docs/release-notes/release-notes.adoc | 2 + .../docs/release-notes/rl-2211.adoc | 2 +- .../docs/release-notes/rl-2305.adoc | 48 +- .../docs/release-notes/rl-2311.adoc | 41 ++ third_party/home-manager/docs/usage.adoc | 17 +- .../home-manager/docs/writing-modules.adoc | 206 +++++-- third_party/home-manager/flake.lock | 28 +- third_party/home-manager/flake.nix | 59 +- third_party/home-manager/format | 67 +- .../home-manager/home-manager/build-news.nix | 54 ++ .../home-manager/home-manager/completion.bash | 77 ++- .../home-manager/home-manager/completion.fish | 1 + .../home-manager/home-manager/completion.zsh | 7 + .../home-manager/home-manager/default.nix | 7 +- .../home-manager/home-manager/home-manager | 571 ++++++++++++++---- .../home-manager/home-manager.nix | 58 +- .../home-manager/home-manager/install.nix | 71 +-- .../home-manager/home-manager/po/ca.po | 293 +++++---- .../home-manager/home-manager/po/da.po | 280 +++++---- .../home-manager/home-manager/po/de.po | 292 +++++---- .../home-manager/home-manager/po/es.po | 312 ++++++---- .../home-manager/home-manager/po/fa.po | 264 ++++---- .../home-manager/home-manager/po/fi.po | 249 ++++---- .../home-manager/home-manager/po/fr.po | 294 +++++---- .../home-manager/po/home-manager.pot | 249 ++++---- .../home-manager/home-manager/po/id.po | 215 +++++++ .../home-manager/home-manager/po/it.po | 279 +++++---- .../home-manager/home-manager/po/ja.po | 260 +++++--- .../home-manager/home-manager/po/ko.po | 303 ++++++---- .../home-manager/home-manager/po/lt.po | 212 ++++--- .../home-manager/home-manager/po/nb_NO.po | 302 +++++---- .../home-manager/home-manager/po/nl.po | 283 +++++---- .../home-manager/home-manager/po/pl.po | 298 +++++---- .../home-manager/home-manager/po/pt.po | 241 ++++++++ .../home-manager/home-manager/po/pt_BR.po | 282 +++++---- .../home-manager/home-manager/po/ro.po | 210 +++++++ .../home-manager/home-manager/po/ru.po | 285 +++++---- .../home-manager/home-manager/po/sv.po | 305 ++++++---- .../home-manager/home-manager/po/tr.po | 273 +++++---- .../home-manager/home-manager/po/uk.po | 257 ++++++++ .../home-manager/home-manager/po/zh_Hans.po | 298 +++++---- .../home-manager/home-manager/po/zh_Hant.po | 267 ++++---- .../modules/accounts/calendar.nix | 163 +++++ .../modules/accounts/contacts.nix | 134 ++++ .../home-manager/modules/accounts/email.nix | 26 +- .../modules/config/home-cursor.nix | 24 +- .../home-manager/modules/config/i18n.nix | 32 +- third_party/home-manager/modules/files.nix | 9 +- .../home-manager/modules/home-environment.nix | 185 +++--- .../modules/i18n/input-method/default.nix | 76 +-- .../modules/i18n/input-method/fcitx.nix | 50 -- .../modules/i18n/input-method/kime.nix | 2 +- .../home-manager/modules/launchd/default.nix | 14 +- .../home-manager/modules/launchd/launchd.nix | 164 +++-- .../modules/lib-bash/activation-init.sh | 101 +++- third_party/home-manager/modules/lib/dag.nix | 28 +- .../home-manager/modules/lib/default.nix | 1 + .../home-manager/modules/lib/file-type.nix | 37 +- .../home-manager/modules/lib/generators.nix | 102 ++++ .../home-manager/modules/lib/maintainers.nix | 64 ++ .../home-manager/modules/lib/types-dag.nix | 53 -- .../home-manager/modules/lib/types.nix | 4 +- third_party/home-manager/modules/manual.nix | 13 +- .../home-manager/modules/misc/dconf.nix | 23 +- .../home-manager/modules/misc/debug.nix | 6 +- .../modules/misc/editorconfig.nix | 6 +- .../home-manager/modules/misc/fontconfig.nix | 8 +- third_party/home-manager/modules/misc/gtk.nix | 26 +- .../home-manager/modules/misc/news.nix | 365 +++++++++-- third_party/home-manager/modules/misc/nix.nix | 62 +- .../home-manager/modules/misc/nixpkgs.nix | 41 +- third_party/home-manager/modules/misc/pam.nix | 11 +- third_party/home-manager/modules/misc/qt.nix | 185 ++++-- .../modules/misc/specialisation.nix | 83 +++ .../modules/misc/specialization.nix | 71 --- .../modules/misc/submodule-support.nix | 4 +- .../home-manager/modules/misc/tmpfiles.nix | 5 +- .../home-manager/modules/misc/version.nix | 22 +- .../modules/misc/xdg-desktop-entries.nix | 20 +- .../modules/misc/xdg-mime-apps.nix | 7 +- .../home-manager/modules/misc/xdg-mime.nix | 4 +- .../modules/misc/xdg-system-dirs.nix | 4 +- .../modules/misc/xdg-user-dirs.nix | 5 +- third_party/home-manager/modules/misc/xdg.nix | 5 +- .../home-manager/modules/misc/xfconf.nix | 61 +- third_party/home-manager/modules/modules.nix | 40 +- third_party/home-manager/modules/po/ca.po | 51 +- third_party/home-manager/modules/po/da.po | 46 +- third_party/home-manager/modules/po/de.po | 56 +- third_party/home-manager/modules/po/es.po | 71 ++- third_party/home-manager/modules/po/fa.po | 46 +- third_party/home-manager/modules/po/fi.po | 46 +- third_party/home-manager/modules/po/fr.po | 52 +- .../home-manager/modules/po/hm-modules.pot | 46 +- third_party/home-manager/modules/po/id.po | 129 ++++ third_party/home-manager/modules/po/it.po | 49 +- third_party/home-manager/modules/po/ja.po | 68 ++- third_party/home-manager/modules/po/ko.po | 55 +- third_party/home-manager/modules/po/lt.po | 46 +- third_party/home-manager/modules/po/nb_NO.po | 78 ++- third_party/home-manager/modules/po/nl.po | 57 +- third_party/home-manager/modules/po/pl.po | 63 +- third_party/home-manager/modules/po/pt.po | 140 +++++ third_party/home-manager/modules/po/pt_BR.po | 50 +- third_party/home-manager/modules/po/ro.po | 113 ++++ third_party/home-manager/modules/po/ru.po | 52 +- third_party/home-manager/modules/po/sv.po | 53 +- third_party/home-manager/modules/po/tr.po | 49 +- third_party/home-manager/modules/po/uk.po | 145 +++++ .../home-manager/modules/po/zh_Hans.po | 66 +- .../home-manager/modules/po/zh_Hant.po | 46 +- .../home-manager/modules/programs/abook.nix | 4 +- .../modules/programs/aerc-accounts.nix | 152 ++++- .../home-manager/modules/programs/aerc.nix | 168 ++++-- .../home-manager/modules/programs/afew.nix | 2 +- .../modules/programs/alacritty.nix | 4 +- .../modules/programs/alot-accounts.nix | 4 +- .../home-manager/modules/programs/alot.nix | 8 +- .../modules/programs/antidote.nix | 59 ++ .../home-manager/modules/programs/aria2.nix | 9 +- .../modules/programs/astroid-accounts.nix | 2 +- .../home-manager/modules/programs/astroid.nix | 21 +- .../home-manager/modules/programs/atuin.nix | 56 +- .../modules/programs/autorandr.nix | 20 +- .../home-manager/modules/programs/bash.nix | 165 +++-- .../modules/programs/bashmount.nix | 4 +- .../home-manager/modules/programs/bat.nix | 11 +- .../home-manager/modules/programs/beets.nix | 70 ++- .../modules/programs/borgmatic.nix | 37 +- .../home-manager/modules/programs/bottom.nix | 16 +- .../home-manager/modules/programs/boxxy.nix | 110 ++++ .../home-manager/modules/programs/broot.nix | 121 ++-- .../home-manager/modules/programs/btop.nix | 6 +- .../modules/programs/chromium.nix | 54 +- .../command-not-found/command-not-found.nix | 2 +- .../modules/programs/comodoro.nix | 31 + .../home-manager/modules/programs/darcs.nix | 52 ++ .../modules/programs/dircolors.nix | 10 +- .../home-manager/modules/programs/direnv.nix | 29 +- .../home-manager/modules/programs/emacs.nix | 8 +- .../home-manager/modules/programs/eww.nix | 2 +- .../home-manager/modules/programs/exa.nix | 69 ++- .../home-manager/modules/programs/feh.nix | 4 +- .../home-manager/modules/programs/firefox.nix | 311 ++++++---- .../home-manager/modules/programs/fish.nix | 45 +- .../home-manager/modules/programs/foot.nix | 3 +- .../home-manager/modules/programs/fuzzel.nix | 51 ++ .../home-manager/modules/programs/fzf.nix | 12 +- .../modules/programs/gallery-dl.nix | 6 +- .../modules/programs/getmail-accounts.nix | 10 +- .../home-manager/modules/programs/gh-dash.nix | 42 ++ .../home-manager/modules/programs/gh.nix | 34 +- .../modules/programs/git-cliff.nix | 45 ++ .../modules/programs/git-credential-oauth.nix | 24 + .../home-manager/modules/programs/git.nix | 71 ++- .../home-manager/modules/programs/gitui.nix | 4 +- .../modules/programs/gnome-terminal.nix | 118 ++-- .../home-manager/modules/programs/go.nix | 10 +- .../home-manager/modules/programs/gpg.nix | 84 ++- .../home-manager/modules/programs/havoc.nix | 3 +- .../home-manager/modules/programs/helix.nix | 71 ++- .../home-manager/modules/programs/hexchat.nix | 102 ++-- .../modules/programs/himalaya.nix | 342 +++++++---- .../modules/programs/home-manager.nix | 9 +- .../home-manager/modules/programs/hstr.nix | 39 ++ .../home-manager/modules/programs/htop.nix | 4 +- .../modules/programs/i3status-rust.nix | 120 ++-- .../modules/programs/i3status.nix | 23 +- .../home-manager/modules/programs/imv.nix | 46 ++ .../home-manager/modules/programs/irssi.nix | 2 +- .../home-manager/modules/programs/java.nix | 10 +- .../home-manager/modules/programs/joshuto.nix | 88 +++ .../home-manager/modules/programs/jq.nix | 5 +- .../home-manager/modules/programs/jujutsu.nix | 76 +++ .../home-manager/modules/programs/k9s.nix | 8 +- .../home-manager/modules/programs/kakoune.nix | 54 +- .../modules/programs/keychain.nix | 17 +- .../modules/programs/khal-accounts.nix | 17 + .../programs/khal-calendar-accounts.nix | 58 ++ .../home-manager/modules/programs/khal.nix | 177 ++++++ .../home-manager/modules/programs/kitty.nix | 83 ++- .../home-manager/modules/programs/kodi.nix | 24 +- .../home-manager/modules/programs/lazygit.nix | 12 +- .../home-manager/modules/programs/ledger.nix | 40 +- .../home-manager/modules/programs/less.nix | 4 +- .../home-manager/modules/programs/lf.nix | 86 +-- .../modules/programs/librewolf.nix | 2 +- .../home-manager/modules/programs/lieer.nix | 21 +- .../home-manager/modules/programs/lsd.nix | 11 +- .../home-manager/modules/programs/man.nix | 26 +- .../modules/programs/mangohud.nix | 8 +- .../modules/programs/matplotlib.nix | 4 +- .../modules/programs/mbsync-accounts.nix | 28 +- .../home-manager/modules/programs/mbsync.nix | 2 +- .../home-manager/modules/programs/mcfly.nix | 2 +- .../home-manager/modules/programs/micro.nix | 4 +- .../home-manager/modules/programs/mpv.nix | 52 +- .../home-manager/modules/programs/mr.nix | 49 ++ .../modules/programs/msmtp-accounts.nix | 18 +- .../home-manager/modules/programs/msmtp.nix | 12 +- .../home-manager/modules/programs/mu.nix | 8 +- .../home-manager/modules/programs/mujmap.nix | 94 +-- .../home-manager/modules/programs/navi.nix | 8 +- .../home-manager/modules/programs/ncmpcpp.nix | 15 +- .../home-manager/modules/programs/ncspot.nix | 8 +- .../home-manager/modules/programs/ne.nix | 4 +- .../modules/programs/neomutt-accounts.nix | 17 + .../home-manager/modules/programs/neomutt.nix | 20 +- .../home-manager/modules/programs/neovim.nix | 41 +- .../home-manager/modules/programs/nheko.nix | 6 +- .../modules/programs/nix-index.nix | 2 +- .../home-manager/modules/programs/nnn.nix | 2 +- .../home-manager/modules/programs/noti.nix | 11 +- .../programs/notmuch-virtual-mailbox.nix | 33 + .../home-manager/modules/programs/notmuch.nix | 6 +- .../home-manager/modules/programs/nushell.nix | 82 ++- .../modules/programs/offlineimap.nix | 22 +- .../modules/programs/oh-my-posh.nix | 10 +- .../home-manager/modules/programs/opam.nix | 4 +- .../home-manager/modules/programs/papis.nix | 92 +++ .../modules/programs/password-store.nix | 14 +- .../home-manager/modules/programs/pazi.nix | 2 +- .../home-manager/modules/programs/pet.nix | 4 +- .../home-manager/modules/programs/pistol.nix | 2 +- .../modules/programs/piston-cli.nix | 2 +- .../home-manager/modules/programs/pls.nix | 5 +- .../modules/programs/powerline-go.nix | 4 +- .../home-manager/modules/programs/pubs.nix | 2 +- .../home-manager/modules/programs/pyenv.nix | 82 +++ .../modules/programs/qutebrowser.nix | 187 +++--- .../home-manager/modules/programs/rbenv.nix | 93 +++ .../home-manager/modules/programs/rbw.nix | 12 +- .../modules/programs/readline.nix | 11 +- .../home-manager/modules/programs/ripgrep.nix | 42 ++ .../modules/programs/rofi-pass.nix | 2 +- .../home-manager/modules/programs/rofi.nix | 8 +- .../modules/programs/rtorrent.nix | 6 +- .../home-manager/modules/programs/rtx.nix | 79 +++ .../modules/programs/sagemath.nix | 10 +- .../home-manager/modules/programs/sbt.nix | 20 +- .../home-manager/modules/programs/scmpuff.nix | 2 +- .../modules/programs/script-directory.nix | 31 + .../home-manager/modules/programs/senpai.nix | 5 +- .../home-manager/modules/programs/sioyek.nix | 12 +- .../home-manager/modules/programs/skim.nix | 2 +- .../home-manager/modules/programs/sm64ex.nix | 4 +- .../home-manager/modules/programs/sqls.nix | 6 +- .../home-manager/modules/programs/ssh.nix | 95 ++- .../modules/programs/starship.nix | 54 +- .../modules/programs/swaylock.nix | 73 ++- .../modules/programs/taskwarrior.nix | 10 +- .../modules/programs/tealdeer.nix | 8 +- .../modules/programs/terminator.nix | 7 +- .../home-manager/modules/programs/termite.nix | 5 +- .../modules/programs/thunderbird.nix | 100 ++- .../home-manager/modules/programs/tint2.nix | 2 +- .../home-manager/modules/programs/tiny.nix | 6 +- .../home-manager/modules/programs/tmate.nix | 10 +- .../home-manager/modules/programs/tmux.nix | 13 +- .../modules/programs/topgrade.nix | 6 +- .../modules/programs/translate-shell.nix | 52 ++ .../home-manager/modules/programs/urxvt.nix | 2 +- .../modules/programs/vdirsyncer-accounts.nix | 187 ++++++ .../modules/programs/vdirsyncer.nix | 275 +++++++++ .../modules/programs/vim-vint.nix | 36 ++ .../home-manager/modules/programs/vim.nix | 20 +- .../home-manager/modules/programs/vscode.nix | 76 ++- .../modules/programs/vscode/haskell.nix | 7 +- .../home-manager/modules/programs/watson.nix | 10 +- .../home-manager/modules/programs/waybar.nix | 26 +- .../home-manager/modules/programs/wezterm.nix | 25 +- .../home-manager/modules/programs/wlogout.nix | 148 +++++ .../home-manager/modules/programs/wofi.nix | 70 +++ .../home-manager/modules/programs/xmobar.nix | 6 +- .../home-manager/modules/programs/yt-dlp.nix | 28 +- .../home-manager/modules/programs/z-lua.nix | 2 +- .../home-manager/modules/programs/zathura.nix | 20 +- .../home-manager/modules/programs/zellij.nix | 52 +- .../home-manager/modules/programs/zoxide.nix | 37 +- .../home-manager/modules/programs/zplug.nix | 2 +- .../home-manager/modules/programs/zsh.nix | 123 ++-- .../modules/programs/zsh/prezto.nix | 75 ++- .../modules/services/autorandr.nix | 53 ++ .../home-manager/modules/services/avizo.nix | 76 +++ .../home-manager/modules/services/barrier.nix | 8 +- .../modules/services/batsignal.nix | 50 ++ .../modules/services/betterlockscreen.nix | 6 +- .../modules/services/blueman-applet.nix | 15 +- .../modules/services/borgmatic.nix | 8 +- .../modules/services/cachix-agent.nix | 6 +- .../home-manager/modules/services/clipman.nix | 16 +- .../modules/services/clipmenu.nix | 2 +- .../modules/services/comodoro.nix | 70 +++ .../home-manager/modules/services/copyq.nix | 54 ++ .../home-manager/modules/services/dunst.nix | 14 +- .../modules/services/easyeffects.nix | 6 +- .../home-manager/modules/services/emacs.nix | 36 +- .../home-manager/modules/services/espanso.nix | 123 ++-- .../modules/services/flameshot.nix | 4 +- .../modules/services/fluidsynth.nix | 5 +- .../home-manager/modules/services/fnott.nix | 27 +- .../home-manager/modules/services/fusuma.nix | 2 +- .../home-manager/modules/services/getmail.nix | 4 +- .../modules/services/git-sync.nix | 34 +- .../modules/services/gnome-keyring.nix | 8 + .../modules/services/gpg-agent.nix | 38 +- .../home-manager/modules/services/grobi.nix | 10 +- .../modules/services/gromit-mpx.nix | 6 +- .../services/home-manager-auto-upgrade.nix | 9 +- .../modules/services/imapnotify-accounts.nix | 4 +- .../modules/services/imapnotify.nix | 57 +- .../home-manager/modules/services/kanshi.nix | 28 +- .../home-manager/modules/services/kbfs.nix | 2 +- .../modules/services/kdeconnect.nix | 10 + .../modules/services/keepassx.nix | 4 + .../modules/services/listenbrainz-mpd.nix | 51 ++ .../home-manager/modules/services/mako.nix | 25 +- .../home-manager/modules/services/mbsync.nix | 7 +- .../home-manager/modules/services/mopidy.nix | 6 +- .../modules/services/mpd-discord-rpc.nix | 9 +- .../modules/services/mpd-mpris.nix | 110 ++++ .../home-manager/modules/services/mpd.nix | 30 +- .../modules/services/muchsync.nix | 29 +- .../services/network-manager-applet.nix | 8 +- .../modules/services/notify-osd.nix | 2 +- .../modules/services/owncloud-client.nix | 21 +- .../modules/services/pantalaimon.nix | 13 +- .../modules/services/pass-secret-service.nix | 66 +- .../modules/services/password-store-sync.nix | 9 +- .../modules/services/pasystray.nix | 4 + .../home-manager/modules/services/pbgopy.nix | 2 +- .../home-manager/modules/services/picom.nix | 13 +- .../modules/services/plex-mpv-shim.nix | 4 +- .../home-manager/modules/services/polybar.nix | 26 +- .../home-manager/modules/services/pueue.nix | 2 +- .../modules/services/pulseeffects.nix | 4 +- .../modules/services/random-background.nix | 11 +- .../home-manager/modules/services/recoll.nix | 35 +- .../redshift-gammastep/lib/options.nix | 23 +- .../modules/services/screen-locker.nix | 22 +- .../home-manager/modules/services/sctd.nix | 5 +- .../modules/services/spotifyd.nix | 2 +- .../modules/services/ssh-agent.nix | 41 ++ .../modules/services/stalonetray.nix | 5 + .../modules/services/swayidle.nix | 4 + .../home-manager/modules/services/swayosd.nix | 58 ++ .../home-manager/modules/services/sxhkd.nix | 10 +- .../modules/services/syncthing.nix | 43 +- .../modules/services/taffybar.nix | 7 + .../modules/services/tahoe-lafs.nix | 4 + .../modules/services/taskwarrior-sync.nix | 9 +- .../home-manager/modules/services/trayer.nix | 59 +- .../home-manager/modules/services/twmn.nix | 18 +- .../home-manager/modules/services/udiskie.nix | 43 +- .../home-manager/modules/services/unison.nix | 17 +- .../modules/services/vdirsyncer.nix | 86 +++ .../home-manager/modules/services/volnoti.nix | 2 +- .../window-managers/bspwm/options.nix | 13 +- .../services/window-managers/fluxbox.nix | 36 +- .../services/window-managers/herbstluftwm.nix | 21 +- .../services/window-managers/hyprland.nix | 229 +++++++ .../services/window-managers/i3-sway/i3.nix | 27 +- .../window-managers/i3-sway/lib/functions.nix | 112 ++-- .../window-managers/i3-sway/lib/options.nix | 64 +- .../services/window-managers/i3-sway/sway.nix | 94 +-- .../window-managers/i3-sway/swaynag.nix | 11 +- .../services/window-managers/spectrwm.nix | 2 +- .../services/window-managers/xmonad.nix | 19 +- .../modules/services/wlsunset.nix | 12 +- .../home-manager/modules/services/xcape.nix | 14 +- .../modules/services/xembed-sni-proxy.nix | 2 +- .../modules/services/xidlehook.nix | 6 +- .../modules/services/xsettingsd.nix | 4 +- .../modules/services/xsuspender.nix | 2 +- third_party/home-manager/modules/systemd.nix | 237 +++----- .../modules/targets/darwin/keybindings.nix | 12 +- .../targets/darwin/user-defaults/default.nix | 33 +- .../darwin/user-defaults/opts-allhosts.nix | 64 +- .../home-manager/modules/xresources.nix | 10 +- third_party/home-manager/modules/xsession.nix | 17 +- third_party/home-manager/nixos/common.nix | 12 +- third_party/home-manager/nixos/default.nix | 3 + third_party/home-manager/release.json | 4 + third_party/home-manager/tests/big-test.nix | 2 +- third_party/home-manager/tests/default.nix | 45 +- .../tests/lib/generators/default.nix | 1 + .../tests/lib/generators/tokdl-result.txt | 41 ++ .../tests/lib/generators/tokdl.nix | 53 ++ .../tests/lib/types/dag-merge-result.txt | 8 + .../tests/lib/types/dag-merge.nix | 22 +- .../home-manager/tests/lib/types/default.nix | 1 - .../lib/types/list-or-dag-merge-result.txt | 15 - .../tests/lib/types/list-or-dag-merge.nix | 33 - .../tests/modules/config/i18n/default.nix | 22 + .../tests/modules/files/default.nix | 1 + .../tests/modules/files/disabled.nix | 14 + .../tests/modules/files/executable.nix | 22 +- .../tests/modules/files/hidden-source.nix | 24 +- .../modules/files/out-of-store-symlink.nix | 32 +- .../modules/files/source-with-spaces.nix | 26 +- .../tests/modules/files/target-conflict.nix | 38 +- .../modules/files/target-with-shellvar.nix | 18 +- .../home-manager/tests/modules/files/text.nix | 24 +- .../home-environment/session-variables.nix | 2 +- .../tests/modules/launchd/agents.nix | 1 + .../modules/launchd/expected-agent.plist | 2 + .../tests/modules/misc/debug/default.nix | 2 +- .../tests/modules/misc/manual/default.nix | 1 + .../tests/modules/misc/manual/manual.nix | 19 + .../misc/qt/qt-platform-theme-gnome.nix | 5 +- .../modules/misc/specialisation/default.nix | 1 + .../specialisation.nix} | 6 +- .../modules/misc/specialization/default.nix | 1 - .../modules/misc/xdg/desktop-entries.nix | 1 - .../misc/xdg/desktop-min-expected.desktop | 1 - .../tests/modules/misc/xdg/system-dirs.nix | 2 +- .../misc/xsession/basic-xprofile-expected.txt | 2 +- .../misc/xsession/basic-xsession-expected.txt | 2 + .../tests/modules/programs/aerc/assertion.nix | 52 ++ .../tests/modules/programs/aerc/default.nix | 1 + .../programs/aerc/extraAccounts.expected | 21 +- .../tests/modules/programs/aerc/settings.nix | 31 +- .../modules/programs/antidote/antidote.nix | 28 + .../modules/programs/antidote/default.nix | 1 + .../tests/modules/programs/atuin/bash.nix | 2 +- .../tests/modules/programs/atuin/default.nix | 1 + .../tests/modules/programs/atuin/fish.nix | 2 +- .../modules/programs/atuin/set-flags.nix | 39 ++ .../tests/modules/programs/atuin/zsh.nix | 2 +- .../programs/autojump/default-settings.nix | 1 + .../tests/modules/programs/beets/default.nix | 5 + .../programs/beets/mpdstats-expected.service | 10 + .../programs/beets/mpdstats-expected.yaml | 5 + .../beets/mpdstats-external-expected.service | 8 + .../beets/mpdstats-external-expected.yaml | 5 + .../programs/beets/mpdstats-external.nix | 27 + .../tests/modules/programs/beets/mpdstats.nix | 29 + .../programs/beets/mpdupdate-expected.yaml | 5 + .../modules/programs/beets/mpdupdate.nix | 18 + .../borgmatic/basic-configuration.nix | 212 ++++--- .../modules/programs/borgmatic/default.nix | 8 +- .../exclude-hm-symlinks-nothing-else.nix | 40 ++ .../borgmatic/exclude-hm-symlinks.nix | 54 ++ .../borgmatic/include-hm-symlinks.nix | 45 ++ .../programs/bottom/empty-settings.nix | 9 +- .../programs/bottom/example-settings.nix | 9 +- .../tests/modules/programs/boxxy/default.nix | 4 + .../modules/programs/boxxy/empty-settings.nix | 15 + .../modules/programs/boxxy/example-boxxy.yaml | 12 + .../programs/boxxy/example-settings.nix | 26 + .../tests/modules/programs/broot/broot.nix | 15 +- .../modules/programs/comodoro/comodoro.nix | 35 ++ .../modules/programs/comodoro/default.nix | 1 + .../modules/programs/comodoro/expected.toml | 13 + .../programs/darcs/author-expected.txt | 2 + .../tests/modules/programs/darcs/author.nix | 17 + .../programs/darcs/boring-expected.txt | 3 + .../tests/modules/programs/darcs/boring.nix | 14 + .../tests/modules/programs/darcs/default.nix | 4 + .../profile-settings-expected-bookmarks.html | 4 +- ...tings-expected-search-without-default.json | 41 ++ .../firefox/profile-settings-expected-user.js | 1 + .../programs/firefox/profile-settings.nix | 58 +- .../tests/modules/programs/fuzzel/default.nix | 4 + .../programs/fuzzel/empty-settings.nix | 11 + .../fuzzel/example-settings-expected.ini | 6 + .../programs/fuzzel/example-settings.nix | 23 + .../tests/modules/programs/gh-dash/config.nix | 26 + .../modules/programs/gh-dash/default.nix | 1 + .../programs/gh/credential-helper.git.conf | 3 + .../modules/programs/gh/credential-helper.nix | 5 +- .../modules/programs/git-cliff/default.nix | 1 + .../programs/git-cliff/example-settings.nix | 29 + .../gnome-terminal/bad-profile-name.nix | 25 + .../programs/gnome-terminal/default.nix | 5 +- .../programs/gpg/immutable-keyfiles.nix | 4 +- .../modules/programs/gpg/mutable-keyfiles.nix | 1 + .../programs/helix/example-settings.nix | 31 +- .../programs/helix/languages-expected.toml | 4 + .../programs/helix/settings-expected.toml | 12 +- .../programs/himalaya/basic-expected.toml | 30 + .../tests/modules/programs/himalaya/basic.nix | 28 + .../modules/programs/himalaya/default.nix | 7 +- .../programs/himalaya/himalaya-expected.toml | 25 - .../programs/himalaya/imap-smtp-expected.toml | 35 ++ .../modules/programs/himalaya/imap-smtp.nix | 58 ++ .../himalaya/maildir-sendmail-expected.toml | 16 + .../{himalaya.nix => maildir-sendmail.nix} | 27 +- .../himalaya/notmuch-sendmail-expected.toml | 16 + .../programs/himalaya/notmuch-sendmail.nix | 36 ++ .../programs/i3status-rust/default.nix | 2 + .../programs/i3status-rust/with-custom.nix | 88 +-- .../programs/i3status-rust/with-default.nix | 23 +- .../i3status-rust/with-extra-settings.nix | 88 +-- .../i3status-rust/with-multiple-bars.nix | 44 +- .../i3status-rust/with-version-02xx.nix | 49 ++ .../i3status-rust/with-version-0311.nix | 13 + .../programs/imv/basic-configuration.conf | 6 + .../programs/imv/basic-configuration.nix | 20 + .../tests/modules/programs/imv/default.nix | 4 + .../programs/imv/empty-configuration.nix | 14 + .../modules/programs/jujutsu/default.nix | 4 + .../modules/programs/jujutsu/empty-config.nix | 11 + .../programs/jujutsu/example-config.nix | 27 + .../tests/modules/programs/khal/config.nix | 32 + .../tests/modules/programs/khal/default.nix | 1 + .../kitty/example-settings-expected.conf | 3 + .../tests/modules/programs/ledger/default.nix | 1 + .../tests/modules/programs/ledger/ledger.nix | 35 ++ .../tests/modules/programs/lf/all-options.nix | 2 +- .../mbsync/mbsync-master-slave-change.nix | 2 +- .../tests/modules/programs/mbsync/mbsync.nix | 2 +- .../tests/modules/programs/mpv/default.nix | 4 +- .../mpv-example-settings-expected-osc-opts | 3 + .../programs/mpv/mpv-example-settings.nix | 11 + .../programs/mpv/mpv-invalid-settings.nix | 14 +- .../programs/mu/basic-configuration.nix | 2 +- .../programs/neomutt/hm-example.com-expected | 2 +- .../hm-example.com-signature-command-expected | 2 +- .../neomutt/hm-example.com-signature-expected | 2 +- .../neomutt-with-binds-invalid-settings.nix | 2 + .../tests/modules/programs/neovim/default.nix | 1 + .../programs/neovim/extra-lua-init.nix | 23 + .../tests/modules/programs/nnn/nnn.nix | 96 ++- .../programs/nushell/config-expected.nu | 3 + .../modules/programs/nushell/env-expected.nu | 4 +- .../programs/nushell/example-settings.nix | 19 +- .../programs/nushell/login-expected.nu | 5 + .../tests/modules/programs/papis/default.nix | 1 + .../tests/modules/programs/papis/papis.nix | 46 ++ .../tests/modules/programs/pyenv/bash.nix | 17 + .../tests/modules/programs/pyenv/default.nix | 5 + .../tests/modules/programs/pyenv/fish.nix | 17 + .../tests/modules/programs/pyenv/zsh.nix | 17 + .../programs/qutebrowser/keybindings.nix | 68 ++- .../programs/qutebrowser/quickmarks.nix | 50 +- .../modules/programs/qutebrowser/settings.nix | 76 ++- .../programs/readline/using-all-options.nix | 5 +- .../programs/readline/using-all-options.txt | 1 + .../programs/ripgrep/custom-arguments.nix | 24 + .../programs/ripgrep/default-arguments.nix | 12 + .../modules/programs/ripgrep/default.nix | 4 + .../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/fish-integration.nix | 16 + .../modules/programs/rtx/zsh-integration.nix | 16 + .../tests/modules/programs/scmpuff/bash.nix | 26 +- .../tests/modules/programs/scmpuff/fish.nix | 4 +- .../modules/programs/scmpuff/no-bash.nix | 26 +- .../modules/programs/scmpuff/no-fish.nix | 4 +- .../modules/programs/scmpuff/no-shell.nix | 37 +- .../tests/modules/programs/scmpuff/no-zsh.nix | 31 +- .../tests/modules/programs/scmpuff/zsh.nix | 31 +- .../ssh/match-blocks-attrs-expected.conf | 1 + .../programs/ssh/match-blocks-attrs.nix | 4 + .../modules/programs/starship/default.nix | 6 +- .../starship/fish_with_transience.nix | 21 + .../starship/fish_without_transience.nix | 17 + .../modules/programs/swaylock/default.nix | 2 + .../modules/programs/swaylock/enabled.nix | 10 + .../modules/programs/swaylock/legacy.nix | 19 + .../modules/programs/swaylock/settings.nix | 19 +- .../programs/terminator/config-file.nix | 42 +- .../thunderbird/thunderbird-expected-first.js | 16 +- .../thunderbird-expected-second.js | 1 + .../programs/thunderbird/thunderbird.nix | 19 + .../modules/programs/tmux/default-shell.conf | 1 + .../tests/modules/programs/tmux/default.nix | 1 + .../tmux/disable-confirmation-prompt.conf | 1 + .../programs/tmux/emacs-with-plugins.conf | 1 + .../modules/programs/tmux/mouse-enabled.conf | 29 + .../modules/programs/tmux/mouse-enabled.nix | 26 + .../tests/modules/programs/tmux/prefix.conf | 1 + .../programs/tmux/secure-socket-enabled.nix | 2 +- .../tmux/shortcut-without-prefix.conf | 1 + .../modules/programs/tmux/vi-all-true.conf | 1 + .../modules/programs/topgrade/settings.nix | 50 +- .../programs/translate-shell/default.nix | 1 + .../translate-shell/translate-shell.nix | 27 + .../programs/vim-vint/basic-configuration.nix | 27 + .../vim-vint/basic-configuration.yaml | 16 + .../modules/programs/vim-vint/default.nix | 1 + .../tests/modules/programs/vscode/default.nix | 1 + .../modules/programs/vscode/keybindings.nix | 28 +- .../modules/programs/vscode/snippets.nix | 71 +++ .../tests/modules/programs/vscode/tasks.nix | 2 +- .../wezterm/bash-integration-default.nix | 14 + .../wezterm/bash-integration-disabled.nix | 16 + .../wezterm/bash-integration-enabled.nix | 16 + .../modules/programs/wezterm/default.nix | 8 + .../wezterm/zsh-integration-default.nix | 15 + .../wezterm/zsh-integration-disabled.nix | 17 + .../wezterm/zsh-integration-enabled.nix | 17 + .../modules/programs/wlogout/default.nix | 5 + .../wlogout/layout-multiple-expected.json | 6 + .../programs/wlogout/layout-multiple.nix | 62 ++ .../wlogout/layout-single-expected.json | 1 + .../programs/wlogout/layout-single.nix | 27 + .../programs/wlogout/styling-expected.css | 16 + .../modules/programs/wlogout/styling.nix | 39 ++ .../programs/wofi/basic-configuration.conf | 6 + .../programs/wofi/basic-configuration.nix | 35 ++ .../modules/programs/wofi/basic-style.css | 6 + .../tests/modules/programs/wofi/default.nix | 4 + .../programs/wofi/empty-configuration.nix | 15 + .../tests/modules/programs/yt-dlp/default.nix | 5 +- .../yt-dlp/yt-dlp-extraConfig-expected | 2 + .../programs/yt-dlp/yt-dlp-extraConfig.nix | 19 + .../tests/modules/programs/zellij/default.nix | 1 + .../modules/programs/zellij/enable-shells.nix | 41 ++ .../tests/modules/programs/zplug/modules.nix | 88 ++- .../tests/modules/programs/zsh/default.nix | 2 + .../programs/zsh/history-substring-search.nix | 25 + .../programs/zsh/syntax-highlighting.nix | 23 + .../tests/modules/services/avizo/default.nix | 4 + .../modules/services/avizo/with-settings.nix | 54 ++ .../services/avizo/without-settings.nix | 33 + .../services/barrier/basic-configuration.nix | 28 +- .../borgmatic/basic-configuration.service | 1 + .../modules/services/comodoro/comodoro.nix | 16 + .../modules/services/comodoro/default.nix | 1 + .../services/comodoro/expected.service | 12 + .../services/devilspie2/configuration.nix | 60 +- .../tests/modules/services/emacs/default.nix | 2 + .../services/emacs/emacs-default-editor.nix | 2 +- .../services/emacs/emacs-service-27.nix | 63 +- ...vice-28-after-graphical-session-target.nix | 38 ++ .../services/emacs/emacs-service-28.nix | 27 +- ...acs-after-graphical-session-target.service | 15 + .../services/emacs/emacs-socket-27.nix | 37 +- .../services/emacs/emacs-socket-28.nix | 37 +- .../emacs-socket-and-startWithUserSession.nix | 4 +- .../services/espanso/basic-configuration.nix | 61 +- .../services/espanso/basic-configuration.yaml | 18 +- .../services/espanso/basic-matches.yaml | 18 + .../services/flameshot/empty-settings.nix | 12 +- .../services/flameshot/example-settings.nix | 42 +- .../modules/services/fluidsynth/service.nix | 36 +- ...systemd-user-dbus-service-expected.service | 4 + .../services/fnott/systemd-user-service.nix | 4 + .../services/git-sync-darwin/basic.nix | 18 + .../services/git-sync-darwin/default.nix | 1 + .../git-sync-darwin/expected-agent.plist | 22 + .../tests/modules/services/git-sync/basic.nix | 7 +- .../services/gpg-agent/default-homedir.nix | 1 + .../services/gpg-agent/override-homedir.nix | 1 + .../services/imapnotify-darwin/default.nix | 1 + .../services/imapnotify-darwin/launchd.nix | 41 ++ .../services/imapnotify-darwin/launchd.plist | 29 + .../modules/services/imapnotify/default.nix | 1 + .../services/imapnotify/imapnotify.nix | 39 ++ .../services/imapnotify/imapnotify.service | 12 + .../modules/services/lieer/lieer-service.nix | 46 +- .../mpd-mpris/configuration-basic.nix | 12 + .../mpd-mpris/configuration-basic.service | 12 + .../configuration-with-local-mpd.nix | 15 + .../configuration-with-local-mpd.service | 13 + .../mpd-mpris/configuration-with-password.nix | 20 + .../configuration-with-password.service | 12 + .../modules/services/mpd-mpris/default.nix | 5 + .../services/mpd/basic-configuration.nix | 1 + .../services/mpd/basic-configuration.service | 2 +- .../mpd/before-state-version-22_11.nix | 5 +- .../modules/services/mpd/xdg-music-dir.nix | 6 +- .../basic-configuration.nix | 17 + .../default-configuration.nix | 15 + .../services/pass-secret-service/default.nix | 4 + .../services/recoll/basic-configuration.conf | 12 +- .../services/recoll/basic-configuration.nix | 3 +- .../services/recoll/config-format-order.conf | 4 +- .../modules/services/swayosd/default.nix | 1 + .../modules/services/swayosd/swayosd.nix | 35 ++ .../modules/services/sxhkd/configuration.nix | 14 +- .../tests/modules/services/sxhkd/sxhkdrc | 3 + .../services/syncthing/common/default.nix | 1 + .../syncthing/common/expected-agent.plist | 26 + .../syncthing/common/extra-options.nix | 26 + .../services/syncthing/extra-options.nix | 16 - .../syncthing/{ => linux}/default.nix | 1 - .../tray-as-bool-triggers-warning.nix | 0 .../services/syncthing/{ => linux}/tray.nix | 0 .../window-managers/bspwm/configuration.nix | 77 ++- .../herbstluftwm-simple-config-autostart | 9 +- .../window-managers/hyprland/default.nix | 4 + .../hyprland/inconsistent-config.nix | 21 + .../hyprland/simple-config.conf | 40 ++ .../hyprland/simple-config.nix | 68 +++ .../i3/i3-bar-focused-colors-expected.conf | 4 +- .../i3/i3-bar-focused-colors.nix | 2 +- .../i3/i3-followmouse-expected.conf | 4 +- .../window-managers/i3/i3-followmouse.nix | 48 +- .../i3/i3-fonts-deprecated.nix | 2 +- .../window-managers/i3/i3-fonts-expected.conf | 4 +- .../services/window-managers/i3/i3-fonts.nix | 2 +- .../i3/i3-keybindings-expected.conf | 4 +- .../window-managers/i3/i3-null-config.nix | 4 +- .../i3/i3-workspace-default-expected.conf | 4 +- .../i3/i3-workspace-default.nix | 2 +- .../i3/i3-workspace-output-expected.conf | 13 +- .../i3/i3-workspace-output.nix | 7 +- .../services/window-managers/sway/default.nix | 1 + .../sway/sway-bar-focused-colors.conf | 4 +- ...way-bindkeys-to-code-and-extra-config.conf | 4 +- .../window-managers/sway/sway-default.conf | 4 +- .../window-managers/sway/sway-default.nix | 4 + .../window-managers/sway/sway-default.target | 6 + .../sway/sway-followmouse-expected.conf | 2 +- .../sway-followmouse-legacy-expected.conf | 2 +- .../sway/sway-followmouse-legacy.nix | 4 +- .../window-managers/sway/sway-followmouse.nix | 2 +- .../window-managers/sway/sway-modules.conf | 4 +- .../window-managers/sway/sway-modules.nix | 2 +- .../window-managers/sway/sway-no-xwayland.nix | 2 +- .../window-managers/sway/sway-null-config.nix | 2 +- .../sway/sway-null-package.conf | 4 +- .../sway/sway-systemd-autostart.nix | 20 + .../sway/sway-systemd-autostart.target | 8 + .../sway/sway-workspace-default-expected.conf | 4 +- .../sway/sway-workspace-output-expected.conf | 13 +- .../sway/sway-workspace-output.nix | 5 + .../sway/swaynag-empty-settings.nix | 18 +- .../systemd/services-disabled-for-root.nix | 28 +- .../tests/modules/systemd/services.nix | 58 +- .../modules/systemd/session-variables.nix | 42 +- .../tests/modules/systemd/slices.nix | 46 +- .../tests/modules/systemd/timers.nix | 34 +- third_party/home-manager/tests/stubs.nix | 26 +- 750 files changed, 20130 insertions(+), 8605 deletions(-) create mode 100644 third_party/home-manager/.builds/manual.yml delete mode 100644 third_party/home-manager/.github/CODEOWNERS create mode 100644 third_party/home-manager/docs/3rd-party.adoc create mode 100644 third_party/home-manager/docs/release-notes/rl-2311.adoc create mode 100644 third_party/home-manager/home-manager/build-news.nix create mode 100644 third_party/home-manager/home-manager/po/id.po create mode 100644 third_party/home-manager/home-manager/po/pt.po create mode 100644 third_party/home-manager/home-manager/po/ro.po create mode 100644 third_party/home-manager/home-manager/po/uk.po create mode 100644 third_party/home-manager/modules/accounts/calendar.nix create mode 100644 third_party/home-manager/modules/accounts/contacts.nix delete mode 100644 third_party/home-manager/modules/i18n/input-method/fcitx.nix create mode 100644 third_party/home-manager/modules/lib/generators.nix create mode 100644 third_party/home-manager/modules/misc/specialisation.nix delete mode 100644 third_party/home-manager/modules/misc/specialization.nix create mode 100644 third_party/home-manager/modules/po/id.po create mode 100644 third_party/home-manager/modules/po/pt.po create mode 100644 third_party/home-manager/modules/po/ro.po create mode 100644 third_party/home-manager/modules/po/uk.po create mode 100644 third_party/home-manager/modules/programs/antidote.nix create mode 100644 third_party/home-manager/modules/programs/boxxy.nix create mode 100644 third_party/home-manager/modules/programs/comodoro.nix create mode 100644 third_party/home-manager/modules/programs/darcs.nix create mode 100644 third_party/home-manager/modules/programs/fuzzel.nix create mode 100644 third_party/home-manager/modules/programs/gh-dash.nix create mode 100644 third_party/home-manager/modules/programs/git-cliff.nix create mode 100644 third_party/home-manager/modules/programs/git-credential-oauth.nix create mode 100644 third_party/home-manager/modules/programs/hstr.nix create mode 100644 third_party/home-manager/modules/programs/imv.nix create mode 100644 third_party/home-manager/modules/programs/joshuto.nix create mode 100644 third_party/home-manager/modules/programs/jujutsu.nix create mode 100644 third_party/home-manager/modules/programs/khal-accounts.nix create mode 100644 third_party/home-manager/modules/programs/khal-calendar-accounts.nix create mode 100644 third_party/home-manager/modules/programs/khal.nix create mode 100644 third_party/home-manager/modules/programs/mr.nix create mode 100644 third_party/home-manager/modules/programs/notmuch-virtual-mailbox.nix create mode 100644 third_party/home-manager/modules/programs/papis.nix create mode 100644 third_party/home-manager/modules/programs/pyenv.nix create mode 100644 third_party/home-manager/modules/programs/rbenv.nix create mode 100644 third_party/home-manager/modules/programs/ripgrep.nix create mode 100644 third_party/home-manager/modules/programs/rtx.nix create mode 100644 third_party/home-manager/modules/programs/script-directory.nix create mode 100644 third_party/home-manager/modules/programs/translate-shell.nix create mode 100644 third_party/home-manager/modules/programs/vdirsyncer-accounts.nix create mode 100644 third_party/home-manager/modules/programs/vdirsyncer.nix create mode 100644 third_party/home-manager/modules/programs/vim-vint.nix create mode 100644 third_party/home-manager/modules/programs/wlogout.nix create mode 100644 third_party/home-manager/modules/programs/wofi.nix create mode 100644 third_party/home-manager/modules/services/autorandr.nix create mode 100644 third_party/home-manager/modules/services/avizo.nix create mode 100644 third_party/home-manager/modules/services/batsignal.nix create mode 100644 third_party/home-manager/modules/services/comodoro.nix create mode 100644 third_party/home-manager/modules/services/copyq.nix create mode 100644 third_party/home-manager/modules/services/listenbrainz-mpd.nix create mode 100644 third_party/home-manager/modules/services/mpd-mpris.nix create mode 100644 third_party/home-manager/modules/services/ssh-agent.nix create mode 100644 third_party/home-manager/modules/services/swayosd.nix create mode 100644 third_party/home-manager/modules/services/vdirsyncer.nix create mode 100644 third_party/home-manager/modules/services/window-managers/hyprland.nix create mode 100644 third_party/home-manager/release.json create mode 100644 third_party/home-manager/tests/lib/generators/default.nix create mode 100644 third_party/home-manager/tests/lib/generators/tokdl-result.txt create mode 100644 third_party/home-manager/tests/lib/generators/tokdl.nix delete mode 100644 third_party/home-manager/tests/lib/types/list-or-dag-merge-result.txt delete mode 100644 third_party/home-manager/tests/lib/types/list-or-dag-merge.nix create mode 100644 third_party/home-manager/tests/modules/files/disabled.nix create mode 100644 third_party/home-manager/tests/modules/misc/manual/default.nix create mode 100644 third_party/home-manager/tests/modules/misc/manual/manual.nix create mode 100644 third_party/home-manager/tests/modules/misc/specialisation/default.nix rename third_party/home-manager/tests/modules/misc/{specialization/specialization.nix => specialisation/specialisation.nix} (62%) delete mode 100644 third_party/home-manager/tests/modules/misc/specialization/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/aerc/assertion.nix create mode 100644 third_party/home-manager/tests/modules/programs/antidote/antidote.nix create mode 100644 third_party/home-manager/tests/modules/programs/antidote/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/atuin/set-flags.nix create mode 100644 third_party/home-manager/tests/modules/programs/beets/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.service create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.yaml create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.service create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.yaml create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats-external.nix create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdstats.nix create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdupdate-expected.yaml create mode 100644 third_party/home-manager/tests/modules/programs/beets/mpdupdate.nix create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix create mode 100644 third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix create mode 100644 third_party/home-manager/tests/modules/programs/boxxy/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/boxxy/empty-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/boxxy/example-boxxy.yaml create mode 100644 third_party/home-manager/tests/modules/programs/boxxy/example-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/comodoro/comodoro.nix create mode 100644 third_party/home-manager/tests/modules/programs/comodoro/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/comodoro/expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/darcs/author-expected.txt create mode 100644 third_party/home-manager/tests/modules/programs/darcs/author.nix create mode 100644 third_party/home-manager/tests/modules/programs/darcs/boring-expected.txt create mode 100644 third_party/home-manager/tests/modules/programs/darcs/boring.nix create mode 100644 third_party/home-manager/tests/modules/programs/darcs/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search-without-default.json create mode 100644 third_party/home-manager/tests/modules/programs/fuzzel/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/fuzzel/empty-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/fuzzel/example-settings-expected.ini create mode 100644 third_party/home-manager/tests/modules/programs/fuzzel/example-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/gh-dash/config.nix create mode 100644 third_party/home-manager/tests/modules/programs/gh-dash/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/git-cliff/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/git-cliff/example-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/gnome-terminal/bad-profile-name.nix create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/basic.nix delete mode 100644 third_party/home-manager/tests/modules/programs/himalaya/himalaya-expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml rename third_party/home-manager/tests/modules/programs/himalaya/{himalaya.nix => maildir-sendmail.nix} (50%) create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml create mode 100644 third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix create mode 100644 third_party/home-manager/tests/modules/programs/i3status-rust/with-version-02xx.nix create mode 100644 third_party/home-manager/tests/modules/programs/i3status-rust/with-version-0311.nix create mode 100644 third_party/home-manager/tests/modules/programs/imv/basic-configuration.conf create mode 100644 third_party/home-manager/tests/modules/programs/imv/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/imv/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/imv/empty-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/jujutsu/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix create mode 100644 third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix create mode 100644 third_party/home-manager/tests/modules/programs/khal/config.nix create mode 100644 third_party/home-manager/tests/modules/programs/khal/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/ledger/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/ledger/ledger.nix create mode 100644 third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-osc-opts create mode 100644 third_party/home-manager/tests/modules/programs/neovim/extra-lua-init.nix create mode 100644 third_party/home-manager/tests/modules/programs/nushell/login-expected.nu create mode 100644 third_party/home-manager/tests/modules/programs/papis/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/papis/papis.nix create mode 100644 third_party/home-manager/tests/modules/programs/pyenv/bash.nix create mode 100644 third_party/home-manager/tests/modules/programs/pyenv/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/pyenv/fish.nix create mode 100644 third_party/home-manager/tests/modules/programs/pyenv/zsh.nix create mode 100644 third_party/home-manager/tests/modules/programs/ripgrep/custom-arguments.nix create mode 100644 third_party/home-manager/tests/modules/programs/ripgrep/default-arguments.nix create mode 100644 third_party/home-manager/tests/modules/programs/ripgrep/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/default-settings.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix create mode 100644 third_party/home-manager/tests/modules/programs/starship/fish_with_transience.nix create mode 100644 third_party/home-manager/tests/modules/programs/starship/fish_without_transience.nix create mode 100644 third_party/home-manager/tests/modules/programs/swaylock/enabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/swaylock/legacy.nix create mode 100644 third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.conf create mode 100644 third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/translate-shell/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/translate-shell/translate-shell.nix create mode 100644 third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.yaml create mode 100644 third_party/home-manager/tests/modules/programs/vim-vint/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/vscode/snippets.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/bash-integration-default.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/bash-integration-disabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/bash-integration-enabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-default.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-disabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-enabled.nix create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/layout-multiple-expected.json create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/layout-multiple.nix create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/layout-single-expected.json create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/layout-single.nix create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/styling-expected.css create mode 100644 third_party/home-manager/tests/modules/programs/wlogout/styling.nix create mode 100644 third_party/home-manager/tests/modules/programs/wofi/basic-configuration.conf create mode 100644 third_party/home-manager/tests/modules/programs/wofi/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/wofi/basic-style.css create mode 100644 third_party/home-manager/tests/modules/programs/wofi/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/wofi/empty-configuration.nix create mode 100644 third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig-expected create mode 100644 third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig.nix create mode 100644 third_party/home-manager/tests/modules/programs/zellij/default.nix create mode 100644 third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix create mode 100644 third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix create mode 100644 third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix create mode 100644 third_party/home-manager/tests/modules/services/avizo/default.nix create mode 100644 third_party/home-manager/tests/modules/services/avizo/with-settings.nix create mode 100644 third_party/home-manager/tests/modules/services/avizo/without-settings.nix create mode 100644 third_party/home-manager/tests/modules/services/comodoro/comodoro.nix create mode 100644 third_party/home-manager/tests/modules/services/comodoro/default.nix create mode 100644 third_party/home-manager/tests/modules/services/comodoro/expected.service create mode 100644 third_party/home-manager/tests/modules/services/emacs/emacs-service-28-after-graphical-session-target.nix create mode 100644 third_party/home-manager/tests/modules/services/emacs/emacs-service-emacs-after-graphical-session-target.service create mode 100644 third_party/home-manager/tests/modules/services/espanso/basic-matches.yaml create mode 100644 third_party/home-manager/tests/modules/services/fnott/systemd-user-dbus-service-expected.service create mode 100644 third_party/home-manager/tests/modules/services/git-sync-darwin/basic.nix create mode 100644 third_party/home-manager/tests/modules/services/git-sync-darwin/default.nix create mode 100644 third_party/home-manager/tests/modules/services/git-sync-darwin/expected-agent.plist create mode 100644 third_party/home-manager/tests/modules/services/imapnotify-darwin/default.nix create mode 100644 third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.nix create mode 100644 third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.plist create mode 100644 third_party/home-manager/tests/modules/services/imapnotify/default.nix create mode 100644 third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix create mode 100644 third_party/home-manager/tests/modules/services/imapnotify/imapnotify.service create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.nix create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.service create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.nix create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.service create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.nix create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.service create mode 100644 third_party/home-manager/tests/modules/services/mpd-mpris/default.nix create mode 100644 third_party/home-manager/tests/modules/services/pass-secret-service/basic-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/pass-secret-service/default-configuration.nix create mode 100644 third_party/home-manager/tests/modules/services/pass-secret-service/default.nix create mode 100644 third_party/home-manager/tests/modules/services/swayosd/default.nix create mode 100644 third_party/home-manager/tests/modules/services/swayosd/swayosd.nix create mode 100644 third_party/home-manager/tests/modules/services/syncthing/common/default.nix create mode 100644 third_party/home-manager/tests/modules/services/syncthing/common/expected-agent.plist create mode 100644 third_party/home-manager/tests/modules/services/syncthing/common/extra-options.nix delete mode 100644 third_party/home-manager/tests/modules/services/syncthing/extra-options.nix rename third_party/home-manager/tests/modules/services/syncthing/{ => linux}/default.nix (70%) rename third_party/home-manager/tests/modules/services/syncthing/{ => linux}/tray-as-bool-triggers-warning.nix (100%) rename third_party/home-manager/tests/modules/services/syncthing/{ => linux}/tray.nix (100%) create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf create mode 100644 third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.target create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix create mode 100644 third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.target diff --git a/third_party/home-manager/.builds/manual.yml b/third_party/home-manager/.builds/manual.yml new file mode 100644 index 0000000000..af257412cf --- /dev/null +++ b/third_party/home-manager/.builds/manual.yml @@ -0,0 +1,34 @@ +image: nixos/unstable +sources: + - https://git.sr.ht/~rycee/home-manager +secrets: + - 01ad357c-3214-4f73-bb7e-2441e440cc51 + - 7d16ccc0-1c4f-4fd6-91c1-c54fc0f5807f + - bd5f26ee-78b8-4a6f-9d68-8d8f53a068f1 +environment: + NIX_CONFIG: "experimental-features = nix-command flakes" +packages: + - nixos.cachix +tasks: + - setup: | + cachix use rycee + - build: | + cd ./home-manager + gitBranch="$(git show -s --pretty=%D HEAD | sed '{ s/.*, //; s!origin/!!; }')" + [[ $gitBranch == master || $gitBranch == release-??.?? ]] || exit 0 + nix build -L .#docs-html + cachix push rycee ./result + - deploy: | + cd ./home-manager + gitBranch="$(git show -s --pretty=%D HEAD | sed '{ s/.*, //; s!origin/!!; }')" + [[ $gitBranch == master || $gitBranch == release-??.?? ]] || exit 0 + + if [[ $gitBranch == master ]]; then + dirName="unstable" + else + dirName="$(cat .release)" + fi + + rsync --delete -r --info=stats \ + "result/share/doc/home-manager/" \ + "hm-web:/srv/www/home-manager.dev/manual/$dirName" diff --git a/third_party/home-manager/.github/CODEOWNERS b/third_party/home-manager/.github/CODEOWNERS deleted file mode 100644 index 9ade1106ac..0000000000 --- a/third_party/home-manager/.github/CODEOWNERS +++ /dev/null @@ -1,566 +0,0 @@ -* @rycee - -/flake.nix @bqv @kisik21 - -Makefile @thiagokokada - -/modules/config/home-cursor.nix @polykernel @league - -/modules/config/i18n.nix @midchildan -/tests/modules/config/i18n @midchildan - -/modules/home-environment.nix @rycee - -/modules/i18n/input-method @Kranzes -/tests/modules/i18n/input-method @Kranzes - -/modules/launchd @midchildan - -/modules/misc/dconf.nix @rycee - -/modules/misc/editorconfig.nix @loicreynier -/test/modules/misc/editorconfig @loicreynier - -/modules/misc/fontconfig.nix @rycee -/tests/modules/misc/fontconfig @rycee - -/modules/misc/gtk.nix @rycee - -/modules/misc/news.nix @rycee - -/modules/misc/nix.nix @polykernel -/tests/modules/misc/nix @polykernel - -/modules/misc/nixpkgs-disabled.nix @thiagokokada - -/modules/misc/numlock.nix @evanjs -/tests/modules/misc/numlock @evanjs - -/modules/misc/pam.nix @rycee -/tests/modules/misc/pam @rycee - -/modules/misc/qt.nix @rycee - -/modules/misc/submodule-support.nix @rycee - -/modules/misc/tmpfiles.nix @dawidsowa - -/modules/misc/vte.nix @rycee - -/modules/misc/xdg-mime-apps.nix @pacien - -/modules/misc/xdg-user-dirs.nix @pacien - -/modules/misc/xdg-system-dirs.nix @tadfisher -/tests/modules/misc/xdg/system-dirs.nix @tadfisher - -/modules/misc/xdg-desktop-entries.nix @cwyc -/tests/modules/misc/xdg/desktop-entries.nix @cwyc -/tests/modules/misc/xdg/desktop-full-expected.desktop @cwyc -/tests/modules/misc/xdg/desktop-min-expected.desktop @cwyc - -/modules/misc/xfconf.nix @chuangzhu - -/modules/programs/aerc.nix @lukasngl -/modules/programs/aerc-accounts.nix @lukasngl -/tests/modules/programs/aerc @lukasngl - -/modules/programs/aria2.nix @JustinLovinger - -/modules/programs/autojump.nix @evanjs -/tests/modules/programs/autojump @evanjs - -/modules/programs/atuin.nix @hawkw -/tests/modules/programs/atuin @hawkw - -/modules/programs/autorandr.nix @uvNikita - -/modules/programs/bash.nix @rycee - -/modules/programs/bashmount.nix @AndersonTorres - -/modules/programs/bat.nix @marsam - -/modules/programs/beets.nix @rycee - -/modules/programs/bottom.nix @polykernel -/tests/modules/programs/bottom @polykernel - -/modules/programs/broot.nix @aheaume @dermetfan - -/modules/programs/btop.nix @GaetanLepage -/tests/modules/programs/btop.nix @GaetanLepage - -/modules/programs/dircolors.nix @JustinLovinger - -/modules/programs/direnv.nix @rycee - -/modules/programs/discocss.nix @Kranzes - -/modules/programs/eclipse.nix @rycee - -/modules/programs/emacs.nix @rycee - -/modules/programs/eww.nix @mainrs - -/modules/programs/exa.nix @kalhauge - -/modules/programs/firefox.nix @rycee - -/modules/programs/foot.nix @plabadens -/tests/modules/programs/foot @plabadens - -/modules/services/fusuma.nix @iosmanthus -/tests/modules/services/fusuma @iosmanthus - -/modules/programs/gallery-dl.nix @marsam -/tests/modules/programs/gallery-dl @marsam - -/modules/programs/gh.nix @Gerschtli @berbiche -/tests/modules/programs/gh @Gerschtli @berbiche - -/modules/programs/git.nix @rycee - -/modules/programs/gitui/gitui.nix @mifom -/modules/programs/gitui/default_key_config.ron @mifom - -/modules/programs/gnome-terminal.nix @kamadorueda @rycee - -/modules/programs/go.nix @rvolosatovs - -/modules/programs/havoc.nix @AndersonTorres - -/modules/programs/helix.nix @Philipp-M -/tests/modules/programs/helix @Philipp-M - -/modules/programs/hexchat.nix @thiagokokada -/tests/modules/programs/hexchat @thiagokokada - -/modules/programs/himalaya.nix @toastal -/tests/modules/programs/himalaya @toastal - -/modules/programs/home-manager.nix @rycee - -/modules/programs/htop.nix @bjpbakker -/tests/modules/htop @bjpbakker - -/modules/programs/hyfetch.nix @lilyinstarlight -/tests/modules/programs/hyfetch @lilyinstarlight - -/modules/programs/i3status.nix @JustinLovinger - -/modules/programs/i3status-rust.nix @workflow - -/modules/programs/ion.nix @jo1gi - -/modules/programs/java.nix @ShamrockLee - -/modules/programs/just.nix @maximsmol - -/modules/programs/k9s.nix @katexochen -/tests/modules/programs/k9s @katexochen - -/modules/programs/keychain.nix @marsam - -/modules/programs/kodi.nix @dwagenk -/tests/modules/programs/kodi @dwagenk - -/modules/programs/lazygit.nix @kalhauge - -/modules/programs/ledger.nix @marsam - -/modules/programs/less.nix @pamplemousse -/tests/modules/programs/less @pamplemousse - -/modules/programs/lesspipe.nix @rycee - -/modules/programs/lf.nix @owm111 -/tests/modules/programs/lf @owm111 - -/modules/programs/librewolf.nix @onny - -/modules/programs/lieer.nix @tadfisher - -/modules/programs/looking-glass-client.nix @j-brn -/tests/modules/programs/looking-glass-client @j-brn - -/modules/programs/lsd.nix @marsam - -/modules/programs/matplotlib.nix @rprospero - -/modules/programs/mangohud.nix @ZerataX -/tests/modules/programs/mangohud @ZerataX - -/modules/programs/mbsync.nix @KarlJoad -/tests/modules/programs/mbsync @KarlJoad - -/modules/programs/mcfly.nix @marsam - -/modules/programs/micro.nix @MForster -/tests/modules/programs/micro @MForster - -/modules/programs/mpv.nix @tadeokondrak @thiagokokada -/tests/modules/programs/mpv @thiagokokada - -/modules/programs/mu.nix @KarlJoad - -/modules/programs/mujmap.nix @elizagamedev -/tests/modules/programs/mujmap @elizagamedev - -/modules/programs/navi.nix @marsam - -/modules/programs/ncmpcpp.nix @olmokramer -/tests/modules/programs/ncmpcpp @olmokramer -/tests/modules/programs/ncmpcpp-linux @olmokramer - -/modules/programs/ncspot.nix @marsam - -/modules/programs/ne.nix @cwyc -/tests/modules/programs/ne @cwyc - -/modules/programs/newsboat.nix @sumnerevans -/tests/modules/programs/newsboat @sumnerevans - -/modules/programs/nheko.nix @gvolpe -/tests/modules/programs/nheko @gvolpe - -/modules/programs/nix-index.nix @ambroisie -/tests/modules/programs/nix-index @ambroisie - -/modules/programs/nnn.nix @thiagokokada -/tests/modules/programs/nnn @thiagokokada - -/modules/programs/noti.nix @marsam - -/modules/programs/nushell.nix @Philipp-M -/tests/modules/programs/nushell @Philipp-M - -/modules/programs/obs-studio.nix @adisbladis - -/modules/programs/octant.nix @06kellyjac - -/modules/programs/oh-my-posh.nix @arjan-s -/tests/modules/programs/oh-my-posh @arjan-s - -/modules/programs/opam.nix @marsam - -/modules/programs/openssh.nix @rycee - -/modules/programs/pandoc.nix @kirelagin -/tests/modules/programs/pandoc @kirelagin - -/modules/programs/password-store.nix @pacien - -/modules/programs/pazi.nix @marsam - -/modules/programs/pidgin.nix @rycee - -/modules/programs/pistol.nix @mtoohey31 -/tests/modules/programs/pistol @mtoohey31 - -/modules/programs/piston-cli.nix @ethancedwards8 - -/modules/programs/pls.nix @arjan-s -/tests/modules/programs/pls @arjan-s - -/modules/programs/polybar.nix @h7x4 -/tests/modules/programs/polybar @h7x4 - -/modules/programs/powerline-go.nix @DamienCassou - -/modules/programs/pubs.nix @loicreynier -/tests/modules/programs/pubs @loicreynier - -/modules/programs/pylint.nix @florpe - -/modules/programs/rbw.nix @ambroisie -/tests/modules/programs/rbw @ambroisie - -/modules/programs/rofi.nix @thiagokokada -/tests/modules/programs/rofi @thiagokokada - -/modules/programs/rofi-pass.nix @seylerius -/tests/modules/programs/rofi-pass @seylerius - -/modules/programs/rtorrent.nix @marsam - -/modules/programs/sagemath.nix @kirelagin -/tests/modules/programs/sagemath @kirelagin - -/modules/programs/sbt.nix @kubukoz -/tests/modules/programs/sbt @kubukoz - -/modules/programs/scmpuff.nix @cpcloud -/tests/modules/programs/scmpuff @cpcloud - -/modules/programs/senpai.nix @malte-v - -/modules/programs/sioyek.nix @podocarp - -/modules/programs/sm64ex.nix @ivarwithoutbones -/tests/modules/programs/sm64ex @ivarwithoutbones - -/modules/programs/sqls.nix @marsam - -/modules/programs/ssh.nix @rycee - -/modules/programs/starship.nix @marsam - -/modules/programs/swaylock.nix @rcerc -/tests/modules/programs/swaylock @rcerc - -/modules/programs/tealdeer.nix @marsam - -/modules/programs/terminator.nix @chisui - -/modules/programs/texlive.nix @rycee - -/modules/programs/thunderbird.nix @d-dervishi -/tests/modules/programs/thunderbird @d-dervishi - -/modules/programs/timidity.nix @amesgen - -/modules/programs/tint2.nix @CarlosLoboxyz - -/modules/programs/tiny.nix @kmaasrud - -/modules/programs/tmate.nix @jlesquembre -/tests/modules/programs/tmate @jlesquembre - -/modules/programs/topgrade.nix @msfjarvis -/tests/modules/programs/topgrade @msfjarvis - -/modules/programs/watson.nix @polykernel -/tests/modules/programs/watson @polykernel - -/modules/programs/waybar.nix @berbiche -/tests/modules/programs/waybar @berbiche - -/modules/programs/wezterm.nix @blmhemu -/tests/modules/programs/wezterm @blmhemu - -/modules/programs/xmobar.nix @t4ccer -/tests/modules/programs/xmobar @t4ccer - -/modules/programs/yt-dlp.nix @marsam -/tests/modules/programs/yt-dlp @marsam - -/modules/programs/z-lua.nix @marsam - -/modules/programs/zathura.nix @rprospero - -/modules/programs/zellij.nix @mainrs - -/modules/programs/zoxide.nix @marsam - -/modules/programs/zsh/prezto.nix @NickHu - -/modules/services/barrier.nix @Kritnich -/tests/modules/services/barrier @Kritnich - -/modules/services/betterlockscreen.nix @SebTM - -/modules/programs/borgmatic.nix @DamienCassou -/modules/services/borgmatic.nix @DamienCassou -/tests/modules/programs/borgmatic @DamienCassou -/tests/modules/services/borgmatic @DamienCassou - -/modules/services/caffeine.nix @uvNikita - -/modules/services/cbatticon.nix @pmiddend - -/modules/services/clipman.nix @jwygoda -/tests/modules/services/clipman @jwygoda - -/modules/services/clipmenu.nix @DamienCassou - -/modules/services/devilspie2.nix @dawidsowa -/tests/modules/services/devilspie2 @dawidsowa - -/modules/services/dropbox.nix @eyJhb -/tests/modules/services/dropbox @eyJhb - -/modules/services/dunst.nix @rycee - -/modules/services/easyeffects.nix @fufexan - -/modules/services/emacs.nix @tadfisher - -/modules/services/etesync-dav.nix @Valodim - -/modules/services/espanso.nix @lucasew - -/modules/services/flameshot.nix @moredhel - -/modules/services/fluidsynth.nix @Valodim - -/modules/services/fnott.nix @polykernel -/tests/modules/services/fnott @polykernel - -/modules/services/git-sync.nix @IvanMalison @cab404 - -/modules/services/gnome-keyring.nix @rycee - -/modules/services/gpg-agent.nix @rycee - -/modules/services/grobi.nix @mbrgm - -/modules/services/gromit-mpx.nix @pjones -/tests/modules/services/gromit-mpx @pjones - -/modules/services/home-manager-auto-upgrade.nix @pinage404 -/tests/modules/services/home-manager-auto-upgrade @pinage404 - -/modules/services/hound.nix @adisbladis - -/modules/services/imapnotify.nix @nickhu - -/modules/services/kanshi.nix @nurelin -/tests/modules/services/kanshi @nurelin - -/modules/services/kdeconnect.nix @adisbladis - -/modules/services/keepassx.nix @rycee - -/modules/services/lieer.nix @tadfisher - -/modules/services/lorri.nix @Gerschtli - -/modules/services/mako.nix @onny - -/modules/services/mbsync.nix @pjones - -/modules/services/megasync.nix @GaetanLepage - -/modules/services/mopidy.nix @foo-dogsquared -/tests/modules/services/mopidy @foo-dogsquared - -/modules/services/mpdris2.nix @pjones - -/modules/services/mpd-discord-rpc.nix @Kranzes - -/modules/services/mpris-proxy.nix @ThibautMarty - -/modules/services/muchsync.nix @pacien - -/modules/services/network-manager-applet.nix @rycee - -/modules/services/notify-osd.nix @imalison - -/modules/services/opensnitch-ui.nix @onny - -/modules/services/pantalaimon.nix @jojosch -/tests/modules/services/pantalaimon @jojosch - -/modules/services/parcellite.nix @gleber - -/modules/services/pass-secret-service.nix @cab404 - -/modules/services/password-store-sync.nix @pacien - -/modules/services/pasystray.nix @pltanton - -/modules/services/picom.nix @thiagokokada -/tests/modules/services/picom @thiagokokada - -/modules/services/pbgopy.nix @ivarwithoutbones -/tests/modules/services/pbgopy @ivarwithoutbones - -/modules/services/plan9port.nix @ehmry - -/modules/services/playerctld.nix @fendse -/tests/modules/playerctld @fendse - -/modules/services/plex-mpv-shim.nix @starcraft66 - -/modules/services/poweralertd.nix @ThibautMarty - -/modules/services/pueue.nix @AndersonTorres - -/modules/services/pulseeffects.nix @jonringer - -/modules/services/random-background.nix @rycee - -/modules/services/recoll.nix @foo-dogsquared -/tests/modules/recoll @foo-dogsquared - -/modules/services/redshift-gammastep @rycee @petabyteboy @thiagokokada -/tests/modules/redshift-gammastep @thiagokokada - -/modules/services/safeeyes @Rosuavio - -/modules/services/screen-locker.nix @jrobsonchase @rszamszur -/tests/modules/services/screen-locker @jrobsonchase @rszamszur - -/modules/services/sctd.nix @somasis - -/modules/services/status-notifier-watcher.nix @pltanton - -/modules/services/swayidle.nix @c0deaddict -/tests/modules/services/swayidle @c0deaddict - -/modules/services/syncthing.nix @rycee - -/modules/services/systembus-notify.nix @asymmetric - -/modules/services/taffybar.nix @rycee - -/modules/services/tahoe-lafs.nix @rycee - -/modules/services/taskwarrior-sync.nix @minijackson @pacien - -/modules/services/trayer.nix @AndreasMager -/tests/modules/services/trayer @AndreasMager - -/modules/services/twmn.nix @Austreelis -/tests/modules/services/twmn @Austreelis - -/modules/services/udiskie.nix @rycee -/tests/modules/services/udiskie @rycee - -/modules/services/unison.nix @pacien - -/modules/services/volnoti.nix @IvanMalison - -/modules/services/window-managers/bspwm @ncfavier -/tests/modules/services/window-managers/bspwm @ncfavier - -/modules/services/window-managers/fluxbox.nix @AndersonTorres - -/modules/services/window-managers/herbstluftwm @olmokramer -/tests/modules/services/window-managers/herbstluftwm @olmokramer - -/modules/services/window-managers/i3-sway/i3.nix @sumnerevans @sebtm -/tests/modules/services/window-managers/i3 @sumnerevans @sebtm - -/modules/services/window-managers/i3-sway/lib @sumnerevans @sebtm - -/modules/services/window-managers/i3-sway/sway.nix @alexarice @sumnerevans @sebtm -/tests/modules/services/window-managers/sway @sumnerevans @sebtm - -/modules/services/window-managers/i3-sway/swaynag.nix @polykernel - -/modules/services/window-managers/spectrwm @loicreynier -/tests/modules/services/window-managers/spectrwm @loicreynier - -/modules/services/wlsunset.nix @matrss -/tests/modules/services/wlsunset @matrss - -/modules/services/xcape.nix @nickhu - -/modules/services/xembed-sni-proxy.nix @rycee - -/modules/services/xidlehook.nix @dschrempf @bertof - -/modules/services/xscreensaver.nix @rycee - -/modules/services/xsuspender.nix @offlinehacker - -/modules/systemd.nix @rycee - -/modules/targets/darwin @midchildan -/tests/modules/targets-darwin @midchildan - -/modules/xresources.nix @rycee - -/modules/xsession.nix @rycee diff --git a/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md b/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md index fd0a266be9..af3efeaf70 100644 --- a/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md +++ b/third_party/home-manager/.github/PULL_REQUEST_TEMPLATE.md @@ -23,7 +23,7 @@ Also make sure to read the guidelines found at - [ ] Code formatted with `./format`. -- [ ] Code tested through `nix-shell --pure tests -A run.all`. +- [ ] Code tested through `nix-shell --pure tests -A run.all` or `nix develop --ignore-environment .#all` using Flakes. - [ ] Test cases updated/added. See [example](https://github.com/nix-community/home-manager/commit/f3fbb50b68df20da47f9b0def5607857fcc0d021#diff-b61a6d542f9036550ba9c401c80f00ef). @@ -41,4 +41,9 @@ Also make sure to read the guidelines found at - [ ] Added myself as module maintainer. See [example](https://github.com/nix-community/home-manager/blob/068ff76a10e95820f886ac46957edcff4e44621d/modules/programs/lesspipe.nix#L6). - - [ ] Added myself and the module files to `.github/CODEOWNERS`. +#### Maintainer CC + + diff --git a/third_party/home-manager/.github/dependabot.yml b/third_party/home-manager/.github/dependabot.yml index b65c12788b..97d69dea1c 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-22.11" + target-branch: "release-23.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 ba7ecffe0f..b03251e89a 100644 --- a/third_party/home-manager/.github/labeler.yml +++ b/third_party/home-manager/.github/labeler.yml @@ -1,5 +1,7 @@ "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/* @@ -13,7 +15,22 @@ - 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/**/* + +"shell": + - modules/lib/zsh.nix + - modules/programs/zsh* + - modules/programs/bash* + - tests/modules/programs/zsh/**/* + +"calendar": + - modules/programs/khal* + - modules/*/vdirsyncer* + - modules/accounts/calendar.nix + +"contacts": + - 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 b60812aebc..e9674468e0 100644 --- a/third_party/home-manager/.github/workflows/github_pages.yml +++ b/third_party/home-manager/.github/workflows/github_pages.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v12 diff --git a/third_party/home-manager/.github/workflows/test.yml b/third_party/home-manager/.github/workflows/test.yml index 73ac7a003c..81364fc132 100644 --- a/third_party/home-manager/.github/workflows/test.yml +++ b/third_party/home-manager/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v12 @@ -24,7 +24,7 @@ jobs: echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr exit 1 fi - - run: nix-build -A docs.jsonModuleMaintainers + - run: nix-build --show-trace -A docs.jsonModuleMaintainers - run: ./format -c - - run: nix-shell . -A install - - run: nix-shell --arg enableBig false --pure tests -A run.all + - run: nix-shell --show-trace . -A install + - 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 b06db161fc..3a6459a221 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@v3 - name: Install Nix - uses: cachix/install-nix-action@v18 + uses: cachix/install-nix-action@v22 - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v15 + uses: DeterminateSystems/update-flake-lock@v19 with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} pr-labels: dependencies diff --git a/third_party/home-manager/.release b/third_party/home-manager/.release index f8c8609697..38549cd856 100644 --- a/third_party/home-manager/.release +++ b/third_party/home-manager/.release @@ -1 +1 @@ -23.05 +23.11 diff --git a/third_party/home-manager/LICENSE b/third_party/home-manager/LICENSE index 97c9352818..5a9b130ab4 100644 --- a/third_party/home-manager/LICENSE +++ b/third_party/home-manager/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2022 Home Manager contributors +Copyright (c) 2017-2023 Home Manager contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/third_party/home-manager/README.md b/third_party/home-manager/README.md index f792af543e..78ba76516b 100644 --- a/third_party/home-manager/README.md +++ b/third_party/home-manager/README.md @@ -21,15 +21,24 @@ please see If you would like to contribute to Home Manager then please have a look at the [contributing][] chapter of the manual. +Releases +-------- + +Home Manager is developed against `nixpkgs-unstable` branch, which +often causes it to contain tweaks for changes/packages not yet +released in stable NixOS. To avoid breaking users' configurations, +Home Manager is released in branches corresponding to NixOS releases +(e.g. `release-23.05`). These branches get fixes, but usually not new +modules. If you need a module to be backported, then feel free to open +an issue. + Words of warning ---------------- Unfortunately, it is quite possible to get difficult to understand -errors when working with Home Manager, such as infinite loops with no -clear source reference. You should therefore be comfortable using the -Nix language and the various tools in the Nix ecosystem. Reading -through the [Nix Pills][] document is a good way to familiarize -yourself with them. +errors when working with Home Manager. You should therefore be +comfortable using the Nix language and the various tools in the Nix +ecosystem. If you are not very familiar with Nix but still want to use Home Manager then you are strongly encouraged to start with a small and @@ -42,7 +51,7 @@ will write to your dconf store and cannot tell whether a configuration that it is about to be overwritten was from a previous Home Manager generation or from manual configuration. -Home Manager targets [NixOS][] unstable and NixOS version 22.11 (the +Home Manager targets [NixOS][] unstable and NixOS version 23.05 (the current stable version), it may or may not work on other Linux distributions and NixOS versions. @@ -100,17 +109,6 @@ contribute to the translation effort then start by going to the Translation status -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-22.11`). These branches get fixes, but usually not new -modules. If you need a module to be backported, then feel free to open -an issue. - License ------- @@ -125,7 +123,6 @@ This project is licensed under the terms of the [MIT license](LICENSE). [configuration options]: https://nix-community.github.io/home-manager/options.html [#home-manager]: https://webchat.oftc.net/?channels=home-manager [OFTC]: https://oftc.net/ -[Nix Pills]: https://nixos.org/guides/nix-pills/ [Nix Flakes]: https://nixos.wiki/wiki/Flakes [nix-darwin]: https://github.com/LnL7/nix-darwin [manual standalone install]: https://nix-community.github.io/home-manager/index.html#sec-install-standalone diff --git a/third_party/home-manager/default.nix b/third_party/home-manager/default.nix index b665b7a66f..541a5a388b 100644 --- a/third_party/home-manager/default.nix +++ b/third_party/home-manager/default.nix @@ -1,7 +1,11 @@ { pkgs ? import { } }: rec { - docs = with import ./docs { inherit pkgs; }; { + docs = let releaseInfo = pkgs.lib.importJSON ./release.json; + in with import ./docs { + inherit pkgs; + inherit (releaseInfo) release isReleaseBranch; + }; { html = manual.html; manPages = manPages; json = options.json; diff --git a/third_party/home-manager/docs/3rd-party.adoc b/third_party/home-manager/docs/3rd-party.adoc new file mode 100644 index 0000000000..8fdc528ce8 --- /dev/null +++ b/third_party/home-manager/docs/3rd-party.adoc @@ -0,0 +1,22 @@ +[[ch-3rd-party]] +== Third-Party Tools and Extensions + +Here is a collection of tools and extensions that relate to Home +Manager. Note, these are maintained outside the regular Home Manager +flow so quality and support may vary wildly. If you encounter problems +then please raise them in the corresponding project, not as issues in +the Home Manager tracker. + +If you have made something interesting related to Home Manager then +you are encouraged to create a PR that expands this chapter. + +[[sec-3rd-party-module-collections]] +=== Module Collections + +- https://github.com/schuelermine/xhmm[xhmm — extra Home Manager modules] ++ +A collection of modules maintained by Anselm Schüler. + +- https://github.com/danth/stylix/[Stylix — System-wide colorscheming and typography] ++ +Configure your applications to get coherent color scheme and font. diff --git a/third_party/home-manager/docs/contributing.adoc b/third_party/home-manager/docs/contributing.adoc index 82a07a9a8b..3a1805f21a 100644 --- a/third_party/home-manager/docs/contributing.adoc +++ b/third_party/home-manager/docs/contributing.adoc @@ -28,6 +28,11 @@ Assuming your clone is at `$HOME/devel/home-manager` then you can make the `home [source,console] $ home-manager -I home-manager=$HOME/devel/home-manager + +or, if using <>: ++ +[source,console] +$ home-manager --override-input home-manager ~/devel/home-manager ++ or 2. changing the default path by ensuring your configuration includes @@ -45,8 +50,8 @@ The first option is good if you only temporarily want to use your clone. [[sec-guidelines]] === Guidelines :irc-home-manager: https://webchat.oftc.net/?channels=home-manager -:valuable-options: https://github.com/Infinisil/rfcs/blob/config-option/rfcs/0042-config-option.md#valuable-options -:rfc-42: https://github.com/Infinisil/rfcs/blob/config-option/rfcs/0042-config-option.md +:valuable-options: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md#valuable-options +:rfc-42: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md :assertions: https://nixos.org/manual/nixos/stable/index.html#sec-assertions If your contribution satisfy the following rules then there is a good chance it will be merged without too much trouble. The rules are enforced by the Home Manager maintainers and to a lesser extent the Home Manager CI system. @@ -89,11 +94,11 @@ All contributed code _must_ pass the test suite. [[sec-guidelines-module-maintainer]] ==== Add relevant documentation +:nixpkgs-markdown: https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup :docbook: https://tdg.docbook.org/ :asciidoc: https://asciidoc.org/ -:docbook-rocks: https://berbiche.github.io/docbook.rocks/ -Many code changes require changing the documentation as well. Module options should be documented with DocBook. See {docbook-rocks}[DocBook rocks!] for a quick introduction and {docbook}[DocBook 5: The Definitive Guide] for in-depth information of DocBook. Home Manager is itself documented using a combination of DocBook and {asciidoc}[AsciiDoc]. All text is hosted in Home Manager's Git repository. +Many code changes require changing the documentation as well. Module options should be documented with {nixpkgs-markdown}[Nixpkgs-flavoured Markdown]. Home Manager is itself documented using a combination of {docbook}[DocBook] and {asciidoc}[AsciiDoc]. All text is hosted in Home Manager's Git repository. The HTML version of the manual containing both the module option descriptions and the documentation of Home Manager can be generated and opened by typing the following in a shell within a clone of the Home Manager Git repository: @@ -111,11 +116,9 @@ $ man ./result/share/man/man5/home-configuration.nix.5.gz Every new module _must_ include a named maintainer using the `meta.maintainers` attribute. If you are a user of a module that currently lacks a maintainer then please consider adopting it. -If you are present in the NixOS 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. +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. -Also add yourself to `.github/CODEOWNERS` as owner of the associated module files, including the test files. You will then be automatically added as a reviewer on any new pull request that touches your files. - -Maintainers are encouraged to join the IRC channel and participate when they have opportunity. +Maintainers are encouraged to join the IRC or Matrix channel and participate when they have opportunity. [[sec-guidelines-code-style]] ==== Format your code @@ -240,7 +243,7 @@ should be added. If you contribute a module then you don't need to add this entr Home Manager includes a basic test suite and it is highly recommended to include at least one test when adding a module. Tests are typically in the form of "golden tests" where, for example, a generated configuration file is compared to a known correct file. -It is relatively easy to create tests by modeling the existing tests, found in the `tests` project directory. +It is relatively easy to create tests by modeling the existing tests, found in the `tests` project directory. For a full reference to the functions available in test scripts, you can look at NMT's https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib[bash-lib]. The full Home Manager test suite can be run by executing @@ -260,4 +263,4 @@ $ nix-shell --pure tests -A run.alacritty-empty-settings However, those invocations will impurely source the system’s nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g. [source,console] -$ nix develop --ignore-environment .#tests.all +$ nix develop --ignore-environment .#all diff --git a/third_party/home-manager/docs/default.nix b/third_party/home-manager/docs/default.nix index 83ac2a320d..98dce1d9c0 100644 --- a/third_party/home-manager/docs/default.nix +++ b/third_party/home-manager/docs/default.nix @@ -1,17 +1,28 @@ { pkgs # Note, this should be "the standard library" + HM extensions. -, lib ? import ../modules/lib/stdlib-extended.nix pkgs.lib }: +, lib ? import ../modules/lib/stdlib-extended.nix pkgs.lib + +, release, isReleaseBranch }: let nmdSrc = fetchTarball { url = - "https://gitlab.com/api/v4/projects/rycee%2Fnmd/repository/archive.tar.gz?sha=06c80103396a1a950586c23da1882c977b24bbda"; - sha256 = "15axmplkl7m7fs4c8m53dawhgwkb64hm2v67m59xdknbjjgfrpqb"; + "https://git.sr.ht/~rycee/nmd/archive/824a380546b5d0d0eb701ff8cd5dbafb360750ff.tar.gz"; + sha256 = "0vvj40k6bw8ssra8wil9rqbsznmfy1kwy7cihvm13rajwdg9ycgg"; }; - nmd = import nmdSrc { inherit lib pkgs; }; + 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; }; + }; + }; # Make sure the used package is scrubbed to avoid actually # instantiating derivations. @@ -26,42 +37,72 @@ let dontCheckDefinitions = { _module.check = false; }; - buildModulesDocs = args: - nmd.buildModulesDocs ({ - moduleRootPaths = [ ./.. ]; - mkModuleUrl = path: - "https://github.com/nix-community/home-manager/blob/master/${path}#blob-path"; - channelName = "home-manager"; - } // args); + gitHubDeclaration = user: repo: subpath: + let urlRef = if isReleaseBranch then "release-${release}" else "master"; + in { + url = "https://github.com/${user}/${repo}/blob/${urlRef}/${subpath}"; + name = "<${repo}/${subpath}>"; + }; - hmModulesDocs = buildModulesDocs { + hmPath = toString ./..; + + buildOptionsDocs = args@{ modules, includeModuleSystemOptions ? true, ... }: + let options = (lib.evalModules { inherit modules; }).options; + in pkgs.buildPackages.nixosOptionsDoc ({ + options = if includeModuleSystemOptions then + options + else + builtins.removeAttrs options [ "_module" ]; + transformOptions = opt: + opt // { + # Clean up declaration sites to not refer to the Home Manager + # source tree. + declarations = map (decl: + if lib.hasPrefix hmPath (toString decl) then + gitHubDeclaration "nix-community" "home-manager" + (lib.removePrefix "/" (lib.removePrefix hmPath (toString decl))) + else if decl == "lib/modules.nix" then + # TODO: handle this in a better way (may require upstream + # changes to nixpkgs) + gitHubDeclaration "NixOS" "nixpkgs" decl + else + decl) opt.declarations; + }; + } // builtins.removeAttrs args [ "modules" "includeModuleSystemOptions" ]); + + hmOptionsDocs = buildOptionsDocs { modules = import ../modules/modules.nix { inherit lib pkgs; check = false; } ++ [ scrubbedPkgsModule ]; - docBook.id = "home-manager-options"; + variablelistId = "home-manager-options"; }; - nixosModuleDocs = buildModulesDocs { + nixosOptionsDocs = buildOptionsDocs { modules = [ ../nixos scrubbedPkgsModule dontCheckDefinitions ]; - docBook = { - id = "nixos-options"; - optionIdPrefix = "nixos-opt"; - }; + includeModuleSystemOptions = false; + variablelistId = "nixos-options"; + optionIdPrefix = "nixos-opt-"; }; - nixDarwinModuleDocs = buildModulesDocs { + nixDarwinOptionsDocs = buildOptionsDocs { modules = [ ../nix-darwin scrubbedPkgsModule dontCheckDefinitions ]; - docBook = { - id = "nix-darwin-options"; - optionIdPrefix = "nix-darwin-opt"; - }; + includeModuleSystemOptions = false; + variablelistId = "nix-darwin-options"; + optionIdPrefix = "nix-darwin-opt-"; }; docs = nmd.buildDocBookDocs { pathName = "home-manager"; projectName = "Home Manager"; - modulesDocs = [ hmModulesDocs nixDarwinModuleDocs nixosModuleDocs ]; + modulesDocs = [{ + docBook = pkgs.linkFarm "hm-module-docs-for-nmd" { + "nmd-result/home-manager-options.xml" = hmOptionsDocs.optionsDocBook; + "nmd-result/nix-darwin-options.xml" = + nixDarwinOptionsDocs.optionsDocBook; + "nmd-result/nixos-options.xml" = nixosOptionsDocs.optionsDocBook; + }; + }]; documentsDirectory = ./.; documentType = "book"; chunkToc = '' @@ -81,9 +122,20 @@ in { inherit nmdSrc; options = { - json = hmModulesDocs.json.override { - path = "share/doc/home-manager/options.json"; - }; + # TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream + # `nixosOptionsDoc` is more customizable. + json = pkgs.runCommand "options.json" { + meta.description = "List of Home Manager options in JSON format"; + } '' + mkdir -p $out/{share/doc,nix-support} + cp -a ${hmOptionsDocs.optionsJSON}/share/doc/nixos $out/share/doc/home-manager + substitute \ + ${hmOptionsDocs.optionsJSON}/nix-support/hydra-build-products \ + $out/nix-support/hydra-build-products \ + --replace \ + '${hmOptionsDocs.optionsJSON}/share/doc/nixos' \ + "$out/share/doc/home-manager" + ''; }; manPages = docs.manPages; diff --git a/third_party/home-manager/docs/faq.adoc b/third_party/home-manager/docs/faq.adoc index 6488688059..e8b86649ef 100644 --- a/third_party/home-manager/docs/faq.adoc +++ b/third_party/home-manager/docs/faq.adoc @@ -72,7 +72,10 @@ For example, if you have two machines, called "kronos" and "rhea" on which you w - `rhea-jane.nix`, and - `common.nix` -in your repository. On the kronos and rhea machines you can then make `~jane/.config/nixpkgs/home.nix` be a symbolic link to the corresponding file in your configuration repository. +in your repository. +On the kronos and rhea machines you can then make +`~jane/.config/home-manager/home.nix` +be a symbolic link to the corresponding file in your configuration repository. The `kronos-jane.nix` and `rhea-jane.nix` files follow the format diff --git a/third_party/home-manager/docs/installation.adoc b/third_party/home-manager/docs/installation.adoc index afdbe35e9a..7b2ecd4317 100644 --- a/third_party/home-manager/docs/installation.adoc +++ b/third_party/home-manager/docs/installation.adoc @@ -2,6 +2,7 @@ == Installing Home Manager :nix-darwin: https://github.com/LnL7/nix-darwin/ +:nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes Home Manager can be used in three primary ways: @@ -22,11 +23,17 @@ This allows the user profiles to be built together with the system when running `darwin-rebuild`. See <> for a description of this setup. +[NOTE] +In this chapter we describe how to install Home Manager in the +standard way using channels. If you prefer to use +{nixos-wiki-flakes}[Nix Flakes] then please see the instructions in +<>. + [[sec-install-standalone]] === Standalone installation :nix-allowed-users: https://nixos.org/nix/manual/#conf-allowed-users -:nixos-allowed-users: https://nixos.org/nixos/manual/options.html#opt-nix.allowedUsers +:nixos-allowed-users: https://nixos.org/manual/nixos/stable/options.html#opt-nix.settings.allowed-users :bash: https://www.gnu.org/software/bash/ :zsh: http://zsh.sourceforge.net/ :fish: https://fishshell.com @@ -40,7 +47,7 @@ example, you should be able to successfully run a command like root user. For a multi-user install of Nix this means that your user must be covered by the {nix-allowed-users}[`allowed-users`] Nix option. On NixOS you can control this option using the -{nixos-allowed-users}[`nix.allowedUsers`] system option. +{nixos-allowed-users}[`nix.settings.allowed-users`] system option. 2. Add the appropriate Home Manager channel. If you are following Nixpkgs master or an unstable channel you can run @@ -51,11 +58,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master $ nix-channel --update ---- + -and if you follow a Nixpkgs version 22.11 channel you can run +and if you follow a Nixpkgs version 23.05 channel you can run + [source,console] ---- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager $ nix-channel --update ---- @@ -123,11 +130,11 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m $ sudo nix-channel --update ---- -and if you follow a Nixpkgs version 22.11 channel, you can run +and if you follow a Nixpkgs version 23.05 channel, you can run [source,console] ---- -$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager $ sudo nix-channel --update ---- @@ -212,6 +219,15 @@ the dependency on `NIX_PATH`, which is otherwise used for importing Nixpkgs. ==== +[NOTE] +==== +Home Manager will pass `osConfig` as a module argument to any modules +you create. This contains the system's NixOS configuration. + +[source,nix] +{ lib, pkgs, osConfig, ... }: +==== + Once installed you can see <> for a more detailed description of Home Manager and how to use it. @@ -234,11 +250,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master $ nix-channel --update ---- -and if you follow a Nixpkgs version 22.11 channel, you can run +and if you follow a Nixpkgs version 23.05 channel, you can run [source,console] ---- -$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager +$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager $ nix-channel --update ---- @@ -318,5 +334,14 @@ the dependency on `NIX_PATH`, which is otherwise used for importing Nixpkgs. ==== +[NOTE] +==== +Home Manager will pass `osConfig` as a module argument to any modules +you create. This contains the system's nix-darwin configuration. + +[source,nix] +{ lib, pkgs, osConfig, ... }: +==== + Once installed you can see <> for a more detailed description of Home Manager and how to use it. diff --git a/third_party/home-manager/docs/man-configuration.xml b/third_party/home-manager/docs/man-configuration.xml index 42962a75f3..a7d1f51198 100644 --- a/third_party/home-manager/docs/man-configuration.xml +++ b/third_party/home-manager/docs/man-configuration.xml @@ -13,12 +13,12 @@ Description - - The file ~/.config/nixpkgs/home.nix contains the + + The file ~/.config/home-manager/home.nix contains the declarative specification of your Home Manager configuration. The command home-manager takes this file and realises the user environment configuration specified therein. - + Options @@ -26,7 +26,7 @@ You can use the following options in home-configuration.nix: - + See also diff --git a/third_party/home-manager/docs/man-home-manager.xml b/third_party/home-manager/docs/man-home-manager.xml index 513973e98c..71c34b0fda 100644 --- a/third_party/home-manager/docs/man-home-manager.xml +++ b/third_party/home-manager/docs/man-home-manager.xml @@ -17,6 +17,10 @@ build + + init --switch dir + + instantiate @@ -179,6 +183,10 @@ --no-out-link + + --refresh + + @@ -196,7 +204,9 @@ Description This command updates the user environment so that it corresponds to the - configuration specified in ~/.config/nixpkgs/home.nix or ~/.config/nixpkgs/flake.nix. + configuration specified in + $XDG_CONFIG_HOME/home-manager/home.nix or + $XDG_CONFIG_HOME/home-manager/flake.nix. All operations using this tool expects a sub-command that indicates the @@ -212,6 +222,35 @@ + + + [] [dir] + + + + Generates an initial home.nix file for the + current user. If Nix flakes are enabled, then this command also + generates a flake.nix file. + + + If a path dir is given then the + configuration will be generated in that directory. Otherwise, the + configuration will be generated in + ~/.config/home-manager. The output directory will + be created if it does not exist. + + + If the option is given, then the generated + configuration is activated. + + + Note, this command will not overwrite any existing files. It is + therefore safe to initialize a configuration, edit it, and then re-run + the command with + enabled to activate the configuration. + + + @@ -342,8 +381,8 @@ - optionally remove all Home Manager generations and make them - available for immediate garbage collection. + remove all Home Manager generations and make them available + for immediate garbage collection. @@ -430,7 +469,7 @@ Indicates the path to the Home Manager configuration file. If not given, - $XDG_CONFIG_HOME/nixpkgs/home.nix is used. + $XDG_CONFIG_HOME/home-manager/home.nix is used. @@ -611,6 +650,18 @@ + + + + + + + Passed on to + nix-build + 1 + + + diff --git a/third_party/home-manager/docs/manual.xml b/third_party/home-manager/docs/manual.xml index b159940c87..af757caf87 100644 --- a/third_party/home-manager/docs/manual.xml +++ b/third_party/home-manager/docs/manual.xml @@ -35,18 +35,19 @@ + Configuration Options - + NixOS Module Options - + nix-darwin Module Options - + Tools diff --git a/third_party/home-manager/docs/nix-flakes.adoc b/third_party/home-manager/docs/nix-flakes.adoc index d426e337f1..21ccda9115 100644 --- a/third_party/home-manager/docs/nix-flakes.adoc +++ b/third_party/home-manager/docs/nix-flakes.adoc @@ -3,10 +3,31 @@ :nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes -Home Manager includes a `flake.nix` file for compatibility with {nixos-wiki-flakes}[Nix Flakes]. -The support is still experimental and may change in backwards incompatible ways. +Home Manager is compatible with {nixos-wiki-flakes}[Nix Flakes]. But +please be aware that the support it is still experimental and may +change in backwards incompatible ways. -[[sec-flakes-prerequisties]] +Just like in the standard installation you can use the Home Manager +flake in three ways: + +1. Using the standalone `home-manager` tool. For platforms other than +NixOS and Darwin, this is the only available choice. It is also +recommended for people on NixOS or Darwin that want to manage their +home directory independently of the system as a whole. See +<> for instructions on how to perform this +installation. + +2. As a module within a NixOS system configuration. This allows the +user profiles to be built together with the system when running +`nixos-rebuild`. See <> for a description of +this setup. + +3. As a module within a {nix-darwin}[nix-darwin] system configuration. +This allows the user profiles to be built together with the system +when running `darwin-rebuild`. See <> +for a description of this setup. + +[[sec-flakes-prerequisites]] === Prerequisites * Install Nix 2.4 or later, or have it in `nix-shell`. @@ -49,98 +70,64 @@ writing a Home Manager configuration. [[sec-flakes-standalone]] === Standalone setup -1. Set up a flake with a `flake.nix` as follows: -+ -[source,nix] ----- -{ - description = "Home Manager configuration of Jane Doe"; +To prepare an initial Home Manager configuration for your logged in user, +you can run the Home Manager `init` command directly from its flake. - inputs = { - # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; +For example, if you are using the unstable version of Nixpkgs or NixOS, +then to generate and activate a basic configuration run the command - outputs = { nixpkgs, home-manager, ... }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in { - homeConfigurations.jdoe = 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 - }; - }; -} ----- -+ -[NOTE] -==== -* The above example tracks the master branch of Home Manager -and nixos-unstable branch of Nixpkgs. -If you would like to use the `release-22.11` branch, -change the `home-manager` input url to `github:nix-community/home-manager/release-22.11` -and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.11`. - -* The Home Manager library is exported by the flake under -`lib.hm`. - -* You can use the above `flake.nix` as a template in `~/.config/nixpkgs` by [source,console] -$ nix flake new ~/.config/nixpkgs -t github:nix-community/home-manager -==== +$ nix run home-manager/master -- init --switch + +For Nixpkgs or NixOS version 23.05 run + +[source,console] +$ nix run home-manager/release-23.05 -- init --switch + +This will generate a `flake.nix` and a `home.nix` file in +`~/.config/home-manager`, creating the directory if it does not exist. + +If you omit the `--switch` option then the activation will not happen. +This is useful if you want to inspect and edit the configuration before activating it. -2. Install Home Manager and apply the configuration by -+ [source,console] ---- -$ nix build --no-link #homeConfigurations.jdoe.activationPackage -$ "$(nix path-info #homeConfigurations.jdoe.activationPackage)"/activate +$ nix run home-manager/$branch -- init +$ # Edit files in ~/.config/home-manager +$ nix run home-manager/$branch -- init --switch ---- -+ -Substitute `` with the flake URI of the configuration flake. -If `flake.nix` resides in `~/.config/nixpkgs`, -`` may be `~/.config/nixpkgs` -as a Git tree or `path:~/.config/nixpkgs` if not. -3. Since the release `21.05`, -building a flake-based configuration is as simple as -+ +Where `$branch` is one of `master` or `release-23.05`. + +After the initial activation has completed successfully then building +and activating your flake-based configuration is as simple as + [source,console] -$ home-manager switch --flake '#jdoe' -+ -once home-manager is installed. -+ -Here, `jdoe` is a configuration specified in the flake file, -and `#jdoe` will be expanded to -`#homeConfigurations.jdoe.activationPackage` -and be built by Nix. +$ home-manager switch + +It is possible to override the default configuration directory, if you want. +For example, + +[source,console] +---- +$ nix run home-manager/$branch -- init --switch ~/hmconf +$ # And after the initial activation. +$ home-manager switch --flake ~/hmconf +---- [NOTE] ==== -The flake inputs are not upgraded automatically when switching. -The analogy to the command `home-manager --update ...` is `nix flake update`. +The flake inputs are not automatically updated by Home Manager. +You need to use the standard `nix flake update` command for that. -If updating more than one input is undesirable, -the command `nix flake lock --update-input ` can be used. +If you only want to update a single flake input, +then the command `nix flake lock --update-input ` can be used. You can also pass flake-related options -such as `--recreate-lock-file` or `--update-input [input]` -to `home-manager` when building/switching, +such as `--recreate-lock-file` or `--update-input ` +to `home-manager` when building or switching, and these options will be forwarded to `nix build`. -See the {nixos-wiki-flakes}[NixOS Wiki page] for detail. +See the {nixos-wiki-flakes}[NixOS Wiki page] for details. ==== [[sec-flakes-nixos-module]] diff --git a/third_party/home-manager/docs/release-notes/release-notes.adoc b/third_party/home-manager/docs/release-notes/release-notes.adoc index d7058ca0cc..e40cd6ffa8 100644 --- a/third_party/home-manager/docs/release-notes/release-notes.adoc +++ b/third_party/home-manager/docs/release-notes/release-notes.adoc @@ -6,6 +6,8 @@ This section lists the release notes for stable versions of Home Manager and the :leveloffset: 1 +include::rl-2311.adoc[] + include::rl-2305.adoc[] include::rl-2211.adoc[] diff --git a/third_party/home-manager/docs/release-notes/rl-2211.adoc b/third_party/home-manager/docs/release-notes/rl-2211.adoc index 046995d527..e19f157793 100644 --- a/third_party/home-manager/docs/release-notes/rl-2211.adoc +++ b/third_party/home-manager/docs/release-notes/rl-2211.adoc @@ -1,7 +1,7 @@ [[sec-release-22.11]] == Release 22.11 -This is the current unstable branch and the information in this section is therefore not final. +The 22.11 release branch became the stable branch in November, 2022. [[sec-release-22.11-highlights]] === Highlights diff --git a/third_party/home-manager/docs/release-notes/rl-2305.adoc b/third_party/home-manager/docs/release-notes/rl-2305.adoc index 6d16e784a3..b4491bb6cf 100644 --- a/third_party/home-manager/docs/release-notes/rl-2305.adoc +++ b/third_party/home-manager/docs/release-notes/rl-2305.adoc @@ -1,14 +1,42 @@ [[sec-release-23.05]] == Release 23.05 -This is the current unstable branch and the information in this section is therefore not final. +The 23.05 release branch became the stable branch in May, 2023. [[sec-release-23.05-highlights]] === Highlights This release has the following notable changes: -* No highlights. +* Firefox add-ons are now managed per-profile. +That is, if you are currently having ++ +[source,nix] +programs.firefox.extensions = [ foo bar ]; ++ +in your configuration then you must change it to ++ +[source,nix] +programs.firefox.profiles.myprofile.extensions = [ foo bar ]; + +* The default configuration location has been changed from +`~/.config/nixpkgs/home.nix` to `~/.config/home-manager/home.nix`. ++ +Similarly, if you are using a Nix flake based setup +then the default flake file location has changed from +`~/.config/nixpkgs/flake.nix` to `~/.config/home-manager/flake.nix`. ++ +The old location will continue to work but using it will trigger a warning message. +We changed the default configuration location to avoid confusion about +which files belong to Home Manager and which belong to Nixpkgs. + +* The `home-manager` tool now offers an `init` command. +This command can be used to generate an initial Home Manager configuration, +and optionally also activate it. +The recommended installation method for a standalone Home Manager setup +with Nix flakes uses this new command. +The standard installation method remains the same but uses the new command internally. +See <> for more. [[sec-release-23.05-state-version-changes]] === State Version Changes @@ -16,8 +44,14 @@ This release has the following notable changes: The state version in this release includes the changes below. These changes are only active if the `home.stateVersion` option is set to "23.05" or later. -* The <>, -<>, -<>, -<>, options now default to `true` which -is consistent with the default values for those options used by `i3` and `sway`. +* The options ++ +-- +- <> +- <> +- <> +- <> +-- ++ +now default to `true` which is consistent with the default values for +those options used by `i3` and `sway`. diff --git a/third_party/home-manager/docs/release-notes/rl-2311.adoc b/third_party/home-manager/docs/release-notes/rl-2311.adoc new file mode 100644 index 0000000000..4947b8095c --- /dev/null +++ b/third_party/home-manager/docs/release-notes/rl-2311.adoc @@ -0,0 +1,41 @@ +[[sec-release-23.11]] +== Release 23.11 + +This is the current unstable branch and the information in this section is therefore not final. + +[[sec-release-23.11-highlights]] +=== Highlights +:babelfish: https://github.com/bouk/babelfish +:nixpkgs-markdown: https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup + +This release has the following notable changes: + +* When using <>, the setup code +for <> is now translated +with {babelfish}[babelfish]. +This should result in significantly faster shell startup times +but could theoretically break +if you have very complex bash expressions in a session variable. +Please report any issues you experience. + +* The `.release` file in the Home Manager source tree +has been supplanted by `release.json`, +which contains more information about the branch. +If you have any external code reading this file, +please switch to consuming `release.json` instead. +The `.release` file will be removed in 24.05. + +* Home Manager has migrated to using +the upstream Nixpkgs `lib.nixosOptionsDoc` processor +for option documentation. +If you have any external Home Manager modules, +their option descriptions and literal examples should be translated +to {nixpkgs-markdown}[Nixpkgs-flavoured Markdown]. + +[[sec-release-23.11-state-version-changes]] +=== State Version Changes + +The state version in this release includes the changes below. +These changes are only active if the `home.stateVersion` option is set to "23.11" or later. + +* Nothing, yet. diff --git a/third_party/home-manager/docs/usage.adoc b/third_party/home-manager/docs/usage.adoc index adac7b7291..00ce347e2f 100644 --- a/third_party/home-manager/docs/usage.adoc +++ b/third_party/home-manager/docs/usage.adoc @@ -1,7 +1,14 @@ [[ch-usage]] == Using Home Manager -Your use of Home Manager is centered around the configuration file, which is typically found at `~/.config/nixpkgs/home.nix`. +Your use of Home Manager is centered around the configuration file, +which is typically found at `~/.config/home-manager/home.nix` in the standard installation +or `~/.config/home-manager/flake.nix` in a Nix flake based installation. + +[NOTE] +The default configuration used to be placed in `~/.config/nixpkgs`¸ +so you may see references to that elsewhere. +The old directory still works but Home Manager will print a warning message when used. This configuration file can be _built_ and _activated_. @@ -18,7 +25,7 @@ then building it, for example using `home-manager build`, will result in an erro ---- $ home-manager build error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values: -- In `/home/jdoe/.config/nixpkgs/home.nix': "yes" +- In `/home/jdoe/.config/home-manager/home.nix': "yes" (use '--show-trace' to show detailed location information) ---- @@ -32,7 +39,7 @@ Once a configuration is successfully built, it can be activated. The activation [[sec-usage-configuration]] === Configuration Example -A fresh install of Home Manager will generate a minimal `~/.config/nixpkgs/home.nix` file containing something like +A fresh install of Home Manager will generate a minimal `~/.config/home-manager/home.nix` file containing something like [source,nix] ---- @@ -52,7 +59,7 @@ A fresh install of Home Manager will generate a minimal `~/.config/nixpkgs/home. # 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 = "22.11"; + home.stateVersion = "23.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -92,7 +99,7 @@ To satisfy the above setup we should elaborate the `home.nix` file as 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 = "22.11"; + home.stateVersion = "23.05"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/third_party/home-manager/docs/writing-modules.adoc b/third_party/home-manager/docs/writing-modules.adoc index d8d69e828c..5e4802ce1a 100644 --- a/third_party/home-manager/docs/writing-modules.adoc +++ b/third_party/home-manager/docs/writing-modules.adoc @@ -7,16 +7,17 @@ The module system in Home Manager is based entirely on the NixOS module system s [[sec-option-types]] === Option Types :wikipedia-dag: https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095 -:gvariant-description: https://developer.gnome.org/glib/stable/glib-GVariant.html#glib-GVariant.description +:gvariant-description: https://docs.gtk.org/glib/struct.Variant.html#description Overall the basic option types are the same in Home Manager as NixOS. A few Home Manager options, however, make use of custom types that are worth describing in more detail. These are the option types `dagOf` and `gvariant` that are used, for example, by <> and <>. -`hm.types.dagOf`:: +[[sec-option-types-dag]]`hm.types.dagOf`:: Options of this type have attribute sets as values where each member is a node in a {wikipedia-dag}[directed acyclic graph] (DAG). This allows the attribute set entries to express dependency relations among themselves. This can, for example, be used to control the order of match blocks in a OpenSSH client configuration or the order of activation script blocks in <>. + A number of functions are provided to create DAG nodes. The functions are shown below with examples using an option `foo.bar` of type `hm.types.dagOf types.int`. + -`hm.dag.entryAnywhere (value: T)`::: +-- +[[sec-option-types-dag-entryAnywhere]]`hm.dag.entryAnywhere (value: T) : DagEntry`::: Indicates that `value` can be placed anywhere within the DAG. This is also the default for plain attribute set entries, that is + [source,nix] @@ -37,7 +38,7 @@ foo.bar = { + are equivalent. + -`hm.dag.entryAfter (afters: list string) (value: T)`::: +[[sec-option-types-dag-entryAfter]]`hm.dag.entryAfter (afters: list string) (value: T) : DagEntry` ::: Indicates that `value` must be placed _after_ each of the attribute names in the given list. For example + [source,nix] @@ -50,7 +51,7 @@ foo.bar = { + would place `b` after `a` in the graph. + -`hm.dag.entryBefore (befores: list string) (value: T)`::: +[[sec-option-types-dag-entryBefore]]`hm.dag.entryBefore (befores: list string) (value: T) : DagEntry` ::: Indicates that `value` must be placed _before_ each of the attribute names in the given list. For example + [source,nix] @@ -63,7 +64,7 @@ foo.bar = { + would place `b` before `a` in the graph. + -`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T)`::: +[[sec-option-types-dag-entryBetween]]`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry` ::: Indicates that `value` must be placed _before_ the attribute names in the first list and _after_ the attribute names in the second list. For example + [source,nix] @@ -76,14 +77,101 @@ foo.bar = { ---- + would place `c` before `b` and after `a` in the graph. +-- ++ +There are also a set of functions that generate a DAG from a list. +These are convenient when you just want to have a linear list of DAG entries, +without having to manually enter the relationship between each entry. +Each of these functions take a `tag` as argument and the DAG entries will be named `${tag}-${index}`. -`hm.types.gvariant`:: -This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays and tuples. Dictionaries are not currently supported. +[[sec-option-types-dag-entriesAnywhere]]`hm.dag.entriesAnywhere (tag: string) (values: [T]) : Dag`::: +Creates a DAG with the given values with each entry labeled using the given tag. For example + -To create a GVariant value you can use a number of provided functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`. +[source,nix] +foo.bar = hm.dag.entriesAnywhere "a" [ 0 1 ]; + -`hm.gvariant.mkBoolean (v: bool)`::: -Takes a Nix value `v` to a GVariant `boolean` value. Note, Nix booleans are automatically coerced using this function. That is, +is equivalent to ++ +[source,nix] +---- +foo.bar = { + a-0 = 0; + a-1 = hm.dag.entryAfter [ "a-0" ] 1; +} +---- ++ +[[sec-option-types-dag-entriesAfter]]`hm.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag`::: +Creates a DAG with the given values with each entry labeled using the given tag. +The list of values are placed are placed _after_ each of the attribute names in `afters`. +For example ++ +[source,nix] +foo.bar = + { b = 0; } + // hm.dag.entriesAfter "a" [ "b" ] [ 1 2 ]; ++ +is equivalent to ++ +[source,nix] +---- +foo.bar = { + b = 0; + a-0 = hm.dag.entryAfter [ "b" ] 1; + a-1 = hm.dag.entryAfter [ "a-0" ] 2; +} +---- ++ +[[sec-option-types-dag-entriesBefore]]`hm.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag`::: +Creates a DAG with the given values with each entry labeled using the given tag. +The list of values are placed _before_ each of the attribute names in `befores`. +For example ++ +[source,nix] +foo.bar = + { b = 0; } + // hm.dag.entriesBefore "a" [ "b" ] [ 1 2 ]; ++ +is equivalent to ++ +[source,nix] +---- +foo.bar = { + b = 0; + a-0 = 1; + a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; +} +---- ++ +[[sec-option-types-dag-entriesBetween]]`hm.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag`::: +Creates a DAG with the given values with each entry labeled using the given tag. +The list of values are placed _before_ each of the attribute names in `befores` +and _after_ each of the attribute names in `afters`. +For example ++ +[source,nix] +foo.bar = + { b = 0; c = 3; } + // hm.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ]; ++ +is equivalent to ++ +[source,nix] +---- +foo.bar = { + b = 0; + c = 3; + a-0 = hm.dag.entryAfter [ "c" ] 1; + a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2; +} +---- + +[[sec-option-types-gvariant]]`hm.types.gvariant`:: +This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays, tuples, ``maybe'' types, and dictionaries. ++ +Some Nix values are automatically coerced to matching GVariant value but the GVariant model is richer so you may need to use one of the provided constructor functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`. ++ +[[sec-option-types-gvariant-mkBoolean]]`hm.gvariant.mkBoolean (v: bool)`::: +Takes a Nix value `v` to a GVariant `boolean` value (GVariant format string `b`). Note, Nix booleans are automatically coerced using this function. That is, + [source,nix] ---- @@ -96,8 +184,8 @@ is equivalent to ---- foo.bar = true; ---- -`hm.gvariant.mkString (v: string)`::: -Takes a Nix value `v` to a GVariant `string` value. Note, Nix strings are automatically coerced using this function. That is, +[[sec-option-types-gvariant-mkString]]`hm.gvariant.mkString (v: string)`::: +Takes a Nix value `v` to a GVariant `string` value (GVariant format string `s`). Note, Nix strings are automatically coerced using this function. That is, + [source,nix] ---- @@ -110,16 +198,16 @@ is equivalent to ---- foo.bar = "a string"; ---- -`hm.gvariant.mkObjectpath (v: string)`::: -Takes a Nix value `v` to a GVariant `objectpath` value. -`hm.gvariant.mkUchar (v: string)`::: -Takes a Nix value `v` to a GVariant `uchar` value. -`hm.gvariant.mkInt16 (v: int)`::: -Takes a Nix value `v` to a GVariant `int16` value. -`hm.gvariant.mkUint16 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint16` value. -`hm.gvariant.mkInt32 (v: int)`::: -Takes a Nix value `v` to a GVariant `int32` value. Note, Nix integers are automatically coerced using this function. That is, +[[sec-option-types-gvariant-mkObjectpath]]`hm.gvariant.mkObjectpath (v: string)`::: +Takes a Nix value `v` to a GVariant `objectpath` value (GVariant format string `o`). +[[sec-option-types-gvariant-mkUchar]]`hm.gvariant.mkUchar (v: string)`::: +Takes a Nix value `v` to a GVariant `uchar` value (GVariant format string `y`). +[[sec-option-types-gvariant-mkInt16]]`hm.gvariant.mkInt16 (v: int)`::: +Takes a Nix value `v` to a GVariant `int16` value (GVariant format string `n`). +[[sec-option-types-gvariant-mkUint16]]`hm.gvariant.mkUint16 (v: int)`::: +Takes a Nix value `v` to a GVariant `uint16` value (GVariant format string `q`). +[[sec-option-types-gvariant-mkInt32]]`hm.gvariant.mkInt32 (v: int)`::: +Takes a Nix value `v` to a GVariant `int32` value (GVariant format string `i`). Note, Nix integers are automatically coerced using this function. That is, + [source,nix] ---- @@ -132,14 +220,14 @@ is equivalent to ---- foo.bar = 7; ---- -`hm.gvariant.mkUint32 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint32` value. -`hm.gvariant.mkInt64 (v: int)`::: -Takes a Nix value `v` to a GVariant `int64` value. -`hm.gvariant.mkUint64 (v: int)`::: -Takes a Nix value `v` to a GVariant `uint64` value. -`hm.gvariant.mkDouble (v: double)`::: -Takes a Nix value `v` to a GVariant `double` value. Note, Nix floats are automatically coerced using this function. That is, +[[sec-option-types-gvariant-mkUint32]]`hm.gvariant.mkUint32 (v: int)`::: +Takes a Nix value `v` to a GVariant `uint32` value (GVariant format string `u`). +[[sec-option-types-gvariant-mkInt64]]`hm.gvariant.mkInt64 (v: int)`::: +Takes a Nix value `v` to a GVariant `int64` value (GVariant format string `x`). +[[sec-option-types-gvariant-mkUint64]]`hm.gvariant.mkUint64 (v: int)`::: +Takes a Nix value `v` to a GVariant `uint64` value (GVariant format string `t`). +[[sec-option-types-gvariant-mkDouble]]`hm.gvariant.mkDouble (v: double)`::: +Takes a Nix value `v` to a GVariant `double` value (GVariant format string `d`). Note, Nix floats are automatically coerced using this function. That is, + [source,nix] ---- @@ -153,43 +241,43 @@ is equivalent to foo.bar = 3.14; ---- + -`hm.gvariant.mkArray type elements`::: -Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type. The `type` value can be constructed using +[[sec-option-types-gvariant-mkArray]]`hm.gvariant.mkArray type elements`::: +Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type (GVariant format string `a${type}`). The `type` value can be constructed using + -- -- `hm.gvariant.type.string` -- `hm.gvariant.type.boolean` -- `hm.gvariant.type.uchar` -- `hm.gvariant.type.int16` -- `hm.gvariant.type.uint16` -- `hm.gvariant.type.int32` -- `hm.gvariant.type.uint32` -- `hm.gvariant.type.int64` -- `hm.gvariant.type.uint64` -- `hm.gvariant.type.double` -- `hm.gvariant.type.variant` -- `hm.gvariant.type.arrayOf type` -- `hm.gvariant.type.maybeOf type` -- `hm.gvariant.type.tupleOf types` -- `hm.gvariant.type.dictionaryEntryOf types` +- `hm.gvariant.type.string` (GVariant format string `s`) +- `hm.gvariant.type.boolean` (GVariant format string `b`) +- `hm.gvariant.type.uchar` (GVariant format string `y`) +- `hm.gvariant.type.int16` (GVariant format string `n`) +- `hm.gvariant.type.uint16` (GVariant format string `q`) +- `hm.gvariant.type.int32` (GVariant format string `i`) +- `hm.gvariant.type.uint32` (GVariant format string `u`) +- `hm.gvariant.type.int64` (GVariant format string `x`) +- `hm.gvariant.type.uint64` (GVariant format string `t`) +- `hm.gvariant.type.double` (GVariant format string `d`) +- `hm.gvariant.type.variant` (GVariant format string `v`) +- `hm.gvariant.type.arrayOf type` (GVariant format string `a${type}`) +- `hm.gvariant.type.maybeOf type` (GVariant format string `m${type}`) +- `hm.gvariant.type.tupleOf types` (GVariant format string `(${lib.concatStrings types})`) +- `hm.gvariant.type.dictionaryEntryOf [keyType valueType]` (GVariant format string `{${keyType}${valueType}}`) -- + where `type` and `types` are themselves a type and list of types, respectively. + -`hm.gvariant.mkEmptyArray type`::: -An alias of `hm.gvariant.mkArray type []`. +[[sec-option-types-gvariant-mkEmptyArray]]`hm.gvariant.mkEmptyArray type`::: +An alias of <>. + -`hm.gvariant.mkNothing type`::: -Builds a GVariant maybe value whose (non-existent) element is of the given type. The `type` value is constructed as described for the `mkArray` function above. +[[sec-option-types-gvariant-mkNothing]]`hm.gvariant.mkNothing type`::: +Builds a GVariant maybe value (GVariant format string `m${type}`) whose (non-existent) element is of the given type. The `type` value is constructed as described for the <> function above. + -`hm.gvariant.mkJust element`::: -Builds a GVariant maybe value containing the given GVariant element. +[[sec-option-types-gvariant-mkJust]]`hm.gvariant.mkJust element`::: +Builds a GVariant maybe value (GVariant format string `m${element.type}`) containing the given GVariant element. + -`hm.gvariant.mkTuple elements`::: +[[sec-option-types-gvariant-mkTuple]]`hm.gvariant.mkTuple elements`::: Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value. + -`hm.gvariant.mkVariant element`::: -Builds a GVariant variant which contains the value of a GVariant element. +[[sec-option-types-gvariant-mkVariant]]`hm.gvariant.mkVariant element`::: +Builds a GVariant variant (GVariant format string `v`) which contains the value of a GVariant element. + -`hm.gvariant.mkDictionaryEntry elements`::: -Builds a GVariant dictionary entry containing the given list of elements, where each element is a GVariant value. +[[sec-option-types-gvariant-mkDictionaryEntry]]`hm.gvariant.mkDictionaryEntry [key value]`::: +Builds a GVariant dictionary entry containing the given list of elements (GVariant format string `{${key.type}${value.type}}`), where each element is a GVariant value. diff --git a/third_party/home-manager/flake.lock b/third_party/home-manager/flake.lock index a334b24bbf..331e949eeb 100644 --- a/third_party/home-manager/flake.lock +++ b/third_party/home-manager/flake.lock @@ -2,15 +2,15 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1671983799, - "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", - "owner": "nixos", + "lastModified": 1690881714, + "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", + "rev": "9e1960bc196baf6881340d53dccb203a951745a2", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -18,23 +18,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "utils": "utils" - } - }, - "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/third_party/home-manager/flake.nix b/third_party/home-manager/flake.nix index 512111702d..a1c81635d7 100644 --- a/third_party/home-manager/flake.nix +++ b/third_party/home-manager/flake.nix @@ -1,10 +1,9 @@ { description = "Home Manager for Nix"; - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - inputs.utils.url = "github:numtide/flake-utils"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - outputs = { self, nixpkgs, utils, ... }: + outputs = { self, nixpkgs, ... }: { nixosModules = rec { home-manager = import ./nixos; @@ -56,7 +55,7 @@ - 'system' have been removed. Instead use the arguments 'pkgs' and - 'modules'. See the 22.11 release notes for more. + 'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.html#sec-release-22.11-highlights ''; throwForRemovedArgs = v: @@ -79,26 +78,46 @@ in throwForRemovedArgs (import ./modules { inherit pkgs lib check extraSpecialArgs; configuration = { ... }: { - imports = modules; + imports = modules + ++ [{ programs.home-manager.path = toString ./.; }]; nixpkgs = { inherit (pkgs) config overlays; }; }; }); }; - } // utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - docs = import ./docs { inherit pkgs; }; - tests = import ./tests { inherit pkgs; }; - in { - devShells.tests = tests.run; - packages = rec { - home-manager = pkgs.callPackage ./home-manager { }; + } // (let + forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + in { + devShells = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + tests = import ./tests { inherit pkgs; }; + in tests.run); + + formatter = forAllSystems (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in pkgs.linkFarm "format" [{ + name = "bin/format"; + path = ./format; + }]); + + packages = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + releaseInfo = nixpkgs.lib.importJSON ./release.json; + docs = import ./docs { + inherit pkgs; + inherit (releaseInfo) release isReleaseBranch; + }; + hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; }; + in { + default = hmPkg; + home-manager = hmPkg; + docs-html = docs.manual.html; - docs-manpages = docs.manPages; docs-json = docs.options.json; - default = home-manager; - }; - # deprecated in Nix 2.7 - defaultPackage = self.packages.${system}.default; - }); + docs-manpages = docs.manPages; + }); + + defaultPackage = forAllSystems (system: self.packages.${system}.default); + }); } diff --git a/third_party/home-manager/format b/third_party/home-manager/format index 68751a3f78..ff4b32e476 100755 --- a/third_party/home-manager/format +++ b/third_party/home-manager/format @@ -1,28 +1,51 @@ #! /usr/bin/env nix-shell -#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p findutils nixfmt +#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p git gnugrep gnused findutils nixfmt -CHECK_ARG= +nixfmt_args=() +files=() -case $1 in - -h) - echo "$0 [-c]" - ;; - -c) - CHECK_ARG=-c - ;; -esac +for arg do + case $arg in + -h) + echo "$0 [-c]" + exit + ;; + -c) + nixfmt_args+=("$arg") + ;; + -*) + echo "unrecognised flag: $arg" >&2 + exit 1 + ;; + *) + files+=("$arg") + ;; + esac +done # The excludes are for files touched by open pull requests and we want # to avoid merge conflicts. -find . -name '*.nix' \ - ! -path ./modules/default.nix \ - ! -path ./modules/files.nix \ - ! -path ./modules/home-environment.nix \ - ! -path ./modules/lib/default.nix \ - ! -path ./modules/lib/file-type.nix \ - ! -path ./modules/misc/news.nix \ - ! -path ./modules/programs/bash.nix \ - ! -path ./modules/programs/ssh.nix \ - ! -path ./modules/programs/zsh.nix \ - ! -path ./tests/default.nix \ - -exec nixfmt $CHECK_ARG {} + +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=() +for e in "${excludes[@]}"; do + exclude_args+=(-e "$e") +done + +git_root=$(git rev-parse --show-toplevel) + +git ls-files -z --cached --others --full-name -- "${files[@]}" | + grep -z '\.nix$' | + grep -z -v "${exclude_args[@]}" | + sed -z "s|^|$git_root/|" | + xargs -0 nixfmt "${nixfmt_args[@]}" diff --git a/third_party/home-manager/home-manager/build-news.nix b/third_party/home-manager/home-manager/build-news.nix new file mode 100644 index 0000000000..251f56ae4c --- /dev/null +++ b/third_party/home-manager/home-manager/build-news.nix @@ -0,0 +1,54 @@ +# Used by the home-manager tool to present news to the user. The content of this +# file is considered internal and the exported fields may change without +# warning. + +{ newsJsonFile, newsReadIdsFile ? null }: + +let + inherit (builtins) + concatStringsSep filter hasAttr isString length optionalString readFile + replaceStrings sort split; + + newsJson = builtins.fromJSON (builtins.readFile newsJsonFile); + + # Sorted and relevant entries. + relevantEntries = + sort (a: b: a.time > b.time) (filter (e: e.condition) newsJson.entries); + + newsReadIds = if newsReadIdsFile == null then + { } + else + let ids = filter isString (split "\n" (readFile newsReadIdsFile)); + in builtins.listToAttrs (map (id: { + name = id; + value = null; + }) ids); + + newsIsRead = entry: hasAttr entry.id newsReadIds; + + newsUnread = let pred = entry: entry.condition && !newsIsRead entry; + in filter pred relevantEntries; + + prettyTime = t: replaceStrings [ "T" "+00:00" ] [ " " "" ] t; + + layoutNews = entries: + let + mkTextEntry = entry: + let flag = if newsIsRead entry then "read" else "unread"; + in '' + * ${prettyTime entry.time} [${flag}] + + ${replaceStrings [ "\n" ] [ "\n " ] entry.message} + ''; + in concatStringsSep "\n\n" (map mkTextEntry entries); +in { + meta = { + numUnread = length newsUnread; + display = newsJson.display; + ids = concatStringsSep "\n" (map (e: e.id) newsJson.entries); + }; + news = { + all = layoutNews relevantEntries; + unread = layoutNews newsUnread; + }; +} diff --git a/third_party/home-manager/home-manager/completion.bash b/third_party/home-manager/home-manager/completion.bash index c551229917..de78045151 100644 --- a/third_party/home-manager/home-manager/completion.bash +++ b/third_party/home-manager/home-manager/completion.bash @@ -276,19 +276,26 @@ _home-manager_xdg-get-cache-home () { ################################################## +_hm_subcommands=( "help" "edit" "option" "build" "init" "instantiate" "switch" "generations" "remove-generations" "expire-generations" "packages" "news" "uninstall" ) +declare -ra _hm_subcommands + +# Finds the active sub-command, if any. +_home-manager_subcommand() { + local subcommand='' i= + for ((i = 1; i < ${#COMP_WORDS[@]}; i++)); do + local word="${COMP_WORDS[i]}" + if [[ " ${_hm_subcommands[*]} " == *" ${word} "* ]]; then + subcommand="$word" + break + fi + done + + echo "$subcommand" +} + # shellcheck disable=SC2207 _home-manager_completions () { - - #--------------------------# - - local Subcommands - Subcommands=( "help" "edit" "option" "build" "instantiate" "switch" "generations" "remove-generations" "expire-generations" "packages" "news" "uninstall" ) - - # ^ « home-manager »'s subcommands. - - #--------------------------# - local Options Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \ "--verbose" "--cores" "--debug" "--impure" "--keep-failed" \ @@ -296,7 +303,7 @@ _home-manager_completions () "-L" "--print-build-logs" \ "--show-trace" "--substitute" "--builders" "--version" \ "--update-input" "--override-input" "--experimental-features" \ - "--extra-experimental-features" ) + "--extra-experimental-features" "--refresh") # ^ « home-manager »'s options. @@ -322,39 +329,53 @@ _home-manager_completions () # PreviousWord="-f" # CurrentWord="./" + local CurrentCommand + CurrentCommand="$(_home-manager_subcommand)" + #--------------------------# COMPREPLY=() - case "$PreviousWord" in - - "-f"|"--file") - - COMPREPLY+=( $( compgen -A file -- "$CurrentWord") ) - ;; - - "-I") + case "$CurrentCommand" in + "init") + COMPREPLY+=( $( compgen -W "--switch" -- "$CurrentWord" ) ) COMPREPLY+=( $( compgen -A directory -- "$CurrentWord") ) ;; - "-A") - - # shellcheck disable=SC2119 - COMPREPLY+=( $( compgen -W "$(_home-manager_list-nix-attributes)" -- "$CurrentWord") ) - ;; - "remove-generations") COMPREPLY+=( $( compgen -W "$(_home-manager_list-generation-identifiers)" -- "$CurrentWord" ) ) ;; *) + case "$PreviousWord" in - COMPREPLY+=( $( compgen -W "${Subcommands[*]}" -- "$CurrentWord" ) ) - COMPREPLY+=( $( compgen -W "${Options[*]}" -- "$CurrentWord" ) ) + "-f"|"--file") + + COMPREPLY+=( $( compgen -A file -- "$CurrentWord") ) + ;; + + "-I") + + COMPREPLY+=( $( compgen -A directory -- "$CurrentWord") ) + ;; + + "-A") + + # shellcheck disable=SC2119 + COMPREPLY+=( $( compgen -W "$(_home-manager_list-nix-attributes)" -- "$CurrentWord") ) + ;; + *) + + if [[ ! $CurrentCommand ]]; then + COMPREPLY+=( $( compgen -W "${_hm_subcommands[*]}" -- "$CurrentWord" ) ) + fi + COMPREPLY+=( $( compgen -W "${Options[*]}" -- "$CurrentWord" ) ) + ;; + + esac ;; - esac #--------------------------# diff --git a/third_party/home-manager/home-manager/completion.fish b/third_party/home-manager/home-manager/completion.fish index 58ce386e69..3781d3a714 100644 --- a/third_party/home-manager/home-manager/completion.fish +++ b/third_party/home-manager/home-manager/completion.fish @@ -69,3 +69,4 @@ complete -c home-manager -f -l "update-input" complete -c home-manager -f -l "override-input" complete -c home-manager -f -l "experimental-features" complete -c home-manager -f -l "extra-experimental-features" +complete -c home-manager -f -l "refresh" -d "Consider all previously downloaded files out-of-date" diff --git a/third_party/home-manager/home-manager/completion.zsh b/third_party/home-manager/home-manager/completion.zsh index 3babc1feef..52bcce90e9 100644 --- a/third_party/home-manager/home-manager/completion.zsh +++ b/third_party/home-manager/home-manager/completion.zsh @@ -35,6 +35,7 @@ case "$state" in 'edit[edit]' \ 'option[inspect option]' \ 'build[build]' \ + 'init[init]' \ 'switch[switch]' \ 'generations[list generations]' \ 'remove-generations[remove generations]' \ @@ -63,11 +64,17 @@ case "$state" in '--show-trace[show trace]' \ '--substitute[substitute]' \ '--builders[builders]:SPEC:()' \ + '--refresh[refresh]' \ '--override-input[override flake input]:NAME VALUE:()' \ '--update-input[update flake input]:NAME:()' \ '--experimental-features[set experimental Nix features]:VALUE:()' \ '--extra-experimental-features:[append to experimental Nix features]:VALUE:()' ;; + init) + _arguments \ + '--switch[switch]' \ + ':PATH:_files -/' + ;; esac esac diff --git a/third_party/home-manager/home-manager/default.nix b/third_party/home-manager/home-manager/default.nix index 3589acb82b..5e0e1e462f 100644 --- a/third_party/home-manager/home-manager/default.nix +++ b/third_party/home-manager/home-manager/default.nix @@ -1,11 +1,9 @@ -{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused +{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused, jq , less, ncurses, unixtools # used for pkgs.path for nixos-option , pkgs -# Extra path to Home Manager. If set then this path will be tried -# before `$HOME/.config/nixpkgs/home-manager` and -# `$HOME/.nixpkgs/home-manager`. +# Path to use as the Home Manager channel. , path ? null }: let @@ -36,6 +34,7 @@ in runCommand "home-manager" { findutils gettext gnused + jq less ncurses nixos-option diff --git a/third_party/home-manager/home-manager/home-manager b/third_party/home-manager/home-manager/home-manager index 89f58c4d06..8f3418ddaa 100644 --- a/third_party/home-manager/home-manager/home-manager +++ b/third_party/home-manager/home-manager/home-manager @@ -11,20 +11,30 @@ 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() { - nix profile list \ - | { grep "$1" || test $? = 1; } \ - | cut -d ' ' -f 4 \ - | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + nixProfileList "$1" | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG } function setNixProfileCommands() { - if [[ -e ~/.nix-profile/manifest.json ]] ; then + if [[ -e $HOME/.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 -q" + REMOVE_CMD="nix-env --uninstall" fi } @@ -50,53 +60,142 @@ function setWorkDir() { fi } +# Checks whether the 'flakes' and 'nix-command' Nix options are enabled. +function hasFlakeSupport() { + type -p nix > /dev/null \ + && nix show-config 2> /dev/null \ + | grep experimental-features \ + | grep flakes \ + | grep -q nix-command +} + # Attempts to set the HOME_MANAGER_CONFIG global variable. # # If no configuration file can be found then this function will print # an error message and exit with an error code. function setConfigFile() { if [[ -v HOME_MANAGER_CONFIG ]] ; then - if [[ ! -e "$HOME_MANAGER_CONFIG" ]] ; then - _i "No configuration file found at %s" \ + if [[ -e "$HOME_MANAGER_CONFIG" ]] ; then + HOME_MANAGER_CONFIG="$(realpath "$HOME_MANAGER_CONFIG")" + else + _i 'No configuration file found at %s' \ "$HOME_MANAGER_CONFIG" >&2 exit 1 fi + elif [[ ! -v HOME_MANAGER_CONFIG ]]; then + local configHome="${XDG_CONFIG_HOME:-$HOME/.config}" + local hmConfigHome="$configHome/home-manager" + local nixpkgsConfigHome="$configHome/nixpkgs" + local defaultConfFile="$hmConfigHome/home.nix" + local configFile - HOME_MANAGER_CONFIG="$(realpath "$HOME_MANAGER_CONFIG")" - return - fi - - local defaultConfFile="${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix" - local confFile - for confFile in "$defaultConfFile" \ - "$HOME/.nixpkgs/home.nix" ; do - if [[ -e "$confFile" ]] ; then - HOME_MANAGER_CONFIG="$(realpath "$confFile")" - return + if [[ -e "$defaultConfFile" ]]; then + configFile="$defaultConfFile" + elif [[ -e "$nixpkgsConfigHome/home.nix" ]]; then + configFile="$nixpkgsConfigHome/home.nix" + # translators: The first '%s' specifier will be replaced by either + # 'home.nix' or 'flake.nix'. + _iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \ + 'home.nix' "$nixpkgsConfigHome" "$hmConfigHome" >&2 + elif [[ -e "$HOME/.nixpkgs/home.nix" ]]; then + configFile="$HOME/.nixpkgs/home.nix" + _iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \ + 'home.nix' "$HOME/.nixpkgs" "$hmConfigHome" >&2 fi - done - _i "No configuration file found. Please create one at %s" \ - "$defaultConfFile" >&2 - exit 1 + if [[ -v configFile ]]; then + HOME_MANAGER_CONFIG="$(realpath "$configFile")" + else + _i 'No configuration file found. Please create one at %s' \ + "$defaultConfFile" >&2 + exit 1 + fi + fi } function setHomeManagerNixPath() { - local path - for path in "@HOME_MANAGER_PATH@" \ - "${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home-manager" \ - "$HOME/.nixpkgs/home-manager" ; do + local path="@HOME_MANAGER_PATH@" + + if [[ -n "$path" ]] ; then if [[ -e "$path" || "$path" =~ ^https?:// ]] ; then EXTRA_NIX_PATH+=("home-manager=$path") return + else + _iWarn 'Home Manager not found at %s.' "$path" + fi + fi + + for p in "${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home-manager" \ + "$HOME/.nixpkgs/home-manager" ; do + if [[ -e "$p" ]] ; then + # translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. + _iWarn $'The fallback Home Manager path %s has been deprecated and a file/directory was found there.' \ + "$p" + # translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. + _i $'To remove this warning, do one of the fallowing. + +1. Explicitly tell Home Manager to use the path, for example by adding + + { programs.home-manager.path = "%s"; } + + to your configuration. + + If you import Home Manager directly, you can use the `path` parameter + + pkgs.callPackage /path/to/home-manager-package { path = "%s"; } + + when calling the Home Manager package. + +2. Remove the deprecated path. + + $ rm -r "%s"' "$p" "$p" "$p" fi done } +# Sets some useful Home Manager related paths as global read-only variables. +function setHomeManagerPathVariables() { + 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" + + declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}" + declare -r userNixStateDir="$stateHome/nix" + + declare -gr HM_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/home-manager" + declare -gr HM_STATE_DIR="$stateHome/home-manager" + declare -gr HM_GCROOT_LEGACY_PATH="$globalGcrootsDir/current-home" + + if [[ -d $userNixStateDir/profiles ]]; then + declare -gr HM_PROFILE_DIR="$userNixStateDir/profiles" + elif [[ -d $globalProfilesDir ]]; then + declare -gr HM_PROFILE_DIR="$globalProfilesDir" + else + _iError 'Could not find suitable profile directory, tried %s and %s' \ + "$HM_STATE_DIR/profiles" "$globalProfilesDir" >&2 + exit 1 + fi +} + function setFlakeAttribute() { - local configFlake="${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/flake.nix" - if [[ -z $FLAKE_ARG && ! -v HOME_MANAGER_CONFIG && -e "$configFlake" ]]; then - FLAKE_ARG="$(dirname "$(readlink -f "$configFlake")")" + if [[ -z $FLAKE_ARG && ! -v HOME_MANAGER_CONFIG ]]; then + local configHome="${XDG_CONFIG_HOME:-$HOME/.config}" + local hmConfigHome="$configHome/home-manager" + local nixpkgsConfigHome="$configHome/nixpkgs" + + local configFlake + + if [[ -e "$hmConfigHome/flake.nix" ]]; then + configFlake="$hmConfigHome/flake.nix" + elif [[ -e "$nixpkgsConfigHome/flake.nix" ]]; then + configFlake="$nixpkgsConfigHome/flake.nix" + _iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \ + 'flake.nix' "$nixpkgsConfigHome" "$hmConfigHome" >&2 + fi + + if [[ -v configFlake ]]; then + FLAKE_ARG="path:$(dirname "$(readlink -f "$configFlake")")" + fi fi if [[ -n "$FLAKE_ARG" ]]; then @@ -104,7 +203,7 @@ function setFlakeAttribute() { case $FLAKE_ARG in *#*) local name="${FLAKE_ARG#*#}" - ;; + ;; *) local name="$USER" # Check both long and short hostnames; long first to preserve @@ -117,7 +216,7 @@ function setFlakeAttribute() { fi fi done - ;; + ;; esac export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\"" fi @@ -126,6 +225,7 @@ function setFlakeAttribute() { function doInspectOption() { setFlakeAttribute if [[ -v FLAKE_CONFIG_URI ]]; then + # translators: Here "flake" is a noun that refers to the Nix Flakes feature. _iError "Can't inspect options of a flake configuration" exit 1 fi @@ -162,9 +262,227 @@ function doInspectOption() { "${PASSTHROUGH_OPTS[@]}" } +function doInit() { + # The directory where we should place the initial configuration. + local confDir + + # Whether we should immediate activate the configuration. + local switch + + # Whether we should create a flake file. + local withFlake + + if hasFlakeSupport; then + withFlake=1 + fi + + while (( $# > 0 )); do + local opt="$1" + shift + + case $opt in + --no-flake) + unset withFlake + ;; + --switch) + switch=1 + ;; + -*) + _iError "%s: unknown option '%s'" "$0" "$opt" >&2 + exit 1 + ;; + *) + if [[ -v confDir ]]; then + _i "Run '%s --help' for usage help" "$0" >&2 + exit 1 + else + confDir="$opt" + fi + ;; + esac + done + + if [[ ! -v confDir ]]; then + confDir="${XDG_CONFIG_HOME:-$HOME/.config}/home-manager" + fi + + if [[ ! -e $confDir ]]; then + mkdir -p "$confDir" + fi + + if [[ ! -d $confDir ]]; then + _iError "%s: unknown option '%s'" "$0" "$opt" >&2 + exit 1 + fi + + local confFile="$confDir/home.nix" + local flakeFile="$confDir/flake.nix" + + if [[ -e $confFile ]]; then + _i 'The file %s already exists, leaving it unchanged...' "$confFile" + else + _i 'Creating %s...' "$confFile" + local nl=$'\n' + local xdgVars="" + if [[ -v XDG_CACHE_HOME && $XDG_CACHE_HOME != "$HOME/.cache" ]]; then + xdgVars="$xdgVars xdg.cacheHome = \"$XDG_CACHE_HOME\";$nl" + fi + if [[ -v XDG_CONFIG_HOME && $XDG_CONFIG_HOME != "$HOME/.config" ]]; then + xdgVars="$xdgVars xdg.configHome = \"$XDG_CONFIG_HOME\";$nl" + fi + if [[ -v XDG_DATA_HOME && $XDG_DATA_HOME != "$HOME/.local/share" ]]; then + xdgVars="$xdgVars xdg.dataHome = \"$XDG_DATA_HOME\";$nl" + fi + if [[ -v XDG_STATE_HOME && $XDG_STATE_HOME != "$HOME/.local/state" ]]; then + xdgVars="$xdgVars xdg.stateHome = \"$XDG_STATE_HOME\";$nl" + fi + + mkdir -p "$confDir" + cat > "$confFile" < "$flakeFile" <&2 exit 1 fi @@ -221,13 +539,16 @@ function doBuildFlake() { "${PASSTHROUGH_OPTS[@]}" } -# Presents news to the user. Takes as argument the path to a "news -# info" file as generated by `buildNews`. +# Presents news to the user as specified by the `news.display` option. function presentNews() { - local infoFile="$1" + local newsNixFile="$WORK_DIR/news.nix" + buildNews "$newsNixFile" - # shellcheck source=/dev/null - . "$infoFile" + local newsDisplay + newsDisplay="$(nix-instantiate --eval --expr "(import ${newsNixFile}).meta.display" | xargs)" + + local newsNumUnread + newsNumUnread="$(nix-instantiate --eval --expr "(import ${newsNixFile}).meta.numUnread" | xargs)" # shellcheck disable=2154 if [[ $newsNumUnread -eq 0 ]]; then @@ -247,7 +568,7 @@ function presentNews() { echo $'\n'"$msg"$'\n' >&2 if [[ -v DISPLAY ]] && type -P notify-send > /dev/null; then - notify-send "Home Manager" "$msg" + notify-send "Home Manager" "$msg" > /dev/null 2>&1 || true fi elif [[ "$newsDisplay" == "show" ]]; then doShowNews --unread @@ -293,12 +614,9 @@ function doBuild() { ${NO_OUT_LINK+--no-out-link} \ --attr activationPackage \ || return - - local newsInfo - newsInfo=$(buildNews) - - presentNews "$newsInfo" fi + + presentNews } function doSwitch() { @@ -324,12 +642,9 @@ function doSwitch() { --out-link "$generation" \ --attr activationPackage \ && "$generation/activate" || return - - local newsInfo - newsInfo=$(buildNews) - - presentNews "$newsInfo" fi + + presentNews } function doListGens() { @@ -339,7 +654,7 @@ function doListGens() { color="always" fi - pushd "$NIX_STATE_DIR/profiles/per-user/$USER" > /dev/null + pushd "$HM_PROFILE_DIR" > /dev/null # shellcheck disable=2012 ls --color=$color -gG --time-style=long-iso --sort time home-manager-*-link \ | cut -d' ' -f 4- \ @@ -352,7 +667,7 @@ function doListGens() { function doRmGenerations() { setVerboseAndDryRun - pushd "$NIX_STATE_DIR/profiles/per-user/$USER" > /dev/null + pushd "$HM_PROFILE_DIR" > /dev/null for generationId in "$@"; do local linkName="home-manager-$generationId-link" @@ -370,17 +685,10 @@ function doRmGenerations() { popd > /dev/null } -function doRmAllGenerations() { - $DRY_RUN_CMD rm $VERBOSE_ARG \ - "$NIX_STATE_DIR/profiles/per-user/$USER/home-manager"* -} - function doExpireGenerations() { - local profileDir="$NIX_STATE_DIR/profiles/per-user/$USER" - local generations generations="$( \ - find "$profileDir" -name 'home-manager-*-link' -not -newermt "$1" \ + find "$HM_PROFILE_DIR" -name 'home-manager-*-link' -not -newermt "$1" \ | sed 's/^.*-\([0-9]*\)-link$/\1/' \ )" @@ -417,55 +725,88 @@ function newsReadIdsFile() { echo "$path" } -# Builds news meta information to be sourced into this script. +# Builds the Home Manager news data file. # # Note, we suppress build output to remove unnecessary verbosity. We # put the output in the work directory to avoid the risk of an # unfortunately timed GC removing it. function buildNews() { - local output - output="$WORK_DIR/news-info.sh" + local newsNixFile="$1" + local newsJsonFile="$WORK_DIR/news.json" - doBuildAttr \ - --out-link "$output" \ - --no-build-output \ - --quiet \ - --arg check false \ - --argstr newsReadIdsFile "$(newsReadIdsFile)" \ - --attr newsInfo \ - > /dev/null + if [[ -v FLAKE_CONFIG_URI ]]; then + # TODO: Use check=false to make it more likely that the build succeeds. + doBuildFlake \ + "$FLAKE_CONFIG_URI.config.news.json.output" \ + --quiet \ + --out-link "$newsJsonFile" \ + || return + else + doBuildAttr \ + --out-link "$newsJsonFile" \ + --arg check false \ + --attr config.news.json.output \ + > /dev/null \ + || return + fi - echo "$output" + local extraArgs=() + + for p in "${EXTRA_NIX_PATH[@]}"; do + extraArgs=("${extraArgs[@]}" "-I" "$p") + done + + local readIdsFile + readIdsFile=$(newsReadIdsFile) + + nix-instantiate \ + --no-build-output --strict \ + --eval '' \ + --arg newsJsonFile "$newsJsonFile" \ + --arg newsReadIdsFile "$readIdsFile" \ + "${extraArgs[@]}" \ + > "$newsNixFile" } function doShowNews() { setWorkDir + setFlakeAttribute - local infoFile - infoFile=$(buildNews) || return 1 + local newsNixFile="$WORK_DIR/news.nix" + buildNews "$newsNixFile" - # shellcheck source=/dev/null - . "$infoFile" + local readIdsFile + readIdsFile=$(newsReadIdsFile) - # shellcheck disable=2154 + local news + + # shellcheck disable=2154,2046 case $1 in --all) - ${PAGER:-less} "$newsFileAll" + news="$(nix-instantiate --quiet --eval --expr "(import ${newsNixFile}).news.all")" ;; --unread) - ${PAGER:-less} "$newsFileUnread" + news="$(nix-instantiate --quiet --eval --expr "(import ${newsNixFile}).news.unread")" ;; *) _i 'Unknown argument %s' "$1" return 1 esac - # shellcheck disable=2154 - if [[ -s "$newsUnreadIdsFile" ]]; then - local newsReadIdsFile - newsReadIdsFile="$(newsReadIdsFile)" - cat "$newsUnreadIdsFile" >> "$newsReadIdsFile" - fi + # Prints the news without surrounding quotes. + echo -e "${news:1:-1}" | ${PAGER:-less} + + local allIds + allIds="$(nix-instantiate --quiet --eval --expr "(import ${newsNixFile}).meta.ids")" + allIds="${allIds:1:-1}" # Trim surrounding quotes. + + local readIdsFileNew="$WORK_DIR/news-read-ids.new" + { + cat "$readIdsFile" + echo -e "$allIds" + } | sort | uniq > "$readIdsFileNew" + + mv -f "$readIdsFileNew" "$readIdsFile" } function doUninstall() { @@ -482,6 +823,7 @@ function doUninstall() { read -r -n 1 -p "$(_i 'Really uninstall Home Manager?') [y/n] " confirmation echo + # shellcheck disable=2086 case $confirmation in y|Y) _i "Switching to empty Home Manager configuration..." @@ -489,14 +831,27 @@ function doUninstall() { 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" - $DRY_RUN_CMD rm $VERBOSE_ARG -r \ - "${XDG_DATA_HOME:-$HOME/.local/share}/home-manager" - $DRY_RUN_CMD rm $VERBOSE_ARG \ - "$NIX_STATE_DIR/gcroots/per-user/$USER/current-home" + + 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 ;; *) _i "Yay!" @@ -504,22 +859,6 @@ function doUninstall() { ;; esac - local deleteProfiles - read -r -n 1 \ - -p "$(_i 'Remove all Home Manager generations?') [y/n] " \ - deleteProfiles - echo - - case $deleteProfiles in - y|Y) - doRmAllGenerations - _i 'All generations are now eligible for garbage collection.' - ;; - *) - _i 'Leaving generations but they may still be garbage collected.' - ;; - esac - _i "Home Manager is uninstalled but your home.nix is left untouched." } @@ -534,6 +873,7 @@ function doHelp() { echo " expression in the configuration file." echo " -I PATH Add a path to the Nix expression search path." echo " --flake flake-uri Use Home Manager configuration at flake-uri" + echo " Default is '~/.config/home-manager'." echo " -b EXT Move existing files to new path rather than fail." echo " -v Verbose output" echo " -n Do a dry run, only prints what actions would be taken" @@ -556,6 +896,7 @@ function doHelp() { echo " --no-out-link Do not create a symlink to the output path" echo " --no-write-lock-file" echo " --builders VALUE" + echo " --refresh Consider all previously downloaded files out-of-date" echo echo "Commands" echo @@ -568,6 +909,13 @@ function doHelp() { echo echo " build Build configuration into result directory" echo + echo " init [--switch] [DIR]" + echo " Initializes a configuration in the given directory. If the directory" + echo " does not exist, then it will be created. The default directory is" + echo " '~/.config/home-manager'." + echo + echo " --switch Immediately activate the generated configuration." + echo echo " instantiate Instantiate the configuration and print the resulting derivation" echo echo " switch Build and activate configuration" @@ -590,8 +938,6 @@ function doHelp() { echo " uninstall Remove Home Manager" } -readonly NIX_STATE_DIR="${NIX_STATE_DIR:-/nix/var/nix}" - EXTRA_NIX_PATH=() HOME_MANAGER_CONFIG_ATTRIBUTE="" PASSTHROUGH_OPTS=() @@ -599,13 +945,13 @@ COMMAND="" COMMAND_ARGS=() FLAKE_ARG="" -setHomeManagerNixPath +setHomeManagerPathVariables while [[ $# -gt 0 ]]; do opt="$1" shift case $opt in - build|instantiate|option|edit|expire-generations|generations|help|news|packages|remove-generations|switch|uninstall) + build|init|instantiate|option|edit|expire-generations|generations|help|news|packages|remove-generations|switch|uninstall) COMMAND="$opt" ;; -A) @@ -628,7 +974,7 @@ while [[ $# -gt 0 ]]; do FLAKE_ARG="$1" shift ;; - --recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file) + --recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file|--refresh) PASSTHROUGH_OPTS+=("$opt") ;; --update-input) @@ -676,12 +1022,12 @@ while [[ $# -gt 0 ]]; do export VERBOSE=1 ;; --version) - echo 22.11 + echo 23.11-pre exit 0 ;; *) case $COMMAND in - expire-generations|remove-generations|option) + init|expire-generations|remove-generations|option) COMMAND_ARGS+=("$opt") ;; *) @@ -694,6 +1040,8 @@ while [[ $# -gt 0 ]]; do esac done +setHomeManagerNixPath + if [[ -z $COMMAND ]]; then doHelp >&2 exit 1 @@ -706,6 +1054,9 @@ case $COMMAND in build) doBuild ;; + init) + doInit "${COMMAND_ARGS[@]}" + ;; instantiate) doInstantiate ;; diff --git a/third_party/home-manager/home-manager/home-manager.nix b/third_party/home-manager/home-manager/home-manager.nix index 6f2f4b6675..13a638fd8a 100644 --- a/third_party/home-manager/home-manager/home-manager.nix +++ b/third_party/home-manager/home-manager/home-manager.nix @@ -15,60 +15,4 @@ let check = check; }; - newsReadIds = if newsReadIdsFile == null then - { } - else - let ids = splitString "\n" (fileContents newsReadIdsFile); - in builtins.listToAttrs (map (id: { - name = id; - value = null; - }) ids); - - newsIsRead = entry: builtins.hasAttr entry.id newsReadIds; - - newsFiltered = let pred = entry: entry.condition && !newsIsRead entry; - in filter pred env.newsEntries; - - newsNumUnread = length newsFiltered; - - newsFileUnread = pkgs.writeText "news-unread.txt" (concatMapStringsSep "\n\n" - (entry: - let - time = - replaceStrings [ "T" ] [ " " ] (removeSuffix "+00:00" entry.time); - in '' - * ${time} - - ${replaceStrings [ "\n" ] [ "\n " ] entry.message} - '') newsFiltered); - - newsFileAll = pkgs.writeText "news-all.txt" (concatMapStringsSep "\n\n" - (entry: - let - flag = if newsIsRead entry then "read" else "unread"; - time = - replaceStrings [ "T" ] [ " " ] (removeSuffix "+00:00" entry.time); - in '' - * ${time} [${flag}] - - ${replaceStrings [ "\n" ] [ "\n " ] entry.message} - '') env.newsEntries); - - # File where each line corresponds to an unread news entry - # identifier. If non-empty then the file ends in "\n". - newsUnreadIdsFile = pkgs.writeText "news-unread-ids" - (let text = concatMapStringsSep "\n" (entry: entry.id) newsFiltered; - in text + optionalString (text != "") "\n"); - - newsInfo = pkgs.writeText "news-info.sh" '' - local newsNumUnread=${toString newsNumUnread} - local newsDisplay="${env.newsDisplay}" - local newsFileAll="${newsFileAll}" - local newsFileUnread="${newsFileUnread}" - local newsUnreadIdsFile="${newsUnreadIdsFile}" - ''; - -in { - inherit (env) activationPackage; - inherit newsInfo; -} +in { inherit (env) activationPackage config; } diff --git a/third_party/home-manager/home-manager/install.nix b/third_party/home-manager/home-manager/install.nix index f4bcbb3f6e..2dfef324e8 100644 --- a/third_party/home-manager/home-manager/install.nix +++ b/third_party/home-manager/home-manager/install.nix @@ -1,4 +1,4 @@ -{ home-manager, gettext, runCommand, ncurses }: +{ home-manager, runCommand }: let @@ -9,75 +9,10 @@ let ''; in runCommand "home-manager-install" { - propagatedBuildInputs = [ home-manager gettext ncurses ]; + propagatedBuildInputs = [ home-manager ]; preferLocalBuild = true; shellHookOnly = true; - shellHook = '' - ${hmBashLibInit} - - confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix" - - if [[ ! -e $confFile ]]; then - echo - _i "Creating initial Home Manager configuration..." - - nl=$'\n' - xdgVars="" - if [[ -v XDG_CACHE_HOME && $XDG_CACHE_HOME != "$HOME/.cache" ]]; then - xdgVars="$xdgVars xdg.cacheHome = \"$XDG_CACHE_HOME\";$nl" - fi - if [[ -v XDG_CONFIG_HOME && $XDG_CONFIG_HOME != "$HOME/.config" ]]; then - xdgVars="$xdgVars xdg.configHome = \"$XDG_CONFIG_HOME\";$nl" - fi - if [[ -v XDG_DATA_HOME && $XDG_DATA_HOME != "$HOME/.local/share" ]]; then - xdgVars="$xdgVars xdg.dataHome = \"$XDG_DATA_HOME\";$nl" - fi - if [[ -v XDG_STATE_HOME && $XDG_STATE_HOME != "$HOME/.local/state" ]]; then - xdgVars="$xdgVars xdg.stateHome = \"$XDG_STATE_HOME\";$nl" - fi - - mkdir -p "$(dirname "$confFile")" - cat > $confFile <\n" "Language-Team: Catalan \n" @@ -17,141 +17,93 @@ 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.13-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "No s'ha trobat cap fitxer de configuració a %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Mantenir el teu Home Manager %s a %s està obsolet,\n" +"si us plau mou-lo a %s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "No s'ha trobat cap fitxer de configuració. Si us plau, creeu un a %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"No s'ha pogut trobar un directori de perfils adequat, s'ha provat %s i %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 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:162 -msgid "Can't instantiate a flake configuration" -msgstr "No es pot instanciar una configuració flake" - -#: home-manager/home-manager:237 -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] "" -"Hi ha %d notícia rellevant no llegida.\n" -"Llegeix-la executant la comanda \"%s news\"." -msgstr[1] "" -"Hi han %d notícies rellevants no llegides.\n" -"Llegeix-les executant la comanda \"%s news\"." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Configuració \"news.display\" no reconeguda \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Si us plau, defineix la variable d'entorn $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Impossible executar la compilació en un directori només lectura" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "No existeix la generació amb ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Impossible eliminar la generació actual %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Eliminant la generació %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "No s'han trobat generacions a expirar" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Cap paquet home-manager sembla estar instal·lat." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Argument desconegut %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Home Manager serà esborrat del sistema." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Estàs segur que vols desinstal·lar Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Canviant a configuració buida de Home Manager..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Visca!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Eliminar totes les generacions de Home Manager?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" -"Totes les generacions són ara candidates per a la recol·lecció de brossa." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Deixant generacions, però aquestes encara poden ser esborrades pel recol·" -"lector de brossa." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%: opció desconeguda '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Executa '%s --help' per veure l'ajuda d'ús" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations espera un argument, obtinguts %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "El fitxer %s ja existeix, deixant sense modificar..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Comanda desconeguda: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Creant %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Creant configuració inicial de Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -168,7 +120,7 @@ msgstr "" "a veure totes les opcions disponibles." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -182,8 +134,117 @@ msgstr "" "\n" "si l'error sembla culpa de Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "No es pot instanciar una configuració flake" + +#: home-manager/home-manager:552 +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] "" +"Hi ha %d notícia rellevant no llegida.\n" +"Llegeix-la executant la comanda \"%s news\"." +msgstr[1] "" +"Hi han %d notícies rellevants no llegides.\n" +"Llegeix-les executant la comanda \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Configuració \"news.display\" no reconeguda \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Si us plau, defineix la variable d'entorn $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Impossible executar la compilació en un directori només lectura" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "No existeix la generació amb ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Impossible eliminar la generació actual %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Eliminant la generació %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "No s'han trobat generacions a expirar" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Cap paquet home-manager sembla estar instal·lat." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Argument desconegut %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Home Manager serà esborrat del sistema." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Això és un simulacre, res serà realment desinstal·lat." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Estàs segur que vols desinstal·lar Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Canviant a configuració buida de Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Visca!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" +"Home Manager ha estat desinstal·lat però el vostre home.nix es manté intacte." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations espera un argument, obtinguts %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Comanda desconeguda: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Aquesta derivació no es pot construir, si us plau executa-la utilitzant nix-" "shell." + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "" +#~ "Ho sentim, aquesta comanda encara no està suportada en la configuració de " +#~ "flake" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Creant configuració inicial de Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Eliminar totes les generacions de Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "" +#~ "Totes les generacions són ara candidates per a la recol·lecció de brossa." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Deixant generacions, però aquestes encara poden ser esborrades pel " +#~ "recol·lector de brossa." diff --git a/third_party/home-manager/home-manager/po/da.po b/third_party/home-manager/home-manager/po/da.po index aeda9100f0..572c904205 100644 --- a/third_party/home-manager/home-manager/po/da.po +++ b/third_party/home-manager/home-manager/po/da.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-09-19 18:22+0000\n" "Last-Translator: cafkafk \n" "Language-Team: Danish \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-08-02 20:04+0000\n" +"Last-Translator: JonathanB \n" "Language-Team: German \n" "Language: de\n" @@ -17,140 +17,94 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.14-dev\n" +"X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Keine Konfigurationsdatei unter %s gefunden" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Das Beibehalten Ihres Home Manager %s in %s ist veraltet.\n" +"Bitte verschieben Sie es nach %s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Keine Konfigurationsdatei gefunden. Bitte erstellen Sie eine unter %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "Home Manager nicht gefunden unter %s." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"Es konnte kein passendes Profilverzeichnis gefunden werden, %s und %s wurden " +"versucht" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Die Optionen einer Flake-Konfiguration können nicht inspiziert werden" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Kann eine Flake-Konfiguration nicht instanziieren" - -#: home-manager/home-manager:237 -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] "" -"Es gibt eine ungelesene und relevante Nachricht.\n" -"Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen." -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Unbekannte \"news.display\" Einstellung \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Bitte legen Sie die $EDITOR Variable fest" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Build kann nicht im schreibgeschützten Ordner ausgeführt werden" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Keine Generation mit ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Die jetzige Generation %s kann nicht entfernt werden" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Entferne Generation %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Keine ablaufenden Generationen" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Es scheint, als ob keine Home Manager Pakete installiert sind." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Unbekannte Argumente %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Dies wird Home Manager von Ihrem System entfernen." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Möchten Sie wirklich Home Manager deinstallieren?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Wechsle zu einer leeren Home Manager Konfiguration..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Juhu!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Entferne alle Home Manager Generationen?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Alle Generationen kommen nun für die Garbage Collection in Frage." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Ignoriere Generationen, aber diese könnten immer noch mittels des Garbage " -"Collectors aufgeräumt werden." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: unbekannte Option '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Führe '%s --help' aus, um Hilfe zur Verwendung zu erhalten" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations erwartet ein Argument, hat aber %d erhalten." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Die Datei %s existiert bereits, sie bleibt unverändert..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Unbekannter Befehl: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Erstelle %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Erstelle initiale Home Manager Konfiguration..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -168,7 +122,7 @@ msgstr "" "sehen." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -182,7 +136,113 @@ msgstr "" "\n" "falls der Fehler auf Home Manager zurückzuführen ist." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Kann eine Flake-Konfiguration nicht instanziieren" + +#: home-manager/home-manager:552 +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] "" +"Es gibt eine ungelesene und relevante Nachricht.\n" +"Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen." +msgstr[1] "" +"Es gibt %d ungelesene und relevante Nachrichten.\n" +"Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Unbekannte \"news.display\" Einstellung \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Bitte legen Sie die $EDITOR Variable fest" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Build kann nicht im schreibgeschützten Ordner ausgeführt werden" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Keine Generation mit ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Die jetzige Generation %s kann nicht entfernt werden" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Entferne Generation %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Keine ablaufenden Generationen" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Es scheint, als ob keine Home Manager Pakete installiert sind." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Unbekannte Argumente %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Dies wird Home Manager von Ihrem System entfernen." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Dies ist ein Probelauf, es wird nichts vom System deinstalliert." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Möchten Sie wirklich Home Manager deinstallieren?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Wechsle zu einer leeren Home Manager Konfiguration..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Juhu!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" +"Home Manager ist installiert, aber Ihre home.nix Datei bleibt unberührt." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations erwartet ein Argument, hat aber %d erhalten." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Unbekannter Befehl: %s" + +#: home-manager/install.nix:18 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." + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "Dieser Befehl wird im Flake-Setup leider noch nicht unterstützt" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Erstelle initiale Home Manager Konfiguration..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Entferne alle Home Manager Generationen?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Alle Generationen kommen nun für die Garbage Collection in Frage." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Ignoriere Generationen, aber diese könnten immer noch mittels des Garbage " +#~ "Collectors aufgeräumt werden." diff --git a/third_party/home-manager/home-manager/po/es.po b/third_party/home-manager/home-manager/po/es.po index 95f2fea382..45e0241760 100644 --- a/third_party/home-manager/home-manager/po/es.po +++ b/third_party/home-manager/home-manager/po/es.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-01-11 21:45+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" "Language: es\n" @@ -17,139 +17,114 @@ 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.10.1\n" +"X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Archivo de configuración no encontrado en %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Mantener tu Home Manager %s en %s está obsoleto,\n" +"por favor muévalo a %s" + +#: home-manager/home-manager:99 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:114 +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:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"La ruta alternativa de Home Manager %s ha quedado obsoleta y se encontró un " +"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:125 +msgid "" +"To remove this warning, do one of the fallowing.\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 "" +"Para eliminar esta advertencia, realiza una de las siguientes acciones.\n" +"\n" +"1. Indica explícitamente a Home Manager que utilice la ruta, por ejemplo " +"añadiendo\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" a tu configuración.\n" +"\n" +" Si importa Home Manager directamente, puede utilizar el parámetro `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" al llamar al paquete Home Manager.\n" +"\n" +"2. Elimina la ruta obsoleta.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:164 +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:219 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:162 -msgid "Can't instantiate a flake configuration" -msgstr "No se pudo instanciar una configuración flake" - -#: home-manager/home-manager:237 -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] "" -"Hay %d noticia relevante no leída.\n" -"Léala ejecutando el comando \"%s news\"." -msgstr[1] "" -"Hay %d noticias relevantes no leídas.\n" -"Léalas ejecutando el comando \"%s news\"." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Configuración \"news.display\" no reconocida \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Defina la variable de ambiente $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "No se puede ejecutar en un directorio de sólo lectura" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "No existe la generación con ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "No se pudo borrar la generación actual %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Borrando generación %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "No se encontraron generaciones para expirar" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "No se encontró ningún paquete home-manager instalado." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Argumento desconocido %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Home Manager será borrado del sistema." - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "Este es un simulacro, nada será realmente desinstalado." - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "Desinstalar Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Cambiando a configuración vacía de Home Manager..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Bien!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Borrar todas las generaciones de Home Manager?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Ahora todas las generaciones son aptas para recolección de basura." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Dejando generaciones aunque podrían aún ser borradas por el recolector de " -"basura." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: opción desconocida '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Ejecute '%s --help' para ver ayuda" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations espera un argumento pero se dieron %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "El fichero %s ya existe, dejándolo sin modificar..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Comando desconocido %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Creando %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Creando configuración inicial de Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -166,7 +141,7 @@ msgstr "" "ver todas las opciones disponibles." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -180,6 +155,113 @@ msgstr "" "\n" "si el error parecer ser culpa de Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "No se pudo instanciar una configuración flake" + +#: home-manager/home-manager:552 +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] "" +"Hay %d noticia relevante no leída.\n" +"Léala ejecutando el comando \"%s news\"." +msgstr[1] "" +"Hay %d noticias relevantes no leídas.\n" +"Léalas ejecutando el comando \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Configuración \"news.display\" no reconocida \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Defina la variable de ambiente $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "No se puede ejecutar en un directorio de sólo lectura" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "No existe la generación con ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "No se pudo borrar la generación actual %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Borrando generación %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "No se encontraron generaciones para expirar" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "No se encontró ningún paquete home-manager instalado." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Argumento desconocido %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Home Manager será borrado del sistema." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Este es un simulacro, nada será realmente desinstalado." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Desinstalar Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Cambiando a configuración vacía de Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Bien!" + +#: home-manager/home-manager:851 +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:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations espera un argumento pero se dieron %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Comando desconocido %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Esta derivación no se puede construir, ejecute con nix-shell." + +#~ 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 " +#~ "flake" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Creando configuración inicial de Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Borrar todas las generaciones de Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Ahora todas las generaciones son aptas para recolección de basura." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Dejando generaciones aunque podrían aún ser borradas por el recolector de " +#~ "basura." diff --git a/third_party/home-manager/home-manager/po/fa.po b/third_party/home-manager/home-manager/po/fa.po index d7791d649a..7d74cac2d4 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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-04-09 18:11+0000\n" -"Last-Translator: Artin Mobasher \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-28 22:49+0000\n" +"Last-Translator: Mohammad Abdolirad \n" "Language-Team: Persian \n" "Language: fa\n" @@ -17,134 +17,90 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "هیچ فایل تنظیماتی در %s پیدا نشد" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "هیچ فایل تنظیماتی پیدا نشد. لطفا یک فایل در %s بسازید" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "" - -#: home-manager/home-manager:237 -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "" - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "" - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "" - -#: home-manager/home-manager:493 -#, fuzzy -msgid "Yay!" -msgstr "آره!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "" - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "" +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "فایل %s از قبل وجود داشته است، بدون تغییر رها شد..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "دستور ناشناخته: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "ساختن %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "ایجاد تنظیمات اولیه Home-Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -155,7 +111,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -164,6 +120,94 @@ msgid "" "if the error seems to be the fault of Home Manager." msgstr "" -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:552 +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "لطفا متغیر محیطی $EDITOR را مقدار دهی کنید" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "نمی‌توان نسل فعلی %s را حذف کرد" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "حذف کردن نسل %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "واقعاً هوم منیجر را حذف نصب کنید؟" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:846 +#, fuzzy +msgid "Yay!" +msgstr "آره!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "هوم منیجر حذف نصب شد اما home.nix شما دست نخورده باقی ماند." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "دستور ناشناخته: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" + +#~ 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 be0ae0a6f5..60c56b1337 100644 --- a/third_party/home-manager/home-manager/po/fi.po +++ b/third_party/home-manager/home-manager/po/fi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,131 +17,88 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "" - -#: home-manager/home-manager:237 -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "" - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "" - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "" - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "" - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:730 -msgid "Unknown command: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." msgstr "" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "" - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -152,7 +109,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -161,6 +118,90 @@ msgid "" "if the error seems to be the fault of Home Manager." msgstr "" -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:552 +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1085 +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/fr.po b/third_party/home-manager/home-manager/po/fr.po index 5a129e9d24..141a179fee 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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2021-12-19 16:51+0000\n" -"Last-Translator: TheBlackBeans \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-17 07:49+0000\n" +"Last-Translator: Pink Pony \n" "Language-Team: French \n" "Language: fr\n" @@ -17,143 +17,94 @@ 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.10\n" +"X-Generator: Weblate 4.18.1\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Aucun fichier de configuration trouvé à l'emplacement %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Garder votre Home Manager %s dans %s est obsolète,\n" +"Veuillez le déplacer à % s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "" "Aucun fichier de configuration trouvé. Veuillez en créer un à l'emplacement " "%s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Impossible de trouver le dossier de profil approprié, essayé %s et %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Impossible d'inspecter les options d'une configuration en flocons" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Impossible d'instancier une configuration flake" - -#: home-manager/home-manager:237 -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] "" -"Il y a %d nouvel élément non lu et pertinent.\n" -"Vous pouvez le lire en exécutant la commande \"%s news\"." -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Configuration \"news.display\" iconnue \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Veuillez définir la variable d'environnement $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Impossible de lancer une compilation dans un dossier en écriture seule" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Aucune génération avec l'identifiant %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Impossible de supprimer la génération courante %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Suppression de la génération %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Aucune génération expirée" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Aucun paquet home-manager ne semble être installé." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Aucun argument %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Cela va supprimer Home Manager de votre système." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Voulez-vous vraiment désinstaller Home Manager ?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Changement vers une configuration vierge de Home Manager..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Yay !" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Supprimer toutes les générations de Home Manager ?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" -"Toutes les générations sont maintenant éligibles pour la collecte des " -"ordures." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Les générations sortantes mais elles peuvent encore être collectées par les " -"ordures." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s : option inconnue « %s »" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Exécuter « %s --help » pour de l'aide sur l'utilisation" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations attend un argument, a obtenu %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Le fichier %s existe déjà, il sera laissé inchangé..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Commande inconnue : %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Création de %s ..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Création de la configuration initiale de Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -171,7 +122,7 @@ msgstr "" "essayez 'man home-configuration.nix'." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -186,6 +137,115 @@ msgstr "" "\n" "si l'erreur semble être liée à Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Impossible d'instancier une configuration flake" + +#: home-manager/home-manager:552 +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] "" +"Il y a %d nouvel élément non lu et pertinent.\n" +"Vous pouvez le lire en exécutant la commande \"%s news\"." +msgstr[1] "" +"Il y a %d nouveaux éléments non lus et pertinents.\n" +"Vous pouvez les lire en exécutant la commande \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Configuration \"news.display\" iconnue \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Veuillez définir la variable d'environnement $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Impossible de lancer une compilation dans un dossier en écriture seule" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Aucune génération avec l'identifiant %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Impossible de supprimer la génération courante %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Suppression de la génération %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Aucune génération expirée" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Aucun paquet home-manager ne semble être installé." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Aucun argument %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Cela va supprimer Home Manager de votre système." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "C'est un essai, rien ne sera réellement désinstallé." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Voulez-vous vraiment désinstaller Home Manager ?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Changement vers une configuration vierge de Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Yay !" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager est désinstallé mais votre home.nix reste intact." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations attend un argument, a obtenu %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Commande inconnue : %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "Cette dérivation ne peut être construite, essayez avec nix-shell." + +#~ 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 " +#~ "configuration du flake" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Création de la configuration initiale de Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Supprimer toutes les générations de Home Manager ?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "" +#~ "Toutes les générations sont maintenant éligibles pour la collecte des " +#~ "ordures." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Les générations sortantes mais elles peuvent encore être collectées par " +#~ "les ordures." 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 003a344b0e..df8aaf283d 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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,131 +18,88 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "" - -#: home-manager/home-manager:237 -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "" - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "" - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "" - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "" - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "" - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "" - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:730 -msgid "Unknown command: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." msgstr "" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "" - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -153,7 +110,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -162,6 +119,90 @@ msgid "" "if the error seems to be the fault of Home Manager." msgstr "" -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:552 +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1085 +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/id.po b/third_party/home-manager/home-manager/po/id.po new file mode 100644 index 0000000000..6ecec508a8 --- /dev/null +++ b/third_party/home-manager/home-manager/po/id.po @@ -0,0 +1,215 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"Last-Translator: Reza Almanda \n" +"Language-Team: Indonesian \n" +"Language: id\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 5.0-dev\n" + +#: home-manager/home-manager:71 +msgid "No configuration file found at %s" +msgstr "Tidak ada file konfigurasi yang ditemukan di %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Mempertahankan Pengelola Beranda Anda %s di %s tidak digunakan lagi,\n" +"tolong pindahkan ke %s" + +#: home-manager/home-manager:99 +msgid "No configuration file found. Please create one at %s" +msgstr "Tidak ada file konfigurasi yang ditemukan. Silakan buat di %s" + +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "Home Manager tidak ditemukan di %s." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Path fallback Home Manager %s sudah tidak digunakan lagi dan file/direktori " +"ditemukan di sana." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Tidak dapat menemukan direktori profil yang sesuai, mencoba %s dan %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 +msgid "Can't inspect options of a flake configuration" +msgstr "Tidak dapat memeriksa opsi konfigurasi flake" + +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 +msgid "%s: unknown option '%s'" +msgstr "%s: opsi tidak diketahui '%s'" + +#: home-manager/home-manager:286 home-manager/home-manager:1024 +msgid "Run '%s --help' for usage help" +msgstr "Jalankan '%s --help' untuk bantuan penggunaan" + +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Membuat %s..." + +#: home-manager/home-manager:455 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:460 +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:465 +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:476 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:552 +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "" + +#: home-manager/home-manager:588 +#, fuzzy +msgid "Cannot run build in read-only directory" +msgstr "Tidak dapat menjalankan build di direktori read-only" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Tidak ada generasi dengan ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Menghapus generasi %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Yey!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" +"Derivasi ini tidak dapat dibangun, silakan jalankan menggunakan nix-shell." diff --git a/third_party/home-manager/home-manager/po/it.po b/third_party/home-manager/home-manager/po/it.po index 610762624c..bd68151c11 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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-04-20 18:18+0000\n" -"Last-Translator: Frankie McEyes \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-04-11 20:41+0000\n" +"Last-Translator: Robert Helgesson \n" "Language-Team: Italian \n" "Language: it\n" @@ -17,137 +17,90 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.17-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Nessun file di configurazione trovato in %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Nessun file di configurazione trovato. Per favore crearne uno in %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Impossibile ispezionare le opzioni di configurazione flake" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Impossibile istanziare una configurazione flake" - -#: home-manager/home-manager:237 -msgid "" -"There is %d unread and relevant news item.\n" -"Read it by running the command \"%s news\"." -msgid_plural "" -"There are %d unread and relevant news items.\n" -"Read them by running the command \"%s news\"." -msgstr[0] "" -"C'è %d novità di elementi non letta.\n" -"Leggila con il comando \"%s news\"." -msgstr[1] "" -"Ci sono %d novità di elementi non letti\n" -"Leggile con il comando \"%s news\"." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Opzione \"news.display\" sconosciuta \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Per favore impostare la variabile d'ambient $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Impossibile eseguire la build in una cartella in sola lettura" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Nessuna generazione con ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Impossibile rimuovere la generazione corrente %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Rimuovo la generazione %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Nessuna generazione in scadenza" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Nessun pacchetto home-manager sembra essere installato." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Argomento sconosciuto: %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Questo rimuoverà Home Manger dal tuo sistema." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Vuoi davvero disinstallare Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Cambio ad una configurazione Home Manager vuota..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Urrà!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Rimuovere tutte le generazioni Home Manager?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Tutte le generazioni sono ora pronte per essere cestinate." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "Abbandono le generazioni, ma possono essere ancora cestinate." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: opzione sconosciuta '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Esegui '%s --help' per ottenere aiuto" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations si aspetta un solo argomento, invece di %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Il file %s è già esistente, non verrà modificato..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Comando sconosciuto: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Creando la configurazione iniziale di Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -164,7 +117,7 @@ msgstr "" "consultare tutte le opzioni disponibili." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -179,7 +132,107 @@ msgstr "" "\n" "se l'errore sembra essere causato da Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Impossibile istanziare una configurazione flake" + +#: home-manager/home-manager:552 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"C'è %d novità di elementi non letta.\n" +"Leggila con il comando \"%s news\"." +msgstr[1] "" +"Ci sono %d novità di elementi non letti\n" +"Leggile con il comando \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Opzione \"news.display\" sconosciuta \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Per favore impostare la variabile d'ambient $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Impossibile eseguire la build in una cartella in sola lettura" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Nessuna generazione con ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Impossibile rimuovere la generazione corrente %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Rimuovo la generazione %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Nessuna generazione in scadenza" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Nessun pacchetto home-manager sembra essere installato." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Argomento sconosciuto: %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Questo rimuoverà Home Manger dal tuo sistema." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Questo è un avvio a secco, nulla verrà realmente disinstallato." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Vuoi davvero disinstallare Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Cambio ad una configurazione Home Manager vuota..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Urrà!" + +#: home-manager/home-manager:851 +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:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations si aspetta un solo argomento, invece di %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Comando sconosciuto: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Questa derivazione non è compilabile, prova ad eseguila usando nix-shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Creando la configurazione iniziale di Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Rimuovere tutte le generazioni Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Tutte le generazioni sono ora pronte per essere cestinate." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "Abbandono le generazioni, ma possono essere ancora cestinate." diff --git a/third_party/home-manager/home-manager/po/ja.po b/third_party/home-manager/home-manager/po/ja.po index 869b629492..605cebf335 100644 --- a/third_party/home-manager/home-manager/po/ja.po +++ b/third_party/home-manager/home-manager/po/ja.po @@ -7,10 +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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-07-02 02:18+0000\n" -"Last-Translator: OKA, NETSURFER AND OBSERVER, FRONTEND, DEVELOPER " -"(DOTFILES,OSINT,OSS), KEYBASE: (3B0E8E0895DAC8B8) \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-12 10:49+0000\n" +"Last-Translator: Jeff Ames \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -18,25 +17,131 @@ 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.13.1-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "%s に設定ファイルが見つかりません" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Home Managerの %s の %s への保管は非推奨となりました\n" +"%s へ移動させてください" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "設定ファイルがありません。ファイルを %s に作ってください" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"適切なプロファイル ディレクトリが見つかりませんでした。%s と %s を試しました" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "flake設定のオプションを検査できません" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "flake設定をインスタンス化できません" +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 +msgid "%s: unknown option '%s'" +msgstr "%s: 不明なオプション '%s'" -#: home-manager/home-manager:237 +#: home-manager/home-manager:286 home-manager/home-manager:1024 +msgid "Run '%s --help' for usage help" +msgstr "'%s --help' でヘルプを参照することができます" + +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "%s は既に存在します。変更せずに続行しています..." + +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "%s を作成中です..." + +#: home-manager/home-manager:455 +msgid "Creating initial Home Manager generation..." +msgstr "Home Managerの世代を初期化しています..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:460 +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 "" +"全てが完了しました! 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:465 +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 "" +"おっと、インストールに失敗しました!このエラーがHome Managerの欠陥によって生" +"じたと考えられる場合は、\n" +"\n" +" %s\n" +"\n" +"というissueを立ててください。" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "flake設定を初期化できません" + +#: home-manager/home-manager:552 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -47,141 +152,96 @@ msgstr[0] "" "未読のお知らせが%d件あります。\n" "\"%s news\"コマンドで確認できます。" -#: home-manager/home-manager:251 +#: home-manager/home-manager:566 msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "知らない\"news.display\"設定\"%s\"." +msgstr "\"news.display\"に\"%s\"という設定は存在しません。" -#: home-manager/home-manager:258 +#: home-manager/home-manager:573 #, sh-format msgid "Please set the $EDITOR environment variable" msgstr "$EDITOR環境変数を設定してください" -#: home-manager/home-manager:273 +#: home-manager/home-manager:588 msgid "Cannot run build in read-only directory" msgstr "読み込み専用ディレクトリ内ではbuild(作成)できません" -#: home-manager/home-manager:355 +#: home-manager/home-manager:666 msgid "No generation with ID %s" msgstr "ID %s を持つ世代はありません" -#: home-manager/home-manager:357 +#: home-manager/home-manager:668 msgid "Cannot remove the current generation %s" msgstr "現在使用中の世代 %s は削除できません" -#: home-manager/home-manager:359 +#: home-manager/home-manager:670 msgid "Removing generation %s" msgstr "世代 %s を削除中です" -#: home-manager/home-manager:385 +#: home-manager/home-manager:689 msgid "No generations to expire" -msgstr "期限切れで削除する世代はありません" +msgstr "期限切れで削除される世代はありません" -#: home-manager/home-manager:396 +#: home-manager/home-manager:700 msgid "No home-manager packages seem to be installed." -msgstr "home-managerパッケージはインストールされていないようです。" +msgstr "home-managerパッケージがインストールされていないようです。" -#: home-manager/home-manager:453 +#: home-manager/home-manager:781 msgid "Unknown argument %s" msgstr "不明な引数 %s" -#: home-manager/home-manager:469 +#: home-manager/home-manager:805 msgid "This will remove Home Manager from your system." -msgstr "これはシステムからHome Managerを削除します。" +msgstr "この操作によってHome Managerはシステムから削除されます。" -#: home-manager/home-manager:472 +#: home-manager/home-manager:808 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "これはdry run (予行練習)で、実際にはアンインストールは行われません。" -#: home-manager/home-manager:476 +#: home-manager/home-manager:812 msgid "Really uninstall Home Manager?" msgstr "本当にHome Managerをアンインストールしますか?" -#: home-manager/home-manager:481 +#: home-manager/home-manager:818 msgid "Switching to empty Home Manager configuration..." -msgstr "空のHome Managerの設定に切り替え中です..." +msgstr "空のHome Managerの設定に切り替えています..." -#: home-manager/home-manager:493 +#: home-manager/home-manager:846 msgid "Yay!" msgstr "イェイ!" -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Home-managerの全ての世代を削除しますか?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "全ての世代がガベージコレクションの対象になりました。" - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"世代を残していますが、それらはガベージコレクションで回収されるかもしれませ" -"ん。" - -#: home-manager/home-manager:514 +#: home-manager/home-manager:851 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" "Home Managerはアンインストールされましたが、home.nixはそのまま残してありま" "す。" -#: home-manager/home-manager:673 -msgid "%s: unknown option '%s'" -msgstr "%s: 不明なオプション '%s'" - -#: home-manager/home-manager:674 -msgid "Run '%s --help' for usage help" -msgstr "利用方法のヘルプは'%s --help' を実行してください" - -#: home-manager/home-manager:708 +#: home-manager/home-manager:1063 msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations は一つの引数を期待しますが、%d が与えられました。" +msgstr "" +"expire-generations は一つしか引数を取らないところ、%d 個が与えられました。" -#: home-manager/home-manager:730 +#: home-manager/home-manager:1085 msgid "Unknown command: %s" msgstr "不明なコマンド: %s" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Home Managerの初期設定を生成しています..." - -#: home-manager/install.nix:66 -msgid "Creating initial Home Manager generation..." -msgstr "Home Managerの最初の世代を生成しています..." - -#. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 -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 "" -"全て実行しました! 現在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/install.nix:76 -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 "" -"うあ、インストールに失敗しました!もしこのエラーがHome Managerの欠陥のせいで" -"生じたようなら、\n" -"\n" -" %s\n" -"\n" -"というissueを立ててください。" - -#: home-manager/install.nix:83 +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." -msgstr "この派生はビルドできませんので、nix-shellを使って実行してください。" +msgstr "この派生はビルドできません。nix-shellを使って実行してください。" + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "" +#~ "申し訳ありませんが、このコマンドはflake設定ではまだ対応されていません" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Home Managerの設定を初期化しています..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Home-managerの全ての世代を削除しますか?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "全ての世代がガベージコレクションの対象になりました。" + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "世代を残すようにしますが、やはりガベージコレクションで回収されるかもしれま" +#~ "せん。" diff --git a/third_party/home-manager/home-manager/po/ko.po b/third_party/home-manager/home-manager/po/ko.po index 2dfe7e49aa..6c1f9877da 100644 --- a/third_party/home-manager/home-manager/po/ko.po +++ b/third_party/home-manager/home-manager/po/ko.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-01-30 21:50+0000\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-08-03 05:07+0000\n" "Last-Translator: 박수원 \n" "Language-Team: Korean \n" @@ -17,138 +17,111 @@ 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.11-dev\n" +"X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "%s에서 설정 파일을 찾을 수 없음" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +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:99 msgid "No configuration file found. Please create one at %s" msgstr "설정 파일을 찾을 수 없음. %s에 설정 파일을 생성하십시오" +#: home-manager/home-manager:114 +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:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +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:125 +msgid "" +"To remove this warning, do one of the fallowing.\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 "" +"이 경고를 제거하려면, 다음 항목 중 한가지를 하십시오.\n" +"\n" +"1. 홈 매니저에게 명시적으로 경로를 사용하도록 설정합니다.\n" +"\n" +"예를들어, 다음을 설정에 추가하십시오.\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +"\n" +" 만약 직접 홈 매니저를 import하면, 홈 매니저 패키지를 호출할 때 다음과 " +"같이 `path` 파라미터를 사용할 수 있습니다. \n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" \n" +"2. 더이상 사용하지 않는 경로를 지우십시오.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "%s와 %s를 시도했지만, 적합한 프로파일 디렉토리를 찾을 수 없습니다" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "flake 설정의 옵션들을 검사할 수 없음" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "flake 설정을 인스턴스화 할 수 없음" - -#: home-manager/home-manager:237 -msgid "" -"There is %d unread and relevant news item.\n" -"Read it by running the command \"%s news\"." -msgid_plural "" -"There are %d unread and relevant news items.\n" -"Read them by running the command \"%s news\"." -msgstr[0] "" -"읽지 않은 관련된 뉴스 항목들이 %d 개 있습니다.\n" -"\"%s news\" 명령어를 실행해 읽어보십시오." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "알 수 없는 \"news.display\"의 설정 \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "환경변수 $EDITOR를 설정하십시오" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "읽기전용 폴더에서 빌드를 실행할 수 없습니다" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "ID %s를 갖는 세대가 존재하지 않음" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "현재 세대인 %s를 삭제할 수 없음" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "%s 세대를 삭제하는 중" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "유효 기간이 지난 세대가 없음" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "홈 매니저 패키지들이 설치되지 않은 것으로 보입니다." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "알 수 없는 매개변수 %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "시스템에서 홈 매니저를 삭제할 것입니다." - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "모의 실행 중으로, 아무것도 실제로 설치되지 않습니다." - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "정말로 홈 매니저를 삭제할까요?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "빈 홈 매니저 설정으로 바꾸는 중..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "야호!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "모든 홈 매니저 세대를 지울까요?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "이제 모든 세대가 쓰레기 수집(가비지 컬렉션)의 대상이 됩니다." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"세대들을 그대로 놔두지만 그들은 여전히 쓰레기 수집(가비지 컬렉션) 될 수 있습" -"니다." - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "홈 매니저는 삭제되지만 home.nix 파일은 남겨집니다." - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: 알 수 없는 옵션 '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "도움말을 보려면 '%s --help'를 실행하십시오" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "" -"expire-generations 명령어는 매개변수가 한 개 필요한데, %d 개가 입력되었습니" -"다." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "%s 파일은 이미 존재하므로, 수정하지 않음..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "알 수 없는 명령어: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "%s를 생성하는 중..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "최초의 홈 매니저 설정을 생성하는 중..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." msgstr "최초의 홈 매니저 세대를 생성하는 중..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -166,7 +139,7 @@ msgstr "" "실행해서 가능한 모든 옵션을 살펴보십시오." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -180,7 +153,111 @@ msgstr "" "\n" "위 사이트에서 이슈를 생성하십시오." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "flake 설정을 인스턴스화 할 수 없음" + +#: home-manager/home-manager:552 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"읽지 않은 관련된 뉴스 항목들이 %d 개 있습니다.\n" +"\"%s news\" 명령어를 실행해 읽어보십시오." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "알 수 없는 \"news.display\"의 설정 \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "환경변수 $EDITOR를 설정하십시오" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "읽기전용 폴더에서 빌드를 실행할 수 없습니다" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "ID %s를 갖는 세대가 존재하지 않음" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "현재 세대인 %s를 삭제할 수 없음" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "%s 세대를 삭제하는 중" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "유효 기간이 지난 세대가 없음" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "홈 매니저 패키지들이 설치되지 않은 것으로 보입니다." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "알 수 없는 매개변수 %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "시스템에서 홈 매니저를 삭제할 것입니다." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "모의 실행 중으로, 아무것도 실제로 설치되지 않습니다." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "정말로 홈 매니저를 삭제할까요?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "빈 홈 매니저 설정으로 바꾸는 중..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "야호!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "홈 매니저는 삭제되지만 home.nix 파일은 남겨집니다." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" +"expire-generations 명령어는 매개변수가 한 개 필요한데, %d 개가 입력되었습니" +"다." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "알 수 없는 명령어: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "이 derivation은 빌드 할 수 없습니다. nix-shell을 이용해서 실행해 주십시오." + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "죄송합니다만, 이 명령어는 아직 flake 환경에서 지원되지 않습니다" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "최초의 홈 매니저 설정을 생성하는 중..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "모든 홈 매니저 세대를 지울까요?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "이제 모든 세대가 쓰레기 수집(가비지 컬렉션)의 대상이 됩니다." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "세대들을 그대로 놔두지만 그들은 여전히 쓰레기 수집(가비지 컬렉션) 될 수 있" +#~ "습니다." diff --git a/third_party/home-manager/home-manager/po/lt.po b/third_party/home-manager/home-manager/po/lt.po index 52b3cab63b..6b8bbd939e 100644 --- a/third_party/home-manager/home-manager/po/lt.po +++ b/third_party/home-manager/home-manager/po/lt.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2023-01-09 11:33+0000\n" "Last-Translator: Kornelijus Tvarijanavičius \n" "Language-Team: Lithuanian \n" -"Language-Team: Norwegian Bokmål \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-03-08 07:22+0000\n" +"Last-Translator: \"Kim A. Ødegaard\" \n" +"Language-Team: Norwegian Bokmål \n" "Language: nb_NO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.15.1-dev\n" +"X-Generator: Weblate 4.16.2-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Fant ingen oppsettsfil i %s" -#: home-manager/home-manager:79 -msgid "No configuration file found. Please create one at %s" -msgstr "Fant ikke noenoppsettsfil. Opprett en i %s" +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +#: home-manager/home-manager:99 +msgid "No configuration file found. Please create one at %s" +msgstr "Fant ikke noen oppsettsfil. Opprett en i %s" + +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Kan ikke inspisere alternativer for et flake-oppsett" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Kan ikke igangsette flak-oppsett" - -#: home-manager/home-manager:237 -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] "" -"Det er %d ulest og relevant nyhetselement.\n" -"Les det ved å kjøre kommandoen «%s news»." -msgstr[1] "" -"Det er %d uleste og relevant nyhetselementer.\n" -"Les det ved å kjøre kommandoen «%s news»." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Ukjent «news.display»-innstilling «%s»." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Sett «$EDITOR»-miljøvariabelen" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Kan ikke kjøre bygg i skrivebeskyttet mappe" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Ingen generering med ID-en %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Kan ikke fjerne nåværende generering %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Fjerner generering %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Ingen genereringer til utløp" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Ingen «home-manager»-pakker ser ut til å være installert." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Ukjent argument %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Dette vil fjerne Home Manager fra systemet ditt." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Vil du avinstallere Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Bytter til tomt Home Manager-oppsett …" - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Hurra." - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Fjern alle Home Manager-genereringer?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Alle genereringer kan nå hentes av søppelinnsamling." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "Levner genereringer, men de kan fremdeles hentes av søppelinnsamling." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: ukjent alternativ «%s»" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Kjør «%s --help» for brukshjelp" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "«expire-generations» forventet ett argument, mottok %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Ukjent kommando: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" -#: home-manager/install.nix:22 -#, fuzzy -msgid "Creating initial Home Manager configuration..." -msgstr "Oppretter ny Home Manager-konfigurasjon..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -157,9 +109,15 @@ msgid "" "to configure Home Manager. Run 'man home-configuration.nix' to\n" "see all available options." msgstr "" +"Ferdig! `home-manager`-verktøyet skal nå være installert og du kan redigere\n" +"\n" +" %s\n" +"\n" +"for å konfigurere Home Manager. Kjør 'man home-configuration.nix' for å\n" +"se alle tilgjengelige innstillinger." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -167,7 +125,113 @@ msgid "" "\n" "if the error seems to be the fault of Home Manager." msgstr "" +"Oops, installasjonen feilet! Vennligst opprett en sak på\n" +"\n" +" %s\n" +"\n" +"hvis du tror feilen er forårsaket av Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Kan ikke igangsette flak-oppsett" + +#: home-manager/home-manager:552 +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] "" +"Det er %d ulest og relevant nyhetssak.\n" +"Les den ved å kjøre kommandoen «%s news»." +msgstr[1] "" +"Det er %d uleste og relevante nyhetssaker.\n" +"Les dem ved å kjøre kommandoen «%s news»." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Ukjent «news.display»-innstilling «%s»." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Sett «$EDITOR»-miljøvariabelen" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Kan ikke kjøre bygg i skrivebeskyttet mappe" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Ingen generering med ID-en %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Kan ikke fjerne nåværende generering %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Fjerner generering %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Ingen genereringer til utløp" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Ingen «home-manager»-pakker ser ut til å være installert." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Ukjent parameter %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Dette vil fjerne Home Manager fra systemet ditt." + +#: home-manager/home-manager:808 +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:812 +msgid "Really uninstall Home Manager?" +msgstr "Vil du avinstallere Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Bytter til tomt Home Manager-oppsett …" + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Hurra!" + +#: home-manager/home-manager:851 +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:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "«expire-generations» forventet ett argument, mottok %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Ukjent kommando: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." -msgstr "" +msgstr "Denne avledningen kan ikke bygges, vennligst kjør den i nix-shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Oppretter ny Home Manager-konfigurasjon..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Fjern alle Home Manager-genereringer?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Alle genereringer er nå satt ut til søppelhenting." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Levner genereringer, men de kan fremdeles ryddes opp av søppelinnsamleren." diff --git a/third_party/home-manager/home-manager/po/nl.po b/third_party/home-manager/home-manager/po/nl.po index 58c90c2608..109fde8975 100644 --- a/third_party/home-manager/home-manager/po/nl.po +++ b/third_party/home-manager/home-manager/po/nl.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-11-16 13:47+0000\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-04-10 11:48+0000\n" "Last-Translator: Pablo Bollansee \n" "Language-Team: Dutch \n" @@ -17,137 +17,92 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.15-dev\n" +"X-Generator: Weblate 4.17-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Geen configuratiebestand gevonden op %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Je Home Manager %s bestand opslaan in %s is niet langer ondersteund,\n" +"gelieve het te verplaatsen naar %s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Geen configuratiebestand gevonden, maak er alstublieft een aan op %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Kan de opties van een flake configuratie niet inspecteren" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Het is niet gelukt om de vlok-configuratie te creëren" - -#: home-manager/home-manager:237 -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] "" -"Er is %d ongelezen and relevant nieuws artikel.\n" -"Lees het door het commando \"%s news\" uit te voeren." -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Onbekende \"new.display\" instelling \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen" - -#: home-manager/home-manager:273 -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:355 -msgid "No generation with ID %s" -msgstr "Geen generatie met de ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Generatie %s aan het verwijderen" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Geen generatie om te beëindigen" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Onbekend argument %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Dit zal Home Manager van jouw systeem verwijderen." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Wilt u zeker Home Manager verwijderen?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Naar een lege Home Manager configuratie aan het veranderen..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Joepie!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Alle Home Manager generaties verwijderen?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Alle generaties zijn nu in aanmerking voor afvalinzameling." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "Generaties blijven momenteel bestaan maar worden later opgekuist." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: onbekende keuze '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Voer '%s --help' in om gebruiksinfo te zien" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations verwacht één argument, maar kreeg er %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Het bestand %s bestaat al, het zal niet aangepast worden..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Onbekende opdracht: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "%s aan het aanmaken..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Initiële Home Manager configuratie aan het maken..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -161,12 +116,12 @@ msgstr "" "\n" " %s\n" "\n" -"aanpassen om Home Manager te configureren. Draai 'man home-" -"configuration.nix' om\n" +"aanpassen om Home Manager te configureren. Draai 'man home-configuration." +"nix' om\n" "alle opties te zien." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -180,8 +135,108 @@ msgstr "" "\n" "als de error de schuld van Home Manager lijkt te zijn." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Het is niet gelukt om de flake-configuratie te creëren" + +#: home-manager/home-manager:552 +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] "" +"Er is %d ongelezen and relevant nieuws artikel.\n" +"Lees het door het commando \"%s news\" uit te voeren." +msgstr[1] "" +"Er zijn %d ongelezen and relevante nieuws artikelen.\n" +"Lees ze door het commando \"%s news\" uit te voeren." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Onbekende \"new.display\" instelling \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Het is niet mogelijk om te bouwen in een read-only map" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Geen generatie met de ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Generatie %s aan het verwijderen" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Geen generatie om te beëindigen" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Onbekend argument %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Dit zal Home Manager van jouw systeem verwijderen." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Dit is een oefening, niets wordt werkelijk geïnstalleerd." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Wilt u zeker Home Manager verwijderen?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Naar een lege Home Manager configuratie aan het veranderen..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Joepie!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager is verwijdert maar jouw home.nix is onaangeraakt." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations verwacht één argument, maar kreeg er %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Onbekende opdracht: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Deze afleiding kan niet gebouwd worden, voer het alstublieft uit met nix-" "shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Initiële Home Manager configuratie aan het maken..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Alle Home Manager generaties verwijderen?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Alle generaties zijn nu in aanmerking voor afvalinzameling." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "Generaties blijven momenteel bestaan maar worden later opgekuist." diff --git a/third_party/home-manager/home-manager/po/pl.po b/third_party/home-manager/home-manager/po/pl.po index 4835b505e9..e1d9e394fe 100644 --- a/third_party/home-manager/home-manager/po/pl.po +++ b/third_party/home-manager/home-manager/po/pl.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2021-12-29 08:48+0000\n" -"Last-Translator: Tomasz Czyż \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-03 19:48+0000\n" +"Last-Translator: Eryk Michalak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -18,143 +18,92 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.10.1\n" +"X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Nie znaleziono pliku konfiguracyjnego %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Przechowywanie Home Manager %s w %s jest przestarzałe,\n" +"proszę przenieść go do %s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Nie znaleziono pliku konfiguracyjnego. Proszę utworzyć plik %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Nie można znaleźć odpowiedniego katalogu profilu, próbowano %s i %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Nie mogę sprawdzić konfiguracji flake'a" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Nie mogę zinstancjować konfiguracji flake'a" - -#: home-manager/home-manager:237 -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] "" -"Jest %d nieodczytana wiadomość.\n" -"Możesz ją odczytać uruchamiając „%s news”." -msgstr[1] "" -"Jest %d nieodczytanych wiadomości.\n" -"Możesz je odczytać uruchamiając „%s news”." -msgstr[2] "" -"Jest %d nieodczytanych wiadomości.\n" -"Możesz je odczytać uruchamiając „%s news”." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Nieznane ustawienie „%s” „news.display”." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Proszę ustawić zmienną środowiskową $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Nie mogę uruchomić budowania w katalogu tylko-do-odczytu" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Brak generacji z ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Nie mogę usunąć bieżącej generacji %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Usuwanie generacji %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Brak wygasających generacji" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Pakiety home-manager nie wydają się być zainstalowane." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Nieznany argument %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "To usunie Home Managera z twojego systemu." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Jesteś pewien usunięcia Home Managera?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Przełączanie do pustej konfiguracji Home Managera..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Jej!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Usunąć wszystkie generacje Home Managera?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "" -"Wszystkie generacje są uwzględnione przy oczyszczaniu (garbage collection)." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Zostawiam generacje ale wciąż mogą zostać usunięte (garbage collection)." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: nieznana opcja „%s”" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Uruchom „%s --help” by otrzymać pomoc" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations oczekuje jednego argumentu, otrzymane %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Plik %s już istnieje, pozostawianie go bez zmian..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Nieznana komenda: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Tworzenie %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Tworzenie pierwotnej konfiguracji Home Managera..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -171,7 +120,7 @@ msgstr "" "sprawdzić wszystkie możliwe opcje konfiguracyjne." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -185,7 +134,118 @@ msgstr "" "\n" "jeśli myślisz, że problem spowodowany jest przez błąd Home Managera." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Nie mogę zinstancjować konfiguracji flake'a" + +#: home-manager/home-manager:552 +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] "" +"Jest %d nieodczytana wiadomość.\n" +"Możesz ją odczytać uruchamiając „%s news”." +msgstr[1] "" +"Jest %d nieodczytanych wiadomości.\n" +"Możesz je odczytać uruchamiając „%s news”." +msgstr[2] "" +"Jest %d nieodczytanych wiadomości.\n" +"Możesz je odczytać uruchamiając „%s news”." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Nieznane ustawienie „%s” „news.display”." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Proszę ustawić zmienną środowiskową $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Nie mogę uruchomić budowania w katalogu tylko-do-odczytu" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Brak generacji z ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Nie mogę usunąć bieżącej generacji %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Usuwanie generacji %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Brak wygasających generacji" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Pakiety home-manager nie wydają się być zainstalowane." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Nieznany argument %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "To usunie Home Managera z twojego systemu." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "To jest próba, faktycznie nic nie będzie usunięte." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Jesteś pewien usunięcia Home Managera?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Przełączanie do pustej konfiguracji Home Managera..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Jej!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" +"Home Manager jest usunięty ale twój home.nix jest pozostawiony nietknięty." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations oczekuje jednego argumentu, otrzymane %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Nieznana komenda: %s" + +#: home-manager/install.nix:18 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." + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "" +#~ "Przepraszamy, ta komenda nie jest jeszcze obsługiwana w konfiguracji flake" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Tworzenie pierwotnej konfiguracji Home Managera..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Usunąć wszystkie generacje Home Managera?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "" +#~ "Wszystkie generacje są uwzględnione przy oczyszczaniu (garbage " +#~ "collection)." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Zostawiam generacje ale wciąż mogą zostać usunięte (garbage collection)." diff --git a/third_party/home-manager/home-manager/po/pt.po b/third_party/home-manager/home-manager/po/pt.po new file mode 100644 index 0000000000..7eab398ba6 --- /dev/null +++ b/third_party/home-manager/home-manager/po/pt.po @@ -0,0 +1,241 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-02-19 10:19+0000\n" +"Last-Translator: ssantos \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.16-dev\n" + +#: home-manager/home-manager:71 +msgid "No configuration file found at %s" +msgstr "Nenhum ficheiro de configuração encontrado no %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 +msgid "No configuration file found. Please create one at %s" +msgstr "Ficheiro de configuração não encontrado. Por favor crie um em %s" + +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 +msgid "Can't inspect options of a flake configuration" +msgstr "Não é possivel inspecionar a opção de configuração do flake" + +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 +msgid "%s: unknown option '%s'" +msgstr "%s: opção não reconhecida '%s'" + +#: home-manager/home-manager:286 home-manager/home-manager:1024 +msgid "Run '%s --help' for usage help" +msgstr "Execute '%s --help' para instruções de uso" + +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:455 +msgid "Creating initial Home Manager generation..." +msgstr "Criando a geração inicial do Home Manager..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:460 +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 "" +"Pronto! O home-manager agora deve ser instalado e poderá editar o ficheiro\n" +"\n" +" %s\n" +"\n" +"para configurar o Home Manager. Execute 'man home-configuration.nix' para\n" +"ver todas as opções disponíveis." + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:465 +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 "" +"Ixi, a instalação falhou! Por favor crie um issue no\n" +"\n" +" %s\n" +"\n" +"se o erro lhe parecer ser um problema do Home Manager." + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Não foi possível instanciar a configuração de flake" + +#: home-manager/home-manager:552 +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] "" +"Há %d novo item relevante não lido\n" +"Leia executando o comando \"%s news\"." +msgstr[1] "" +"Há %d novos itens relevants não lidos\n" +"Leia executando o comando \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Por favor defina a variável de ambiente $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Não é possível fazer o build num diretório somente leitura" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Nenhuma geração com ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Não foi possível remover a geração atual %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "A remover a geração %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Nenhuma geração a expirar" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Nenhum pacote parece instalado com home-manager." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Argumento desconhecido %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Isto irá remover o Home Manager do seu sistema." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Essa é uma execução de teste, nada de fato será desinstalado." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Confirma a desinstalação do Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Trocando para configuração vazia do Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Boa!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations espera um argumento, recebeu %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Comando não reconhecido: %s" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" +"O build dessa derivation não pode ser feito, por favor rode usando o nix-" +"shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Criando a configuração inicial do Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Remover todas as gerações do Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "" +#~ "Todas gerações agora são elegíveis para coleta do garbage collector." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Deixando gerações, entretanto elas ainda poderão ser limpas pelo garbage " +#~ "collector." 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 de2fb70567..b02fcaa651 100644 --- a/third_party/home-manager/home-manager/po/pt_BR.po +++ b/third_party/home-manager/home-manager/po/pt_BR.po @@ -7,11 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-04-04 11:11+0000\n" "Last-Translator: Alex Miranda \n" -"Language-Team: Portuguese (Brazil) \n" +"Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,137 +19,88 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.12-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Nenhum arquivo de configuração encontrado no %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Arquivo de configuração não encontrado. Por favor crie um em %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 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:162 -msgid "Can't instantiate a flake configuration" -msgstr "Não foi possível instanciar a configuração de flake" - -#: home-manager/home-manager:237 -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] "" -"Há %d novo item relevante não lido\n" -"Leia executando o comando \"%s news\"." -msgstr[1] "" -"Há %d novos itens relevants não lidos\n" -"Leia executando o comando \"%s news\"." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Por favor defina a variável de ambiente $EDITOR" - -#: home-manager/home-manager:273 -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:355 -msgid "No generation with ID %s" -msgstr "Nenhuma geração com ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Não foi possível remover a geração atual %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Removendo geração %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Nenhuma geração a expirar" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Nenhum pacote parece instalado com home-manager." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Argumento desconhecido %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Isso irá remover o Home Manager do seu sistema." - -#: home-manager/home-manager:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Confirma a desinstalação do Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Trocando para configuração vazia do Home Manager..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Boa!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Remover todas as gerações do Home Manager?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Todas gerações agora são elegíveis para coleta do garbage collector." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "" -"Deixando gerações, entretanto elas ainda poderão ser limpas pelo garbage " -"collector." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: opção não reconhecida '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Execute '%s --help' para instruções de uso" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations espera um argumento, recebeu %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Comando não reconhecido: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Criando a configuração inicial do Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -167,7 +118,7 @@ msgstr "" "ver todas as opções disponíveis." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -181,8 +132,111 @@ msgstr "" "\n" "se o erro lhe parecer ser um problema do Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Não foi possível instanciar a configuração de flake" + +#: home-manager/home-manager:552 +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] "" +"Há %d novo item relevante não lido\n" +"Leia executando o comando \"%s news\"." +msgstr[1] "" +"Há %d novos itens relevants não lidos\n" +"Leia executando o comando \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Por favor defina a variável de ambiente $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Não é possível fazer o build em um diretório somente leitura" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Nenhuma geração com ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Não foi possível remover a geração atual %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Removendo geração %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Nenhuma geração a expirar" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Nenhum pacote parece instalado com home-manager." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Argumento desconhecido %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Isso irá remover o Home Manager do seu sistema." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Essa é uma execução de teste, nada de fato será desinstalado." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Confirma a desinstalação do Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Trocando para configuração vazia do Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Boa!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations espera um argumento, recebeu %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Comando não reconhecido: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "O build dessa derivation não pode ser feito, por favor rode usando o nix-" "shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Criando a configuração inicial do Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Remover todas as gerações do Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "" +#~ "Todas gerações agora são elegíveis para coleta do garbage collector." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "" +#~ "Deixando gerações, entretanto elas ainda poderão ser limpas pelo garbage " +#~ "collector." diff --git a/third_party/home-manager/home-manager/po/ro.po b/third_party/home-manager/home-manager/po/ro.po new file mode 100644 index 0000000000..cf1bd2231e --- /dev/null +++ b/third_party/home-manager/home-manager/po/ro.po @@ -0,0 +1,210 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-08-02 20:04+0000\n" +"Last-Translator: HeartBlin913861820c094e37 \n" +"Language-Team: Romanian \n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" +"X-Generator: Weblate 5.0-dev\n" + +#: home-manager/home-manager:71 +msgid "No configuration file found at %s" +msgstr "Nu s-a găsit niciun fișier de configurare la locația %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 +msgid "No configuration file found. Please create one at %s" +msgstr "" + +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 +msgid "Can't inspect options of a flake configuration" +msgstr "" + +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 +msgid "%s: unknown option '%s'" +msgstr "" + +#: home-manager/home-manager:286 home-manager/home-manager:1024 +msgid "Run '%s --help' for usage help" +msgstr "" + +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" + +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" + +#: home-manager/home-manager:455 +msgid "Creating initial Home Manager generation..." +msgstr "" + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:460 +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:465 +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:476 +msgid "Can't instantiate a flake configuration" +msgstr "" + +#: home-manager/home-manager:552 +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "" + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "" + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "" + +#: home-manager/home-manager:1085 +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/ru.po b/third_party/home-manager/home-manager/po/ru.po index 05378c0fe5..7c33c9c3b3 100644 --- a/third_party/home-manager/home-manager/po/ru.po +++ b/third_party/home-manager/home-manager/po/ru.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2021-12-21 19:55+0000\n" -"Last-Translator: Mikhail Chekan \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-07 12:51+0000\n" +"Last-Translator: Nikolay Mokrinsky \n" "Language-Team: Russian \n" "Language: ru\n" @@ -18,140 +18,90 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.10\n" +"X-Generator: Weblate 4.18-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Не найден файл конфигурации в %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "Не найден файл конфигурации. Пожалуйста, создайте его в %s" +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. #: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Не найдена подходящая директория профиля, пробовали %s и %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "Не могу получить опции для flake-конфигурации" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Не могу создать экземляр для flake-конфигурации" - -#: home-manager/home-manager:237 -msgid "" -"There is %d unread and relevant news item.\n" -"Read it by running the command \"%s news\"." -msgid_plural "" -"There are %d unread and relevant news items.\n" -"Read them by running the command \"%s news\"." -msgstr[0] "" -"У вас есть %d непрочитанная и релевантная новость.\n" -"Прочтите её, выполнив команду \"%s news\"." -msgstr[1] "" -"У вас есть %d непрочитанные и релевантные новости.\n" -"Прочтите их, выполнив команду \"%s news\"." -msgstr[2] "" -"У вас есть %d непрочитанных и релевантных новостей.\n" -"Прочтите их, выполнив команду \"%s news\"." - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Неизвестное значение \"news.display\": \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Пожалуйста, определите переменную среды $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Не могу начать сборку в директории, защищённой от записи" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Поколение под номером %s не существует" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Не могу удалить текущее поколение %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Удаляю поколение %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Нет поколений, которые можно просрочить" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Не обнаружено пакетов, установленных через home-manager." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Неизвестный аргумент %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "Это удалит Home Manager из вашей системы." - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "Это пробный запуск, на самом деле ничего не удаляется." - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "Действительно хотите удалить Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Переключаюсь на пустую конфигурацию Home Manager..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Ура!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Удалить все поколения Home Manager?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Теперь все поколения готовы к удалению сборщиком мусора." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "Поколения остаются, но их ещё можно удалить сборщиком мусора." - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "Home Manager удалён, но ваш home.nix остался нетронутым." - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: неизвестная опция '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Выполните '%s --help', чтобы получить справку" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations требует один аргумент, но передано %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "" -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Неизвестная команда: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "" -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Создаю начальную конфигурацию Home Manager..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." msgstr "Создаю начальное поколение Home Manager..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -168,7 +118,7 @@ msgstr "" "Выполните 'man home-configuration.nix', чтобы увидеть доступные опции." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -182,7 +132,110 @@ msgstr "" "\n" "если считаете, что в ошибке виноват Home Manager." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Не могу создать экземляр для flake-конфигурации" + +#: home-manager/home-manager:552 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"У вас есть %d непрочитанная и релевантная новость.\n" +"Прочтите её, выполнив команду \"%s news\"." +msgstr[1] "" +"У вас есть %d непрочитанные и релевантные новости.\n" +"Прочтите их, выполнив команду \"%s news\"." +msgstr[2] "" +"У вас есть %d непрочитанных и релевантных новостей.\n" +"Прочтите их, выполнив команду \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Неизвестное значение \"news.display\": \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Пожалуйста, определите переменную среды $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Не могу начать сборку в директории, защищённой от записи" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Поколение под номером %s не существует" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Не могу удалить текущее поколение %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Удаляю поколение %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Нет поколений, которые можно просрочить" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Не обнаружено пакетов, установленных через home-manager." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Неизвестный аргумент %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Это удалит Home Manager из вашей системы." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Это пробный запуск, на самом деле ничего не удаляется." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Действительно хотите удалить Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Переключаюсь на пустую конфигурацию Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Ура!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager удалён, но ваш home.nix остался нетронутым." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations требует один аргумент, но передано %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Неизвестная команда: %s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." msgstr "" "Это определение нельзя собрать. Пожалуйста, запустите его через nix-shell." + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Создаю начальную конфигурацию Home Manager..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Удалить все поколения Home Manager?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Теперь все поколения готовы к удалению сборщиком мусора." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "Поколения остаются, но их ещё можно удалить сборщиком мусора." diff --git a/third_party/home-manager/home-manager/po/sv.po b/third_party/home-manager/home-manager/po/sv.po index 6ca1fc7f94..24894446dc 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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2021-12-17 20:50+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"Last-Translator: Luna Jernberg \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -17,137 +17,112 @@ 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.10\n" +"X-Generator: Weblate 5.0-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "Det finns ingen konfigurationsfil i %s" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +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:99 msgid "No configuration file found. Please create one at %s" msgstr "Hittade ingen konfigurationsfil. Skapa en i %s" +#: home-manager/home-manager:114 +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:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Reservsökvägen för Home Manager %s har fasats ut och en fil/katalog hittades " +"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:125 +msgid "" +"To remove this warning, do one of the fallowing.\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 "" +"För att ta bort denna varning, gör något av följande.\n" +"\n" +"1. Berätta uttryckligen för Home Manager att använda sökvägen, till exempel " +"genom att lägga till\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" till din konfiguration.\n" +"\n" +" Om du importerar Home Manager direkt kan du använda parametern `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" när du kallar på Home Manager-paketet.\n" +"\n" +"2. Ta bort den föråldrade sökvägen.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:164 +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:219 msgid "Can't inspect options of a flake configuration" msgstr "Kan inte granska alternativ i en flake-konfiguration" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "Kan inte instansera en flake-konfiguration" - -#: home-manager/home-manager:237 -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] "" -"Det finns %d oläst och relevant nyhet.\n" -"Läs den genom att köra kommandot \"%s news\"." -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:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "Okänt \"news.display\"-värde \"%s\"." - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "Vänligen tilldela miljövariablen $EDITOR" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "Kan inte bygga i katalog med bara läsrättigheter" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "Ingen generation med ID %s" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "Kan inte ta bort nuvarande generation %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "Tar bort generation %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "Ingen generation att förfalla" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "Paketet home-manager verkar inte vara installerat." - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "Okänt argument %s" - -#: home-manager/home-manager:469 -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:472 -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:476 -msgid "Really uninstall Home Manager?" -msgstr "Verkligen avinstallera Home Manager?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "Byter till tom Home Manager-konfiguration..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "Hurra!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "Ta bort alla Home Manager-generationer?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "Alla generationer kan nu skräpsamlas." - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "Låter generationer vara kvar men de kan fortfarande skräpsamlas." - -#: home-manager/home-manager:514 -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:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s: okänt val '%s'" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "Kör '%s --help' för användarhjälp" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expect-generations förväntar sig ett argument, fick %d." +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Filen %s finns redan, lämnar den orörd..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "Okänt kommando: %s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Skapar %s..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "Skapar initial Home Manager-konfiguration..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 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/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -164,7 +139,7 @@ msgstr "" "att se alla tillgängliga alternativ." #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -178,6 +153,110 @@ msgstr "" "\n" "om problemet verkar bero på något Home Manager gör fel." -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Kan inte instansera en flake-konfiguration" + +#: home-manager/home-manager:552 +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] "" +"Det finns %d oläst och relevant nyhet.\n" +"Läs den genom att köra kommandot \"%s news\"." +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:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Okänt \"news.display\"-värde \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Vänligen tilldela miljövariablen $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Kan inte bygga i katalog med bara läsrättigheter" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Ingen generation med ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Kan inte ta bort nuvarande generation %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Tar bort generation %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Ingen generation att förfalla" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Paketet home-manager verkar inte vara installerat." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Okänt argument %s" + +#: home-manager/home-manager:805 +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:808 +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:812 +msgid "Really uninstall Home Manager?" +msgstr "Verkligen avinstallera Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Byter till tom Home Manager-konfiguration..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Hurra!" + +#: home-manager/home-manager:851 +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:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expect-generations förväntar sig ett argument, fick %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Okänt kommando: %s" + +#: home-manager/install.nix:18 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." + +#~ 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" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Skapar initial Home Manager-konfiguration..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "Ta bort alla Home Manager-generationer?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "Alla generationer kan nu skräpsamlas." + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "Låter generationer vara kvar men de kan fortfarande skräpsamlas." diff --git a/third_party/home-manager/home-manager/po/tr.po b/third_party/home-manager/home-manager/po/tr.po index fade64173d..f2be534aad 100644 --- a/third_party/home-manager/home-manager/po/tr.po +++ b/third_party/home-manager/home-manager/po/tr.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-03-26 23:57+0000\n" "Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"Last-Translator: Dan \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" + +#: home-manager/home-manager:71 +msgid "No configuration file found at %s" +msgstr "Файл конфігурації не знайдено в %s" + +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"Збереження вашого Home Manager %s у %s є застарілим,\n" +"будь ласка, перемістіть його до %s" + +#: home-manager/home-manager:99 +msgid "No configuration file found. Please create one at %s" +msgstr "Файл конфігурації не знайдено. Будь ласка, створіть його в %s" + +#: home-manager/home-manager:114 +msgid "Home Manager not found at %s." +msgstr "Home Manager не знайдено на %s." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "" +"Резервний шлях до Home Manager %s застарів, і там було знайдено файл/каталог." + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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 "" +"Щоб видалити це попередження, виконайте одну з наведених нижче дій.\n" +"\n" +"1. Чітко скажіть Home Manager використовувати шлях, наприклад, додавши\n" +"\n" +" { programs.home-manager.path = \"%s\"; }\n" +"\n" +" до вашої конфігурації.\n" +"\n" +" Якщо ви імпортуєте Home Manager безпосередньо, ви можете використовувати " +"параметр `path`\n" +"\n" +" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n" +"\n" +" при виклику пакету Home Manager.\n" +"\n" +"2. Видаліть застарілий шлях.\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Не вдалося знайти відповідний каталог профілю, спробував %s і %s" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 +msgid "Can't inspect options of a flake configuration" +msgstr "Неможливо перевірити параметри flake-конфігурації" + +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 +msgid "%s: unknown option '%s'" +msgstr "%s: невідомий параметр '%s'" + +#: home-manager/home-manager:286 home-manager/home-manager:1024 +msgid "Run '%s --help' for usage help" +msgstr "Запустіть '%s --help' для отримання довідки про використання" + +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "Файл %s вже існує, залишаючи його незмінним..." + +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "Створення %s..." + +#: home-manager/home-manager:455 +msgid "Creating initial Home Manager generation..." +msgstr "Створення початкової генерації Home Manager..." + +#. translators: The "%s" specifier will be replaced by a file path. +#: home-manager/home-manager:460 +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 "" +"Все готово! Інструмент Home-manager тепер повинен бути встановлений, і ви " +"можете редагувати\n" +"\n" +" %s,\n" +"\n" +"щоб налаштувати Home Manager. Запустіть 'man home-configuration.nix', щоб\n" +"переглянути всі доступні варіанти." + +#. translators: The "%s" specifier will be replaced by a URL. +#: home-manager/home-manager:465 +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 "" +"Ой, не вдалося встановити! Будь ласка, створіть проблему на\n" +"\n" +" %s\n" +"\n" +"якщо здається, що помилка сталася через Home Manager." + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "Не вдається створити екземпляр flake-конфігурації" + +#: home-manager/home-manager:552 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"Є %d непрочитана і ревалентна новина.\n" +"Прочитайте її, виконавши команду \"%s news\"." +msgstr[1] "" +"Є %d непрочитані і ревалентні новини.\n" +"Прочитайте їх, виконавши команду \"%s news\"." +msgstr[2] "" +"Є %d непрочитаних і ревалентних новин.\n" +"Прочитайте їх, виконавши команду \"%s news\"." + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "Невідоме налаштування \"news.display\" \"%s\"." + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "Будь ласка, встановіть змінну середовища $EDITOR" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "Неможливо запустити збірку в каталозі, доступному лише для читання" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "Немає генерації з ID %s" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "Не вдається видалити поточну генерацію %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "Видалення генерації %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "Немає генерацій, термін дії яких закінчується" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "Здається, не встановлено жодних пакунків home-manager." + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "Невідомий аргумент %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "Це призведе до видалення Home Manager з вашої системи." + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "Це пробний запуск, насправді нічого не буде видалено." + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "Дійсно видаліть Home Manager?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "Перехід до порожньої конфігурації Home Manager..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "Ура!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager буде видалено, але ваш home.nix залишиться недоторканим." + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generation очікує один аргумент, отримав %d." + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "Невідома команда: %s" + +#: home-manager/install.nix:18 +msgid "This derivation is not buildable, please run it using nix-shell." +msgstr "" +"Цю похідну не можна зібрати, будь ласка, запустіть її за допомогою nix-shell." + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "На жаль, ця команда ще не підтримується в налаштуваннях flake" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "Створення початкової конфігурації Home Manager..." 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 b3de7b2b73..2f12b30263 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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2021-12-28 12:41+0000\n" -"Last-Translator: WhiredPlanck \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-31 21:25+0000\n" +"Last-Translator: Vollow \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_Hans\n" @@ -17,134 +17,108 @@ 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.0-dev\n" -#: home-manager/home-manager:60 +#: home-manager/home-manager:71 msgid "No configuration file found at %s" msgstr "未在 %s 找到配置文件" -#: home-manager/home-manager:79 +#. translators: The first '%s' specifier will be replaced by either +#. 'home.nix' or 'flake.nix'. +#: home-manager/home-manager:88 home-manager/home-manager:92 +#: home-manager/home-manager:182 +msgid "" +"Keeping your Home Manager %s in %s is deprecated,\n" +"please move it to %s" +msgstr "" +"需要确保 Home Manager 在 %s 中,%s 已废弃。\n" +"请手动移动到 %s" + +#: home-manager/home-manager:99 msgid "No configuration file found. Please create one at %s" msgstr "未找到配置文件。请在 %s 处创建一份" +#: home-manager/home-manager:114 +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:122 +msgid "" +"The fallback Home Manager path %s has been deprecated and a file/directory " +"was found there." +msgstr "后备 Home Manager 路径 %s 已被弃用,但在这里找到了一个文件或文件夹。" + +#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated. +#: home-manager/home-manager:125 +msgid "" +"To remove this warning, do one of the fallowing.\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 "" +"为移除该警告,请完成下列建议的任意一项。\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" +"2. 移除被弃用的路径。\n" +"\n" +" $ rm -r \"%s\"" + +#: home-manager/home-manager:164 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "在 %s 以及 %s 中未能找到合适的档案目录" + +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:219 msgid "Can't inspect options of a flake configuration" msgstr "无法检查 flake 配置中的选项" -#: home-manager/home-manager:162 -msgid "Can't instantiate a flake configuration" -msgstr "无法创建 flake 配置实例" - -#: home-manager/home-manager:237 -msgid "" -"There is %d unread and relevant news item.\n" -"Read it by running the command \"%s news\"." -msgid_plural "" -"There are %d unread and relevant news items.\n" -"Read them by running the command \"%s news\"." -msgstr[0] "" -"有 %d 条未读的相关新闻或消息。\n" -"可运行 “%s news” 命令进行阅读。" - -#: home-manager/home-manager:251 -msgid "Unknown \"news.display\" setting \"%s\"." -msgstr "未知的 “news.display” 设置项 “%s”。" - -#: home-manager/home-manager:258 -#, sh-format -msgid "Please set the $EDITOR environment variable" -msgstr "请设定 $EDITOR 环境变量" - -#: home-manager/home-manager:273 -msgid "Cannot run build in read-only directory" -msgstr "无法在只读目录中运行构建" - -#: home-manager/home-manager:355 -msgid "No generation with ID %s" -msgstr "没有 ID 为 %s 的世代" - -#: home-manager/home-manager:357 -msgid "Cannot remove the current generation %s" -msgstr "无法移除当前世代 %s" - -#: home-manager/home-manager:359 -msgid "Removing generation %s" -msgstr "正在移除世代 %s" - -#: home-manager/home-manager:385 -msgid "No generations to expire" -msgstr "没有即将过期的世代" - -#: home-manager/home-manager:396 -msgid "No home-manager packages seem to be installed." -msgstr "似乎没有安装 home-manager 软件包。" - -#: home-manager/home-manager:453 -msgid "Unknown argument %s" -msgstr "未知参数 %s" - -#: home-manager/home-manager:469 -msgid "This will remove Home Manager from your system." -msgstr "这将会从系统中移除 Home Manager。" - -#: home-manager/home-manager:472 -msgid "This is a dry run, nothing will actually be uninstalled." -msgstr "这是试运行结果,没有实际卸载任何软件包。" - -#: home-manager/home-manager:476 -msgid "Really uninstall Home Manager?" -msgstr "确定要卸载 Home Manager 吗?" - -#: home-manager/home-manager:481 -msgid "Switching to empty Home Manager configuration..." -msgstr "正在切换至空的 Home Manager 配置 ..." - -#: home-manager/home-manager:493 -msgid "Yay!" -msgstr "好耶!" - -#: home-manager/home-manager:500 -msgid "Remove all Home Manager generations?" -msgstr "要移除所有 Home Manager 配置世代吗?" - -#: home-manager/home-manager:507 -msgid "All generations are now eligible for garbage collection." -msgstr "所有世代现在均符合垃圾回收的条件。" - -#: home-manager/home-manager:510 -msgid "Leaving generations but they may still be garbage collected." -msgstr "保留世代,但它们仍然可能被垃圾回收。" - -#: home-manager/home-manager:514 -msgid "Home Manager is uninstalled but your home.nix is left untouched." -msgstr "Home Manager 已卸载,但未改动您的 home.nix 配置文件。" - -#: home-manager/home-manager:673 +#: home-manager/home-manager:281 home-manager/home-manager:304 +#: home-manager/home-manager:1023 msgid "%s: unknown option '%s'" msgstr "%s:未知选项 ‘%s’" -#: home-manager/home-manager:674 +#: home-manager/home-manager:286 home-manager/home-manager:1024 msgid "Run '%s --help' for usage help" msgstr "运行 ‘%s --help’ 获取用法帮助" -#: home-manager/home-manager:708 -msgid "expire-generations expects one argument, got %d." -msgstr "expire-generations 须要一个参数,但获取到了 %d 个。" +#: home-manager/home-manager:312 home-manager/home-manager:411 +msgid "The file %s already exists, leaving it unchanged..." +msgstr "文件 %s 已存在,未对其更改 ..." -#: home-manager/home-manager:730 -msgid "Unknown command: %s" -msgstr "未知命令:%s" +#: home-manager/home-manager:314 home-manager/home-manager:413 +msgid "Creating %s..." +msgstr "正在创建 %s ..." -#: home-manager/install.nix:22 -msgid "Creating initial Home Manager configuration..." -msgstr "正在创建初始 Home Manager 配置 ..." - -#: home-manager/install.nix:66 +#: home-manager/home-manager:455 msgid "Creating initial Home Manager generation..." -msgstr "正在创建初始 Home Manager 世代 ..." +msgstr "正在创建 Home Manager 初始化配置生成 ..." #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/install.nix:71 +#: home-manager/home-manager:460 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -161,7 +135,7 @@ msgstr "" "来查看所有可用选项。" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/install.nix:76 +#: home-manager/home-manager:465 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -175,6 +149,106 @@ msgstr "" "\n" "处创建 Issue 告知我们。" -#: home-manager/install.nix:83 +#. translators: Here "flake" is a noun that refers to the Nix Flakes feature. +#: home-manager/home-manager:476 +msgid "Can't instantiate a flake configuration" +msgstr "无法创建 flake 配置实例" + +#: home-manager/home-manager:552 +msgid "" +"There is %d unread and relevant news item.\n" +"Read it by running the command \"%s news\"." +msgid_plural "" +"There are %d unread and relevant news items.\n" +"Read them by running the command \"%s news\"." +msgstr[0] "" +"有 %d 条未读的相关新闻或消息。\n" +"可运行 “%s news” 命令进行阅读。" + +#: home-manager/home-manager:566 +msgid "Unknown \"news.display\" setting \"%s\"." +msgstr "未知的 “news.display” 设置项 “%s”。" + +#: home-manager/home-manager:573 +#, sh-format +msgid "Please set the $EDITOR environment variable" +msgstr "请设定 $EDITOR 环境变量" + +#: home-manager/home-manager:588 +msgid "Cannot run build in read-only directory" +msgstr "无法在只读目录中运行构建" + +#: home-manager/home-manager:666 +msgid "No generation with ID %s" +msgstr "没有 ID 为 %s 的生成结果" + +#: home-manager/home-manager:668 +msgid "Cannot remove the current generation %s" +msgstr "无法移除当前生成结果 %s" + +#: home-manager/home-manager:670 +msgid "Removing generation %s" +msgstr "正在移除生成结果 %s" + +#: home-manager/home-manager:689 +msgid "No generations to expire" +msgstr "没有即将过期的生成结果" + +#: home-manager/home-manager:700 +msgid "No home-manager packages seem to be installed." +msgstr "似乎没有安装 home-manager 软件包。" + +#: home-manager/home-manager:781 +msgid "Unknown argument %s" +msgstr "未知参数 %s" + +#: home-manager/home-manager:805 +msgid "This will remove Home Manager from your system." +msgstr "这将会从系统中移除 Home Manager。" + +#: home-manager/home-manager:808 +msgid "This is a dry run, nothing will actually be uninstalled." +msgstr "这是试运行结果,没有实际卸载任何软件包。" + +#: home-manager/home-manager:812 +msgid "Really uninstall Home Manager?" +msgstr "确定要卸载 Home Manager 吗?" + +#: home-manager/home-manager:818 +msgid "Switching to empty Home Manager configuration..." +msgstr "正在切换至空的 Home Manager 配置 ..." + +#: home-manager/home-manager:846 +msgid "Yay!" +msgstr "好耶!" + +#: home-manager/home-manager:851 +msgid "Home Manager is uninstalled but your home.nix is left untouched." +msgstr "Home Manager 已卸载,但未改动您的 home.nix 配置文件。" + +#: home-manager/home-manager:1063 +msgid "expire-generations expects one argument, got %d." +msgstr "expire-generations 须要一个参数,但获取到了 %d 个。" + +#: home-manager/home-manager:1085 +msgid "Unknown command: %s" +msgstr "未知命令:%s" + +#: home-manager/install.nix:18 msgid "This derivation is not buildable, please run it using nix-shell." -msgstr "此配置文件/变体不可构建,请在 nix-shell 中运行它。" +msgstr "此配置文件/变体不可构建,请使用 nix-shell 运行它。" + +#~ msgid "Sorry, this command is not yet supported in flake setup" +#~ msgstr "抱歉,当前命令暂不支持在 flake 配置中使用" + +#~ msgid "Creating initial Home Manager configuration..." +#~ msgstr "正在创建初始 Home Manager 配置 ..." + +#~ msgid "Remove all Home Manager generations?" +#~ msgstr "要移除所有 Home Manager 配置世代吗?" + +#~ msgid "All generations are now eligible for garbage collection." +#~ msgstr "所有世代现在均符合垃圾回收的条件。" + +#~ msgid "Leaving generations but they may still be garbage collected." +#~ msgstr "保留世代,但它们仍然可能被垃圾回收。" 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 917f053e9c..5219c650b7 100644 --- a/third_party/home-manager/home-manager/po/zh_Hant.po +++ b/third_party/home-manager/home-manager/po/zh_Hant.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2021-12-29 08:48+0000\n" "Last-Translator: WhiredPlanck \n" "Language-Team: Chinese (Traditional) gpg --list-keys. + The key to use as listed in {command}`gpg --list-keys`. ''; }; @@ -99,7 +99,7 @@ let description = '' Path to file containing certificate authorities that should be used to validate the connection authenticity. If - null then the system default is used. + `null` then the system default is used. Note, if set then the system default may still be accepted. ''; }; @@ -122,7 +122,7 @@ let example = 993; description = '' The port on which the IMAP server listens. If - null then the default port is used. + `null` then the default port is used. ''; }; @@ -144,10 +144,9 @@ let example = "jmap.example.org"; description = '' Hostname of JMAP server. - - If both this option and are specified, - host is preferred by applications when establishing a + + If both this option and [](#opt-accounts.email.accounts._name_.jmap.sessionUrl) are specified, + `host` is preferred by applications when establishing a session. ''; }; @@ -158,10 +157,9 @@ let example = "https://jmap.example.org:443/.well-known/jmap"; description = '' URL for the JMAP Session resource. - - If both this option and are specified, - host is preferred by applications when establishing a + + If both this option and [](#opt-accounts.email.accounts._name_.jmap.host) are specified, + `host` is preferred by applications when establishing a session. ''; }; @@ -184,7 +182,7 @@ let example = 465; description = '' The port on which the SMTP server listens. If - null then the default port is used. + `null` then the default port is used. ''; }; @@ -255,7 +253,7 @@ let Some email providers have peculiar behavior that require special treatment. This option is therefore intended to indicate the nature of the provider. - + When this indicates a specific provider then, for example, the IMAP, SMTP, and JMAP server configuration may be set automatically. @@ -321,7 +319,7 @@ let }; drafts = mkOption { - type = types.str; + type = types.nullOr types.str; default = "Drafts"; description = '' Relative path of the drafts mail folder. diff --git a/third_party/home-manager/modules/config/home-cursor.nix b/third_party/home-manager/modules/config/home-cursor.nix index a246773693..a64ccc50e3 100644 --- a/third_party/home-manager/modules/config/home-cursor.nix +++ b/third_party/home-manager/modules/config/home-cursor.nix @@ -29,7 +29,7 @@ let x11 = { enable = mkEnableOption '' - x11 config generation for + x11 config generation for {option}`home.pointerCursor` ''; defaultCursor = mkOption { @@ -42,7 +42,7 @@ let gtk = { enable = mkEnableOption '' - gtk config generation for + gtk config generation for {option}`home.pointerCursor` ''; }; }; @@ -95,15 +95,21 @@ in { type = types.nullOr pointerCursorModule; default = null; description = '' - Cursor configuration. Set to null to disable. - - Top-level options declared under this submodule are backend indepedent - options. Options declared under namespaces such as x11 + Cursor configuration. Set to `null` to disable. + + Top-level options declared under this submodule are backend independent + options. Options declared under namespaces such as `x11` are backend specific options. By default, only backend independent cursor configurations are generated. If you need configurations for specific backends, you can toggle them via the enable option. For example, - + [](#opt-home.pointerCursor.x11.enable) will enable x11 cursor configurations. + + Note that this will merely generate the cursor configurations. + To apply the configurations, the relevant subsytems must also be configured. + For example, [](#opt-home.pointerCursor.gtk.enable) will generate + the gtk cursor configuration, but [](#opt-gtk.enable) needs + to be set for it to be applied. ''; }; }; @@ -119,7 +125,7 @@ in { # Set name in icons theme, for compatibility with AwesomeWM etc. See: # https://github.com/nix-community/home-manager/issues/2081 # https://wiki.archlinux.org/title/Cursor_themes#XDG_specification - home.file.".icons/default/index.theme".text = '' + xdg.dataFile."icons/default/index.theme".text = '' [icon theme] Name=Default Comment=Default Cursor Theme @@ -133,6 +139,8 @@ in { home.sessionVariables = { XCURSOR_PATH = mkDefault ("$XCURSOR_PATH\${XCURSOR_PATH:+:}" + "${config.home.profileDirectory}/share/icons"); + XCURSOR_SIZE = mkDefault cfg.size; + XCURSOR_THEME = mkDefault cfg.name; }; } diff --git a/third_party/home-manager/modules/config/i18n.nix b/third_party/home-manager/modules/config/i18n.nix index e9b01b4efd..2efb53d62c 100644 --- a/third_party/home-manager/modules/config/i18n.nix +++ b/third_party/home-manager/modules/config/i18n.nix @@ -15,15 +15,16 @@ # below for changes: # https://github.com/NixOS/nixpkgs/blob/nixpkgs-unstable/pkgs/development/libraries/glibc/nix-locale-archive.patch -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: with lib; let + inherit (config.i18n) glibcLocales; - inherit (pkgs.glibcLocales) version; + inherit (glibcLocales) version; - archivePath = "${pkgs.glibcLocales}/lib/locale/locale-archive"; + archivePath = "${glibcLocales}/lib/locale/locale-archive"; # lookup the version of glibcLocales and set the appropriate environment vars localeVars = if versionAtLeast version "2.27" then { @@ -36,6 +37,31 @@ let in { meta.maintainers = with maintainers; [ midchildan ]; + options = { + i18n.glibcLocales = mkOption { + type = types.path; + description = '' + Customized `glibcLocales` package providing + the `LOCALE_ARCHIVE_*` environment variable. + + This option only applies to the Linux platform. + + When Home Manager is configured with NixOS, the default value + will be set to {var}`i18n.glibcLocales` from the + system configuration. + ''; + example = literalExpression '' + pkgs.glibcLocales.override { + allLocales = false; + locales = [ "en_US.UTF-8/UTF-8" ]; + } + ''; + # NB. See nixos/default.nix for NixOS default. + default = pkgs.glibcLocales; + defaultText = literalExpression "pkgs.glibcLocales"; + }; + }; + config = mkIf pkgs.stdenv.hostPlatform.isLinux { # For shell sessions. home.sessionVariables = localeVars; diff --git a/third_party/home-manager/modules/files.nix b/third_party/home-manager/modules/files.nix index daeeb0b1f9..c869df1d86 100644 --- a/third_party/home-manager/modules/files.nix +++ b/third_party/home-manager/modules/files.nix @@ -4,7 +4,7 @@ with lib; let - cfg = config.home.file; + cfg = filterAttrs (n: f: f.enable) config.home.file; homeDirectory = config.home.homeDirectory; @@ -28,7 +28,7 @@ in home.file = mkOption { description = "Attribute set of files to link into the user home."; default = {}; - type = fileType "HOME" homeDirectory; + type = fileType "home.file" "{env}`HOME`" homeDirectory; }; home-files = mkOption { @@ -272,7 +272,10 @@ in $DRY_RUN_CMD nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath" fi - $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath" + $DRY_RUN_CMD nix-store --realise "$newGenPath" --add-root "$newGenGcPath" > "$DRY_RUN_NULL" + if [[ -e "$legacyGenGcPath" ]]; then + $DRY_RUN_CMD rm $VERBOSE_ARG "$legacyGenGcPath" + fi else _i "No change so reusing latest profile generation %s" "$oldGenNum" fi diff --git a/third_party/home-manager/modules/home-environment.nix b/third_party/home-manager/modules/home-environment.nix index 098e10b21c..8704646087 100644 --- a/third_party/home-manager/modules/home-environment.nix +++ b/third_party/home-manager/modules/home-environment.nix @@ -119,11 +119,11 @@ let else "us"; defaultText = literalExpression "null"; description = '' - Keyboard layout. If null, then the system + Keyboard layout. If `null`, then the system configuration will be used. - - This defaults to null for state - version ≥ 19.09 and "us" otherwise. + + This defaults to `null` for state + version ≥ 19.09 and `"us"` otherwise. ''; }; @@ -154,11 +154,11 @@ let defaultText = literalExpression "null"; example = "colemak"; description = '' - X keyboard variant. If null, then the + X keyboard variant. If `null`, then the system configuration will be used. - - This defaults to null for state - version ≥ 19.09 and "" otherwise. + + This defaults to `null` for state + version ≥ 19.09 and `""` otherwise. ''; }; }; @@ -229,7 +229,7 @@ in "null" for state version ≥ 21.11 ''; description = '' - Keyboard configuration. Set to null to + Keyboard configuration. Set to `null` to disable Home Manager keyboard management. ''; }; @@ -246,11 +246,11 @@ in description = '' An attribute set that maps aliases (the top level attribute names in this option) to command strings or directly to build outputs. - + This option should only be used to manage simple aliases that are compatible across all shells. If you need to use a shell specific feature then make sure to use a shell specific option, for example - for Bash. + [](#opt-programs.bash.shellAliases) for Bash. ''; }; @@ -260,34 +260,43 @@ in example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; }; description = '' Environment variables to always set at login. - + The values may refer to other environment variables using POSIX.2 style variable references. For example, a variable - parameter may be referenced as - $parameter or ''${parameter}. A - default value foo may be given as per - ''${parameter:-foo} and, similarly, an alternate - value bar can be given as per - ''${parameter:+bar}. - + {var}`parameter` may be referenced as + `$parameter` or `''${parameter}`. A + default value `foo` may be given as per + `''${parameter:-foo}` and, similarly, an alternate + value `bar` can be given as per + `''${parameter:+bar}`. + Note, these variables may be set in any order so no session variable may have a runtime dependency on another session variable. In particular code like - + ```nix home.sessionVariables = { FOO = "Hello"; BAR = "$FOO World!"; }; - + ``` may not work as expected. If you need to reference another session variable, then do so inside Nix instead. The above example then becomes - + ```nix home.sessionVariables = { FOO = "Hello"; BAR = "''${config.home.sessionVariables.FOO} World!"; }; - + ``` + ''; + }; + + home.sessionVariablesPackage = mkOption { + type = types.package; + internal = true; + description = '' + The package containing the + {file}`hm-session-vars.sh` file. ''; }; @@ -300,14 +309,12 @@ in ".git/safe/../../bin" ]; description = '' - Extra directories to add to PATH. + Extra directories to add to {env}`PATH`. - - - These directories are added to the PATH variable in a - double-quoted context, so expressions like $HOME are - expanded by the shell. However, since expressions like ~ or - * are escaped, they will end up in the PATH + These directories are added to the {env}`PATH` variable in a + double-quoted context, so expressions like `$HOME` are + expanded by the shell. However, since expressions like `~` or + `*` are escaped, they will end up in the {env}`PATH` verbatim. ''; }; @@ -318,7 +325,7 @@ in internal = true; description = '' Extra configuration to add to the - hm-session-vars.sh file. + {file}`hm-session-vars.sh` file. ''; }; @@ -334,7 +341,7 @@ in example = [ "doc" "info" "devdoc" ]; description = '' List of additional package outputs of the packages - home.packages that should be installed into + {var}`home.packages` that should be installed into the user environment. ''; }; @@ -354,9 +361,9 @@ in ''; description = '' Whether the activation script should start with an empty - PATH variable. When false then the - user's PATH will be accessible in the script. It is - recommended to keep this at true to avoid + {env}`PATH` variable. When `false` then the + user's {env}`PATH` will be accessible in the script. It is + recommended to keep this at `true` to avoid uncontrolled use of tools found in PATH. ''; }; @@ -378,35 +385,29 @@ in meaning running twice or more times produces the same result as running it once. - - If the script block produces any observable side effect, such as writing or deleting files, then it - must be placed after the special - writeBoundary script block. Prior to the + *must* be placed after the special + `writeBoundary` script block. Prior to the write boundary one can place script blocks that verifies, but does not modify, the state of the system and exits if an unexpected state is found. For example, the - checkLinkTargets script block checks for + `checkLinkTargets` script block checks for collisions between non-managed files and files defined in - . + [](#opt-home.file). - - - A script block should respect the DRY_RUN + 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 DRY_RUN_CMD is set to - echo if dry run is enabled. - - + The variable {var}`DRY_RUN_CMD` is set to + {command}`echo` if dry run is enabled. A script block should also respect the - VERBOSE variable, and if set print + {var}`VERBOSE` variable, and if set print information on standard out that may be useful for debugging any issue that may arise. The variable - VERBOSE_ARG is set to - if verbose output is enabled. + {var}`VERBOSE_ARG` is set to + {option}`--verbose` if verbose output is enabled. ''; }; @@ -421,7 +422,7 @@ in type = types.listOf types.package; default = [ ]; description = '' - Extra packages to add to PATH within the activation + Extra packages to add to {env}`PATH` within the activation script. ''; }; @@ -446,14 +447,14 @@ in home.enableNixpkgsReleaseCheck = mkOption { type = types.bool; - default = false; # Temporarily disabled until release stabilizes. + default = true; description = '' Determines whether to check for release version mismatch between Home Manager and Nixpkgs. Using mismatched versions is likely to cause errors and unexpected behavior. It is therefore highly recommended to use a - release of Home Manager than corresponds with your chosen release of + release of Home Manager that corresponds with your chosen release of Nixpkgs. - + When this option is enabled and a mismatch is detected then a warning will be printed when the user configuration is being built. ''; @@ -474,8 +475,8 @@ in warnings = let - hmRelease = fileContents ../.release; - nixpkgsRelease = pkgs.lib.trivial.release; + hmRelease = config.home.version.release; + nixpkgsRelease = lib.trivial.release; releaseMismatch = config.home.enableNixpkgsReleaseCheck && hmRelease != nixpkgsRelease; @@ -488,7 +489,7 @@ in Using mismatched versions is likely to cause errors and unexpected behavior. It is therefore highly recommended to use a release of Home - Manager than corresponds with your chosen release of Nixpkgs. + Manager that corresponds with your chosen release of Nixpkgs. If you insist then you can disable this warning by adding @@ -508,6 +509,8 @@ in if config.submoduleSupport.enable && config.submoduleSupport.externalPackageInstall then "/etc/profiles/per-user/${cfg.username}" + else if config.nix.enable && (config.nix.settings.use-xdg-base-directories or false) + then "${config.xdg.stateHome}/nix/profile" else cfg.homeDirectory + "/.nix-profile"; programs.bash.shellAliases = cfg.shellAliases; @@ -542,24 +545,22 @@ in // (maybeSet "LC_MEASUREMENT" cfg.language.measurement); - home.packages = [ - # Provide a file holding all session variables. - ( - pkgs.writeTextFile { - name = "hm-session-vars.sh"; - destination = "/etc/profile.d/hm-session-vars.sh"; - text = '' - # Only source this once. - if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi - export __HM_SESS_VARS_SOURCED=1 + # Provide a file holding all session variables. + home.sessionVariablesPackage = pkgs.writeTextFile { + name = "hm-session-vars.sh"; + destination = "/etc/profile.d/hm-session-vars.sh"; + text = '' + # Only source this once. + if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi + export __HM_SESS_VARS_SOURCED=1 - ${config.lib.shell.exportAll cfg.sessionVariables} - '' + lib.optionalString (cfg.sessionPath != [ ]) '' - export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}" - '' + cfg.sessionVariablesExtra; - } - ) - ]; + ${config.lib.shell.exportAll cfg.sessionVariables} + '' + lib.optionalString (cfg.sessionPath != [ ]) '' + export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}" + '' + cfg.sessionVariablesExtra; + }; + + home.packages = [ config.home.sessionVariablesPackage ]; # A dummy entry acting as a boundary between the activation # script's "check" and the "write" phases. @@ -584,7 +585,7 @@ in if config.submoduleSupport.externalPackageInstall then '' - if [[ -e "$nixProfilePath"/manifest.json ]] ; then + if [[ -e $HOME/.nix-profile/manifest.json ]] ; then nix profile list \ | { grep 'home-manager-path$' || test $? = 1; } \ | cut -d ' ' -f 4 \ @@ -597,18 +598,32 @@ in '' 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)" - nix profile list \ - | { grep 'home-manager-path$' || test $? = 1; } \ - | cut -d ' ' -f 4 \ - | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG + nixRemoveProfileByName 'home-manager-path' $DRY_RUN_CMD $oldNix profile install $1 } - if [[ -e "$nixProfilePath"/manifest.json ]] ; then + if [[ -e $HOME/.nix-profile/manifest.json ]] ; then INSTALL_CMD="nix profile install" INSTALL_CMD_ACTUAL="nixReplaceProfile" LIST_CMD="nix profile list" @@ -625,7 +640,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 nixReplaceProfile + unset -f nixProfileList nixRemoveProfileByName nixReplaceProfile unset INSTALL_CMD INSTALL_CMD_ACTUAL LIST_CMD REMOVE_CMD_SYNTAX '' ); @@ -677,6 +692,7 @@ in gettext gnugrep gnused + jq ncurses # For `tput`. ] ++ config.home.extraActivationPath @@ -702,6 +718,11 @@ in ${builtins.readFile ./lib-bash/activation-init.sh} + if [[ ! -v SKIP_SANITY_CHECKS ]]; then + checkUsername ${escapeShellArg config.home.username} + checkHomeDirectory ${escapeShellArg config.home.homeDirectory} + fi + ${activationCmds} ''; in diff --git a/third_party/home-manager/modules/i18n/input-method/default.nix b/third_party/home-manager/modules/i18n/input-method/default.nix index 27b3ae86dd..5e3a89b33a 100644 --- a/third_party/home-manager/modules/i18n/input-method/default.nix +++ b/third_party/home-manager/modules/i18n/input-method/default.nix @@ -22,8 +22,7 @@ let ''; in { - imports = - [ ./fcitx.nix ./fcitx5.nix ./hime.nix ./kime.nix ./nabi.nix ./uim.nix ]; + imports = [ ./fcitx5.nix ./hime.nix ./kime.nix ./nabi.nix ./uim.nix ]; options.i18n = { inputMethod = { @@ -31,55 +30,34 @@ in { type = types.nullOr (types.enum [ "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]); default = null; - example = "fcitx"; + example = "fcitx5"; description = '' - Select the enabled input method. Input methods is a software to input + Select the enabled input method. Input methods are software to input symbols that are not available on standard input devices. - - Input methods are specially used to input Chinese, Japanese and Korean - characters. - + + Input methods are especially used to input Chinese, Japanese and + Korean characters. + Currently the following input methods are available in Home Manager: - - - fcitx - - A customizable lightweight input method - extra input engines can be added using - i18n.inputMethod.fcitx.engines. - - - - fcitx5 - - The next generation of fcitx, - addons (including engines, dictionaries, skins) can be added using - i18n.inputMethod.fcitx5.addons. - - - - nabi - - A Korean input method based on XIM. Nabi doesn't support Qt 5. - - - - uim - - The universal input method, is a library with a XIM bridge. - uim mainly support Chinese, Japanese and Korean. - - - - hime - An extremely easy-to-use input method framework. - - - kime - A Korean IME. - - + `fcitx5` + : A customizable lightweight input method. + The next generation of fcitx. + Addons (including engines, dictionaries, skins) can be added using + [](#opt-i18n.inputMethod.fcitx5.addons). + + `nabi` + : A Korean input method based on XIM. Nabi doesn't support Qt 5. + + `uim` + : The "universal input method" is a library with an XIM bridge. + uim mainly supports Chinese, Japanese and Korean. + + `hime` + : An extremely easy-to-use input method framework. + + `kime` + : A Korean IME. ''; }; @@ -97,6 +75,10 @@ in { config = mkIf (cfg.enabled != null) { assertions = [ (hm.assertions.assertPlatform "i18n.inputMethod" pkgs platforms.linux) + { + assertion = cfg.enabled != "fcitx"; + message = "fcitx has been removed, please use fcitx5 instead"; + } ]; home.packages = [ cfg.package gtk2Cache gtk3Cache ]; diff --git a/third_party/home-manager/modules/i18n/input-method/fcitx.nix b/third_party/home-manager/modules/i18n/input-method/fcitx.nix deleted file mode 100644 index f7d1b41a94..0000000000 --- a/third_party/home-manager/modules/i18n/input-method/fcitx.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.i18n.inputMethod.fcitx; - fcitxPackage = pkgs.fcitx.override { plugins = cfg.engines; }; - fcitxEngine = types.package // { - name = "fcitx-engine"; - check = x: - types.package.check x && attrByPath [ "meta" "isFcitxEngine" ] false x; - }; -in { - options = { - - i18n.inputMethod.fcitx = { - engines = mkOption { - type = with types; listOf fcitxEngine; - default = [ ]; - example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]"; - description = let - enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines; - engines = concatStringsSep ", " - (map (name: "${name}") (attrNames enginesDrv)); - in "Enabled Fcitx engines. Available engines are: ${engines}."; - }; - }; - - }; - - config = mkIf (config.i18n.inputMethod.enabled == "fcitx") { - i18n.inputMethod.package = fcitxPackage; - - home.sessionVariables = { - GTK_IM_MODULE = "fcitx"; - QT_IM_MODULE = "fcitx"; - XMODIFIERS = "@im=fcitx"; - }; - - systemd.user.services.fcitx-daemon = { - Unit = { - Description = "Fcitx input method editor"; - PartOf = [ "graphical-session.desktop" ]; - }; - Service.ExecStart = "${fcitxPackage}/bin/fcitx"; - Install.WantedBy = [ "graphical-session.target" ]; - }; - }; - -} 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 70f3219001..5608b54e43 100644 --- a/third_party/home-manager/modules/i18n/input-method/kime.nix +++ b/third_party/home-manager/modules/i18n/input-method/kime.nix @@ -28,7 +28,7 @@ in { ''; description = '' kime configuration. Refer to - + for details on supported values. ''; }; diff --git a/third_party/home-manager/modules/launchd/default.nix b/third_party/home-manager/modules/launchd/default.nix index 34fefc1751..90e5360de1 100644 --- a/third_party/home-manager/modules/launchd/default.nix +++ b/third_party/home-manager/modules/launchd/default.nix @@ -19,16 +19,16 @@ let example = literalExpression '' { ProgramArguments = [ "/usr/bin/say" "Good afternoon" ]; - StartCalendarInterval = { - Hour = 12; - Minute = 0; - }; + StartCalendarInterval = [ + { + Hour = 12; + Minute = 0; + } + ]; } ''; description = '' - Define a launchd job. See - launchd.plist5 - for details. + Define a launchd job. See {manpage}`launchd.plist(5)` for details. ''; }; }; diff --git a/third_party/home-manager/modules/launchd/launchd.nix b/third_party/home-manager/modules/launchd/launchd.nix index 2e0e65859d..9c9b54452f 100644 --- a/third_party/home-manager/modules/launchd/launchd.nix +++ b/third_party/home-manager/modules/launchd/launchd.nix @@ -1,7 +1,7 @@ # launchd option type from nix-darwin # # Original Source: -# https://github.com/LnL7/nix-darwin/blob/a34dea2/modules/launchd/launchd.nix +# https://github.com/LnL7/nix-darwin/blob/14a12e9/modules/launchd/launchd.nix # Copyright 2017 Daiderd Jordan # @@ -28,6 +28,8 @@ with lib; { + freeformType = with types; attrsOf anything; # added by Home Manager + options = { Label = mkOption { type = types.str; @@ -38,17 +40,17 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - This optional key is used as a hint to launchctl(1) that it should not submit this job to launchd when + This optional key is used as a hint to `launchctl(1)` that it should not submit this job to launchd when loading a job or jobs. The value of this key does NOT reflect the current state of the job on the running system. If you wish to know whether a job is loaded in launchd, reading this key from a configuration file yourself is not a sufficient test. You should query launchd for the presence of the job using - the launchctl(1) list subcommand or use the ServiceManagement framework's - SMJobCopyDictionary() method. + the `launchctl(1)` list subcommand or use the ServiceManagement framework's + `SMJobCopyDictionary()` method. Note that as of Mac OS X v10.6, this key's value in a configuration file conveys a default value, which - is changed with the [-w] option of the launchctl(1) load and unload subcommands. These subcommands no + is changed with the [-w] option of the `launchctl(1)` load and unload subcommands. These subcommands no longer modify the configuration file, so the value displayed in the configuration file is not necessarily - the value that launchctl(1) will apply. See launchctl(1) for more information. + the value that `launchctl(1)` will apply. See `launchctl(1)` for more information. Please also be mindful that you should only use this key if the provided on-demand and KeepAlive criteria are insufficient to describe the conditions under which your job needs to run. The cost to have a @@ -89,7 +91,7 @@ with lib; default = null; description = '' This flag corresponds to the "wait" or "nowait" option of inetd. If true, then the listening - socket is passed via the standard in/out/error file descriptors. If false, then accept(2) is + socket is passed via the standard in/out/error file descriptors. If false, then `accept(2)` is called on behalf of the job, and the result is passed via the standard in/out/error descriptors. ''; }; @@ -101,8 +103,8 @@ with lib; type = types.nullOr (types.listOf types.str); default = null; description = '' - This configuration file only applies to the hosts listed with this key. Note: One should set kern.host-name kern.hostname - name in sysctl.conf(5) for this feature to work reliably. + This configuration file only applies to the hosts listed with this key. Note: One should set kern.hostname + in `sysctl.conf(5)` for this feature to work reliably. ''; }; @@ -110,8 +112,8 @@ with lib; type = types.nullOr (types.listOf types.str); default = null; description = '' - This configuration file only applies to hosts NOT listed with this key. Note: One should set kern.host-name kern.hostname - name in sysctl.conf(5) for this feature to work reliably. + This configuration file only applies to hosts NOT listed with this key. Note: One should set kern.hostname + in `sysctl.conf(5)` for this feature to work reliably. ''; }; @@ -120,7 +122,7 @@ with lib; default = null; description = '' This configuration file only applies to sessions of the type specified. This key is used in concert - with the -S flag to launchctl. + with the -S flag to {command}`launchctl`. ''; }; @@ -128,7 +130,7 @@ with lib; type = types.nullOr types.path; default = null; description = '' - This key maps to the first argument of execvp(3). If this key is missing, then the first element of + This key maps to the first argument of `execvp(3)`. If this key is missing, then the first element of the array of strings provided to the ProgramArguments will be used instead. This key is required in the absence of the ProgramArguments key. ''; @@ -138,8 +140,8 @@ with lib; type = types.nullOr (types.listOf types.str); default = null; description = '' - This key maps to the second argument of execvp(3). This key is required in the absence of the Program - key. Please note: many people are confused by this key. Please read execvp(3) very carefully! + This key maps to the second argument of `execvp(3)`. This key is required in the absence of the Program + key. Please note: many people are confused by this key. Please read `execvp(3)` very carefully! ''; }; @@ -147,7 +149,7 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - This flag causes launchd to use the glob(3) mechanism to update the program arguments before invocation. + This flag causes launchd to use the `glob(3)` mechanism to update the program arguments before invocation. ''; }; @@ -155,8 +157,8 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - This flag instructs launchd that the job promises to use vproc_transaction_begin(3) and - vproc_transaction_end(3) to track outstanding transactions that need to be reconciled before the + This flag instructs launchd that the job promises to use `vproc_transaction_begin(3)` and + `vproc_transaction_end(3)` to track outstanding transactions that need to be reconciled before the process can safely terminate. If no outstanding transactions are in progress, then launchd is free to send the SIGKILL signal. ''; @@ -218,17 +220,21 @@ with lib; ''; }; - # NOTE: this was missing in the original source at the time of writing Crashed = mkOption { type = types.nullOr types.bool; default = null; description = '' If true, the the job will be restarted as long as it exited due to a signal which is typically - associated with a crash (SIGILL, SIGSEGV, etc.). If false, the job will be restarted in the inverse - condition. + associated with a crash (SIGILL, SIGSEGV, etc.). If false, the job will be restarted in the + inverse condition. ''; }; + AfterInitialDemand = mkOption { + type = types.nullOr types.bool; + default = null; + }; + }; })); default = null; @@ -240,7 +246,7 @@ with lib; multiple keys are provided, launchd ORs them, thus providing maximum flexibility to the job to refine the logic and stall if necessary. If launchd finds no reason to restart the job, it falls back on demand based invocation. Jobs that exit quickly and frequently when configured to be kept alive will - be throttled to conserve system resources. + be throttled to converve system resources. ''; }; @@ -257,7 +263,7 @@ with lib; type = types.nullOr types.str; default = null; description = '' - This optional key is used to specify a directory to chroot(2) to before running the job. + This optional key is used to specify a directory to `chroot(2)` to before running the job. ''; }; @@ -265,7 +271,7 @@ with lib; type = types.nullOr types.str; default = null; description = '' - This optional key is used to specify a directory to chdir(2) to before running the job. + This optional key is used to specify a directory to `chdir(2)` to before running the job. ''; }; @@ -282,7 +288,7 @@ with lib; type = types.nullOr types.int; default = null; description = '' - This optional key specifies what value should be passed to umask(2) before running the job. Known bug: + This optional key specifies what value should be passed to `umask(2)` before running the job. Known bug: Property lists don't support octal, so please convert the value to decimal. ''; }; @@ -321,7 +327,7 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - This optional key specifies whether initgroups(3) should be called before running the job. The default + This optional key specifies whether `initgroups(3)` should be called before running the job. The default is true in 10.5 and false in 10.4. This key will be ignored if the UserName key is not set. ''; }; @@ -369,7 +375,7 @@ with lib; }; description = '' This optional key causes the job to be started every calendar interval as specified. Missing arguments - are considered to be wildcard. The semantics are much like crontab(5). Unlike cron which skips job + are considered to be wildcard. The semantics are much like `crontab(5)`. Unlike cron which skips job invocations when the computer is asleep, launchd will start the job the next time the computer wakes up. If multiple intervals transpire before the computer is woken, those events will be coalesced into one event upon wake from sleep. @@ -424,7 +430,7 @@ with lib; default = null; description = '' This optional key specifies what file should be used for data being supplied to stdin when using - stdio(3). + `stdio(3)`. ''; }; @@ -432,7 +438,7 @@ with lib; type = types.nullOr types.path; default = null; description = '' - This optional key specifies what file should be used for data being sent to stdout when using stdio(3). + This optional key specifies what file should be used for data being sent to stdout when using `stdio(3)`. ''; }; @@ -440,7 +446,7 @@ with lib; type = types.nullOr types.path; default = null; description = '' - This optional key specifies what file should be used for data being sent to stderr when using stdio(3). + This optional key specifies what file should be used for data being sent to stderr when using `stdio(3)`. ''; }; @@ -465,7 +471,7 @@ with lib; SoftResourceLimits = mkOption { default = null; description = '' - Resource limits to be imposed on the job. These adjust variables set with setrlimit(2). The following + Resource limits to be imposed on the job. These adjust variables set with `setrlimit(2)`. The following keys apply: ''; type = types.nullOr (types.submodule { @@ -491,7 +497,7 @@ with lib; default = null; description = '' The maximum size (in bytes) of the data segment for a process; this defines how far a program may - extend its break with the sbrk(2) system call. + extend its break with the `sbrk(2)` system call. ''; }; @@ -516,8 +522,8 @@ with lib; default = null; description = '' The maximum number of open files for this process. Setting this value in a system wide daemon - will set the sysctl(3) kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResource-Limits) (HardResourceLimits) - Limits) value in addition to the setrlimit(2) values. + will set the `sysctl(3)` kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResourceLimits) + value in addition to the `setrlimit(2)` values. ''; }; @@ -526,8 +532,8 @@ with lib; default = null; description = '' The maximum number of simultaneous processes for this user id. Setting this value in a system - wide daemon will set the sysctl(3) kern.maxproc (SoftResourceLimits) or kern.maxprocperuid - (HardResourceLimits) value in addition to the setrlimit(2) values. + wide daemon will set the `sysctl(3)` kern.maxproc (SoftResourceLimits) or kern.maxprocperuid + (HardResourceLimits) value in addition to the `setrlimit(2)` values. ''; }; @@ -557,7 +563,7 @@ with lib; default = null; example = { NumberOfFiles = 4096; }; description = '' - Resource limits to be imposed on the job. These adjust variables set with setrlimit(2). The following + Resource limits to be imposed on the job. These adjust variables set with `setrlimit(2)`. The following keys apply: ''; type = types.nullOr (types.submodule { @@ -583,7 +589,7 @@ with lib; default = null; description = '' The maximum size (in bytes) of the data segment for a process; this defines how far a program may - extend its break with the sbrk(2) system call. + extend its break with the `sbrk(2)` system call. ''; }; @@ -599,7 +605,7 @@ with lib; type = types.nullOr types.int; default = null; description = '' - The maximum size (in bytes) which a process may lock into memory using the mlock(2) function. + The maximum size (in bytes) which a process may lock into memory using the `mlock(2)` function. ''; }; @@ -608,8 +614,8 @@ with lib; default = null; description = '' The maximum number of open files for this process. Setting this value in a system wide daemon - will set the sysctl(3) kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResource-Limits) (HardResourceLimits) - Limits) value in addition to the setrlimit(2) values. + will set the `sysctl(3)` kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResourceLimits) + value in addition to the `setrlimit(2)` values. ''; }; @@ -618,8 +624,8 @@ with lib; default = null; description = '' The maximum number of simultaneous processes for this user id. Setting this value in a system - wide daemon will set the sysctl(3) kern.maxproc (SoftResourceLimits) or kern.maxprocperuid - (HardResourceLimits) value in addition to the setrlimit(2) values. + wide daemon will set the `sysctl(3)` kern.maxproc (SoftResourceLimits) or kern.maxprocperuid + (HardResourceLimits) value in addition to the `setrlimit(2)` values. ''; }; @@ -664,21 +670,21 @@ with lib; resource limits to the job, throttling its CPU usage and I/O bandwidth. The following are valid values: Background - Background jobs are generally processes that do work that was not directly requested by the user. - The resource limits applied to Background jobs are intended to prevent them from disrupting the - user experience. + : Background jobs are generally processes that do work that was not directly requested by the user. + The resource limits applied to Background jobs are intended to prevent them from disrupting the + user experience. Standard - Standard jobs are equivalent to no ProcessType being set. + : Standard jobs are equivalent to no ProcessType being set. Adaptive - Adaptive jobs move between the Background and Interactive classifications based on activity over - XPC connections. See xpc_transaction_begin(3) for details. + : Adaptive jobs move between the Background and Interactive classifications based on activity over + XPC connections. See {manpage}`xpc_transaction_begin(3)` for details. Interactive - Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive - jobs are critical to maintaining a responsive user experience, and this key should only be - used if an app's ability to be responsive depends on it, and cannot be made Adaptive. + : Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive + jobs are critical to maintaining a responsive user experience, and this key should only be + used if an app's ability to be responsive depends on it, and cannot be made Adaptive. ''; }; @@ -686,7 +692,7 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - When a job dies, launchd kills any remaining processes with the same process group ID as the job. Setting + When a job dies, launchd kills any remaining processes with the same process group ID as the job. Setting this key to true disables that behavior. ''; }; @@ -728,8 +734,8 @@ with lib; description = '' If this boolean is false, the port is recycled, thus leaving clients to remain oblivious to the demand nature of job. If the value is set to true, clients receive port death notifications when - the job lets go of the receive right. The port will be recreated atomically with respect to boot-strap_look_up() bootstrap_look_up() - strap_look_up() calls, so that clients can trust that after receiving a port death notification, + the job lets go of the receive right. The port will be recreated atomically with respect to bootstrap_look_up() + calls, so that clients can trust that after receiving a port death notification, the new port will have already been recreated. Setting the value to true should be done with care. Not all clients may be able to handle this behavior. The default value is false. ''; @@ -747,6 +753,31 @@ with lib; }); }; + LaunchEvents = mkOption { + type = types.nullOr (types.attrs); + default = null; + description = '' + Specifies higher-level event types to be used as launch-on-demand event + sources. Each sub-dictionary defines events for a particular event + subsystem, such as "com.apple.iokit.matching", which can be used to + launch jobs based on the appearance of nodes in the IORegistry. Each + dictionary within the sub-dictionary specifies an event descriptor that + is specified to each event subsystem. With this key, the job promises to + use the xpc_set_event_stream_handler(3) API to consume events. See + xpc_events(3) for more details on event sources. + ''; + example = { + "com.apple.iokit.matching" = { + "com.apple.usb.device" = { + IOMatchLaunchStream = true; + IOProviderClass = "IOUSBDevice"; + idProduct = "*"; + idVendor = "*"; + }; + }; + }; + }; + Sockets = mkOption { default = null; description = '' @@ -759,7 +790,7 @@ with lib; to be effectively equivalent, even though each file descriptor likely represents a different networking protocol which conforms to the criteria specified in the job configuration file. - The parameters below are used as inputs to call getaddrinfo(3). + The parameters below are used as inputs to call `getaddrinfo(3)`. ''; type = types.nullOr (types.attrsOf (types.submodule { options = { @@ -776,7 +807,7 @@ with lib; type = types.nullOr types.bool; default = null; description = '' - This optional key specifies whether listen(2) or connect(2) should be called on the created file + This optional key specifies whether `listen(2)` or `connect(2)` should be called on the created file descriptor. The default is true ("to listen"). ''; }; @@ -785,7 +816,7 @@ with lib; type = types.nullOr types.str; default = null; description = '' - This optional key specifies the node to connect(2) or bind(2) to. + This optional key specifies the node to `connect(2)` or `bind(2)` to. ''; }; @@ -793,7 +824,7 @@ with lib; type = types.nullOr types.str; default = null; description = '' - This optional key specifies the service on the node to connect(2) or bind(2) to. + This optional key specifies the service on the node to `connect(2)` or `bind(2)` to. ''; }; @@ -809,7 +840,7 @@ with lib; type = types.nullOr (types.enum [ "TCP" ]); default = null; description = '' - This optional key specifies the protocol to be passed to socket(2). The only value understood by + This optional key specifies the protocol to be passed to `socket(2)`. The only value understood by this key at the moment is "TCP". ''; }; @@ -818,8 +849,8 @@ with lib; type = types.nullOr types.path; default = null; description = '' - This optional key implies SockFamily is set to "Unix". It specifies the path to connect(2) or - bind(2) to. + This optional key implies SockFamily is set to "Unix". It specifies the path to `connect(2)` or + `bind(2)` to. ''; }; @@ -848,8 +879,7 @@ with lib; default = null; description = '' This optional key can be used to request that the service be registered with the - mDNSResponder(8). If the value is boolean, the service name is inferred from the SockService-Name. SockServiceName. - Name. + `mDNSResponder(8)`. If the value is boolean, the service name is inferred from the SockServiceName. ''; }; @@ -858,9 +888,9 @@ with lib; default = null; description = '' This optional key can be used to request that the datagram socket join a multicast group. If the - value is a hostname, then getaddrinfo(3) will be used to join the correct multicast address for a - given socket family. If an explicit IPv4 or IPv6 address is given, it is required that the Sock-Family SockFamily - Family family also be set, otherwise the results are undefined. + value is a hostname, then `getaddrinfo(3)` will be used to join the correct multicast address for a + given socket family. If an explicit IPv4 or IPv6 address is given, it is required that the SockFamily + family also be set, otherwise the results are undefined. ''; }; }; 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 aadc88dd35..881b63a8f5 100755 --- a/third_party/home-manager/modules/lib-bash/activation-init.sh +++ b/third_party/home-manager/modules/lib-bash/activation-init.sh @@ -1,16 +1,66 @@ -#!/usr/bin/env bash +# Moves the existing profile from /nix or $XDG_STATE_HOME/home-manager to +# $XDG_STATE_HOME/nix to match changed behavior in Nix 2.14. See +# https://github.com/NixOS/nix/pull/5226. +function migrateProfile() { + declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}" + declare -r userNixStateDir="$stateHome/nix" + declare -r hmStateDir="$stateHome/home-manager" + + declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}" + declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER" + + if [[ -e $globalProfilesDir/home-manager ]]; then + declare -r oldProfilesDir="$globalProfilesDir" + elif [[ -e $hmStateDir/profiles/home-manager ]]; then + declare -r oldProfilesDir="$hmStateDir/profiles" + fi + + declare -r newProfilesDir="$userNixStateDir/profiles" + + if [[ -v oldProfilesDir && -e $newProfilesDir ]]; then + if [[ ! -e $newProfilesDir/home-manager ]]; then + _i 'Migrating profile from %s to %s' "$oldProfilesDir" "$newProfilesDir" + for p in "$oldProfilesDir"/home-manager-*; do + declare name="${p##*/}" + nix-store --realise "$p" --add-root "$newProfilesDir/$name" > /dev/null + done + cp -P "$oldProfilesDir/home-manager" "$newProfilesDir" + fi + + rm "$oldProfilesDir/home-manager" "$oldProfilesDir"/home-manager-* + fi +} function setupVars() { - local nixStateDir="${NIX_STATE_DIR:-/nix/var/nix}" - local profilesPath="$nixStateDir/profiles/per-user/$USER" - local gcPath="$nixStateDir/gcroots/per-user/$USER" + declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}" + declare -r userNixStateDir="$stateHome/nix" + declare -r hmGcrootsDir="$stateHome/home-manager/gcroots" - declare -gr nixProfilePath="$profilesPath/profile" - declare -gr genProfilePath="$profilesPath/home-manager" + 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" + + # If the user Nix profiles path exists, then place the HM profile there. + # Otherwise, if the global Nix per-user state directory exists then use + # that. If neither exists, then we give up. + # + # shellcheck disable=2174 + if [[ -d $userNixStateDir/profiles ]]; then + declare -r profilesDir="$userNixStateDir/profiles" + elif [[ -d $globalProfilesDir ]]; then + declare -r profilesDir="$globalProfilesDir" + else + _iError 'Could not find suitable profile directory, tried %s and %s' \ + "$userNixStateDir/profiles" "$globalProfilesDir" >&2 + exit 1 + fi + + declare -gr genProfilePath="$profilesDir/home-manager" declare -gr newGenPath="@GENERATION_DIR@"; - declare -gr newGenGcPath="$gcPath/current-home" + declare -gr newGenGcPath="$hmGcrootsDir/current-home" + declare -gr legacyGenGcPath="$globalGcrootsDir/current-home" - local greatestGenNum + declare greatestGenNum greatestGenNum=$( \ nix-env --list-generations --profile "$genProfilePath" \ | tail -1 \ @@ -23,9 +73,9 @@ function setupVars() { declare -gr newGenNum=1 fi - if [[ -e $profilesPath/home-manager ]] ; then - oldGenPath="$(readlink -e "$profilesPath/home-manager")" - declare -gr oldGenPath + if [[ -e $genProfilePath ]] ; then + declare -g oldGenPath + oldGenPath="$(readlink -e "$genProfilePath")" fi $VERBOSE_RUN _i "Sanity checking oldGenNum and oldGenPath" @@ -33,11 +83,29 @@ function setupVars() { || ! -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!' \ "${oldGenNum:-}" "${oldGenPath:-}" \ - "$profilesPath" "$gcPath" + "$profilesDir" "$hmGcrootsDir" exit 1 fi } +function checkUsername() { + local expectedUser="$1" + + if [[ "$USER" != "$expectedUser" ]]; then + _iError 'Error: USER is set to "%s" but we expect "%s"' "$USER" "$expectedUser" + exit 1 + fi +} + +function checkHomeDirectory() { + local expectedHome="$1" + + if ! [[ $HOME -ef $expectedHome ]]; then + _iError 'Error: HOME is set to "%s" but we expect "%s"' "$HOME" "$expectedHome" + exit 1 + fi +} + if [[ -v VERBOSE ]]; then export VERBOSE_ECHO=echo export VERBOSE_ARG="--verbose" @@ -55,14 +123,20 @@ _i "Starting Home Manager activation" $VERBOSE_RUN _i "Sanity checking Nix" nix-build --expr '{}' --no-out-link +# Also make sure that the Nix profiles path is created. +nix-env -q > /dev/null 2>&1 || true + +migrateProfile setupVars 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" export DRY_RUN_CMD="" + export DRY_RUN_NULL=/dev/null fi if [[ -v VERBOSE ]]; then @@ -79,5 +153,6 @@ else fi $VERBOSE_ECHO " newGenPath=$newGenPath" $VERBOSE_ECHO " newGenNum=$newGenNum" -$VERBOSE_ECHO " newGenGcPath=$newGenGcPath" $VERBOSE_ECHO " genProfilePath=$genProfilePath" +$VERBOSE_ECHO " newGenGcPath=$newGenGcPath" +$VERBOSE_ECHO " legacyGenGcPath=$legacyGenGcPath" diff --git a/third_party/home-manager/modules/lib/dag.nix b/third_party/home-manager/modules/lib/dag.nix index 50044a0b73..b9e75e8c8e 100644 --- a/third_party/home-manager/modules/lib/dag.nix +++ b/third_party/home-manager/modules/lib/dag.nix @@ -9,7 +9,7 @@ { lib }: -let inherit (lib) all filterAttrs hm mapAttrs toposort; +let inherit (lib) all filterAttrs head hm mapAttrs length tail toposort; in { empty = { }; @@ -100,4 +100,30 @@ in { entryAfter = hm.dag.entryBetween [ ]; entryBefore = before: hm.dag.entryBetween before [ ]; + + # Given a list of entries, this function places them in order within the DAG. + # Each entry is labeled "${tag}-${entry index}" and other DAG entries can be + # added with 'before' or 'after' referring these indexed entries. + # + # The entries as a whole can be given a relation to other DAG nodes. All + # generated nodes are then placed before or after those dependencies. + entriesBetween = tag: + let + go = i: before: after: entries: + let + name = "${tag}-${toString i}"; + i' = i + 1; + in if entries == [ ] then + hm.dag.empty + else if length entries == 1 then { + "${name}" = hm.dag.entryBetween before after (head entries); + } else + { + "${name}" = hm.dag.entryAfter after (head entries); + } // go (i + 1) before [ name ] (tail entries); + in go 0; + + entriesAnywhere = tag: hm.dag.entriesBetween tag [ ] [ ]; + entriesAfter = tag: hm.dag.entriesBetween tag [ ]; + entriesBefore = tag: before: hm.dag.entriesBetween tag before [ ]; } diff --git a/third_party/home-manager/modules/lib/default.nix b/third_party/home-manager/modules/lib/default.nix index 59f707c4ea..5d732a83f8 100644 --- a/third_party/home-manager/modules/lib/default.nix +++ b/third_party/home-manager/modules/lib/default.nix @@ -6,6 +6,7 @@ rec { assertions = import ./assertions.nix { inherit lib; }; booleans = import ./booleans.nix { inherit lib; }; + generators = import ./generators.nix { inherit lib; }; gvariant = import ./gvariant.nix { inherit lib; }; maintainers = import ./maintainers.nix; strings = import ./strings.nix { inherit lib; }; diff --git a/third_party/home-manager/modules/lib/file-type.nix b/third_party/home-manager/modules/lib/file-type.nix index 840122858d..cd3a3a627f 100644 --- a/third_party/home-manager/modules/lib/file-type.nix +++ b/third_party/home-manager/modules/lib/file-type.nix @@ -10,11 +10,20 @@ in # absolute path). # # Arguments: + # - opt the name of the option, for self-references # - basePathDesc docbook compatible description of the base path # - basePath the file base path - fileType = basePathDesc: basePath: types.attrsOf (types.submodule ( + fileType = opt: basePathDesc: basePath: types.attrsOf (types.submodule ( { name, config, ... }: { options = { + enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether this file should be generated. This option allows specific + files to be disabled. + ''; + }; target = mkOption { type = types.str; apply = p: @@ -22,7 +31,7 @@ in absPath = if hasPrefix "/" p then p else "${basePath}/${p}"; in removePrefix (homeDirectory + "/") absPath; - defaultText = literalExpression ""; + defaultText = literalExpression "name"; description = '' Path to target file relative to ${basePathDesc}. ''; @@ -33,7 +42,7 @@ in type = types.nullOr types.lines; description = '' Text of the file. If this option is null then - + [](#opt-${opt}._name_.source) must be set. ''; }; @@ -42,7 +51,7 @@ in type = types.path; description = '' Path of the source file or directory. If - + [](#opt-${opt}._name_.text) is non-null then this option will automatically point to a file containing that text. ''; @@ -52,9 +61,9 @@ in type = types.nullOr types.bool; default = null; description = '' - Set the execute bit. If null, defaults to the mode - of the source file or to false - for files created through the text option. + Set the execute bit. If `null`, defaults to the mode + of the {var}`source` file or to `false` + for files created through the {var}`text` option. ''; }; @@ -66,10 +75,10 @@ in determines whether the directory should be recursively linked to the target location. This option has no effect if the source is a file. - - If false (the default) then the target + + If `false` (the default) then the target will be a symbolic link to the source directory. If - true then the target will be a + `true` then the target will be a directory structure matching the source's but whose leafs are symbolic links to the files of the source directory. ''; @@ -81,10 +90,10 @@ in description = '' Shell commands to run when file has changed between generations. The script will be run - after the new files have been linked + *after* the new files have been linked into place. - - Note, this code is always run when recursive is + + Note, this code is always run when `recursive` is enabled. ''; }; @@ -107,7 +116,7 @@ in source = mkIf (config.text != null) ( mkDefault (pkgs.writeTextFile { inherit (config) text; - executable = if isNull config.executable then false else config.executable; + 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 new file mode 100644 index 0000000000..98a03ba210 --- /dev/null +++ b/third_party/home-manager/modules/lib/generators.nix @@ -0,0 +1,102 @@ +{ lib }: + +{ + toKDL = { }: + let + inherit (lib) concatStringsSep splitString 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 -> String + sanitizeString = replaceStrings [ "\n" ''"'' ] [ "\\n" ''\"'' ]; + + # OneOf [Int Float String Bool Null] -> String + literalValueToString = element: + lib.throwIfNot + (elem (typeOf element) [ "int" "float" "string" "bool" "null" ]) + "Cannot convert value of type ${typeOf element} to KDL literal." + (if typeOf element == "null" then + "null" + else if element == false then + "false" + else if element == true then + "true" + else if typeOf element == "string" then + ''"${sanitizeString element}"'' + else + toString element); + + # Attrset Conversion + # String -> AttrsOf Anything -> String + convertAttrsToKDL = name: attrs: + let + optArgsString = lib.optionalString (attrs ? "_args") + (lib.pipe attrs._args [ + (map literalValueToString) + (lib.concatStringsSep " ") + (s: s + " ") + ]); + + optPropsString = lib.optionalString (attrs ? "_props") + (lib.pipe attrs._props [ + (lib.mapAttrsToList + (name: value: "${name}=${literalValueToString value}")) + (lib.concatStringsSep " ") + (s: s + " ") + ]); + + children = + lib.filterAttrs (name: _: !(elem name [ "_args" "_props" ])) attrs; + in '' + ${name} ${optArgsString}${optPropsString}{ + ${indentStrings (mapAttrsToList convertAttributeToKDL children)} + }''; + + # List Conversion + # String -> ListOf (OneOf [Int Float String Bool Null]) -> String + convertListOfFlatAttrsToKDL = name: list: + let flatElements = map literalValueToString list; + in "${name} ${concatStringsSep " " flatElements}"; + + # String -> ListOf Anything -> String + convertListOfNonFlatAttrsToKDL = name: list: '' + ${name} { + ${indentStrings (map (x: convertAttributeToKDL "-" x) list)} + }''; + + # String -> ListOf Anything -> String + convertListToKDL = name: list: + let elementsAreFlat = !any (el: elem (typeOf el) [ "list" "set" ]) list; + in if elementsAreFlat then + convertListOfFlatAttrsToKDL name list + else + convertListOfNonFlatAttrsToKDL name list; + + # Combined Conversion + # String -> Anything -> String + convertAttributeToKDL = name: value: + let vType = typeOf value; + in if elem vType [ "int" "float" "bool" "null" "string" ] then + "${name} ${literalValueToString value}" + else if vType == "set" then + convertAttrsToKDL name value + else if vType == "list" then + convertListToKDL name value + else + throw '' + Cannot convert type `(${typeOf value})` to KDL: + ${name} = ${toString value} + ''; + in attrs: '' + ${concatStringsSep "\n" (mapAttrsToList convertAttributeToKDL attrs)} + ''; +} diff --git a/third_party/home-manager/modules/lib/maintainers.nix b/third_party/home-manager/modules/lib/maintainers.nix index 7aa1842af1..05d55b6782 100644 --- a/third_party/home-manager/modules/lib/maintainers.nix +++ b/third_party/home-manager/modules/lib/maintainers.nix @@ -37,6 +37,12 @@ github = "CarlosLoboxyz"; githubId = 86011416; }; + cvoges12 = { + name = "Clayton Voges"; + email = "38054771+cvoges12@users.noreply.github.com"; + github = "cvoges12"; + githubId = 38054771; + }; d-dervishi = { email = "david.dervishi@epfl.ch"; github = "d-dervishi"; @@ -47,6 +53,12 @@ fingerprint = "4C92 E3B0 21B5 5562 A1E0 CE3D B1C0 12F0 E769 7195"; }]; }; + Dines97 = { + name = "Denis Kaynar"; + email = "19364873+Dines97@users.noreply.github.com"; + github = "Dines97"; + githubId = 19364873; + }; dwagenk = { email = "dwagenk@mailbox.org"; github = "dwagenk"; @@ -153,6 +165,18 @@ github = "mifom"; githubId = 23462908; }; + nikp123 = { + name = "nikp123"; + email = "nikp123@users.noreply.github.com"; + github = "nikp123"; + githubId = 4696350; + }; + nilp0inter = { + name = "Roberto Abdelkader Martínez Pérez"; + email = "robertomartinezp@gmail.com"; + github = "nilp0inter"; + githubId = 1224006; + }; seylerius = { email = "sable@seyleri.us"; name = "Sable Seyler"; @@ -317,6 +341,12 @@ github = "sebtm"; githubId = 17243347; }; + rasmus-kirk = { + name = "Rasmus Kirk"; + email = "mail@rasmuskirk.com"; + github = "rasmus-kirk"; + githubId = 57323869; + }; rosuavio = { name = "Rosario Pulella"; email = "RosarioPulella@gmail.com"; @@ -351,6 +381,15 @@ github = "lukasngl"; githubId = 69244516; }; + soywod = { + name = "Clément DOUIN"; + email = "clement.douin@posteo.net"; + matrix = "@soywod:matrix.org"; + github = "soywod"; + githubId = 10437171; + keys = + [{ fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72"; }]; + }; toastal = { email = "toastal+nix@posteo.net"; matrix = "@toastal:matrix.org"; @@ -360,4 +399,29 @@ keys = [{ fingerprint = "7944 74B7 D236 DAB9 C9EF E7F9 5CCE 6F14 66D4 7C9E"; }]; }; + tomodachi94 = { + email = "tomodachi94+nixpkgs@protonmail.com"; + matrix = "@tomodachi94:matrix.org"; + github = "tomodachi94"; + githubId = 68489118; + name = "tomodachi94"; + }; + NateCox = { + name = "Nate Cox"; + email = "nate@natecox.dev"; + github = "natecox"; + githubId = 2782695; + }; + pedorich-n = { + name = "Mykyta Pedorich"; + email = "pedorich.n@gmail.com"; + github = "pedorich-n"; + githubId = 15573098; + }; + liyangau = { + name = "Li Yang"; + email = "d@aufomm.com"; + github = "liyangau"; + githubId = 71299093; + }; } diff --git a/third_party/home-manager/modules/lib/types-dag.nix b/third_party/home-manager/modules/lib/types-dag.nix index 46694f2ae5..5fdd582282 100644 --- a/third_party/home-manager/modules/lib/types-dag.nix +++ b/third_party/home-manager/modules/lib/types-dag.nix @@ -57,57 +57,4 @@ in rec { functor = (defaultFunctor name) // { wrapped = elemType; }; nestedTypes.elemType = elemType; }; - - # A directed acyclic graph of some inner type OR a list of that - # inner type. This is a temporary hack for use by the - # `programs.ssh.matchBlocks` and is only guaranteed to be vaguely - # correct! - # - # In particular, adding a dependency on one of the "unnamed-N-M" - # entries generated by a list value is almost guaranteed to destroy - # the list's order. - # - # This function will be removed in version 20.09. - listOrDagOf = elemType: - let - paddedIndexStr = list: i: - let padWidth = stringLength (toString (length list)); - in fixedWidthNumber padWidth i; - - convertAll = loc: defs: - let - convertListValue = namePrefix: def: - let - vs = def.value; - pad = paddedIndexStr vs; - makeEntry = i: v: nameValuePair "${namePrefix}.${pad i}" v; - warning = '' - In file ${def.file} - a list is being assigned to the option '${ - concatStringsSep "." loc - }'. - This will soon be an error due to the list form being deprecated. - Please use the attribute set form instead with DAG functions to - express the desired order of entries. - ''; - in warn warning (listToAttrs (imap1 makeEntry vs)); - - convertValue = i: def: - if isList def.value then - convertListValue "unnamed-${paddedIndexStr defs i}" def - else - def.value; - in imap1 (i: def: def // { value = convertValue i def; }) defs; - - dagType = dagOf elemType; - in mkOptionType rec { - name = "listOrDagOf"; - description = "list or DAG of ${elemType.description}s"; - check = x: isList x || dagType.check x; - merge = loc: defs: dagType.merge loc (convertAll loc defs); - getSubOptions = dagType.getSubOptions; - getSubModules = dagType.getSubModules; - substSubModules = m: listOrDagOf (elemType.substSubModules m); - functor = (defaultFunctor name) // { wrapped = elemType; }; - }; } diff --git a/third_party/home-manager/modules/lib/types.nix b/third_party/home-manager/modules/lib/types.nix index 0195bbfc8a..056d3165b0 100644 --- a/third_party/home-manager/modules/lib/types.nix +++ b/third_party/home-manager/modules/lib/types.nix @@ -14,7 +14,7 @@ let in rec { - inherit (typesDag) dagOf listOrDagOf; + inherit (typesDag) dagOf; selectorFunction = mkOptionType { name = "selectorFunction"; @@ -41,7 +41,7 @@ in rec { example = literalExpression "pkgs.dejavu_fonts"; description = '' Package providing the font. This package will be installed - to your profile. If null then the font + to your profile. If `null` then the font is assumed to already be available in your profile. ''; }; diff --git a/third_party/home-manager/modules/manual.nix b/third_party/home-manager/modules/manual.nix index 356f311a9e..84ec7eda0e 100644 --- a/third_party/home-manager/modules/manual.nix +++ b/third_party/home-manager/modules/manual.nix @@ -6,7 +6,10 @@ let cfg = config.manual; - docs = import ../docs { inherit lib pkgs; }; + docs = import ../docs { + inherit pkgs lib; + inherit (config.home.version) release isReleaseBranch; + }; in { options = { @@ -15,7 +18,7 @@ in { default = false; description = '' Whether to install the HTML manual. This also installs the - home-manager-help tool, which opens a local + {command}`home-manager-help` tool, which opens a local copy of the Home Manager manual in the system web browser. ''; }; @@ -26,8 +29,8 @@ in { example = false; description = '' Whether to install the configuration manual page. The manual can - be reached by man home-configuration.nix. - + be reached by {command}`man home-configuration.nix`. + When looking at the manual page pretend that all references to NixOS stuff are actually references to Home Manager stuff. Thanks! @@ -41,7 +44,7 @@ in { description = '' Whether to install a JSON formatted list of all Home Manager options. This can be located at - <profile directory>/share/doc/home-manager/options.json, + {file}`/share/doc/home-manager/options.json`, and may be used for navigating definitions, auto-completing, and other miscellaneous tasks. ''; diff --git a/third_party/home-manager/modules/misc/dconf.nix b/third_party/home-manager/modules/misc/dconf.nix index aaefdfa391..24e02a1299 100644 --- a/third_party/home-manager/modules/misc/dconf.nix +++ b/third_party/home-manager/modules/misc/dconf.nix @@ -25,13 +25,19 @@ in { dconf = { enable = mkOption { type = types.bool; - default = true; + # While technically dconf on darwin could work, our activation step + # requires dbus, which only *lightly* supports Darwin in general, and + # not at all in the way it's packaged in nixpkgs. Because of this, we + # just disable dconf for darwin hosts by default. + # In the future, if someone gets dbus working, this _could_ be + # re-enabled, unclear whether there's actual value in it though. + default = !pkgs.stdenv.hostPlatform.isDarwin; visible = false; description = '' Whether to enable dconf settings. - + Note, if you use NixOS then you must add - programs.dconf.enable = true + `programs.dconf.enable = true` to your system configuration. Otherwise you will see a systemd error message when your configuration is activated. ''; @@ -53,6 +59,17 @@ in { ''; description = '' Settings to write to the dconf configuration system. + + Note that the database is strongly-typed so you need to use the same types + as described in the GSettings schema. For example, if an option is of type + `uint32` (`u`), you need to wrap the number + using the `lib.hm.gvariant.mkUint32` constructor. + Otherwise, since Nix integers are implicitly coerced to `int32` + (`i`), it would get stored in the database as such, and GSettings + might be confused when loading the setting. + + You might want to use [dconf2nix](https://github.com/gvolpe/dconf2nix) + to convert dconf database dumps into compatible Nix expression. ''; }; }; diff --git a/third_party/home-manager/modules/misc/debug.nix b/third_party/home-manager/modules/misc/debug.nix index d27d496b42..fc0d8946a8 100644 --- a/third_party/home-manager/modules/misc/debug.nix +++ b/third_party/home-manager/modules/misc/debug.nix @@ -6,10 +6,10 @@ with lib; options.home = { enableDebugInfo = mkEnableOption "" // { description = '' - Some Nix-packages provide debug symbols for - gdb in the debug-output. + Some Nix packages provide debug symbols for + {command}`gdb` in the `debug` output. This option ensures that those are automatically fetched from - the binary cache if available and gdb is + the binary cache if available and {command}`gdb` is configured to find those symbols. ''; }; diff --git a/third_party/home-manager/modules/misc/editorconfig.nix b/third_party/home-manager/modules/misc/editorconfig.nix index 579ef1f81d..a6dfb570a3 100644 --- a/third_party/home-manager/modules/misc/editorconfig.nix +++ b/third_party/home-manager/modules/misc/editorconfig.nix @@ -18,10 +18,10 @@ in { type = iniFormat.type; default = { }; description = '' - Configuration written to $HOME/.editorconfig. - root = true is automatically added to the file, + Configuration written to {file}`$HOME/.editorconfig`. + `root = true` is automatically added to the file, it must not be added here. - See for documentation. + See for documentation. ''; example = literalExpression '' { diff --git a/third_party/home-manager/modules/misc/fontconfig.nix b/third_party/home-manager/modules/misc/fontconfig.nix index 756f45699d..49fef96a98 100644 --- a/third_party/home-manager/modules/misc/fontconfig.nix +++ b/third_party/home-manager/modules/misc/fontconfig.nix @@ -28,8 +28,8 @@ in { Whether to enable fontconfig configuration. This will, for example, allow fontconfig to discover fonts and configurations installed through - home.packages and - nix-env. + {var}`home.packages` and + {command}`nix-env`. ''; }; }; @@ -77,8 +77,10 @@ in { - + + Add fonts in the Nix user profile + ${config.home.path}/etc/fonts/conf.d ${config.home.path}/etc/fonts/fonts.conf diff --git a/third_party/home-manager/modules/misc/gtk.nix b/third_party/home-manager/modules/misc/gtk.nix index dfebf201f1..c20424b1fe 100644 --- a/third_party/home-manager/modules/misc/gtk.nix +++ b/third_party/home-manager/modules/misc/gtk.nix @@ -33,7 +33,7 @@ let example = literalExpression "pkgs.gnome.gnome-themes-extra"; description = '' Package providing the theme. This package will be installed - to your profile. If null then the theme + to your profile. If `null` then the theme is assumed to already be available in your profile. ''; }; @@ -54,7 +54,7 @@ let example = literalExpression "pkgs.gnome.adwaita-icon-theme"; description = '' Package providing the icon theme. This package will be installed - to your profile. If null then the theme + to your profile. If `null` then the theme is assumed to already be available in your profile. ''; }; @@ -75,7 +75,7 @@ let example = literalExpression "pkgs.vanilla-dmz"; description = '' Package providing the cursor theme. This package will be installed - to your profile. If null then the theme + to your profile. If `null` then the theme is assumed to already be available in your profile. ''; }; @@ -143,7 +143,7 @@ in { example = "gtk-can-change-accels = 1"; description = '' Extra configuration lines to add verbatim to - ~/.gtkrc-2.0. + {file}`~/.gtkrc-2.0`. ''; }; @@ -177,7 +177,7 @@ in { }; description = '' Extra configuration options to add to - $XDG_CONFIG_HOME/gtk-3.0/settings.ini. + {file}`$XDG_CONFIG_HOME/gtk-3.0/settings.ini`. ''; }; @@ -186,7 +186,7 @@ in { default = ""; description = '' Extra configuration lines to add verbatim to - $XDG_CONFIG_HOME/gtk-3.0/gtk.css. + {file}`$XDG_CONFIG_HOME/gtk-3.0/gtk.css`. ''; }; }; @@ -201,7 +201,16 @@ in { }; description = '' Extra configuration options to add to - $XDG_CONFIG_HOME/gtk-4.0/settings.ini. + {file}`$XDG_CONFIG_HOME/gtk-4.0/settings.ini`. + ''; + }; + + extraCss = mkOption { + type = types.lines; + default = ""; + description = '' + Extra configuration lines to add verbatim to + {file}`$XDG_CONFIG_HOME/gtk-4.0/gtk.css`. ''; }; }; @@ -268,6 +277,9 @@ in { xdg.configFile."gtk-4.0/settings.ini".text = toGtk3Ini { Settings = gtkIni // cfg4.extraConfig; }; + xdg.configFile."gtk-4.0/gtk.css" = + mkIf (cfg4.extraCss != "") { text = cfg4.extraCss; }; + dconf.settings."org/gnome/desktop/interface" = dconfIni; }); } diff --git a/third_party/home-manager/modules/misc/news.nix b/third_party/home-manager/modules/misc/news.nix index f59d50b591..0538d767b6 100644 --- a/third_party/home-manager/modules/misc/news.nix +++ b/third_party/home-manager/modules/misc/news.nix @@ -59,57 +59,48 @@ in default = "notify"; description = '' How unread and relevant news should be presented when - running home-manager build and - home-manager switch. - - + running {command}`home-manager build` and + {command}`home-manager switch`. The options are - - - silent - - - Do not print anything during build or switch. The - home-manager news command still - works for viewing the entries. - - - - - notify - - - The number of unread and relevant news entries will be - printed to standard output. The home-manager - news command can later be used to view the - entries. - - - - - show - - - A pager showing unread news entries is opened. - - - - + `silent` + : Do not print anything during build or switch. The + {command}`home-manager news` command still + works for viewing the entries. + + `notify` + : The number of unread and relevant news entries will be + printed to standard output. The {command}`home-manager + news` command can later be used to view the entries. + + `show` + : A pager showing unread news entries is opened. ''; }; entries = mkOption { internal = true; type = types.listOf entryModule; - default = []; + default = [ ]; description = "News entries."; }; + + json = { + output = mkOption { + internal = true; + type = types.package; + description = "The generated JSON file package."; + }; + }; }; }; config = { + 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 # formatted as given in the output of @@ -886,6 +877,308 @@ in 'wayland.windowManager.sway.config.[window|floating].titlebar' now default to 'true'. ''; } + + { + time = "2023-01-28T17:35:49+00:00"; + message = '' + A new module is available: 'programs.papis'. + ''; + } + + { + time = "2023-01-30T10:39:11+00:00"; + message = '' + A new module is available: 'programs.wlogout'. + ''; + } + + { + time = "2023-01-31T22:08:41+00:00"; + message = '' + A new module is available: 'programs.rbenv'. + ''; + } + + { + time = "2023-02-02T20:49:05+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.autorandr'. + ''; + } + + { + time = "2023-02-20T22:31:23+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.mpd-mpris'. + ''; + } + + { + time = "2023-02-22T22:16:37+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.avizo'. + ''; + } + + { + time = "2023-03-16:12:00+00:00"; + condition = config.programs.i3status-rust.enable; + message = '' + Module 'i3status-rust' was updated to support the new configuration + format from 0.30.x releases, that introduces many breaking changes. + The documentation was updated with examples from 0.30.x to help + the transition. + + See https://github.com/greshake/i3status-rust/blob/v0.30.0/NEWS.md + for instructions on how to migrate. + + Users that don't want to migrate yet can set + 'programs.i3status-rust.package' to an older version. + ''; + } + + { + time = "2023-03-22T07:20:00+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.listenbrainz-mpd'. + ''; + } + + { + time = "2023-03-22T07:31:38+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.copyq'. + ''; + } + + { + time = "2023-03-25T11:03:24+00:00"; + condition = hostPlatform.isDarwin; + message = '' + A new module is available: 'services.syncthing'. + ''; + } + + { + time = "2023-03-25T14:53:57+00:00"; + message = '' + A new module is available: 'programs.hstr'. + ''; + } + + { + time = "2023-04-18T06:28:31+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.batsignal'. + ''; + } + + { + time = "2023-04-19T15:33:07+00:00"; + message = '' + A new module is available: 'programs.mr'. + ''; + } + + { + time = "2023-04-28T19:59:23+00:00"; + message = '' + A new module is available: 'programs.jujutsu'. + ''; + } + + { + time = "2023-05-09T16:06:56+00:00"; + message = '' + A new module is available: 'programs.git-cliff'. + ''; + } + + { + time = "2023-05-12T21:31:05+00:00"; + message = '' + A new module is available: 'programs.translate-shell'. + ''; + } + + { + time = "2023-05-13T13:51:18+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.fuzzel'. + ''; + } + + { + time = "2023-05-13T14:34:21+00:00"; + condition = config.programs.ssh.enable; + message = '' + The module 'programs.ssh' can now install an SSH client. The installed + client is controlled by the 'programs.ssh.package` option, which + defaults to 'null'. + ''; + } + + { + time = "2023-05-18T21:03:30+00:00"; + message = '' + A new module is available: 'programs.script-directory'. + ''; + } + + { + time = "2023-06-03T22:19:32+00:00"; + message = '' + A new module is available: 'programs.ripgrep'. + ''; + } + + { + time = "2023-06-07T06:01:16+00:00"; + message = '' + A new module is available: 'programs.rtx'. + ''; + } + + { + time = "2023-06-07T12:16:55+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.imv'. + ''; + } + + { + time = "2023-06-09T19:13:39+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'programs.boxxy'. + ''; + } + + { + time = "2020-04-26T13:32:17+00:00"; + message = '' + A number of new modules are available: + + - 'accounts.calendar', + - 'accounts.contact', + - 'programs.khal', + - 'programs.vdirsyncer', and + - 'services.vdirsyncer' (Linux only). + + The two first modules offer a number of options for + configuring calendar and contact accounts. This includes, + for example, information about carddav and caldav servers. + + The khal and vdirsyncer modules make use of this new account + infrastructure. + + Note, these module are still somewhat experimental and their + structure should not be seen as final, some modifications + may be necessary as new modules are added. + ''; + } + + { + time = "2023-06-14T21:25:34+00:00"; + message = '' + A new module is available: 'programs.git-credential-oauth'. + ''; + } + + { + time = "2023-06-14T21:41:22+00:00"; + message = '' + Two new modules are available: + + - 'programs.comodoro' and + - 'services.comodoro' + ''; + } + + { + time = "2023-06-15T16:30:00+00:00"; + condition = config.qt.enable; + message = '' + Qt module now supports new platform themes and styles, and has partial + support for Qt6. For example, you can now use: + + - `qt.platformTheme = "kde"`: set a theme using Plasma. You can + configure it by setting `~/.config/kdeglobals` file; + - `qt.platformTheme = "qtct"`: set a theme using qt5ct/qt6ct. You + can control it by using the `qt5ct` and `qt6ct` applications; + - `qt.style.name = "kvantum"`: override the style by using themes + written in SVG. Supports many popular themes. + ''; + } + + { + time = "2023-06-17T22:18:22+00:00"; + condition = config.programs.zsh.enable; + message = '' + A new module is available: 'programs.zsh.antidote' + ''; + } + + { + time = "2023-06-30T14:46:22+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.ssh-agent' + ''; + } + + { + time = "2023-07-08T08:27:41+00:00"; + message = '' + A new modules is available: 'programs.darcs' + ''; + } + + { + time = "2023-07-08T09:21:06+00:00"; + message = '' + A new module is available: 'programs.pyenv'. + ''; + } + + { + time = "2023-07-08T09:44:56+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.swayosd' + ''; + } + + { + time = "2023-07-20T21:56:49+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'wayland.windowManager.hyprland' + ''; + } + + { + time = "2023-07-24T10:38:23+00:00"; + message = '' + A new module is available: 'programs.gh-dash' + ''; + } + + { + time = "2023-07-25T07:16:09+00:00"; + condition = hostPlatform.isDarwin; + message = '' + A new module is available: 'services.git-sync'. + ''; + } ]; }; } diff --git a/third_party/home-manager/modules/misc/nix.nix b/third_party/home-manager/modules/misc/nix.nix index 6ae28157a3..9e24914366 100644 --- a/third_party/home-manager/modules/misc/nix.nix +++ b/third_party/home-manager/modules/misc/nix.nix @@ -30,7 +30,7 @@ let toString v else if isString v then v - else if isCoercibleToString v then + else if isConvertibleWithToString v then toString v else abort "The nix conf value: ${toPretty { } v} can not be encoded"; @@ -120,23 +120,23 @@ in { repo = "my-nixpkgs"; }; description = - "The flake reference to which is to be rewritten."; + "The flake reference to which {option}`from>` is to be rewritten."; }; flake = mkOption { type = types.nullOr types.attrs; default = null; example = literalExpression "nixpkgs"; description = '' - The flake input to which is to be rewritten. + The flake input to which {option}`from>` is to be rewritten. ''; }; exact = mkOption { type = types.bool; default = true; description = '' - Whether the reference needs to match exactly. If set, - a reference like nixpkgs does not - match with a reference like nixpkgs/nixos-20.03. + Whether the {option}`from` reference needs to match exactly. If set, + a {option}`from` reference like `nixpkgs` does not + match with a reference like `nixpkgs/nixos-20.03`. ''; }; }; @@ -182,8 +182,7 @@ in { keep-outputs = true keep-derivations = true ''; - description = - "Additional text appended to nix.conf."; + description = "Additional text appended to {file}`nix.conf`."; }; settings = mkOption { @@ -197,44 +196,37 @@ in { } ''; description = '' - Configuration for Nix, see - or - - nix.conf - 5 - for available options. + Configuration for Nix; see {manpage}`nix.conf(5)` for available options. The value declared here will be translated directly to the key-value pairs Nix expects. - - - Configuration specified in which will be appended + + Configuration specified in [](#opt-nix.extraOptions) will be appended verbatim to the resulting config file. ''; }; }; - config = mkIf cfg.enable { - assertions = [{ - assertion = cfg.settings == { } || cfg.package != null; - message = '' - A corresponding Nix package must be specified via `nix.package` for generating - nix.conf. - ''; - }]; - - xdg.configFile = { - "nix/registry.json" = mkIf (cfg.registry != { }) { - source = jsonFormat.generate "registry.json" { + config = mkIf cfg.enable (mkMerge [ + (mkIf (cfg.registry != { }) { + xdg.configFile."nix/registry.json".source = + jsonFormat.generate "registry.json" { version = cfg.registryVersion; flakes = mapAttrsToList (n: v: { inherit (v) from to exact; }) cfg.registry; }; - }; + }) - "nix/nix.conf" = mkIf (cfg.settings != { } || cfg.extraOptions != "") { - source = nixConf; - }; - }; - }; + (mkIf (cfg.settings != { } || cfg.extraOptions != "") { + assertions = [{ + assertion = cfg.package != null; + message = '' + A corresponding Nix package must be specified via `nix.package` for generating + nix.conf. + ''; + }]; + + xdg.configFile."nix/nix.conf".source = nixConf; + }) + ]); meta.maintainers = [ maintainers.polykernel ]; } diff --git a/third_party/home-manager/modules/misc/nixpkgs.nix b/third_party/home-manager/modules/misc/nixpkgs.nix index c728b4862f..efbbba96ce 100644 --- a/third_party/home-manager/modules/misc/nixpkgs.nix +++ b/third_party/home-manager/modules/misc/nixpkgs.nix @@ -53,24 +53,20 @@ in { details, see the Nixpkgs documentation.) It allows you to set package configuration options. - - - If null, then configuration is taken from + If `null`, then configuration is taken from the fallback location, for example, - ~/.config/nixpkgs/config.nix. - - + {file}`~/.config/nixpkgs/config.nix`. Note, this option will not apply outside your Home Manager configuration like when installing manually through - nix-env. If you want to apply it both + {command}`nix-env`. If you want to apply it both inside and outside Home Manager you can put it in a separate file and include something like - + ```nix nixpkgs.config = import ./nixpkgs-config.nix; xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix; - + ``` in your Home Manager configuration. ''; @@ -79,35 +75,32 @@ in { overlays = mkOption { default = null; example = literalExpression '' - [ (self: super: { - openssh = super.openssh.override { + [ + (final: prev: { + openssh = prev.openssh.override { hpnSupport = true; withKerberos = true; - kerberos = self.libkrb5; + kerberos = final.libkrb5; }; - }; - ) ] + }) + ] ''; type = types.nullOr (types.listOf overlayType); description = '' List of overlays to use with the Nix Packages collection. (For details, see the Nixpkgs documentation.) It allows you to override packages globally. This is a function that takes as - an argument the original Nixpkgs. The + an argument the *original* Nixpkgs. The first argument should be used for finding dependencies, and the second should be used for overriding recipes. - - - If null, then the overlays are taken from + If `null`, then the overlays are taken from the fallback location, for example, - ~/.config/nixpkgs/overlays. + {file}`~/.config/nixpkgs/overlays`. - - - Like nixpkgs.config this option only + Like {var}`nixpkgs.config` this option only applies within the Home Manager configuration. See - nixpkgs.config for a suggested setup that + {var}`nixpkgs.config` for a suggested setup that works both internally and externally. ''; }; @@ -128,6 +121,8 @@ in { config = { _module.args = { + # We use a no-op override to make sure that the option can be merged without evaluating + # `_pkgs`, see https://github.com/nix-community/home-manager/pull/993 pkgs = mkOverride modules.defaultOverridePriority _pkgs; pkgs_i686 = if _pkgs.stdenv.isLinux && _pkgs.stdenv.hostPlatform.isx86 then diff --git a/third_party/home-manager/modules/misc/pam.nix b/third_party/home-manager/modules/misc/pam.nix index cf3321ffba..22a5daf0df 100644 --- a/third_party/home-manager/modules/misc/pam.nix +++ b/third_party/home-manager/modules/misc/pam.nix @@ -17,11 +17,8 @@ in { description = '' Environment variables that will be set for the PAM session. The variable values must be as described in - - pam_env.conf - 5 - . - + {manpage}`pam_env.conf(5)`. + Note, this option will become deprecated in the future and its use is therefore discouraged. ''; @@ -39,7 +36,7 @@ in { default = [ ]; description = '' List of authorized YubiKey token IDs. Refer to - + for details on how to obtain the token ID of a YubiKey. ''; }; @@ -49,7 +46,7 @@ in { default = ".yubico/authorized_yubikeys"; description = '' File path to write the authorized YubiKeys, - relative to HOME. + relative to {env}`HOME`. ''; }; }; diff --git a/third_party/home-manager/modules/misc/qt.nix b/third_party/home-manager/modules/misc/qt.nix index 313e79ee4c..554072e2f0 100644 --- a/third_party/home-manager/modules/misc/qt.nix +++ b/third_party/home-manager/modules/misc/qt.nix @@ -6,8 +6,32 @@ let cfg = config.qt; + # Maps known lowercase style names to style packages. Non-exhaustive. + stylePackages = with pkgs; { + bb10bright = libsForQt5.qtstyleplugins; + bb10dark = libsForQt5.qtstyleplugins; + cleanlooks = libsForQt5.qtstyleplugins; + gtk2 = libsForQt5.qtstyleplugins; + motif = libsForQt5.qtstyleplugins; + cde = libsForQt5.qtstyleplugins; + plastique = libsForQt5.qtstyleplugins; + + adwaita = adwaita-qt; + adwaita-dark = adwaita-qt; + adwaita-highcontrast = adwaita-qt; + adwaita-highcontrastinverse = adwaita-qt; + + breeze = libsForQt5.breeze-qt5; + + kvantum = [ + qtstyleplugin-kvantum-qt4 + libsForQt5.qtstyleplugin-kvantum + qt6Packages.qtstyleplugin-kvantum + ]; + }; + in { - meta.maintainers = [ maintainers.rycee ]; + meta.maintainers = with maintainers; [ rycee thiagokokada ]; imports = [ (mkChangedOptionModule [ "qt" "useGtkTheme" ] [ "qt" "platformTheme" ] @@ -17,31 +41,41 @@ in { options = { qt = { - enable = mkEnableOption "Qt 4 and 5 configuration"; + enable = mkEnableOption "Qt 4, 5 and 6 configuration"; platformTheme = mkOption { - type = types.nullOr (types.enum [ "gtk" "gnome" ]); + type = types.nullOr (types.enum [ "gtk" "gnome" "qtct" "kde" ]); default = null; example = "gnome"; - relatedPackages = - [ "qgnomeplatform" [ "libsForQt5" "qtstyleplugins" ] ]; + relatedPackages = [ + "qgnomeplatform" + [ "libsForQt5" "qtstyleplugins" ] + [ "libsForQt5" "qt5ct" ] + [ "qt6Packages" "qt6ct" ] + [ "libsForQt5" "plasma-integration" ] + [ "libsForQt5" "systemsettings" ] + ]; description = '' - Selects the platform theme to use for Qt applications. - The options are - - - gtk - Use GTK theme with - qtstyleplugins - - - - gnome - Use GNOME theme with - qgnomeplatform - - - + Platform theme to use for Qt applications. + + The options are + + `gtk` + : Use GTK theme with + [`qtstyleplugins`](https://github.com/qt/qtstyleplugins) + + `gnome` + : Use GNOME theme with + [`qgnomeplatform`](https://github.com/FedoraQt/QGnomePlatform) + + `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 ''; }; @@ -50,36 +84,45 @@ in { type = types.nullOr types.str; default = null; example = "adwaita-dark"; - relatedPackages = [ "adwaita-qt" [ "libsForQt5" "qtstyleplugins" ] ]; + relatedPackages = [ + "adwaita-qt" + [ "libsForQt5" "breeze-qt5" ] + [ "libsForQt5" "qtstyleplugins" ] + "qtstyleplugin-kvantum-qt4" + [ "libsForQt5" "qtstyleplugin-kvantum" ] + [ "qt6Packages" "qtstyleplugin-kvantum" ] + ]; description = '' - Selects the style to use for Qt5 applications. - The options are - - - adwaita - adwaita-dark - Use Adwaita Qt style with - adwaita - - - - cleanlooks - gtk2 - motif - plastique - Use styles from - qtstyleplugins - - - + Style to use for Qt5/Qt6 applications. Case-insensitive. + + Some examples are + + `adwaita`, `adwaita-dark`, `adwaita-highcontrast`, `adwaita-highcontrastinverse` + : Use the Adwaita style from + [`adwaita-qt`](https://github.com/FedoraQt/adwaita-qt) + + `breeze` + : Use the Breeze style from + [`breeze`](https://github.com/KDE/breeze) + + `bb10bright`, `bb10dark`, `cde`, `cleanlooks`, `gtk2`, `motif`, `plastique` + : Use styles from + [`qtstyleplugins`](https://github.com/qt/qtstyleplugins) + + `kvantum` + : Use styles from + [`kvantum`](https://github.com/tsujan/Kvantum) ''; }; package = mkOption { - type = types.nullOr types.package; + type = with types; nullOr (either package (listOf package)); default = null; example = literalExpression "pkgs.adwaita-qt"; - description = "Theme package to be used in Qt5 applications."; + description = '' + Theme package to be used in Qt5/Qt6 applications. + Auto-detected from {option}`qt.style.name` if possible. + ''; }; }; }; @@ -87,35 +130,51 @@ in { config = mkIf (cfg.enable && cfg.platformTheme != null) { assertions = [{ - assertion = (cfg.platformTheme == "gnome") - -> ((cfg.style.name != null) && (cfg.style.package != null)); + assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null + && cfg.style.package != null; message = '' `qt.platformTheme` "gnome" must have `qt.style` set to a theme that - supports both Qt and Gtk, for example "adwaita" or "adwaita-dark". + supports both Qt and Gtk, for example "adwaita", "adwaita-dark", or "breeze". ''; }]; - # Necessary because home.sessionVariables is of types.attrs - home.sessionVariables = (filterAttrs (n: v: v != null) { - QT_QPA_PLATFORMTHEME = - if cfg.platformTheme == "gnome" then "gnome" else "gtk2"; - QT_STYLE_OVERRIDE = cfg.style.name; - }); + qt.style.package = mkIf (cfg.style.name != null) + (mkDefault (stylePackages.${toLower cfg.style.name} or null)); - home.packages = if cfg.platformTheme == "gnome" then + # Necessary because home.sessionVariables doesn't support mkIf + home.sessionVariables = filterAttrs (n: v: v != null) { + QT_QPA_PLATFORMTHEME = if cfg.platformTheme == "gtk" then + "gtk2" + else if cfg.platformTheme == "qtct" then + "qt5ct" + else + cfg.platformTheme; + QT_STYLE_OVERRIDE = cfg.style.name; + }; + + home.packages = (if cfg.platformTheme == "gnome" then [ pkgs.qgnomeplatform ] - ++ lib.optionals (cfg.style.package != null) [ cfg.style.package ] - else - [ pkgs.libsForQt5.qtstyleplugins ]; + else if cfg.platformTheme == "qtct" then [ + pkgs.libsForQt5.qt5ct + pkgs.qt6Packages.qt6ct + ] else if cfg.platformTheme == "kde" then [ + pkgs.libsForQt5.plasma-integration + pkgs.libsForQt5.systemsettings + ] else + [ pkgs.libsForQt5.qtstyleplugins ]) + ++ lib.optionals (cfg.style.package != null) + (lib.toList cfg.style.package); xsession.importedVariables = [ "QT_QPA_PLATFORMTHEME" ] - ++ lib.optionals (cfg.style != null) [ "QT_STYLE_OVERRIDE" ]; + ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; - # Enable GTK+ style for Qt4 in either case. + # Enable GTK+ style for Qt4 in Gtk/GNOME. # It doesn’t support the platform theme packages. - home.activation.useGtkThemeInQt4 = hm.dag.entryAfter [ "writeBoundary" ] '' - $DRY_RUN_CMD ${pkgs.crudini}/bin/crudini $VERBOSE_ARG \ - --set "${config.xdg.configHome}/Trolltech.conf" Qt style GTK+ - ''; + home.activation.useGtkThemeInQt4 = + mkIf (cfg.platformTheme == "gtk" || cfg.platformTheme == "gnome") + (hm.dag.entryAfter [ "writeBoundary" ] '' + $DRY_RUN_CMD ${pkgs.crudini}/bin/crudini $VERBOSE_ARG \ + --set "${config.xdg.configHome}/Trolltech.conf" Qt style GTK+ + ''); }; } diff --git a/third_party/home-manager/modules/misc/specialisation.nix b/third_party/home-manager/modules/misc/specialisation.nix new file mode 100644 index 0000000000..dc5f78e14c --- /dev/null +++ b/third_party/home-manager/modules/misc/specialisation.nix @@ -0,0 +1,83 @@ +{ config, name, extendModules, lib, ... }: + +with lib; + +{ + imports = + [ (mkRenamedOptionModule [ "specialization" ] [ "specialisation" ]) ]; + + options.specialisation = mkOption { + type = types.attrsOf (types.submodule { + options = { + configuration = mkOption { + type = let + extended = extendModules { + modules = [{ + # Prevent infinite recursion + specialisation = mkOverride 0 { }; + + # If used inside the NixOS/nix-darwin module, we get conflicting definitions + # of `name` inside the specialisation: one is the user name coming from the + # NixOS module definition and the other is `configuration`, the name of this + # option. Thus we need to explicitly wire the former into the module arguments. + # See discussion at https://github.com/nix-community/home-manager/issues/3716 + _module.args.name = mkForce name; + }]; + }; + in extended.type; + default = { }; + visible = "shallow"; + description = '' + Arbitrary Home Manager configuration settings. + ''; + }; + }; + }); + default = { }; + description = '' + A set of named specialized configurations. These can be used to extend + your base configuration with additional settings. For example, you can + have specialisations named "light" and "dark" + that apply light and dark color theme configurations. + + ::: {.note} + This is an experimental option for now and you therefore have to + activate the specialisation by looking up and running the activation + script yourself. Running the activation script will create a new + Home Manager generation. + ::: + + For example, to activate the "dark" specialisation, you can + first look up your current Home Manager generation by running + + ```console + $ home-manager generations | head -1 + 2022-05-02 22:49 : id 1758 -> /nix/store/jy…ac-home-manager-generation + ``` + + then run + + ```console + $ /nix/store/jy…ac-home-manager-generation/specialisation/dark/activate + Starting Home Manager activation + … + ``` + + ::: {.warning} + Since this option is experimental, the activation process may + change in backwards incompatible ways. + ::: + ''; + }; + + config = mkIf (config.specialisation != { }) { + home.extraBuilderCommands = let + link = n: v: + let pkg = v.configuration.home.activationPackage; + in "ln -s ${pkg} $out/specialisation/${n}"; + in '' + mkdir $out/specialisation + ${concatStringsSep "\n" (mapAttrsToList link config.specialisation)} + ''; + }; +} diff --git a/third_party/home-manager/modules/misc/specialization.nix b/third_party/home-manager/modules/misc/specialization.nix deleted file mode 100644 index 67e593e2c4..0000000000 --- a/third_party/home-manager/modules/misc/specialization.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, extendModules, lib, ... }: - -with lib; - -{ - options.specialization = mkOption { - type = types.attrsOf (types.submodule { - options = { - configuration = mkOption { - type = let - stopRecursion = { specialization = mkOverride 0 { }; }; - extended = extendModules { modules = [ stopRecursion ]; }; - in extended.type; - default = { }; - visible = "shallow"; - description = '' - Arbitrary Home Manager configuration settings. - ''; - }; - }; - }); - default = { }; - description = '' - A set of named specialized configurations. These can be used to extend - your base configuration with additional settings. For example, you can - have specializations named light and dark - that applies light and dark color theme configurations. - - - - Note, this is an experimental option for now and you therefore have to - activate the specialization by looking up and running the activation - script yourself. Note, running the activation script will create a new - Home Manager generation. - - - - For example, to activate the dark specialization. You can - first look up your current Home Manager generation by running - - - $ home-manager generations | head -1 - 2022-05-02 22:49 : id 1758 -> /nix/store/jy…ac-home-manager-generation - - - then run - - - $ /nix/store/jy…ac-home-manager-generation/specialization/dark/activate - Starting Home Manager activation - … - - - - - WARNING! Since this option is experimental, the activation process may - change in backwards incompatible ways. - ''; - }; - - config = mkIf (config.specialization != { }) { - home.extraBuilderCommands = let - link = n: v: - let pkg = v.configuration.home.activationPackage; - in "ln -s ${pkg} $out/specialization/${n}"; - in '' - mkdir $out/specialization - ${concatStringsSep "\n" (mapAttrsToList link config.specialization)} - ''; - }; -} diff --git a/third_party/home-manager/modules/misc/submodule-support.nix b/third_party/home-manager/modules/misc/submodule-support.nix index ff80291cad..400e234cb6 100644 --- a/third_party/home-manager/modules/misc/submodule-support.nix +++ b/third_party/home-manager/modules/misc/submodule-support.nix @@ -21,11 +21,11 @@ with lib; default = false; internal = true; description = '' - Whether the packages of are + Whether the packages of {option}`home.packages` are installed separately from the Home Manager activation script. In NixOS, for example, this may be accomplished by installing the packages through - . + {option}`users.users.‹name?›.packages`. ''; }; }; diff --git a/third_party/home-manager/modules/misc/tmpfiles.nix b/third_party/home-manager/modules/misc/tmpfiles.nix index 248843029f..c5f4a97562 100644 --- a/third_party/home-manager/modules/misc/tmpfiles.nix +++ b/third_party/home-manager/modules/misc/tmpfiles.nix @@ -16,10 +16,7 @@ in { description = '' Rules for creating and cleaning up temporary files automatically. See - - tmpfiles.d - 5 - + {manpage}`tmpfiles.d(5)` for the exact format. ''; }; diff --git a/third_party/home-manager/modules/misc/version.nix b/third_party/home-manager/modules/misc/version.nix index 0c590372a0..f82fc3a42c 100644 --- a/third_party/home-manager/modules/misc/version.nix +++ b/third_party/home-manager/modules/misc/version.nix @@ -2,7 +2,9 @@ with lib; -{ +let releaseInfo = lib.importJSON ../../release.json; + +in { options = { home.stateVersion = mkOption { type = types.enum [ @@ -17,14 +19,15 @@ with lib; "22.05" "22.11" "23.05" + "23.11" ]; description = '' It is occasionally necessary for Home Manager to change configuration defaults in a way that is incompatible with stateful data. This could, for example, include switching the default data format or location of a file. - - The state version indicates which default + + The *state version* indicates which default settings are in effect and will therefore help avoid breaking program configurations. Switching to a higher state version typically requires performing some manual steps, such as data @@ -50,11 +53,22 @@ with lib; internal = true; readOnly = true; type = types.str; - default = fileContents ../../.release; + default = releaseInfo.release; example = "22.11"; description = "The Home Manager release."; }; + isReleaseBranch = mkOption { + internal = true; + readOnly = true; + type = types.bool; + default = releaseInfo.isReleaseBranch; + description = '' + Whether the Home Manager version is from a versioned + release branch. + ''; + }; + revision = mkOption { internal = true; type = types.nullOr types.str; diff --git a/third_party/home-manager/modules/misc/xdg-desktop-entries.nix b/third_party/home-manager/modules/misc/xdg-desktop-entries.nix index 3274f6ec94..7ec7fa5688 100644 --- a/third_party/home-manager/modules/misc/xdg-desktop-entries.nix +++ b/third_party/home-manager/modules/misc/xdg-desktop-entries.nix @@ -34,6 +34,7 @@ let exec = mkOption { description = "Program to execute, possibly with arguments."; type = types.nullOr types.str; + default = null; }; icon = mkOption { @@ -81,7 +82,7 @@ let startupNotify = mkOption { description = '' If true, it is KNOWN that the application will send a "remove" - message when started with the DESKTOP_STARTUP_ID + message when started with the `DESKTOP_STARTUP_ID` environment variable set. If false, it is KNOWN that the application does not work with startup notification at all.''; type = types.nullOr types.bool; @@ -106,9 +107,9 @@ let }; settings = mkOption { - type = types.attrsOf types.string; + type = types.attrsOf types.str; description = '' - Extra key-value pairs to add to the [Desktop Entry] section. + Extra key-value pairs to add to the `[Desktop Entry]` section. This may override other values. ''; default = { }; @@ -131,6 +132,7 @@ let options.exec = mkOption { type = types.nullOr types.str; description = "Program to execute, possibly with arguments."; + default = null; }; options.icon = mkOption { type = with types; nullOr (either str path); @@ -162,10 +164,6 @@ let }; }; - #formatting helpers - semicolonList = list: - (concatStringsSep ";" list) + ";"; # requires trailing semicolon - #passes config options to makeDesktopItem in expected format makeFile = name: config: pkgs.makeDesktopItem { @@ -183,9 +181,11 @@ in { options.xdg.desktopEntries = mkOption { description = '' - Desktop Entries allow applications to be shown in your desktop environment's app launcher. - You can define entries for programs without entries or override existing entries. - See for more information on options. + Desktop Entries allow applications to be shown in your desktop environment's app launcher. + + You can define entries for programs without entries or override existing entries. + + See for more information on options. ''; default = { }; type = types.attrsOf (types.submodule desktopEntry); diff --git a/third_party/home-manager/modules/misc/xdg-mime-apps.nix b/third_party/home-manager/modules/misc/xdg-mime-apps.nix index 2093caa2da..c9fd3e8bee 100644 --- a/third_party/home-manager/modules/misc/xdg-mime-apps.nix +++ b/third_party/home-manager/modules/misc/xdg-mime-apps.nix @@ -17,9 +17,8 @@ in { type = types.bool; default = false; description = '' - Whether to manage $XDG_CONFIG_HOME/mimeapps.list. - - + Whether to manage {file}`$XDG_CONFIG_HOME/mimeapps.list`. + The generated file is read-only. ''; }; @@ -49,7 +48,7 @@ in { example = { "mimetype1" = "foo5.desktop"; }; description = '' Removes associations of applications with mimetypes, as if the - .desktop file was not listing this + .desktop file was *not* listing this mimetype in the first place. ''; }; diff --git a/third_party/home-manager/modules/misc/xdg-mime.nix b/third_party/home-manager/modules/misc/xdg-mime.nix index c9c7658d11..09f62aaff9 100644 --- a/third_party/home-manager/modules/misc/xdg-mime.nix +++ b/third_party/home-manager/modules/misc/xdg-mime.nix @@ -17,9 +17,9 @@ in { Whether to install programs and files to support the XDG Shared MIME-info specification and XDG MIME Applications specification at - + and - , + , respectively. ''; }; diff --git a/third_party/home-manager/modules/misc/xdg-system-dirs.nix b/third_party/home-manager/modules/misc/xdg-system-dirs.nix index 989131c5fa..0be5e26d25 100644 --- a/third_party/home-manager/modules/misc/xdg-system-dirs.nix +++ b/third_party/home-manager/modules/misc/xdg-system-dirs.nix @@ -19,7 +19,7 @@ in { default = [ ]; example = literalExpression ''[ "/etc/xdg" ]''; description = '' - Directory names to add to XDG_CONFIG_DIRS + Directory names to add to {env}`XDG_CONFIG_DIRS` in the user session. ''; }; @@ -29,7 +29,7 @@ in { default = [ ]; example = literalExpression ''[ "/usr/share" "/usr/local/share" ]''; description = '' - Directory names to add to XDG_DATA_DIRS + Directory names to add to {env}`XDG_DATA_DIRS` in the user session. ''; }; 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 2ea07709aa..fcc0742cd1 100644 --- a/third_party/home-manager/modules/misc/xdg-user-dirs.nix +++ b/third_party/home-manager/modules/misc/xdg-user-dirs.nix @@ -22,9 +22,8 @@ in { type = types.bool; default = false; description = '' - Whether to manage $XDG_CONFIG_HOME/user-dirs.dirs. - - + Whether to manage {file}`$XDG_CONFIG_HOME/user-dirs.dirs`. + The generated file is read-only. ''; }; diff --git a/third_party/home-manager/modules/misc/xdg.nix b/third_party/home-manager/modules/misc/xdg.nix index 247e731921..23cbe72a2f 100644 --- a/third_party/home-manager/modules/misc/xdg.nix +++ b/third_party/home-manager/modules/misc/xdg.nix @@ -34,7 +34,7 @@ in { }; configFile = mkOption { - type = fileType "xdg.configHome" cfg.configHome; + type = fileType "xdg.configFile" "{var}`xdg.configHome`" cfg.configHome; default = { }; description = '' Attribute set of files to link into the user's XDG @@ -52,7 +52,8 @@ in { }; dataFile = mkOption { - type = fileType "xdg.dataHome" cfg.dataHome; + type = + fileType "xdg.dataFile" "xdg.dataHome" cfg.dataHome; default = { }; description = '' Attribute set of files to link into the user's XDG diff --git a/third_party/home-manager/modules/misc/xfconf.nix b/third_party/home-manager/modules/misc/xfconf.nix index b4141bf53b..ec0cd82d03 100644 --- a/third_party/home-manager/modules/misc/xfconf.nix +++ b/third_party/home-manager/modules/misc/xfconf.nix @@ -6,8 +6,31 @@ let cfg = config.xfconf; + xfIntVariant = types.submodule { + options = { + type = mkOption { + type = types.enum [ "int" "uint" "uint64" ]; + description = '' + To distinguish between int, uint and uint64 in xfconf, + you can specify the type in xfconf with this submodule. + For other types, you don't need to use this submodule, + just specify the value is enough. + ''; + }; + value = mkOption { + type = types.int; + description = "The value in xfconf."; + }; + }; + }; + withType = v: - if builtins.isBool v then [ + if builtins.isAttrs v then [ + "-t" + v.type + "-s" + (toString v.value) + ] else if builtins.isBool v then [ "-t" "bool" "-s" @@ -42,9 +65,9 @@ in { visible = false; description = '' Whether to enable Xfconf settings. - + Note, if you use NixOS then you must add - programs.xfconf.enable = true + `programs.xfconf.enable = true` to your system configuration. Otherwise you will see a systemd error message when your configuration is activated. ''; @@ -52,13 +75,9 @@ in { settings = mkOption { type = with types; - attrsOf (attrsOf (oneOf [ - bool - int - float - str - (listOf (oneOf [ bool int float str ])) - ])) // { + # xfIntVariant must come AFTER str; otherwise strings are treated as submodule imports... + let value = nullOr (oneOf [ bool int float str xfIntVariant ]); + in attrsOf (attrsOf (either value (listOf value))) // { description = "xfconf settings"; }; default = { }; @@ -89,14 +108,30 @@ in { mkCommand = channel: property: value: '' $DRY_RUN_CMD ${pkgs.xfce.xfconf}/bin/xfconf-query \ ${ - escapeShellArgs - ([ "-n" "-c" channel "-p" "/${property}" ] ++ withType value) + escapeShellArgs ([ "-c" channel "-p" "/${property}" ] + ++ (if value == null then + [ "-r" ] + else + [ "-n" ] ++ withType value)) } ''; commands = mapAttrsToList (channel: properties: mapAttrsToList (mkCommand channel) properties) cfg.settings; - in concatMapStrings concatStrings commands); + + load = pkgs.writeShellScript "load-xfconf" + (concatMapStrings concatStrings commands); + in '' + if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then + export DBUS_RUN_SESSION_CMD="" + else + 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} + + unset DBUS_RUN_SESSION_CMD + ''); }; } diff --git a/third_party/home-manager/modules/modules.nix b/third_party/home-manager/modules/modules.nix index 7e6d2e71d1..a23d6ebaa4 100644 --- a/third_party/home-manager/modules/modules.nix +++ b/third_party/home-manager/modules/modules.nix @@ -15,6 +15,8 @@ let modules = [ ./accounts/email.nix + ./accounts/calendar.nix + ./accounts/contacts.nix ./config/home-cursor.nix ./config/i18n.nix ./files.nix @@ -32,7 +34,7 @@ let ./misc/numlock.nix ./misc/pam.nix ./misc/qt.nix - ./misc/specialization.nix + ./misc/specialisation.nix ./misc/submodule-support.nix ./misc/tmpfiles.nix ./misc/version.nix @@ -49,6 +51,7 @@ let ./programs/afew.nix ./programs/alacritty.nix ./programs/alot.nix + ./programs/antidote.nix ./programs/aria2.nix ./programs/astroid.nix ./programs/atuin.nix @@ -60,11 +63,14 @@ let ./programs/beets.nix ./programs/borgmatic.nix ./programs/bottom.nix + ./programs/boxxy.nix ./programs/broot.nix ./programs/browserpass.nix ./programs/btop.nix ./programs/chromium.nix ./programs/command-not-found/command-not-found.nix + ./programs/comodoro.nix + ./programs/darcs.nix ./programs/dircolors.nix ./programs/direnv.nix ./programs/discocss.nix @@ -76,10 +82,14 @@ let ./programs/firefox.nix ./programs/fish.nix ./programs/foot.nix + ./programs/fuzzel.nix ./programs/fzf.nix ./programs/gallery-dl.nix ./programs/getmail.nix ./programs/gh.nix + ./programs/gh-dash.nix + ./programs/git-cliff.nix + ./programs/git-credential-oauth.nix ./programs/git.nix ./programs/gitui.nix ./programs/gnome-terminal.nix @@ -90,19 +100,24 @@ let ./programs/hexchat.nix ./programs/himalaya.nix ./programs/home-manager.nix + ./programs/hstr.nix ./programs/htop.nix ./programs/hyfetch.nix ./programs/i3status-rust.nix ./programs/i3status.nix + ./programs/imv.nix ./programs/info.nix ./programs/ion.nix ./programs/irssi.nix ./programs/java.nix ./programs/jq.nix + ./programs/jujutsu.nix + ./programs/joshuto.nix ./programs/just.nix ./programs/k9s.nix ./programs/kakoune.nix ./programs/keychain.nix + ./programs/khal.nix ./programs/kitty.nix ./programs/kodi.nix ./programs/lazygit.nix @@ -122,6 +137,7 @@ let ./programs/mercurial.nix ./programs/micro.nix ./programs/mpv.nix + ./programs/mr.nix ./programs/msmtp.nix ./programs/mu.nix ./programs/mujmap.nix @@ -144,6 +160,7 @@ let ./programs/oh-my-posh.nix ./programs/opam.nix ./programs/pandoc.nix + ./programs/papis.nix ./programs/password-store.nix ./programs/pazi.nix ./programs/pet.nix @@ -153,16 +170,20 @@ let ./programs/pls.nix ./programs/powerline-go.nix ./programs/pubs.nix + ./programs/pyenv.nix ./programs/pylint.nix ./programs/qutebrowser.nix ./programs/rbw.nix ./programs/readline.nix + ./programs/ripgrep.nix ./programs/rofi-pass.nix ./programs/rofi.nix ./programs/rtorrent.nix + ./programs/rtx.nix ./programs/sagemath.nix ./programs/sbt.nix ./programs/scmpuff.nix + ./programs/script-directory.nix ./programs/senpai.nix ./programs/sioyek.nix ./programs/skim.nix @@ -183,14 +204,20 @@ let ./programs/tmate.nix ./programs/tmux.nix ./programs/topgrade.nix + ./programs/translate-shell.nix ./programs/urxvt.nix + ./programs/vdirsyncer.nix ./programs/vim.nix + ./programs/vim-vint.nix ./programs/vscode.nix ./programs/vscode/haskell.nix ./programs/pywal.nix + ./programs/rbenv.nix ./programs/watson.nix ./programs/waybar.nix ./programs/wezterm.nix + ./programs/wlogout.nix + ./programs/wofi.nix ./programs/xmobar.nix ./programs/yt-dlp.nix ./programs/z-lua.nix @@ -200,7 +227,10 @@ let ./programs/zplug.nix ./programs/zsh.nix ./programs/zsh/prezto.nix + ./services/autorandr.nix + ./services/avizo.nix ./services/barrier.nix + ./services/batsignal.nix ./services/betterlockscreen.nix ./services/blueman-applet.nix ./services/borgmatic.nix @@ -209,6 +239,8 @@ let ./services/cbatticon.nix ./services/clipman.nix ./services/clipmenu.nix + ./services/comodoro.nix + ./services/copyq.nix ./services/devilspie2.nix ./services/dropbox.nix ./services/dunst.nix @@ -237,6 +269,7 @@ let ./services/keybase.nix ./services/keynav.nix ./services/lieer.nix + ./services/listenbrainz-mpd.nix ./services/lorri.nix ./services/mako.nix ./services/mbsync.nix @@ -245,6 +278,7 @@ let ./services/mpd.nix ./services/mpdris2.nix ./services/mpd-discord-rpc.nix + ./services/mpd-mpris.nix ./services/mpris-proxy.nix ./services/muchsync.nix ./services/network-manager-applet.nix @@ -275,9 +309,11 @@ let ./services/screen-locker.nix ./services/sctd.nix ./services/spotifyd.nix + ./services/ssh-agent.nix ./services/stalonetray.nix ./services/status-notifier-watcher.nix ./services/swayidle.nix + ./services/swayosd.nix ./services/sxhkd.nix ./services/syncthing.nix ./services/systembus-notify.nix @@ -289,11 +325,13 @@ let ./services/udiskie.nix ./services/unclutter.nix ./services/unison.nix + ./services/vdirsyncer.nix ./services/volnoti.nix ./services/window-managers/awesome.nix ./services/window-managers/bspwm/default.nix ./services/window-managers/fluxbox.nix ./services/window-managers/herbstluftwm.nix + ./services/window-managers/hyprland.nix ./services/window-managers/i3-sway/i3.nix ./services/window-managers/i3-sway/sway.nix ./services/window-managers/i3-sway/swaynag.nix diff --git a/third_party/home-manager/modules/po/ca.po b/third_party/home-manager/modules/po/ca.po index 031f19f5fb..6821168f00 100644 --- a/third_party/home-manager/modules/po/ca.po +++ b/third_party/home-manager/modules/po/ca.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-06-08 10:18+0000\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-04-23 12:49+0000\n" "Last-Translator: Leix b \n" "Language-Team: Catalan \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.13-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Creant enllaços dels fitxers personals a %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Netejant enllaços orfes de %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Creant generació de perfil %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "No hi ha canvis, reutilitzant últim perfil generat %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,24 @@ msgstr "" "\n" "i després provar d'activar la teva configuració de Home Manager de nou." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Activant %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migrant el perfil de %s a %s" + +#: modules/lib-bash/activation-init.sh:53 +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" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Comprovant oldGenNum i oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -99,26 +108,34 @@ msgstr "" "\n" "i provar home-manager switch de nou. Bona Sort!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Començant activació de Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Comprovant Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Execució de simulacre" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Execució en viu" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Utilitzant versió de Nix: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "Variables d'activació:" diff --git a/third_party/home-manager/modules/po/da.po b/third_party/home-manager/modules/po/da.po index d2f5467e25..31a38b3196 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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-09-19 18:22+0000\n" "Last-Translator: cafkafk \n" "Language-Team: Danish \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-20 05:50+0000\n" +"Last-Translator: Sven Keidel \n" "Language-Team: German \n" "Language: de\n" @@ -17,25 +17,25 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.18.1\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Erstelle home Dateiverknpfungen in %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Bereinige verwaiste Links unter %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Erstelle Profilgeneration %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "Keine Änderungen. Benutze daher letzte Profilgeneration %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -57,22 +57,32 @@ msgstr "" "\n" " %s\n" "\n" -"auszuführen und wenn es ein problematisches Paket gibt, entfernen Sie es\n" +"auszuführen und wenn es ein problematisches Paket gibt, entfernen Sie es " "mit\n" "\n" " %s\n" "\n" "Versuchen Sie dann, Ihre Home Manager Konfiguration erneut zu aktivieren." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Aktiviere %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migriere das Profil von %s zu %s" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"Es konnte kein passendes Profilverzeichnis gefunden werden, %s und %s wurden " +"versucht" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Überprüfe zur Sicherheit oldGenNum und oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -100,27 +110,35 @@ msgstr "" "\n" "Führen Sie danach 'home-manager switch' aus. Viel Glück!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Fehler: USER ist auf \"%s\" gesetzt, aber wir erwarten \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Fehler: HOME ist auf \"%s\" gesetzt, aber wir erwarten \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Starte Home Manager Aktivierung" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Überprüfe zur Sicherheit Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Dies ist ein Probelauf" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Dies ist eine Live-Ausführung" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Nutze Nix Version: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "Aktivierungsvariablen:" diff --git a/third_party/home-manager/modules/po/es.po b/third_party/home-manager/modules/po/es.po index b5c0ee58a3..60953a25a5 100644 --- a/third_party/home-manager/modules/po/es.po +++ b/third_party/home-manager/modules/po/es.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-27 12:11+0000\n" +"Last-Translator: gallegonovato \n" "Language-Team: Spanish \n" "Language: es\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.12-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Creando vínculos del directorio de inicio en %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Limpiando vínculos huérfanos de %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Creando generación de perfil %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "No hay cambios, reutilizando la generación más reciente del perfil: %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,25 @@ msgstr "" "\n" "Y después reintente activar su configuración de Home Manager." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Activando %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migrando el perfil de %s a %s" + +#: modules/lib-bash/activation-init.sh:53 +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" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Chequeando oldGenNum y oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -86,43 +96,54 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" -"Conflicto entre ruta y número de la generación previa. Ambos deben o estar " -"vacíos o definidos como\n" +"¡El número y la ruta de la generación anterior están en conflicto! Estos\n" +"ambos deben estar vacíos o ambos configurados pero ahora configurados como\n" "\n" " '%s' y '%s'\n" "\n" -"Si no le importa perder las generaciones de perfil anteriores, la solución " -"más sencilla es ejecutar:\n" +"Si no le importa perder las generaciones de perfiles anteriores, entonces\n" +"la solución más fácil es probablemente ejecutar\n" "\n" -" rm %s/home-manager*\n" -" rm %s/current-home\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" "\n" -"y luego reintente ejectuar \"home-manager switch\". Suerte!" +"y probando el cambio de administrador de casa nuevamente. ¡Buena suerte!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Error: USER está configurado en \"%s\" pero esperamos \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Error: HOME está configurado en \"%s\" pero esperamos \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Comenzando activación de Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Chequeando Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Ejecución de simulacro" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Ejecución en vivo" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Usando Nix versión %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "Variables de activación:" +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "Migrando perfiles de %s a %s" + #~ msgid "" #~ "Oops, nix-env failed to install your new Home Manager profile!\n" #~ "\n" diff --git a/third_party/home-manager/modules/po/fa.po b/third_party/home-manager/modules/po/fa.po index fe1713272a..687910507f 100644 --- a/third_party/home-manager/modules/po/fa.po +++ b/third_party/home-manager/modules/po/fa.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -16,23 +16,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -48,15 +48,23 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -72,26 +80,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 4c3b6195e1..2c108c9436 100644 --- a/third_party/home-manager/modules/po/fi.po +++ b/third_party/home-manager/modules/po/fi.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -16,23 +16,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -48,15 +48,23 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -72,26 +80,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "" diff --git a/third_party/home-manager/modules/po/fr.po b/third_party/home-manager/modules/po/fr.po index c538ddc5dd..c992bf8aa4 100644 --- a/third_party/home-manager/modules/po/fr.po +++ b/third_party/home-manager/modules/po/fr.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-05-18 23:12+0000\n" -"Last-Translator: Naïm Camille Favier \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-15 14:49+0000\n" +"Last-Translator: swaps \n" "Language-Team: French \n" "Language: fr\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.13-dev\n" +"X-Generator: Weblate 5.0-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Création des liens de fichiers personnels dans %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Nettoyage des liens orphelins de %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Création de la génération de profil %s" -#: modules/files.nix:276 +#: modules/files.nix:280 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:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,23 @@ msgstr "" "\n" "Après, essayez encore d'activer votre configuration de Home Manager." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Activation de %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migration du profil de %s vers %s" + +#: modules/lib-bash/activation-init.sh:53 +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 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Vérification de oldGenNum et oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -101,27 +109,35 @@ msgstr "" "\n" "et de réessayer home-manager switch. Bonne chance !" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +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 +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 msgid "Starting Home Manager activation" msgstr "Démarrage de l'activation de Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Vérification de Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Ceci est une fausse activation (essai à blanc)" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Ceci est une vraie activation" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Version de Nix : %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 7bff64af49..8fdef9e6e1 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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+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:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -49,15 +49,23 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -73,26 +81,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "" diff --git a/third_party/home-manager/modules/po/id.po b/third_party/home-manager/modules/po/id.po new file mode 100644 index 0000000000..1c654135d1 --- /dev/null +++ b/third_party/home-manager/modules/po/id.po @@ -0,0 +1,129 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-07-17 10:03+0000\n" +"Last-Translator: Reza Almanda \n" +"Language-Team: Indonesian \n" +"Language: id\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 5.0-dev\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "Membuat tautan file beranda dalam %s" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "Membersihkan link yatim piatu dari %s" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "Membuat profil %s" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "" +"Tidak ada perubahan, jadi gunakan kembali pembuatan profil terbaru %s%s" + +#: modules/home-environment.nix:626 +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 "" +"Ups, Nix gagal memasang profil Home Manager baru Anda!\n" +"\n" +"Mungkin ada konflik dengan paket yang diinstal menggunakan\n" +"\"%S\"? Coba jalankan\n" +"\n" +" %S\n" +"\n" +"dan jika ada paket yang bertentangan, Anda dapat menghapusnya\n" +"\n" +" %S\n" +"\n" +"Kemudian coba aktifkan kembali konfigurasi Home Manager Anda." + +#: modules/home-environment.nix:659 +msgid "Activating %s" +msgstr "Mengaktifkan %s" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Memigrasi profil dari %s ke %s" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:84 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:146 +msgid "Activation variables:" +msgstr "" diff --git a/third_party/home-manager/modules/po/it.po b/third_party/home-manager/modules/po/it.po index b4c475c5b5..69f9bba77a 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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-12-15 08:50+0000\n" "Last-Translator: Walter Franzini \n" "Language-Team: Italian \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-12 10:49+0000\n" +"Last-Translator: Jeff Ames \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -17,25 +17,25 @@ 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.12-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "ホームファイルのリンクを %s に作ります" +msgstr "ホームファイルのリンクを %s に作っています" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "%s から無効なリンクを消去しています" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "世代 %s のプロファイルを生成しています" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "変更されていないので最新の世代 %s のプロファイルを再利用します" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -50,28 +50,37 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" -"NixはHome Managerの新しいプロファイルをインストールできませんでした!\n" +"新しいプロファイルのインストールに失敗しました\n" "\n" -"おそらく\"%s\"を使ってインストールしたパッケージが矛盾しているのでは?\n" +"\"%s\"を使ってインストールしたパッケージが矛盾している可能性があります。\n" "以下のコマンド\n" "\n" " %s\n" "\n" -"を試してみて、もし衝突しているパッケージがあれば、\n" +"で競合しているパッケージを確認したのち、\n" "\n" " %s\n" "\n" -"で削除し、再度Home Managerの設定の有効化を試してみてください。" +"で競合を解消し、再度Home Managerの設定を試してください。" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "%s を有効化しています" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "%s から %s にプロファイルを転送中" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" +"適切なプロファイル ディレクトリが見つかりませんでした。%s と %s を試しました" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "oldGenNum と oldGenPath の健全性検査をしています" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -99,30 +108,41 @@ msgstr "" "\n" "を実行して、home-manager switch を再び実行してみることでしょう。幸運を!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "エラー: USER は \"%s\" に設定されていますが、\"%s\" が期待されています" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "エラー: HOME は \"%s\" に設定されていますが、\"%s\" が期待されています" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Home Managerの有効化を開始しました" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Nixの健全性検査中です" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "これは予行練習(dry run)です" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" -msgstr "これは実際に実行します" +msgstr "これは実際に実行されます" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Nix バージョン %s を使用しています" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "有効化変数:" +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "%s から %s にプロファイルを移行しています" + #~ msgid "" #~ "Oops, nix-env failed to install your new Home Manager profile!\n" #~ "\n" diff --git a/third_party/home-manager/modules/po/ko.po b/third_party/home-manager/modules/po/ko.po index 7c97f64a3f..124993afe2 100644 --- a/third_party/home-manager/modules/po/ko.po +++ b/third_party/home-manager/modules/po/ko.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-08-03 05:07+0000\n" +"Last-Translator: 박수원 \n" "Language-Team: Korean \n" "Language: ko\n" @@ -17,27 +17,27 @@ 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.12-dev\n" +"X-Generator: Weblate 5.0-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "home 파일 링크를 %s에 생성하는 중" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "%s에서 연결이 끊어진 링크 파일들을 지우는 중" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "profile 세대 %s를 생성하는 중" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" "바뀐 것이 없어서 가장 최근의 profile 세대 %s를 다시 사용하는 것으로 설정하는 " "중" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -65,15 +65,23 @@ msgstr "" "\n" "그런 후, 다시 홈 매니저 설정을 활성화 해보세요." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "%s를 활성화 하는 중" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "%s에서 %s로 프로파일을 옮기는 중" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "%s와 %s를 시도했지만, 적합한 프로파일 디렉토리를 찾을 수 없습니다" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "oldGenNum과 oldGenPath가 정상인지 확인 중" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -101,30 +109,41 @@ msgstr "" "\n" "그런 후 'home-manager switch'를 다시 시도해 보십시오. 행운을 빕니다!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "에러: USER가 \"%s\"로 설정되어 있는데, 사실은 \"%s\"를 기대함" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "에러: HOME가 \"%s\"로 설정되어 있는데, 사실은 \"%s\"를 기대함" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "홈 매니저 활성화를 시작하는 중" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Nix가 정상인지 확인 중" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "모의 실행 중 입니다" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "모의 실행이 아닌 실제 실행 중 입니다" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "사용 중인 Nix 버전: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "활성화 변수들:" +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "%s에서 %s으로 profile들을 옮기는 중" + #~ msgid "" #~ "Oops, nix-env failed to install your new Home Manager profile!\n" #~ "\n" diff --git a/third_party/home-manager/modules/po/lt.po b/third_party/home-manager/modules/po/lt.po index 166bf80854..e24c088c58 100644 --- a/third_party/home-manager/modules/po/lt.po +++ b/third_party/home-manager/modules/po/lt.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -16,23 +16,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -48,15 +48,23 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -72,26 +80,34 @@ msgid "" "and trying home-manager switch again. Good luck!" msgstr "" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "" diff --git a/third_party/home-manager/modules/po/nb_NO.po b/third_party/home-manager/modules/po/nb_NO.po index 11bc04d943..1525492a35 100644 --- a/third_party/home-manager/modules/po/nb_NO.po +++ b/third_party/home-manager/modules/po/nb_NO.po @@ -7,36 +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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" -"Last-Translator: Robert Helgesson \n" -"Language-Team: Norwegian Bokmål \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-03-08 07:22+0000\n" +"Last-Translator: \"Kim A. Ødegaard\" \n" +"Language-Team: Norwegian Bokmål \n" "Language: nb_NO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.16.2-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "Lager hjemmefillenker i %s …" +msgstr "Lager hjemmefillenker i %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" -msgstr "Tømmer overflødige lenker fra %s …" +msgstr "Fjerner frakoblede lenker fra %s" -#: modules/files.nix:262 -#, fuzzy +#: modules/files.nix:263 msgid "Creating profile generation %s" -msgstr "Oppretter profil for generering %s …" +msgstr "Oppretter profil for generering %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" -msgstr "Ingen endring. Gjenbruker siste profilgenerering %s …" +msgstr "Ingen endring, gjenbruker derfor siste profilgenerering %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,16 +63,23 @@ msgstr "" "\n" "for så å aktivere ditt Home Manager-oppsett igjen." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" -msgstr "Aktiverer %s …" +msgstr "Aktiverer %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Kontrollerer verdiene av oldGenNum og oldGenPath" -#: modules/lib-bash/activation-init.sh:34 -#, fuzzy +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -88,40 +94,48 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" -"Forrige generasjonstall og sti er i konflikt. Disse\n" -"må enten begge være tomme, eller så må begge settes, men er nå\n" +"Det er en konflikt mellom forrige generasjonstall og stien. Begge\n" +"må enten være tomme eller satt, men er nå satt til\n" "\n" " «%s« og «%s«\n" "\n" "Hvis du ikke bryr deg om å miste tidligere profilgenereringer\n" -"er det enkleste å kjøre\n" +"er den enkleste løsningen antageligvis å kjøre\n" "\n" " rm %s/home-manager*\n" " rm %s/current-home\n" "\n" -"for så å prøve «home-manager»-bryteren igjen. Lykke til!" +"for så å forsøke `home-manager switch` igjen. Lykke til!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" -msgstr "Starter aktivering av hjemmebehandler …" +msgstr "Starter aktivering av Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Kontrollerer at Nix fungerer" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Dette er en simulert kjøring" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Dette er en virkelig kjøring" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Bruker Nix-versjon: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 de46344b16..96b15b6c95 100644 --- a/third_party/home-manager/modules/po/nl.po +++ b/third_party/home-manager/modules/po/nl.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-11-16 13:47+0000\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-04-10 11:48+0000\n" "Last-Translator: Pablo Bollansee \n" "Language-Team: Dutch \n" @@ -17,26 +17,26 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.15-dev\n" +"X-Generator: Weblate 4.17-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Home-bestandskoppelingen aan het maken in %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Wees links van %s aan het opkuisen" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Profiel generatie %s aan het maken" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "" "Geen veranderingen dus de laatste profiel generatie %s wordt hergebruikt" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -51,8 +51,8 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" -"Oei, het is Nix niet gelukt om je nieuwe Home Manager profiel te installeren!" -"\n" +"Oei, het is Nix niet gelukt om je nieuwe Home Manager profiel te " +"installeren!\n" "\n" "Misschien is er een conflict met het pakket dat geïnstalleerd was met\n" "\"%s\"? Probeer het volgende te draaien\n" @@ -65,15 +65,23 @@ msgstr "" "\n" "Probeer daarna je Home Manager configuratie opnieuw te activeren." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "%s aan het activeren" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "oldGenNum en oldGenPath aan het sanity checken" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -101,26 +109,37 @@ msgstr "" "\n" "en dan opnieuw 'home-manager switch' te proberen. Veel succes!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Home manager activatie aan het starten" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Nix aan het sanity checken" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Dit is een oefening" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Dit is voor echt" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Nix versie %s wordt gebruikt" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "Activatie variabelen:" + +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "Profielen van %s naar %s aan het migreren" diff --git a/third_party/home-manager/modules/po/pl.po b/third_party/home-manager/modules/po/pl.po index 307ffc0115..ae1643bf8e 100644 --- a/third_party/home-manager/modules/po/pl.po +++ b/third_party/home-manager/modules/po/pl.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-11-16 13:47+0000\n" -"Last-Translator: Jakub Janczak \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-03 19:48+0000\n" +"Last-Translator: Eryk Michalak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -18,25 +18,25 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.15-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Tworzenie dowiązań plików w %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Czyszczenie osieroconych linków z %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Tworzenie profilu generacji %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "Brak zmian więc używam ostatniej generacji profilu %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -51,28 +51,37 @@ msgid "" "\n" "Then try activating your Home Manager configuration again." msgstr "" -"Oops, Nix nie zdołał zainstalować twojego profilu Home Manager'a!\n" +"Ups, Nix nie zdołał zainstalować twojego nowego profilu Home Manager!\n" "\n" -"Być może zaistniał konflikt z pakietem zainstalowanym przez\n" -"\"%s\"? Spróbuj uruchomić\n" +"Możliwa niezgodność z paczką zainstalowaną używając: \n" +"\"%s\"? Spróbuj wykonać \n" "\n" " %s\n" "\n" -"i jeśli istnieje konflikt możesz spróbować go rozwiązać uruchamiając\n" +"jeżeli istnieje niezgodność między paczkami, możesz usunąć niezgodną paczkę " +"używając \n" "\n" " %s\n" "\n" -"Następnie spróbuj aktywować konfigurację Home Manager'a ponownie." +"Po czym spróbuj aktywować swoją konfigurację Home Manager jeszcze raz." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Aktywowanie %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migracja profilu z %s do %s" + +#: modules/lib-bash/activation-init.sh:53 +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 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Sprawdzanie poprawności oldGenNum i oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -100,26 +109,34 @@ msgstr "" "\n" "i spróbować uruchomić home-manager switch raz jeszcze. Powodzenia!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Rozpoczynam aktywację Home Managera" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Sprawdzanie poprawności Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "To jest wykonanie testowe" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "To jest wykonanie właściwe" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Używając wersji Nix: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 new file mode 100644 index 0000000000..a6d6b0a59a --- /dev/null +++ b/third_party/home-manager/modules/po/pt.po @@ -0,0 +1,140 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-02-19 10:19+0000\n" +"Last-Translator: ssantos \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.16-dev\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "A criar links simbólicos em %s" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "A limpar links órfãos do directório %s" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "A criar geração %s para o perfil" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "Nenhuma mudança, portanto a reusar a última geração %s para o perfil" + +#: modules/home-environment.nix:626 +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 "" +"Épa! O nix não conseguiu instalar o seu novo perfil do Home Manager.\n" +"\n" +"Talvez haja um conflito com um pacote que foi instalado usando\n" +"\"%s\"? Tente executar\n" +"\n" +" %s\n" +"\n" +"e se houver algum pacote com conflito, remova-o com\n" +"\n" +" %s\n" +"\n" +"E então tente novamente ativar a sua configuração do Home Manager." + +#: modules/home-environment.nix:659 +msgid "Activating %s" +msgstr "Ativando %s" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "Revalidando oldGenNum e oldGenPath" + +#: modules/lib-bash/activation-init.sh:84 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" +"O número da geração anterior e o caminho não batem! Ambos\n" +"precisam estar ou vazios ou definidos, mas estão definidos como\n" +"\n" +" '%s' e '%s'\n" +"\n" +"Se não se importa de perder gerações de perfis anteriores, então\n" +"a solução mais rápida é provavelmente executar\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"e tentar executar \"home-manager switch\" de novo. Boa sorte!" + +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "Iniciando ativação do Home Manager" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "Revalidando Nix" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "Essa é uma execução de teste" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "Essa é uma execução de fato" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "Usando versão do Nix: %s" + +#: modules/lib-bash/activation-init.sh:146 +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 3ca9977ce7..d4099cecdd 100644 --- a/third_party/home-manager/modules/po/pt_BR.po +++ b/third_party/home-manager/modules/po/pt_BR.po @@ -7,11 +7,11 @@ 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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-04-04 11:11+0000\n" "Last-Translator: Alex Miranda \n" -"Language-Team: Portuguese (Brazil) \n" +"Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,23 +19,23 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.12-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Criando links simbólicos em %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Limpando links órfãos do directório %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Criando geração %s para o perfil" -#: modules/files.nix:276 +#: modules/files.nix:280 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:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,23 @@ msgstr "" "\n" "E então tente novamente ativar a sua configuração do Home Manager." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Ativando %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Revalidando oldGenNum e oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -99,26 +107,34 @@ msgstr "" "\n" "e tentar rodar \"home-manager switch\" de novo. Boa sorte!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Iniciando ativação do Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Revalidando Nix" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Essa é uma execução de teste" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Essa é uma execução de fato" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Usando versão do Nix: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 new file mode 100644 index 0000000000..f8022e061c --- /dev/null +++ b/third_party/home-manager/modules/po/ro.po @@ -0,0 +1,113 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Home Manager contributors +# This file is distributed under the same license as the Home Manager Modules package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "" + +#: modules/home-environment.nix:626 +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:659 +msgid "Activating %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "" + +#: modules/lib-bash/activation-init.sh:84 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" + +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "" + +#: modules/lib-bash/activation-init.sh:146 +msgid "Activation variables:" +msgstr "" diff --git a/third_party/home-manager/modules/po/ru.po b/third_party/home-manager/modules/po/ru.po index feba1b94ab..f70468a2c5 100644 --- a/third_party/home-manager/modules/po/ru.po +++ b/third_party/home-manager/modules/po/ru.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-03-26 23:57+0000\n" -"Last-Translator: Robert Helgesson \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-07 12:51+0000\n" +"Last-Translator: Nikolay Mokrinsky \n" "Language-Team: Russian \n" "Language: ru\n" @@ -18,25 +18,25 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Создаю ссылки в домашней директории %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Удаляю устаревшие ссылки из %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Создаю профиль в поколении %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "Изменений нет, переиспользую профиль в последнем поколении %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -64,15 +64,23 @@ msgstr "" "\n" "После попробуйте активировать конфигурацию снова." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Активирую %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Переношу профиль из %s в %s" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Не найдена подходящая директория профиля, пробовали %s и %s" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Сравниваю oldGenNum и oldGenPath на всякий" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -100,27 +108,35 @@ msgstr "" "\n" "и выполнить home-manager switch ещё раз. Удачи!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Ошибка: USER установлена в \"%s\", но ожидается \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Ошибка: HOME установлена в \"%s\", но ожидается \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Начинаю активацию Home Manager" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Проверяю Nix на всякий случай" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Это пробный запуск" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Это реальный запуск" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Использую Nix версии: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 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 09e8a9e99a..270e1e58cc 100644 --- a/third_party/home-manager/modules/po/sv.po +++ b/third_party/home-manager/modules/po/sv.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-03-26 23:56+0000\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-27 12:11+0000\n" "Last-Translator: Robert Helgesson \n" "Language-Team: Swedish \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.12-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" msgstr "Skapar hemfil-länkar i %s" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "Rensar bort överflödiga länkar från %s" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "Skapar profil för generation %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "Ingen förändring, återanvänder därför profil-generation %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,23 @@ msgstr "" "\n" "Prova sedan att aktivera din Home Manager-konfiguration igen." -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "Aktiverar %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Migrerar profil från %s till %s" + +#: modules/lib-bash/activation-init.sh:53 +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" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "Kontrollerar värdena på oldGenNum och oldGenPath" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -99,30 +107,41 @@ msgstr "" "\n" "och prova 'home-manager switch' igen. Lycka till!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Fel: USER är satt till \"%s\" men \"%s\" förväntades" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Fel: HOME är satt till \"%s\" men \"%s\" förväntades" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "Startar Home Manager-aktivering" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "Kontrollerar att Nix funkar" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "Detta är en simulerad körning" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "Detta är en verklig körning" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "Använder Nix-version: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "Aktiveringsvariabler:" +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "Migrerar profiler från %s till %s" + #~ msgid "" #~ "Oops, nix-env failed to install your new Home Manager profile!\n" #~ "\n" diff --git a/third_party/home-manager/modules/po/tr.po b/third_party/home-manager/modules/po/tr.po index 5b7dad7396..1e828c02fc 100644 --- a/third_party/home-manager/modules/po/tr.po +++ b/third_party/home-manager/modules/po/tr.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2022-03-26 23:57+0000\n" "Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Home Manager Modules\n" +"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-05-28 22:49+0000\n" +"Last-Translator: Dan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.18-dev\n" + +#: modules/files.nix:234 +msgid "Creating home file links in %s" +msgstr "Створення посилань на домашні файли в %s" + +#: modules/files.nix:247 +msgid "Cleaning up orphan links from %s" +msgstr "Очищення невідомих посилань із %s" + +#: modules/files.nix:263 +msgid "Creating profile generation %s" +msgstr "Створення генерації профілю %s" + +#: modules/files.nix:280 +msgid "No change so reusing latest profile generation %s" +msgstr "Без змін, тому повторне використання останньої генерації профілю %s" + +#: modules/home-environment.nix:626 +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 "" +"На жаль, Nix не вдалося встановити ваш новий профіль Home Manager!\n" +"\n" +"Можливо, виник конфлікт із пакунком, встановленим за допомогою\n" +"\"%s\"? Спробуйте запустити\n" +"\n" +" %s\n" +"\n" +"і якщо є конфліктуючий пакунок, ви можете його видалити\n" +"\n" +" %s\n" +"\n" +"Потім спробуйте знову активувати конфігурацію Home Manager." + +#: modules/home-environment.nix:659 +msgid "Activating %s" +msgstr "Активація %s" + +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "Перенесення профілю з %s на %s" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "Не вдалося знайти відповідний каталог профілю, спробував %s і %s" + +#: modules/lib-bash/activation-init.sh:81 +msgid "Sanity checking oldGenNum and oldGenPath" +msgstr "Перевірка цілісності oldGenNum та oldGenPath" + +#: modules/lib-bash/activation-init.sh:84 +msgid "" +"The previous generation number and path are in conflict! These\n" +"must be either both empty or both set but are now set to\n" +"\n" +" '%s' and '%s'\n" +"\n" +"If you don't mind losing previous profile generations then\n" +"the easiest solution is probably to run\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"and trying home-manager switch again. Good luck!" +msgstr "" +"Номер і шлях попередньої генерації конфліктують! Ці\n" +"мають бути або порожніми, або обидва встановлені, але тепер встановлено " +"значення\n" +"\n" +" \"%s\" і \"%s\"\n" +"\n" +"Якщо ви не проти втратити попередні генерації профілів, тоді\n" +"найпростішим рішенням є, мабуть, запуск\n" +"\n" +" rm %shome-manager*\n" +" rm %current-home\n" +"\n" +"і знову намагатися переключитися на home-manager switch. Удачі!" + +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "Помилка: USER встановлено на \"%s\", але очікувалося \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "Помилка: HOME встановлено на \"%s\", але очікувалося \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 +msgid "Starting Home Manager activation" +msgstr "Початок активації Home Manager" + +#: modules/lib-bash/activation-init.sh:123 +msgid "Sanity checking Nix" +msgstr "Перевірка адекватності Nix" + +#: modules/lib-bash/activation-init.sh:133 +msgid "This is a dry run" +msgstr "Це пробний запуск" + +#: modules/lib-bash/activation-init.sh:137 +msgid "This is a live run" +msgstr "Це справжній запуск" + +#: modules/lib-bash/activation-init.sh:143 +msgid "Using Nix version: %s" +msgstr "Використання версії Nix: %s" + +#: modules/lib-bash/activation-init.sh:146 +msgid "Activation variables:" +msgstr "Активація змінних:" + +#~ msgid "Migrating profiles from %s to %s" +#~ msgstr "Перенесення профілів з %s на %s" diff --git a/third_party/home-manager/modules/po/zh_Hans.po b/third_party/home-manager/modules/po/zh_Hans.po index ca62aa8749..3ea71723d9 100644 --- a/third_party/home-manager/modules/po/zh_Hans.po +++ b/third_party/home-manager/modules/po/zh_Hans.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: 2022-03-26 15:08+0100\n" -"PO-Revision-Date: 2022-05-16 13:18+0000\n" -"Last-Translator: Yubo-Cao \n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" +"PO-Revision-Date: 2023-06-12 10:49+0000\n" +"Last-Translator: Hongtyu Bhe \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_Hans\n" @@ -17,25 +17,25 @@ 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.13-dev\n" +"X-Generator: Weblate 4.18-dev\n" -#: modules/files.nix:233 +#: modules/files.nix:234 msgid "Creating home file links in %s" -msgstr "正在 %s 中创建家目录文件链接" +msgstr "正在 %s 中创建 Home 目录文件链接" -#: modules/files.nix:246 +#: modules/files.nix:247 msgid "Cleaning up orphan links from %s" msgstr "正在从 %s 清理孤立链接" -#: modules/files.nix:262 +#: modules/files.nix:263 msgid "Creating profile generation %s" msgstr "正在创建配置文件世代 %s" -#: modules/files.nix:276 +#: modules/files.nix:280 msgid "No change so reusing latest profile generation %s" msgstr "未发生变化,正在重新使用最近一次的配置文件世代 %s" -#: modules/home-environment.nix:607 +#: modules/home-environment.nix:626 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -63,15 +63,23 @@ msgstr "" "\n" "来移除。然后尝试再次激活您的 Home Manager 配置。" -#: modules/home-environment.nix:639 +#: modules/home-environment.nix:659 msgid "Activating %s" msgstr "正在激活 %s" -#: modules/lib-bash/activation-init.sh:31 +#: modules/lib-bash/activation-init.sh:22 +msgid "Migrating profile from %s to %s" +msgstr "将从%s向%s迁移配置档案" + +#: modules/lib-bash/activation-init.sh:53 +msgid "Could not find suitable profile directory, tried %s and %s" +msgstr "在 %s 以及 %s 中未能找到合适的档案目录" + +#: modules/lib-bash/activation-init.sh:81 msgid "Sanity checking oldGenNum and oldGenPath" msgstr "正在进行 oldGenNum 和 oldGenPath 的完整性检查" -#: modules/lib-bash/activation-init.sh:34 +#: modules/lib-bash/activation-init.sh:84 msgid "" "The previous generation number and path are in conflict! These\n" "must be either both empty or both set but are now set to\n" @@ -86,27 +94,47 @@ msgid "" "\n" "and trying home-manager switch again. Good luck!" msgstr "" +"上一次生成序号和路径存在冲突!\n" +"两者需要同时为空或者设置,但目前状态是\n" +"\n" +" '%s' 和 '%s'\n" +"\n" +"但如果你不介意丢失上次生成结果,\n" +"最简单的解决方案是运行\n" +"\n" +" rm %s/home-manager*\n" +" rm %s/current-home\n" +"\n" +"然后再次尝试执行 home-manager switch。祝你一把过!" -#: modules/lib-bash/activation-init.sh:51 +#: modules/lib-bash/activation-init.sh:95 +msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgstr "错误: USER 被配置为 \"%s\" 但我们预期它是 \"%s\"" + +#: modules/lib-bash/activation-init.sh:104 +msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgstr "错误: HOME 目前设置了 \"%s\" 但我们需要它是 \"%s\"" + +#: modules/lib-bash/activation-init.sh:119 msgid "Starting Home Manager activation" msgstr "正在启动 Home Manager 初始化程序" -#: modules/lib-bash/activation-init.sh:55 +#: modules/lib-bash/activation-init.sh:123 msgid "Sanity checking Nix" msgstr "正在进行 Nix 完整性检查" -#: modules/lib-bash/activation-init.sh:61 +#: modules/lib-bash/activation-init.sh:133 msgid "This is a dry run" msgstr "这是试运行" -#: modules/lib-bash/activation-init.sh:64 +#: modules/lib-bash/activation-init.sh:137 msgid "This is a live run" msgstr "这是在实际运行" -#: modules/lib-bash/activation-init.sh:69 +#: modules/lib-bash/activation-init.sh:143 msgid "Using Nix version: %s" msgstr "正在使用的 Nix 版本: %s" -#: modules/lib-bash/activation-init.sh:72 +#: modules/lib-bash/activation-init.sh:146 msgid "Activation variables:" msgstr "激活的变量:" diff --git a/third_party/home-manager/modules/po/zh_Hant.po b/third_party/home-manager/modules/po/zh_Hant.po index 0e7fc6f84c..33b2f8ed13 100644 --- a/third_party/home-manager/modules/po/zh_Hant.po +++ b/third_party/home-manager/modules/po/zh_Hant.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: 2022-03-26 15:08+0100\n" +"POT-Creation-Date: 2023-07-30 09:08+0200\n" "PO-Revision-Date: 2023-01-08 11:50+0000\n" "Last-Translator: Eric Ho \n" "Language-Team: Chinese (Traditional) $HOME/.config/abook/abookrc. + Extra lines added to {file}`$HOME/.config/abook/abookrc`. Available configuration options are described in the abook repository: - . + . ''; }; }; diff --git a/third_party/home-manager/modules/programs/aerc-accounts.nix b/third_party/home-manager/modules/programs/aerc-accounts.nix index ebe1d5413a..5c772c2ccd 100644 --- a/third_party/home-manager/modules/programs/aerc-accounts.nix +++ b/third_party/home-manager/modules/programs/aerc-accounts.nix @@ -4,12 +4,48 @@ with lib; let mapAttrNames = f: attr: - with builtins; listToAttrs (attrValues (mapAttrs (k: v: { name = f k; value = v; }) attr)); + addAccountName = name: k: "${k}:account=${name}"; + + oauth2Params = mkOption { + type = with types; + nullOr (submodule { + options = { + token_endpoint = mkOption { + type = nullOr str; + default = null; + description = "The OAuth2 token endpoint."; + }; + client_id = mkOption { + type = nullOr str; + default = null; + description = "The OAuth2 client identifier."; + }; + client_secret = mkOption { + type = nullOr str; + default = null; + description = "The OAuth2 client secret."; + }; + scope = mkOption { + type = nullOr str; + default = null; + description = "The OAuth2 requested scope."; + }; + }; + }); + default = null; + example = { token_endpoint = ""; }; + description = '' + Sets the oauth2 params if authentication mechanism oauthbearer or + xoauth2 is used. + See {manpage}`aerc-imap(5)`. + ''; + }; + in { type = mkOption { type = types.attrsOf (types.submodule { @@ -21,11 +57,12 @@ in { example = literalExpression ''{ source = "maildir://~/Maildir/example"; }''; description = '' - Extra config added to the configuration of this account in - $HOME/.config/aerc/accounts.conf. - See aerc-config(5). + Extra config added to the configuration section for this account in + {file}`$HOME/.config/aerc/accounts.conf`. + See {manpage}`aerc-accounts(5)`. ''; }; + extraBinds = mkOption { type = confSections; default = { }; @@ -33,82 +70,142 @@ in { ''{ messages = { d = ":move ''${folder.trash}"; }; }''; description = '' Extra bindings specific to this account, added to - $HOME/.config/aerc/accounts.conf. - See aerc-config(5). + {file}`$HOME/.config/aerc/binds.conf`. + See {manpage}`aerc-binds(5)`. ''; }; + extraConfig = mkOption { type = confSections; default = { }; - example = literalExpression "{ ui = { sidebar-width = 42; }; }"; + example = literalExpression "{ ui = { sidebar-width = 25; }; }"; description = '' - Extra config specific to this account, added to - $HOME/.config/aerc/aerc.conf. - See aerc-config(5). + Config specific to this account, added to {file}`$HOME/.config/aerc/aerc.conf`. + Aerc only supports per-account UI configuration. + For other sections of {file}`$HOME/.config/aerc/aerc.conf`, + use `programs.aerc.extraConfig`. + See {manpage}`aerc-config(5)`. ''; }; + + imapAuth = mkOption { + type = with types; nullOr (enum [ "oauthbearer" "xoauth2" ]); + default = null; + example = "auth"; + description = '' + Sets the authentication mechanism if imap is used as the incoming + method. + See {manpage}`aerc-imap(5)`. + ''; + }; + + imapOauth2Params = oauth2Params; + smtpAuth = mkOption { - type = with types; nullOr (enum [ "none" "plain" "login" ]); + type = with types; + nullOr (enum [ "none" "plain" "login" "oauthbearer" "xoauth2" ]); default = "plain"; example = "auth"; description = '' Sets the authentication mechanism if smtp is used as the outgoing method. - See aerc-smtp(5). + See {manpage}`aerc-smtp(5)`. ''; }; + + smtpOauth2Params = oauth2Params; }; }); }; + mkAccount = name: account: let nullOrMap = f: v: if v == null then v else f v; + optPort = port: if port != null then ":${toString port}" else ""; + optAttr = k: v: if v != null && v != [ ] && v != "" then { ${k} = v; } else { }; + optPwCmd = k: p: - optAttr "${k}-cred-cmd" (nullOrMap (builtins.concatStringsSep " ") p); + optAttr "${k}-cred-cmd" (nullOrMap (concatStringsSep " ") p); + + useOauth = auth: builtins.elem auth [ "oauthbearer" "xoauth2" ]; + + oauthParams = { auth, params }: + if useOauth auth && params != null && params != { } then + "?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList + (k: v: k + "=" + lib.strings.escapeURL v) params + else + ""; + mkConfig = { maildir = cfg: { source = "maildir://${config.accounts.email.maildirBasePath}/${cfg.maildir.path}"; }; + imap = { userName, imap, passwordCommand, aerc, ... }@cfg: let + loginMethod' = + if cfg.aerc.imapAuth != null then "+${cfg.aerc.imapAuth}" else ""; + + oauthParams' = oauthParams { + auth = cfg.aerc.imapAuth; + params = cfg.aerc.imapOauth2Params; + }; + protocol = if imap.tls.enable then - if imap.tls.useStartTls then "imap" else "imaps" + if imap.tls.useStartTls then "imap" else "imaps${loginMethod'}" else "imap+insecure"; + port' = optPort imap.port; + in { - source = "${protocol}://${userName}@${imap.host}${port'}"; + source = + "${protocol}://${userName}@${imap.host}${port'}${oauthParams'}"; } // optPwCmd "source" passwordCommand; + smtp = { userName, smtp, passwordCommand, ... }@cfg: let loginMethod' = if cfg.aerc.smtpAuth != null then "+${cfg.aerc.smtpAuth}" else ""; - protocol = if smtp.tls.enable && !smtp.tls.useStartTls then - "smtps${loginMethod'}" + + oauthParams' = oauthParams { + auth = cfg.aerc.smtpAuth; + params = cfg.aerc.smtpOauth2Params; + }; + + protocol = if smtp.tls.enable then + if smtp.tls.useStartTls then + "smtp${loginMethod'}" + else + "smtps${loginMethod'}" else - "smtp${loginMethod'}"; + "smtp+insecure${loginMethod'}"; + port' = optPort smtp.port; - smtp-starttls = - if smtp.tls.enable && smtp.tls.useStartTls then "yes" else null; + in { - outgoing = "${protocol}://${userName}@${smtp.host}${port'}"; - } // optPwCmd "outgoing" passwordCommand - // optAttr "smtp-starttls" smtp-starttls; + outgoing = + "${protocol}://${userName}@${smtp.host}${port'}${oauthParams'}"; + } // optPwCmd "outgoing" passwordCommand; + msmtp = cfg: { outgoing = "msmtpq --read-envelope-from --read-recipients"; }; + }; + basicCfg = account: { from = "${account.realName} <${account.address}>"; } // (optAttr "copy-to" account.folders.sent) // (optAttr "default" account.folders.inbox) // (optAttr "postpone" account.folders.drafts) - // (optAttr "aliases" account.aliases) // account.aerc.extraAccounts; + // (optAttr "aliases" account.aliases); + sourceCfg = account: if account.mbsync.enable || account.offlineimap.enable then mkConfig.maildir account @@ -116,6 +213,7 @@ in { mkConfig.imap account else { }; + outgoingCfg = account: if account.msmtp.enable then mkConfig.msmtp account @@ -123,9 +221,13 @@ in { mkConfig.smtp account else { }; - in (basicCfg account) // (sourceCfg account) // (outgoingCfg account); + + in (basicCfg account) // (sourceCfg account) // (outgoingCfg account) + // account.aerc.extraAccounts; + mkAccountConfig = name: account: mapAttrNames (addAccountName name) account.aerc.extraConfig; + mkAccountBinds = name: account: mapAttrNames (addAccountName name) account.aerc.extraBinds; } diff --git a/third_party/home-manager/modules/programs/aerc.nix b/third_party/home-manager/modules/programs/aerc.nix index ad44bf9064..662ab5b18d 100644 --- a/third_party/home-manager/modules/programs/aerc.nix +++ b/third_party/home-manager/modules/programs/aerc.nix @@ -3,36 +3,47 @@ with lib; let cfg = config.programs.aerc; + primitive = with types; ((type: either type (listOf type)) (nullOr (oneOf [ str int bool float ]))) // { description = - "values (null, bool, int, string of float) or a list of values, that will be joined with a comma"; + "values (null, bool, int, string, or float) or a list of values, that will be joined with a comma"; }; + confSection = types.attrsOf primitive; + confSections = types.attrsOf confSection; + sectionsOrLines = types.either types.lines confSections; + accounts = import ./aerc-accounts.nix { inherit config pkgs lib confSection confSections; }; + aerc-accounts = attrsets.filterAttrs (_: v: v.aerc.enable) config.accounts.email.accounts; + in { meta.maintainers = with lib.hm.maintainers; [ lukasngl ]; options.accounts.email.accounts = accounts.type; + options.programs.aerc = { enable = mkEnableOption "aerc"; + package = mkPackageOption pkgs "aerc" { }; + extraAccounts = mkOption { type = sectionsOrLines; default = { }; example = literalExpression ''{ Work = { source = "maildir://~/Maildir/work"; }; }''; description = '' - Extra lines added to $HOME/.config/aerc/accounts.conf. - See aerc-config(5). + Extra lines added to {file}`$HOME/.config/aerc/accounts.conf`. + + See {manpage}`aerc-config(5)`. ''; }; @@ -41,9 +52,10 @@ in { default = { }; example = literalExpression ''{ messages = { q = ":quit"; }; }''; description = '' - Extra lines added to $HOME/.config/aerc/binds.conf. + Extra lines added to {file}`$HOME/.config/aerc/binds.conf`. Global keybindings can be set in the `global` section. - See aerc-config(5). + + See {manpage}`aerc-config(5)`. ''; }; @@ -52,8 +64,9 @@ in { default = { }; example = literalExpression ''{ ui = { sort = "-r date"; }; }''; description = '' - Extra lines added to $HOME/.config/aerc/aerc.conf. - See aerc-config(5). + Extra lines added to {file}`$HOME/.config/aerc/aerc.conf`. + + See {manpage}`aerc-config(5)`. ''; }; @@ -64,10 +77,12 @@ in { { default = { ui = { "tab.selected.reverse" = toggle; }; }; }; ''; description = '' - Stylesets added to $HOME/.config/aerc/stylesets/. - See aerc-stylesets(7). + Stylesets added to {file}`$HOME/.config/aerc/stylesets/`. + + See {manpage}`aerc-stylesets(7)`. ''; }; + templates = mkOption { type = with types; attrsOf lines; default = { }; @@ -75,23 +90,22 @@ in { { new_message = "Hello!"; }; ''; description = '' - Templates added to $HOME/.config/aerc/templates/. - See aerc-templates(7). + Templates added to {file}`$HOME/.config/aerc/templates/`. + + See {manpage}`aerc-templates(7)`. ''; }; }; config = let - joinCfg = cfgs: - with builtins; - concatStringsSep "\n" (filter (v: v != "") cfgs); + joinCfg = cfgs: concatStringsSep "\n" (filter (v: v != "") cfgs); + toINI = conf: # quirk: global section is prepended w/o section heading let global = conf.global or { }; local = removeAttrs conf [ "global" ]; optNewLine = if global != { } && local != { } then "\n" else ""; mkValueString = v: - with builtins; if isList v then # join with comma concatStringsSep "," (map (generators.mkValueStringDefault { }) v) else @@ -102,64 +116,106 @@ in { (generators.toKeyValue { inherit mkKeyValue; } global) (generators.toINI { inherit mkKeyValue; } local) ]; - mkINI = conf: if builtins.isString conf then conf else toINI conf; + + mkINI = conf: if isString conf then conf else toINI conf; + mkStyleset = attrsets.mapAttrs' (k: v: - let value = if builtins.isString v then v else toINI { global = v; }; + let value = if isString v then v else toINI { global = v; }; in { name = "aerc/stylesets/${k}"; value.text = joinCfg [ header value ]; }); + mkTemplates = attrsets.mapAttrs' (k: v: { name = "aerc/templates/${k}"; value.text = v; }); - accountsExtraAccounts = builtins.mapAttrs accounts.mkAccount aerc-accounts; - accountsExtraConfig = - builtins.mapAttrs accounts.mkAccountConfig aerc-accounts; - accountsExtraBinds = - builtins.mapAttrs accounts.mkAccountBinds aerc-accounts; - joinContextual = contextual: - with builtins; - joinCfg (map mkINI (attrValues contextual)); + + primaryAccount = attrsets.filterAttrs (_: v: v.primary) aerc-accounts; + otherAccounts = attrsets.filterAttrs (_: v: !v.primary) aerc-accounts; + + primaryAccountAccounts = mapAttrs accounts.mkAccount primaryAccount; + + accountsExtraAccounts = mapAttrs accounts.mkAccount otherAccounts; + + accountsExtraConfig = mapAttrs accounts.mkAccountConfig aerc-accounts; + + accountsExtraBinds = mapAttrs accounts.mkAccountBinds aerc-accounts; + + joinContextual = contextual: joinCfg (map mkINI (attrValues contextual)); + + isRecursivelyEmpty = x: + if isAttrs x then + all (x: x == { } || isRecursivelyEmpty x) (attrValues x) + else + false; + + genAccountsConf = ((cfg.extraAccounts != "" && cfg.extraAccounts != { }) + || !(isRecursivelyEmpty accountsExtraAccounts) + || !(isRecursivelyEmpty primaryAccountAccounts)); + + genAercConf = ((cfg.extraConfig != "" && cfg.extraConfig != { }) + || !(isRecursivelyEmpty accountsExtraConfig)); + + genBindsConf = ((cfg.extraBinds != "" && cfg.extraBinds != { }) + || !(isRecursivelyEmpty accountsExtraBinds)); + header = '' # Generated by Home Manager. ''; + in mkIf cfg.enable { - warnings = if ((cfg.extraAccounts != "" && cfg.extraAccounts != { }) - || accountsExtraAccounts != { }) + warnings = if genAccountsConf && (cfg.extraConfig.general.unsafe-accounts-conf or false) == false then ['' - aerc: An email account was configured, but `extraConfig.general.unsafe-accounts-conf` is set to false or unset. - This will prevent aerc from starting, see `unsafe-accounts-conf` in aerc-config(5) for details. - Consider setting the option `extraConfig.general.unsafe-accounts-conf` to true. + aerc: `programs.aerc.enable` is set, but `...extraConfig.general.unsafe-accounts-conf` is set to false or unset. + This will prevent aerc from starting; see `unsafe-accounts-conf` in the man page aerc-config(5): + > By default, the file permissions of accounts.conf must be restrictive and only allow reading by the file owner (0600). + > Set this option to true to ignore this permission check. Use this with care as it may expose your credentials. + These permissions are not possible with home-manager, since the generated file is in the nix-store (permissions 0444). + Therefore, please set `programs.aerc.extraConfig.general.unsafe-accounts-conf = true`. + This option is safe; if `passwordCommand` is properly set, no credentials will be written to the nix store. ''] else [ ]; - home.packages = [ pkgs.aerc ]; + + assertions = [{ + assertion = let + extraConfigSections = (unique (flatten + (mapAttrsToList (_: v: attrNames v.aerc.extraConfig) aerc-accounts))); + in extraConfigSections == [ ] || extraConfigSections == [ "ui" ]; + message = '' + Only the ui section of $XDG_CONFIG_HOME/aerc.conf supports contextual (per-account) configuration. + Please configure it with accounts.email.accounts._.aerc.extraConfig.ui and move any other + configuration to programs.aerc.extraConfig. + ''; + }]; + + home.packages = [ cfg.package ]; + xdg.configFile = { - "aerc/accounts.conf" = mkIf - ((cfg.extraAccounts != "" && cfg.extraAccounts != { }) - || accountsExtraAccounts != { }) { - text = joinCfg [ - header - (mkINI cfg.extraAccounts) - (mkINI accountsExtraAccounts) - ]; - }; - "aerc/aerc.conf" = - mkIf (cfg.extraConfig != "" && cfg.extraConfig != { }) { - text = joinCfg [ - header - (mkINI cfg.extraConfig) - (joinContextual accountsExtraConfig) - ]; - }; - "aerc/binds.conf" = mkIf ((cfg.extraBinds != "" && cfg.extraBinds != { }) - || accountsExtraBinds != { }) { - text = joinCfg [ - header - (mkINI cfg.extraBinds) - (joinContextual accountsExtraBinds) - ]; - }; + "aerc/accounts.conf" = mkIf genAccountsConf { + text = joinCfg [ + header + (mkINI cfg.extraAccounts) + (mkINI primaryAccountAccounts) + (mkINI accountsExtraAccounts) + ]; + }; + + "aerc/aerc.conf" = mkIf genAercConf { + text = joinCfg [ + header + (mkINI cfg.extraConfig) + (joinContextual accountsExtraConfig) + ]; + }; + + "aerc/binds.conf" = mkIf genBindsConf { + text = joinCfg [ + header + (mkINI cfg.extraBinds) + (joinContextual accountsExtraBinds) + ]; + }; } // (mkStyleset cfg.stylesets) // (mkTemplates cfg.templates); }; } diff --git a/third_party/home-manager/modules/programs/afew.nix b/third_party/home-manager/modules/programs/afew.nix index 6c480f03be..e0bb260468 100644 --- a/third_party/home-manager/modules/programs/afew.nix +++ b/third_party/home-manager/modules/programs/afew.nix @@ -32,7 +32,7 @@ in { description = '' Extra lines added to afew configuration file. Available configuration options are described in the afew manual: - . + . ''; }; }; diff --git a/third_party/home-manager/modules/programs/alacritty.nix b/third_party/home-manager/modules/programs/alacritty.nix index eaf304144d..56beb6d484 100644 --- a/third_party/home-manager/modules/programs/alacritty.nix +++ b/third_party/home-manager/modules/programs/alacritty.nix @@ -37,8 +37,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/alacritty/alacritty.yml. See - + {file}`$XDG_CONFIG_HOME/alacritty/alacritty.yml`. See + for the default configuration. ''; }; diff --git a/third_party/home-manager/modules/programs/alot-accounts.nix b/third_party/home-manager/modules/programs/alot-accounts.nix index 9dee3c83ad..0a51bfde5a 100644 --- a/third_party/home-manager/modules/programs/alot-accounts.nix +++ b/third_party/home-manager/modules/programs/alot-accounts.nix @@ -10,7 +10,7 @@ with lib; description = '' Command to send a mail. If msmtp is enabled for the account, then this is set to - msmtpq --read-envelope-from --read-recipients. + {command}`msmtpq --read-envelope-from --read-recipients`. ''; }; @@ -35,7 +35,7 @@ with lib; ''; description = '' Contact completion configuration as expected per alot. - See alot's wiki for + See [alot's wiki](http://alot.readthedocs.io/en/latest/configuration/contacts_completion.html) for explanation about possible values. ''; }; diff --git a/third_party/home-manager/modules/programs/alot.nix b/third_party/home-manager/modules/programs/alot.nix index 0cc20ec6e0..d0f552f92d 100644 --- a/third_party/home-manager/modules/programs/alot.nix +++ b/third_party/home-manager/modules/programs/alot.nix @@ -28,7 +28,7 @@ let description = '' Fixed string representation for this tag. The tag can be hidden from view, if the key translated is set to - "", the empty string. + `""`, the empty string. ''; }; @@ -38,7 +38,7 @@ let description = '' A pair of strings that define a regular substitution to compute the string representation on the fly using - re.sub. + `re.sub`. ''; }; @@ -48,7 +48,7 @@ let example = "'','', 'white','light red', 'white','#d66'"; description = '' How to display the tag when unfocused. - See . + See . ''; }; @@ -68,7 +68,9 @@ let realname = realName; sendmail_command = optionalString (alot.sendMailCommand != null) alot.sendMailCommand; + } // optionalAttrs (folders.sent != null) { sent_box = "maildir" + "://" + maildir.absPath + "/" + folders.sent; + } // optionalAttrs (folders.drafts != null) { draft_box = "maildir" + "://" + maildir.absPath + "/" + folders.drafts; } // optionalAttrs (aliases != [ ]) { aliases = concatStringsSep "," aliases; diff --git a/third_party/home-manager/modules/programs/antidote.nix b/third_party/home-manager/modules/programs/antidote.nix new file mode 100644 index 0000000000..f1fa044ce5 --- /dev/null +++ b/third_party/home-manager/modules/programs/antidote.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.programs.zsh.antidote; + + relToDotDir = file: + (optionalString (config.programs.zsh.dotDir != null) + (config.programs.zsh.dotDir + "/")) + file; + + zPluginStr = (pluginNames: + optionalString (pluginNames != [ ]) "${concatStrings (map (name: '' + ${name} + '') pluginNames)}"); + + parseHashId = path: + elemAt (builtins.match "/nix/store/([a-zA-Z0-9]+)-.*" path) 0; +in { + meta.maintainers = [ maintainers.hitsmaxft ]; + + options.programs.zsh.antidote = { + enable = mkEnableOption "antidote - a zsh plugin manager"; + + plugins = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "zsh-users/zsh-autosuggestions" ]; + description = "List of antidote plugins."; + }; + + useFriendlyNames = mkEnableOption "friendly names"; + + package = mkPackageOption pkgs "antidote" { }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + programs.zsh.initExtraBeforeCompInit = let + configFiles = pkgs.runCommand "hm_antidote-files" { } '' + echo "${zPluginStr cfg.plugins}" > $out + ''; + hashId = parseHashId "${configFiles}"; + in '' + ## home-manager/antidote begin : + source ${cfg.package}/share/antidote/antidote.zsh + ${optionalString cfg.useFriendlyNames + "zstyle ':antidote:bundle' use-friendly-names 'yes'"} + + bundlefile=${configFiles} + zstyle ':antidote:bundle' file $bundlefile + staticfile=/tmp/tmp_hm_zsh_plugins.zsh-${hashId} + zstyle ':antidote:static' file $staticfile + + antidote load $bundlefile $staticfile + + ## home-manager/antidote end + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/aria2.nix b/third_party/home-manager/modules/programs/aria2.nix index 25727cead5..549e6baf44 100644 --- a/third_party/home-manager/modules/programs/aria2.nix +++ b/third_party/home-manager/modules/programs/aria2.nix @@ -23,12 +23,9 @@ in { type = with types; attrsOf (oneOf [ bool float int str ]); default = { }; description = '' - Options to add to aria2.conf file. + Options to add to {file}`aria2.conf` file. See - - aria2c - 1 - + {manpage}`aria2c(1)` for options. ''; example = literalExpression '' @@ -46,7 +43,7 @@ in { type = types.lines; default = ""; description = '' - Extra lines added to aria2.conf file. + Extra lines added to {file}`aria2.conf` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/astroid-accounts.nix b/third_party/home-manager/modules/programs/astroid-accounts.nix index fb803867ef..b9b1fac02e 100644 --- a/third_party/home-manager/modules/programs/astroid-accounts.nix +++ b/third_party/home-manager/modules/programs/astroid-accounts.nix @@ -11,7 +11,7 @@ with lib; description = '' Command to send a mail. If msmtp is enabled for the account, then this is set to - msmtpq --read-envelope-from --read-recipients. + {command}`msmtpq --read-envelope-from --read-recipients`. ''; }; diff --git a/third_party/home-manager/modules/programs/astroid.nix b/third_party/home-manager/modules/programs/astroid.nix index 4e79ea4d3c..911ce491b7 100644 --- a/third_party/home-manager/modules/programs/astroid.nix +++ b/third_party/home-manager/modules/programs/astroid.nix @@ -80,14 +80,19 @@ in { example = "nvim-qt -- -c 'set ft=mail' '+set fileencoding=utf-8' '+set ff=unix' '+set enc=utf-8' '+set fo+=w' %1"; description = '' - You can use %1, %2, and - %3 to refer respectively to: - - file name - server name - socket ID - - See . + You can use the following variables: + + `%1` + : file name + + `%2` + : server name + + `%3` + : socket ID + + See [Customizing editor](https://github.com/astroidmail/astroid/wiki/Customizing-editor) + on the Astroid wiki. ''; }; diff --git a/third_party/home-manager/modules/programs/atuin.nix b/third_party/home-manager/modules/programs/atuin.nix index 9a38f54218..bd907ac032 100644 --- a/third_party/home-manager/modules/programs/atuin.nix +++ b/third_party/home-manager/modules/programs/atuin.nix @@ -26,16 +26,17 @@ in { default = true; description = '' Whether to enable Atuin's Bash integration. This will bind - ctrl-r to open the Atuin history. + `ctrl-r` to open the Atuin history. ''; }; - enableZshIntegration = mkEnableOption "Zsh integration" // { + enableZshIntegration = mkOption { + type = types.bool; default = true; description = '' Whether to enable Atuin's Zsh integration. - - If enabled, this will bind ctrl-r and the up-arrow + + If enabled, this will bind `ctrl-r` and the up-arrow key to open the Atuin history. ''; }; @@ -45,11 +46,20 @@ in { type = types.bool; description = '' Whether to enable Atuin's Fish integration. - + If enabled, this will bind the up-arrow key to open the Atuin history. ''; }; + flags = mkOption { + default = [ ]; + type = types.listOf types.str; + example = [ "--disable-up-arrow" "--disable-ctrl-r" ]; + description = '' + Flags to append to the shell hook. + ''; + }; + settings = mkOption { type = with types; let @@ -70,15 +80,24 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/atuin/config.toml. - - See for the full list + {file}`$XDG_CONFIG_HOME/atuin/config.toml`. + + See for the full list of options. ''; }; + + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; }; - config = mkIf cfg.enable { + config = let flagsStr = escapeShellArgs cfg.flags; + in mkIf cfg.enable { # Always add the configured `atuin` package. home.packages = [ cfg.package ]; @@ -91,18 +110,31 @@ in { programs.bash.initExtra = mkIf cfg.enableBashIntegration '' if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh" - eval "$(${cfg.package}/bin/atuin init bash)" + eval "$(${cfg.package}/bin/atuin init bash ${flagsStr})" fi ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' if [[ $options[zle] = on ]]; then - eval "$(${cfg.package}/bin/atuin init zsh)" + eval "$(${cfg.package}/bin/atuin init zsh ${flagsStr})" fi ''; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - ${cfg.package}/bin/atuin init fish | source + ${cfg.package}/bin/atuin init fish ${flagsStr} | source ''; + + programs.nushell = mkIf cfg.enableNushellIntegration { + extraEnv = '' + let atuin_cache = "${config.xdg.cacheHome}/atuin" + if not ($atuin_cache | path exists) { + mkdir $atuin_cache + } + ${cfg.package}/bin/atuin init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu + ''; + extraConfig = '' + source ${config.xdg.cacheHome}/atuin/init.nu + ''; + }; }; } diff --git a/third_party/home-manager/modules/programs/autorandr.nix b/third_party/home-manager/modules/programs/autorandr.nix index 9e7c6fcc43..edbe83de63 100644 --- a/third_party/home-manager/modules/programs/autorandr.nix +++ b/third_party/home-manager/modules/programs/autorandr.nix @@ -28,7 +28,7 @@ let type = types.attrsOf types.str; description = '' Output name to EDID mapping. - Use autorandr --fingerprint to get current setup values. + Use `autorandr --fingerprint` to get current setup values. ''; default = { }; }; @@ -115,10 +115,7 @@ let ''; description = '' Refer to - - xrandr - 1 - + {manpage}`xrandr(1)` for the documentation of the transform matrix. ''; }; @@ -153,18 +150,15 @@ let }); description = '' Output scale configuration. - + Either configure by pixels or a scaling factor. When using pixel method the - - xrandr - 1 - + {manpage}`xrandr(1)` option - --scale-from + `--scale-from` will be used; when using factor method the option - --scale + `--scale` will be used. - + This option is a shortcut version of the transform option and they are mutually exclusive. ''; diff --git a/third_party/home-manager/modules/programs/bash.nix b/third_party/home-manager/modules/programs/bash.nix index 742087b7d8..b48dc31293 100644 --- a/third_party/home-manager/modules/programs/bash.nix +++ b/third_party/home-manager/modules/programs/bash.nix @@ -6,16 +6,15 @@ let cfg = config.programs.bash; - writeBashScript = name: text: pkgs.writeTextFile { - inherit name text; - checkPhase = '' - ${pkgs.stdenv.shellDryRun} "$target" - ''; - }; + writeBashScript = name: text: + pkgs.writeTextFile { + inherit name text; + checkPhase = '' + ${pkgs.stdenv.shellDryRun} "$target" + ''; + }; -in - -{ +in { meta.maintainers = [ maintainers.rycee ]; imports = [ @@ -36,17 +35,15 @@ in description = '' Whether to enable Bash completion for all interactive Bash shells. - - Note, if you use NixOS or nix-darwin and do not have Bash completion enabled in the system configuration, then make sure to add - + ```nix environment.pathsToLink = [ "/share/bash-completion" ]; - + ``` to your system configuration to get completion for system packages. - Note, the legacy /etc/bash_completion.d path is + Note, the legacy {file}`/etc/bash_completion.d` path is not supported by Home Manager. ''; }; @@ -70,20 +67,18 @@ in }; historyControl = mkOption { - type = types.listOf (types.enum [ - "erasedups" - "ignoredups" - "ignorespace" - ]); - default = []; + type = + types.listOf (types.enum [ "erasedups" "ignoredups" "ignorespace" ]); + default = [ ]; description = "Controlling how commands are saved on the history list."; }; historyIgnore = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; example = [ "ls" "cd" "exit" ]; - description = "List of commands that should not be saved to the history list."; + description = + "List of commands that should not be saved to the history list."; }; shellOptions = mkOption { @@ -103,18 +98,15 @@ in # Warn if closing shell with running jobs. "checkjobs" ]; - example = [ - "extglob" - "-cdspell" - ]; + example = [ "extglob" "-cdspell" ]; description = '' Shell options to set. Prefix an option with - - to unset. + "`-`" to unset. ''; }; sessionVariables = mkOption { - default = {}; + default = { }; type = types.attrs; example = { MAILCHECK = 30; }; description = '' @@ -123,7 +115,7 @@ in }; shellAliases = mkOption { - default = {}; + default = { }; type = types.attrsOf types.str; example = literalExpression '' { @@ -159,7 +151,7 @@ in default = ""; type = types.lines; description = '' - Extra commands that should be placed in ~/.bashrc. + Extra commands that should be placed in {file}`~/.bashrc`. Note that these commands will be run even in non-interactive shells. ''; }; @@ -175,80 +167,71 @@ in }; }; - config = ( - let - aliasesStr = concatStringsSep "\n" ( - mapAttrsToList (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases - ); + config = let + aliasesStr = concatStringsSep "\n" + (mapAttrsToList (k: v: "alias ${k}=${escapeShellArg v}") + cfg.shellAliases); - shoptsStr = let - switch = v: if hasPrefix "-" v then "-u" else "-s"; - in concatStringsSep "\n" ( - map (v: "shopt ${switch v} ${removePrefix "-" v}") cfg.shellOptions - ); + shoptsStr = let switch = v: if hasPrefix "-" v then "-u" else "-s"; + in concatStringsSep "\n" + (map (v: "shopt ${switch v} ${removePrefix "-" v}") cfg.shellOptions); - sessionVarsStr = config.lib.shell.exportAll cfg.sessionVariables; + sessionVarsStr = config.lib.shell.exportAll cfg.sessionVariables; - historyControlStr = - concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") ( - { - HISTFILESIZE = toString cfg.historyFileSize; - HISTSIZE = toString cfg.historySize; - } - // optionalAttrs (cfg.historyFile != null) { - HISTFILE = "\"${cfg.historyFile}\""; - } - // optionalAttrs (cfg.historyControl != []) { - HISTCONTROL = concatStringsSep ":" cfg.historyControl; - } - // optionalAttrs (cfg.historyIgnore != []) { - HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore); - } - )); - in mkIf cfg.enable { - home.file.".bash_profile".source = writeBashScript "bash_profile" '' - # include .profile if it exists - [[ -f ~/.profile ]] && . ~/.profile + historyControlStr = concatStringsSep "\n" + (mapAttrsToList (n: v: "${n}=${v}") ({ + HISTFILESIZE = toString cfg.historyFileSize; + HISTSIZE = toString cfg.historySize; + } // optionalAttrs (cfg.historyFile != null) { + HISTFILE = ''"${cfg.historyFile}"''; + } // optionalAttrs (cfg.historyControl != [ ]) { + HISTCONTROL = concatStringsSep ":" cfg.historyControl; + } // optionalAttrs (cfg.historyIgnore != [ ]) { + HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore); + })); + in mkIf cfg.enable { + home.file.".bash_profile".source = writeBashScript "bash_profile" '' + # include .profile if it exists + [[ -f ~/.profile ]] && . ~/.profile - # include .bashrc if it exists - [[ -f ~/.bashrc ]] && . ~/.bashrc - ''; + # include .bashrc if it exists + [[ -f ~/.bashrc ]] && . ~/.bashrc + ''; - # If completion is enabled then make sure it is sourced very early. This - # is to avoid problems if any other initialization code attempts to set up - # completion. - programs.bash.initExtra = mkIf cfg.enableCompletion (mkOrder 100 '' - if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then - . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" - fi - ''); + # If completion is enabled then make sure it is sourced very early. This + # is to avoid problems if any other initialization code attempts to set up + # completion. + programs.bash.initExtra = mkIf cfg.enableCompletion (mkOrder 100 '' + if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then + . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" + fi + ''); - home.file.".profile".source = writeBashScript "profile" '' - . "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh" + home.file.".profile".source = writeBashScript "profile" '' + . "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh" - ${sessionVarsStr} + ${sessionVarsStr} - ${cfg.profileExtra} - ''; + ${cfg.profileExtra} + ''; - home.file.".bashrc".source = writeBashScript "bashrc" '' - ${cfg.bashrcExtra} + home.file.".bashrc".source = writeBashScript "bashrc" '' + ${cfg.bashrcExtra} - # Commands that should be applied only for interactive shells. - [[ $- == *i* ]] || return + # Commands that should be applied only for interactive shells. + [[ $- == *i* ]] || return - ${historyControlStr} + ${historyControlStr} - ${shoptsStr} + ${shoptsStr} - ${aliasesStr} + ${aliasesStr} - ${cfg.initExtra} - ''; + ${cfg.initExtra} + ''; - home.file.".bash_logout" = mkIf (cfg.logoutExtra != "") { - source = writeBashScript "bash_logout" cfg.logoutExtra; - }; - } - ); + home.file.".bash_logout" = mkIf (cfg.logoutExtra != "") { + source = writeBashScript "bash_logout" cfg.logoutExtra; + }; + }; } diff --git a/third_party/home-manager/modules/programs/bashmount.nix b/third_party/home-manager/modules/programs/bashmount.nix index 38d57456e7..66c5809b29 100644 --- a/third_party/home-manager/modules/programs/bashmount.nix +++ b/third_party/home-manager/modules/programs/bashmount.nix @@ -17,8 +17,8 @@ in { default = ""; description = '' Configuration written to - $XDG_CONFIG_HOME/bashmount/config. Look at - + {file}`$XDG_CONFIG_HOME/bashmount/config`. Look at + for explanation about possible values. ''; }; diff --git a/third_party/home-manager/modules/programs/bat.nix b/third_party/home-manager/modules/programs/bat.nix index df2e496855..6890a28a80 100644 --- a/third_party/home-manager/modules/programs/bat.nix +++ b/third_party/home-manager/modules/programs/bat.nix @@ -6,13 +6,15 @@ let cfg = config.programs.bat; + package = pkgs.bat; + toConfigFile = generators.toKeyValue { mkKeyValue = k: v: "--${k}=${lib.escapeShellArg v}"; listsAsDuplicateKeys = true; }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.bat = { enable = mkEnableOption "bat, a cat clone with wings"; @@ -61,12 +63,17 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.bat ] ++ cfg.extraPackages; + home.packages = [ package ] ++ cfg.extraPackages; xdg.configFile = mkMerge ([{ "bat/config" = mkIf (cfg.config != { }) { text = toConfigFile cfg.config; }; }] ++ flip mapAttrsToList cfg.themes (name: body: { "bat/themes/${name}.tmTheme" = { text = body; }; })); + + home.activation.batCache = hm.dag.entryAfter [ "linkGeneration" ] '' + $VERBOSE_ECHO "Rebuilding bat theme cache" + $DRY_RUN_CMD ${lib.getExe package} cache --build + ''; }; } diff --git a/third_party/home-manager/modules/programs/beets.nix b/third_party/home-manager/modules/programs/beets.nix index fa959669c2..dab98c3019 100644 --- a/third_party/home-manager/modules/programs/beets.nix +++ b/third_party/home-manager/modules/programs/beets.nix @@ -9,7 +9,7 @@ let yamlFormat = pkgs.formats.yaml { }; in { - meta.maintainers = [ maintainers.rycee ]; + meta.maintainers = with maintainers; [ rycee Scrumplex ]; options = { programs.beets = { @@ -22,9 +22,9 @@ in { defaultText = "false"; description = '' Whether to enable the beets music library manager. This - defaults to false for state + defaults to `false` for state version ≥ 19.03. For earlier versions beets is enabled if - is non-empty. + {option}`programs.beets.settings` is non-empty. ''; }; @@ -35,7 +35,7 @@ in { example = literalExpression "(pkgs.beets.override { enableCheck = true; })"; description = '' - The beets package to use. + The `beets` package to use. Can be used to specify extensions. ''; }; @@ -45,16 +45,66 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/beets/config.yaml + {file}`$XDG_CONFIG_HOME/beets/config.yaml` ''; }; + + mpdIntegration = { + enableStats = mkEnableOption "mpdstats plugin and service"; + + enableUpdate = mkEnableOption "mpdupdate plugin"; + + host = mkOption { + type = types.str; + default = "localhost"; + example = "10.0.0.42"; + description = "The host that mpdstats will connect to."; + }; + + port = mkOption { + type = types.port; + default = config.services.mpd.network.port; + defaultText = literalExpression "config.services.mpd.network.port"; + example = 6601; + description = "The port that mpdstats will connect to."; + }; + }; }; }; - config = mkIf cfg.enable { - home.packages = [ cfg.package ]; + config = mkMerge [ + (mkIf cfg.enable { + home.packages = [ cfg.package ]; - xdg.configFile."beets/config.yaml".source = - yamlFormat.generate "beets-config" cfg.settings; - }; + xdg.configFile."beets/config.yaml".source = + yamlFormat.generate "beets-config" cfg.settings; + }) + + (mkIf (cfg.mpdIntegration.enableStats || cfg.mpdIntegration.enableUpdate) { + programs.beets.settings.mpd = { + host = cfg.mpdIntegration.host; + port = cfg.mpdIntegration.port; + }; + }) + + (mkIf cfg.mpdIntegration.enableStats { + programs.beets.settings.plugins = [ "mpdstats" ]; + }) + + (mkIf cfg.mpdIntegration.enableUpdate { + programs.beets.settings.plugins = [ "mpdupdate" ]; + }) + + (mkIf (cfg.enable && cfg.mpdIntegration.enableStats) { + systemd.user.services."beets-mpdstats" = { + Unit = { + Description = "Beets MPDStats daemon"; + After = optional config.services.mpd.enable "mpd.service"; + Requires = optional config.services.mpd.enable "mpd.service"; + }; + Service.ExecStart = "${cfg.package}/bin/beet mpdstats"; + Install.WantedBy = [ "default.target" ]; + }; + }) + ]; } diff --git a/third_party/home-manager/modules/programs/borgmatic.nix b/third_party/home-manager/modules/programs/borgmatic.nix index d69803884d..5e84edbe69 100644 --- a/third_party/home-manager/modules/programs/borgmatic.nix +++ b/third_party/home-manager/modules/programs/borgmatic.nix @@ -5,6 +5,8 @@ with lib; let cfg = config.programs.borgmatic; + yamlFormat = pkgs.formats.yaml { }; + mkNullableOption = args: lib.mkOption (args // { type = lib.types.nullOr args.type; @@ -20,7 +22,7 @@ let }; extraConfigOption = mkOption { - type = with types; attrsOf (oneOf [ str bool path int (listOf str) ]); + type = yamlFormat.type; default = { }; description = "Extra settings."; }; @@ -41,7 +43,10 @@ let }; }; - configModule = types.submodule { + configModule = types.submodule ({ config, ... }: { + config.location.extraConfig.exclude_from = + mkIf config.location.excludeHomeManagerSymlinks + (mkAfter [ (toString hmExcludeFile) ]); options = { location = { sourceDirectories = mkOption { @@ -57,6 +62,18 @@ let literalExpression ''["ssh://myuser@myrepo.myserver.com/./repo"]''; }; + excludeHomeManagerSymlinks = mkOption { + type = types.bool; + description = '' + Whether to exclude Home Manager generated symbolic links from + the backups. This facilitates restoring the whole home + directory when the Nix store doesn't contain the latest + Home Manager generation. + ''; + default = false; + example = true; + }; + extraConfig = extraConfigOption; }; @@ -117,11 +134,23 @@ let extraConfig = extraConfigOption; }; + + output = { extraConfig = extraConfigOption; }; + + hooks = { extraConfig = extraConfigOption; }; }; - }; + }); removeNullValues = attrSet: filterAttrs (key: value: value != null) attrSet; + hmFiles = builtins.attrValues config.home.file; + hmSymlinks = (lib.filter (file: !file.recursive) hmFiles); + hmExcludePattern = file: '' + ${config.home.homeDirectory}/${file.target} + ''; + hmExcludePatterns = lib.concatMapStrings hmExcludePattern hmSymlinks; + hmExcludeFile = pkgs.writeText "hm-symlinks.txt" hmExcludePatterns; + writeConfig = config: generators.toYAML { } { location = removeNullValues { @@ -143,6 +172,8 @@ let } // config.retention.extraConfig; consistency = removeNullValues { checks = config.consistency.checks; } // config.consistency.extraConfig; + output = config.output.extraConfig; + hooks = config.hooks.extraConfig; }; in { meta.maintainers = [ maintainers.DamienCassou ]; diff --git a/third_party/home-manager/modules/programs/bottom.nix b/third_party/home-manager/modules/programs/bottom.nix index 459a3132c8..810307b149 100644 --- a/third_party/home-manager/modules/programs/bottom.nix +++ b/third_party/home-manager/modules/programs/bottom.nix @@ -8,11 +8,6 @@ let tomlFormat = pkgs.formats.toml { }; - configDir = if pkgs.stdenv.isDarwin then - "Library/Application Support" - else - config.xdg.configHome; - in { options = { programs.bottom = { @@ -24,7 +19,7 @@ in { type = types.package; default = pkgs.bottom; defaultText = literalExpression "pkgs.bottom"; - description = "Package providing bottom."; + description = "Package providing {command}`bottom`."; }; settings = mkOption { @@ -32,10 +27,9 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/bottom/bottom.toml on Linux or - $HOME/Library/Application Support/bottom/bottom.toml on Darwin. - - See + {file}`$XDG_CONFIG_HOME/bottom/bottom.toml`. + + See for the default configuration. ''; example = literalExpression '' @@ -57,7 +51,7 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.file."${configDir}/bottom/bottom.toml" = mkIf (cfg.settings != { }) { + xdg.configFile."bottom/bottom.toml" = mkIf (cfg.settings != { }) { source = tomlFormat.generate "bottom.toml" cfg.settings; }; }; diff --git a/third_party/home-manager/modules/programs/boxxy.nix b/third_party/home-manager/modules/programs/boxxy.nix new file mode 100644 index 0000000000..566a11e7ec --- /dev/null +++ b/third_party/home-manager/modules/programs/boxxy.nix @@ -0,0 +1,110 @@ +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.programs.boxxy; + + configPath = "${config.xdg.configHome}/boxxy/boxxy.yaml"; + settingsFormat = pkgs.formats.yaml { }; + + boxxyRulesOpts = types.submodule { + freeformType = settingsFormat.type; + + options = { + name = mkOption { + type = types.str; + description = '' + Unique identifier of the boxxy rule. This can be any single-line string. + ''; + }; + + target = mkOption { + type = types.str; + default = ""; + example = "~/.ssh"; + description = '' + What directory/file to redirect. + ''; + }; + + rewrite = mkOption { + type = types.str; + default = ""; + example = literalExpression ''"''${config.xdg.configHome}/ssh"''; + description = '' + Where that file/directory should be rewritten to. + ''; + }; + + mode = mkOption { + type = types.enum [ "file" "directory" ]; + default = "directory"; + description = '' + Does the current path redirect a file or a directory? + ''; + }; + + only = mkOption { + type = types.listOf types.str; + default = [ ]; + example = literalExpression '' + [ + "bash" + "/usr/bin/sh" + ] + ''; + description = '' + Apply redirection ONLY to specified executable names. + ''; + }; + + context = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "/home/example/Projects/my-project" ]; + description = '' + Apply redirection ONLY when in a certain directory. + ''; + }; + + env = mkOption { + type = types.attrsOf types.str; + default = { }; + example = literalExpression '' + { + MY_ENV_VAR = "my_env_var_value"; + } + ''; + description = '' + Give certain environment variables for said match. + ''; + }; + }; + }; +in { + options.programs.boxxy = { + enable = mkEnableOption "boxxy: Boxes in badly behaving applications"; + + package = mkPackageOption pkgs "boxxy" { }; + + rules = mkOption { + type = types.listOf boxxyRulesOpts; + default = [ ]; + description = "List of boxxy rules"; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.boxxy" pkgs platforms.linux) ]; + + home.file = mkIf (cfg.rules != [ ]) { + "${configPath}".source = + settingsFormat.generate "boxxy-config.yaml" { rules = cfg.rules; }; + }; + + home.packages = [ cfg.package ]; + }; + + meta.maintainers = with lib.hm.maintainers; [ nikp123 ]; +} + diff --git a/third_party/home-manager/modules/programs/broot.nix b/third_party/home-manager/modules/programs/broot.nix index d78074ef4f..179b1224d6 100644 --- a/third_party/home-manager/modules/programs/broot.nix +++ b/third_party/home-manager/modules/programs/broot.nix @@ -32,42 +32,31 @@ let ''; description = '' Define new verbs. For more information, see - . - - The possible attributes are: - + [Verb Definition Attributes](https://dystroy.org/broot/documentation/configuration/#verb-definition-attributes) + in the broot documentation. - - - - invocation (optional) - how the verb is called by the user, with placeholders for arguments - - - execution (mandatory) - how the verb is executed - - - key (optional) - a keyboard key triggering execution - - - shortcut (optional) - an alternate way to call the verb (without - the arguments part) - - - leave_broot (optional) - whether to quit broot on execution - (default: true) - - - from_shell (optional) - whether the verb must be executed from the - parent shell (default: - false) - - + The possible attributes are: + + `invocation` (optional) + : how the verb is called by the user, with placeholders for arguments + + `execution` (mandatory) + : how the verb is executed + + `key` (optional) + : a keyboard key triggering execution + + `shortcut` (optional) + : an alternate way to call the verb (without + the arguments part) + + `leave_broot` (optional) + : whether to quit broot on execution + (default: `true`) + + `from_shell` (optional) + : whether the verb must be executed from the + parent shell (default: `false`) ''; }; @@ -94,36 +83,33 @@ let ''; description = '' Color configuration. - + Complete list of keys (expected to change before the v1 of broot): - - char_match - code - directory - exe - file - file_error - flag_label - flag_value - input - link - permissions - selected_line - size_bar_full - size_bar_void - size_text - spinner - status_error - status_normal - table_border - tree - unlisted - + * `char_match` + * `code` + * `directory` + * `exe` + * `file` + * `file_error` + * `flag_label` + * `flag_value` + * `input` + * `link` + * `permissions` + * `selected_line` + * `size_bar_full` + * `size_bar_void` + * `size_text` + * `spinner` + * `status_error` + * `status_normal` + * `table_border` + * `tree` + * `unlisted` - - Add _fg for a foreground color and - _bg for a background colors. + Add `_fg` for a foreground color and + `_bg` for a background color. ''; }; }; @@ -139,7 +125,7 @@ let } ''; in { - meta.maintainers = [ hm.maintainers.aheaume ]; + meta.maintainers = [ hm.maintainers.aheaume maintainers.dermetfan ]; imports = [ (mkRenamedOptionModule [ "programs" "broot" "modal" ] [ @@ -211,9 +197,6 @@ in { source = pkgs.symlinkJoin { name = "xdg.configFile.broot"; paths = [ - (pkgs.writeTextDir "conf.toml" (builtins.readFile - (tomlFormat.generate "broot-config" cfg.settings))) - # Copy all files under /resources/default-conf "${cfg.package.src}/resources/default-conf" @@ -221,8 +204,12 @@ in { (pkgs.writeTextDir "launcher/installed-v1" "") ]; - # Remove conf.hjson, whose content has been merged into programs.broot.settings postBuild = '' + ln -s ${ + tomlFormat.generate "broot-config" cfg.settings + } $out/conf.toml + + # Remove conf.hjson, whose content has been merged into programs.broot.settings rm $out/conf.hjson ''; }; diff --git a/third_party/home-manager/modules/programs/btop.nix b/third_party/home-manager/modules/programs/btop.nix index cdf011e79f..e30a9f43eb 100644 --- a/third_party/home-manager/modules/programs/btop.nix +++ b/third_party/home-manager/modules/programs/btop.nix @@ -40,8 +40,8 @@ in { theme_background = false; }; description = '' - Options to add to btop.conf file. - See + Options to add to {file}`btop.conf` file. + See for options. ''; }; @@ -50,7 +50,7 @@ in { type = types.lines; default = ""; description = '' - Extra lines added to the btop.conf file. + Extra lines added to the {file}`btop.conf` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/chromium.nix b/third_party/home-manager/modules/programs/chromium.nix index 646d847302..11a1054777 100644 --- a/third_party/home-manager/modules/programs/chromium.nix +++ b/third_party/home-manager/modules/programs/chromium.nix @@ -41,15 +41,12 @@ let example = [ "--enable-logging=stderr" "--ignore-gpu-blocklist" ]; description = '' List of command-line arguments to be passed to ${name}. - - Note this option does not have any effect when using a - custom package for . - + For a list of common switches, see - Chrome switches. - + [Chrome switches](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/chrome/common/chrome_switches.cc). + To search switches for other components, see - Chromium codesearch. + [Chromium codesearch](https://source.chromium.org/search?q=file:switches.cc&ss=chromium%2Fchromium%2Fsrc). ''; }; } // optionalAttrs (!isProprietaryChrome) { @@ -117,13 +114,13 @@ let description = '' List of ${name} extensions to install. To find the extension ID, check its URL on the - Chrome Web Store. - + [Chrome Web Store](https://chrome.google.com/webstore/category/extensions). + To install extensions outside of the Chrome Web Store set - updateUrl or crxPath and - version as explained in the - Chrome - documentation. + `updateUrl` or `crxPath` and + `version` as explained in the + [Chrome + documentation](https://developer.chrome.com/docs/extensions/mv2/external_extensions). ''; }; }; @@ -162,21 +159,19 @@ let }); }; + package = if cfg.commandLineArgs != [ ] then + cfg.package.override { + commandLineArgs = concatStringsSep " " cfg.commandLineArgs; + } + else + cfg.package; + in mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = [ package ]; home.file = optionalAttrs (!isProprietaryChrome) (listToAttrs (map extensionJson cfg.extensions)); }; - browserPkgs = genAttrs supportedBrowsers (browser: - let cfg = config.programs.${browser}; - in if cfg.commandLineArgs != [ ] then - pkgs.${browser}.override { - commandLineArgs = concatStringsSep " " cfg.commandLineArgs; - } - else - pkgs.${browser}); - in { # Extensions do not work with the proprietary Google Chrome version # see https://github.com/nix-community/home-manager/issues/1383 @@ -188,15 +183,14 @@ in { ]; options.programs = { - chromium = browserModule browserPkgs.chromium "Chromium" true; - google-chrome = - browserModule browserPkgs.google-chrome "Google Chrome" false; + chromium = browserModule pkgs.chromium "Chromium" true; + google-chrome = browserModule pkgs.google-chrome "Google Chrome" false; google-chrome-beta = - browserModule browserPkgs.google-chrome-beta "Google Chrome Beta" false; + browserModule pkgs.google-chrome-beta "Google Chrome Beta" false; google-chrome-dev = - browserModule browserPkgs.google-chrome-dev "Google Chrome Dev" false; - brave = browserModule browserPkgs.brave "Brave Browser" false; - vivaldi = browserModule browserPkgs.vivaldi "Vivaldi Browser" false; + browserModule pkgs.google-chrome-dev "Google Chrome Dev" false; + brave = browserModule pkgs.brave "Brave Browser" false; + vivaldi = browserModule pkgs.vivaldi "Vivaldi Browser" false; }; config = mkMerge diff --git a/third_party/home-manager/modules/programs/command-not-found/command-not-found.nix b/third_party/home-manager/modules/programs/command-not-found/command-not-found.nix index a4917bbf18..f1a7902352 100644 --- a/third_party/home-manager/modules/programs/command-not-found/command-not-found.nix +++ b/third_party/home-manager/modules/programs/command-not-found/command-not-found.nix @@ -37,7 +37,7 @@ in { default = "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite"; description = '' - Absolute path to programs.sqlite. By + Absolute path to {file}`programs.sqlite`. By default this file will be provided by your channel (nixexprs.tar.xz). ''; diff --git a/third_party/home-manager/modules/programs/comodoro.nix b/third_party/home-manager/modules/programs/comodoro.nix new file mode 100644 index 0000000000..fba0bce866 --- /dev/null +++ b/third_party/home-manager/modules/programs/comodoro.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.comodoro; + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = with lib.hm.maintainers; [ soywod ]; + + options.programs.comodoro = { + enable = lib.mkEnableOption "Comodoro, a CLI to manage your time"; + + package = lib.mkPackageOption pkgs "comodoro" { }; + + settings = lib.mkOption { + type = lib.types.submodule { freeformType = tomlFormat.type; }; + default = { }; + description = '' + Comodoro configuration. + See for supported values. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile."comodoro/config.toml".source = + tomlFormat.generate "comodoro-config.toml" cfg.settings; + }; +} diff --git a/third_party/home-manager/modules/programs/darcs.nix b/third_party/home-manager/modules/programs/darcs.nix new file mode 100644 index 0000000000..a2a45cba45 --- /dev/null +++ b/third_party/home-manager/modules/programs/darcs.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.darcs; + +in { + meta.maintainers = with maintainers; [ chris-martin ]; + + options = { + programs.darcs = { + enable = mkEnableOption "darcs"; + + package = mkPackageOption pkgs "darcs" { }; + + author = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "Fred Bloggs " ]; + description = '' + If this list has a single entry, it will be used as the author + when you record a patch. If there are multiple entries, Darcs + will prompt you to choose one of them. + ''; + }; + + boring = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "^.idea$" ".iml$" "^.stack-work$" ]; + description = "File patterns to ignore"; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + { home.packages = [ cfg.package ]; } + + (mkIf (cfg.author != [ ]) { + home.file.".darcs/author".text = + concatMapStrings (x: x + "\n") cfg.author; + }) + + (mkIf (cfg.boring != [ ]) { + home.file.".darcs/boring".text = + concatMapStrings (x: x + "\n") cfg.boring; + }) + + ]); +} diff --git a/third_party/home-manager/modules/programs/dircolors.nix b/third_party/home-manager/modules/programs/dircolors.nix index 655d71e57c..de4610893d 100644 --- a/third_party/home-manager/modules/programs/dircolors.nix +++ b/third_party/home-manager/modules/programs/dircolors.nix @@ -14,8 +14,8 @@ in { type = types.bool; default = false; description = '' - Whether to manage .dir_colors - and set LS_COLORS. + Whether to manage {file}`.dir_colors` + and set `LS_COLORS`. ''; }; @@ -47,8 +47,8 @@ in { type = with types; attrsOf str; default = { }; description = '' - Options to add to .dir_colors file. - See dircolors --print-database + Options to add to {file}`.dir_colors` file. + See {command}`dircolors --print-database` for options. ''; example = literalExpression '' @@ -64,7 +64,7 @@ in { type = types.lines; default = ""; description = '' - Extra lines added to .dir_colors file. + Extra lines added to {file}`.dir_colors` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/direnv.nix b/third_party/home-manager/modules/programs/direnv.nix index 1d6ef2127d..23636644a8 100644 --- a/third_party/home-manager/modules/programs/direnv.nix +++ b/third_party/home-manager/modules/programs/direnv.nix @@ -29,13 +29,10 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/direnv/direnv.toml. - + {file}`$XDG_CONFIG_HOME/direnv/direnv.toml`. + See - - direnv.toml - 1 - . + {manpage}`direnv.toml(1)`. for the full list of options. ''; }; @@ -45,7 +42,7 @@ in { default = ""; description = '' Custom stdlib written to - $XDG_CONFIG_HOME/direnv/direnvrc. + {file}`$XDG_CONFIG_HOME/direnv/direnvrc`. ''; }; @@ -73,9 +70,9 @@ in { Whether to enable Fish integration. Note, enabling the direnv module will always active its functionality for Fish since the direnv package automatically gets loaded in Fish. If this is not the case try adding - + ```nix environment.pathsToLink = [ "/share/fish" ]; - + ``` to the system configuration. ''; }; @@ -83,7 +80,6 @@ in { enableNushellIntegration = mkOption { default = true; type = types.bool; - readOnly = true; description = '' Whether to enable Nushell integration. ''; @@ -91,9 +87,8 @@ in { nix-direnv = { enable = mkEnableOption '' - nix-direnv, - a fast, persistent use_nix implementation for direnv''; + [nix-direnv](https://github.com/nix-community/nix-direnv), + a fast, persistent use_nix implementation for direnv''; }; }; @@ -133,10 +128,10 @@ in { # Using mkAfter to make it more likely to appear after other # manipulations of the prompt. mkAfter '' - let-env config = ($env | default {} config).config - let-env config = ($env.config | default {} hooks) - let-env config = ($env.config | update hooks ($env.config.hooks | default [] pre_prompt)) - let-env config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { + $env.config = ($env | default {} config).config + $env.config = ($env.config | default {} hooks) + $env.config = ($env.config | update hooks ($env.config.hooks | default [] pre_prompt)) + $env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { code: " let direnv = (${pkgs.direnv}/bin/direnv export json | from json) let direnv = if ($direnv | length) == 1 { $direnv } else { {} } diff --git a/third_party/home-manager/modules/programs/emacs.nix b/third_party/home-manager/modules/programs/emacs.nix index a9a779497f..dfab66cf19 100644 --- a/third_party/home-manager/modules/programs/emacs.nix +++ b/third_party/home-manager/modules/programs/emacs.nix @@ -50,10 +50,10 @@ in { ''; description = '' Configuration to include in the Emacs default init file. See - + for more. - - Note, the inhibit-startup-message Emacs option + + Note, the `inhibit-startup-message` Emacs option cannot be set here since Emacs disallows setting it from the default initialization file. ''; @@ -67,7 +67,7 @@ in { description = '' Extra packages available to Emacs. To get a list of available packages run: - nix-env -f '<nixpkgs>' -qaP -A emacsPackages. + {command}`nix-env -f '' -qaP -A emacsPackages`. ''; }; diff --git a/third_party/home-manager/modules/programs/eww.nix b/third_party/home-manager/modules/programs/eww.nix index 9200986d4d..3d178f9420 100644 --- a/third_party/home-manager/modules/programs/eww.nix +++ b/third_party/home-manager/modules/programs/eww.nix @@ -27,7 +27,7 @@ in { example = literalExpression "./eww-config-dir"; description = '' The directory that gets symlinked to - $XDG_CONFIG_HOME/eww. + {file}`$XDG_CONFIG_HOME/eww`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/exa.nix b/third_party/home-manager/modules/programs/exa.nix index a1b4a2712e..afe83e737f 100644 --- a/third_party/home-manager/modules/programs/exa.nix +++ b/third_party/home-manager/modules/programs/exa.nix @@ -2,39 +2,66 @@ with lib; -let - - cfg = config.programs.exa; - - aliases = { - ls = "${pkgs.exa}/bin/exa"; - ll = "${pkgs.exa}/bin/exa -l"; - la = "${pkgs.exa}/bin/exa -a"; - lt = "${pkgs.exa}/bin/exa --tree"; - lla = "${pkgs.exa}/bin/exa -la"; - }; - -in { +{ meta.maintainers = [ hm.maintainers.kalhauge ]; options.programs.exa = { - enable = - mkEnableOption "exa, a modern replacement for ls"; + enable = mkEnableOption "exa, a modern replacement for {command}`ls`"; - enableAliases = mkEnableOption "recommended exa aliases"; + enableAliases = mkEnableOption "recommended exa aliases (ls, ll…)"; + + extraOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--group-directories-first" "--header" ]; + description = '' + Extra command line options passed to exa. + ''; + }; + + icons = mkOption { + type = types.bool; + default = false; + description = '' + Display icons next to file names ({option}`--icons` argument). + ''; + }; + + git = mkOption { + type = types.bool; + default = false; + description = '' + List each file's Git status if tracked or ignored ({option}`--git` argument). + ''; + }; package = mkPackageOption pkgs "exa" { }; }; - config = mkIf cfg.enable { + config = let + cfg = config.programs.exa; + + args = escapeShellArgs (optional cfg.icons "--icons" + ++ optional cfg.git "--git" ++ cfg.extraOptions); + + aliases = { + exa = "exa ${args}"; + } // optionalAttrs cfg.enableAliases { + ls = "exa"; + ll = "exa -l"; + la = "exa -a"; + lt = "exa --tree"; + lla = "exa -la"; + }; + in mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.shellAliases = mkIf cfg.enableAliases aliases; + programs.bash.shellAliases = aliases; - programs.zsh.shellAliases = mkIf cfg.enableAliases aliases; + programs.zsh.shellAliases = aliases; - programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.fish.shellAliases = aliases; - programs.ion.shellAliases = mkIf cfg.enableAliases aliases; + programs.ion.shellAliases = aliases; }; } diff --git a/third_party/home-manager/modules/programs/feh.nix b/third_party/home-manager/modules/programs/feh.nix index 15aac17518..f44f184a31 100644 --- a/third_party/home-manager/modules/programs/feh.nix +++ b/third_party/home-manager/modules/programs/feh.nix @@ -41,7 +41,7 @@ in { Override feh's default mouse button mapping. If you want to disable an action, set its value to null. If you want to bind multiple buttons to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; @@ -58,7 +58,7 @@ in { Override feh's default keybindings. If you want to disable a keybinding set its value to null. If you want to bind multiple keys to an action, set its value to a list. - See for + See for default bindings and available commands. ''; }; diff --git a/third_party/home-manager/modules/programs/firefox.nix b/third_party/home-manager/modules/programs/firefox.nix index a0620e28d4..d420f554f0 100644 --- a/third_party/home-manager/modules/programs/firefox.nix +++ b/third_party/home-manager/modules/programs/firefox.nix @@ -25,11 +25,6 @@ let # by future Firefox versions. extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; - extensionsEnvPkg = pkgs.buildEnv { - name = "hm-firefox-extensions"; - paths = cfg.extensions; - }; - profiles = flip mapAttrs' cfg.profiles (_: profile: nameValuePair "Profile${toString profile.id}" { Name = profile.name; @@ -42,6 +37,12 @@ let profilesIni = generators.toINI { } profiles; + userPrefValue = pref: + builtins.toJSON (if isBool pref || isInt pref || isString pref then + pref + else + builtins.toJSON pref); + mkUserJs = prefs: extraPrefs: bookmarks: let prefs' = lib.optionalAttrs ([ ] != bookmarks) { @@ -52,7 +53,7 @@ let // Generated by Home Manager. ${concatStrings (mapAttrsToList (name: value: '' - user_pref("${name}", ${builtins.toJSON value}); + user_pref("${name}", ${userPrefValue value}); '') prefs')} ${extraPrefs} @@ -70,6 +71,9 @@ let }" ADD_DATE="0" LAST_MODIFIED="0"${ lib.optionalString (bookmark.keyword != null) " SHORTCUTURL=\"${escapeXML bookmark.keyword}\"" + }${ + lib.optionalString (bookmark.tags != [ ]) + " TAGS=\"${escapeXML (concatStringsSep "," bookmark.tags)}\"" }>${escapeXML bookmark.name}''; directoryToHTML = indentLevel: directory: '' @@ -111,6 +115,15 @@ in { meta.maintainers = [ maintainers.rycee maintainers.kira-bruneau ]; imports = [ + (mkRemovedOptionModule [ "programs" "firefox" "extensions" ] '' + + Extensions are now managed per-profile. That is, change from + + programs.firefox.extensions = [ foo bar ]; + + to + + programs.firefox.profiles.myprofile.extensions = [ foo bar ];'') (mkRemovedOptionModule [ "programs" "firefox" "enableAdobeFlash" ] "Support for this option has been removed.") (mkRemovedOptionModule [ "programs" "firefox" "enableGoogleTalk" ] @@ -124,7 +137,7 @@ in { enable = mkEnableOption "Firefox"; package = mkOption { - type = types.package; + type = with types; nullOr package; default = if versionAtLeast config.home.stateVersion "19.09" then pkgs.firefox else @@ -145,41 +158,7 @@ in { The Firefox package to use. If state version ≥ 19.09 then this should be a wrapped Firefox package. For earlier state versions it should be an unwrapped Firefox package. - ''; - }; - - extensions = mkOption { - type = types.listOf types.package; - default = [ ]; - example = literalExpression '' - with pkgs.nur.repos.rycee.firefox-addons; [ - privacy-badger - ] - ''; - description = '' - List of Firefox add-on packages to install. Some - pre-packaged add-ons are accessible from NUR, - . - Once you have NUR installed run - - - $ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons - - - to list the available Firefox add-ons. - - - - Note that it is necessary to manually enable these - extensions inside Firefox after the first installation. - - - - Extensions listed here will only be available in Firefox - profiles managed through the - - option. This is due to recent changes in the way Firefox - handles extension side-loading. + Set to null to disable installing Firefox. ''; }; @@ -201,7 +180,10 @@ in { }; settings = mkOption { - type = with types; attrsOf (either bool (either int str)); + type = types.attrsOf (jsonFormat.type // { + description = + "Firefox preference (int, bool, string, and also attrs, list, float as a JSON string)"; + }); default = { }; example = literalExpression '' { @@ -211,16 +193,26 @@ in { "distribution.searchplugins.defaultLocale" = "en-GB"; "general.useragent.locale" = "en-GB"; "browser.bookmarks.showMobileBookmarks" = true; + "browser.newtabpage.pinned" = [{ + title = "NixOS"; + url = "https://nixos.org"; + }]; } ''; - description = "Attribute set of Firefox preferences."; + description = '' + Attribute set of Firefox preferences. + + Firefox only supports int, bool, and string types for + preferences, but home-manager will automatically + convert all other JSON-compatible values into strings. + ''; }; extraConfig = mkOption { type = types.lines; default = ""; description = '' - Extra preferences to add to user.js. + Extra preferences to add to {file}`user.js`. ''; }; @@ -263,6 +255,12 @@ in { description = "Bookmark name."; }; + tags = mkOption { + type = types.listOf types.str; + default = [ ]; + description = "Bookmark tags."; + }; + keyword = mkOption { type = types.nullOr types.str; default = null; @@ -312,6 +310,7 @@ in { [ { name = "wikipedia"; + tags = [ "wiki" ]; keyword = "wiki"; url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; } @@ -321,6 +320,7 @@ in { } { name = "Nix sites"; + toolbar = true; bookmarks = [ { name = "homepage"; @@ -328,6 +328,7 @@ in { } { name = "wiki"; + tags = [ "wiki" "nix" ]; url = "https://nixos.wiki/"; } ]; @@ -417,22 +418,47 @@ in { ''; description = '' Attribute set of search engine configurations. Engines - that only have metaData specified will + that only have {var}`metaData` specified will be treated as builtin to Firefox. - - See SearchEngine.jsm + + See [SearchEngine.jsm](https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177) in Firefox's source for available options. We maintain a mapping to let you specify all options in the referenced link without underscores, but it may fall out of date with future options. - - Note, icon is also a special option + + Note, {var}`icon` is also a special option added by Home Manager to make it convenient to specify absolute icon paths. ''; }; }; + + extensions = mkOption { + type = types.listOf types.package; + default = [ ]; + example = literalExpression '' + with pkgs.nur.repos.rycee.firefox-addons; [ + privacy-badger + ] + ''; + description = '' + List of Firefox add-on packages to install for this profile. + Some pre-packaged add-ons are accessible from the + [Nix User Repository](https://github.com/nix-community/NUR). + Once you have NUR installed run + + ```console + $ nix-env -f '' -qaP -A nur.repos.rycee.firefox-addons + ``` + + to list the available Firefox add-ons. + + Note that it is necessary to manually enable these extensions + inside Firefox after the first installation. + ''; + }; + }; })); default = { }; @@ -445,8 +471,8 @@ in { description = '' Whether to enable the GNOME Shell native host connector. Note, you also need to set the NixOS option - services.gnome.gnome-browser-connector.enable to - true. + `services.gnome.gnome-browser-connector.enable` to + `true`. ''; }; }; @@ -501,14 +527,9 @@ in { cfg.package.override (old: { cfg = old.cfg or { } // fcfg; }) else (pkgs.wrapFirefox.override { config = bcfg; }) cfg.package { }; - in [ package ]; + in lib.optional (cfg.package != null) package; home.file = mkMerge ([{ - "${mozillaConfigPath}/${extensionPath}" = mkIf (cfg.extensions != [ ]) { - source = "${extensionsEnvPkg}/share/mozilla/${extensionPath}"; - recursive = true; - }; - "${firefoxConfigPath}/profiles.ini" = mkIf (cfg.profiles != { }) { text = profilesIni; }; }] ++ flip mapAttrsToList cfg.profiles (_: profile: { @@ -533,79 +554,94 @@ in { source = let settings = { version = 6; - engines = let - allEngines = (profile.search.engines // - # If search.default isn't in search.engines, assume it's app - # provided and include it in the set of all engines - optionalAttrs (profile.search.default != null - && !(hasAttr profile.search.default - profile.search.engines)) { - ${profile.search.default} = { }; - }); + # Map of nice field names to internal field names. + # This is intended to be exhaustive and should be + # updated at every version bump. + internalFieldNames = (genAttrs [ + "name" + "isAppProvided" + "loadPath" + "hasPreferredIcon" + "updateInterval" + "updateURL" + "iconUpdateURL" + "iconURL" + "iconMapObj" + "metaData" + "orderHint" + "definedAliases" + "urls" + ] (name: "_${name}")) // { + searchForm = "__searchForm"; + }; - # Map allEngines to a list and order by search.order - orderedEngineList = (imap (order: name: - let engine = allEngines.${name} or { }; - in engine // { - inherit name; - metaData = (engine.metaData or { }) // { inherit order; }; - }) profile.search.order) ++ (mapAttrsToList - (name: config: config // { inherit name; }) - (removeAttrs allEngines profile.search.order)); + processCustomEngineInput = input: + (removeAttrs input [ "icon" ]) + // optionalAttrs (input ? icon) { + # Convenience to specify absolute path to icon + iconURL = "file://${input.icon}"; + } // (optionalAttrs (input ? iconUpdateURL) { + # Convenience to default iconURL to iconUpdateURL so + # the icon is immediately downloaded from the URL + iconURL = input.iconURL or input.iconUpdateURL; + } // { + # Required for custom engine configurations, loadPaths + # are unique identifiers that are generally formatted + # like: [source]/path/to/engine.xml + loadPath = '' + [home-manager]/programs.firefox.profiles.${profile.name}.search.engines."${ + replaceStrings [ "\\" ] [ "\\\\" ] input.name + }"''; + }); - engines = map (config: + processEngineInput = name: input: let - name = config.name; - isAppProvided = removeAttrs config [ "name" "metaData" ] - == { }; - metaData = config.metaData or { }; - in mapAttrs' (name: value: { - # Map nice field names to internal field names. This is - # intended to be exhaustive, but any future fields will - # either have to be specified with an underscore, or added - # to this map. - name = ((genAttrs [ - "name" - "isAppProvided" - "loadPath" - "hasPreferredIcon" - "updateInterval" - "updateURL" - "iconUpdateURL" - "iconURL" - "iconMapObj" - "metaData" - "orderHint" - "definedAliases" - "urls" - ] (name: "_${name}")) // { - "searchForm" = "__searchForm"; - }).${name} or name; + requiredInput = { + inherit name; + isAppProvided = input.isAppProvided or removeAttrs input + [ "metaData" ] == { }; + metaData = input.metaData or { }; + }; + in if requiredInput.isAppProvided then + requiredInput + else + processCustomEngineInput (input // requiredInput); + buildEngineConfig = name: input: + mapAttrs' (name: value: { + name = internalFieldNames.${name} or name; inherit value; - }) ((removeAttrs config [ "icon" ]) - // (optionalAttrs (!isAppProvided) - (optionalAttrs (config ? iconUpdateURL) { - # Convenience to default iconURL to iconUpdateURL so - # the icon is immediately downloaded from the URL - iconURL = config.iconURL or config.iconUpdateURL; - } // optionalAttrs (config ? icon) { - # Convenience to specify absolute path to icon - iconURL = "file://${config.icon}"; - } // { - # Required for custom engine configurations, loadPaths - # are unique identifiers that are generally formatted - # like: [source]/path/to/engine.xml - loadPath = '' - [home-manager]/programs.firefox.profiles.${profile.name}.search.engines."${ - replaceStrings [ "\\" ] [ "\\\\" ] name - }"''; - })) // { - # Required fields for all engine configurations - inherit name isAppProvided metaData; - })) orderedEngineList; - in engines; + }) (processEngineInput name input); + + sortEngineConfigs = configs: + let + buildEngineConfigWithOrder = order: name: + let + config = configs.${name} or { + _name = name; + _isAppProvided = true; + _metaData = { }; + }; + in config // { + _metaData = config._metaData // { inherit order; }; + }; + + engineConfigsWithoutOrder = + attrValues (removeAttrs configs profile.search.order); + + sortedEngineConfigs = + (imap buildEngineConfigWithOrder profile.search.order) + ++ engineConfigsWithoutOrder; + in sortedEngineConfigs; + + engineInput = profile.search.engines // { + # Infer profile.search.default as an app provided + # engine if it's not in profile.search.engines + ${profile.search.default} = + profile.search.engines.${profile.search.default} or { }; + }; + in sortEngineConfigs (mapAttrs buildEngineConfig engineInput); metaData = optionalAttrs (profile.search.default != null) { current = profile.search.default; @@ -627,21 +663,32 @@ in { + "from outside of ${appName} is a malicious act, and will be responded " + "to accordingly."; - salt = profile.path + profile.search.default - + disclaimer "Firefox"; + salt = if profile.search.default != null then + profile.path + profile.search.default + disclaimer "Firefox" + else + null; in pkgs.runCommand "search.json.mozlz4" { nativeBuildInputs = with pkgs; [ mozlz4a openssl ]; json = builtins.toJSON settings; inherit salt; } '' - export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) - mozlz4a <(substituteStream json search.json.in --subst-var hash) "$out" + if [[ -n $salt ]]; then + export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64) + mozlz4a <(substituteStream json search.json.in --subst-var hash) "$out" + else + mozlz4a <(echo "$json") "$out" + fi ''; }; "${profilesPath}/${profile.path}/extensions" = - mkIf (cfg.extensions != [ ]) { - source = "${extensionsEnvPkg}/share/mozilla/${extensionPath}"; + mkIf (profile.extensions != [ ]) { + source = let + extensionsEnvPkg = pkgs.buildEnv { + name = "hm-firefox-extensions"; + paths = profile.extensions; + }; + in "${extensionsEnvPkg}/share/mozilla/${extensionPath}"; recursive = true; force = true; }; diff --git a/third_party/home-manager/modules/programs/fish.nix b/third_party/home-manager/modules/programs/fish.nix index fe6c4a92c5..b323846925 100644 --- a/third_party/home-manager/modules/programs/fish.nix +++ b/third_party/home-manager/modules/programs/fish.nix @@ -12,10 +12,10 @@ let type = types.path; description = '' Path to the plugin folder. - + Relevant pieces will be added to the fish function path and - the completion path. The init.fish and - key_binding.fish files are sourced if + the completion path. The {file}`init.fish` and + {file}`key_binding.fish` files are sourced if they exist. ''; }; @@ -89,7 +89,7 @@ let default = null; description = '' Tells fish to run this function when the job with the specified group - ID exits. Instead of a PID, the stringer caller can + ID exits. Instead of a PID, the stringer `caller` can be specified. This is only legal when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution. @@ -103,8 +103,8 @@ let description = '' Tells fish to run this function when the fish child process with the specified process ID exits. Instead of a PID, for backwards - compatibility, %self can be specified as an alias - for $fish_pid, and the function will be run when + compatibility, `%self` can be specified as an alias + for `$fish_pid`, and the function will be run when the current fish instance exits. ''; }; @@ -152,6 +152,13 @@ let passAsFile = [ "text" ]; } "env HOME=$(mktemp -d) fish_indent < $textPath > $out"; + translatedSessionVariables = + pkgs.runCommandLocal "hm-session-vars.fish" { } '' + ${pkgs.buildPackages.babelfish}/bin/babelfish \ + <${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh \ + >$out + ''; + in { imports = [ (mkRemovedOptionModule [ "programs" "fish" "promptInit" ] '' @@ -263,7 +270,7 @@ in { ''; description = '' The plugins to source in - conf.d/99plugins.fish. + {file}`conf.d/99plugins.fish`. ''; }; @@ -282,7 +289,7 @@ in { ''; description = '' Basic functions to add to fish. For more information see - . + . ''; }; }; @@ -315,17 +322,21 @@ in { generateCompletions = package: pkgs.runCommand "${package.name}-fish-completions" { - src = package; + srcs = [ package ] ++ filter (p: p != null) + (builtins.map (outName: package.${outName} or null) + config.home.extraOutputsToInstall); nativeBuildInputs = [ pkgs.python3 ]; buildInputs = [ cfg.package ]; preferLocalBuild = true; } '' mkdir -p $out - if [ -d $src/share/man ]; then - find $src/share/man -type f \ - | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ - > /dev/null - fi + for src in $srcs; do + if [ -d $src/share/man ]; then + find -L $src/share/man -type f \ + | xargs python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out \ + > /dev/null + fi + done ''; in destructiveSymlinkJoin { name = "${config.home.username}-fish-completions"; @@ -354,9 +365,7 @@ in { set -q __fish_home_manager_config_sourced; and exit set -g __fish_home_manager_config_sourced 1 - set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d - fenv source ${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh > /dev/null - set -e fish_function_path[1] + source ${translatedSessionVariables} ${cfg.shellInit} @@ -375,7 +384,7 @@ in { # Aliases ${aliasesStr} - # Interactive shell intialisation + # Interactive shell initialisation ${cfg.interactiveShellInit} end diff --git a/third_party/home-manager/modules/programs/foot.nix b/third_party/home-manager/modules/programs/foot.nix index 2b08f3acd7..79832dced7 100644 --- a/third_party/home-manager/modules/programs/foot.nix +++ b/third_party/home-manager/modules/programs/foot.nix @@ -27,8 +27,7 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/foot/foot.ini. See + {file}`$XDG_CONFIG_HOME/foot/foot.ini`. See for a list of available options. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/fuzzel.nix b/third_party/home-manager/modules/programs/fuzzel.nix new file mode 100644 index 0000000000..5057c36d6f --- /dev/null +++ b/third_party/home-manager/modules/programs/fuzzel.nix @@ -0,0 +1,51 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib) literalExpression mkEnableOption mkPackageOption mkOption mkIf; + + cfg = config.programs.fuzzel; + + iniFormat = pkgs.formats.ini { }; + +in { + meta.maintainers = [ lib.maintainers.Scrumplex ]; + + options.programs.fuzzel = { + enable = mkEnableOption "fuzzel"; + + package = mkPackageOption pkgs "fuzzel" { }; + + settings = mkOption { + type = iniFormat.type; + default = { }; + example = literalExpression '' + { + main = { + terminal = "''${pkgs.foot}/bin/foot"; + layer = "overlay"; + }; + colors.background = "ffffffff"; + } + ''; + description = '' + Configuration for fuzzel written to + {file}`$XDG_CONFIG_HOME/fuzzel/fuzzel.ini`. See + {manpage}`fuzzel.ini(5)` for a list of available options. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "programs.fuzzel" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."fuzzel/fuzzel.ini" = mkIf (cfg.settings != { }) { + source = iniFormat.generate "fuzzel.ini" cfg.settings; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/fzf.nix b/third_party/home-manager/modules/programs/fzf.nix index fe1e720d9b..7544c1eff1 100644 --- a/third_party/home-manager/modules/programs/fzf.nix +++ b/third_party/home-manager/modules/programs/fzf.nix @@ -23,7 +23,7 @@ in { type = types.package; default = pkgs.fzf; defaultText = literalExpression "pkgs.fzf"; - description = "Package providing the fzf tool."; + description = "Package providing the {command}`fzf` tool."; }; defaultCommand = mkOption { @@ -104,15 +104,15 @@ in { } ''; description = '' - Color scheme options added to FZF_DEFAULT_OPTS. See - + Color scheme options added to `FZF_DEFAULT_OPTS`. See + for documentation. ''; }; tmux = { enableShellIntegration = mkEnableOption '' - setting FZF_TMUX=1 which causes shell integration to use fzf-tmux + setting `FZF_TMUX=1` which causes shell integration to use fzf-tmux ''; shellIntegrationOptions = mkOption { @@ -120,9 +120,9 @@ in { default = [ ]; example = literalExpression ''[ "-d 40%" ]''; description = '' - If is set to true, + If {option}`programs.fzf.tmux.enableShellIntegration` is set to `true`, shell integration will use these options for fzf-tmux. - See fzf-tmux --help for available options. + See {command}`fzf-tmux --help` for available options. ''; }; }; diff --git a/third_party/home-manager/modules/programs/gallery-dl.nix b/third_party/home-manager/modules/programs/gallery-dl.nix index 8c42d1e7d5..accad55fb8 100644 --- a/third_party/home-manager/modules/programs/gallery-dl.nix +++ b/third_party/home-manager/modules/programs/gallery-dl.nix @@ -9,7 +9,7 @@ let jsonFormat = pkgs.formats.json { }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.gallery-dl = { enable = mkEnableOption "gallery-dl"; @@ -24,8 +24,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/gallery-dl/config.json. See - + {file}`$XDG_CONFIG_HOME/gallery-dl/config.json`. See + for supported values. ''; }; diff --git a/third_party/home-manager/modules/programs/getmail-accounts.nix b/third_party/home-manager/modules/programs/getmail-accounts.nix index 24eb4fb588..e2ff94051c 100644 --- a/third_party/home-manager/modules/programs/getmail-accounts.nix +++ b/third_party/home-manager/modules/programs/getmail-accounts.nix @@ -21,7 +21,7 @@ with lib; example = [ "INBOX" "INBOX.spam" ]; description = '' A non-empty list of mailboxes. To download all mail you can - use the ALL mailbox. + use the `ALL` mailbox. ''; }; @@ -30,8 +30,8 @@ with lib; default = false; description = '' Enable if you want to delete read messages from the server. Most - users should either enable delete or disable - readAll. + users should either enable `delete` or disable + `readAll`. ''; }; @@ -40,8 +40,8 @@ with lib; default = true; description = '' Enable if you want to fetch all, even the read messages from the - server. Most users should either enable delete or - disable readAll. + server. Most users should either enable `delete` or + disable `readAll`. ''; }; diff --git a/third_party/home-manager/modules/programs/gh-dash.nix b/third_party/home-manager/modules/programs/gh-dash.nix new file mode 100644 index 0000000000..69d5482b6a --- /dev/null +++ b/third_party/home-manager/modules/programs/gh-dash.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.gh-dash; + + yamlFormat = pkgs.formats.yaml { }; + +in { + meta.maintainers = [ lib.maintainers.janik ]; + + options.programs.gh-dash = { + enable = lib.mkEnableOption "GitHub CLI dashboard plugin"; + + package = lib.mkPackageOption pkgs "gh-dash" { }; + + settings = lib.mkOption { + type = yamlFormat.type; + default = { }; + example = lib.literalExpression '' + { + prSections = [{ + title = "My Pull Requests"; + filters = "is:open author:@me"; + }]; + } + ''; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/gh-dash/config.yml`. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.gh.extensions = [ cfg.package ]; + + xdg.configFile."gh-dash/config.yml".source = + yamlFormat.generate "gh-dash-config.yml" cfg.settings; + }; +} diff --git a/third_party/home-manager/modules/programs/gh.nix b/third_party/home-manager/modules/programs/gh.nix index 920dd64384..526010a50b 100644 --- a/third_party/home-manager/modules/programs/gh.nix +++ b/third_party/home-manager/modules/programs/gh.nix @@ -60,6 +60,12 @@ in { "settings" "git_protocol" ]) + (mkRenamedOptionModule [ "programs" "gh" "enableGitCredentialHelper" ] [ + "programs" + "gh" + "gitCredentialHelper" + "enable" + ]) ]; options.programs.gh = { @@ -69,14 +75,14 @@ in { type = types.package; default = pkgs.gh; defaultText = literalExpression "pkgs.gh"; - description = "Package providing gh."; + description = "Package providing {command}`gh`."; }; settings = mkOption { type = settingsType; default = { }; description = - "Configuration written to $XDG_CONFIG_HOME/gh/config.yml."; + "Configuration written to {file}`$XDG_CONFIG_HOME/gh/config.yml`."; example = literalExpression '' { git_protocol = "ssh"; @@ -91,16 +97,26 @@ in { ''; }; - enableGitCredentialHelper = - mkEnableOption "the gh git credential helper for github.com" // { + gitCredentialHelper = { + enable = mkEnableOption "the gh git credential helper" // { default = true; }; + hosts = mkOption { + type = types.listOf types.str; + default = [ "https://github.com" ]; + description = "GitHub hosts to enable the gh git credential helper for"; + example = literalExpression '' + [ "https://github.com" "https://github.example.com" ] + ''; + }; + }; + extensions = mkOption { type = types.listOf types.package; default = [ ]; description = '' - gh extensions, see . + gh extensions, see . ''; example = literalExpression "[ pkgs.gh-eco ]"; }; @@ -112,9 +128,11 @@ in { xdg.configFile."gh/config.yml".source = yamlFormat.generate "gh-config.yml" cfg.settings; - programs.git.extraConfig.credential."https://github.com".helper = - mkIf cfg.enableGitCredentialHelper - "${cfg.package}/bin/gh auth git-credential"; + programs.git.extraConfig.credential = mkIf cfg.gitCredentialHelper.enable + (builtins.listToAttrs (map (host: + lib.nameValuePair host { + helper = "${cfg.package}/bin/gh auth git-credential"; + }) cfg.gitCredentialHelper.hosts)); xdg.dataFile."gh/extensions" = mkIf (cfg.extensions != [ ]) { source = pkgs.linkFarm "gh-extensions" (builtins.map (p: { diff --git a/third_party/home-manager/modules/programs/git-cliff.nix b/third_party/home-manager/modules/programs/git-cliff.nix new file mode 100644 index 0000000000..cd7fb529d4 --- /dev/null +++ b/third_party/home-manager/modules/programs/git-cliff.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.git-cliff; + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ hm.maintainers.NateCox ]; + + options.programs.git-cliff = { + enable = mkEnableOption "git-cliff changelog generator"; + + package = mkPackageOption pkgs "git-cliff" { }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + header = "Changelog"; + trim = true; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/git-cliff/cliff.toml`. See + + for the documentation. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile = { + "git-cliff/cliff.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "git-cliff-config" cfg.settings; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/git-credential-oauth.nix b/third_party/home-manager/modules/programs/git-credential-oauth.nix new file mode 100644 index 0000000000..4833e80680 --- /dev/null +++ b/third_party/home-manager/modules/programs/git-credential-oauth.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.programs.git-credential-oauth; + +in { + meta.maintainers = [ lib.maintainers.tomodachi94 ]; + + options = { + programs.git-credential-oauth = { + enable = lib.mkEnableOption "Git authentication handler for OAuth"; + + package = lib.mkPackageOption pkgs "git-credential-oauth" { }; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.git.extraConfig.credential.helper = + [ "${cfg.package}/bin/git-credential-oauth" ]; + }; +} diff --git a/third_party/home-manager/modules/programs/git.nix b/third_party/home-manager/modules/programs/git.nix index 2b0d8a2f12..b9aca2db3b 100644 --- a/third_party/home-manager/modules/programs/git.nix +++ b/third_party/home-manager/modules/programs/git.nix @@ -64,8 +64,8 @@ let type = types.nullOr types.str; description = '' The default GPG signing key fingerprint. - - Set to null to let GnuPG decide what signing key + + Set to `null` to let GnuPG decide what signing key to use depending on commit’s author. ''; }; @@ -91,12 +91,9 @@ let type = types.nullOr types.str; default = null; description = '' - Include this configuration only when condition + Include this configuration only when {var}`condition` matches. Allowed conditions are described in - - git-config - 1 - . + {manpage}`git-config(1)`. ''; }; @@ -124,10 +121,7 @@ let Configuration to include. If empty then a path must be given. This follows the configuration structure as described in - - git-config - 1 - . + {manpage}`git-config(1)`. ''; }; @@ -158,8 +152,8 @@ in { default = pkgs.git; defaultText = literalExpression "pkgs.git"; description = '' - Git package to install. Use pkgs.gitAndTools.gitFull - to gain access to git send-email for instance. + Git package to install. Use {var}`pkgs.gitAndTools.gitFull` + to gain access to {command}`git send-email` for instance. ''; }; @@ -211,7 +205,7 @@ in { ''; description = '' Configuration helper for Git hooks. - See + See for reference. ''; }; @@ -258,7 +252,7 @@ in { default = false; description = '' Skip automatic downloading of objects on clone or pull. - This requires a manual git lfs pull + This requires a manual {command}`git lfs pull` every time a new commit is checked out on your repository. ''; }; @@ -267,8 +261,8 @@ in { difftastic = { enable = mkEnableOption "" // { description = '' - Enable the difftastic syntax highlighter. - See . + Enable the {command}`difftastic` syntax highlighter. + See . ''; }; @@ -305,11 +299,13 @@ in { delta = { enable = mkEnableOption "" // { description = '' - Whether to enable the delta syntax highlighter. - See . + Whether to enable the {command}`delta` syntax highlighter. + See . ''; }; + package = mkPackageOption pkgs "delta" { }; + options = mkOption { type = with types; let @@ -335,8 +331,16 @@ in { diff-so-fancy = { enable = mkEnableOption "" // { description = '' - Enable the diff-so-fancy diff colorizer. - See . + Enable the {command}`diff-so-fancy` diff colorizer. + See . + ''; + }; + + pagerOpts = mkOption { + type = types.listOf types.str; + default = [ "--tabs=4" "-RFX" ]; + description = '' + Arguments to be passed to {command}`less`. ''; }; @@ -363,7 +367,7 @@ in { default = true; example = false; description = '' - Whether the + or - at + Whether the `+` or `-` at line-start should be removed. ''; }; @@ -458,8 +462,8 @@ in { (mkIf (cfg.signing != null) { programs.git.iniContent = { user.signingKey = mkIf (cfg.signing.key != null) cfg.signing.key; - commit.gpgSign = cfg.signing.signByDefault; - tag.gpgSign = cfg.signing.signByDefault; + commit.gpgSign = mkDefault cfg.signing.signByDefault; + tag.gpgSign = mkDefault cfg.signing.signByDefault; gpg.program = cfg.signing.gpgPath; }; }) @@ -527,17 +531,16 @@ in { "--background ${cfg.difftastic.background}" "--display ${cfg.difftastic.display}" ]; - in { - diff.external = difftCommand; - core.pager = "${pkgs.less}/bin/less -XF"; - }; + in { diff.external = difftCommand; }; }) - (mkIf cfg.delta.enable { - home.packages = [ pkgs.delta ]; + (let + deltaPackage = cfg.delta.package; + deltaCommand = "${deltaPackage}/bin/delta"; + in mkIf cfg.delta.enable { + home.packages = [ deltaPackage ]; - programs.git.iniContent = let deltaCommand = "${pkgs.delta}/bin/delta"; - in { + programs.git.iniContent = { core.pager = deltaCommand; interactive.diffFilter = "${deltaCommand} --color-only"; delta = cfg.delta.options; @@ -550,7 +553,9 @@ in { programs.git.iniContent = let dsfCommand = "${pkgs.diff-so-fancy}/bin/diff-so-fancy"; in { - core.pager = "${dsfCommand} | ${pkgs.less}/bin/less --tabs=4 -RFX"; + core.pager = "${dsfCommand} | ${pkgs.less}/bin/less ${ + escapeShellArgs cfg.diff-so-fancy.pagerOpts + }"; interactive.diffFilter = "${dsfCommand} --patch"; diff-so-fancy = { markEmptyLines = cfg.diff-so-fancy.markEmptyLines; diff --git a/third_party/home-manager/modules/programs/gitui.nix b/third_party/home-manager/modules/programs/gitui.nix index 710e3fd998..029986b9e1 100644 --- a/third_party/home-manager/modules/programs/gitui.nix +++ b/third_party/home-manager/modules/programs/gitui.nix @@ -30,7 +30,7 @@ in { ''; description = '' Key config in Ron file format. This is written to - $XDG_CONFIG_HOME/gitui/key_config.ron. + {file}`$XDG_CONFIG_HOME/gitui/key_config.ron`. ''; }; @@ -63,7 +63,7 @@ in { ''; description = '' Theme in Ron file format. This is written to - $XDG_CONFIG_HOME/gitui/theme.ron. + {file}`$XDG_CONFIG_HOME/gitui/theme.ron`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/gnome-terminal.nix b/third_party/home-manager/modules/programs/gnome-terminal.nix index a9e3b5a758..83cfc02740 100644 --- a/third_party/home-manager/modules/programs/gnome-terminal.nix +++ b/third_party/home-manager/modules/programs/gnome-terminal.nix @@ -106,7 +106,7 @@ let default = null; type = types.nullOr types.bool; description = '' - If true, allow applications in the + If `true`, allow applications in the terminal to make text boldface. ''; }; @@ -150,40 +150,22 @@ let type = eraseBinding; description = '' Which string the terminal should send to an application when the user - presses the Backspace key. + presses the *Backspace* key. - - - auto - - Attempt to determine the right value from the terminal's IO settings. - - - - ascii-backspace - - Send an ASCII backspace character (0x08). - - - - ascii-delete - - Send an ASCII delete character (0x7F). - - - - delete-sequence - - Send the @7 control sequence. - - - - tty - - Send terminal’s erase setting. - - - + `auto` + : Attempt to determine the right value from the terminal's IO settings. + + `ascii-backspace` + : Send an ASCII backspace character (`0x08`). + + `ascii-delete` + : Send an ASCII delete character (`0x7F`). + + `delete-sequence` + : Send the `@7` control sequence. + + `tty` + : Send terminal's "erase" setting. ''; }; @@ -198,40 +180,22 @@ let type = eraseBinding; description = '' Which string the terminal should send to an application when the user - presses the Delete key. + presses the *Delete* key. - - - auto - - Send the @7 control sequence. - - - - ascii-backspace - - Send an ASCII backspace character (0x08). - - - - ascii-delete - - Send an ASCII delete character (0x7F). - - - - delete-sequence - - Send the @7 control sequence. - - - - tty - - Send terminal’s erase setting. - - - + `auto` + : Send the `@7` control sequence. + + `ascii-backspace` + : Send an ASCII backspace character (`0x08`). + + `ascii-delete` + : Send an ASCII delete character (`0x7F`). + + `delete-sequence` + : Send the `@7` control sequence. + + `tty` + : Send terminal's "erase" setting. ''; }; @@ -328,12 +292,30 @@ in { profile = mkOption { default = { }; type = types.attrsOf profileSubModule; - description = "A set of Gnome Terminal profiles."; + description = '' + A set of Gnome Terminal profiles. Note, the name of a profile must be + a UUID. You can generate one, for example, using {command}`uuidgen` + (from `util-linux`). + ''; }; }; }; config = mkIf cfg.enable { + assertions = [ + (let + uuidre = + "[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}"; + erroneous = + filter (n: builtins.match uuidre n == null) (attrNames cfg.profile); + in { + assertion = erroneous == [ ]; + message = '' + The attribute name of a Gnome Terminal profile must be a UUID. + Incorrect profile names: ${concatStringsSep ", " erroneous}''; + }) + ]; + home.packages = [ pkgs.gnome.gnome-terminal ]; dconf.settings = let dconfPath = "org/gnome/terminal/legacy"; diff --git a/third_party/home-manager/modules/programs/go.nix b/third_party/home-manager/modules/programs/go.nix index 70a5c9b62d..5d150036bb 100644 --- a/third_party/home-manager/modules/programs/go.nix +++ b/third_party/home-manager/modules/programs/go.nix @@ -37,8 +37,8 @@ in { default = null; example = "go"; description = '' - Primary GOPATH relative to - HOME. It will be exported first and therefore + Primary {env}`GOPATH` relative to + {env}`HOME`. It will be exported first and therefore used by default by the Go tooling. ''; }; @@ -48,8 +48,8 @@ in { default = [ ]; example = [ "extraGoPath1" "extraGoPath2" ]; description = '' - Extra GOPATHs relative to HOME appended - after , if that option is set. + Extra {env}`GOPATH`s relative to {env}`HOME` appended + after [](#opt-programs.go.goPath), if that option is set. ''; }; @@ -65,7 +65,7 @@ in { default = [ ]; example = [ "*.corp.example.com" "rsc.io/private" ]; description = '' - The GOPRIVATE environment variable controls + The {env}`GOPRIVATE` environment variable controls which modules the go command considers to be private (not available publicly) and should therefore not use the proxy or checksum database. diff --git a/third_party/home-manager/modules/programs/gpg.nix b/third_party/home-manager/modules/programs/gpg.nix index 4b233dc6b5..bc4cf44979 100644 --- a/third_party/home-manager/modules/programs/gpg.nix +++ b/third_party/home-manager/modules/programs/gpg.nix @@ -65,31 +65,24 @@ let description = '' The amount of trust you have in the key ownership and the care the owner puts into signing other keys. The available levels are - - - unknown or 1 - I don't know or won't say. - - - never or 2 - I do NOT trust. - - - marginal or 3 - I trust marginally. - - - full or 4 - I trust fully. - - - ultimate or 5 - I trust ultimately. - - - - See - for more. + + `unknown` or `1` + : I don't know or won't say. + + `never` or `2` + : I do **not** trust. + + `marginal` or `3` + : I trust marginally. + + `full` or `4` + : I trust fully. + + `ultimate` or `5` + : I trust ultimately. + + See the [Key Management chapter](https://www.gnupg.org/gph/en/manual/x334.html) + of the GNU Privacy Handbook for more. ''; }; }; @@ -154,7 +147,7 @@ in { defaultText = literalExpression "pkgs.gnupg"; example = literalExpression "pkgs.gnupg23"; description = - "The Gnupg package to use (also used the gpg-agent service)."; + "The Gnupg package to use (also used by the gpg-agent service)."; }; settings = mkOption { @@ -168,10 +161,11 @@ in { ''; description = '' GnuPG configuration options. Available options are described - in the gpg manpage: - . - - + in + [ + {manpage}`gpg(1)` + ](https://gnupg.org/documentation/manpage.html). + Note that lists are converted to duplicate keys. ''; }; @@ -186,8 +180,10 @@ in { ''; description = '' SCdaemon configuration options. Available options are described - in the gpg scdaemon manpage: - . + in + [ + {manpage}`scdaemon(1)` + ](https://www.gnupg.org/documentation/manuals/gnupg/Scdaemon-Options.html). ''; }; @@ -204,12 +200,12 @@ in { type = types.bool; default = true; description = '' - If set to true, you may manage your keyring as a user - using the gpg command. Upon activation, the keyring + If set to `true`, you may manage your keyring as a user + using the `gpg` command. Upon activation, the keyring will have managed keys added without overwriting unmanaged keys. - - If set to false, the path - $GNUPGHOME/pubring.kbx will become an immutable + + If set to `false`, the path + {file}`$GNUPGHOME/pubring.kbx` will become an immutable link to the Nix store, denying modifications. ''; }; @@ -218,15 +214,15 @@ in { type = types.bool; default = true; description = '' - If set to true, you may manage trust as a user using - the gpg command. Upon activation, trusted keys have + If set to `true`, you may manage trust as a user using + the {command}`gpg` command. Upon activation, trusted keys have their trust set without overwriting unmanaged keys. - - If set to false, the path - $GNUPGHOME/trustdb.gpg will be - overwritten on each activation, removing trust for + + If set to `false`, the path + {file}`$GNUPGHOME/trustdb.gpg` will be + *overwritten* on each activation, removing trust for any unmanaged keys. Be careful to make a backup of your old - trustdb.gpg before switching to immutable trust! + {file}`trustdb.gpg` before switching to immutable trust! ''; }; diff --git a/third_party/home-manager/modules/programs/havoc.nix b/third_party/home-manager/modules/programs/havoc.nix index 6ae89c1d7f..c83a1c39a8 100644 --- a/third_party/home-manager/modules/programs/havoc.nix +++ b/third_party/home-manager/modules/programs/havoc.nix @@ -20,8 +20,7 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/havoc.cfg. See + {file}`$XDG_CONFIG_HOME/havoc.cfg`. See for a list of available options. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/helix.nix b/third_party/home-manager/modules/programs/helix.nix index 9d06b65c8b..e8390ffd63 100644 --- a/third_party/home-manager/modules/programs/helix.nix +++ b/third_party/home-manager/modules/programs/helix.nix @@ -18,41 +18,73 @@ in { description = "The package to use for helix."; }; + defaultEditor = mkOption { + type = types.bool; + default = false; + description = '' + Whether to configure {command}`hx` as the default + editor using the {env}`EDITOR` environment variable. + ''; + }; + settings = mkOption { type = tomlFormat.type; default = { }; example = literalExpression '' { theme = "base16"; - lsp.display-messages = true; + editor = { + line-number = "relative"; + lsp.display-messages = true; + }; keys.normal = { space.space = "file_picker"; space.w = ":w"; space.q = ":q"; + esc = [ "collapse_selection" "keep_primary_selection" ]; }; } ''; description = '' Configuration written to - $XDG_CONFIG_HOME/helix/config.toml. - - See + {file}`$XDG_CONFIG_HOME/helix/config.toml`. + + See for the full list of options. ''; }; languages = mkOption { - type = types.listOf tomlFormat.type; - default = [ ]; - example = [{ - name = "rust"; - auto-format = false; - }]; + type = with types; + coercedTo (listOf tomlFormat.type) (language: + lib.warn '' + The syntax of programs.helix.languages has changed. + It now generates the whole languages.toml file instead of just the language array in that file. + + Use + programs.helix.languages = { language = ; } + instead. + '' { inherit language; }) (addCheck tomlFormat.type builtins.isAttrs); + default = { }; + example = literalExpression '' + { + # the language-server option currently requires helix from the master branch at https://github.com/helix-editor/helix/ + language-server.typescript-language-server = with pkgs.nodePackages; { + command = "''${typescript-language-server}/bin/typescript-language-server"; + args = [ "--stdio" "--tsserver-path=''${typescript}/lib/node_modules/typescript/lib" ]; + }; + + language = [{ + name = "rust"; + auto-format = false; + }]; + } + ''; description = '' Language specific configuration at - $XDG_CONFIG_HOME/helix/languages.toml. - - See + {file}`$XDG_CONFIG_HOME/helix/languages.toml`. + + See for more information. ''; }; @@ -119,10 +151,10 @@ in { ''; description = '' Each theme is written to - $XDG_CONFIG_HOME/helix/themes/theme-name.toml. + {file}`$XDG_CONFIG_HOME/helix/themes/theme-name.toml`. Where the name of each attribute is the theme-name (in the example "base16"). - - See + + See for the full list of options. ''; }; @@ -131,14 +163,15 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; + home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "hx"; }; + xdg.configFile = let settings = { "helix/config.toml" = mkIf (cfg.settings != { }) { source = tomlFormat.generate "helix-config" cfg.settings; }; - "helix/languages.toml" = mkIf (cfg.languages != [ ]) { - source = - tomlFormat.generate "helix-config" { language = cfg.languages; }; + "helix/languages.toml" = mkIf (cfg.languages != { }) { + source = tomlFormat.generate "helix-languages-config" cfg.languages; }; }; diff --git a/third_party/home-manager/modules/programs/hexchat.nix b/third_party/home-manager/modules/programs/hexchat.nix index 4eda07550d..01ece4bdbd 100644 --- a/third_party/home-manager/modules/programs/hexchat.nix +++ b/third_party/home-manager/modules/programs/hexchat.nix @@ -75,46 +75,33 @@ let default = null; description = '' The login method. The allowed options are: - - - null - Default - - - "nickServMsg" - NickServ (/MSG NickServ + password) - - - "nickServ" - NickServ (/NICKSERV + password) - - - "challengeAuth" - Challenge Auth (username + password) - - - "sasl" - SASL (username + password) - - - "serverPassword" - Server password (/PASS password) - - - "saslExternal" - SASL EXTERNAL (cert) - - - "customCommands" - - Use "commands" field for auth. For example - - commands = [ "/msg NickServ IDENTIFY my_password" ] - - - - - + + `null` + : Default + + `"nickServMsg"` + : NickServ (`/MSG NickServ` + password) + + `"nickServ"` + : NickServ (`/NICKSERV` + password) + + `"challengeAuth"` + : Challenge Auth (username + password) + + `"sasl"` + : SASL (username + password) + + `"serverPassword"` + : Server password (`/PASS` password) + + `"saslExternal"` + : SASL EXTERNAL (cert) + + `"customCommands"` + : Use "commands" field for auth. For example + ```nix + commands = [ "/msg NickServ IDENTIFY my_password" ] + ``` ''; }; @@ -154,7 +141,7 @@ let default = null; description = '' Real name. Is used to populate the real name field that appears when - someone uses the WHOIS command on your nick. + someone uses the `WHOIS` command on your nick. ''; }; @@ -162,7 +149,7 @@ let type = nullOr str; default = null; description = '' - User name. Part of your user@host hostmask that + User name. Part of your `user@host` hostmask that appears to other on IRC. ''; }; @@ -268,7 +255,7 @@ in { }; }''; description = '' - Configures $XDG_CONFIG_HOME/hexchat/servlist.conf. + Configures {file}`$XDG_CONFIG_HOME/hexchat/servlist.conf`. ''; }; @@ -284,8 +271,8 @@ in { }; ''; description = '' - Configuration for $XDG_CONFIG_HOME/hexchat/hexchat.conf, see - + Configuration for {file}`$XDG_CONFIG_HOME/hexchat/hexchat.conf`, see + for supported values. ''; }; @@ -295,23 +282,18 @@ in { default = false; description = '' Enables overwriting HexChat configuration files - (hexchat.conf, servlist.conf). - Any existing HexChat configuration will be lost. Certify to back-up any - previous configuration before enabling this. - + ({file}`hexchat.conf`, {file}`servlist.conf`). + Any existing HexChat configuration will be lost. Make sure to back up + any previous configuration before enabling this. + Enabling this setting is recommended, because everytime HexChat application is closed it overwrites Nix/Home Manager provided configuration files, causing: - - - Nix/Home Manager provided configuration to be out of sync with - actual active HexChat configuration. - - - Blocking Nix/Home Manager updates until configuration files are - manually removed. - - + + 1. Nix/Home Manager provided configuration to be out of sync with + actual active HexChat configuration. + 2. Nix/Home Manager updates to be blocked until configuration files are + manually removed. ''; }; @@ -327,7 +309,7 @@ in { ''; description = '' Theme package for HexChat. Expects a derivation containing decompressed - theme files. Note, .hct files are actually ZIP files, + theme files. Note, `.hct` files are actually ZIP files, as seen in example. ''; }; diff --git a/third_party/home-manager/modules/programs/himalaya.nix b/third_party/home-manager/modules/programs/himalaya.nix index 92328153fe..9b5a1e3984 100644 --- a/third_party/home-manager/modules/programs/himalaya.nix +++ b/third_party/home-manager/modules/programs/himalaya.nix @@ -1,140 +1,270 @@ { config, lib, pkgs, ... }: + let - cfg = config.programs.himalaya; - - enabledAccounts = - lib.filterAttrs (_: a: a.himalaya.enable) (config.accounts.email.accounts); - + # aliases + inherit (config.programs) himalaya; tomlFormat = pkgs.formats.toml { }; - himalayaConfig = let - toHimalayaConfig = account: - { + # 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 + maildirBasePath = config.accounts.email.maildirBasePath; + + # make a himalaya config from a 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 + && !notmuchEnabled; + + globalConfig = { email = account.address; display-name = account.realName; default = account.primary; - - mailboxes = { + folder-aliases = { inbox = account.folders.inbox; sent = account.folders.sent; - draft = account.folders.drafts; - # NOTE: himalaya does not support configuring the name of the trash folder + drafts = account.folders.drafts; + trash = account.folders.trash; }; - } // (lib.optionalAttrs (account.signature.showSignature == "append") { - # FIXME: signature cannot be attached - signature = account.signature.text; - signature-delim = account.signature.delimiter; - }) // (if account.himalaya.backend == null then { - backend = "none"; - } else if account.himalaya.backend == "imap" then { - # FIXME: does not support disabling TLS altogether - # NOTE: does not accept sequence of strings for password commands - backend = account.himalaya.backend; - imap-login = account.userName; - imap-passwd-cmd = lib.escapeShellArgs account.passwordCommand; + }; + + signatureConfig = + lib.optionalAttrs (account.signature.showSignature == "append") { + # TODO: signature cannot be attached yet + # https://todo.sr.ht/~soywod/pimalaya/27 + signature = account.signature.text; + signature-delim = account.signature.delimiter; + }; + + 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; - } else if account.himalaya.backend == "maildir" then { - backend = account.himalaya.backend; - maildir-root-dir = account.maildirBasePath; - } else - throw "Unsupported backend: ${account.himalaya.backend}") - // (if account.himalaya.sender == null then { - sender = "none"; - } else if account.himalaya.sender == "smtp" then { - sender = account.himalaya.sender; - smtp-login = account.userName; - smtp-passwd-cmd = lib.escapeShellArgs account.passwordCommand; + imap-login = account.userName; + imap-auth = "passwd"; + imap-passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; + }); + + maildirConfig = lib.optionalAttrs maildirEnabled (compactAttrs { + backend = "maildir"; + maildir-root-dir = account.maildir.absPath; + }); + + notmuchConfig = lib.optionalAttrs notmuchEnabled (compactAttrs { + backend = "notmuch"; + notmuch-db-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; - } else if account.himalaya.sender == "sendmail" then { - sender = account.himalaya.sender; - } else - throw "Unsupported sender: ${account.himalaya.sender}") - // account.himalaya.settings; - in { - # NOTE: will not start without this configured, but each account overrides it - display-name = ""; - } // cfg.settings // (lib.mapAttrs (_: toHimalayaConfig) enabledAccounts); -in { - meta.maintainers = with lib.hm.maintainers; [ toastal ]; + smtp-login = account.userName; + smtp-auth = "passwd"; + smtp-passwd.cmd = builtins.concatStringsSep " " account.passwordCommand; + }); - options = with lib; { - programs.himalaya = { - enable = mkEnableOption "himalaya mail client"; + sendmailConfig = + lib.optionalAttrs (isNull account.smtp && !isNull account.msmtp) { + sender = "sendmail"; + sendmail-cmd = "${pkgs.msmtp}/bin/msmtp"; + }; - package = mkOption { - type = types.package; - default = pkgs.himalaya; - defaultText = literalExpression "pkgs.himalaya"; - description = '' - Package providing the himalaya mail client. - ''; + config = 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; + }; }; + }; - settings = mkOption { - type = tomlFormat.type; +in { + meta.maintainers = with lib.hm.maintainers; [ soywod toastal ]; + + options = { + programs.himalaya = { + enable = lib.mkEnableOption "the Himalaya email client"; + package = lib.mkPackageOption pkgs "himalaya" { }; + settings = lib.mkOption { + type = lib.types.submodule { freeformType = tomlFormat.type; }; default = { }; - example = lib.literalExpression '' - { - email-listing-page-size = 50; - watch-cmds = [ "mbsync -a" ] - } - ''; description = '' - Global himalaya configuration values. + Himalaya global configuration. + See for supported values. ''; }; }; - accounts.email.accounts = mkOption { - type = with types; - attrsOf (submodule { - options.himalaya = { - enable = mkEnableOption '' - the himalaya mail client for this account + services = { + himalaya-notify = { + enable = lib.mkEnableOption "the Himalaya new emails notifier service"; + + environment = lib.mkOption { + type = with lib.types; attrsOf str; + default = { }; + example = lib.literalExpression '' + { + "PASSWORD_STORE_DIR" = "~/.password-store"; + } + ''; + description = '' + Extra environment variables to be exported in the service. + ''; + }; + + settings = { + account = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "gmail"; + description = '' + Name of the account the notifier should be started for. If + no account is given, the default one is used. ''; - - backend = mkOption { - # TODO: “notmuch” (requires compile flag for himalaya, libnotmuch) - type = types.nullOr (types.enum [ "imap" "maildir" ]); - description = '' - The method for which himalaya will fetch, store, - etc. mail. - ''; - }; - - sender = mkOption { - type = types.nullOr (types.enum [ "smtp" "sendmail" ]); - description = '' - The method for which himalaya will send mail. - ''; - }; - - settings = mkOption { - type = tomlFormat.type; - default = { }; - example = lib.literalExpression '' - { - default-page-size = 50; - } - ''; - description = '' - Extra settings to add to this himalaya - account configuration. - ''; - }; }; - }); + + keepalive = lib.mkOption { + type = with lib.types; nullOr int; + default = null; + example = "500"; + description = '' + Notifier lifetime of the IDLE session (in seconds). + ''; + }; + }; + }; + + 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). + ''; + }; + }; + }; + }; + + 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. + ''; + }; + + settings = lib.mkOption { + type = lib.types.submodule { freeformType = tomlFormat.type; }; + default = { }; + description = '' + Himalaya configuration for this email account. + See for supported values. + ''; + }; + }; + }); }; }; - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + config = lib.mkIf himalaya.enable { + home.packages = [ himalaya.package ]; - xdg.configFile."himalaya/config.toml".source = - tomlFormat.generate "himalaya-config.toml" himalayaConfig; + xdg.configFile."himalaya/config.toml".source = let + enabledAccounts = lib.filterAttrs (_: account: account.himalaya.enable) + config.accounts.email.accounts; + accountsConfig = lib.mapAttrs mkAccountConfig enabledAccounts; + globalConfig = compactAttrs himalaya.settings; + allConfig = globalConfig // 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."); }; } diff --git a/third_party/home-manager/modules/programs/home-manager.nix b/third_party/home-manager/modules/programs/home-manager.nix index cc760baf4d..8ea370175b 100644 --- a/third_party/home-manager/modules/programs/home-manager.nix +++ b/third_party/home-manager/modules/programs/home-manager.nix @@ -18,11 +18,10 @@ in { default = null; example = "$HOME/devel/home-manager"; description = '' - The default path to use for Home Manager. If this path does - not exist then - $HOME/.config/nixpkgs/home-manager and - $HOME/.nixpkgs/home-manager will be - attempted. + The default path to use for Home Manager. When + `null`, then the {file}`home-manager` + channel, {file}`$HOME/.config/nixpkgs/home-manager`, and + {file}`$HOME/.nixpkgs/home-manager` will be attempted. ''; }; }; diff --git a/third_party/home-manager/modules/programs/hstr.nix b/third_party/home-manager/modules/programs/hstr.nix new file mode 100644 index 0000000000..e858321745 --- /dev/null +++ b/third_party/home-manager/modules/programs/hstr.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.hstr; + +in { + meta.maintainers = [ hm.maintainers.Dines97 ]; + + options.programs.hstr = { + enable = mkEnableOption '' + Bash And Zsh shell history suggest box - easily view, navigate, search and + manage your command history''; + + package = mkPackageOption pkgs "hstr" { }; + + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration '' + eval "$(${cfg.package}/bin/hstr --show-configuration)" + ''; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + eval "$(${cfg.package}/bin/hstr --show-zsh-configuration)" + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/htop.nix b/third_party/home-manager/modules/programs/htop.nix index 27368602d2..1c569c4049 100644 --- a/third_party/home-manager/modules/programs/htop.nix +++ b/third_party/home-manager/modules/programs/htop.nix @@ -151,7 +151,7 @@ in { ''; description = '' Configuration options to add to - $XDG_CONFIG_HOME/htop/htoprc. + {file}`$XDG_CONFIG_HOME/htop/htoprc`. ''; }; @@ -159,7 +159,7 @@ in { type = types.package; default = pkgs.htop; defaultText = literalExpression "pkgs.htop"; - description = "Package containing the htop program."; + description = "Package containing the {command}`htop` program."; }; }; diff --git a/third_party/home-manager/modules/programs/i3status-rust.nix b/third_party/home-manager/modules/programs/i3status-rust.nix index 33f2b146dc..c5c020cb44 100644 --- a/third_party/home-manager/modules/programs/i3status-rust.nix +++ b/third_party/home-manager/modules/programs/i3status-rust.nix @@ -9,7 +9,7 @@ let settingsFormat = pkgs.formats.toml { }; in { - meta.maintainers = [ maintainers.farlion ]; + meta.maintainers = with lib.maintainers; [ farlion thiagokokada ]; options.programs.i3status-rust = { enable = mkEnableOption "a replacement for i3-status written in Rust"; @@ -21,42 +21,38 @@ in { blocks = mkOption { type = settingsFormat.type; default = [ + { block = "cpu"; } { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; - interval = 60; + interval = 20; warning = 20.0; alert = 10.0; + format = " $icon root: $available.eng(w:2) "; } { block = "memory"; - display_type = "memory"; - format_mem = "{mem_used_percents}"; - format_swap = "{swap_used_percents}"; + format = " $icon $mem_total_used_percents.eng(w:2) "; + format_alt = " $icon_swap $swap_used_percents.eng(w:2) "; } { - block = "cpu"; - interval = 1; + block = "sound"; + click = [{ + button = "left"; + cmd = "pavucontrol"; + }]; } - { - block = "load"; - interval = 1; - format = "{1m}"; - } - { block = "sound"; } { block = "time"; - interval = 60; - format = "%a %d/%m %R"; + interval = 5; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; } ]; description = '' Configuration blocks to add to i3status-rust - config. See - + {file}`config`. See + for block options. ''; example = literalExpression '' @@ -64,20 +60,23 @@ in { { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; } { block = "sound"; - format = "{output_name} {volume}%"; - on_click = "pavucontrol --tab=3"; + format = " $icon $output_name {$volume.eng(w:2) |}"; + click = [ + { + button = "left"; + cmd = "pavucontrol --tab=3"; + } + ]; mappings = { - "alsa_output.pci-0000_00_1f.3.analog-stereo" = ""; - "bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = ""; + "alsa_output.pci-0000_00_1f.3.analog-stereo" = ""; + "bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = ""; }; } ]; @@ -89,12 +88,12 @@ in { default = { }; description = '' Any extra options to add to i3status-rust - config. + {file}`config`. ''; example = literalExpression '' { theme = { - name = "solarized-dark"; + theme = "solarized-dark"; overrides = { idle_bg = "#123456"; idle_fg = "#abcdef"; @@ -109,10 +108,10 @@ in { default = "none"; description = '' The icons set to use. See - + for a list of available icon sets. ''; - example = "awesome5"; + example = "awesome6"; }; theme = mkOption { @@ -120,7 +119,7 @@ in { default = "plain"; description = '' The theme to use. See - + for a list of available themes. ''; example = "gruvbox-dark"; @@ -134,18 +133,15 @@ in { { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; } { block = "memory"; - display_type = "memory"; - format_mem = "{mem_used_percents}"; - format_swap = "{swap_used_percents}"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; } { block = "cpu"; @@ -154,31 +150,28 @@ in { { block = "load"; interval = 1; - format = "{1m}"; + format = " $icon $1m "; } { block = "sound"; } { block = "time"; interval = 60; - format = "%a %d/%m %R"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; } ]; }; }; description = '' Attribute set of i3status-rust bars, each with their own configuration. - Each bar name generates a config file suffixed with - the bar's name from the attribute set, like so: - config-name.toml. - + Each bar {var}`name` generates a config file suffixed with + the bar's {var}`name` from the attribute set, like so: + {file}`config-''${name}.toml`. + This way, multiple config files can be generated, such as for having a top and a bottom bar. - + See - - i3status-rust - 1 - + {manpage}`i3status-rust(1)` for options. ''; example = literalExpression '' @@ -187,18 +180,15 @@ in { { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; } { block = "memory"; - display_type = "memory"; - format_mem = "{mem_used_percents}"; - format_swap = "{swap_used_percents}"; + format_mem = " $icon $mem_used_percents "; + format_swap = " $icon $swap_used_percents "; } { block = "cpu"; @@ -207,18 +197,18 @@ in { { block = "load"; interval = 1; - format = "{1m}"; + format = " $icon $1m "; } { block = "sound"; } { block = "time"; interval = 60; - format = "%a %d/%m %R"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; } ]; settings = { theme = { - name = "solarized-dark"; + theme = "solarized-dark"; overrides = { idle_bg = "#123456"; idle_fg = "#abcdef"; @@ -244,11 +234,17 @@ in { assertions = [ (hm.assertions.assertPlatform "programs.i3status-rust" pkgs platforms.linux) + { + assertion = lib.versionOlder cfg.package.version "0.31.0" + || lib.versionAtLeast cfg.package.version "0.31.2"; + message = + "Only i3status-rust <0.31.0 or ≥0.31.2 is supported due to a config format incompatibility."; + } ]; home.packages = [ cfg.package ]; - xdg.configFile = mapAttrs' (cfgFileSuffix: cfg: + xdg.configFile = mapAttrs' (cfgFileSuffix: cfgBar: nameValuePair ("i3status-rust/config-${cfgFileSuffix}.toml") ({ onChange = mkIf config.xsession.windowManager.i3.enable '' i3Socket="''${XDG_RUNTIME_DIR:-/run/user/$UID}/i3/ipc-socket.*" @@ -258,10 +254,16 @@ in { ''; source = settingsFormat.generate ("config-${cfgFileSuffix}.toml") ({ - theme = cfg.theme; - icons = cfg.icons; - block = cfg.blocks; - } // cfg.settings); + theme = if lib.versionAtLeast cfg.package.version "0.30.0" then { + theme = cfgBar.theme; + } else + cfgBar.theme; + icons = if lib.versionAtLeast cfg.package.version "0.30.0" then { + icons = cfgBar.icons; + } else + cfgBar.icons; + block = cfgBar.blocks; + } // cfgBar.settings); })) cfg.bars; }; } diff --git a/third_party/home-manager/modules/programs/i3status.nix b/third_party/home-manager/modules/programs/i3status.nix index 5fd4f74171..17b1162e84 100644 --- a/third_party/home-manager/modules/programs/i3status.nix +++ b/third_party/home-manager/modules/programs/i3status.nix @@ -51,13 +51,10 @@ in { type = settingsType; default = { }; description = '' - Configuration to add to i3status config - general section. + Configuration to add to i3status {file}`config` + `general` section. See - - i3status - 1 - + {manpage}`i3status(1)` for options. ''; example = literalExpression '' @@ -84,7 +81,7 @@ in { position = mkOption { type = with types; either int float; description = '' - Position of this module in i3status order. + Position of this module in i3status `order`. ''; }; settings = mkOption { @@ -93,10 +90,7 @@ in { description = '' Configuration to add to this i3status module. See - - i3status - 1 - + {manpage}`i3status(1)` for options. ''; example = literalExpression '' @@ -111,12 +105,9 @@ in { }); default = { }; description = '' - Modules to add to i3status config file. + Modules to add to i3status {file}`config` file. See - - i3status - 1 - + {manpage}`i3status(1)` for options. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/imv.nix b/third_party/home-manager/modules/programs/imv.nix new file mode 100644 index 0000000000..583c2c57cd --- /dev/null +++ b/third_party/home-manager/modules/programs/imv.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.imv; + + toConfig = attrs: + '' + # Generated by Home Manager. + '' + generators.toINI { } attrs; +in { + meta.maintainers = [ maintainers.christoph-heiss ]; + + options.programs.imv = { + enable = mkEnableOption + "imv: a command line image viewer intended for use with tiling window managers"; + + package = mkPackageOption pkgs "imv" { }; + + settings = mkOption { + default = { }; + type = with types; attrsOf (attrsOf (oneOf [ bool int str ])); + description = '' + Configuration options for imv. See + {manpage}`imv(5)`. + ''; + example = literalExpression '' + { + options.background = "ffffff"; + aliases.x = "close"; + } + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.imv" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + xdg.configFile = + mkIf (cfg.settings != { }) { "imv/config".text = toConfig cfg.settings; }; + }; +} diff --git a/third_party/home-manager/modules/programs/irssi.nix b/third_party/home-manager/modules/programs/irssi.nix index d0953ed7b2..bcce6cfa55 100644 --- a/third_party/home-manager/modules/programs/irssi.nix +++ b/third_party/home-manager/modules/programs/irssi.nix @@ -153,7 +153,7 @@ let default = false; description = '' Enable SASL external authentication. This requires setting a path in - . + [](#opt-programs.irssi.networks._name_.server.ssl.certificateFile). ''; }; }; diff --git a/third_party/home-manager/modules/programs/java.nix b/third_party/home-manager/modules/programs/java.nix index 24467a2550..115a8a9e5c 100644 --- a/third_party/home-manager/modules/programs/java.nix +++ b/third_party/home-manager/modules/programs/java.nix @@ -16,8 +16,8 @@ in { programs.java = { enable = mkEnableOption "" // { description = '' - Install the Java development kit and set the JAVA_HOME - variable. + Install the Java development kit and set the + {env}`JAVA_HOME` variable. ''; }; @@ -27,7 +27,7 @@ in { defaultText = "pkgs.jdk"; description = '' Java package to install. Typical values are - pkgs.jdk or pkgs.jre. + `pkgs.jdk` or `pkgs.jre`. ''; }; }; @@ -36,6 +36,8 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.sessionVariables.JAVA_HOME = cfg.package.home; + # some instances of `jdk-linux-base.nix` pass through `result` without turning it onto a path-string. + # while I suspect this is incorrect, the documentation is unclear. + home.sessionVariables.JAVA_HOME = "${cfg.package.home}"; }; } diff --git a/third_party/home-manager/modules/programs/joshuto.nix b/third_party/home-manager/modules/programs/joshuto.nix new file mode 100644 index 0000000000..6f87277d4d --- /dev/null +++ b/third_party/home-manager/modules/programs/joshuto.nix @@ -0,0 +1,88 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.joshuto; + tomlFormat = pkgs.formats.toml { }; +in { + meta.maintainers = [ hm.maintainers.rasmus-kirk ]; + + options.programs.joshuto = { + enable = mkEnableOption "joshuto file manager"; + + package = mkOption { + type = types.package; + default = pkgs.joshuto; + defaultText = literalExpression "pkgs.joshuto"; + description = "The package to use for joshuto."; + }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/joshuto/joshuto.toml`. + + See + for the full list of options. + ''; + }; + + keymap = mkOption { + type = tomlFormat.type; + default = { }; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/joshuto/keymap.toml`. + + See + for the full list of options. Note that this option will overwrite any existing keybinds. + ''; + }; + + mimetype = mkOption { + type = tomlFormat.type; + default = { }; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/joshuto/mimetype.toml`. + + See + for the full list of options + ''; + }; + + theme = mkOption { + type = tomlFormat.type; + default = { }; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/joshuto/theme.toml`. + + See + for the full list of options + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile = { + "joshuto/joshuto.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "joshuto-settings" cfg.settings; + }; + "joshuto/keymap.toml" = mkIf (cfg.keymap != { }) { + source = tomlFormat.generate "joshuto-keymap" cfg.keymap; + }; + "joshuto/mimetype.toml" = mkIf (cfg.mimetype != { }) { + source = tomlFormat.generate "joshuto-mimetype" cfg.mimetype; + }; + "joshuto/theme.toml" = mkIf (cfg.theme != { }) { + source = tomlFormat.generate "joshuto-theme" cfg.theme; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/jq.nix b/third_party/home-manager/modules/programs/jq.nix index e810f88451..f4ec5334d0 100644 --- a/third_party/home-manager/modules/programs/jq.nix +++ b/third_party/home-manager/modules/programs/jq.nix @@ -39,9 +39,10 @@ in { colors = mkOption { description = '' - The colors used in colored JSON output. + The colors used in colored JSON output. - See . + See the [Colors section](https://jqlang.github.io/jq/manual/#Colors) + of the jq manual. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/jujutsu.nix b/third_party/home-manager/modules/programs/jujutsu.nix new file mode 100644 index 0000000000..c511f2dcc2 --- /dev/null +++ b/third_party/home-manager/modules/programs/jujutsu.nix @@ -0,0 +1,76 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.jujutsu; + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ maintainers.shikanime ]; + + options.programs.jujutsu = { + enable = + mkEnableOption "a Git-compatible DVCS that is both simple and powerful"; + + package = mkPackageOption pkgs "jujutsu" { }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + example = literalExpression '' + { + user = { + name = "John Doe"; + email = "jdoe@example.org"; + }; + } + ''; + description = '' + Options to add to the {file}`.jjconfig.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; + }; + + 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 11ac2bfd31..b32769cc04 100644 --- a/third_party/home-manager/modules/programs/k9s.nix +++ b/third_party/home-manager/modules/programs/k9s.nix @@ -21,8 +21,8 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/k9s/config.yml. See - + {file}`$XDG_CONFIG_HOME/k9s/config.yml`. See + for supported values. ''; example = literalExpression '' @@ -37,8 +37,8 @@ in { default = { }; description = '' Skin written to - $XDG_CONFIG_HOME/k9s/skin.yml. See - + {file}`$XDG_CONFIG_HOME/k9s/skin.yml`. See + for supported values. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/kakoune.nix b/third_party/home-manager/modules/programs/kakoune.nix index 32f718909e..da0af0c061 100644 --- a/third_party/home-manager/modules/programs/kakoune.nix +++ b/third_party/home-manager/modules/programs/kakoune.nix @@ -53,7 +53,7 @@ let example = "SetOption"; description = '' The name of the hook. For a description, see - . + . ''; }; @@ -116,7 +116,7 @@ let example = ""; description = '' The key to be mapped. See - + for possible values. ''; }; @@ -138,7 +138,7 @@ let default = null; description = '' Set the color scheme. To see available schemes, enter - colorscheme at the kakoune prompt. + {command}`colorscheme` at the kakoune prompt. ''; }; @@ -147,7 +147,7 @@ let default = null; description = '' The width of a tab in spaces. The kakoune default is - 6. + `6`. ''; }; @@ -156,8 +156,8 @@ let default = null; description = '' The width of an indentation in spaces. - The kakoune default is 4. - If 0, a tab will be used instead. + The kakoune default is `4`. + If `0`, a tab will be used instead. ''; }; @@ -184,7 +184,7 @@ let example = [ "command" "normal" ]; description = '' Contexts in which to display automatic information box. - The kakoune default is [ "command" "onkey" ]. + The kakoune default is `[ "command" "onkey" ]`. ''; }; @@ -193,7 +193,7 @@ let default = null; description = '' Modes in which to display possible completions. - The kakoune default is [ "insert" "prompt" ]. + The kakoune default is `[ "insert" "prompt" ]`. ''; }; @@ -202,7 +202,7 @@ let default = null; description = '' Reload buffers when an external modification is detected. - The kakoune default is "ask". + The kakoune default is `"ask"`. ''; }; @@ -297,7 +297,7 @@ let description = '' Amount by which shifted function keys are offset. That is, if the terminal sends F13 for Shift-F1, this - should be 12. + should be `12`. ''; }; @@ -321,7 +321,7 @@ let default = false; description = '' Highlight the matching char of the character under the - selections' cursor using the MatchingChar + selections' cursor using the `MatchingChar` face. ''; }; @@ -361,7 +361,7 @@ let example = "⏎"; description = '' Prefix wrapped lines with marker text. - If not null, + If not `null`, the marker text will be displayed in the indentation if possible. ''; }; @@ -400,7 +400,7 @@ let description = '' String that separates the line number column from the buffer contents. The kakoune default is - "|". + `"|"`. ''; }; }; @@ -421,7 +421,7 @@ let default = null; description = '' The character to display for line feeds. - The kakoune default is "¬". + The kakoune default is `"¬"`. ''; }; @@ -430,7 +430,7 @@ let default = null; description = '' The character to display for spaces. - The kakoune default is "·". + The kakoune default is `"·"`. ''; }; @@ -439,7 +439,7 @@ let default = null; description = '' The character to display for non-breaking spaces. - The kakoune default is "⍽". + The kakoune default is `"⍽"`. ''; }; @@ -448,7 +448,7 @@ let default = null; description = '' The character to display for tabs. - The kakoune default is "→". + The kakoune default is `"→"`. ''; }; @@ -457,7 +457,7 @@ let default = null; description = '' The character to append to tabs to reach the width of a tabstop. - The kakoune default is " ". + The kakoune default is `" "`. ''; }; }; @@ -473,7 +473,7 @@ let default = [ ]; description = '' User-defined key mappings. For documentation, see - . + . ''; }; @@ -482,7 +482,7 @@ let default = [ ]; description = '' Global hooks. For documentation, see - . + . ''; }; }; @@ -630,12 +630,21 @@ in { description = "kakoune configuration options."; }; + defaultEditor = mkOption { + type = types.bool; + default = false; + description = '' + Whether to configure {command}`kak` as the default + editor using the {env}`EDITOR` environment variable. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; description = '' Extra configuration lines to add to - $XDG_CONFIG_HOME/kak/kakrc. + {file}`$XDG_CONFIG_HOME/kak/kakrc`. ''; }; @@ -646,7 +655,7 @@ in { description = '' List of kakoune plugins to install. To get a list of supported plugins run: - nix-env -f '<nixpkgs>' -qaP -A kakounePlugins. + {command}`nix-env -f '' -qaP -A kakounePlugins`. ''; }; }; @@ -654,6 +663,7 @@ in { config = mkIf cfg.enable { home.packages = [ kakouneWithPlugins ]; + home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; }; xdg.configFile."kak/kakrc".source = configFile; }; } diff --git a/third_party/home-manager/modules/programs/keychain.nix b/third_party/home-manager/modules/programs/keychain.nix index 419c116a9a..d59855f552 100644 --- a/third_party/home-manager/modules/programs/keychain.nix +++ b/third_party/home-manager/modules/programs/keychain.nix @@ -16,7 +16,7 @@ let }"; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.keychain = { enable = mkEnableOption "keychain"; @@ -87,12 +87,20 @@ in { ''; }; + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; + enableXsessionIntegration = mkOption { default = true; type = types.bool; visible = pkgs.stdenv.hostPlatform.isLinux; description = '' - Whether to run keychain from your ~/.xsession. + Whether to run keychain from your {file}`~/.xsession`. ''; }; }; @@ -108,8 +116,11 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' eval "$(SHELL=zsh ${shellCommand})" ''; + programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration '' + ${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env + ''; xsession.initExtra = mkIf cfg.enableXsessionIntegration '' - eval "$(${shellCommand})" + eval "$(SHELL=bash ${shellCommand})" ''; }; } diff --git a/third_party/home-manager/modules/programs/khal-accounts.nix b/third_party/home-manager/modules/programs/khal-accounts.nix new file mode 100644 index 0000000000..ad94adc995 --- /dev/null +++ b/third_party/home-manager/modules/programs/khal-accounts.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: + +with lib; + +{ + options.khal = { + enable = lib.mkEnableOption "khal access"; + + readOnly = mkOption { + type = types.bool; + default = false; + description = '' + Keep khal from making any changes to this account. + ''; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/khal-calendar-accounts.nix b/third_party/home-manager/modules/programs/khal-calendar-accounts.nix new file mode 100644 index 0000000000..6910d627a1 --- /dev/null +++ b/third_party/home-manager/modules/programs/khal-calendar-accounts.nix @@ -0,0 +1,58 @@ +{ config, lib, ... }: + +with lib; + +{ + options.khal = { + type = mkOption { + type = types.nullOr (types.enum [ "calendar" "discover" ]); + default = null; + description = '' + Either a single calendar (calendar which is the default) or a directory with multiple calendars (discover). + ''; + }; + + glob = mkOption { + type = types.str; + default = "*"; + description = '' + The glob expansion to be searched for events or birthdays when + 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.nix b/third_party/home-manager/modules/programs/khal.nix new file mode 100644 index 0000000000..56a7d389f8 --- /dev/null +++ b/third_party/home-manager/modules/programs/khal.nix @@ -0,0 +1,177 @@ +# khal config loader is sensitive to leading space ! +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.khal; + + 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); + + khalAccounts = khalCalendarAccounts // khalContactAccounts; + + primaryAccount = findSingle (a: a.primary) null null + (mapAttrsToList (n: v: v // { name = n; }) khalAccounts); + + definedAttrs = filterAttrs (_: v: !isNull v); + + toKeyValueIfDefined = attrs: generators.toKeyValue { } (definedAttrs attrs); + + genCalendarStr = name: value: + concatStringsSep "\n" ([ + "[[${name}]]" + "path = ${ + value.local.path + "/" + + (optionalString (value.khal.type == "discover") value.khal.glob) + }" + ] ++ optional (value.khal.readOnly) "readonly = True" ++ [ + (toKeyValueIfDefined (getAttrs [ "type" "color" "priority" ] value.khal)) + ] ++ [ "\n" ]); + + localeFormatOptions = let + T = lib.types; + suffix = '' + Format strings are for Python `strftime`, similarly to + {manpage}`strftime(3)`. + ''; + in { + dateformat = mkOption { + type = T.str; + default = "%x"; + description = '' + khal will display and understand all dates in this format. + + ${suffix} + ''; + }; + + timeformat = mkOption { + type = T.str; + default = "%X"; + description = '' + khal will display and understand all times in this format. + + ${suffix} + ''; + }; + + datetimeformat = mkOption { + type = T.str; + default = "%c"; + description = '' + khal will display and understand all datetimes in this format. + + ${suffix} + ''; + }; + + longdateformat = mkOption { + type = T.str; + default = "%x"; + description = '' + khal will display and understand all dates in this format. + It should contain a year (e.g. `%Y`). + + ${suffix} + ''; + }; + + longdatetimeformat = mkOption { + type = T.str; + default = "%c"; + description = '' + khal will display and understand all datetimes in this format. + It should contain a year (e.g. `%Y`). + + ${suffix} + ''; + }; + }; + + localeOptions = let T = lib.types; + in localeFormatOptions // { + unicode_symbols = mkOption { + type = T.bool; + default = true; + description = '' + By default khal uses some Unicode symbols (as in "non-ASCII") as + indicators for things like repeating events. + If your font, encoding etc. does not support those symbols, set this + to false (this will enable ASCII-based replacements). + ''; + }; + + default_timezone = mkOption { + type = T.nullOr T.str; + default = null; + description = '' + Default for new events or if khal does not understand the timezone + in an ical file. + If `null`, the timezone of your computer will be used. + ''; + }; + + local_timezone = mkOption { + type = T.nullOr T.str; + default = null; + description = '' + khal will show all times in this timezone. + If `null`, the timezone of your computer will be used. + ''; + }; + + firstweekday = mkOption { + type = T.ints.between 0 6; + default = 0; + description = '' + The first day of the week, where Monday is 0 and Sunday is 6. + ''; + }; + + weeknumbers = mkOption { + type = T.enum [ "off" "left" "right" ]; + default = "off"; + description = '' + Enable week numbers in calendar and interactive (ikhal) mode. + As those are ISO week numbers, they only work properly if + {option}`firstweekday` is set to 0. + ''; + }; + }; + +in { + options.programs.khal = { + enable = mkEnableOption "khal, a CLI calendar application"; + locale = mkOption { + type = lib.types.submodule { options = localeOptions; }; + description = '' + khal locale settings. + ''; + default = { }; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.khal ]; + + xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ] + ++ mapAttrsToList genCalendarStr khalAccounts ++ [ + (generators.toINI { } { + locale = definedAttrs (cfg.locale // { _module = null; }); + + default = optionalAttrs (!isNull primaryAccount) { + highlight_event_days = true; + default_calendar = if isNull primaryAccount.primaryCollection then + primaryAccount.name + else + primaryAccount.primaryCollection; + }; + }) + ]); + }; +} diff --git a/third_party/home-manager/modules/programs/kitty.nix b/third_party/home-manager/modules/programs/kitty.nix index 1a6258a3d3..e010ba09f1 100644 --- a/third_party/home-manager/modules/programs/kitty.nix +++ b/third_party/home-manager/modules/programs/kitty.nix @@ -26,6 +26,33 @@ let toKittyEnv = generators.toKeyValue { mkKeyValue = name: value: "env ${name}=${value}"; }; + shellIntegrationInit = { + bash = '' + if test -n "$KITTY_INSTALLATION_DIR"; then + source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash" + fi + ''; + fish = '' + if set -q KITTY_INSTALLATION_DIR + 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 + autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration + kitty-integration + unfunction kitty-integration + fi + ''; + }; + + shellIntegrationDefaultOpt = { + default = cfg.shellIntegration.mode != "disabled"; + defaultText = literalExpression '' + config.programs.kitty.shellIntegration.mode != "disabled" + ''; + }; in { options.programs.kitty = { enable = mkEnableOption "Kitty terminal emulator"; @@ -64,8 +91,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/kitty/kitty.conf. See - + {file}`$XDG_CONFIG_HOME/kitty/kitty.conf`. See + for the documentation. ''; }; @@ -75,8 +102,8 @@ in { default = null; description = '' Apply a Kitty color theme. This option takes the friendly name of - any theme given by the command kitty +kitten themes. - See + any theme given by the command {command}`kitty +kitten themes`. + See for more details. ''; example = "Space Gray Eighties"; @@ -111,6 +138,30 @@ in { ''; }; + shellIntegration = { + mode = mkOption { + type = types.str; + default = "enabled"; + example = "no-cursor"; + description = '' + Set the mode of the shell integration. This accepts the same options + as the `shell_integration` option of Kitty. Note that + `no-rc` is always implied. See + + for more details. + ''; + }; + + enableBashIntegration = mkEnableOption "Kitty Bash integration" + // shellIntegrationDefaultOpt; + + enableFishIntegration = mkEnableOption "Kitty fish integration" + // shellIntegrationDefaultOpt; + + enableZshIntegration = mkEnableOption "Kitty Z Shell integration" + // shellIntegrationDefaultOpt; + }; + extraConfig = mkOption { default = ""; type = types.lines; @@ -134,11 +185,20 @@ in { '') (optionalString (cfg.theme != null) '' - include ${pkgs.kitty-themes}/${ - (head (filter (x: x.name == cfg.theme) (builtins.fromJSON - (builtins.readFile "${pkgs.kitty-themes}/themes.json")))).file + include ${pkgs.kitty-themes}/share/kitty-themes/${ + let + matching = filter (x: x.name == cfg.theme) (builtins.fromJSON + (builtins.readFile + "${pkgs.kitty-themes}/share/kitty-themes/themes.json")); + in throwIf (length matching == 0) + "kitty-themes does not contain a theme named ${cfg.theme}" + (head matching).file } '') + '' + # Shell integration is sourced and configured manually + shell_integration no-rc ${cfg.shellIntegration.mode} + '' (toKittyConfig cfg.settings) (toKittyKeybindings cfg.keybindings) (toKittyEnv cfg.environment) @@ -154,5 +214,14 @@ in { (cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) { text = concatStringsSep " " cfg.darwinLaunchOptions; }; + + programs.bash.initExtra = + mkIf cfg.shellIntegration.enableBashIntegration shellIntegrationInit.bash; + + programs.fish.interactiveShellInit = + mkIf cfg.shellIntegration.enableFishIntegration shellIntegrationInit.fish; + + programs.zsh.initExtra = + mkIf cfg.shellIntegration.enableZshIntegration shellIntegrationInit.zsh; }; } diff --git a/third_party/home-manager/modules/programs/kodi.nix b/third_party/home-manager/modules/programs/kodi.nix index 0441eebcea..f6776b9e44 100644 --- a/third_party/home-manager/modules/programs/kodi.nix +++ b/third_party/home-manager/modules/programs/kodi.nix @@ -82,7 +82,7 @@ let attrsetToXml = attrs: name: stylesheet: pkgs.runCommand name { # Package splicing for libxslt does not work correctly leading to errors - # when cross-compiling. Use the version from buildPackages explicitely to + # when cross-compiling. Use the version from buildPackages explicitly to # fix this. nativeBuildInputs = [ pkgs.buildPackages.libxslt.bin ]; xml = builtins.toXML attrs; @@ -134,7 +134,7 @@ in { example = literalExpression "pkgs.kodi.withPackages (exts: [ exts.pvr-iptvsimple ])"; description = '' - The kodi package to use. + The `kodi` package to use. Can be used to specify extensions. ''; }; @@ -160,13 +160,13 @@ in { { videolibrary.showemptytvshows = "true"; } ''; description = '' - Configuration to write to the advancedsettings.xml + Configuration to write to the `advancedsettings.xml` file in kodis userdata directory. Settings specified here will be immutable from inside kodi and be hidden from the GUI settings dialog. - - See as + + See as reference for how settings need to be specified. - + The innermost attributes must be of type str. ''; }; @@ -191,16 +191,16 @@ in { } ''; description = '' - Contents to populate the file sources.xml in kodis + Contents to populate the file `sources.xml` in kodis userdata directory. - - See as + + See as reference for how sources need to be specified. - + Kodi will still show the dialogs to modify sources in the GUI and they appear to be mutable. This however is not the case and the sources will stay as specified via Home Manager. - + The innermost attributes must be of type str. ''; }; @@ -214,7 +214,7 @@ in { description = '' Attribute set with the plugin namespace as toplevel key and the plugins settings as lower level key/value pairs. - + Kodi will still show the settings of plugins configured via this mechanism in the GUI and they appear to be mutable. This however is not the case and the settings will stay as specified via Home Manager. diff --git a/third_party/home-manager/modules/programs/lazygit.nix b/third_party/home-manager/modules/programs/lazygit.nix index 84dab379cc..0102a22cc6 100644 --- a/third_party/home-manager/modules/programs/lazygit.nix +++ b/third_party/home-manager/modules/programs/lazygit.nix @@ -34,9 +34,11 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/lazygit/config.yml on Linux - or ~/Library/Application Support/lazygit/config.yml on Darwin. See - + {file}`$XDG_CONFIG_HOME/lazygit/config.yml` + on Linux or on Darwin if [](#opt-xdg.enable) is set, otherwise + {file}`~/Library/Application Support/lazygit/config.yml`. + See + for supported values. ''; }; @@ -46,12 +48,12 @@ in { home.packages = [ cfg.package ]; home.file."Library/Application Support/lazygit/config.yml" = - mkIf (cfg.settings != { } && isDarwin) { + mkIf (cfg.settings != { } && (isDarwin && !config.xdg.enable)) { source = yamlFormat.generate "lazygit-config" cfg.settings; }; xdg.configFile."lazygit/config.yml" = - mkIf (cfg.settings != { } && !isDarwin) { + mkIf (cfg.settings != { } && !(isDarwin && !config.xdg.enable)) { source = yamlFormat.generate "lazygit-config" cfg.settings; }; }; diff --git a/third_party/home-manager/modules/programs/ledger.nix b/third_party/home-manager/modules/programs/ledger.nix index c51ed7d12f..1b9178d15c 100644 --- a/third_party/home-manager/modules/programs/ledger.nix +++ b/third_party/home-manager/modules/programs/ledger.nix @@ -6,14 +6,43 @@ let cfg = config.programs.ledger; + cfgText = generators.toKeyValue { + mkKeyValue = key: value: + if isBool value then + optionalString value "--${key}" + else + "--${key} ${toString value}"; + listsAsDuplicateKeys = true; + } cfg.settings; + in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.ledger = { enable = mkEnableOption "ledger, a double-entry accounting system"; package = mkPackageOption pkgs "ledger" { }; + settings = mkOption { + type = with types; attrsOf (oneOf [ bool int str (listOf str) ]); + default = { }; + example = { + sort = "date"; + date-format = "%Y-%m-%d"; + strict = true; + file = [ + "~/finances/journal.ledger" + "~/finances/assets.ledger" + "~/finances/income.ledger" + ]; + }; + description = '' + Configuration written to {file}`$XDG_CONFIG_HOME/ledger/ledgerrc`. + See + for explanation about possible values. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -23,9 +52,8 @@ in { --date-format %Y-%m-%d ''; description = '' - Configuration written to $XDG_CONFIG_HOME/ledger/ledgerrc. - See - for explanation about possible values. + Extra configuration to add to + {file}`$XDG_CONFIG_HOME/ledger/ledgerrc`. ''; }; }; @@ -34,6 +62,8 @@ in { home.packages = [ cfg.package ]; xdg.configFile."ledger/ledgerrc" = - mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; }; + mkIf (cfg.settings != { } || cfg.extraConfig != "") { + text = cfgText + cfg.extraConfig; + }; }; } diff --git a/third_party/home-manager/modules/programs/less.nix b/third_party/home-manager/modules/programs/less.nix index 9e6e672012..7249f9bb70 100644 --- a/third_party/home-manager/modules/programs/less.nix +++ b/third_party/home-manager/modules/programs/less.nix @@ -18,8 +18,8 @@ in { t forw-line ''; description = '' - Extra configuration for less written to - $XDG_CONFIG_HOME/lesskey. + Extra configuration for {command}`less` written to + {file}`$XDG_CONFIG_HOME/lesskey`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/lf.nix b/third_party/home-manager/modules/programs/lf.nix index 8f0a07cb8b..995b926f4e 100644 --- a/third_party/home-manager/modules/programs/lf.nix +++ b/third_party/home-manager/modules/programs/lf.nix @@ -2,55 +2,7 @@ with lib; -let - cfg = config.programs.lf; - - knownSettings = { - anchorfind = types.bool; - color256 = types.bool; - dircounts = types.bool; - dirfirst = types.bool; - drawbox = types.bool; - globsearch = types.bool; - icons = types.bool; - hidden = types.bool; - ignorecase = types.bool; - ignoredia = types.bool; - incsearch = types.bool; - preview = types.bool; - reverse = types.bool; - smartcase = types.bool; - smartdia = types.bool; - wrapscan = types.bool; - wrapscroll = types.bool; - number = types.bool; - relativenumber = types.bool; - findlen = types.int; - period = types.int; - scrolloff = types.int; - tabstop = types.int; - errorfmt = types.str; - filesep = types.str; - ifs = types.str; - promptfmt = types.str; - shell = types.str; - sortby = types.str; - timefmt = types.str; - ratios = types.str; - info = types.str; - shellopts = types.str; - }; - - lfSettingsType = types.submodule { - options = let - opt = name: type: - mkOption { - type = types.nullOr type; - default = null; - visible = false; - }; - in mapAttrs opt knownSettings; - }; +let cfg = config.programs.lf; in { meta.maintainers = [ hm.maintainers.owm111 ]; @@ -68,31 +20,19 @@ in { }; settings = mkOption { - type = lfSettingsType; + type = with types; + attrsOf (oneOf [ str int (listOf (either str int)) bool ]); default = { }; example = { tabstop = 4; number = true; - ratios = "1:1:2"; + ratios = [ 1 1 2 ]; }; description = '' - An attribute set of lf settings. The attribute names and corresponding - values must be among the following supported options. - - - ${concatStringsSep "\n" (mapAttrsToList (n: v: '' - - ${n} - ${v.description} - - '') knownSettings)} - - - See the lf documentation for detailed descriptions of these options. - Note, use previewer to set lf's - previewer option, and - extraConfig for any other option not listed above. - All string options are quoted with double quotes. + An attribute set of lf settings. See the lf documentation for + detailed descriptions of these options. Prefer + {option}`programs.lf.previewer.*` for setting lf's {var}`previewer` + option. All string options are quoted with double quotes. ''; }; @@ -152,7 +92,7 @@ in { ''; description = '' Script or executable to use to preview files. Sets lf's - previewer option. + {var}`previewer` option. ''; }; @@ -161,7 +101,7 @@ in { default = null; example = "i"; description = '' - Key to bind to the script at previewer.source and + Key to bind to the script at {var}`previewer.source` and pipe through less. Setting to null will not bind any key. ''; }; @@ -185,12 +125,14 @@ in { optionalString (v != null) "set ${ if isBool v then "${optionalString (!v) "no"}${k}" + else if isList v then + ''${k} "${concatStringsSep ":" (map (w: toString w) v)}"'' else "${k} ${if isInt v then toString v else ''"${v}"''}" }"; - settingsStr = concatStringsSep "\n" (remove "" (mapAttrsToList fmtSetting - (builtins.intersectAttrs knownSettings cfg.settings))); + settingsStr = concatStringsSep "\n" + (remove "" (mapAttrsToList fmtSetting cfg.settings)); fmtCmdMap = before: k: v: "${before} ${k}${optionalString (v != null && v != "") " ${v}"}"; diff --git a/third_party/home-manager/modules/programs/librewolf.nix b/third_party/home-manager/modules/programs/librewolf.nix index 99613d46b8..d8b6dfabba 100644 --- a/third_party/home-manager/modules/programs/librewolf.nix +++ b/third_party/home-manager/modules/programs/librewolf.nix @@ -39,7 +39,7 @@ in { ''; description = '' Attribute set of LibreWolf settings and overrides. Refer to - + for details on supported values. ''; }; diff --git a/third_party/home-manager/modules/programs/lieer.nix b/third_party/home-manager/modules/programs/lieer.nix index 15fda1ae7e..80993f90a2 100644 --- a/third_party/home-manager/modules/programs/lieer.nix +++ b/third_party/home-manager/modules/programs/lieer.nix @@ -56,9 +56,9 @@ let description = '' Work around a Gmail API quirk where an empty change history is sometimes returned. - + See this - GitHub issue + [GitHub issue](https://github.com/gauteh/lieer/issues/120) for more details. ''; }; @@ -128,13 +128,10 @@ let default = "*:0/5"; description = '' How often to synchronize the account. - + This value is passed to the systemd timer configuration as the onCalendar option. See - - systemd.time - 7 - + {manpage}`systemd.time(7)` for more information about the format. ''; }; @@ -148,8 +145,8 @@ let default = true; description = '' Warn if Notmuch is not also enabled for this account. - - This can safely be disabled if notmuch init + + This can safely be disabled if {command}`notmuch init` has been used to configure this account outside of Home Manager. ''; @@ -162,10 +159,10 @@ let }; default = { }; description = '' - Settings which are applied to .gmailieer.json + Settings which are applied to {file}`.gmailieer.json` for the account. - - See the lieer manual + + See the [lieer manual](https://github.com/gauteh/lieer/) for documentation of settings not explicitly covered by this module. ''; }; diff --git a/third_party/home-manager/modules/programs/lsd.nix b/third_party/home-manager/modules/programs/lsd.nix index 0b54abe3de..59a51a12a2 100644 --- a/third_party/home-manager/modules/programs/lsd.nix +++ b/third_party/home-manager/modules/programs/lsd.nix @@ -11,13 +11,14 @@ let aliases = { ls = "${pkgs.lsd}/bin/lsd"; ll = "${pkgs.lsd}/bin/lsd -l"; - la = "${pkgs.lsd}/bin/lsd -a"; + la = "${pkgs.lsd}/bin/lsd -A"; lt = "${pkgs.lsd}/bin/lsd --tree"; - lla = "${pkgs.lsd}/bin/lsd -la"; + lla = "${pkgs.lsd}/bin/lsd -lA"; + llt = "${pkgs.lsd}/bin/lsd -l --tree"; }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.lsd = { enable = mkEnableOption "lsd"; @@ -39,8 +40,8 @@ in { }; description = '' Configuration written to - $XDG_CONFIG_HOME/lsd/config.yaml. See - + {file}`$XDG_CONFIG_HOME/lsd/config.yaml`. See + for supported values. ''; }; diff --git a/third_party/home-manager/modules/programs/man.nix b/third_party/home-manager/modules/programs/man.nix index 69ae5cac79..2de4bcc617 100644 --- a/third_party/home-manager/modules/programs/man.nix +++ b/third_party/home-manager/modules/programs/man.nix @@ -10,9 +10,9 @@ in { type = types.bool; default = true; description = '' - Whether to enable manual pages and the man + Whether to enable manual pages and the {command}`man` command. This also includes "man" outputs of all - home.packages. + `home.packages`. ''; }; @@ -28,15 +28,9 @@ in { default = false; description = '' Whether to generate the manual page index caches using - - mandb - 8 - . This allows searching for a page or - keyword using utilities like - apropos - 1 - . - + {manpage}`mandb(8)`. This allows searching for a page or + keyword using utilities like {manpage}`apropos(1)`. + This feature is disabled by default because it slows down building. If you don't mind waiting a few more seconds when Home Manager builds a new generation, you may safely enable @@ -46,12 +40,12 @@ in { }; }; - config = mkIf config.programs.man.enable { + config = mkIf cfg.enable { home.packages = [ cfg.package ]; home.extraOutputsToInstall = [ "man" ]; # This is mostly copy/pasted/adapted from NixOS' documentation.nix. - home.file = mkIf config.programs.man.generateCaches { + home.file = mkIf cfg.generateCaches { ".manpath".text = let # Generate a directory containing installed packages' manpages. manualPages = pkgs.buildEnv { @@ -63,13 +57,15 @@ in { }; # Generate a database of all manpages in ${manualPages}. - manualCache = pkgs.runCommandLocal "man-cache" { } '' + manualCache = pkgs.runCommandLocal "man-cache" { + nativeBuildInputs = [ cfg.package ]; + } '' # Generate a temporary man.conf so mandb knows where to # write cache files. echo "MANDB_MAP ${manualPages}/share/man $out" > man.conf # Run mandb to generate cache files: - ${cfg.package}/bin/mandb -C man.conf --no-straycats --create \ + mandb -C man.conf --no-straycats --create \ ${manualPages}/share/man ''; in '' diff --git a/third_party/home-manager/modules/programs/mangohud.nix b/third_party/home-manager/modules/programs/mangohud.nix index f095e0736b..f0e35a3a3c 100644 --- a/third_party/home-manager/modules/programs/mangohud.nix +++ b/third_party/home-manager/modules/programs/mangohud.nix @@ -55,8 +55,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/MangoHud/MangoHud.conf. See - + {file}`$XDG_CONFIG_HOME/MangoHud/MangoHud.conf`. See + for the default configuration. ''; }; @@ -74,8 +74,8 @@ in { description = '' Sets MangoHud settings per application. Configuration written to - $XDG_CONFIG_HOME/MangoHud/{application_name}.conf. See - + {file}`$XDG_CONFIG_HOME/MangoHud/{application_name}.conf`. See + for the default configuration. ''; }; diff --git a/third_party/home-manager/modules/programs/matplotlib.nix b/third_party/home-manager/modules/programs/matplotlib.nix index 1edb9b1256..cde6f39fae 100644 --- a/third_party/home-manager/modules/programs/matplotlib.nix +++ b/third_party/home-manager/modules/programs/matplotlib.nix @@ -25,7 +25,7 @@ in { default = { }; type = types.attrsOf types.anything; description = '' - Add terms to the matplotlibrc file to + Add terms to the {file}`matplotlibrc` file to control the default matplotlib behavior. ''; example = literalExpression '' @@ -46,7 +46,7 @@ in { default = ""; description = '' Additional commands for matplotlib that will be added to the - matplotlibrc file. + {file}`matplotlibrc` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/mbsync-accounts.nix b/third_party/home-manager/modules/programs/mbsync-accounts.nix index af368b9dfc..abe5a8ca8e 100644 --- a/third_party/home-manager/modules/programs/mbsync-accounts.nix +++ b/third_party/home-manager/modules/programs/mbsync-accounts.nix @@ -27,7 +27,7 @@ let List of channels that should be grouped together into this group. When performing a synchronization, the groups are synchronized, rather than the individual channels. - + Using these channels and then grouping them together allows for you to define the maildir hierarchy as you see fit. ''; @@ -45,7 +45,7 @@ let description = '' The unique name for THIS channel in THIS group. The group will refer to this channel by this name. - + In addition, you can manually sync just this channel by specifying this name to mbsync on the command line. ''; @@ -57,12 +57,12 @@ let example = "[Gmail]/Sent Mail"; description = '' IMAP4 patterns for which mailboxes on the remote mail server to sync. - If Patterns are specified, farPattern + If `Patterns` are specified, `farPattern` is interpreted as a prefix which is not matched against the patterns, and is not affected by mailbox list overrides. - + If this is left as the default, then mbsync will default to the pattern - INBOX. + `INBOX`. ''; }; @@ -74,9 +74,9 @@ let Name for where mail coming from the remote (far) mail server will end up locally. The mailbox specified by the far pattern will be placed in this directory. - + If this is left as the default, then mbsync will default to the pattern - INBOX. + `INBOX`. ''; }; @@ -85,8 +85,8 @@ let default = [ ]; example = [ "INBOX" ]; description = '' - Instead of synchronizing just the mailboxes that - match the farPattern, use it as a prefix which is + Instead of synchronizing *just* the mailboxes that + match the `farPattern`, use it as a prefix which is not matched against the patterns, and is not affected by mailbox list overrides. ''; @@ -104,7 +104,7 @@ let } ''; description = '' - Extra configuration lines to add to THIS channel's + Extra configuration lines to add to *THIS* channel's configuration. ''; }; @@ -122,7 +122,7 @@ in { description = '' If set, flattens the hierarchy within the maildir by substituting the canonical hierarchy delimiter - / with this value. + `/` with this value. ''; }; @@ -132,7 +132,7 @@ in { example = "Maildir++"; description = '' The on-disk folder naming style. This option has no - effect when is used. + effect when {option}`flatten` is used. ''; }; @@ -183,8 +183,8 @@ in { Some email providers (Gmail) have a different directory hierarchy for synchronized email messages. Namely, when using mbsync without specifying a set of channels into a group, all synchronized directories end up beneath - the [Gmail]/ directory. - + the `[Gmail]/` directory. + This option allows you to specify a group, and subsequently channels that will allow you to sync your mail into an arbitrary hierarchy. ''; diff --git a/third_party/home-manager/modules/programs/mbsync.nix b/third_party/home-manager/modules/programs/mbsync.nix index 373828a0b2..d43f645555 100644 --- a/third_party/home-manager/modules/programs/mbsync.nix +++ b/third_party/home-manager/modules/programs/mbsync.nix @@ -174,7 +174,7 @@ let flatten (optionals (group.channels != { }) ([ "Group ${group.name}" ] ++ (genChannelStrings group.name group.channels))); # Given set of groups, generates list of strings, where each string is one - # of the groups and its consituent channels. + # of the groups and its constituent channels. genGroupsStrings = mapAttrsToList (name: info: concatStringsSep "\n" (genGroupChannelString groups.${name})) groups; # Join all non-empty groups. diff --git a/third_party/home-manager/modules/programs/mcfly.nix b/third_party/home-manager/modules/programs/mcfly.nix index 8d4bfd3c0c..75f6f2b316 100644 --- a/third_party/home-manager/modules/programs/mcfly.nix +++ b/third_party/home-manager/modules/programs/mcfly.nix @@ -6,7 +6,7 @@ let cfg = config.programs.mcfly; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; imports = [ (mkChangedOptionModule # \ diff --git a/third_party/home-manager/modules/programs/micro.nix b/third_party/home-manager/modules/programs/micro.nix index f2f8b6bf76..0093e25f0a 100644 --- a/third_party/home-manager/modules/programs/micro.nix +++ b/third_party/home-manager/modules/programs/micro.nix @@ -26,8 +26,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/micro/settings.json. See - + {file}`$XDG_CONFIG_HOME/micro/settings.json`. See + for supported values. ''; }; diff --git a/third_party/home-manager/modules/programs/mpv.nix b/third_party/home-manager/modules/programs/mpv.nix index 47413490d3..eb9c9c4a78 100644 --- a/third_party/home-manager/modules/programs/mpv.nix +++ b/third_party/home-manager/modules/programs/mpv.nix @@ -34,6 +34,12 @@ let listsAsDuplicateKeys = true; }; + renderScriptOptions = generators.toKeyValue { + mkKeyValue = + generators.mkKeyValueDefault { mkValueString = renderOption; } "="; + listsAsDuplicateKeys = true; + }; + renderProfiles = generators.toINI { mkKeyValue = generators.mkKeyValueDefault { mkValueString = renderOptionValue; } "="; @@ -85,14 +91,29 @@ in { ''; }; + scriptOpts = mkOption { + description = '' + Script options added to + {file}`$XDG_CONFIG_HOME/mpv/script-opts/`. See + {manpage}`mpv(1)` + for the full list of options of builtin scripts. + ''; + type = types.attrsOf mpvOptions; + default = { }; + example = { + osc = { + scalewindowed = 2.0; + vidscale = false; + visibility = "always"; + }; + }; + }; + config = mkOption { description = '' Configuration written to - $XDG_CONFIG_HOME/mpv/mpv.conf. See - - mpv - 1 - + {file}`$XDG_CONFIG_HOME/mpv/mpv.conf`. See + {manpage}`mpv(1)` for the full list of options. ''; type = mpvOptions; @@ -110,8 +131,8 @@ in { profiles = mkOption { description = '' Sub-configuration options for specific profiles written to - $XDG_CONFIG_HOME/mpv/mpv.conf. See - for more information. + {file}`$XDG_CONFIG_HOME/mpv/mpv.conf`. See + {option}`programs.mpv.config` for more information. ''; type = mpvProfiles; default = { }; @@ -131,7 +152,7 @@ in { defaultProfiles = mkOption { description = '' Profiles to be applied by default. Options set by them are overridden - by options set in . + by options set in [](#opt-programs.mpv.config). ''; type = mpvDefaultProfiles; default = [ ]; @@ -141,11 +162,8 @@ in { bindings = mkOption { description = '' Input configuration written to - $XDG_CONFIG_HOME/mpv/input.conf. See - - mpv - 1 - + {file}`$XDG_CONFIG_HOME/mpv/input.conf`. See + {manpage}`mpv(1)` for the full list of options. ''; type = mpvBindings; @@ -184,7 +202,13 @@ in { (mkIf (cfg.bindings != { }) { xdg.configFile."mpv/input.conf".text = renderBindings cfg.bindings; }) + { + xdg.configFile = mapAttrs' (name: value: + nameValuePair "mpv/script-opts/${name}.conf" { + text = renderScriptOptions value; + }) cfg.scriptOpts; + } ]); - meta.maintainers = with maintainers; [ tadeokondrak thiagokokada ]; + meta.maintainers = with maintainers; [ tadeokondrak thiagokokada chuangzhu ]; } diff --git a/third_party/home-manager/modules/programs/mr.nix b/third_party/home-manager/modules/programs/mr.nix new file mode 100644 index 0000000000..5071897697 --- /dev/null +++ b/third_party/home-manager/modules/programs/mr.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.mr; + + listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { }); + + iniFormat = pkgs.formats.ini { inherit listToValue; }; + +in { + meta.maintainers = [ hm.maintainers.nilp0inter ]; + + options.programs.mr = { + enable = mkEnableOption + "mr, a tool to manage all your version control repositories"; + + package = mkPackageOption pkgs "mr" { }; + + settings = mkOption { + type = iniFormat.type; + default = { }; + description = '' + Configuration written to {file}`$HOME/.mrconfig` + See + for an example configuration. + ''; + example = literalExpression '' + { + foo = { + checkout = "git clone git@github.com:joeyh/foo.git"; + update = "git pull --rebase"; + }; + ".local/share/password-store" = { + checkout = "git clone git@github.com:myuser/password-store.git"; + }; + } + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + home.file.".mrconfig".source = iniFormat.generate ".mrconfig" cfg.settings; + }; +} + diff --git a/third_party/home-manager/modules/programs/msmtp-accounts.nix b/third_party/home-manager/modules/programs/msmtp-accounts.nix index 894cef5174..5e1158bf5a 100644 --- a/third_party/home-manager/modules/programs/msmtp-accounts.nix +++ b/third_party/home-manager/modules/programs/msmtp-accounts.nix @@ -9,15 +9,15 @@ with lib; default = false; description = '' Whether to enable msmtp. - + If enabled then it is possible to use the - --account command line + `--account` command line option to send a message for a given account using the - msmtp or msmtpq tool. - For example, msmtp --account=private would + {command}`msmtp` or {command}`msmtpq` tool. + For example, {command}`msmtp --account=private` would send using the account defined in - . If the - --account option is not + {option}`accounts.email.accounts.private`. If the + `--account` option is not given then the primary account will be used. ''; }; @@ -30,7 +30,7 @@ with lib; description = '' Fingerprint of a trusted TLS certificate. The fingerprint can be obtained by executing - msmtp --serverinfo --tls --tls-certcheck=off. + {command}`msmtp --serverinfo --tls --tls-certcheck=off`. ''; }; @@ -39,8 +39,8 @@ with lib; default = { }; example = { auth = "login"; }; description = '' - Extra configuration options to add to ~/.msmtprc. - See for + Extra configuration options to add to {file}`~/.msmtprc`. + See for examples. ''; }; diff --git a/third_party/home-manager/modules/programs/msmtp.nix b/third_party/home-manager/modules/programs/msmtp.nix index 04e7be8e59..2a4d6b788b 100644 --- a/third_party/home-manager/modules/programs/msmtp.nix +++ b/third_party/home-manager/modules/programs/msmtp.nix @@ -55,13 +55,13 @@ in { type = types.lines; default = ""; description = '' - Extra configuration lines to add to ~/.msmtprc. - See for examples. - + Extra configuration lines to add to {file}`~/.msmtprc`. + See for examples. + Note, if running msmtp fails with the error message "account default was already defined" then you probably have an account command here. Account commands should be placed in - . + [](#opt-accounts.email.accounts._name_.msmtp.extraConfig). ''; }; @@ -69,8 +69,8 @@ in { type = types.lines; default = ""; description = '' - Extra configuration lines to add to the end of ~/.msmtprc. - See for examples. + Extra configuration lines to add to the end of {file}`~/.msmtprc`. + See for examples. ''; }; }; diff --git a/third_party/home-manager/modules/programs/mu.nix b/third_party/home-manager/modules/programs/mu.nix index 835be361af..04b0558e39 100644 --- a/third_party/home-manager/modules/programs/mu.nix +++ b/third_party/home-manager/modules/programs/mu.nix @@ -29,6 +29,8 @@ in { programs.mu = { enable = mkEnableOption "mu, a maildir indexer and searcher"; + package = mkPackageOption pkgs "mu" { }; + # No options/config file present for mu, and program author will not be # adding one soon. See https://github.com/djcb/mu/issues/882 for more # information about this. @@ -42,7 +44,7 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.mu ]; + home.packages = [ cfg.package ]; home.activation.runMuInit = let maildirOption = genCmdMaildir config.accounts.email.maildirBasePath; @@ -52,7 +54,9 @@ 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 ${pkgs.mu}/bin/mu init ${maildirOption} ${myAddresses} $VERBOSE_ARG; + $DRY_RUN_CMD ${ + getExe cfg.package + } init ${maildirOption} ${myAddresses} $VERBOSE_ARG; fi ''; }; diff --git a/third_party/home-manager/modules/programs/mujmap.nix b/third_party/home-manager/modules/programs/mujmap.nix index 9d290fefb4..a0e74ab044 100644 --- a/third_party/home-manager/modules/programs/mujmap.nix +++ b/third_party/home-manager/modules/programs/mujmap.nix @@ -70,10 +70,10 @@ let default = "inbox"; description = '' Tag for notmuch to use for messages stored in the mailbox labeled with the - Inbox name attribute. - - If set to an empty string, this mailbox and its child - mailboxes are not synchronized with a tag. + `Inbox` name attribute. + + If set to an empty string, this mailbox *and its child + mailboxes* are not synchronized with a tag. ''; }; @@ -82,10 +82,10 @@ let default = "deleted"; description = '' Tag for notmuch to use for messages stored in the mailbox labeled with the - Trash name attribute. - - If set to an empty string, this mailbox and its child - mailboxes are not synchronized with a tag. + `Trash` name attribute. + + If set to an empty string, this mailbox *and its child + mailboxes* are not synchronized with a tag. ''; }; @@ -94,10 +94,10 @@ let default = "sent"; description = '' Tag for notmuch to use for messages stored in the mailbox labeled with the - Sent name attribute. - - If set to an empty string, this mailbox and its child - mailboxes are not synchronized with a tag. + `Sent` name attribute. + + If set to an empty string, this mailbox *and its child + mailboxes* are not synchronized with a tag. ''; }; @@ -106,11 +106,11 @@ let default = "spam"; description = '' Tag for notmuch to use for messages stored in the mailbox labeled with the - Junk name attribute and/or with the $Junk keyword, - except for messages with the $NotJunk keyword. - - If set to an empty string, this mailbox, its child - mailboxes, and these keywords are not synchronized with a tag. + `Junk` name attribute and/or with the `$Junk` keyword, + *except* for messages with the `$NotJunk` keyword. + + If set to an empty string, this mailbox, *its child + mailboxes*, and these keywords are not synchronized with a tag. ''; }; @@ -119,11 +119,11 @@ let default = "important"; description = '' Tag for notmuch to use for messages stored in the mailbox labeled with the - Important name attribute and/or with the $Important + `Important` name attribute and/or with the `$Important` keyword. - - If set to an empty string, this mailbox, its child - mailboxes, and these keywords are not synchronized with a tag. + + If set to an empty string, this mailbox, *its child + mailboxes*, and these keywords are not synchronized with a tag. ''; }; @@ -131,8 +131,8 @@ let type = types.str; default = "phishing"; description = '' - Tag for notmuch to use for the IANA $Phishing keyword. - + Tag for notmuch to use for the IANA `$Phishing` keyword. + If set to an empty string, this keyword is not synchronized with a tag. ''; }; @@ -145,9 +145,9 @@ let example = "alice@example.com"; description = '' Username for basic HTTP authentication. - - If null, defaults to - . + + If `null`, defaults to + [](#opt-accounts.email.accounts._name_.userName). ''; }; @@ -159,9 +159,9 @@ let description = '' Shell command which will print a password to stdout for basic HTTP authentication. - - If null, defaults to - . + + If `null`, defaults to + [](#opt-accounts.email.accounts._name_.passwordCommand). ''; }; @@ -171,13 +171,13 @@ let example = "example.com"; description = '' Fully qualified domain name of the JMAP service. - + mujmap looks up the JMAP SRV record for this host to determine the JMAP session URL. Mutually exclusive with - . - - If null, defaults to - . + [](#opt-accounts.email.accounts._name_.mujmap.settings.session_url). + + If `null`, defaults to + [](#opt-accounts.email.accounts._name_.jmap.host). ''; }; @@ -186,13 +186,13 @@ let default = null; example = "https://jmap.example.com/.well-known/jmap"; description = '' - Sesion URL to connect to. - + Session URL to connect to. + Mutually exclusive with - . - - If null, defaults to - . + [](#opt-accounts.email.accounts._name_.mujmap.settings.fqdn). + + If `null`, defaults to + [](#opt-accounts.email.accounts._name_.jmap.sessionUrl). ''; }; @@ -222,10 +222,10 @@ let default = { }; description = '' Tag configuration. - + Beware that there are quirks that require manual consideration if changing the values of these files; please see - + for more details. ''; }; @@ -239,8 +239,8 @@ let default = true; description = '' Warn if Notmuch is not also enabled for this account. - - This can safely be disabled if mujmap.toml is managed + + This can safely be disabled if {file}`mujmap.toml` is managed outside of Home Manager. ''; }; @@ -252,10 +252,10 @@ let }; default = { }; description = '' - Settings which are applied to mujmap.toml + Settings which are applied to {file}`mujmap.toml` for the account. - - See the mujmap project + + See the [mujmap project](https://github.com/elizagamedev/mujmap) for documentation of settings not explicitly covered by this module. ''; }; diff --git a/third_party/home-manager/modules/programs/navi.nix b/third_party/home-manager/modules/programs/navi.nix index f8d4803286..aff50b5c73 100644 --- a/third_party/home-manager/modules/programs/navi.nix +++ b/third_party/home-manager/modules/programs/navi.nix @@ -13,7 +13,7 @@ let config.xdg.configHome; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.navi = { enable = mkEnableOption "Navi"; @@ -39,10 +39,10 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/navi/config.yaml on Linux or - $HOME/Library/Application Support/navi/config.yaml + {file}`$XDG_CONFIG_HOME/navi/config.yaml` on Linux or + {file}`$HOME/Library/Application Support/navi/config.yaml` on Darwin. See - + for more information. ''; }; diff --git a/third_party/home-manager/modules/programs/ncmpcpp.nix b/third_party/home-manager/modules/programs/ncmpcpp.nix index 5f9bd36ebc..d0f2c47482 100644 --- a/third_party/home-manager/modules/programs/ncmpcpp.nix +++ b/third_party/home-manager/modules/programs/ncmpcpp.nix @@ -55,7 +55,7 @@ in { default = pkgs.ncmpcpp; defaultText = literalExpression "pkgs.ncmpcpp"; description = '' - Package providing the ncmpcpp command. + Package providing the `ncmpcpp` command. ''; example = literalExpression "pkgs.ncmpcpp.override { visualizerSupport = true; }"; @@ -75,10 +75,10 @@ in { null ''; description = '' - Value of the mpd_music_dir setting. On Linux platforms the - value of services.mpd.musicDirectory is used as the - default if services.mpd.enable is - true. + Value of the `mpd_music_dir` setting. On Linux platforms the + value of {var}`services.mpd.musicDirectory` is used as the + default if {var}`services.mpd.enable` is + `true`. ''; example = "~/music"; }; @@ -89,10 +89,7 @@ in { description = '' Attribute set from name of a setting to its value. For available options see - - ncmpcpp - 1 - . + {manpage}`ncmpcpp(1)`. ''; example = { ncmpcpp_directory = "~/.local/share/ncmpcpp"; }; }; diff --git a/third_party/home-manager/modules/programs/ncspot.nix b/third_party/home-manager/modules/programs/ncspot.nix index 3b6d401e61..c3fe37a2c5 100644 --- a/third_party/home-manager/modules/programs/ncspot.nix +++ b/third_party/home-manager/modules/programs/ncspot.nix @@ -9,7 +9,7 @@ let tomlFormat = pkgs.formats.toml { }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.ncspot = { enable = mkEnableOption "ncspot"; @@ -32,9 +32,9 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/ncspot/config.toml. - - See + {file}`$XDG_CONFIG_HOME/ncspot/config.toml`. + + See for the full list of options. ''; }; diff --git a/third_party/home-manager/modules/programs/ne.nix b/third_party/home-manager/modules/programs/ne.nix index 1596066bc9..3b03031242 100644 --- a/third_party/home-manager/modules/programs/ne.nix +++ b/third_party/home-manager/modules/programs/ne.nix @@ -41,8 +41,8 @@ in { default = ""; description = '' Default preferences for ne. - - Equivalent to programs.ne.automaticPreferences.".default". + + Equivalent to `programs.ne.automaticPreferences.".default"`. ''; }; diff --git a/third_party/home-manager/modules/programs/neomutt-accounts.nix b/third_party/home-manager/modules/programs/neomutt-accounts.nix index 94f97e914e..27e3b12290 100644 --- a/third_party/home-manager/modules/programs/neomutt-accounts.nix +++ b/third_party/home-manager/modules/programs/neomutt-accounts.nix @@ -21,6 +21,23 @@ let }; in { + options.notmuch.neomutt = { + enable = mkEnableOption "Notmuch support in NeoMutt" // { default = true; }; + + virtualMailboxes = mkOption { + type = types.listOf (types.submodule ./notmuch-virtual-mailbox.nix); + example = [{ + name = "My INBOX"; + query = "tag:inbox"; + }]; + default = [{ + name = "My INBOX"; + query = "tag:inbox"; + }]; + description = "List of virtual mailboxes using Notmuch queries"; + }; + }; + options.neomutt = { enable = mkEnableOption "NeoMutt"; diff --git a/third_party/home-manager/modules/programs/neomutt.nix b/third_party/home-manager/modules/programs/neomutt.nix index 75508303e2..65f3144f4a 100644 --- a/third_party/home-manager/modules/programs/neomutt.nix +++ b/third_party/home-manager/modules/programs/neomutt.nix @@ -3,7 +3,6 @@ with lib; let - cfg = config.programs.neomutt; neomuttAccounts = @@ -89,6 +88,14 @@ let }; }; + mkNotmuchVirtualboxes = virtualMailboxes: + "${concatStringsSep "\n" (map ({ name, query, limit, type }: + '' + virtual-mailboxes "${name}" "notmuch://?query=${lib.escapeURL query}${ + optionalString (limit != null) "&limit=${toString limit}" + }${optionalString (type != null) "&type=${type}"}"'') + virtualMailboxes)}"; + setOption = n: v: if v == null then "unset ${n}" else "set ${n}=${v}"; escape = replaceStrings [ "%" ] [ "%25" ]; @@ -188,10 +195,13 @@ let ''; notmuchSection = account: - with account; '' + let virtualMailboxes = account.notmuch.neomutt.virtualMailboxes; + in with account; '' # notmuch section set nm_default_uri = "notmuch://${config.accounts.email.maildirBasePath}" - virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" + ${optionalString + (notmuch.neomutt.enable && builtins.length virtualMailboxes > 0) + (mkNotmuchVirtualboxes virtualMailboxes)} ''; accountStr = account: @@ -234,7 +244,9 @@ let ${account.neomutt.extraConfig} ${signature} - '' + optionalString account.notmuch.enable (notmuchSection account); + '' + + optionalString (account.notmuch.enable && account.notmuch.neomutt.enable) + (notmuchSection account); in { options = { diff --git a/third_party/home-manager/modules/programs/neovim.nix b/third_party/home-manager/modules/programs/neovim.nix index c8edd22579..f5162f82d8 100644 --- a/third_party/home-manager/modules/programs/neovim.nix +++ b/third_party/home-manager/modules/programs/neovim.nix @@ -43,11 +43,12 @@ let default = { }; # passing actual "${xdg.configHome}/nvim" as basePath was a bit tricky # due to how fileType.target is implemented - type = fileType "xdg.configHome/nvim" "nvim"; + type = fileType "programs.neovim.plugins._.runtime" + "{var}`xdg.configHome/nvim`" "nvim"; example = literalExpression '' { "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; } ''; - description = lib.mdDoc '' + description = '' Set of files that have to be linked in nvim config folder. ''; }; @@ -102,7 +103,7 @@ in { type = types.bool; default = false; description = '' - Symlink vi to nvim binary. + Symlink {command}`vi` to {command}`nvim` binary. ''; }; @@ -110,7 +111,7 @@ in { type = types.bool; default = false; description = '' - Symlink vim to nvim binary. + Symlink {command}`vim` to {command}`nvim` binary. ''; }; @@ -118,7 +119,7 @@ in { type = types.bool; default = false; description = '' - Alias vimdiff to nvim -d. + Alias {command}`vimdiff` to {command}`nvim -d`. ''; }; @@ -126,7 +127,7 @@ in { type = types.bool; default = false; description = '' - Enable node provider. Set to true to + Enable node provider. Set to `true` to use Node plugins. ''; }; @@ -143,7 +144,7 @@ in { type = types.bool; default = true; description = '' - Enable Python 3 provider. Set to true to + Enable Python 3 provider. Set to `true` to use Python 3 plugins. ''; }; @@ -245,8 +246,8 @@ in { type = types.bool; default = false; description = '' - Whether to configure nvim as the default - editor using the EDITOR environment variable. + Whether to configure {command}`nvim` as the default + editor using the {env}`EDITOR` environment variable. ''; }; @@ -261,6 +262,17 @@ in { ''; }; + extraLuaConfig = mkOption { + type = types.lines; + default = ""; + example = '' + vim.opt.nobackup = true + ''; + description = '' + Custom lua lines. + ''; + }; + extraPackages = mkOption { type = with types; listOf package; default = [ ]; @@ -284,9 +296,7 @@ in { List of vim plugins to install optionally associated with configuration to be placed in init.vim. - - - This option is mutually exclusive with configure. + This option is mutually exclusive with {var}`configure`. ''; }; @@ -327,9 +337,9 @@ in { ''; description = '' Extra configuration lines to add to - $XDG_CONFIG_HOME/nvim/coc-settings.json + {file}`$XDG_CONFIG_HOME/nvim/coc-settings.json` See - + for options. ''; }; @@ -394,7 +404,8 @@ in { "vim.cmd [[source ${ pkgs.writeText "nvim-init-home-manager.vim" neovimConfig.neovimRcContent - }]]" + lib.optionalString hasLuaConfig + }]]" + config.programs.neovim.extraLuaConfig + + lib.optionalString hasLuaConfig config.programs.neovim.generatedConfigs.lua; in mkIf (luaRcContent != "") { text = luaRcContent; }; diff --git a/third_party/home-manager/modules/programs/nheko.nix b/third_party/home-manager/modules/programs/nheko.nix index 53f6701120..1bf1ae7062 100644 --- a/third_party/home-manager/modules/programs/nheko.nix +++ b/third_party/home-manager/modules/programs/nheko.nix @@ -50,16 +50,12 @@ in { description = '' Attribute set of Nheko preferences (converted to an INI file). - - For now, it is recommended to run nheko and sign-in before filling in the configuration settings in this module, as nheko writes the access - token to $XDG_CONFIG_HOME/nheko/nheko.conf the + token to {file}`$XDG_CONFIG_HOME/nheko/nheko.conf` the first time we sign in, and we need that data into these settings for the correct functionality of the application. - - This a temporary inconvenience, however, as nheko has plans to move the authentication stuff into the local database they currently use. Once this happens, this will no longer be an issue. diff --git a/third_party/home-manager/modules/programs/nix-index.nix b/third_party/home-manager/modules/programs/nix-index.nix index 2593d8b7cb..49f4b52e34 100644 --- a/third_party/home-manager/modules/programs/nix-index.nix +++ b/third_party/home-manager/modules/programs/nix-index.nix @@ -10,7 +10,7 @@ in { type = types.package; default = pkgs.nix-index; defaultText = literalExpression "pkgs.nix-index"; - description = "Package providing the nix-index tool."; + description = "Package providing the {command}`nix-index` tool."; }; enableBashIntegration = mkEnableOption "Bash integration" // { diff --git a/third_party/home-manager/modules/programs/nnn.nix b/third_party/home-manager/modules/programs/nnn.nix index a32ac723b8..4a81486fb5 100644 --- a/third_party/home-manager/modules/programs/nnn.nix +++ b/third_party/home-manager/modules/programs/nnn.nix @@ -58,7 +58,7 @@ in { example = literalExpression "pkgs.nnn.override ({ withNerdIcons = true; });"; description = '' - Package containing the nnn program. + Package containing the {command}`nnn` program. ''; }; diff --git a/third_party/home-manager/modules/programs/noti.nix b/third_party/home-manager/modules/programs/noti.nix index d8affdd53e..491d73b0e9 100644 --- a/third_party/home-manager/modules/programs/noti.nix +++ b/third_party/home-manager/modules/programs/noti.nix @@ -7,7 +7,7 @@ let cfg = config.programs.noti; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.noti = { enable = mkEnableOption "Noti"; @@ -17,13 +17,10 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/noti/noti.yaml. - + {file}`$XDG_CONFIG_HOME/noti/noti.yaml`. + See - - noti.yaml - 5 - . + {manpage}`noti.yaml(5)`. for the full list of options. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/notmuch-virtual-mailbox.nix b/third_party/home-manager/modules/programs/notmuch-virtual-mailbox.nix new file mode 100644 index 0000000000..72a7884215 --- /dev/null +++ b/third_party/home-manager/modules/programs/notmuch-virtual-mailbox.nix @@ -0,0 +1,33 @@ +{ config, lib, ... }: +with lib; { + options = { + name = mkOption { + type = types.str; + example = "My INBOX"; + default = "My INBOX"; + description = "Name to display"; + }; + + query = mkOption { + type = types.str; + example = "tag:inbox"; + default = "tag:inbox"; + description = "Notmuch query"; + }; + + limit = mkOption { + type = types.nullOr types.int; + example = 10; + default = null; + description = "Restricts number of messages/threads in the result."; + }; + + type = mkOption { + type = types.nullOr (types.enum ([ "threads" "messages" ])); + example = "threads"; + default = null; + description = + "Reads all matching messages or whole-threads. The default is 'messages' or nm_query_type."; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/notmuch.nix b/third_party/home-manager/modules/programs/notmuch.nix index 9c1c9f5c0e..a3d679b236 100644 --- a/third_party/home-manager/modules/programs/notmuch.nix +++ b/third_party/home-manager/modules/programs/notmuch.nix @@ -57,7 +57,7 @@ in { default = [ ]; description = '' A list to specify files and directories that will not be - searched for messages by notmuch new. + searched for messages by {command}`notmuch new`. ''; }; @@ -67,7 +67,7 @@ in { example = [ "new" ]; description = '' A list of tags that will be added to all messages - incorporated by notmuch new. + incorporated by {command}`notmuch new`. ''; }; }; @@ -75,7 +75,7 @@ in { default = { }; description = '' Options related to email processing performed by - notmuch new. + {command}`notmuch new`. ''; }; diff --git a/third_party/home-manager/modules/programs/nushell.nix b/third_party/home-manager/modules/programs/nushell.nix index da01672b19..5141997168 100644 --- a/third_party/home-manager/modules/programs/nushell.nix +++ b/third_party/home-manager/modules/programs/nushell.nix @@ -23,7 +23,7 @@ let defaultText = literalExpression "if source is defined, the content of source, otherwise empty"; description = '' - Text of the nushell ${name} file. + Text of the nushell {file}`${name}` file. If unset then the source option will be preferred. ''; }; @@ -32,7 +32,7 @@ let type = types.nullOr types.path; default = null; description = '' - Path of the nushell ${name} file to use. + Path of the nushell {file}`${name}` file to use. If the text option is set, it will be preferred. ''; }; @@ -76,9 +76,8 @@ in { ''; description = '' The configuration file to be used for nushell. - - - See for more information. + + See for more information. ''; }; @@ -86,13 +85,28 @@ in { type = types.nullOr (linesOrSource "env.nu"); default = null; example = '' - let-env FOO = 'BAR' + $env.FOO = 'BAR' ''; description = '' The environment variables file to be used for nushell. - - - See for more information. + + See for more information. + ''; + }; + + loginFile = mkOption { + type = types.nullOr (linesOrSource "login.nu"); + default = null; + example = '' + # Prints "Hello, World" upon logging into tty1 + if (tty) == "/dev/tty1" { + echo "Hello, World" + } + ''; + description = '' + The login file to be used for nushell upon logging in. + + See for more information. ''; }; @@ -111,21 +125,67 @@ in { Additional configuration to add to the nushell environment variables file. ''; }; + + extraLogin = mkOption { + type = types.lines; + default = ""; + description = '' + Additional configuration to add to the nushell login file. + ''; + }; + + shellAliases = mkOption { + type = types.attrsOf types.str; + default = { }; + example = { ll = "ls -l"; }; + description = '' + An attribute set that maps aliases (the top level attribute names in + this option) to command strings or directly to build outputs. + ''; + }; + + environmentVariables = mkOption { + type = types.attrsOf types.str; + default = { }; + example = { FOO = "BAR"; }; + description = '' + An attribute set that maps an environment variable to a shell interpreted string. + ''; + }; }; config = mkIf cfg.enable { home.packages = [ cfg.package ]; + home.file = mkMerge [ - (mkIf (cfg.configFile != null || cfg.extraConfig != "") { + (let + writeConfig = cfg.configFile != null || cfg.extraConfig != "" + || aliasesStr != ""; + + aliasesStr = concatStringsSep "\n" + (mapAttrsToList (k: v: "alias ${k} = ${v}") cfg.shellAliases); + in mkIf writeConfig { "${configDir}/config.nu".text = mkMerge [ (mkIf (cfg.configFile != null) cfg.configFile.text) cfg.extraConfig + aliasesStr ]; }) - (mkIf (cfg.envFile != null || cfg.extraEnv != "") { + + (let + envVarsStr = concatStringsSep "\n" + (mapAttrsToList (k: v: "$env.${k} = ${v}") cfg.environmentVariables); + in mkIf (cfg.envFile != null || cfg.extraEnv != "" || envVarsStr != "") { "${configDir}/env.nu".text = mkMerge [ (mkIf (cfg.envFile != null) cfg.envFile.text) cfg.extraEnv + envVarsStr + ]; + }) + (mkIf (cfg.loginFile != null || cfg.extraLogin != "") { + "${configDir}/login.nu".text = mkMerge [ + (mkIf (cfg.loginFile != null) cfg.loginFile.text) + cfg.extraLogin ]; }) ]; diff --git a/third_party/home-manager/modules/programs/offlineimap.nix b/third_party/home-manager/modules/programs/offlineimap.nix index c5b800599e..e3a47817fe 100644 --- a/third_party/home-manager/modules/programs/offlineimap.nix +++ b/third_party/home-manager/modules/programs/offlineimap.nix @@ -30,7 +30,7 @@ let genOfflineImapScript = account: with account; pkgs.writeShellScriptBin "offlineimap-${name}" '' - exec ${pkgs.offlineimap}/bin/offlineimap -a${account.name} "$@" + exec ${cfg.package}/bin/offlineimap -a${account.name} "$@" ''; accountStr = account: @@ -90,6 +90,16 @@ in { programs.offlineimap = { enable = mkEnableOption "OfflineIMAP"; + package = mkPackageOption pkgs "offlineimap" { + example = '' + pkgs.offlineimap.overridePythonAttrs ( old: { + propagatedBuildInputs = old.propagatedBuildInputs + ++ (with pkgs.python3Packages; [ + requests_oauthlib xdg gpgme]); + })''; + extraDescription = "Can be used to specify extensions."; + }; + pythonFile = mkOption { type = types.lines; default = '' @@ -113,7 +123,7 @@ in { }; description = '' Extra configuration options added to the - section. + {option}`general` section. ''; }; @@ -123,7 +133,7 @@ in { example = { gmailtrashfolder = "[Gmail]/Papierkorb"; }; description = '' Extra configuration options added to the - section. + {option}`DEFAULT` section. ''; }; @@ -141,7 +151,7 @@ in { ''; description = '' Extra configuration options added to the - mbnames section. + `mbnames` section. ''; }; }; @@ -153,12 +163,12 @@ in { }; config = mkIf cfg.enable { - home.packages = [ pkgs.offlineimap ]; + home.packages = [ cfg.package ]; xdg.configFile."offlineimap/get_settings.py".text = cfg.pythonFile; xdg.configFile."offlineimap/get_settings.pyc".source = "${ pkgs.runCommandLocal "get_settings-compile" { - nativeBuildInputs = [ pkgs.offlineimap ]; + nativeBuildInputs = [ cfg.package ]; pythonFile = cfg.pythonFile; passAsFile = [ "pythonFile" ]; } '' diff --git a/third_party/home-manager/modules/programs/oh-my-posh.nix b/third_party/home-manager/modules/programs/oh-my-posh.nix index d1dfda97f5..1c6941caad 100644 --- a/third_party/home-manager/modules/programs/oh-my-posh.nix +++ b/third_party/home-manager/modules/programs/oh-my-posh.nix @@ -29,9 +29,9 @@ in { builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile "''${pkgs.oh-my-posh}/share/oh-my-posh/themes/space.omp.json"))''; description = '' Configuration written to - $XDG_CONFIG_HOME/oh-my-posh/config.json. See - - for details. The useTheme option is ignored when this + {file}`$XDG_CONFIG_HOME/oh-my-posh/config.json`. See + + for details. The `useTheme` option is ignored when this option is used. ''; }; @@ -41,9 +41,9 @@ in { default = null; description = '' Use one of the official themes. This should be a name from this list: - . Because a theme + . Because a theme is essentially a configuration file, this option is not used when a - configFile is set. + `configFile` is set. ''; }; diff --git a/third_party/home-manager/modules/programs/opam.nix b/third_party/home-manager/modules/programs/opam.nix index 2916fb197d..34338514a0 100644 --- a/third_party/home-manager/modules/programs/opam.nix +++ b/third_party/home-manager/modules/programs/opam.nix @@ -7,7 +7,7 @@ let cfg = config.programs.opam; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.opam = { enable = mkEnableOption "Opam"; @@ -56,7 +56,7 @@ in { ''; programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - eval "$(${cfg.package}/bin/opam env --shell=fish)" + eval (${cfg.package}/bin/opam env --shell=fish) ''; }; } diff --git a/third_party/home-manager/modules/programs/papis.nix b/third_party/home-manager/modules/programs/papis.nix new file mode 100644 index 0000000000..b110172d9a --- /dev/null +++ b/third_party/home-manager/modules/programs/papis.nix @@ -0,0 +1,92 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.papis; + + defaultLibraries = remove null + (mapAttrsToList (n: v: if v.isDefault then n else null) cfg.libraries); + + settingsIni = (lib.mapAttrs (n: v: v.settings) cfg.libraries) // { + settings = cfg.settings // { "default-library" = head defaultLibraries; }; + }; + +in { + meta.maintainers = [ ]; + + options.programs.papis = { + enable = mkEnableOption "papis"; + + settings = mkOption { + type = with types; attrsOf (oneOf [ bool int str ]); + default = { }; + example = literalExpression '' + { + editor = "nvim"; + file-browser = "ranger" + add-edit = true; + } + ''; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/papis/config`. See + + for supported values. + ''; + }; + + libraries = mkOption { + type = types.attrsOf (types.submodule ({ config, name, ... }: { + options = { + name = mkOption { + type = types.str; + default = name; + readOnly = true; + description = "This library's name."; + }; + + isDefault = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Whether this is a default library. There must be exactly one + default library. + ''; + }; + + settings = mkOption { + type = with types; attrsOf (oneOf [ bool int str ]); + default = { }; + example = literalExpression '' + { + dir = "~/papers/"; + } + ''; + description = '' + Configuration for this library. + ''; + }; + }; + })); + description = "Attribute set of papis libraries."; + }; + }; + + config = mkIf cfg.enable { + assertions = [{ + assertion = cfg.libraries == { } || length defaultLibraries == 1; + message = "Must have exactly one default papis library, but found " + + toString (length defaultLibraries) + + optionalString (length defaultLibraries > 1) + (", namely " + concatStringsSep "," defaultLibraries); + }]; + + home.packages = [ pkgs.papis ]; + + xdg.configFile."papis/config" = + mkIf (cfg.libraries != { }) { text = generators.toINI { } settingsIni; }; + }; +} diff --git a/third_party/home-manager/modules/programs/password-store.nix b/third_party/home-manager/modules/programs/password-store.nix index e2f463ece6..203eaa349c 100644 --- a/third_party/home-manager/modules/programs/password-store.nix +++ b/third_party/home-manager/modules/programs/password-store.nix @@ -20,7 +20,7 @@ in { pkgs.pass.withExtensions (exts: [ exts.pass-otp ]) ''; description = '' - The pass package to use. + The `pass` package to use. Can be used to specify extensions. ''; }; @@ -42,13 +42,10 @@ in { } ''; description = '' - The pass environment variables dictionary. - + The `pass` environment variables dictionary. + See the "Environment variables" section of - - pass - 1 - + {manpage}`pass(1)` and the extension man pages for more information about the available keys. ''; @@ -59,6 +56,9 @@ in { home.packages = [ cfg.package ]; home.sessionVariables = cfg.settings; + services.pass-secret-service.storePath = + mkDefault cfg.settings.PASSWORD_STORE_DIR; + xsession.importedVariables = mkIf config.xsession.enable (mapAttrsToList (name: value: name) cfg.settings); }; diff --git a/third_party/home-manager/modules/programs/pazi.nix b/third_party/home-manager/modules/programs/pazi.nix index e1a08eb615..9e603df235 100644 --- a/third_party/home-manager/modules/programs/pazi.nix +++ b/third_party/home-manager/modules/programs/pazi.nix @@ -7,7 +7,7 @@ let cfg = config.programs.pazi; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.pazi = { enable = mkEnableOption "pazi"; diff --git a/third_party/home-manager/modules/programs/pet.nix b/third_party/home-manager/modules/programs/pet.nix index 48e972aecd..ee7c107d6e 100644 --- a/third_party/home-manager/modules/programs/pet.nix +++ b/third_party/home-manager/modules/programs/pet.nix @@ -56,7 +56,7 @@ in { type = format.type; default = { }; description = '' - Settings written to config.toml. See the pet + Settings written to {file}`config.toml`. See the pet documentation for details. ''; }; @@ -66,7 +66,7 @@ in { default = pkgs.fzf; defaultText = literalExpression "pkgs.fzf"; description = '' - The package needed for the settings.selectcmd. + The package needed for the {var}`settings.selectcmd`. ''; }; diff --git a/third_party/home-manager/modules/programs/pistol.nix b/third_party/home-manager/modules/programs/pistol.nix index 4d6a1d2950..28f7ea975e 100644 --- a/third_party/home-manager/modules/programs/pistol.nix +++ b/third_party/home-manager/modules/programs/pistol.nix @@ -52,7 +52,7 @@ in { ''; description = '' Associations written to the Pistol configuration at - $XDG_CONFIG_HOME/pistol/pistol.conf. + {file}`$XDG_CONFIG_HOME/pistol/pistol.conf`. ''; }; diff --git a/third_party/home-manager/modules/programs/piston-cli.nix b/third_party/home-manager/modules/programs/piston-cli.nix index 6315cb5cec..c554c596d5 100644 --- a/third_party/home-manager/modules/programs/piston-cli.nix +++ b/third_party/home-manager/modules/programs/piston-cli.nix @@ -31,7 +31,7 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/piston-cli/config.yml. + {file}`$XDG_CONFIG_HOME/piston-cli/config.yml`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/pls.nix b/third_party/home-manager/modules/programs/pls.nix index 1c5af37828..c56c4b01f6 100644 --- a/third_party/home-manager/modules/programs/pls.nix +++ b/third_party/home-manager/modules/programs/pls.nix @@ -13,11 +13,10 @@ let }; in { - meta.maintainers = [ hm.maintainers.kalhauge ]; + meta.maintainers = [ maintainers.arjan-s ]; options.programs.pls = { - enable = - mkEnableOption "pls, a modern replacement for ls"; + enable = mkEnableOption "pls, a modern replacement for {command}`ls`"; package = mkPackageOption pkgs "pls" { }; diff --git a/third_party/home-manager/modules/programs/powerline-go.nix b/third_party/home-manager/modules/programs/powerline-go.nix index ec4e45c277..9bc9491b6a 100644 --- a/third_party/home-manager/modules/programs/powerline-go.nix +++ b/third_party/home-manager/modules/programs/powerline-go.nix @@ -58,7 +58,7 @@ in { description = '' List of module names to load. The list of all available modules as well as the choice of default ones are at - . + . ''; example = [ "host" "ssh" "cwd" "gitlite" "jobs" "exit" ]; }; @@ -102,7 +102,7 @@ in { type = with types; attrsOf (oneOf [ bool int str (listOf str) ]); description = '' This can be any key/value pair as described in - . + . ''; example = literalExpression '' { diff --git a/third_party/home-manager/modules/programs/pubs.nix b/third_party/home-manager/modules/programs/pubs.nix index 5a597deabc..1d7f0c0dee 100644 --- a/third_party/home-manager/modules/programs/pubs.nix +++ b/third_party/home-manager/modules/programs/pubs.nix @@ -46,7 +46,7 @@ in { '''''; description = '' Configuration using syntax written to - $HOME/.pubsrc. + {file}`$HOME/.pubsrc`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/pyenv.nix b/third_party/home-manager/modules/programs/pyenv.nix new file mode 100644 index 0000000000..c2273c676d --- /dev/null +++ b/third_party/home-manager/modules/programs/pyenv.nix @@ -0,0 +1,82 @@ +{ config, pkgs, lib, ... }: + +let + + cfg = config.programs.pyenv; + + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = with lib.maintainers; [ tmarkus ]; + + options.programs.pyenv = { + enable = lib.mkEnableOption "pyenv"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.pyenv; + defaultText = lib.literalExpression "pkgs.pyenv"; + description = "The package to use for pyenv."; + }; + + enableBashIntegration = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Whether to enable pyenv's Bash integration. + ''; + }; + + enableZshIntegration = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Whether to enable pyenv's Zsh integration. + ''; + }; + + enableFishIntegration = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Whether to enable pyenv's Fish integration. + ''; + }; + + rootDirectory = lib.mkOption { + type = lib.types.path; + apply = toString; + default = "${config.xdg.dataHome}/pyenv"; + defaultText = "\${config.xdg.dataHome}/pyenv"; + description = '' + The pyenv root directory ({env}`PYENV_ROOT`). + + ::: {.note} + This deviates from upstream, which uses {file}`$HOME/.pyenv`. + The default path in Home Manager is set according to the XDG + base directory specification. + ::: + ''; + }; + }; + + config = lib.mkIf cfg.enable { + # Always add the configured `pyenv` package. + home.packages = [ cfg.package ]; + + programs.bash.initExtra = lib.mkIf cfg.enableBashIntegration '' + export PYENV_ROOT="${cfg.rootDirectory}" + eval "$(${lib.getExe cfg.package} init - bash)" + ''; + + programs.zsh.initExtra = lib.mkIf cfg.enableZshIntegration '' + export PYENV_ROOT="${cfg.rootDirectory}" + eval "$(${lib.getExe cfg.package} init - zsh)" + ''; + + programs.fish.interactiveShellInit = lib.mkIf cfg.enableFishIntegration '' + set -Ux PYENV_ROOT "${cfg.rootDirectory}" + ${lib.getExe cfg.package} init - fish | source + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/qutebrowser.nix b/third_party/home-manager/modules/programs/qutebrowser.nix index 9220d496ae..4de6f3e024 100644 --- a/third_party/home-manager/modules/programs/qutebrowser.nix +++ b/third_party/home-manager/modules/programs/qutebrowser.nix @@ -66,16 +66,16 @@ in { default = { }; description = '' Search engines that can be used via the address bar. Maps a search - engine name (such as DEFAULT, or - ddg) to a URL with a {} + engine name (such as `DEFAULT`, or + `ddg`) to a URL with a `{}` placeholder. The placeholder will be replaced by the search term, use - {{ and }} for literal - {/} signs. The search engine named - DEFAULT is used when - url.auto_search is turned on and something else than + `{{` and `}}` for literal + `{/}` signs. The search engine named + `DEFAULT` is used when + `url.auto_search` is turned on and something else than a URL was entered to be opened. Other search engines can be used by prepending the search engine name to the search term, for example - :open google qutebrowser. + `:open google qutebrowser`. ''; example = literalExpression '' { @@ -91,8 +91,8 @@ in { type = types.attrsOf types.anything; default = { }; description = '' - Options to add to qutebrowser config.py file. - See + Options to add to qutebrowser {file}`config.py` file. + See for options. ''; example = literalExpression '' @@ -117,8 +117,8 @@ in { as dictionary-key is pressed, the binding for the key used as dictionary-value is invoked instead. This is useful for global remappings of keys, for example to map Ctrl-[ to Escape. Note that when - a key is bound (via bindings.default or - bindings.commands), the mapping is ignored. + a key is bound (via `bindings.default` or + `bindings.commands`), the mapping is ignored. ''; }; @@ -131,113 +131,79 @@ in { }; keyBindings = mkOption { - type = types.attrsOf (types.attrsOf types.str); + type = with types; attrsOf (attrsOf (separatedString " ;; ")); default = { }; description = '' Key bindings mapping keys to commands in different modes. This setting is a dictionary containing mode names and dictionaries mapping keys to - commands: {mode: {key: command}} If you want to map - a key to another key, check the keyMappings setting - instead. For modifiers, you can use either - or - + as delimiters, and these names: + commands: `{mode: {key: command}}` If you want to map + a key to another key, check the `keyMappings` setting + instead. For modifiers, you can use either `-` or + `+` as delimiters, and these names: - - - Control: Control, Ctrl - - - Meta: Meta, Windows, - Mod4 - - - Alt: Alt, Mod1 - - - Shift: Shift - - + Control + : `Control`, `Ctrl` - For simple keys (no <>-signs), a capital + Meta + : `Meta`, `Windows`, `Mod4` + + Alt + : `Alt`, `Mod1` + + Shift + : `Shift` + + For simple keys (no `<>`-signs), a capital letter means the key is pressed with Shift. For special keys (with - <>-signs), you need to explicitly add - Shift- to match a key pressed with shift. If you - want a binding to do nothing, bind it to the nop + `<>`-signs), you need to explicitly add + `Shift-` to match a key pressed with shift. If you + want a binding to do nothing, bind it to the `nop` command. If you want a default binding to be passed through to the website, bind it to null. Note that some commands which are only useful for bindings (but not used interactively) are hidden from the command - completion. See :help for a full list of available + completion. See `:help` for a full list of available commands. The following modes are available: - - - normal - - Default mode, where most commands are invoked. - - - - insert - - Entered when an input field is focused on a website, or by - pressing i in normal mode. Passes through almost all keypresses - to the website, but has some bindings like - <Ctrl-e> to open an external editor. - Note that single keys can’t be bound in this mode. - - - - hint - - Entered when f is pressed to select links with the keyboard. Note - that single keys can’t be bound in this mode. - - - - passthrough - - Similar to insert mode, but passes through all keypresses except - <Escape> to leave the mode. It might be - useful to bind <Escape> to some other - key in this mode if you want to be able to send an Escape key to - the website as well. Note that single keys can’t be bound in this - mode. - - - - command - - Entered when pressing the : key in order to enter a command. Note - that single keys can’t be bound in this mode. - - - - prompt - - Entered when there’s a prompt to display, like for download - locations or when invoked from JavaScript. - - - - yesno - - Entered when there’s a yes/no prompt displayed. - - - - caret - - Entered when pressing the v mode, used to select text using the - keyboard. - - - - register - - Entered when qutebrowser is waiting for a register name/key for - commands like :set-mark. - - - + `normal` + : Default mode, where most commands are invoked. + + `insert` + : Entered when an input field is focused on a website, or by + pressing `i` in normal mode. Passes through almost all keypresses + to the website, but has some bindings like + `` to open an external editor. + Note that single keys can't be bound in this mode. + + `hint` + : Entered when `f` is pressed to select links with the keyboard. Note + that single keys can't be bound in this mode. + + `passthrough` + : Similar to insert mode, but passes through all keypresses except + `` to leave the mode. It might be + useful to bind `` to some other + key in this mode if you want to be able to send an Escape key to + the website as well. Note that single keys can't be bound in this + mode. + + `command` + : Entered when pressing the `:` key in order to enter a command. Note + that single keys can't be bound in this mode. + + `prompt` + : Entered when there's a prompt to display, like for download + locations or when invoked from JavaScript. + + `yesno` + : Entered when there's a yes/no prompt displayed. + + `caret` + : Entered when pressing the `v` mode, used to select text using the + keyboard. + + `register` + : Entered when qutebrowser is waiting for a register name/key for + commands like `:set-mark`. ''; example = literalExpression '' { @@ -245,6 +211,11 @@ in { "" = "spawn mpv {url}"; ",p" = "spawn --userscript qute-pass"; ",l" = '''config-cycle spellcheck.languages ["en-GB"] ["en-US"]'''; + "" = mkMerge [ + "config-cycle tabs.show never always" + "config-cycle statusbar.show in-mode always" + "config-cycle scrolling.bar never always" + ]; }; prompt = { "" = "prompt-yes"; @@ -257,7 +228,7 @@ in { type = types.attrsOf types.str; default = { }; description = '' - Quickmarks to add to qutebrowser's quickmarks file. + Quickmarks to add to qutebrowser's {file}`quickmarks` file. Note that when Home Manager manages your quickmarks, you cannot edit them at runtime. ''; example = literalExpression '' @@ -272,7 +243,7 @@ in { type = types.lines; default = ""; description = '' - Extra lines added to qutebrowser config.py file. + Extra lines added to qutebrowser {file}`config.py` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/rbenv.nix b/third_party/home-manager/modules/programs/rbenv.nix new file mode 100644 index 0000000000..e740c56025 --- /dev/null +++ b/third_party/home-manager/modules/programs/rbenv.nix @@ -0,0 +1,93 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.rbenv; + + pluginModule = types.submodule { + options = { + src = mkOption { + type = types.path; + description = '' + Path to the plugin folder. + ''; + }; + name = mkOption { + type = types.str; + description = '' + Name of the plugin. + ''; + }; + }; + }; + +in { + meta.maintainers = [ ]; + + options.programs.rbenv = { + enable = mkEnableOption "rbenv"; + + package = mkPackageOption pkgs "rbenv" { }; + + plugins = mkOption { + type = types.listOf pluginModule; + default = [ ]; + example = literalExpression '' + [ + { + name = "ruby-build"; + src = pkgs.fetchFromGitHub { + owner = "rbenv"; + repo = "ruby-build"; + rev = "v20221225"; + hash = "sha256-Kuq0Z1kh2mvq7rHEgwVG9XwzR5ZUtU/h8SQ7W4/mBU0="; + }; + } + ] + ''; + description = '' + rbenv plugins to install in {file}`$HOME/.rbenv/plugins/`. + + See + for the full list of plugins. + ''; + }; + + enableBashIntegration = mkEnableOption "Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = true; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = true; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.file.".rbenv/plugins" = mkIf (cfg.plugins != [ ]) { + source = pkgs.linkFarm "rbenv-plugins" (builtins.map (p: { + name = p.name; + path = p.src; + }) cfg.plugins); + }; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration '' + eval "$(${cfg.package}/bin/rbenv init - bash)" + ''; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + eval "$(${cfg.package}/bin/rbenv init - zsh)" + ''; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + ${cfg.package}/bin/rbenv init - fish | source + ''; + }; +} diff --git a/third_party/home-manager/modules/programs/rbw.nix b/third_party/home-manager/modules/programs/rbw.nix index 204aaa6b6b..b6369dbc45 100644 --- a/third_party/home-manager/modules/programs/rbw.nix +++ b/third_party/home-manager/modules/programs/rbw.nix @@ -46,13 +46,13 @@ let default = "gtk2"; description = '' Which pinentry interface to use. Beware that - pinentry-gnome3 may not work on non-Gnome + `pinentry-gnome3` may not work on non-Gnome systems. You can fix it by adding the following to your system configuration: - + ```nix services.dbus.packages = [ pkgs.gcr ]; - - For this reason, the default is gtk2 for + ``` + For this reason, the default is `gtk2` for now. ''; # we want the program in the config @@ -75,8 +75,8 @@ in { default = pkgs.rbw; defaultText = literalExpression "pkgs.rbw"; description = '' - Package providing the rbw tool and its - rbw-agent daemon. + Package providing the {command}`rbw` tool and its + {command}`rbw-agent` daemon. ''; }; diff --git a/third_party/home-manager/modules/programs/readline.nix b/third_party/home-manager/modules/programs/readline.nix index 2658061f22..b8739e37ad 100644 --- a/third_party/home-manager/modules/programs/readline.nix +++ b/third_party/home-manager/modules/programs/readline.nix @@ -21,7 +21,14 @@ let abort ("values ${toPretty v} is of unsupported type"); in "set ${n} ${mkValueStr v}"; - mkBindingStr = k: v: ''"${k}": ${v}''; + mkBindingStr = k: v: + let + isKeynameNotKeyseq = k: + builtins.elem (builtins.head (lib.splitString "-" (toLower k))) [ + "control" + "meta" + ]; + in if isKeynameNotKeyseq k then "${k}: ${v}" else ''"${k}": ${v}''; in { options.programs.readline = { @@ -56,7 +63,7 @@ in { default = ""; description = '' Configuration lines appended unchanged to the end of the - ~/.inputrc file. + {file}`~/.inputrc` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/ripgrep.nix b/third_party/home-manager/modules/programs/ripgrep.nix new file mode 100644 index 0000000000..cbd73bd15d --- /dev/null +++ b/third_party/home-manager/modules/programs/ripgrep.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.ripgrep; + configPath = "${config.xdg.configHome}/ripgrep/ripgreprc"; +in { + meta.maintainers = [ hm.maintainers.pedorich-n ]; + + options = { + programs.ripgrep = { + enable = mkEnableOption "Ripgrep"; + + package = mkPackageOption pkgs "ripgrep" { }; + + arguments = mkOption { + type = with types; listOf str; + default = [ ]; + example = [ "--max-columns-preview" "--colors=line:style:bold" ]; + description = '' + List of arguments to pass to ripgrep. Each item is given to ripgrep as + a single command line argument verbatim. + + See + for an example configuration. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + home = mkMerge [ + { packages = [ cfg.package ]; } + (mkIf (cfg.arguments != [ ]) { + file."${configPath}".text = lib.concatLines cfg.arguments; + + sessionVariables."RIPGREP_CONFIG_PATH" = configPath; + }) + ]; + }; +} diff --git a/third_party/home-manager/modules/programs/rofi-pass.nix b/third_party/home-manager/modules/programs/rofi-pass.nix index da75299e67..9d3ed7382f 100644 --- a/third_party/home-manager/modules/programs/rofi-pass.nix +++ b/third_party/home-manager/modules/programs/rofi-pass.nix @@ -31,7 +31,7 @@ in { description = '' Extra configuration to be added at to the rofi-pass config file. Additional examples can be found at - . + . ''; }; }; diff --git a/third_party/home-manager/modules/programs/rofi.nix b/third_party/home-manager/modules/programs/rofi.nix index 649070737e..bf11201ba0 100644 --- a/third_party/home-manager/modules/programs/rofi.nix +++ b/third_party/home-manager/modules/programs/rofi.nix @@ -108,7 +108,7 @@ in { default = pkgs.rofi; type = types.package; description = '' - Package providing the rofi binary. + Package providing the {command}`rofi` binary. ''; example = literalExpression '' pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; }; @@ -211,7 +211,7 @@ in { description = '' Name of theme or path to theme file in rasi format or attribute set with theme configuration. Available named themes can be viewed using the - rofi-theme-selector tool. + {command}`rofi-theme-selector` tool. ''; }; @@ -264,8 +264,8 @@ in { programs.rofi.finalPackage = let rofiWithPlugins = cfg.package.override - (old: rec { plugins = (old.plugins or [ ]) ++ cfg.plugins; }); - in if builtins.hasAttr "override" cfg.package then + (old: { plugins = (old.plugins or [ ]) ++ cfg.plugins; }); + in if builtins.hasAttr "override" cfg.package && cfg.plugins != [ ] then rofiWithPlugins else cfg.package; diff --git a/third_party/home-manager/modules/programs/rtorrent.nix b/third_party/home-manager/modules/programs/rtorrent.nix index 5cfbe2f1a0..35c245a2c6 100644 --- a/third_party/home-manager/modules/programs/rtorrent.nix +++ b/third_party/home-manager/modules/programs/rtorrent.nix @@ -7,7 +7,7 @@ let cfg = config.programs.rtorrent; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; imports = [ (mkRenamedOptionModule # \ @@ -23,8 +23,8 @@ in { default = ""; description = '' Configuration written to - $XDG_CONFIG_HOME/rtorrent/rtorrent.rc. See - + {file}`$XDG_CONFIG_HOME/rtorrent/rtorrent.rc`. See + for explanation about possible values. ''; }; diff --git a/third_party/home-manager/modules/programs/rtx.nix b/third_party/home-manager/modules/programs/rtx.nix new file mode 100644 index 0000000000..5fa9b5631b --- /dev/null +++ b/third_party/home-manager/modules/programs/rtx.nix @@ -0,0 +1,79 @@ +{ 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/sagemath.nix b/third_party/home-manager/modules/programs/sagemath.nix index b07cec10f8..70efaca56c 100644 --- a/third_party/home-manager/modules/programs/sagemath.nix +++ b/third_party/home-manager/modules/programs/sagemath.nix @@ -24,8 +24,8 @@ in { default = "${config.xdg.configHome}/sage"; defaultText = literalExpression "\${config.xdg.configHome}/sage"; description = '' - Directory where the sage.init file will be stored. - Note that the upstream default is ~/.sage, + Directory where the {file}`sage.init` file will be stored. + Note that the upstream default is {file}`~/.sage`, but our default is to follow XDG. ''; }; @@ -35,8 +35,8 @@ in { default = "${config.xdg.dataHome}/sage"; defaultText = literalExpression "\${config.xdg.dataHome}/sage"; description = '' - Location for DOT_SAGE. - Note that the upstream default is ~/.sage, + Location for {env}`DOT_SAGE`. + Note that the upstream default is {file}`~/.sage`, but our default is to follow XDG. ''; }; @@ -46,7 +46,7 @@ in { default = ""; example = "%colors linux"; description = '' - Contents of the init.sage file that is loaded on startup. + Contents of the {file}`init.sage` file that is loaded on startup. ''; }; }; diff --git a/third_party/home-manager/modules/programs/sbt.nix b/third_party/home-manager/modules/programs/sbt.nix index 3e8dbc102e..de14bc6f3a 100644 --- a/third_party/home-manager/modules/programs/sbt.nix +++ b/third_party/home-manager/modules/programs/sbt.nix @@ -104,7 +104,7 @@ in { default = ".sbt"; description = '' Where the sbt configuration files should be located, relative - HOME. + {env}`HOME`. ''; }; @@ -162,25 +162,19 @@ in { description = '' A list of repositories to use when resolving dependencies. Defined as a list of pre-defined repository or custom repository as a set of name to - URL. The list will be used populate the ~/.sbt/repositories + URL. The list will be used populate the `~/.sbt/repositories` file in the order specified. - - - Pre-defined repositories must be one of local, - maven-local, maven-central. - - + Pre-defined repositories must be one of `local`, + `maven-local`, `maven-central`. Custom repositories are defined as - { name-of-repo = "https://url.to.repo.com"}. - - + `{ name-of-repo = "https://url.to.repo.com"}`. See - + about this configuration section and - + to read about proxy repositories. ''; }; diff --git a/third_party/home-manager/modules/programs/scmpuff.nix b/third_party/home-manager/modules/programs/scmpuff.nix index 0a573af069..5f2fba53b3 100644 --- a/third_party/home-manager/modules/programs/scmpuff.nix +++ b/third_party/home-manager/modules/programs/scmpuff.nix @@ -13,7 +13,7 @@ in { type = types.package; default = pkgs.scmpuff; defaultText = literalExpression "pkgs.scmpuff"; - description = "Package providing the scmpuff tool."; + description = "Package providing the {command}`scmpuff` tool."; }; enableBashIntegration = mkOption { diff --git a/third_party/home-manager/modules/programs/script-directory.nix b/third_party/home-manager/modules/programs/script-directory.nix new file mode 100644 index 0000000000..9f5abf65a4 --- /dev/null +++ b/third_party/home-manager/modules/programs/script-directory.nix @@ -0,0 +1,31 @@ +{ config, pkgs, lib, ... }: +let cfg = config.programs.script-directory; +in { + meta.maintainers = [ lib.maintainers.janik ]; + + options.programs.script-directory = { + enable = lib.mkEnableOption "script-directory"; + + package = lib.mkPackageOption pkgs "script-directory" { }; + + settings = lib.mkOption { + default = { }; + type = lib.types.attrsOf lib.types.str; + example = lib.literalExpression '' + { + SD_ROOT = "''${config.home.homeDirectory}/.sd"; + SD_EDITOR = "nvim"; + SD_CAT = "lolcat"; + } + ''; + description = + "script-directory config, for options take a look at the [documentation](https://github.com/ianthehenry/sd#options)"; + }; + }; + config = lib.mkIf cfg.enable { + home = { + packages = [ cfg.package ]; + sessionVariables = cfg.settings; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/senpai.nix b/third_party/home-manager/modules/programs/senpai.nix index 6320807114..24256e7649 100644 --- a/third_party/home-manager/modules/programs/senpai.nix +++ b/third_party/home-manager/modules/programs/senpai.nix @@ -12,7 +12,7 @@ in { type = types.package; default = pkgs.senpai; defaultText = literalExpression "pkgs.senpai"; - description = "The senpai package to use."; + description = "The `senpai` package to use."; }; config = mkOption { type = types.submodule { @@ -57,8 +57,7 @@ in { ''; description = '' Configuration for senpai. For a complete list of options, see - senpai - 5. + {manpage}`senpai(5)`. ''; }; }; diff --git a/third_party/home-manager/modules/programs/sioyek.nix b/third_party/home-manager/modules/programs/sioyek.nix index 63bf5b6f1b..04a309731b 100644 --- a/third_party/home-manager/modules/programs/sioyek.nix +++ b/third_party/home-manager/modules/programs/sioyek.nix @@ -15,7 +15,7 @@ in { options = { programs.sioyek = { enable = mkEnableOption - "Sioyek is a PDF viewer designed for reading research papers and technical books."; + "Sioyek, a PDF viewer designed for reading research papers and technical books"; package = mkOption { default = pkgs.sioyek; @@ -27,9 +27,9 @@ in { bindings = mkOption { description = '' Input configuration written to - $XDG_CONFIG_HOME/sioyek/keys_user.config. - See . - + {file}`$XDG_CONFIG_HOME/sioyek/keys_user.config`. + See . + Each attribute could also accept a list of strings to set multiple bindings of the same command. ''; @@ -50,8 +50,8 @@ in { config = mkOption { description = '' Input configuration written to - $XDG_CONFIG_HOME/sioyek/prefs_user.config. - See . + {file}`$XDG_CONFIG_HOME/sioyek/prefs_user.config`. + See . ''; type = types.attrsOf types.str; default = { }; diff --git a/third_party/home-manager/modules/programs/skim.nix b/third_party/home-manager/modules/programs/skim.nix index 3d4da74df2..2bb17d1b97 100644 --- a/third_party/home-manager/modules/programs/skim.nix +++ b/third_party/home-manager/modules/programs/skim.nix @@ -14,7 +14,7 @@ in { type = types.package; default = pkgs.skim; defaultText = literalExpression "pkgs.skim"; - description = "Package providing the skim tool."; + description = "Package providing the {command}`skim` tool."; }; defaultCommand = mkOption { diff --git a/third_party/home-manager/modules/programs/sm64ex.nix b/third_party/home-manager/modules/programs/sm64ex.nix index 48c1cb9bea..35d608baba 100644 --- a/third_party/home-manager/modules/programs/sm64ex.nix +++ b/third_party/home-manager/modules/programs/sm64ex.nix @@ -64,7 +64,7 @@ in { default = null; description = '' Extra flags to pass to the compiler. See - + for more information. ''; example = literalExpression '' @@ -80,7 +80,7 @@ in { nullOr (attrsOf (either str (either int (either bool (listOf str))))); default = null; description = - "Settings for sm64ex's $XDG_DATA_HOME/sm64pc/sm64config.txt file."; + "Settings for sm64ex's {file}`$XDG_DATA_HOME/sm64pc/sm64config.txt` file."; example = literalExpression '' { fullscreen = false; diff --git a/third_party/home-manager/modules/programs/sqls.nix b/third_party/home-manager/modules/programs/sqls.nix index 33a8448fff..aaa161a750 100644 --- a/third_party/home-manager/modules/programs/sqls.nix +++ b/third_party/home-manager/modules/programs/sqls.nix @@ -9,7 +9,7 @@ let yamlFormat = pkgs.formats.yaml { }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.sqls = { enable = mkEnableOption "sqls, a SQL language server written in Go"; @@ -30,8 +30,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/sqls/config.yml. See - + {file}`$XDG_CONFIG_HOME/sqls/config.yml`. See + for supported values. ''; }; diff --git a/third_party/home-manager/modules/programs/ssh.nix b/third_party/home-manager/modules/programs/ssh.nix index f906d1bc73..e510fe8aad 100644 --- a/third_party/home-manager/modules/programs/ssh.nix +++ b/third_party/home-manager/modules/programs/ssh.nix @@ -15,6 +15,12 @@ let unwords = builtins.concatStringsSep " "; + mkSetEnvStr = envStr: unwords + (mapAttrsToList + (name: value: ''${name}="${escape [ "\"" "\\" ] (toString value)}"'') + envStr + ); + bindOptions = { address = mkOption { type = types.str; @@ -64,15 +70,12 @@ let default = null; example = "*.example.org"; description = '' - Host pattern used by this conditional block. + `Host` pattern used by this conditional block. See - - ssh_config - 5 - - for Host block details. + {manpage}`ssh_config(5)` + for `Host` block details. This option is ignored if - + {option}`ssh.matchBlocks.*.match` if defined. ''; }; @@ -82,14 +85,11 @@ let default = null; example = "host canonical\nhost exec \"ping -c1 -q 192.168.17.1\""; description = '' - Match block conditions used by this block. See - - ssh_config - 5 - - for Match block details. + `Match` block conditions used by this block. See + {manpage}`ssh_config(5)` + for `Match` block details. This option takes precedence over - + {option}`ssh.matchBlocks.*.host` if defined. ''; }; @@ -114,7 +114,7 @@ let default = false; description = '' Specifies whether X11 connections will be automatically redirected - over the secure channel and DISPLAY set. + over the secure channel and {env}`DISPLAY` set. ''; }; @@ -133,8 +133,8 @@ let description = '' Specifies that ssh should only use the authentication identity explicitly configured in the - ~/.ssh/config files or passed on the - ssh command-line, even if ssh-agent + {file}`~/.ssh/config` files or passed on the + ssh command-line, even if {command}`ssh-agent` offers more identities. ''; }; @@ -189,12 +189,20 @@ let ''; }; + setEnv = mkOption { + type = with types; attrsOf (oneOf [ str path int float ]); + default = {}; + description = '' + Environment variables and their value to send to the server. + ''; + }; + compression = mkOption { type = types.nullOr types.bool; default = null; description = '' Specifies whether to use compression. Omitted from the host - block when null. + block when `null`. ''; }; @@ -203,7 +211,7 @@ let default = true; description = '' Check the host IP address in the - known_hosts file. + {file}`known_hosts` file. ''; }; @@ -253,10 +261,7 @@ let ''; description = '' Specify local port forwardings. See - - ssh_config - 5 - for LocalForward. + {manpage}`ssh_config(5)` for `LocalForward`. ''; }; @@ -274,10 +279,7 @@ let ''; description = '' Specify remote port forwardings. See - - ssh_config - 5 - for RemoteForward. + {manpage}`ssh_config(5)` for `RemoteForward`. ''; }; @@ -289,10 +291,7 @@ let ''; description = '' Specify dynamic port forwardings. See - - ssh_config - 5 - for DynamicForward. + {manpage}`ssh_config(5)` for `DynamicForward`. ''; }; @@ -322,6 +321,7 @@ let ++ 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}" ++ optional (cf.serverAliveCountMax != 3) @@ -346,6 +346,12 @@ in options.programs.ssh = { enable = mkEnableOption "SSH client configuration"; + package = mkPackageOption pkgs "openssh" { + nullable = true; + default = null; + extraDescription = "By default, the client provided by your system is used."; + }; + forwardAgent = mkOption { default = false; type = types.bool; @@ -383,10 +389,7 @@ in type = types.bool; description = '' Indicates that - - ssh - 1 - + {manpage}`ssh(1)` should hash host names and addresses when they are added to the known hosts file. ''; @@ -398,7 +401,7 @@ in description = '' Specifies one or more files to use for the user host key database, separated by whitespace. The default is - ~/.ssh/known_hosts. + {file}`~/.ssh/known_hosts`. ''; }; @@ -449,19 +452,16 @@ in default = []; description = '' File globs of ssh config files that should be included via the - Include directive. - + `Include` directive. + See - - ssh_config - 5 - + {manpage}`ssh_config(5)` for more information. ''; }; matchBlocks = mkOption { - type = hm.types.listOrDagOf matchBlockModule; + type = hm.types.dagOf matchBlockModule; default = {}; example = literalExpression '' { @@ -479,12 +479,9 @@ in Specify per-host settings. Note, if the order of rules matter then use the DAG functions to express the dependencies as shown in the example. - + See - - ssh_config - 5 - + {manpage}`ssh_config(5)` for more information. ''; }; @@ -510,6 +507,8 @@ in } ]; + home.packages = optional (cfg.package != null) cfg.package; + home.file.".ssh/config".text = let sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks; diff --git a/third_party/home-manager/modules/programs/starship.nix b/third_party/home-manager/modules/programs/starship.nix index 05763c0ba3..8a97b53a28 100644 --- a/third_party/home-manager/modules/programs/starship.nix +++ b/third_party/home-manager/modules/programs/starship.nix @@ -11,7 +11,7 @@ let starshipCmd = "${config.home.profileDirectory}/bin/starship"; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.starship = { enable = mkEnableOption "starship"; @@ -51,50 +51,43 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/starship.toml. - - See for the full list + {file}`$XDG_CONFIG_HOME/starship.toml`. + + See for the full list of options. ''; }; - enableBashIntegration = mkOption { + enableBashIntegration = mkEnableOption "Bash integration" // { default = true; - type = types.bool; - description = '' - Whether to enable Bash integration. - ''; }; - enableZshIntegration = mkOption { + enableZshIntegration = mkEnableOption "Zsh integration" // { default = true; - type = types.bool; - description = '' - Whether to enable Zsh integration. - ''; }; - enableFishIntegration = mkOption { + enableFishIntegration = mkEnableOption "Fish integration" // { default = true; - type = types.bool; - description = '' - Whether to enable Fish integration. - ''; }; - enableIonIntegration = mkOption { + enableIonIntegration = mkEnableOption "Ion integration" // { default = true; - type = types.bool; - description = '' - Whether to enable Ion integration. - ''; }; - enableNushellIntegration = mkOption { + enableNushellIntegration = mkEnableOption "Nushell integration" // { default = true; + }; + + enableTransience = mkOption { type = types.bool; + default = false; description = '' - Whether to enable Nushell integration. + The TransientPrompt feature of Starship replaces previous prompts with a + custom string. This is only a valid option for the Fish shell. + + For documentation on how to change the default replacement string and + for more information visit + https://starship.rs/advanced-config/#transientprompt-and-transientrightprompt-in-cmd ''; }; }; @@ -107,25 +100,26 @@ in { }; programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then + if [[ $TERM != "dumb" ]]; then eval "$(${starshipCmd} init bash --print-full-init)" fi ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then + if [[ $TERM != "dumb" ]]; then eval "$(${starshipCmd} init zsh)" fi ''; programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \) + if test "$TERM" != "dumb" eval (${starshipCmd} init fish) + ${lib.optionalString cfg.enableTransience "enable_transience"} end ''; programs.ion.initExtra = mkIf cfg.enableIonIntegration '' - if test $TERM != "dumb" && not exists -s INSIDE_EMACS || test $INSIDE_EMACS = "vterm" + if test $TERM != "dumb" eval $(${starshipCmd} init ion) end ''; diff --git a/third_party/home-manager/modules/programs/swaylock.nix b/third_party/home-manager/modules/programs/swaylock.nix index 187ff9d616..774ecf7050 100644 --- a/third_party/home-manager/modules/programs/swaylock.nix +++ b/third_party/home-manager/modules/programs/swaylock.nix @@ -1,32 +1,59 @@ -{ config, lib, ... }: +{ pkgs, config, lib, ... }: + +with lib; let cfg = config.programs.swaylock; in { - meta.maintainers = [ lib.hm.maintainers.rcerc ]; + meta.maintainers = [ hm.maintainers.rcerc ]; - options.programs.swaylock.settings = lib.mkOption { - type = with lib.types; attrsOf (oneOf [ bool float int str ]); - default = { }; - description = '' - Default arguments to swaylock. An empty set - disables configuration generation. - ''; - example = { - color = "808080"; - font-size = 24; - indicator-idle-visible = false; - indicator-radius = 100; - line-color = "ffffff"; - show-failed-attempts = true; + options.programs.swaylock = { + enable = mkOption { + type = lib.types.bool; + default = versionOlder config.home.stateVersion "23.05" + && (cfg.settings != { }); + defaultText = literalExpression '' + true if state version < 23.05 and settings ≠ { }, + false otherwise + ''; + example = true; + description = "Whether to enable swaylock."; + }; + + package = mkPackageOption pkgs "swaylock" { }; + + settings = mkOption { + type = with types; attrsOf (oneOf [ bool float int str ]); + default = { }; + description = '' + Default arguments to {command}`swaylock`. An empty set + disables configuration generation. + ''; + example = { + color = "808080"; + font-size = 24; + indicator-idle-visible = false; + indicator-radius = 100; + line-color = "ffffff"; + show-failed-attempts = true; + }; }; }; - config.xdg.configFile."swaylock/config" = lib.mkIf (cfg.settings != { }) { - text = lib.concatStrings (lib.mapAttrsToList (n: v: - if v == false then - "" - else - (if v == true then n else n + "=" + builtins.toString v) + "\n") - cfg.settings); + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "programs.swaylock" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."swaylock/config" = mkIf (cfg.settings != { }) { + text = concatStrings (mapAttrsToList (n: v: + if v == false then + "" + else + (if v == true then n else n + "=" + builtins.toString v) + "\n") + cfg.settings); + }; }; } diff --git a/third_party/home-manager/modules/programs/taskwarrior.nix b/third_party/home-manager/modules/programs/taskwarrior.nix index 3eb0013e30..5c4f0bf8ae 100644 --- a/third_party/home-manager/modules/programs/taskwarrior.nix +++ b/third_party/home-manager/modules/programs/taskwarrior.nix @@ -51,7 +51,7 @@ in { ''; description = '' Key-value configuration written to - $XDG_CONFIG_HOME/task/taskrc. + {file}`$XDG_CONFIG_HOME/task/taskrc`. ''; }; @@ -61,7 +61,7 @@ in { defaultText = "$XDG_DATA_HOME/task"; description = '' Location where Task Warrior will store its data. - + Home Manager will attempt to create this directory. ''; }; @@ -81,14 +81,16 @@ in { default = ""; description = '' Additional content written at the end of - $XDG_CONFIG_HOME/task/taskrc. + {file}`$XDG_CONFIG_HOME/task/taskrc`. ''; }; + + package = mkPackageOption pkgs "taskwarrior" { }; }; }; config = mkIf cfg.enable { - home.packages = [ pkgs.taskwarrior ]; + home.packages = [ cfg.package ]; home.file."${homeConf}".text = '' data.location=${cfg.dataLocation} diff --git a/third_party/home-manager/modules/programs/tealdeer.nix b/third_party/home-manager/modules/programs/tealdeer.nix index 98ef4d2c8a..f0e610c2d4 100644 --- a/third_party/home-manager/modules/programs/tealdeer.nix +++ b/third_party/home-manager/modules/programs/tealdeer.nix @@ -12,7 +12,7 @@ let config.xdg.configHome; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.tealdeer = { enable = mkEnableOption "Tealdeer"; @@ -34,10 +34,10 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/tealdeer/config.toml on Linux or - $HOME/Library/Application Support/tealdeer/config.toml + {file}`$XDG_CONFIG_HOME/tealdeer/config.toml` on Linux or + {file}`$HOME/Library/Application Support/tealdeer/config.toml` on Darwin. See - + for more information. ''; }; diff --git a/third_party/home-manager/modules/programs/terminator.nix b/third_party/home-manager/modules/programs/terminator.nix index 4a5e367bc1..283f4ad9d5 100644 --- a/third_party/home-manager/modules/programs/terminator.nix +++ b/third_party/home-manager/modules/programs/terminator.nix @@ -44,12 +44,9 @@ in { default = { }; description = '' configuration for terminator. - + For a list of all possible options refer to the - - terminator_config - 5 - + {manpage}`terminator_config(5)` man page. ''; type = types.attrsOf types.anything; diff --git a/third_party/home-manager/modules/programs/termite.nix b/third_party/home-manager/modules/programs/termite.nix index ccf3cabb3f..c0015dcb4d 100644 --- a/third_party/home-manager/modules/programs/termite.nix +++ b/third_party/home-manager/modules/programs/termite.nix @@ -160,10 +160,7 @@ in { description = '' Emit escape sequences for extra keys, like the modifyOtherKeys resource for - - xterm - 1 - . + {manpage}`xterm(1)`. ''; }; diff --git a/third_party/home-manager/modules/programs/thunderbird.nix b/third_party/home-manager/modules/programs/thunderbird.nix index 8c5a4b8686..8b14628a14 100644 --- a/third_party/home-manager/modules/programs/thunderbird.nix +++ b/third_party/home-manager/modules/programs/thunderbird.nix @@ -38,16 +38,17 @@ let }; })); - toThunderbirdAccount = account: profile: - let id = account.id; + toThunderbirdIdentity = account: address: + # For backwards compatibility, the primary address reuses the account ID. + let + id = if address == account.address then + account.id + else + builtins.hashString "sha256" address; in { - "mail.account.account_${id}.identities" = "id_${id}"; - "mail.account.account_${id}.server" = "server_${id}"; "mail.identity.id_${id}.fullName" = account.realName; - "mail.identity.id_${id}.useremail" = account.address; + "mail.identity.id_${id}.useremail" = address; "mail.identity.id_${id}.valid" = true; - } // optionalAttrs account.primary { - "mail.accountmanager.defaultaccount" = "account_${id}"; } // optionalAttrs (account.gpg != null) { "mail.identity.id_${id}.attachPgpKey" = false; "mail.identity.id_${id}.autoEncryptDrafts" = true; @@ -60,6 +61,20 @@ let "mail.identity.id_${id}.openpgp_key_id" = account.gpg.key; "mail.identity.id_${id}.protectSubject" = true; "mail.identity.id_${id}.sign_mail" = account.gpg.signByDefault; + } // account.thunderbird.perIdentitySettings id; + + toThunderbirdAccount = account: profile: + let + id = account.id; + addresses = [ account.address ] ++ account.aliases; + in { + "mail.account.account_${id}.identities" = concatStringsSep "," + ([ "id_${id}" ] + ++ map (address: "id_${builtins.hashString "sha256" address}") + account.aliases); + "mail.account.account_${id}.server" = "server_${id}"; + } // optionalAttrs account.primary { + "mail.accountmanager.defaultaccount" = "account_${id}"; } // optionalAttrs (account.imap != null) { "mail.server.server_${id}.directory" = "${thunderbirdProfilesPath}/${profile.name}/ImapMail/${id}"; @@ -92,14 +107,17 @@ let "mail.smtpserver.smtp_${id}.username" = account.userName; } // optionalAttrs (account.smtp != null && account.primary) { "mail.smtp.defaultserver" = "smtp_${id}"; - } // account.thunderbird.settings id; + } // builtins.foldl' (a: b: a // b) { } + (builtins.map (address: toThunderbirdIdentity account address) addresses) + // account.thunderbird.settings id; - mkUserJs = prefs: '' + mkUserJs = prefs: extraPrefs: '' // Generated by Home Manager. ${concatStrings (mapAttrsToList (name: value: '' user_pref("${name}", ${builtins.toJSON value}); '') prefs)} + ${extraPrefs} ''; in { meta.maintainers = with hm.maintainers; [ d-dervishi jkarlson ]; @@ -147,7 +165,7 @@ in { ''; description = '' Preferences to add to this profile's - user.js. + {file}`user.js`. ''; }; @@ -157,8 +175,39 @@ in { example = true; description = "Allow using external GPG keys with GPGME."; }; + + userChrome = mkOption { + type = types.lines; + default = ""; + description = "Custom Thunderbird user chrome CSS."; + example = '' + /* Hide tab bar in Thunderbird */ + #tabs-toolbar { + visibility: collapse !important; + } + ''; + }; + + userContent = mkOption { + type = types.lines; + default = ""; + description = "Custom Thunderbird user content CSS."; + example = '' + /* Hide scrollbar on Thunderbird pages */ + *{scrollbar-width:none !important} + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra preferences to add to {file}`user.js`. + ''; + }; }; })); + description = "Attribute set of Thunderbird profiles."; }; settings = mkOption { @@ -210,6 +259,22 @@ in { }; settings = mkOption { + type = with types; functionTo (attrsOf (oneOf [ bool int str ])); + default = _: { }; + defaultText = literalExpression "_: { }"; + example = literalExpression '' + id: { + "mail.server.server_''${id}.check_new_mail" = false; + }; + ''; + description = '' + Extra settings to add to this Thunderbird account configuration. + The {var}`id` given as argument is an automatically + generated account identifier. + ''; + }; + + perIdentitySettings = mkOption { type = with types; functionTo (attrsOf (oneOf [ bool int str ])); default = _: { }; defaultText = literalExpression "_: { }"; @@ -220,9 +285,9 @@ in { }; ''; description = '' - Extra settings to add to this Thunderbird account configuration. - The id given as argument is an automatically - generated account identifier. + Extra settings to add to each identity of this Thunderbird + account configuration. The {var}`id` given as + argument is an automatically generated identifier. ''; }; }; @@ -276,6 +341,12 @@ in { "${thunderbirdConfigPath}/profiles.ini" = mkIf (cfg.profiles != { }) { text = generators.toINI { } profilesIni; }; }] ++ flip mapAttrsToList cfg.profiles (name: profile: { + "${thunderbirdProfilesPath}/${name}/chrome/userChrome.css" = + mkIf (profile.userChrome != "") { text = profile.userChrome; }; + + "${thunderbirdProfilesPath}/${name}/chrome/userContent.css" = + mkIf (profile.userContent != "") { text = profile.userContent; }; + "${thunderbirdProfilesPath}/${name}/user.js" = let accounts = filter (a: a.thunderbird.profiles == [ ] @@ -299,7 +370,8 @@ in { { "mail.openpgp.allow_external_gnupg" = profile.withExternalGnupg; } profile.settings - ] ++ (map (a: toThunderbirdAccount a profile) accounts))); + ] ++ (map (a: toThunderbirdAccount a profile) accounts))) + profile.extraConfig; }; })); }; diff --git a/third_party/home-manager/modules/programs/tint2.nix b/third_party/home-manager/modules/programs/tint2.nix index 4579f619cb..70930197ff 100644 --- a/third_party/home-manager/modules/programs/tint2.nix +++ b/third_party/home-manager/modules/programs/tint2.nix @@ -24,7 +24,7 @@ in { type = types.lines; default = ""; description = '' - Commands for tint2 that will be add to the tint2rc + Commands for tint2 that will be add to the {file}`tint2rc` file. ''; }; diff --git a/third_party/home-manager/modules/programs/tiny.nix b/third_party/home-manager/modules/programs/tiny.nix index eba0c9c436..7c510535f3 100644 --- a/third_party/home-manager/modules/programs/tiny.nix +++ b/third_party/home-manager/modules/programs/tiny.nix @@ -19,7 +19,7 @@ in { type = types.package; default = pkgs.tiny; defaultText = literalExpression "pkgs.tiny"; - description = "The tiny package to install."; + description = "The {command}`tiny` package to install."; }; settings = mkOption { @@ -47,8 +47,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/tiny/config.yml. See - + {file}`$XDG_CONFIG_HOME/tiny/config.yml`. See + for the default configuration. ''; }; diff --git a/third_party/home-manager/modules/programs/tmate.nix b/third_party/home-manager/modules/programs/tmate.nix index 6681baf6c1..355474101c 100644 --- a/third_party/home-manager/modules/programs/tmate.nix +++ b/third_party/home-manager/modules/programs/tmate.nix @@ -36,7 +36,7 @@ in { }; dsaFingerprint = mkOption { - type = with types; nullOr string; + type = with types; nullOr str; default = null; example = literalExpression "SHA256:1111111111111111111111111111111111111111111"; @@ -44,7 +44,7 @@ in { }; rsaFingerprint = mkOption { - type = with types; nullOr string; + type = with types; nullOr str; default = null; example = literalExpression "SHA256:1111111111111111111111111111111111111111111"; @@ -56,7 +56,7 @@ in { default = ""; description = '' Additional content written at the end of - ~/.tmate.conf. + {file}`~/.tmate.conf`. ''; }; }; @@ -65,7 +65,7 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.file.".tmate.conf".text = let + home.file.".tmate.conf" = let conf = optional (cfg.host != null) ''set -g tmate-server-host "${cfg.host}"'' ++ optional (cfg.port != null) @@ -75,6 +75,6 @@ in { ++ optional (cfg.rsaFingerprint != null) ''set -g tmate-server-rsa-fingerprint "${cfg.rsaFingerprint}"'' ++ optional (cfg.extraConfig != "") cfg.extraConfig; - in concatStringsSep "\n" conf + "\n"; + in mkIf (conf != [ ]) { text = concatLines conf; }; }; } diff --git a/third_party/home-manager/modules/programs/tmux.nix b/third_party/home-manager/modules/programs/tmux.nix index bf98a3f37b..b68fd8d5e8 100644 --- a/third_party/home-manager/modules/programs/tmux.nix +++ b/third_party/home-manager/modules/programs/tmux.nix @@ -94,6 +94,7 @@ let bind-key -N "Kill the current pane" x kill-pane ''} + set -g mouse ${boolToStr cfg.mouse} setw -g aggressive-resize ${boolToStr cfg.aggressiveResize} setw -g clock-mode-style ${if cfg.clock24 then "24" else "12"} set -s escape-time ${toString cfg.escapeTime} @@ -186,7 +187,7 @@ in { default = ""; description = '' Additional configuration to add to - tmux.conf. + {file}`tmux.conf`. ''; }; @@ -204,6 +205,8 @@ in { description = "VI or Emacs style shortcuts."; }; + mouse = mkEnableOption "mouse support"; + newSession = mkOption { default = false; type = types.bool; @@ -240,7 +243,7 @@ in { description = '' Run the sensible plugin at the top of the configuration. It is possible to override the sensible settings using the - option. + {option}`programs.tmux.extraConfig` option. ''; }; @@ -280,8 +283,8 @@ in { default = pkgs.stdenv.isLinux; type = types.bool; description = '' - Store tmux socket under /run, which is more - secure than /tmp, but as a downside it doesn't + Store tmux socket under {file}`/run`, which is more + secure than {file}`/tmp`, but as a downside it doesn't survive user logout. ''; }; @@ -333,7 +336,7 @@ in { (mkIf cfg.secureSocket { home.sessionVariables = { - TMUX_TMPDIR = ''''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}''; + TMUX_TMPDIR = ''''${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}''; }; }) diff --git a/third_party/home-manager/modules/programs/topgrade.nix b/third_party/home-manager/modules/programs/topgrade.nix index ac88643d09..a49f897baa 100644 --- a/third_party/home-manager/modules/programs/topgrade.nix +++ b/third_party/home-manager/modules/programs/topgrade.nix @@ -42,9 +42,9 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/topgrade.toml. - - See for the full list + {file}`$XDG_CONFIG_HOME/topgrade.toml`. + + See for the full list of options. ''; }; diff --git a/third_party/home-manager/modules/programs/translate-shell.nix b/third_party/home-manager/modules/programs/translate-shell.nix new file mode 100644 index 0000000000..1eb3e125ba --- /dev/null +++ b/third_party/home-manager/modules/programs/translate-shell.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.translate-shell; + + mkKeyValue = key: value: + let + formatValue = v: + if isBool v then + (if v then "true" else "false") + else if isString v then + ''"${v}"'' + else if isList v then + "[ ${concatStringsSep " " (map formatValue v)} ]" + else + toString v; + in ":${key} ${formatValue value}"; + + toKeyValue = generators.toKeyValue { inherit mkKeyValue; }; + +in { + meta.maintainers = [ ]; + + options.programs.translate-shell = { + enable = mkEnableOption "translate-shell"; + + settings = mkOption { + type = with types; attrsOf (oneOf [ bool str (listOf str) ]); + default = { }; + example = { + verbose = true; + hl = "en"; + tl = [ "es" "fr" ]; + }; + description = '' + Options to add to {file}`$XDG_CONFIG_HOME/translate-shell/init.trans` file. + See + for options. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.translate-shell ]; + + xdg.configFile."translate-shell/init.trans" = + mkIf (cfg.settings != { }) { text = "{${toKeyValue cfg.settings}}"; }; + }; +} diff --git a/third_party/home-manager/modules/programs/urxvt.nix b/third_party/home-manager/modules/programs/urxvt.nix index 545a1e7f87..059666c382 100644 --- a/third_party/home-manager/modules/programs/urxvt.nix +++ b/third_party/home-manager/modules/programs/urxvt.nix @@ -119,7 +119,7 @@ in { type = types.ints.between 0 200; default = 100; description = - "Darken (0 .. 99) or lighten (101 .. 200) the transparent background."; + "Darken (0 to 99) or lighten (101 to 200) the transparent background."; }; extraConfig = mkOption { diff --git a/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix b/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix new file mode 100644 index 0000000000..35badb927f --- /dev/null +++ b/third_party/home-manager/modules/programs/vdirsyncer-accounts.nix @@ -0,0 +1,187 @@ +{ lib, ... }: + +with lib; + +let + + collection = types.either types.str (types.listOf types.str); + +in { + options.vdirsyncer = { + enable = mkEnableOption "synchronization using vdirsyncer"; + + collections = mkOption { + type = types.nullOr (types.listOf collection); + default = null; + description = '' + The collections to synchronize between the storages. + ''; + }; + + conflictResolution = mkOption { + type = types.nullOr + (types.either (types.enum [ "remote wins" "local wins" ]) + (types.listOf types.str)); + default = null; + description = '' + What to do in case of a conflict between the storages. Either + `remote wins` or + `local wins` or + a list that contains a command to run. By default, an error + message is printed. + ''; + }; + + partialSync = mkOption { + type = types.nullOr (types.enum [ "revert" "error" "ignore" ]); + default = null; + description = '' + What should happen if synchronization in one direction + is impossible due to one storage being read-only. + Defaults to `revert`. + + See + + for more information. + ''; + }; + + metadata = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "color" "displayname" ]; + description = '' + Metadata keys that should be synchronized when vdirsyncer + metasync is executed. + ''; + }; + + timeRange = mkOption { + type = types.nullOr (types.submodule { + options = { + start = mkOption { + type = types.str; + description = "Start of time range to show."; + }; + + end = mkOption { + type = types.str; + description = "End of time range to show."; + }; + }; + }); + default = null; + description = '' + A time range to synchronize. start and end can be any Python + expression that returns a `datetime.datetime` + object. + ''; + example = { + start = "datetime.now() - timedelta(days=365)"; + end = "datetime.now() + timedelta(days=365)"; + }; + }; + + itemTypes = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + description = '' + Kinds of items to show. The default is to show everything. + This depends on particular features of the server, the results + are not validated. + ''; + }; + + verify = mkOption { + type = types.nullOr types.bool; + default = null; + description = "Verify SSL certificate."; + }; + + verifyFingerprint = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Optional. SHA1 or MD5 fingerprint of the expected server certificate. + + See + + for more information. + ''; + }; + + auth = mkOption { + type = types.nullOr (types.enum [ "basic" "digest" "guess" ]); + default = null; + description = '' + Authentication settings. The default is `basic`. + ''; + }; + + authCert = mkOption { + type = types.nullOr (types.either types.str (types.listOf types.str)); + default = null; + description = '' + Either a path to a certificate with a client certificate and + the key or a list of paths to the files with them. + ''; + }; + + userAgent = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + The user agent to report to the server. Defaults to + `vdirsyncer`. + ''; + }; + + postHook = mkOption { + type = types.lines; + default = ""; + description = '' + Command to call for each item creation and modification. + The command will be called with the path of the new/updated + file. + ''; + }; + + ## Options for google storages + + tokenFile = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + A file path where access tokens are stored. + ''; + }; + + clientIdCommand = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ "pass" "client_id" ]; + description = '' + A command that prints the OAuth credentials to standard + output. + + See + + for more information. + ''; + }; + + clientSecretCommand = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ "pass" "client_secret" ]; + description = '' + A command that prints the OAuth credentials to standard + output. + + See + + for more information. + ''; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/vdirsyncer.nix b/third_party/home-manager/modules/programs/vdirsyncer.nix new file mode 100644 index 0000000000..ec1b387968 --- /dev/null +++ b/third_party/home-manager/modules/programs/vdirsyncer.nix @@ -0,0 +1,275 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.vdirsyncer; + + vdirsyncerCalendarAccounts = filterAttrs (_: v: v.vdirsyncer.enable) + (mapAttrs' (n: v: nameValuePair ("calendar_" + n) v) + config.accounts.calendar.accounts); + + vdirsyncerContactAccounts = filterAttrs (_: v: v.vdirsyncer.enable) + (mapAttrs' (n: v: nameValuePair ("contacts_" + n) v) + config.accounts.contact.accounts); + + vdirsyncerAccounts = vdirsyncerCalendarAccounts // vdirsyncerContactAccounts; + + wrap = s: ''"${s}"''; + + listString = l: "[${concatStringsSep ", " l}]"; + + boolString = b: if b then "true" else "false"; + + localStorage = a: + 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"; + }); + + 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)); + + pair = a: + with a.vdirsyncer; + filterAttrs (k: v: k == "collections" || (v != null && v != [ ])) + (getAttrs [ "collections" "conflictResolution" "metadata" "partialSync" ] + a.vdirsyncer); + + pairs = mapAttrs (_: v: pair v) vdirsyncerAccounts; + localStorages = mapAttrs (_: v: localStorage v) vdirsyncerAccounts; + remoteStorages = mapAttrs (_: v: remoteStorage v) vdirsyncerAccounts; + + optionString = n: v: + if (n == "type") then + ''type = "${v}"'' + else if (n == "path") then + ''path = "${v}"'' + else if (n == "fileExt") then + ''fileext = "${v}"'' + else if (n == "encoding") then + ''encoding = "${v}"'' + else if (n == "postHook") then + ''post_hook = "${v}"'' + else if (n == "url") then + ''url = "${v}"'' + else if (n == "timeRange") then '' + start_date = "${v.start}" + end_date = "${v.end}"'' else if (n == "itemTypes") then + "item_types = ${listString (map wrap v)}" + else if (n == "userName") then + ''username = "${v}"'' + else if (n == "userNameCommand") then + "username.fetch = ${listString (map wrap ([ "command" ] ++ v))}" + else if (n == "password") then + ''password = "${v}"'' + else if (n == "passwordCommand") then + "password.fetch = ${listString (map wrap ([ "command" ] ++ v))}" + else if (n == "passwordPrompt") then + ''password.fetch = ["prompt", "${v}"]'' + else if (n == "verify") then + "verify = ${if v then "true" else "false"}" + else if (n == "verifyFingerprint") then + ''verify_fingerprint = "${v}"'' + else if (n == "auth") then + ''auth = "${v}"'' + else if (n == "authCert" && isString (v)) then + ''auth_cert = "${v}"'' + else if (n == "authCert") then + "auth_cert = ${listString (map wrap v)}" + else if (n == "userAgent") then + ''useragent = "${v}"'' + else if (n == "tokenFile") then + ''token_file = "${v}"'' + else if (n == "clientId") then + ''client_id = "${v}"'' + else if (n == "clientIdCommand") then + "client_id.fetch = ${listString (map wrap ([ "command" ] ++ v))}" + else if (n == "clientSecret") then + ''client_secret = "${v}"'' + else if (n == "clientSecretCommand") then + "client_secret.fetch = ${listString (map wrap ([ "command" ] ++ v))}" + else if (n == "metadata") then + "metadata = ${listString (map wrap v)}" + else if (n == "partialSync") then + ''partial_sync = "${v}"'' + else if (n == "collections") then + let + contents = + map (c: if (isString c) then ''"${c}"'' else listString (map wrap c)) + v; + in "collections = ${ + if ((isNull v) || v == [ ]) then "null" else listString contents + }" + else if (n == "conflictResolution") then + if v == "remote wins" then + ''conflict_resolution = "a wins"'' + else if v == "local wins" then + ''conflict_resolution = "b wins"'' + else + "conflict_resolution = ${listString (map wrap ([ "command" ] ++ v))}" + else + throw "Unrecognized option: ${n}"; + + attrsString = a: concatStringsSep "\n" (mapAttrsToList optionString a); + + pairString = n: v: '' + [pair ${n}] + a = "${n}_remote" + b = "${n}_local" + ${attrsString v} + ''; + + configFile = pkgs.writeText "config" '' + [general] + status_path = "${cfg.statusPath}" + + ### Pairs + + ${concatStringsSep "\n" (mapAttrsToList pairString pairs)} + + ### Local storages + + ${concatStringsSep "\n\n" + (mapAttrsToList (n: v: "[storage ${n}_local]" + "\n" + attrsString v) + localStorages)} + + ### Remote storages + + ${concatStringsSep "\n\n" + (mapAttrsToList (n: v: "[storage ${n}_remote]" + "\n" + attrsString v) + remoteStorages)} + ''; + +in { + options = { + programs.vdirsyncer = { + enable = mkEnableOption "vdirsyncer"; + + package = mkOption { + type = types.package; + default = pkgs.vdirsyncer; + defaultText = "pkgs.vdirsyncer"; + description = '' + vdirsyncer package to use. + ''; + }; + + statusPath = mkOption { + type = types.str; + default = "${config.xdg.dataHome}/vdirsyncer/status"; + defaultText = "$XDG_DATA_HOME/vdirsyncer/status"; + description = '' + A directory where vdirsyncer will store some additional data for the next sync. + + For more information, see the + [vdirsyncer manual](https://vdirsyncer.pimutils.org/en/stable/config.html#general-section). + ''; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = let + + requiredOptions = t: + if (t == "caldav" || t == "carddav" || t == "http") then + [ "url" ] + else if (t == "filesystem") then [ + "path" + "fileExt" + ] else if (t == "singlefile") then + [ "path" ] + else if (t == "google_calendar" || t == "google_contacts") then [ + "tokenFile" + "clientId" + "clientSecret" + ] else + throw "Unrecognized storage type: ${t}"; + + allowedOptions = let + remoteOptions = [ + "userName" + "userNameCommand" + "password" + "passwordCommand" + "passwordPrompt" + "verify" + "verifyFingerprint" + "auth" + "authCert" + "userAgent" + ]; + in t: + if (t == "caldav") then + [ "timeRange" "itemTypes" ] ++ remoteOptions + else if (t == "carddav" || t == "http") then + remoteOptions + else if (t == "filesystem") then [ + "fileExt" + "encoding" + "postHook" + ] else if (t == "singlefile") then + [ "encoding" ] + else if (t == "google_calendar") then [ + "timeRange" + "itemTypes" + "clientIdCommand" + "clientSecretCommand" + ] else if (t == "google_contacts") then [ + "clientIdCommand" + "clientSecretCommand" + ] else + throw "Unrecognized storage type: ${t}"; + + assertStorage = n: v: + let allowed = allowedOptions v.type ++ (requiredOptions v.type); + in mapAttrsToList (a: v': + [{ + assertion = (elem a allowed); + message = '' + Storage ${n} is of type ${v.type}. Option + ${a} is not allowed for this type. + ''; + }] ++ (let + required = + filter (a: !hasAttr "${a}Command" v) (requiredOptions v.type); + in map (a: [{ + assertion = hasAttr a v; + message = '' + Storage ${n} is of type ${v.type}, but required + option ${a} is not set. + ''; + }]) required)) (removeAttrs v [ "type" "_module" ]); + + storageAssertions = flatten (mapAttrsToList assertStorage localStorages) + ++ flatten (mapAttrsToList assertStorage remoteStorages); + + in storageAssertions; + home.packages = [ cfg.package ]; + xdg.configFile."vdirsyncer/config".source = configFile; + }; +} diff --git a/third_party/home-manager/modules/programs/vim-vint.nix b/third_party/home-manager/modules/programs/vim-vint.nix new file mode 100644 index 0000000000..9565a8cb32 --- /dev/null +++ b/third_party/home-manager/modules/programs/vim-vint.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.vim-vint; + + yamlFormat = pkgs.formats.yaml { }; + +in { + meta.maintainers = [ maintainers.tomodachi94 ]; + + options = { + programs.vim-vint = { + enable = mkEnableOption "the Vint linter for Vimscript"; + package = mkPackageOption pkgs "vim-vint" { }; + + settings = mkOption { + type = yamlFormat.type; + default = { }; + description = '' + Configuration written to + {file}`$XDG_CONFIG_HOME/.vintrc.yaml` + ''; + }; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + xdg.configFile.".vintrc.yaml".source = + yamlFormat.generate "vim-vint-config" cfg.settings; + }; +} diff --git a/third_party/home-manager/modules/programs/vim.nix b/third_party/home-manager/modules/programs/vim.nix index e4d993a619..2f13caeee5 100644 --- a/third_party/home-manager/modules/programs/vim.nix +++ b/third_party/home-manager/modules/programs/vim.nix @@ -71,9 +71,7 @@ in { example = literalExpression "[ pkgs.vimPlugins.YankRing ]"; description = '' List of vim plugins to install. To get a list of supported plugins run: - nix-env -f '<nixpkgs>' -qaP -A vimPlugins. - - + {command}`nix-env -f '' -qaP -A vimPlugins`. Note: String values are deprecated, please use actual packages. ''; @@ -94,18 +92,14 @@ in { corresponding values must be among the following supported options. - ${concatStringsSep "\n" (mapAttrsToList (n: v: '' - - ${n} - ${v.description} - + {var}`${n}` + : ${v.description} '') knownSettings)} - See the Vim documentation for detailed descriptions of these - options. Note, use extraConfig to - manually set any options not listed above. + options. Use [](#opt-programs.vim.extraConfig) to manually + set any options not listed above. ''; }; @@ -137,8 +131,8 @@ in { type = types.bool; default = false; description = '' - Whether to configure vim as the default - editor using the EDITOR environment variable. + Whether to configure {command}`vim` as the default + editor using the {env}`EDITOR` environment variable. ''; }; }; diff --git a/third_party/home-manager/modules/programs/vscode.nix b/third_party/home-manager/modules/programs/vscode.nix index 27faf39bc4..5ea6be8b49 100644 --- a/third_party/home-manager/modules/programs/vscode.nix +++ b/third_party/home-manager/modules/programs/vscode.nix @@ -7,6 +7,7 @@ let cfg = config.programs.vscode; vscodePname = cfg.package.pname; + vscodeVersion = cfg.package.version; jsonFormat = pkgs.formats.json { }; @@ -31,9 +32,18 @@ let tasksFilePath = "${userDir}/tasks.json"; keybindingsFilePath = "${userDir}/keybindings.json"; + snippetDir = "${userDir}/snippets"; + # TODO: On Darwin where are the extensions? extensionPath = ".${extensionDir}/extensions"; + extensionJson = pkgs.vscode-utils.toExtensionJson cfg.extensions; + extensionJsonFile = pkgs.writeTextFile { + name = "extensions-json"; + destination = "/share/vscode/extensions/extensions.json"; + text = extensionJson; + }; + mergedUserSettings = cfg.userSettings // optionalAttrs (!cfg.enableUpdateCheck) { "update.mode" = "none"; } // optionalAttrs (!cfg.enableExtensionUpdateCheck) { @@ -55,6 +65,7 @@ in { package = mkOption { type = types.package; default = pkgs.vscode; + defaultText = literalExpression "pkgs.vscode"; example = literalExpression "pkgs.vscodium"; description = '' Version of Visual Studio Code to install. @@ -88,7 +99,7 @@ in { ''; description = '' Configuration written to Visual Studio Code's - settings.json. + {file}`settings.json`. ''; }; @@ -109,7 +120,7 @@ in { ''; description = '' Configuration written to Visual Studio Code's - tasks.json. + {file}`tasks.json`. ''; }; @@ -156,7 +167,7 @@ in { ''; description = '' Keybindings written to Visual Studio Code's - keybindings.json. + {file}`keybindings.json`. ''; }; @@ -178,6 +189,34 @@ in { or by Visual Studio Code. ''; }; + + languageSnippets = mkOption { + type = jsonFormat.type; + default = { }; + example = { + haskell = { + fixme = { + prefix = [ "fixme" ]; + body = [ "$LINE_COMMENT FIXME: $0" ]; + description = "Insert a FIXME remark"; + }; + }; + }; + description = "Defines user snippets for different languages."; + }; + + globalSnippets = mkOption { + type = jsonFormat.type; + default = { }; + example = { + fixme = { + prefix = [ "fixme" ]; + body = [ "$LINE_COMMENT FIXME: $0" ]; + description = "Insert a FIXME remark"; + }; + }; + description = "Defines global user snippets."; + }; }; }; @@ -211,15 +250,42 @@ in { else builtins.attrNames (builtins.readDir (ext + "/${subDir}"))); in if cfg.mutableExtensionsDir then - mkMerge (concatMap toPaths cfg.extensions) + mkMerge (concatMap toPaths cfg.extensions + ++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0") { + # Whenever our immutable extensions.json changes, force VSCode to regenerate + # extensions.json with both mutable and immutable extensions. + "${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 + ''; + }; + }) else { "${extensionPath}".source = let combinedExtensionsDrv = pkgs.buildEnv { name = "vscode-extensions"; - paths = cfg.extensions; + paths = cfg.extensions + ++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0") + extensionJsonFile; }; in "${combinedExtensionsDrv}/${subDir}"; })) + + (mkIf (cfg.globalSnippets != { }) + (let globalSnippets = "${snippetDir}/global.code-snippets"; + in { + "${globalSnippets}".source = + jsonFormat.generate "user-snippet-global.code-snippets" + cfg.globalSnippets; + })) + + (lib.mapAttrs' (language: snippet: + lib.nameValuePair "${snippetDir}/${language}.json" { + source = jsonFormat.generate "user-snippet-${language}.json" snippet; + }) cfg.languageSnippets) ]; }; } diff --git a/third_party/home-manager/modules/programs/vscode/haskell.nix b/third_party/home-manager/modules/programs/vscode/haskell.nix index 7fe3235d82..63ecd18e28 100644 --- a/third_party/home-manager/modules/programs/vscode/haskell.nix +++ b/third_party/home-manager/modules/programs/vscode/haskell.nix @@ -37,10 +37,13 @@ in { defaultText = defaultHieNixExeText; description = '' The path to the Haskell IDE Engine executable. - + Because hie-nix is not packaged in Nixpkgs, you need to add it as an overlay or set this option. Example overlay configuration: - ${exampleOverlay} + + ```nix + ${exampleOverlay} + ``` ''; example = literalExpression '' (import ~/src/haskell-ide-engine {}).hies + "/bin/hie-wrapper"; diff --git a/third_party/home-manager/modules/programs/watson.nix b/third_party/home-manager/modules/programs/watson.nix index 54cfbc135f..b30dec0960 100644 --- a/third_party/home-manager/modules/programs/watson.nix +++ b/third_party/home-manager/modules/programs/watson.nix @@ -23,7 +23,7 @@ in { type = types.package; default = pkgs.watson; defaultText = literalExpression "pkgs.watson"; - description = "Package providing the watson."; + description = "Package providing the {command}`watson`."; }; enableBashIntegration = mkEnableOption "watson's bash integration" // { @@ -43,10 +43,10 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/watson/config on Linux or - $HOME/Library/Application Support/watson/config on Darwin. - - See + {file}`$XDG_CONFIG_HOME/watson/config` on Linux or + {file}`$HOME/Library/Application Support/watson/config` on Darwin. + + See for an example configuration. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/programs/waybar.nix b/third_party/home-manager/modules/programs/waybar.nix index 12002d546d..efc34a3074 100644 --- a/third_party/home-manager/modules/programs/waybar.nix +++ b/third_party/home-manager/modules/programs/waybar.nix @@ -27,8 +27,8 @@ let type = nullOr (enum [ "top" "bottom" ]); default = null; description = '' - Decide if the bar is displayed in front ("top") - of the windows or behind ("bottom"). + Decide if the bar is displayed in front (`"top"`) + of the windows or behind (`"bottom"`). ''; example = "top"; }; @@ -152,7 +152,7 @@ in { default = pkgs.waybar; defaultText = literalExpression "pkgs.waybar"; description = '' - Waybar package to use. Set to null to use the default package. + Waybar package to use. Set to `null` to use the default package. ''; }; @@ -160,8 +160,7 @@ in { type = either (listOf waybarBarConfig) (attrsOf waybarBarConfig); default = [ ]; description = '' - Configuration for Waybar, see + Configuration for Waybar, see for supported values. ''; example = literalExpression '' @@ -203,25 +202,22 @@ in { example = "sway-session.target"; description = '' The systemd target that will automatically start the Waybar service. - - - When setting this value to "sway-session.target", - make sure to also enable , + + When setting this value to `"sway-session.target"`, + make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`, otherwise the service may never be started. ''; }; style = mkOption { - type = nullOr (either path str); + type = nullOr (either path lines); default = null; description = '' CSS style of the bar. - - - See + + See for the documentation. - - + If the value is set to a path literal, then the path will be used as the css file. ''; example = '' diff --git a/third_party/home-manager/modules/programs/wezterm.nix b/third_party/home-manager/modules/programs/wezterm.nix index 94e2f89855..b66028d6d7 100644 --- a/third_party/home-manager/modules/programs/wezterm.nix +++ b/third_party/home-manager/modules/programs/wezterm.nix @@ -7,7 +7,13 @@ let cfg = config.programs.wezterm; tomlFormat = pkgs.formats.toml { }; + shellIntegrationStr = '' + source "${cfg.package}/etc/profile.d/wezterm.sh" + ''; + in { + meta.maintainers = [ hm.maintainers.blmhemu ]; + options.programs.wezterm = { enable = mkEnableOption "wezterm"; @@ -40,8 +46,8 @@ in { ''; description = '' Extra configuration written to - $XDG_CONFIG_HOME/wezterm/wezterm.lua. See - + {file}`$XDG_CONFIG_HOME/wezterm/wezterm.lua`. See + how to configure. ''; }; @@ -70,13 +76,20 @@ in { ''; description = '' Attribute set of additional color schemes to be written to - $XDG_CONFIG_HOME/wezterm/colors, where each key is + {file}`$XDG_CONFIG_HOME/wezterm/colors`, where each key is taken as the name of the corresponding color scheme. See - + for more details of the TOML color scheme format. ''; }; + enableBashIntegration = mkEnableOption "WezTerm's Bash integration" // { + default = true; + }; + + enableZshIntegration = mkEnableOption "WezTerm's Zsh integration" // { + default = true; + }; }; config = mkIf cfg.enable { @@ -97,5 +110,9 @@ in { nameValuePair "wezterm/colors/${name}.toml" { source = tomlFormat.generate "${name}.toml" { colors = value; }; }) cfg.colorSchemes; + + programs.bash.initExtra = + mkIf cfg.enableBashIntegration shellIntegrationStr; + programs.zsh.initExtra = mkIf cfg.enableZshIntegration shellIntegrationStr; }; } diff --git a/third_party/home-manager/modules/programs/wlogout.nix b/third_party/home-manager/modules/programs/wlogout.nix new file mode 100644 index 0000000000..b01f8a0ae0 --- /dev/null +++ b/third_party/home-manager/modules/programs/wlogout.nix @@ -0,0 +1,148 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) all filterAttrs isStorePath literalExpression types; + inherit (lib.options) mkEnableOption mkPackageOption mkOption; + inherit (lib.modules) mkIf; + inherit (lib.strings) concatMapStrings; + inherit (builtins) toJSON; + + cfg = config.programs.wlogout; + + jsonFormat = pkgs.formats.json { }; + + wlogoutLayoutConfig = with types; + submodule { + freeformType = jsonFormat.type; + + options = { + label = mkOption { + type = str; + default = ""; + example = "shutdown"; + description = "CSS label of button."; + }; + + action = mkOption { + type = either path str; + default = ""; + example = "systemctl poweroff"; + description = "Command to execute when clicked."; + }; + + text = mkOption { + type = str; + default = ""; + example = "Shutdown"; + description = "Text displayed on button."; + }; + + keybind = mkOption { + type = str; + default = ""; + example = "s"; + description = "Keyboard character to trigger this action."; + }; + + height = mkOption { + type = nullOr (numbers.between 0 1); + default = null; + example = 0.5; + description = "Relative height of tile."; + }; + + width = mkOption { + type = nullOr (numbers.between 0 1); + default = null; + example = 0.5; + description = "Relative width of tile."; + }; + + circular = mkOption { + type = nullOr bool; + default = null; + example = true; + description = "Make button circular."; + }; + }; + }; +in { + meta.maintainers = [ lib.maintainers.Scrumplex ]; + + options.programs.wlogout = with lib.types; { + enable = mkEnableOption "wlogout"; + + package = mkPackageOption pkgs "wlogout" { }; + + layout = mkOption { + type = listOf wlogoutLayoutConfig; + default = [ ]; + description = '' + Layout configuration for wlogout, see + for supported values. + ''; + example = literalExpression '' + [ + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + ] + ''; + }; + + style = mkOption { + type = nullOr (either path str); + default = null; + 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. + ''; + example = '' + window { + background: #16191C; + } + + button { + color: #AAB2BF; + } + ''; + }; + }; + + config = let + # Removes nulls because wlogout ignores them. + # This is not recursive. + removeTopLevelNulls = filterAttrs (_: v: v != null); + cleanJSON = foo: toJSON (removeTopLevelNulls foo); + + # wlogout doesn't want a JSON array, it just wants a list of JSON objects + layoutJsons = map cleanJSON cfg.layout; + layoutContent = concatMapStrings (l: l + "\n") layoutJsons; + + in mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "programs.wlogout" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."wlogout/layout" = mkIf (cfg.layout != [ ]) { + source = pkgs.writeText "wlogout/layout" layoutContent; + }; + + xdg.configFile."wlogout/style.css" = mkIf (cfg.style != null) { + source = if builtins.isPath cfg.style || isStorePath cfg.style then + cfg.style + else + pkgs.writeText "wlogout/style.css" cfg.style; + }; + }; +} diff --git a/third_party/home-manager/modules/programs/wofi.nix b/third_party/home-manager/modules/programs/wofi.nix new file mode 100644 index 0000000000..1317716edd --- /dev/null +++ b/third_party/home-manager/modules/programs/wofi.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.wofi; + + toConfig = attrs: + '' + # Generated by Home Manager. + '' + generators.toKeyValue { } + (filterAttrs (name: value: value != null) attrs); +in { + meta.maintainers = [ maintainers.christoph-heiss ]; + + options.programs.wofi = { + enable = mkEnableOption + "wofi: a launcher/menu program for wlroots based wayland compositors such as sway"; + + package = mkPackageOption pkgs "wofi" { }; + + settings = mkOption { + default = { }; + type = types.attrs; + description = '' + Configuration options for wofi. See + {manpage}`wofi(5)`. + ''; + example = literalExpression '' + { + location = "bottom-right"; + allow_markup = true; + width = 250; + } + ''; + }; + + style = mkOption { + default = null; + type = types.nullOr types.str; + description = '' + CSS style for wofi to use as a stylesheet. See + {manpage}`wofi(7)`. + ''; + example = '' + * { + font-family: monospace; + } + + window { + background-color: #7c818c; + } + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "programs.wofi" pkgs platforms.linux) ]; + + home.packages = [ cfg.package ]; + + xdg.configFile = mkMerge [ + (mkIf (cfg.settings != { }) { + "wofi/config".text = toConfig cfg.settings; + }) + (mkIf (cfg.style != null) { "wofi/style.css".text = cfg.style; }) + ]; + }; +} diff --git a/third_party/home-manager/modules/programs/xmobar.nix b/third_party/home-manager/modules/programs/xmobar.nix index a29bea846a..267b308018 100644 --- a/third_party/home-manager/modules/programs/xmobar.nix +++ b/third_party/home-manager/modules/programs/xmobar.nix @@ -12,7 +12,7 @@ in { defaultText = literalExpression "pkgs.haskellPackages.xmobar"; type = types.package; description = '' - Package providing the xmobar binary. + Package providing the {command}`xmobar` binary. ''; }; @@ -42,9 +42,9 @@ in { type = types.lines; description = '' Extra configuration lines to add to - $XDG_CONFIG_HOME/xmobar/.xmobarrc. + {file}`$XDG_CONFIG_HOME/xmobar/.xmobarrc`. See - + for options. ''; }; diff --git a/third_party/home-manager/modules/programs/yt-dlp.nix b/third_party/home-manager/modules/programs/yt-dlp.nix index af74db16dc..3b8e9c709d 100644 --- a/third_party/home-manager/modules/programs/yt-dlp.nix +++ b/third_party/home-manager/modules/programs/yt-dlp.nix @@ -13,7 +13,7 @@ let "--${name} ${toString value}"); in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.yt-dlp = { enable = mkEnableOption "yt-dlp"; @@ -22,7 +22,7 @@ in { type = types.package; default = pkgs.yt-dlp; defaultText = literalExpression "pkgs.yt-dlp"; - description = "Package providing the yt-dlp tool."; + description = "Package providing the {command}`yt-dlp` tool."; }; settings = mkOption { @@ -39,12 +39,12 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/yt-dlp/config. - - Options must be specified in their long form, for - example, update = true; instead of U = true;. - Short options can be specified in the extraConfig option. - See + {file}`$XDG_CONFIG_HOME/yt-dlp/config`. + + Options must be specified in their "long form", for + example, `update = true;` instead of `U = true;`. + Short options can be specified in the `extraConfig` option. + See for explanation about possible values. ''; }; @@ -58,7 +58,7 @@ in { ''; description = '' Extra configuration to add to - $XDG_CONFIG_HOME/yt-dlp/config. + {file}`$XDG_CONFIG_HOME/yt-dlp/config`. ''; }; }; @@ -66,9 +66,11 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - xdg.configFile."yt-dlp/config" = mkIf (cfg.settings != { }) { - text = concatStringsSep "\n" - (remove "" (renderSettings cfg.settings ++ [ cfg.extraConfig ])) + "\n"; - }; + xdg.configFile."yt-dlp/config" = + mkIf (cfg.settings != { } || cfg.extraConfig != "") { + text = concatStringsSep "\n" + (remove "" (renderSettings cfg.settings ++ [ cfg.extraConfig ])) + + "\n"; + }; }; } diff --git a/third_party/home-manager/modules/programs/z-lua.nix b/third_party/home-manager/modules/programs/z-lua.nix index f8ff3b014d..37a8479eea 100644 --- a/third_party/home-manager/modules/programs/z-lua.nix +++ b/third_party/home-manager/modules/programs/z-lua.nix @@ -15,7 +15,7 @@ let }; in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.z-lua = { enable = mkEnableOption "z.lua"; diff --git a/third_party/home-manager/modules/programs/zathura.nix b/third_party/home-manager/modules/programs/zathura.nix index 769ec71020..ba34af5907 100644 --- a/third_party/home-manager/modules/programs/zathura.nix +++ b/third_party/home-manager/modules/programs/zathura.nix @@ -33,12 +33,9 @@ in { default = { }; type = with types; attrsOf (either str (either bool int)); description = '' - Add command options to zathura and make + Add {option}`:set` command options to zathura and make them permanent. See - - zathurarc - 5 - + {manpage}`zathurarc(5)` for the full list of options. ''; example = { @@ -51,17 +48,18 @@ in { default = { }; type = with types; attrsOf str; description = '' - Add mappings to zathura and make + Add {option}`:map` mappings to zathura and make them permanent. See - - zathurarc - 5 - + {manpage}`zathurarc(5)` for the full list of possible mappings. + + You can create a mode-specific mapping by specifying the mode before the key: + `"[normal] " = "scroll left";` ''; example = { D = "toggle_page_mode"; "" = "navigate next"; + "[fullscreen] " = "zoom in"; }; }; @@ -70,7 +68,7 @@ in { default = ""; description = '' Additional commands for zathura that will be added to the - zathurarc file. + {file}`zathurarc` file. ''; }; }; diff --git a/third_party/home-manager/modules/programs/zellij.nix b/third_party/home-manager/modules/programs/zellij.nix index 2cfa625daa..44a3d69f4c 100644 --- a/third_party/home-manager/modules/programs/zellij.nix +++ b/third_party/home-manager/modules/programs/zellij.nix @@ -7,11 +7,6 @@ let cfg = config.programs.zellij; yamlFormat = pkgs.formats.yaml { }; - configDir = if pkgs.stdenv.isDarwin then - "Library/Application Support/org.Zellij-Contributors.Zellij" - else - "${config.xdg.configHome}/zellij"; - in { meta.maintainers = [ hm.maintainers.mainrs ]; @@ -33,24 +28,57 @@ in { example = literalExpression '' { theme = "custom"; - themes.custom.fg = 5; + themes.custom.fg = "#ffffff"; } ''; description = '' Configuration written to - $XDG_CONFIG_HOME/zellij/config.yaml. - - See for the full + {file}`$XDG_CONFIG_HOME/zellij/config.yaml`. + + See for the full list of options. ''; }; + + enableBashIntegration = mkEnableOption "Bash integration" // { + default = false; + }; + + enableZshIntegration = mkEnableOption "Zsh integration" // { + default = false; + }; + + enableFishIntegration = mkEnableOption "Fish integration" // { + default = false; + }; }; config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.file."${configDir}/config.yaml" = mkIf (cfg.settings != { }) { - source = yamlFormat.generate "zellij.yaml" cfg.settings; - }; + # Zellij switched from yaml to KDL in version 0.32.0: + # https://github.com/zellij-org/zellij/releases/tag/v0.32.0 + xdg.configFile."zellij/config.yaml" = mkIf + (cfg.settings != { } && (versionOlder cfg.package.version "0.32.0")) { + source = yamlFormat.generate "zellij.yaml" cfg.settings; + }; + + xdg.configFile."zellij/config.kdl" = mkIf + (cfg.settings != { } && (versionAtLeast cfg.package.version "0.32.0")) { + text = lib.hm.generators.toKDL { } cfg.settings; + }; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 200 '' + eval "$(zellij setup --generate-auto-start bash)" + ''); + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 '' + eval "$(zellij setup --generate-auto-start zsh)" + ''); + + programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration + (mkOrder 200 '' + eval (zellij setup --generate-auto-start fish | string collect) + ''); }; } diff --git a/third_party/home-manager/modules/programs/zoxide.nix b/third_party/home-manager/modules/programs/zoxide.nix index 21bc9632ec..11ae353cc7 100644 --- a/third_party/home-manager/modules/programs/zoxide.nix +++ b/third_party/home-manager/modules/programs/zoxide.nix @@ -6,8 +6,10 @@ let cfg = config.programs.zoxide; + cfgOptions = concatStringsSep " " cfg.options; + in { - meta.maintainers = [ maintainers.marsam ]; + meta.maintainers = [ ]; options.programs.zoxide = { enable = mkEnableOption "zoxide"; @@ -53,27 +55,42 @@ in { Whether to enable Fish integration. ''; }; + + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Nushell integration. + ''; + }; }; config = mkIf cfg.enable { home.packages = [ cfg.package ]; programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - eval "$(${cfg.package}/bin/zoxide init bash ${ - concatStringsSep " " cfg.options - })" + eval "$(${cfg.package}/bin/zoxide init bash ${cfgOptions})" ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' - eval "$(${cfg.package}/bin/zoxide init zsh ${ - concatStringsSep " " cfg.options - })" + eval "$(${cfg.package}/bin/zoxide init zsh ${cfgOptions})" ''; programs.fish.shellInit = mkIf cfg.enableFishIntegration '' - ${cfg.package}/bin/zoxide init fish ${ - concatStringsSep " " cfg.options - } | source + ${cfg.package}/bin/zoxide init fish ${cfgOptions} | source ''; + + programs.nushell = mkIf cfg.enableNushellIntegration { + extraEnv = '' + let zoxide_cache = "${config.xdg.cacheHome}/zoxide" + if not ($zoxide_cache | path exists) { + mkdir $zoxide_cache + } + ${cfg.package}/bin/zoxide init nushell ${cfgOptions} | save --force ${config.xdg.cacheHome}/zoxide/init.nu + ''; + extraConfig = '' + source ${config.xdg.cacheHome}/zoxide/init.nu + ''; + }; }; } diff --git a/third_party/home-manager/modules/programs/zplug.nix b/third_party/home-manager/modules/programs/zplug.nix index 7c731444a7..94e3173a40 100644 --- a/third_party/home-manager/modules/programs/zplug.nix +++ b/third_party/home-manager/modules/programs/zplug.nix @@ -47,7 +47,7 @@ in { programs.zsh.initExtraBeforeCompInit = '' export ZPLUG_HOME=${cfg.zplugHome} - source ${pkgs.zplug}/init.zsh + source ${pkgs.zplug}/share/zplug/init.zsh ${optionalString (cfg.plugins != [ ]) '' ${concatStrings (map (plugin: '' diff --git a/third_party/home-manager/modules/programs/zsh.nix b/third_party/home-manager/modules/programs/zsh.nix index 9ffe9dfac3..58f700df61 100644 --- a/third_party/home-manager/modules/programs/zsh.nix +++ b/third_party/home-manager/modules/programs/zsh.nix @@ -79,6 +79,16 @@ let ''; }; + ignoreAllDups = mkOption { + type = types.bool; + default = false; + description = '' + If a new command line being added to the history list + duplicates an older one, the older command is removed + from the list (even if it is not the previous event). + ''; + }; + ignoreSpace = mkOption { type = types.bool; default = true; @@ -115,7 +125,7 @@ let description = '' Path to the plugin folder. - Will be added to fpath and PATH. + Will be added to {env}`fpath` and {env}`PATH`. ''; }; @@ -124,7 +134,7 @@ let description = '' The name of the plugin. - Don't forget to add + Don't forget to add {option}`file` if the script name does not follow convention. ''; }; @@ -142,6 +152,8 @@ let options = { enable = mkEnableOption "oh-my-zsh"; + package = mkPackageOption pkgs "oh-my-zsh" { }; + plugins = mkOption { default = []; example = [ "git" "sudo" ]; @@ -157,7 +169,7 @@ let example = "$HOME/my_customizations"; description = '' Path to a custom oh-my-zsh package to override config of - oh-my-zsh. See + oh-my-zsh. See for more information. ''; }; @@ -188,19 +200,36 @@ let options = { enable = mkEnableOption "history substring search"; searchUpKey = mkOption { - type = types.str; - default = "^[[A"; + type = with types; either (listOf str) str ; + default = [ "^[[A" ]; description = '' - The key code to be used when searching up. - The default of ^[[A corresponds to the UP key. + The key codes to be used when searching up. + The default of `^[[A` corresponds to the UP key. ''; }; searchDownKey = mkOption { - type = types.str; - default = "^[[B"; + type = with types; either (listOf str) str ; + default = [ "^[[B" ]; description = '' - The key code to be used when searching down. - The default of ^[[B corresponds to the DOWN key. + The key codes to be used when searching down. + The default of `^[[B` corresponds to the DOWN key. + ''; + }; + }; + }; + + syntaxHighlightingModule = types.submodule { + options = { + enable = mkEnableOption "zsh syntax highlighting"; + + package = mkPackageOption pkgs "zsh-syntax-highlighting" { }; + + styles = mkOption { + type = types.attrsOf types.str; + default = {}; + description = '' + Custom styles for syntax highlighting. + See each highlighter's options: ''; }; }; @@ -209,10 +238,16 @@ let in { + imports = [ + (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) + ]; + options = { programs.zsh = { enable = mkEnableOption "Z shell (Zsh)"; + package = mkPackageOption pkgs "zsh" { }; + autocd = mkOption { default = null; description = '' @@ -224,7 +259,7 @@ in cdpath = mkOption { default = []; description = '' - List of paths to autocomplete calls to `cd`. + List of paths to autocomplete calls to {command}`cd`. ''; type = types.listOf types.str; }; @@ -264,7 +299,7 @@ in } ''; description = '' - Similar to , + Similar to [](#opt-programs.zsh.shellAliases), but are substituted anywhere on a line. ''; type = types.attrsOf types.str; @@ -289,9 +324,9 @@ in default = true; description = '' Enable zsh completion. Don't forget to add - + ```nix environment.pathsToLink = [ "/share/zsh" ]; - + ``` to your system configuration to get completion for system packages (e.g. systemd). ''; type = types.bool; @@ -308,9 +343,10 @@ in description = "Enable zsh autosuggestions"; }; - enableSyntaxHighlighting = mkOption { - default = false; - description = "Enable zsh syntax highlighting"; + syntaxHighlighting = mkOption { + type = syntaxHighlightingModule; + default = {}; + description = "Options related to zsh-syntax-highlighting."; }; historySubstringSearch = mkOption { @@ -342,43 +378,43 @@ in initExtraBeforeCompInit = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zshrc before compinit."; + description = "Extra commands that should be added to {file}`.zshrc` before compinit."; }; initExtra = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zshrc."; + description = "Extra commands that should be added to {file}`.zshrc`."; }; initExtraFirst = mkOption { default = ""; type = types.lines; - description = "Commands that should be added to top of .zshrc."; + description = "Commands that should be added to top of {file}`.zshrc`."; }; envExtra = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zshenv."; + description = "Extra commands that should be added to {file}`.zshenv`."; }; profileExtra = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zprofile."; + description = "Extra commands that should be added to {file}`.zprofile`."; }; loginExtra = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zlogin."; + description = "Extra commands that should be added to {file}`.zlogin`."; }; logoutExtra = mkOption { default = ""; type = types.lines; - description = "Extra commands that should be added to .zlogout."; + description = "Extra commands that should be added to {file}`.zlogout`."; }; plugins = mkOption { @@ -408,7 +444,7 @@ in } ] ''; - description = "Plugins to source in .zshrc."; + description = "Plugins to source in {file}`.zshrc`."; }; oh-my-zsh = mkOption { @@ -422,7 +458,7 @@ in default = {}; example = { POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=["dir" "vcs"]; }; description = '' - Extra local variables defined at the top of .zshrc. + Extra local variables defined at the top of {file}`.zshrc`. ''; }; }; @@ -447,7 +483,7 @@ in (mkIf cfg.oh-my-zsh.enable { home.file."${relToDotDir ".zshenv"}".text = '' - ZSH="${pkgs.oh-my-zsh}/share/oh-my-zsh"; + ZSH="${cfg.oh-my-zsh.package}/share/oh-my-zsh"; ZSH_CACHE_DIR="${config.xdg.cacheHome}/oh-my-zsh"; ''; }) @@ -480,9 +516,9 @@ in } { - home.packages = with pkgs; [ zsh ] - ++ optional cfg.enableCompletion nix-zsh-completions - ++ optional cfg.oh-my-zsh.enable oh-my-zsh; + home.packages = [ cfg.package ] + ++ optional cfg.enableCompletion pkgs.nix-zsh-completions + ++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package; home.file."${relToDotDir ".zshrc"}".text = concatStringsSep "\n" ([ cfg.initExtraFirst @@ -497,7 +533,7 @@ in fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions) done - HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help" + HELPDIR="${cfg.package}/share/zsh/$ZSH_VERSION/help" '' (optionalString (cfg.defaultKeymap != null) '' @@ -562,6 +598,7 @@ in setopt HIST_FCNTL_LOCK ${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS + ${if cfg.history.ignoreAllDups then "setopt" else "unsetopt"} HIST_IGNORE_ALL_DUPS ${if cfg.history.ignoreSpace then "setopt" else "unsetopt"} HIST_IGNORE_SPACE ${if cfg.history.expireDuplicatesFirst then "setopt" else "unsetopt"} HIST_EXPIRE_DUPS_FIRST ${if cfg.history.share then "setopt" else "unsetopt"} SHARE_HISTORY @@ -580,19 +617,31 @@ in ${dirHashesStr} '') - (optionalString cfg.enableSyntaxHighlighting + (optionalString cfg.syntaxHighlighting.enable # Load zsh-syntax-highlighting after all custom widgets have been created # https://github.com/zsh-users/zsh-syntax-highlighting#faq - "source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" - ) + '' + source ${cfg.syntaxHighlighting.package}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList + (name: value: "ZSH_HIGHLIGHT_STYLES+=(${lib.escapeShellArg name} ${lib.escapeShellArg value})") + cfg.syntaxHighlighting.styles + )} + '') (optionalString (cfg.historySubstringSearch.enable or false) # Load zsh-history-substring-search after zsh-syntax-highlighting # https://github.com/zsh-users/zsh-history-substring-search#usage '' source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh - bindkey '${cfg.historySubstringSearch.searchUpKey}' history-substring-search-up - bindkey '${cfg.historySubstringSearch.searchDownKey}' history-substring-search-down + ${lib.concatMapStringsSep "\n" + (upKey: "bindkey '${upKey}' history-substring-search-up") + (lib.toList cfg.historySubstringSearch.searchUpKey) + } + ${lib.concatMapStringsSep "\n" + (downKey: "bindkey '${downKey}' history-substring-search-down") + (lib.toList cfg.historySubstringSearch.searchDownKey) + } '') ]); } diff --git a/third_party/home-manager/modules/programs/zsh/prezto.nix b/third_party/home-manager/modules/programs/zsh/prezto.nix index 17680ff259..ddf862f987 100644 --- a/third_party/home-manager/modules/programs/zsh/prezto.nix +++ b/third_party/home-manager/modules/programs/zsh/prezto.nix @@ -26,21 +26,23 @@ let type = types.nullOr types.bool; default = true; example = false; - description = "Color output (auto set to 'no' on dumb terminals)"; + description = '' + Color output (automatically set to `false` on dumb terminals). + ''; }; pmoduleDirs = mkOption { type = types.listOf types.path; default = [ ]; example = [ "$HOME/.zprezto-contrib" ]; - description = "Add additional directories to load prezto modules from"; + description = "Add additional directories to load prezto modules from."; }; extraConfig = mkOption { type = types.lines; default = ""; description = '' - Additional configuration to add to .zpreztorc. + Additional configuration to add to {file}`.zpreztorc`. ''; }; @@ -48,14 +50,18 @@ let type = types.listOf types.str; default = [ ]; example = [ "attr" "stat" ]; - description = "Set the Zsh modules to load (man zshmodules)."; + description = '' + Set the Zsh modules to load ({manpage}`zshmodules(1)`). + ''; }; extraFunctions = mkOption { type = types.listOf types.str; default = [ ]; example = [ "zargs" "zmv" ]; - description = "Set the Zsh functions to load (man zshcontrib)."; + description = '' + Set the Zsh functions to load ({manpage}`zshcontrib(1)`). + ''; }; pmodules = mkOption { @@ -86,8 +92,10 @@ let type = types.listOf types.str; default = [ ]; example = [ "0.0.0.0" "127.0.0.1" ]; - description = - "Set the entries to ignore in static */etc/hosts* for host completion."; + description = '' + Set the entries to ignore in static {file}`/etc/hosts` for + host completion. + ''; }; editor = { @@ -95,21 +103,25 @@ let type = types.nullOr (types.enum [ "emacs" "vi" ]); default = "emacs"; example = "vi"; - description = "Set the key mapping style to 'emacs' or 'vi'."; + description = '' + Set the key mapping style to `emacs` or `vi`. + ''; }; dotExpansion = mkOption { type = types.nullOr types.bool; default = null; example = true; - description = "Auto convert .... to ../.."; + description = '' + Automatically convert `....` to `../..` + ''; }; promptContext = mkOption { type = types.nullOr types.bool; default = null; example = true; - description = "Allow the zsh prompt context to be shown."; + description = "Allow the Zsh prompt context to be shown."; }; }; @@ -117,8 +129,10 @@ let type = types.nullOr (types.enum [ "dirty" "untracked" "all" "none" ]); default = null; example = "all"; - description = - "Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'."; + description = '' + Ignore submodules when they are `dirty`, `untracked`, `all`, + or `none`. + ''; }; gnuUtility.prefix = mkOption { @@ -154,8 +168,10 @@ let type = types.nullOr types.str; default = null; example = "manpages"; - description = - "Set the keyword used by `mand` to open man pages in Dash.app"; + description = '' + Set the keyword used by {command}`mand` to open man pages + in Dash.app. + ''; }; prompt = { @@ -164,8 +180,10 @@ let default = "sorin"; example = "pure"; description = '' - Set the prompt theme to load. Setting it to 'random' - loads a random theme. Auto set to 'off' on dumb terminals.''; + Set the prompt theme to load. Setting it to `random` + loads a random theme. Automatically set to `off` on dumb + terminals. + ''; }; pwdLength = mkOption { @@ -174,8 +192,10 @@ let example = "short"; description = '' Set the working directory prompt display length. By - default, it is set to 'short'. Set it to 'long' (without '~' expansion) for - longer or 'full' (with '~' expansion) for even longer prompt display.''; + default, it is set to `short`. Set it to `long` (without `~` + expansion) for longer or `full` (with `~` expansion) for + even longer prompt display. + ''; }; showReturnVal = mkOption { @@ -184,7 +204,8 @@ let example = true; description = '' Set the prompt to display the return code along with an - indicator for non-zero return codes. This is not supported by all prompts.''; + indicator for non-zero return codes. This is not supported by all prompts. + ''; }; }; @@ -244,7 +265,8 @@ let example = [ "main" "brackets" "pattern" "line" "cursor" "root" ]; description = '' Set syntax highlighters. By default, only the main - highlighter is enabled.''; + highlighter is enabled. + ''; }; styles = mkOption { @@ -333,14 +355,17 @@ let default = null; example = true; description = '' - Enabled safe options. This aliases cp, ln, mv and rm so - that they prompt before deleting or overwriting files. Set to 'no' to disable - this safer behavior.''; + Enabled safe options. This aliases {command}`cp`, + {command}`ln`, {command}`mv` and {command}`rm` so that they + prompt before deleting or overwriting files. Set to `no` to + disable this safer behavior. + ''; }; }; }; in { + meta.maintainers = [ maintainers.nickhu ]; options = { programs.zsh = { prezto = mkOption { @@ -443,7 +468,9 @@ in { zstyle ':prezto:module:prompt' pwd-length '${cfg.prompt.pwdLength}' ''} ${optionalString (cfg.prompt.showReturnVal != null) '' - zstyle ':prezto:module:prompt' show-return-val '${cfg.prompt.showReturnVal}' + zstyle ':prezto:module:prompt' show-return-val '${ + lib.hm.booleans.yesNo cfg.prompt.showReturnVal + }' ''} ${optionalString (cfg.python.virtualenvAutoSwitch != null) '' zstyle ':prezto:module:python:virtualenv' auto-switch '${ diff --git a/third_party/home-manager/modules/services/autorandr.nix b/third_party/home-manager/modules/services/autorandr.nix new file mode 100644 index 0000000000..64e6008e8a --- /dev/null +++ b/third_party/home-manager/modules/services/autorandr.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.services.autorandr; + +in { + + meta.maintainers = [ maintainers.GaetanLepage ]; + + options = { + services.autorandr = { + enable = mkEnableOption "" // { + description = '' + Whether to enable the Autorandr systemd service. + This module is complementary to {option}`programs.autorandr` + which handles the configuration (profiles). + ''; + }; + + ignoreLid = mkOption { + default = false; + type = types.bool; + description = + "Treat outputs as connected even if their lids are closed."; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.autorandr" pkgs + lib.platforms.linux) + ]; + + systemd.user.services.autorandr = { + Unit = { + Description = "autorandr"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + Type = "oneshot"; + ExecStart = "${pkgs.autorandr}/bin/autorandr --change ${ + optionalString cfg.ignoreLid "--ignore-lid" + }"; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; +} diff --git a/third_party/home-manager/modules/services/avizo.nix b/third_party/home-manager/modules/services/avizo.nix new file mode 100644 index 0000000000..1bf1c1e680 --- /dev/null +++ b/third_party/home-manager/modules/services/avizo.nix @@ -0,0 +1,76 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.avizo; + settingsFormat = pkgs.formats.ini { }; +in { + meta.maintainers = [ hm.maintainers.pltanton ]; + + options.services.avizo = { + enable = mkEnableOption "avizo, a simple notification daemon"; + + settings = mkOption { + type = (pkgs.formats.ini { }).type; + default = { }; + example = literalExpression '' + { + default = { + time = 1.0; + y-offset = 0.5; + fade-in = 0.1; + fade-out = 0.2; + padding = 10; + }; + } + ''; + description = '' + The settings that will be written to the avizo configuration file. + ''; + }; + + package = mkOption { + type = types.package; + default = pkgs.avizo; + defaultText = literalExpression "pkgs.avizo"; + example = literalExpression '' + pkgs.avizo.overrideAttrs (final: prev: { + patchPhase = "cp ''${./images}/*.png data/images/"; + }) + ''; + description = "The `avizo` package to use."; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ (hm.assertions.assertPlatform "services.avizo" pkgs platforms.linux) ]; + + xdg.configFile."avizo/config.ini" = mkIf (cfg.settings != { }) { + source = settingsFormat.generate "avizo-config.ini" cfg.settings; + }; + + home.packages = [ cfg.package ]; + + systemd.user = { + services.avizo = { + Unit = { + Description = "Volume/backlight OSD indicator"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; + Documentation = "man:avizo(1)"; + }; + + Service = { + Type = "simple"; + ExecStart = "${cfg.package}/bin/avizo-service"; + Restart = "always"; + }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/barrier.nix b/third_party/home-manager/modules/services/barrier.nix index b619cb2870..513a7e749a 100644 --- a/third_party/home-manager/modules/services/barrier.nix +++ b/third_party/home-manager/modules/services/barrier.nix @@ -30,8 +30,8 @@ in { type = types.str; description = '' Server to connect to formatted as - <host>[:<port>]. - Port defaults to 24800. + `[:]`. + Port defaults to `24800`. ''; }; @@ -46,8 +46,8 @@ in { default = [ "-f" ]; defaultText = literalExpression ''[ "-f" ]''; description = '' - Additional flags to pass to barrierc. - See barrierc --help. + Additional flags to pass to {command}`barrierc`. + See {command}`barrierc --help`. ''; }; diff --git a/third_party/home-manager/modules/services/batsignal.nix b/third_party/home-manager/modules/services/batsignal.nix new file mode 100644 index 0000000000..4f209f1e04 --- /dev/null +++ b/third_party/home-manager/modules/services/batsignal.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.services.batsignal; + +in { + meta.maintainers = with lib.maintainers; [ kranzes ]; + + options = { + services.batsignal = { + enable = lib.mkEnableOption "Batsignal Battery Daemon"; + + package = lib.mkPackageOption pkgs "batsignal" { }; + + extraArgs = lib.mkOption { + type = with lib.types; listOf str; + default = [ ]; + description = '' + Extra arguments to be passed to the batsignal executable. + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.batsignal" pkgs + lib.platforms.linux) + ]; + + systemd.user.services.batsignal = { + Unit = { + Description = "batsignal - battery monitor daemon"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + Type = "simple"; + ExecStart = + "${lib.getExe cfg.package} ${lib.escapeShellArgs cfg.extraArgs}"; + Restart = "on-failure"; + RestartSec = 1; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; +} diff --git a/third_party/home-manager/modules/services/betterlockscreen.nix b/third_party/home-manager/modules/services/betterlockscreen.nix index b4b28b5f98..c64ca08a28 100644 --- a/third_party/home-manager/modules/services/betterlockscreen.nix +++ b/third_party/home-manager/modules/services/betterlockscreen.nix @@ -15,21 +15,21 @@ in { type = types.package; default = pkgs.betterlockscreen; defaultText = literalExpression "pkgs.betterlockscreen"; - description = "Package providing betterlockscreen."; + description = "Package providing {command}`betterlockscreen`."; }; arguments = mkOption { type = types.listOf types.str; default = [ ]; description = - "List of arguments appended to ./betterlockscreen --lock [args]"; + "List of arguments appended to `./betterlockscreen --lock [args]`"; }; inactiveInterval = mkOption { type = types.int; default = 10; description = '' - Value used for . + Value used for {option}`services.screen-locker.inactiveInterval`. ''; }; diff --git a/third_party/home-manager/modules/services/blueman-applet.nix b/third_party/home-manager/modules/services/blueman-applet.nix index 460dd1677c..5211534c4b 100644 --- a/third_party/home-manager/modules/services/blueman-applet.nix +++ b/third_party/home-manager/modules/services/blueman-applet.nix @@ -8,19 +8,24 @@ with lib; enable = mkEnableOption "" // { description = '' Whether to enable the Blueman applet. - - Note, for the applet to work, the 'blueman' service should + + Note that for the applet to work, the `blueman` service should be enabled system-wide. You can enable it in the system configuration using - - services.blueman.enable = true; - + ```nix + services.blueman.enable = true; + ``` ''; }; }; }; config = mkIf config.services.blueman-applet.enable { + assertions = [ + (hm.assertions.assertPlatform "services.blueman-applet" pkgs + platforms.linux) + ]; + systemd.user.services.blueman-applet = { Unit = { Description = "Blueman applet"; diff --git a/third_party/home-manager/modules/services/borgmatic.nix b/third_party/home-manager/modules/services/borgmatic.nix index f5368cdfca..1e18139461 100644 --- a/third_party/home-manager/modules/services/borgmatic.nix +++ b/third_party/home-manager/modules/services/borgmatic.nix @@ -17,13 +17,10 @@ in { default = "hourly"; description = '' How often to run borgmatic when - services.borgmatic.enable = true. + `services.borgmatic.enable = true`. This value is passed to the systemd timer configuration as the onCalendar option. See - - systemd.time - 7 - + {manpage}`systemd.time(7)` for more information about the format. ''; }; @@ -63,6 +60,7 @@ in { ExecStart = '' ${pkgs.systemd}/bin/systemd-inhibit \ --who="borgmatic" \ + --what="sleep:shutdown" \ --why="Prevent interrupting scheduled backup" \ ${programConfig.package}/bin/borgmatic \ --stats \ diff --git a/third_party/home-manager/modules/services/cachix-agent.nix b/third_party/home-manager/modules/services/cachix-agent.nix index 01eca05b75..7b29b3c4a7 100644 --- a/third_party/home-manager/modules/services/cachix-agent.nix +++ b/third_party/home-manager/modules/services/cachix-agent.nix @@ -10,8 +10,8 @@ in { meta.maintainers = [ maintainers.rycee ]; options.services.cachix-agent = { - enable = mkEnableOption '' - Cachix Deploy Agent: ''; + enable = + mkEnableOption "Cachix Deploy Agent: "; name = mkOption { type = types.str; @@ -43,7 +43,7 @@ in { literalExpression ''"''${config.xdg.configHome}/cachix-agent.token"''; description = '' Required file that needs to contain - CACHIX_AGENT_TOKEN=.... + `CACHIX_AGENT_TOKEN=...`. ''; }; }; diff --git a/third_party/home-manager/modules/services/clipman.nix b/third_party/home-manager/modules/services/clipman.nix index 4afee9a3e4..4616c29848 100644 --- a/third_party/home-manager/modules/services/clipman.nix +++ b/third_party/home-manager/modules/services/clipman.nix @@ -1,11 +1,6 @@ { config, lib, pkgs, ... }: - with lib; - -let - - cfg = config.services.clipman; - +let cfg = config.services.clipman; in { meta.maintainers = [ maintainers.jwygoda ]; @@ -19,11 +14,10 @@ in { default = "graphical-session.target"; example = "sway-session.target"; description = '' - The systemd target that will automatically start the Waybar service. - - - When setting this value to "sway-session.target", - make sure to also enable , + The systemd target that will automatically start the clipman service. + + When setting this value to `"sway-session.target"`, + make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`, otherwise the service may never be started. ''; }; diff --git a/third_party/home-manager/modules/services/clipmenu.nix b/third_party/home-manager/modules/services/clipmenu.nix index 4bb8916f10..c55166b3ab 100644 --- a/third_party/home-manager/modules/services/clipmenu.nix +++ b/third_party/home-manager/modules/services/clipmenu.nix @@ -24,7 +24,7 @@ in { default = null; example = "rofi"; description = '' - Launcher command, if not set, dmenu + Launcher command, if not set, {command}`dmenu` will be used by default. ''; }; diff --git a/third_party/home-manager/modules/services/comodoro.nix b/third_party/home-manager/modules/services/comodoro.nix new file mode 100644 index 0000000000..cf298ce829 --- /dev/null +++ b/third_party/home-manager/modules/services/comodoro.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.comodoro; + + args = with cfg; { + inherit preset; + protocols = if lib.isList protocols then + lib.concatStringsSep " " protocols + else + protocols; + }; + +in { + meta.maintainers = with lib.hm.maintainers; [ soywod ]; + + options.services.comodoro = { + enable = lib.mkEnableOption "Comodoro server"; + + package = lib.mkPackageOption pkgs "comodoro" { }; + + 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. + ''; + }; + + preset = lib.mkOption { + type = lib.types.nonEmptyStr; + description = '' + Use configuration from the given preset as defined in the configuration file. + ''; + }; + + protocols = lib.mkOption { + type = with lib.types; nonEmptyListOf nonEmptyStr; + description = '' + Define protocols the server should use to accept requests. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + + systemd.user.services.comodoro = { + Unit = { + Description = "Comodoro server"; + After = [ "network.target" ]; + }; + Install = { WantedBy = [ "default.target" ]; }; + Service = { + ExecStart = with args; + "${cfg.package}/bin/comodoro server start ${preset} ${protocols}"; + ExecSearchPath = "/bin"; + Restart = "always"; + RestartSec = 10; + Environment = + lib.mapAttrsToList (key: val: "${key}=${val}") cfg.environment; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/copyq.nix b/third_party/home-manager/modules/services/copyq.nix new file mode 100644 index 0000000000..32e83978b8 --- /dev/null +++ b/third_party/home-manager/modules/services/copyq.nix @@ -0,0 +1,54 @@ +{ config, lib, pkgs, ... }: + +let + + cfg = config.services.copyq; + +in { + meta.maintainers = [ lib.maintainers.DamienCassou ]; + + options.services.copyq = { + enable = + lib.mkEnableOption "CopyQ, a clipboard manager with advanced features"; + + package = lib.mkPackageOption pkgs "copyq" { }; + + systemdTarget = lib.mkOption { + type = lib.types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + The systemd target that will automatically start the CopyQ service. + + When setting this value to `"sway-session.target"`, + make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`, + otherwise the service may never be started. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.copyq" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + systemd.user.services.copyq = { + Unit = { + Description = "CopyQ clipboard management daemon"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${cfg.package}/bin/copyq"; + Restart = "on-failure"; + Environment = [ "QT_QPA_PLATFORM=xcb" ]; + }; + + Install = { WantedBy = [ cfg.systemdTarget ]; }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/dunst.nix b/third_party/home-manager/modules/services/dunst.nix index b98b645e42..daa800cf0c 100644 --- a/third_party/home-manager/modules/services/dunst.nix +++ b/third_party/home-manager/modules/services/dunst.nix @@ -61,7 +61,7 @@ in { type = types.package; default = pkgs.dunst; defaultText = literalExpression "pkgs.dunst"; - description = "Package providing dunst."; + description = "Package providing {command}`dunst`."; }; configFile = mkOption { @@ -70,9 +70,9 @@ in { defaultText = "$XDG_CONFIG_HOME/dunst/dunstrc"; description = '' Path to the configuration file read by dunst. - + Note that the configuration generated by Home Manager will be - written to $XDG_CONFIG_HOME/dunst/dunstrc + written to {file}`$XDG_CONFIG_HOME/dunst/dunstrc` regardless. This allows using a mutable configuration file generated from the immutable one, useful in scenarios where live reloading is desired. @@ -89,7 +89,7 @@ in { type = types.str; default = ""; description = - "Set the service's WAYLAND_DISPLAY environment variable."; + "Set the service's {env}`WAYLAND_DISPLAY` environment variable."; }; settings = mkOption { @@ -104,7 +104,7 @@ in { }; default = { }; description = - "Configuration written to $XDG_CONFIG_HOME/dunst/dunstrc."; + "Configuration written to {file}`$XDG_CONFIG_HOME/dunst/dunstrc`."; example = literalExpression '' { global = { @@ -130,6 +130,10 @@ in { config = mkIf cfg.enable (mkMerge [ { + assertions = [ + (hm.assertions.assertPlatform "services.dunst" pkgs platforms.linux) + ]; + home.packages = [ cfg.package ]; xdg.dataFile."dbus-1/services/org.knopwob.dunst.service".source = diff --git a/third_party/home-manager/modules/services/easyeffects.nix b/third_party/home-manager/modules/services/easyeffects.nix index 9dd01b9473..fd5e4b404d 100644 --- a/third_party/home-manager/modules/services/easyeffects.nix +++ b/third_party/home-manager/modules/services/easyeffects.nix @@ -15,16 +15,16 @@ in { enable = mkEnableOption '' Easyeffects daemon. Note, it is necessary to add - + ```nix programs.dconf.enable = true; - + ``` to your system configuration for the daemon to work correctly''; package = mkOption { type = types.package; default = pkgs.easyeffects; defaultText = literalExpression "pkgs.easyeffects"; - description = "The easyeffects package to use."; + description = "The `easyeffects` package to use."; }; preset = mkOption { diff --git a/third_party/home-manager/modules/services/emacs.nix b/third_party/home-manager/modules/services/emacs.nix index 9a6ef5e482..64c6c6eeef 100644 --- a/third_party/home-manager/modules/services/emacs.nix +++ b/third_party/home-manager/modules/services/emacs.nix @@ -59,7 +59,7 @@ in { default = [ ]; example = [ "-f" "exwm-enable" ]; description = '' - Extra command-line arguments to pass to emacs. + Extra command-line arguments to pass to {command}`emacs`. ''; }; @@ -69,7 +69,7 @@ in { type = with types; listOf str; default = [ "-c" ]; description = '' - Command-line arguments to pass to emacsclient. + Command-line arguments to pass to {command}`emacsclient`. ''; }; }; @@ -81,14 +81,18 @@ in { enable = mkEnableOption "systemd socket activation for the Emacs service"; }; - startWithUserSession = lib.mkOption { - type = lib.types.bool; + startWithUserSession = mkOption { + type = with types; either bool (enum [ "graphical" ]); default = !cfg.socketActivation.enable; defaultText = literalExpression "!config.services.emacs.socketActivation.enable"; - example = true; + example = "graphical"; description = '' - Whether to launch Emacs service with the systemd user session. + Whether to launch Emacs service with the systemd user session. If it is + `true`, Emacs service is started by + `default.target`. If it is + `"graphical"`, Emacs service is started by + `graphical-session.target`. ''; }; @@ -97,8 +101,8 @@ in { default = false; example = !default; description = '' - Whether to configure emacsclient as the default - editor using the EDITOR environment variable. + Whether to configure {command}`emacsclient` as the default + editor using the {env}`EDITOR` environment variable. ''; }; }; @@ -116,6 +120,11 @@ in { Documentation = "info:emacs man:emacs(1) https://gnu.org/software/emacs/"; + After = optional (cfg.startWithUserSession == "graphical") + "graphical-session.target"; + PartOf = optional (cfg.startWithUserSession == "graphical") + "graphical-session.target"; + # Avoid killing the Emacs session, which may be full of # unsaved buffers. X-RestartIfChanged = false; @@ -156,8 +165,15 @@ in { ExecStopPost = "${pkgs.coreutils}/bin/chmod --changes +w ${socketDir}"; }; - } // optionalAttrs (cfg.startWithUserSession) { - Install = { WantedBy = [ "default.target" ]; }; + } // optionalAttrs (cfg.startWithUserSession != false) { + Install = { + WantedBy = [ + (if cfg.startWithUserSession == true then + "default.target" + else + "graphical-session.target") + ]; + }; }; home = { diff --git a/third_party/home-manager/modules/services/espanso.nix b/third_party/home-manager/modules/services/espanso.nix index 3d66a59874..404dfecd85 100644 --- a/third_party/home-manager/modules/services/espanso.nix +++ b/third_party/home-manager/modules/services/espanso.nix @@ -1,19 +1,25 @@ { pkgs, config, lib, ... }: - let - inherit (lib) - mkOption mkEnableOption mkIf maintainers literalExpression types platforms; + mkOption mkEnableOption mkIf maintainers literalExpression types platforms + mkRemovedOptionModule versionAtLeast; inherit (lib.hm.assertions) assertPlatform; cfg = config.services.espanso; + espansoVersion = cfg.package.version; yaml = pkgs.formats.yaml { }; - in { - meta.maintainers = with maintainers; [ lucasew ]; - + imports = [ + (mkRemovedOptionModule [ "services" "espanso" "settings" ] + "Use services.espanso.configs and services.espanso.matches instead.") + ]; + meta.maintainers = [ + maintainers.lucasew + maintainers.bobvanderlinden + lib.hm.maintainers.liyangau + ]; options = { services.espanso = { enable = mkEnableOption "Espanso: cross platform text expander in Rust"; @@ -25,40 +31,67 @@ in { defaultText = literalExpression "pkgs.espanso"; }; - settings = mkOption { + configs = mkOption { type = yaml.type; - default = { matches = [ ]; }; + default = { default = { }; }; example = literalExpression '' { - matches = [ - { # Simple text replacement - trigger = ":espanso"; - replace = "Hi there!"; - } - { # Dates - trigger = ":date"; - replace = "{{mydate}}"; - vars = [{ - name = "mydate"; - type = "date"; - params = { format = "%m/%d/%Y"; }; - }]; - } - { # Shell commands - trigger = ":shell"; - replace = "{{output}}"; - vars = [{ - name = "output"; - type = "shell"; - params = { cmd = "echo Hello from your shell"; }; - }]; - } - ]; - } + default = { + show_notifications = false; + }; + vscode = { + filter_title = "Visual Studio Code$"; + backend = "Clipboard"; + }; + }; ''; description = '' The Espanso configuration to use. See - + + for a description of available options. + ''; + }; + + matches = mkOption { + type = yaml.type; + default = { default.matches = [ ]; }; + example = literalExpression '' + { + base = { + matches = [ + { + trigger = ":now"; + replace = "It's {{currentdate}} {{currenttime}}"; + } + { + trigger = ":hello"; + replace = "line1\nline2"; + } + { + regex = ":hi(?P.*)\\."; + replace = "Hi {{person}}!"; + } + ]; + }; + global_vars = { + global_vars = [ + { + name = "currentdate"; + type = "date"; + params = {format = "%d/%m/%Y";}; + } + { + name = "currenttime"; + type = "date"; + params = {format = "%R";}; + } + ]; + }; + }; + ''; + description = '' + The Espanso matches to use. See + for a description of available options. ''; }; @@ -66,12 +99,28 @@ in { }; config = mkIf cfg.enable { - assertions = [ (assertPlatform "services.espanso" pkgs platforms.linux) ]; + assertions = [ + (assertPlatform "services.espanso" pkgs platforms.linux) + { + assertion = versionAtLeast espansoVersion "2"; + message = '' + The services.espanso module only supports Espanso version 2 or later. + ''; + } + ]; home.packages = [ cfg.package ]; - xdg.configFile."espanso/default.yml".source = - yaml.generate "espanso-default.yml" cfg.settings; + xdg.configFile = let + configFiles = lib.mapAttrs' (name: value: { + name = "espanso/config/${name}.yml"; + value = { source = yaml.generate "${name}.yml" value; }; + }) cfg.configs; + matchesFiles = lib.mapAttrs' (name: value: { + name = "espanso/match/${name}.yml"; + value = { source = yaml.generate "${name}.yml" value; }; + }) cfg.matches; + in configFiles // matchesFiles; systemd.user.services.espanso = { Unit = { Description = "Espanso: cross platform text expander in Rust"; }; diff --git a/third_party/home-manager/modules/services/flameshot.nix b/third_party/home-manager/modules/services/flameshot.nix index 2de0d547dd..0c2435aeb7 100644 --- a/third_party/home-manager/modules/services/flameshot.nix +++ b/third_party/home-manager/modules/services/flameshot.nix @@ -20,7 +20,7 @@ in { type = types.package; default = pkgs.flameshot; defaultText = literalExpression "pkgs.flameshot"; - description = "Package providing flameshot."; + description = "Package providing {command}`flameshot`."; }; settings = mkOption { @@ -34,7 +34,7 @@ in { }; description = '' Configuration to use for Flameshot. See - + for available options. ''; }; diff --git a/third_party/home-manager/modules/services/fluidsynth.nix b/third_party/home-manager/modules/services/fluidsynth.nix index bf1b76a0dd..dbeb8df7ad 100644 --- a/third_party/home-manager/modules/services/fluidsynth.nix +++ b/third_party/home-manager/modules/services/fluidsynth.nix @@ -36,10 +36,7 @@ in { example = [ "--sample-rate 96000" ]; description = '' Extra arguments, added verbatim to the fluidsynth command. See - - fluidsynth.conf - 1 - . + {manpage}`fluidsynth.conf(1)`. ''; }; }; diff --git a/third_party/home-manager/modules/services/fnott.nix b/third_party/home-manager/modules/services/fnott.nix index aa9e918118..3d2d1dd8a0 100644 --- a/third_party/home-manager/modules/services/fnott.nix +++ b/third_party/home-manager/modules/services/fnott.nix @@ -21,7 +21,7 @@ in { type = types.package; default = pkgs.fnott; defaultText = literalExpression "pkgs.fnott"; - description = "Package providing fnott."; + description = "Package providing {command}`fnott`."; }; extraFlags = mkOption { @@ -39,12 +39,12 @@ in { defaultText = "$XDG_CONFIG_HOME/fnott/fnott.ini"; description = '' Path to the configuration file read by fnott. - + Note that environment variables in the path won't be properly expanded. - + The configuration specified under - will be generated and - written to $XDG_CONFIG_HOME/fnott/fnott.ini + {option}`services.fnott.settings` will be generated and + written to {file}`$XDG_CONFIG_HOME/fnott/fnott.ini` regardless of this option. This allows using a mutable configuration file generated from the immutable one, useful in scenarios where live reloading is desired. ''; @@ -55,14 +55,10 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/fnott/fnott.ini. - + {file}`$XDG_CONFIG_HOME/fnott/fnott.ini`. + See - - fnott.ini - 5 - for a list of available options and + {manpage}`fnott.ini(5)` for a list of available options and for an example configuration. ''; example = literalExpression '' @@ -107,6 +103,13 @@ in { }; }; + xdg.dataFile."dbus-1/services/fnott.service".text = '' + [D-BUS Service] + Name=org.freedesktop.Notifications + Exec=${cfg.package}/bin/fnott + SystemdService=fnott.service + ''; + xdg.configFile."fnott/fnott.ini".source = iniFormat.generate "fnott.ini" cfg.settings; }; diff --git a/third_party/home-manager/modules/services/fusuma.nix b/third_party/home-manager/modules/services/fusuma.nix index c48cf5a958..e0ced97693 100644 --- a/third_party/home-manager/modules/services/fusuma.nix +++ b/third_party/home-manager/modules/services/fusuma.nix @@ -66,7 +66,7 @@ in { type = types.package; default = pkgs.fusuma; defaultText = literalExpression "pkgs.fusuma"; - description = "Package providing fusuma."; + description = "Package providing {command}`fusuma`."; }; settings = mkOption { diff --git a/third_party/home-manager/modules/services/getmail.nix b/third_party/home-manager/modules/services/getmail.nix index 05950e62ae..7357987eae 100644 --- a/third_party/home-manager/modules/services/getmail.nix +++ b/third_party/home-manager/modules/services/getmail.nix @@ -25,11 +25,11 @@ in { default = "*:0/5"; example = "hourly"; description = '' - The refresh frequency. Check man systemd.time for + The refresh frequency. Check `man systemd.time` for more information on the syntax. If you use a gpg-agent in combination with the passwordCommand, keep the poll frequency below the cache-ttl value (as set by the - default) to avoid pinentry asking + `default`) to avoid pinentry asking permanently for a password. ''; }; diff --git a/third_party/home-manager/modules/services/git-sync.nix b/third_party/home-manager/modules/services/git-sync.nix index 42f8c4cc33..a274da8f48 100644 --- a/third_party/home-manager/modules/services/git-sync.nix +++ b/third_party/home-manager/modules/services/git-sync.nix @@ -24,9 +24,21 @@ let }; }; + mkAgent = name: repo: { + enable = true; + config = { + StartInterval = repo.interval; + ProcessType = "Background"; + WorkingDirectory = "${repo.path}"; + WatchPaths = [ "${repo.path}" ]; + ProgramArguments = [ "${cfg.package}/bin/git-sync" ]; + }; + }; + + mkService = if pkgs.stdenv.isLinux then mkUnit else mkAgent; services = mapAttrs' (name: repo: { name = "git-sync-${name}"; - value = mkUnit name repo; + value = mkService name repo; }) cfg.repositories; repositoryType = types.submodule ({ name, ... }: { @@ -49,8 +61,10 @@ let description = '' The URI of the remote to be synchronized. This is only used in the event that the directory does not already exist. See - + for the supported URIs. + + This option is not supported on Darwin. ''; }; @@ -66,7 +80,8 @@ let }); in { - meta.maintainers = [ maintainers.imalison maintainers.cab404 ]; + meta.maintainers = + [ maintainers.imalison maintainers.cab404 maintainers.ryane ]; options = { services.git-sync = { @@ -77,7 +92,7 @@ in { default = pkgs.git-sync; defaultText = literalExpression "pkgs.git-sync"; description = '' - Package containing the git-sync program. + Package containing the {command}`git-sync` program. ''; }; @@ -90,12 +105,9 @@ in { }; }; - config = mkIf cfg.enable { - assertions = [ - (lib.hm.assertions.assertPlatform "services.git-sync" pkgs - lib.platforms.linux) - ]; + config = mkIf cfg.enable (mkMerge [ + (mkIf pkgs.stdenv.isLinux { systemd.user.services = services; }) + (mkIf pkgs.stdenv.isDarwin { launchd.agents = services; }) + ]); - systemd.user.services = services; - }; } diff --git a/third_party/home-manager/modules/services/gnome-keyring.nix b/third_party/home-manager/modules/services/gnome-keyring.nix index 7267129d7e..460e4abd15 100644 --- a/third_party/home-manager/modules/services/gnome-keyring.nix +++ b/third_party/home-manager/modules/services/gnome-keyring.nix @@ -28,6 +28,14 @@ in { assertions = [ (lib.hm.assertions.assertPlatform "services.gnome-keyring" pkgs lib.platforms.linux) + { + assertion = !config.services.pass-secret-service.enable; + message = '' + Only one secrets service per user can be enabled at a time. + Other services enabled: + - pass-secret-service + ''; + } ]; systemd.user.services.gnome-keyring = { diff --git a/third_party/home-manager/modules/services/gpg-agent.nix b/third_party/home-manager/modules/services/gpg-agent.nix index ca70406f15..63ba11c779 100644 --- a/third_party/home-manager/modules/services/gpg-agent.nix +++ b/third_party/home-manager/modules/services/gpg-agent.nix @@ -9,11 +9,18 @@ let homedir = config.programs.gpg.homedir; + gpgSshSupportStr = '' + ${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null + ''; + gpgInitStr = '' GPG_TTY="$(tty)" export GPG_TTY - '' + optionalString cfg.enableSshSupport - "${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null"; + '' + optionalString cfg.enableSshSupport gpgSshSupportStr; + + gpgFishInitStr = '' + set -gx GPG_TTY (tty) + '' + optionalString cfg.enableSshSupport gpgSshSupportStr; # mimic `gpgconf` output for use in `systemd` unit definitions. # we cannot use `gpgconf` directly because it heavily depends on system @@ -150,7 +157,7 @@ in { Tell the pinentry to grab the keyboard and mouse. This option should in general be used to avoid X-sniffing attacks. When disabled, this option passes - setting to gpg-agent. + {option}`no-grab` setting to gpg-agent. ''; }; @@ -161,7 +168,7 @@ in { Make use of the scdaemon tool. This option has the effect of enabling the ability to do smartcard operations. When disabled, this option passes - setting to gpg-agent. + {option}`disable-scdaemon` setting to gpg-agent. ''; }; @@ -184,16 +191,16 @@ in { default = "gtk2"; description = '' Which pinentry interface to use. If not - null, it sets - in - gpg-agent.conf. Beware that - pinentry-gnome3 may not work on non-Gnome + `null`, it sets + {option}`pinentry-program` in + {file}`gpg-agent.conf`. Beware that + `pinentry-gnome3` may not work on non-Gnome systems. You can fix it by adding the following to your system configuration: - + ```nix services.dbus.packages = [ pkgs.gcr ]; - - For this reason, the default is gtk2 for + ``` + For this reason, the default is `gtk2` for now. ''; }; @@ -238,9 +245,8 @@ in { programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgInitStr; programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgInitStr; - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - set -gx GPG_TTY (tty) - ''; + programs.fish.interactiveShellInit = + mkIf cfg.enableFishIntegration gpgFishInitStr; } (mkIf (cfg.sshKeys != null) { @@ -257,6 +263,10 @@ in { # # directory. { + assertions = [ + (hm.assertions.assertPlatform "services.gpg-agent" pkgs platforms.linux) + ]; + systemd.user.services.gpg-agent = { Unit = { Description = "GnuPG cryptographic agent and passphrase cache"; diff --git a/third_party/home-manager/modules/services/grobi.nix b/third_party/home-manager/modules/services/grobi.nix index d90b7244a9..e656a763f2 100644 --- a/third_party/home-manager/modules/services/grobi.nix +++ b/third_party/home-manager/modules/services/grobi.nix @@ -23,8 +23,8 @@ in { description = '' Commands to be run after an output configuration was changed. The Nix value declared here will be translated to - JSON and written to the key - in $XDG_CONFIG_HOME/grobi.conf. + JSON and written to the {option}`execute_after` key + in {file}`$XDG_CONFIG_HOME/grobi.conf`. ''; }; @@ -61,10 +61,10 @@ in { These are the rules grobi tries to match to the current output configuration. The rules are evaluated top to bottom, the first matching rule is applied and processing stops. See - + for more information. The Nix value declared here will be - translated to JSON and written to the - key in $XDG_CONFIG_HOME/grobi.conf. + translated to JSON and written to the {option}`rules` + key in {file}`$XDG_CONFIG_HOME/grobi.conf`. ''; }; }; diff --git a/third_party/home-manager/modules/services/gromit-mpx.nix b/third_party/home-manager/modules/services/gromit-mpx.nix index 7a85cf7647..f46eddb39c 100644 --- a/third_party/home-manager/modules/services/gromit-mpx.nix +++ b/third_party/home-manager/modules/services/gromit-mpx.nix @@ -95,7 +95,7 @@ let default = null; example = 2; description = '' - If not null, automatically draw an arrow + If not `null`, automatically draw an arrow at the end of a stroke with the given size. ''; }; @@ -130,7 +130,7 @@ in { example = "Insert"; description = '' A keysym or raw keycode that toggles the activation state of - gromit-mpx. Set to null to disable the + gromit-mpx. Set to `null` to disable the hotkey in which case you'll have to activate gromit-mpx manually using the command line. ''; @@ -142,7 +142,7 @@ in { description = '' A keysym or raw keycode that causes gromit-mpx to undo the last stroke. Use this key along with the shift key to redo an - undone stoke. Set to null to disable the + undone stoke. Set to `null` to disable the undo hotkey. ''; }; diff --git a/third_party/home-manager/modules/services/home-manager-auto-upgrade.nix b/third_party/home-manager/modules/services/home-manager-auto-upgrade.nix index 2f975ef1ba..659f911815 100644 --- a/third_party/home-manager/modules/services/home-manager-auto-upgrade.nix +++ b/third_party/home-manager/modules/services/home-manager-auto-upgrade.nix @@ -15,7 +15,7 @@ in { services.home-manager.autoUpgrade = { enable = lib.mkEnableOption '' the Home Manager upgrade service that periodically updates your Nix - channels before running home-manager switch''; + channels before running `home-manager switch`''; frequency = lib.mkOption { type = lib.types.str; @@ -23,12 +23,9 @@ in { description = '' The interval at which the Home Manager auto upgrade is run. This value is passed to the systemd timer configuration - as the OnCalendar option. + as the `OnCalendar` option. The format is described in - - systemd.time - 7 - . + {manpage}`systemd.time(7)`. ''; }; }; diff --git a/third_party/home-manager/modules/services/imapnotify-accounts.nix b/third_party/home-manager/modules/services/imapnotify-accounts.nix index 5d8418310a..e437f94e3b 100644 --- a/third_party/home-manager/modules/services/imapnotify-accounts.nix +++ b/third_party/home-manager/modules/services/imapnotify-accounts.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ pkgs, lib, ... }: with lib; @@ -31,7 +31,7 @@ with lib; }; extraConfig = mkOption { - type = with types; attrsOf (oneOf [ bool int str ]); + type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type; default = { }; example = { wait = 10; }; description = "Additional configuration to add for this account."; diff --git a/third_party/home-manager/modules/services/imapnotify.nix b/third_party/home-manager/modules/services/imapnotify.nix index 0197ec54d6..a79cba35ec 100644 --- a/third_party/home-manager/modules/services/imapnotify.nix +++ b/third_party/home-manager/modules/services/imapnotify.nix @@ -8,6 +8,8 @@ let safeName = lib.replaceStrings [ "@" ":" "\\" "[" "]" ] [ "-" "-" "-" "" "" ]; + configName = account: "imapnotify-${safeName account.name}-config.json"; + imapnotifyAccounts = filter (a: a.imapnotify.enable) (attrValues config.accounts.email.accounts); @@ -19,9 +21,9 @@ let Unit = { Description = "imapnotify for ${name}"; }; Service = { - ExecStart = "${pkgs.goimapnotify}/bin/goimapnotify -conf ${ - genAccountConfig account - }"; + # Use the nix store path for config to ensure service restarts when it changes + ExecStart = + "${getExe cfg.package} -conf '${genAccountConfig account}'"; Restart = "always"; RestartSec = 30; Type = "simple"; @@ -34,8 +36,30 @@ let }; }; + genAccountAgent = account: + let name = safeName account.name; + in { + name = "imapnotify-${name}"; + value = { + enable = true; + config = { + # Use the nix store path for config to ensure service restarts when it changes + ProgramArguments = + [ "${getExe cfg.package}" "-conf" "${genAccountConfig account}" ]; + KeepAlive = true; + ThrottleInterval = 30; + ExitTimeOut = 0; + ProcessType = "Background"; + RunAtLoad = true; + } // optionalAttrs account.notmuch.enable { + EnvironmentVariables.NOTMUCH_CONFIG = + "${config.xdg.configHome}/notmuch/default/config"; + }; + }; + }; + genAccountConfig = account: - pkgs.writeText "imapnotify-${safeName account.name}-config.json" (let + pkgs.writeText (configName account) (let port = if account.imap.port != null then account.imap.port else if account.imap.tls.enable then @@ -62,10 +86,22 @@ in { meta.maintainers = [ maintainers.nickhu ]; options = { - services.imapnotify = { enable = mkEnableOption "imapnotify"; }; + services.imapnotify = { + enable = mkEnableOption "imapnotify"; + + package = mkOption { + type = types.package; + default = pkgs.goimapnotify; + defaultText = literalExpression "pkgs.goimapnotify"; + example = literalExpression "pkgs.imapnotify"; + description = "The imapnotify package to use"; + }; + }; accounts.email.accounts = mkOption { - type = with types; attrsOf (submodule (import ./imapnotify-accounts.nix)); + type = with types; + attrsOf + (submodule (import ./imapnotify-accounts.nix { inherit pkgs lib; })); }; }; @@ -79,8 +115,6 @@ in { + concatMapStringsSep ", " (a: a.name) badAccounts; }; in [ - (lib.hm.assertions.assertPlatform "services.imapnotify" pkgs - lib.platforms.linux) (checkAccounts (a: a.maildir == null) "maildir configuration") (checkAccounts (a: a.imap == null) "IMAP configuration") (checkAccounts (a: a.passwordCommand == null) "password command") @@ -88,5 +122,12 @@ in { ]; systemd.user.services = listToAttrs (map genAccountUnit imapnotifyAccounts); + + launchd.agents = listToAttrs (map genAccountAgent imapnotifyAccounts); + + xdg.configFile = listToAttrs (map (account: { + name = "imapnotify/${configName account}"; + value.source = genAccountConfig account; + }) imapnotifyAccounts); }; } diff --git a/third_party/home-manager/modules/services/kanshi.nix b/third_party/home-manager/modules/services/kanshi.nix index cdef4c7249..02fe8e3cfc 100644 --- a/third_party/home-manager/modules/services/kanshi.nix +++ b/third_party/home-manager/modules/services/kanshi.nix @@ -16,12 +16,9 @@ let The latter can be used to match any output. On - - sway - 1 - , + {manpage}`sway(1)`, output names and descriptions can be obtained via - swaymsg -t get_outputs. + `swaymsg -t get_outputs`. ''; }; @@ -39,7 +36,7 @@ let example = "1920x1080@60Hz"; description = '' <width>x<height>[@<rate>[Hz]] - + Configures the specified output to use the specified mode. Modes are a combination of width and height (in pixels) and a refresh rate (in Hz) that your display can be configured to use. @@ -52,7 +49,7 @@ let example = "1600,0"; description = '' <x>,<y> - + Places the output at the specified position in the global coordinates space. ''; @@ -83,15 +80,28 @@ let Sets the output transform. ''; }; + + adaptiveSync = mkOption { + type = types.nullOr types.bool; + default = null; + example = true; + description = '' + Enables or disables adaptive synchronization + (aka. Variable Refresh Rate). + ''; + }; }; }; - outputStr = { criteria, status, mode, position, scale, transform, ... }: + outputStr = + { criteria, status, mode, position, scale, transform, adaptiveSync, ... }: ''output "${criteria}"'' + optionalString (status != null) " ${status}" + optionalString (mode != null) " mode ${mode}" + optionalString (position != null) " position ${position}" + optionalString (scale != null) " scale ${toString scale}" - + optionalString (transform != null) " transform ${transform}"; + + optionalString (transform != null) " transform ${transform}" + + optionalString (adaptiveSync != null) + " adaptive_sync ${if adaptiveSync then "on" else "off"}"; profileModule = types.submodule { options = { diff --git a/third_party/home-manager/modules/services/kbfs.nix b/third_party/home-manager/modules/services/kbfs.nix index 4f1bfd8bfb..a541a32ca1 100644 --- a/third_party/home-manager/modules/services/kbfs.nix +++ b/third_party/home-manager/modules/services/kbfs.nix @@ -16,7 +16,7 @@ in { default = "keybase"; description = '' Mount point for the Keybase filesystem, relative to - HOME. + {env}`HOME`. ''; }; diff --git a/third_party/home-manager/modules/services/kdeconnect.nix b/third_party/home-manager/modules/services/kdeconnect.nix index 87c57c4e9b..0c6aac31e8 100644 --- a/third_party/home-manager/modules/services/kdeconnect.nix +++ b/third_party/home-manager/modules/services/kdeconnect.nix @@ -27,6 +27,11 @@ in { (mkIf cfg.enable { home.packages = [ package ]; + assertions = [ + (hm.assertions.assertPlatform "services.kdeconnect" pkgs + platforms.linux) + ]; + systemd.user.services.kdeconnect = { Unit = { Description = @@ -46,6 +51,11 @@ in { }) (mkIf cfg.indicator { + assertions = [ + (hm.assertions.assertPlatform "services.kdeconnect" pkgs + platforms.linux) + ]; + systemd.user.services.kdeconnect-indicator = { Unit = { Description = "kdeconnect-indicator"; diff --git a/third_party/home-manager/modules/services/keepassx.nix b/third_party/home-manager/modules/services/keepassx.nix index dc37066e20..7f85823619 100644 --- a/third_party/home-manager/modules/services/keepassx.nix +++ b/third_party/home-manager/modules/services/keepassx.nix @@ -12,6 +12,10 @@ with lib; }; config = mkIf config.services.keepassx.enable { + assertions = [ + (hm.assertions.assertPlatform "services.keepassx" pkgs platforms.linux) + ]; + systemd.user.services.keepassx = { Unit = { Description = "KeePassX password manager"; diff --git a/third_party/home-manager/modules/services/listenbrainz-mpd.nix b/third_party/home-manager/modules/services/listenbrainz-mpd.nix new file mode 100644 index 0000000000..0a55a9e46f --- /dev/null +++ b/third_party/home-manager/modules/services/listenbrainz-mpd.nix @@ -0,0 +1,51 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib.options) mkEnableOption mkPackageOption mkOption; + inherit (lib.modules) mkIf; + + cfg = config.services.listenbrainz-mpd; + + tomlFormat = pkgs.formats.toml { }; + +in { + meta.maintainers = [ lib.maintainers.Scrumplex ]; + + options.services.listenbrainz-mpd = { + enable = mkEnableOption "listenbrainz-mpd"; + + package = mkPackageOption pkgs "listenbrainz-mpd" { }; + + settings = mkOption { + type = tomlFormat.type; + default = { }; + description = '' + Configuration for listenbrainz-mpd written to + {file}`$XDG_CONFIG_HOME/listenbrainz-mpd/config.toml`. + ''; + example = { submission.tokenFile = "/run/secrets/listenbrainz-mpd"; }; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services."listenbrainz-mpd" = { + Unit = { + Description = "ListenBrainz submission client for MPD"; + Documentation = "https://codeberg.org/elomatreb/listenbrainz-mpd"; + After = [ "mpd.service" ]; + Requires = [ "mpd.service" ]; + }; + Service = { + ExecStart = "${cfg.package}/bin/listenbrainz-mpd"; + Restart = "always"; + RestartSec = 5; + }; + Install.WantedBy = [ "default.target" ]; + }; + + xdg.configFile."listenbrainz-mpd/config.toml" = mkIf (cfg.settings != { }) { + source = tomlFormat.generate "listenbrainz-mpd.toml" cfg.settings; + }; + }; +} diff --git a/third_party/home-manager/modules/services/mako.nix b/third_party/home-manager/modules/services/mako.nix index fc9e21610e..7ca011782e 100644 --- a/third_party/home-manager/modules/services/mako.nix +++ b/third_party/home-manager/modules/services/mako.nix @@ -4,13 +4,16 @@ with lib; let - cfg = config.programs.mako; + cfg = config.services.mako; in { meta.maintainers = [ maintainers.onny ]; + imports = + [ (mkRenamedOptionModule [ "programs" "mako" ] [ "services" "mako" ]) ]; + options = { - programs.mako = { + services.mako = { enable = mkEnableOption '' Mako, lightweight notification daemon for Wayland ''; @@ -130,8 +133,8 @@ in { description = '' Set margin of each edge specified in pixels. Specify single value to apply margin on all sides. Two comma-separated values will set - vertical and horizontal edges separately. Four comma-seperated will - give each edge a seperate value. + vertical and horizontal edges separately. Four comma-separated will + give each edge a separate value. For example: 10,20,5 will set top margin to 10, left and right to 20 and bottom to five. ''; @@ -143,8 +146,8 @@ in { description = '' Set padding of each edge specified in pixels. Specify single value to apply margin on all sides. Two comma-separated values will set - vertical and horizontal edges separately. Four comma-seperated will - give each edge a seperate value. + vertical and horizontal edges separately. Four comma-separated will + give each edge a separate value. For example: 10,20,5 will set top margin to 10, left and right to 20 and bottom to five. ''; @@ -182,8 +185,8 @@ in { Set popup progress indicator color to a specific color, represented in hex color code. To draw the progress indicator on top of the background color, use the - over attribute. To replace the background - color, use the source attribute (this can + `over` attribute. To replace the background + color, use the `source` attribute (this can be useful when the notification is semi-transparent). ''; }; @@ -213,9 +216,9 @@ in { algorithm used by the XDG Icon Theme Specification, but does not support any of the theme metadata. Therefore, if you want to search parent themes, you'll need to add them to the path manually. - - The /usr/share/icons/hicolor and - /usr/share/pixmaps directories are + + The {file}`/usr/share/icons/hicolor` and + {file}`/usr/share/pixmaps` directories are always searched. ''; }; diff --git a/third_party/home-manager/modules/services/mbsync.nix b/third_party/home-manager/modules/services/mbsync.nix index bdeda0ec9f..7f0f2d3057 100644 --- a/third_party/home-manager/modules/services/mbsync.nix +++ b/third_party/home-manager/modules/services/mbsync.nix @@ -29,10 +29,7 @@ in { description = '' How often to run mbsync. This value is passed to the systemd timer configuration as the onCalendar option. See - - systemd.time - 7 - + {manpage}`systemd.time(7)` for more information about the format. ''; }; @@ -50,7 +47,7 @@ in { default = null; description = '' Optional configuration file to link to use instead of - the default file (~/.mbsyncrc). + the default file ({file}`~/.mbsyncrc`). ''; }; diff --git a/third_party/home-manager/modules/services/mopidy.nix b/third_party/home-manager/modules/services/mopidy.nix index f5064c5131..37642a2903 100644 --- a/third_party/home-manager/modules/services/mopidy.nix +++ b/third_party/home-manager/modules/services/mopidy.nix @@ -94,9 +94,9 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/mopidy/mopidy.conf. - - See for + {file}`$XDG_CONFIG_HOME/mopidy/mopidy.conf`. + + See for more details. ''; }; diff --git a/third_party/home-manager/modules/services/mpd-discord-rpc.nix b/third_party/home-manager/modules/services/mpd-discord-rpc.nix index 5e7a6664b8..8996051a56 100644 --- a/third_party/home-manager/modules/services/mpd-discord-rpc.nix +++ b/third_party/home-manager/modules/services/mpd-discord-rpc.nix @@ -25,8 +25,8 @@ in { } ''; description = '' - Configuration included in config.toml. - For available options see + Configuration included in `config.toml`. + For available options see ''; }; @@ -39,6 +39,11 @@ in { }; config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.mpd-discord-rpc" pkgs + platforms.linux) + ]; + xdg.configFile."discord-rpc/config.toml".source = configFile; systemd.user.services.mpd-discord-rpc = { diff --git a/third_party/home-manager/modules/services/mpd-mpris.nix b/third_party/home-manager/modules/services/mpd-mpris.nix new file mode 100644 index 0000000000..924036c815 --- /dev/null +++ b/third_party/home-manager/modules/services/mpd-mpris.nix @@ -0,0 +1,110 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.services.mpd-mpris; + + ignoreIfLocalMpd = value: if cfg.mpd.useLocal then null else value; + + renderArg = name: value: + if lib.isBool value && value then + "-${name}" + else if lib.isInt value then + "-${name} ${toString value}" + else if lib.isString value then + "-${name} ${lib.escapeShellArg value}" + else + ""; + + concatArgs = strings: + lib.concatStringsSep " " (lib.filter (s: s != "") strings); + + renderArgs = args: concatArgs (lib.mapAttrsToList renderArg args); + + renderCmd = pkg: args: "${pkg}/bin/mpd-mpris ${renderArgs args}"; +in { + meta.maintainers = [ lib.hm.maintainers.olmokramer ]; + + options.services.mpd-mpris = { + enable = lib.mkEnableOption + "mpd-mpris: An implementation of the MPRIS protocol for MPD"; + + package = lib.mkPackageOption pkgs "mpd-mpris" { }; + + mpd = { + useLocal = lib.mkOption { + type = lib.types.bool; + default = config.services.mpd.enable; + defaultText = lib.literalExpression "config.services.mpd.enable"; + description = '' + Whether to configure for the local MPD daemon. If + `true` the `network`, + `host`, and `port` + settings are ignored. + ''; + }; + + network = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + description = '' + The network used to dial to the MPD server. Check + + for available values (most common are "tcp" and "unix") + ''; + }; + + host = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + example = "192.168.1.1"; + description = "The address where MPD is listening for connections."; + }; + + port = lib.mkOption { + type = with lib.types; nullOr port; + default = null; + description = '' + The port number where MPD is listening for connections. + ''; + }; + + password = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + description = '' + The password to connect to MPD. + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.mpd-mpris" pkgs + lib.platforms.linux) + ]; + + systemd.user.services.mpd-mpris = { + Install = { WantedBy = [ "default.target" ]; }; + + Unit = { + Description = + "mpd-mpris: An implementation of the MPRIS protocol for MPD"; + After = [ "mpd.service" ]; + Requires = lib.mkIf cfg.mpd.useLocal [ "mpd.service" ]; + }; + + Service = { + Type = "simple"; + Restart = "on-failure"; + RestartSec = "5s"; + ExecStart = renderCmd cfg.package { + no-instance = true; + network = ignoreIfLocalMpd cfg.mpd.network; + host = ignoreIfLocalMpd cfg.mpd.host; + port = ignoreIfLocalMpd cfg.mpd.port; + pwd = cfg.mpd.password; + }; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/mpd.nix b/third_party/home-manager/modules/services/mpd.nix index 6ba93a19da..a0011b0213 100644 --- a/third_party/home-manager/modules/services/mpd.nix +++ b/third_party/home-manager/modules/services/mpd.nix @@ -60,9 +60,9 @@ in { apply = toString; # Prevent copies to Nix store. description = '' The directory where mpd reads music from. - - If is - true then the defined XDG music directory is used. + + If [](#opt-xdg.userDirs.enable) is + `true` then the defined XDG music directory is used. Otherwise, you must explicitly specify a value. ''; }; @@ -82,13 +82,19 @@ in { default = ""; description = '' Extra directives added to to the end of MPD's configuration - file, mpd.conf. Basic configuration + file, {file}`mpd.conf`. Basic configuration like file location and uid/gid is added automatically to the beginning of the file. For available options see - - mpd.conf - 5 - . + {manpage}`mpd.conf(5)`. + ''; + }; + + extraArgs = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--verbose" ]; + description = '' + Extra command-line arguments to pass to MPD. ''; }; @@ -118,7 +124,7 @@ in { example = "any"; description = '' The address for the daemon to listen on. - Use any to listen on all addresses. + Use `any` to listen on all addresses. ''; }; @@ -138,7 +144,7 @@ in { defaultText = "\${dataDir}/tag_cache"; description = '' The path to MPD's database. If set to - null the parameter is omitted from the + `null` the parameter is omitted from the configuration. ''; }; @@ -176,7 +182,9 @@ in { Service = { Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${cfg.package}/bin/mpd --no-daemon ${mpdConf}"; + ExecStart = "${cfg.package}/bin/mpd --no-daemon ${mpdConf} ${ + escapeShellArgs cfg.extraArgs + }"; Type = "notify"; ExecStartPre = '' ${pkgs.bash}/bin/bash -c "${pkgs.coreutils}/bin/mkdir -p '${cfg.dataDir}' '${cfg.playlistDirectory}'"''; diff --git a/third_party/home-manager/modules/services/muchsync.nix b/third_party/home-manager/modules/services/muchsync.nix index 8c9e27014b..d4fcd864f5 100644 --- a/third_party/home-manager/modules/services/muchsync.nix +++ b/third_party/home-manager/modules/services/muchsync.nix @@ -13,13 +13,10 @@ let type = types.str; default = "*:0/5"; description = '' - How often to run muchsync. This + How often to run {command}`muchsync`. This value is passed to the systemd timer configuration as the - OnCalendar option. See - - systemd.time - 7 - + `OnCalendar` option. See + {manpage}`systemd.time(7)` for more information about the format. ''; }; @@ -29,9 +26,9 @@ let default = "${pkgs.openssh}/bin/ssh -CTaxq"; defaultText = "ssh -CTaxq"; description = '' - Specifies a command line to pass to /bin/sh + Specifies a command line to pass to {command}`/bin/sh` to execute a command on another machine. - + Note that because this string is passed to the shell, special characters including spaces may need to be escaped. ''; @@ -53,12 +50,12 @@ let Check for locally modified files. Without this option, muchsync assumes that files in a maildir are never edited. - - disables certain + + {option}`checkForModifiedFiles` disables certain optimizations so as to make muchsync at least check the timestamp on every file, which will detect modified files at the cost of a longer startup time. - + This option is useful if your software regularly modifies the contents of mail files (e.g., because you are running offlineimap with "synclabels = yes"). @@ -70,7 +67,7 @@ let default = true; description = '' Whether to begin the synchronisation by running - notmuch new locally. + {command}`notmuch new` locally. ''; }; }; @@ -104,12 +101,12 @@ let Check for modified files on the remote side. Without this option, muchsync assumes that files in a maildir are never edited. - - disables certain + + {option}`checkForModifiedFiles` disables certain optimizations so as to make muchsync at least check the timestamp on every file, which will detect modified files at the cost of a longer startup time. - + This option is useful if your software regularly modifies the contents of mail files (e.g., because you are running offlineimap with "synclabels = yes"). @@ -121,7 +118,7 @@ let default = true; description = '' Whether to begin the synchronisation by running - notmuch new on the remote side. + {command}`notmuch new` on the remote side. ''; }; }; 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 f4abe86e0a..b90855dd5c 100644 --- a/third_party/home-manager/modules/services/network-manager-applet.nix +++ b/third_party/home-manager/modules/services/network-manager-applet.nix @@ -7,7 +7,7 @@ let cfg = config.services.network-manager-applet; in { - meta.maintainers = [ maintainers.rycee ]; + meta.maintainers = [ maintainers.rycee hm.maintainers.cvoges12 ]; options = { services.network-manager-applet = { @@ -32,10 +32,8 @@ in { Install = { WantedBy = [ "graphical-session.target" ]; }; Service = { - ExecStart = toString - ([ "${pkgs.networkmanagerapplet}/bin/nm-applet" "--sm-disable" ] - ++ optional config.xsession.preferStatusNotifierItems - "--indicator"); + ExecStart = toString ([ "${pkgs.networkmanagerapplet}/bin/nm-applet" ] + ++ optional config.xsession.preferStatusNotifierItems "--indicator"); }; }; }; diff --git a/third_party/home-manager/modules/services/notify-osd.nix b/third_party/home-manager/modules/services/notify-osd.nix index 6a75ce6e6f..4faf836430 100644 --- a/third_party/home-manager/modules/services/notify-osd.nix +++ b/third_party/home-manager/modules/services/notify-osd.nix @@ -18,7 +18,7 @@ in { default = pkgs.notify-osd; defaultText = literalExpression "pkgs.notify-osd"; description = '' - Package containing the notify-osd program. + Package containing the {command}`notify-osd` program. ''; }; }; diff --git a/third_party/home-manager/modules/services/owncloud-client.nix b/third_party/home-manager/modules/services/owncloud-client.nix index d55d8ffa2a..2884affe41 100644 --- a/third_party/home-manager/modules/services/owncloud-client.nix +++ b/third_party/home-manager/modules/services/owncloud-client.nix @@ -2,12 +2,25 @@ with lib; -{ +let + + cfg = config.services.owncloud-client; + +in { options = { - services.owncloud-client = { enable = mkEnableOption "Owncloud Client"; }; + services.owncloud-client = { + enable = mkEnableOption "Owncloud Client"; + + package = mkPackageOption pkgs "owncloud-client" { }; + }; }; - config = mkIf config.services.owncloud-client.enable { + config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.owncloud-client" pkgs + platforms.linux) + ]; + systemd.user.services.owncloud-client = { Unit = { Description = "Owncloud Client"; @@ -17,7 +30,7 @@ with lib; Service = { Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${pkgs.owncloud-client}/bin/owncloud"; + ExecStart = "${cfg.package}/bin/owncloud"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/third_party/home-manager/modules/services/pantalaimon.nix b/third_party/home-manager/modules/services/pantalaimon.nix index d833d45397..67fe76cdc7 100644 --- a/third_party/home-manager/modules/services/pantalaimon.nix +++ b/third_party/home-manager/modules/services/pantalaimon.nix @@ -19,7 +19,7 @@ in { default = pkgs.pantalaimon; defaultText = literalExpression "pkgs.pantalaimon"; description = - "Package providing the pantalaimon executable to use."; + "Package providing the {command}`pantalaimon` executable to use."; }; settings = mkOption { @@ -41,13 +41,10 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/pantalaimon/pantalaimon.conf. - - See or - - pantalaimon - 5 - + {file}`$XDG_CONFIG_HOME/pantalaimon/pantalaimon.conf`. + + See or + {manpage}`pantalaimon(5)` for options. ''; }; diff --git a/third_party/home-manager/modules/services/pass-secret-service.nix b/third_party/home-manager/modules/services/pass-secret-service.nix index 06b5be1f88..db494337e8 100644 --- a/third_party/home-manager/modules/services/pass-secret-service.nix +++ b/third_party/home-manager/modules/services/pass-secret-service.nix @@ -2,32 +2,68 @@ with lib; -let serviceCfg = config.services.pass-secret-service; +let + cfg = config.services.pass-secret-service; + + busName = "org.freedesktop.secrets"; in { - meta.maintainers = [ maintainers.cab404 ]; + meta.maintainers = with maintainers; [ cab404 cyntheticfox ]; + options.services.pass-secret-service = { enable = mkEnableOption "Pass libsecret service"; + + package = mkPackageOption pkgs "pass-secret-service" { }; + + storePath = mkOption { + type = with types; nullOr str; + default = null; + defaultText = "$HOME/.password-store"; + example = "/home/user/.local/share/password-store"; + description = '' + Absolute path to password store. Defaults to + {file}`$HOME/.password-store` if the + {option}`programs.password-store` module is not enabled, and + {option}`programs.password-store.settings.PASSWORD_STORE_DIR` if it is. + ''; + }; }; - config = mkIf serviceCfg.enable { + + config = mkIf cfg.enable { assertions = [ (hm.assertions.assertPlatform "services.pass-secret-service" pkgs platforms.linux) - { - assertion = config.programs.password-store.enable; - message = "The 'services.pass-secret-service' module requires" - + " 'programs.password-store.enable = true'."; + assertion = !config.services.gnome-keyring.enable; + message = '' + Only one secrets service per user can be enabled at a time. + Other services enabled: + - gnome-keyring + ''; } ]; - systemd.user.services.pass-secret-service = { - Unit = { Description = "Pass libsecret service"; }; - Service = { - # pass-secret-service doesn't use environment variables for some reason. - ExecStart = - "${pkgs.pass-secret-service}/bin/pass_secret_service --path ${config.programs.password-store.settings.PASSWORD_STORE_DIR}"; + systemd.user.services.pass-secret-service = + let binPath = "${cfg.package}/bin/pass_secret_service"; + in { + Unit = { + AssertFileIsExecutable = "${binPath}"; + Description = "Pass libsecret service"; + Documentation = "https://github.com/mdellweg/pass_secret_service"; + PartOf = [ "default.target" ]; + }; + + Service = { + Type = "dbus"; + ExecStart = "${binPath} ${ + optionalString (cfg.storePath != null) "--path ${cfg.storePath}" + }"; + BusName = busName; + }; + + Install.WantedBy = [ "default.target" ]; }; - Install = { WantedBy = [ "default.target" ]; }; - }; + + xdg.dataFile."dbus-1/services/${busName}.service".source = + "${cfg.package}/share/dbus-1/services/${busName}.service"; }; } diff --git a/third_party/home-manager/modules/services/password-store-sync.nix b/third_party/home-manager/modules/services/password-store-sync.nix index c8dbe808fb..dfff410f2d 100644 --- a/third_party/home-manager/modules/services/password-store-sync.nix +++ b/third_party/home-manager/modules/services/password-store-sync.nix @@ -19,14 +19,11 @@ in { description = '' How often to synchronise the password store git repository with its default upstream. - + This value is passed to the systemd timer configuration as the - onCalendar option. + `onCalendar` option. See - - systemd.time - 7 - + {manpage}`systemd.time(7)` for more information about the format. ''; }; diff --git a/third_party/home-manager/modules/services/pasystray.nix b/third_party/home-manager/modules/services/pasystray.nix index 15c951e137..32922ad0fa 100644 --- a/third_party/home-manager/modules/services/pasystray.nix +++ b/third_party/home-manager/modules/services/pasystray.nix @@ -10,6 +10,10 @@ with lib; }; config = mkIf config.services.pasystray.enable { + assertions = [ + (hm.assertions.assertPlatform "services.pasystray" pkgs platforms.linux) + ]; + systemd.user.services.pasystray = { Unit = { Description = "PulseAudio system tray"; diff --git a/third_party/home-manager/modules/services/pbgopy.nix b/third_party/home-manager/modules/services/pbgopy.nix index 487aa4f36b..fecc64ca0f 100644 --- a/third_party/home-manager/modules/services/pbgopy.nix +++ b/third_party/home-manager/modules/services/pbgopy.nix @@ -34,7 +34,7 @@ in { default = "24h"; example = "10m"; description = '' - The TTL for the cache. Use "0s" to disable it. + The TTL for the cache. Use `"0s"` to disable it. ''; }; diff --git a/third_party/home-manager/modules/services/picom.nix b/third_party/home-manager/modules/services/picom.nix index f4f8edb430..e136880964 100644 --- a/third_party/home-manager/modules/services/picom.nix +++ b/third_party/home-manager/modules/services/picom.nix @@ -100,7 +100,7 @@ in { example = [ "window_type *= 'menu'" "name ~= 'Firefox$'" "focused = 1" ]; description = '' List of conditions of windows that should not be faded. - See picom(1) man page for more examples. + See `picom(1)` man page for more examples. ''; }; @@ -136,7 +136,7 @@ in { example = [ "window_type *= 'menu'" "name ~= 'Firefox$'" "focused = 1" ]; description = '' List of conditions of windows that should have no shadow. - See picom(1) man page for more examples. + See `picom(1)` man page for more examples. ''; }; @@ -201,7 +201,7 @@ in { type = types.enum [ "egl" "glx" "xrender" "xr_glx_hybrid" ]; default = "xrender"; description = '' - Backend to use: egl, glx, xrender or xr_glx_hybrid. + Backend to use: `egl`, `glx`, `xrender` or `xr_glx_hybrid`. ''; }; @@ -264,12 +264,17 @@ in { description = '' Picom settings. Use this option to configure Picom settings not exposed in a NixOS option or to bypass one. For the available options see the - CONFIGURATION FILES section at picom(1). + CONFIGURATION FILES section at `picom(1)`. ''; }; }; config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.picom" pkgs + lib.platforms.linux) + ]; + services.picom.settings = mkDefaultAttrs { # fading fading = cfg.fade; diff --git a/third_party/home-manager/modules/services/plex-mpv-shim.nix b/third_party/home-manager/modules/services/plex-mpv-shim.nix index b5fb621838..940e57184c 100644 --- a/third_party/home-manager/modules/services/plex-mpv-shim.nix +++ b/third_party/home-manager/modules/services/plex-mpv-shim.nix @@ -37,8 +37,8 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/plex-mpv-shim/config.json. See - + {file}`$XDG_CONFIG_HOME/plex-mpv-shim/config.json`. See + for the configuration documentation. ''; }; diff --git a/third_party/home-manager/modules/services/polybar.nix b/third_party/home-manager/modules/services/polybar.nix index d3ac68ded8..fbcecc5aff 100644 --- a/third_party/home-manager/modules/services/polybar.nix +++ b/third_party/home-manager/modules/services/polybar.nix @@ -94,7 +94,7 @@ in { description = '' Polybar configuration. Can be either path to a file, or set of attributes that will be used to create the final configuration. - See also for a more nix-friendly format. + See also {option}`services.polybar.settings` for a more nix-friendly format. ''; default = { }; example = literalExpression '' @@ -127,33 +127,33 @@ in { strange data format that polybar uses. Each entry will be converted to a section in the output file. Several things are treated specially: nested keys are converted - to dash-separated keys; the special text key is ignored as a nested key, + to dash-separated keys; the special `text` key is ignored as a nested key, to allow mixing different levels of nesting; and lists are converted to - polybar's foo-0, foo-1, ... format. - + polybar's `foo-0, foo-1, ...` format. + For example: - + ```nix "module/volume" = { type = "internal/pulseaudio"; - format.volume = "<ramp-volume> <label-volume>"; + format.volume = " "; label.muted.text = "🔇"; label.muted.foreground = "#666"; ramp.volume = ["🔈" "🔉" "🔊"]; - click.right = "pavucontrol &"; + click.right = "pavucontrol &"; } - + ``` becomes: - + ```ini [module/volume] type=internal/pulseaudio - format-volume=<ramp-volume> <label-volume> + format-volume= label-muted=🔇 label-muted-foreground=#666 ramp-volume-0=🔈 ramp-volume-1=🔉 ramp-volume-2=🔊 - click-right=pavucontrol & - + click-right=pavucontrol & + ``` ''; default = { }; example = literalExpression '' @@ -190,7 +190,7 @@ in { description = '' This script will be used to start the polybars. Set all necessary environment variables here and start all bars. - It can be assumed that polybar executable is in the PATH. + It can be assumed that {command}`polybar` executable is in the {env}`PATH`. Note, this script must start all bars in the background and then terminate. ''; diff --git a/third_party/home-manager/modules/services/pueue.nix b/third_party/home-manager/modules/services/pueue.nix index 3375f49d76..1431c1cd71 100644 --- a/third_party/home-manager/modules/services/pueue.nix +++ b/third_party/home-manager/modules/services/pueue.nix @@ -28,7 +28,7 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/pueue/pueue.yml. + {file}`$XDG_CONFIG_HOME/pueue/pueue.yml`. ''; }; }; diff --git a/third_party/home-manager/modules/services/pulseeffects.nix b/third_party/home-manager/modules/services/pulseeffects.nix index 0181e39be9..434adf85e8 100644 --- a/third_party/home-manager/modules/services/pulseeffects.nix +++ b/third_party/home-manager/modules/services/pulseeffects.nix @@ -15,9 +15,9 @@ in { enable = mkEnableOption '' Pulseeffects daemon Note, it is necessary to add - + ```nix programs.dconf.enable = true; - + ``` to your system configuration for the daemon to work correctly''; package = mkOption { diff --git a/third_party/home-manager/modules/services/random-background.nix b/third_party/home-manager/modules/services/random-background.nix index 9deee8deb5..7e887f32e3 100644 --- a/third_party/home-manager/modules/services/random-background.nix +++ b/third_party/home-manager/modules/services/random-background.nix @@ -18,11 +18,11 @@ in { enable = mkEnableOption "" // { description = '' Whether to enable random desktop background. - + Note, if you are using NixOS and have set up a custom desktop manager session for Home Manager, then the session - configuration must have the - option set to true or the background + configuration must have the `bgSupport` + option set to `true` or the background image set by this module may be overwritten. ''; }; @@ -68,6 +68,11 @@ in { config = mkIf cfg.enable (mkMerge ([ { + assertions = [ + (hm.assertions.assertPlatform "services.random-background" pkgs + platforms.linux) + ]; + systemd.user.services.random-background = { Unit = { Description = "Set random desktop background using feh"; diff --git a/third_party/home-manager/modules/services/recoll.nix b/third_party/home-manager/modules/services/recoll.nix index 644b011846..e4159d2842 100644 --- a/third_party/home-manager/modules/services/recoll.nix +++ b/third_party/home-manager/modules/services/recoll.nix @@ -10,15 +10,16 @@ let # see the example configuration from the package (i.e., # `$out/share/recoll/examples/recoll.conf`). mkRecollConfKeyValue = generators.mkKeyValueDefault { - mkValueString = v: - if v == true then - "1" - else if v == false then - "0" - else if isList v then - concatStringsSep " " v - else - generators.mkValueStringDefault { } v; + mkValueString = let mkQuoted = v: ''"${escape [ ''"'' ] v}"''; + in v: + if v == true then + "1" + else if v == false then + "0" + else if isList v then + concatMapStringsSep " " mkQuoted v + else + generators.mkValueStringDefault { } v; } " = "; # A modified version of 'lib.generators.toINI' that also accepts top-level @@ -84,7 +85,7 @@ in { default = pkgs.recoll; defaultText = literalExpression "pkgs.recoll"; description = '' - Package providing the recoll binary. + Package providing the `recoll` binary. ''; example = literalExpression "(pkgs.recoll.override { withGui = false; })"; }; @@ -96,10 +97,7 @@ in { description = '' When or how often the periodic update should run. Must be the format described from - - systemd.time - 7 - . + {manpage}`systemd.time(7)`. ''; }; @@ -108,13 +106,10 @@ in { default = { }; description = '' The configuration to be written at - ''${config.services.recoll.configDir}/recoll.conf. + {file}`''${config.services.recoll.configDir}/recoll.conf`. See - - recoll - 5 - for more details about the configuration. + {manpage}`recoll(5)` for more details about the configuration. ''; example = literalExpression '' { @@ -140,7 +135,7 @@ in { example = literalExpression "\${config.xdg.configHome}/recoll"; description = '' The directory to contain Recoll configuration files. This will be set - as RECOLL_CONFDIR. + as `RECOLL_CONFDIR`. ''; }; }; diff --git a/third_party/home-manager/modules/services/redshift-gammastep/lib/options.nix b/third_party/home-manager/modules/services/redshift-gammastep/lib/options.nix index 4c9d68ab31..81347e6438 100644 --- a/third_party/home-manager/modules/services/redshift-gammastep/lib/options.nix +++ b/third_party/home-manager/modules/services/redshift-gammastep/lib/options.nix @@ -55,8 +55,8 @@ in { type = with types; nullOr (either str float); default = null; description = '' - Your current latitude, between -90.0 and - 90.0. Must be provided along with + Your current latitude, between `-90.0` and + `90.0`. Must be provided along with longitude. ''; }; @@ -65,8 +65,8 @@ in { type = with types; nullOr (either str float); default = null; description = '' - Your current longitude, between -180.0 and - 180.0. Must be provided along with + Your current longitude, between `-180.0` and + `180.0`. Must be provided along with latitude. ''; }; @@ -76,8 +76,8 @@ in { default = "manual"; description = '' The location provider to use for determining your location. If set to - manual you must also provide latitude/longitude. - If set to geoclue2, you must also enable the global + `manual` you must also provide latitude/longitude. + If set to `geoclue2`, you must also enable the global geoclue2 service. ''; }; @@ -88,7 +88,7 @@ in { default = 5500; description = '' Colour temperature to use during the day, between - 1000 and 25000 K. + `1000` and `25000` K. ''; }; night = mkOption { @@ -96,7 +96,7 @@ in { default = 3700; description = '' Colour temperature to use at night, between - 1000 and 25000 K. + `1000` and `25000` K. ''; }; }; @@ -137,10 +137,7 @@ in { description = '' The configuration to pass to ${programName}. Available options for ${programName} described in - - ${moduleName} - 1 - . + {manpage}`${moduleName}(1)`. ''; }; }; @@ -183,6 +180,8 @@ in { xdg.configFile.${xdgConfigFilePath}.source = settingsFormat.generate xdgConfigFilePath cfg.settings; + home.packages = [ cfg.package ]; + systemd.user.services.${moduleName} = { Unit = let geoclueAgentService = diff --git a/third_party/home-manager/modules/services/screen-locker.nix b/third_party/home-manager/modules/services/screen-locker.nix index 155896cd3b..085573f8a8 100644 --- a/third_party/home-manager/modules/services/screen-locker.nix +++ b/third_party/home-manager/modules/services/screen-locker.nix @@ -7,7 +7,7 @@ let cfg = config.services.screen-locker; in { - meta.maintainers = [ lib.hm.maintainers.jrobsonchase ]; + meta.maintainers = [ hm.maintainers.jrobsonchase hm.maintainers.rszamszur ]; imports = let origOpt = name: [ "services" "screen-locker" name ]; @@ -37,9 +37,9 @@ in { description = '' Inactive time interval in minutes after which session will be locked. The minimum is 1 minute, and the maximum is 1 hour. - If is true, it will use this setting. - See . - Otherwise, this will be used with xset to configure + If {option}`xautolock.enable` is true, it will use this setting. + See . + Otherwise, this will be used with {command}`xset` to configure the X server's screensaver timeout. ''; }; @@ -55,7 +55,7 @@ in { type = types.package; default = pkgs.xautolock; description = '' - Package providing the xautolock binary. + Package providing the {command}`xautolock` binary. ''; }; @@ -64,7 +64,7 @@ in { default = true; description = '' Whether to reset xautolock timers when awaking from sleep. - No effect if is false. + No effect if {option}`xautolock.enable` is false. ''; }; @@ -72,8 +72,8 @@ in { type = types.listOf types.str; default = [ ]; description = '' - Extra command-line arguments to pass to xautolock. - No effect if is false. + Extra command-line arguments to pass to {command}`xautolock`. + No effect if {option}`xautolock.enable` is false. ''; }; }; @@ -83,7 +83,7 @@ in { type = types.package; default = pkgs.xss-lock; description = '' - Package providing the xss-lock binary. + Package providing the {command}`xss-lock` binary. ''; }; @@ -91,7 +91,7 @@ in { type = types.listOf types.str; default = [ ]; description = '' - Extra command-line arguments to pass to xss-lock. + Extra command-line arguments to pass to {command}`xss-lock`. ''; }; @@ -100,7 +100,7 @@ in { default = 600; description = '' The X server's screensaver cycle value expressed as seconds. - This will be used with xset to configure + This will be used with {command}`xset` to configure the cycle along with timeout. ''; }; diff --git a/third_party/home-manager/modules/services/sctd.nix b/third_party/home-manager/modules/services/sctd.nix index 54cf53e45e..44c770264b 100644 --- a/third_party/home-manager/modules/services/sctd.nix +++ b/third_party/home-manager/modules/services/sctd.nix @@ -15,10 +15,7 @@ with lib; description = '' The base color temperature used by sctd, which should be between 2500 and 9000. See - - sctd - 1 - + {manpage}`sctd(1)` for more details. ''; }; diff --git a/third_party/home-manager/modules/services/spotifyd.nix b/third_party/home-manager/modules/services/spotifyd.nix index b06749a359..dfe611fd78 100644 --- a/third_party/home-manager/modules/services/spotifyd.nix +++ b/third_party/home-manager/modules/services/spotifyd.nix @@ -21,7 +21,7 @@ in { example = literalExpression "(pkgs.spotifyd.override { withKeyring = true; })"; description = '' - The spotifyd package to use. + The `spotifyd` package to use. Can be used to specify extensions. ''; }; diff --git a/third_party/home-manager/modules/services/ssh-agent.nix b/third_party/home-manager/modules/services/ssh-agent.nix new file mode 100644 index 0000000000..16db3232c6 --- /dev/null +++ b/third_party/home-manager/modules/services/ssh-agent.nix @@ -0,0 +1,41 @@ +{ config, options, lib, pkgs, ... }: + +let + + cfg = config.services.ssh-agent; + +in { + meta.maintainers = [ lib.maintainers.lheckemann ]; + + options = { + services.ssh-agent = { + enable = lib.mkEnableOption "OpenSSH private key agent"; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.ssh-agent" pkgs + lib.platforms.linux) + ]; + + home.sessionVariablesExtra = '' + if [[ -z "$SSH_AUTH_SOCK" ]]; then + export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent + fi + ''; + + systemd.user.services.ssh-agent = { + Install.WantedBy = [ "default.target" ]; + + Unit = { + Description = "SSH authentication agent"; + Documentation = "man:ssh-agent(1)"; + }; + + Service = { + ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a %t/ssh-agent"; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/stalonetray.nix b/third_party/home-manager/modules/services/stalonetray.nix index 93fff3e7b5..172d6dd9dc 100644 --- a/third_party/home-manager/modules/services/stalonetray.nix +++ b/third_party/home-manager/modules/services/stalonetray.nix @@ -51,6 +51,11 @@ in { config = mkIf cfg.enable (mkMerge [ { + assertions = [ + (hm.assertions.assertPlatform "services.stalonetray" pkgs + platforms.linux) + ]; + home.packages = [ cfg.package ]; systemd.user.services.stalonetray = { diff --git a/third_party/home-manager/modules/services/swayidle.nix b/third_party/home-manager/modules/services/swayidle.nix index db54f9e27f..6e8b55cb83 100644 --- a/third_party/home-manager/modules/services/swayidle.nix +++ b/third_party/home-manager/modules/services/swayidle.nix @@ -108,6 +108,10 @@ in { }; config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.swayidle" pkgs platforms.linux) + ]; + systemd.user.services.swayidle = { Unit = { Description = "Idle manager for Wayland"; diff --git a/third_party/home-manager/modules/services/swayosd.nix b/third_party/home-manager/modules/services/swayosd.nix new file mode 100644 index 0000000000..067c104c31 --- /dev/null +++ b/third_party/home-manager/modules/services/swayosd.nix @@ -0,0 +1,58 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.swayosd; + +in { + meta.maintainers = [ hm.maintainers.pltanton ]; + + options.services.swayosd = { + enable = mkEnableOption '' + swayosd, a GTK based on screen display for keyboard shortcuts like + caps-lock and volume''; + + package = mkPackageOption pkgs "swayosd" { }; + + maxVolume = mkOption { + type = types.nullOr types.ints.unsigned; + default = null; + example = 120; + description = '' + Sets the maximum volume. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (hm.assertions.assertPlatform "services.swayosd" pkgs platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + systemd.user = { + services.swayosd = { + Unit = { + Description = "Volume/backlight OSD indicator"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; + Documentation = "man:swayosd(1)"; + }; + + Service = { + Type = "simple"; + ExecStart = "${cfg.package}/bin/swayosd" + + (optionalString (cfg.maxVolume != null) + " --max-volume ${toString cfg.maxVolume}"); + Restart = "always"; + }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; + }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/sxhkd.nix b/third_party/home-manager/modules/services/sxhkd.nix index 79f17e3cd3..e955d00b16 100644 --- a/third_party/home-manager/modules/services/sxhkd.nix +++ b/third_party/home-manager/modules/services/sxhkd.nix @@ -25,26 +25,26 @@ in { type = types.package; default = pkgs.sxhkd; defaultText = "pkgs.sxhkd"; - description = - "Package containing the sxhkd executable."; + description = "Package containing the {command}`sxhkd` executable."; }; extraOptions = mkOption { type = types.listOf types.str; default = [ ]; - description = - "Command line arguments to invoke sxhkd with."; + description = "Command line arguments to invoke {command}`sxhkd` with."; example = literalExpression ''[ "-m 1" ]''; }; keybindings = mkOption { - type = types.attrsOf (types.nullOr types.str); + type = + types.attrsOf (types.nullOr (types.oneOf [ types.str types.path ])); default = { }; description = "An attribute set that assigns hotkeys to commands."; example = literalExpression '' { "super + shift + {r,c}" = "i3-msg {restart,reload}"; "super + {s,w}" = "i3-msg {stacking,tabbed}"; + "super + F1" = pkgs.writeShellScript "script" "echo $USER"; } ''; }; diff --git a/third_party/home-manager/modules/services/syncthing.nix b/third_party/home-manager/modules/services/syncthing.nix index 2f9cecdb4f..b6cebfa5f7 100644 --- a/third_party/home-manager/modules/services/syncthing.nix +++ b/third_party/home-manager/modules/services/syncthing.nix @@ -6,6 +6,15 @@ let cfg = config.services.syncthing; + defaultSyncthingArgs = [ + "${pkgs.syncthing}/bin/syncthing" + "-no-browser" + "-no-restart" + "-logflags=0" + ]; + + syncthingArgs = defaultSyncthingArgs ++ cfg.extraOptions; + in { meta.maintainers = [ maintainers.rycee ]; @@ -18,7 +27,7 @@ in { default = [ ]; example = [ "--gui-apikey=apiKey" ]; description = '' - Extra command-line arguments to pass to syncthing. + Extra command-line arguments to pass to {command}`syncthing`. ''; }; @@ -57,11 +66,6 @@ in { config = mkMerge [ (mkIf cfg.enable { - assertions = [ - (lib.hm.assertions.assertPlatform "services.syncthing" pkgs - lib.platforms.linux) - ]; - home.packages = [ (getOutput "man" pkgs.syncthing) ]; systemd.user.services = { @@ -74,10 +78,7 @@ in { }; Service = { - ExecStart = - "${pkgs.syncthing}/bin/syncthing -no-browser -no-restart -logflags=0" - + optionalString (cfg.extraOptions != [ ]) - (" " + escapeShellArgs cfg.extraOptions); + ExecStart = escapeShellArgs syncthingArgs; Restart = "on-failure"; SuccessExitStatus = [ 3 4 ]; RestartForceExitStatus = [ 3 4 ]; @@ -95,9 +96,26 @@ in { Install = { WantedBy = [ "default.target" ]; }; }; }; + + launchd.agents.syncthing = { + enable = true; + config = { + ProgramArguments = syncthingArgs; + KeepAlive = { + Crashed = true; + SuccessfulExit = false; + }; + ProcessType = "Background"; + }; + }; }) (mkIf (isAttrs cfg.tray && cfg.tray.enable) { + assertions = [ + (hm.assertions.assertPlatform "services.syncthing.tray" pkgs + platforms.linux) + ]; + systemd.user.services = { ${cfg.tray.package.pname} = { Unit = { @@ -118,6 +136,11 @@ in { # deprecated (mkIf (isBool cfg.tray && cfg.tray) { + assertions = [ + (hm.assertions.assertPlatform "services.syncthing.tray" pkgs + platforms.linux) + ]; + systemd.user.services = { "syncthingtray" = { Unit = { diff --git a/third_party/home-manager/modules/services/taffybar.nix b/third_party/home-manager/modules/services/taffybar.nix index 088827b955..39a6c43efe 100644 --- a/third_party/home-manager/modules/services/taffybar.nix +++ b/third_party/home-manager/modules/services/taffybar.nix @@ -24,10 +24,16 @@ in { }; config = mkIf config.services.taffybar.enable { + assertions = [ + (hm.assertions.assertPlatform "services.taffybar" pkgs platforms.linux) + ]; + systemd.user.services.taffybar = { Unit = { Description = "Taffybar desktop bar"; PartOf = [ "tray.target" ]; + StartLimitBurst = 5; + StartLimitIntervalSec = 10; }; Service = { @@ -35,6 +41,7 @@ in { BusName = "org.taffybar.Bar"; ExecStart = "${cfg.package}/bin/taffybar"; Restart = "on-failure"; + RestartSec = "2s"; }; Install = { WantedBy = [ "tray.target" ]; }; diff --git a/third_party/home-manager/modules/services/tahoe-lafs.nix b/third_party/home-manager/modules/services/tahoe-lafs.nix index 742b779b27..105ef3d03b 100644 --- a/third_party/home-manager/modules/services/tahoe-lafs.nix +++ b/third_party/home-manager/modules/services/tahoe-lafs.nix @@ -10,6 +10,10 @@ with lib; }; config = mkIf config.services.tahoe-lafs.enable { + assertions = [ + (hm.assertions.assertPlatform "services.tahoe-lafs" pkgs platforms.linux) + ]; + systemd.user.services.tahoe-lafs = { Unit = { Description = "Tahoe-LAFS"; }; diff --git a/third_party/home-manager/modules/services/taskwarrior-sync.nix b/third_party/home-manager/modules/services/taskwarrior-sync.nix index ddce6d6f0b..9c01f414ba 100644 --- a/third_party/home-manager/modules/services/taskwarrior-sync.nix +++ b/third_party/home-manager/modules/services/taskwarrior-sync.nix @@ -16,13 +16,10 @@ in { type = types.str; default = "*:0/5"; description = '' - How often to run taskwarrior sync. This + How often to run `taskwarrior sync`. This value is passed to the systemd timer configuration as the - OnCalendar option. See - - systemd.time - 7 - + `OnCalendar` option. See + {manpage}`systemd.time(7)` for more information about the format. ''; }; diff --git a/third_party/home-manager/modules/services/trayer.nix b/third_party/home-manager/modules/services/trayer.nix index 0621c55e60..48cef7a886 100644 --- a/third_party/home-manager/modules/services/trayer.nix +++ b/third_party/home-manager/modules/services/trayer.nix @@ -6,52 +6,44 @@ let boolTrue = { type = types.bool; - values = "true|false"; - default = "true"; + default = true; }; number0 = { type = types.int; - values = "number"; - default = "0"; + default = 0; }; knownSettings = { edge = { - type = types.str; - values = "left|right|top|bottom|none"; + type = types.enum [ "left" "right" "top" "bottom" "none" ]; default = "bottom"; }; align = { - type = types.str; - values = "left|right|center"; + type = types.enum [ "left" "right" "center" ]; default = "center"; }; margin = number0; widthtype = { - type = types.str; - values = "request|pixel|percent"; + type = types.enum [ "request" "pixel" "percent" ]; default = "percent"; }; width = { type = types.int; - values = "number"; - default = "100"; + default = 100; }; heighttype = { - type = types.str; - values = "request|pixel"; + type = types.enum [ "request" "pixel" ]; default = "pixel"; }; height = { type = types.int; - values = "number"; - default = "26"; + default = 26; }; SetDockType = boolTrue; @@ -60,27 +52,23 @@ let transparent = { type = types.bool; - values = "true|false"; - default = "false"; + default = false; }; alpha = { type = types.int; - values = "number"; - default = "127"; + default = 127; }; tint = { type = types.str; - values = "int"; default = "0xFFFFFFFF"; }; distance = number0; distancefrom = { - type = types.str; - values = "left|right|top|bottom"; + type = types.enum [ "left" "right" "top" "bottom" ]; default = "top"; }; @@ -89,9 +77,8 @@ let padding = number0; monitor = { - values = "number|primary"; - type = types.str; - default = "0"; + type = types.either types.ints.unsigned (types.enum [ "primary" ]); + default = 0; }; iconspacing = number0; @@ -119,26 +106,12 @@ in { type = with types; attrsOf (nullOr (either str (either bool int))); description = '' Trayer configuration as a set of attributes. Further details can be - found at . + found in [trayer's README](https://github.com/sargon/trayer-srg/blob/master/README). - - - - Property Name - Type - Values - Default - - ${concatStringsSep "\n" (mapAttrsToList (n: v: '' - - ${n} - ${v.type.description} - ${v.values} - ${v.default} - + {var}`${n}` + : ${v.type.description} (default: `${builtins.toJSON v.default}`) '') knownSettings)} - ''; default = { }; example = literalExpression '' diff --git a/third_party/home-manager/modules/services/twmn.nix b/third_party/home-manager/modules/services/twmn.nix index d4c1268293..c29ff621b9 100644 --- a/third_party/home-manager/modules/services/twmn.nix +++ b/third_party/home-manager/modules/services/twmn.nix @@ -13,8 +13,8 @@ let example = 19; description = '' The qt easing-curve animation to use for the animation. See - - QEasingCurve documentation. + [ + QEasingCurve documentation](https://doc.qt.io/qt-5/qeasingcurve.html#Type-enum). ''; }; @@ -48,7 +48,7 @@ in { ''{ main.activation_command = "\${pkgs.hello}/bin/hello"; }''; description = '' Extra configuration options to add to the twmnd config file. See - + for details. ''; }; @@ -108,7 +108,7 @@ in { default = "#999999"; example = "lightgray"; description = '' - Notification's text color. RGB hex and keywords (e.g. lightgray) + Notification's text color. RGB hex and keywords (e.g. `lightgray`) are supported. ''; }; @@ -119,7 +119,7 @@ in { default = null; example = literalExpression "pkgs.dejavu_fonts"; description = '' - Notification text's font package. If null then + Notification text's font package. If `null` then the font is assumed to already be available in your profile. ''; }; @@ -172,7 +172,7 @@ in { example = 80; description = '' Maximum length of the text before it is cut and suffixed with "...". - Never cuts if null. + Never cuts if `null`. ''; }; }; @@ -209,7 +209,7 @@ in { bounce = { enable = mkEnableOption - "notification bounce when displaying next notification directly."; + "notification bounce when displaying next notification directly"; duration = mkOption { type = types.ints.unsigned; @@ -226,7 +226,7 @@ in { example = "lightgray"; description = '' Notification's background color. RGB hex and keywords (e.g. - lightgray) are supported. + `lightgray`) are supported. ''; }; @@ -291,7 +291,7 @@ in { description = '' Position of the notification slide. The notification will slide in vertically from the border if placed in - top_center or bottom_center, + `top_center` or `bottom_center`, horizontally otherwise. ''; }; diff --git a/third_party/home-manager/modules/services/udiskie.nix b/third_party/home-manager/modules/services/udiskie.nix index d53d7cc8ab..2572b3594f 100644 --- a/third_party/home-manager/modules/services/udiskie.nix +++ b/third_party/home-manager/modules/services/udiskie.nix @@ -25,12 +25,12 @@ in { options = { services.udiskie = { - enable = mkEnableOption "udiskie mount daemon" // { + enable = mkEnableOption "" // { description = '' Whether to enable the udiskie mount daemon. - + Note, if you use NixOS then you must add - services.udisks2.enable = true + `services.udisks2.enable = true` to your system configuration. Otherwise mounting will fail because the Udisk2 DBus service is not found. ''; @@ -50,9 +50,9 @@ in { ''; description = '' Configuration written to - $XDG_CONFIG_HOME/udiskie/config.yml. - - See + {file}`$XDG_CONFIG_HOME/udiskie/config.yml`. + + See for the full list of options. ''; }; @@ -74,30 +74,27 @@ in { default = "auto"; description = '' Whether to display tray icon. - + The options are - - - always - Always show tray icon. - - - auto - - Show tray icon only when there is a device available. - - - - never - Never show tray icon. - - + + `always` + : Always show tray icon. + + `auto` + : Show tray icon only when there is a device available. + + `never` + : Never show tray icon. ''; }; }; }; config = mkIf config.services.udiskie.enable { + assertions = [ + (hm.assertions.assertPlatform "services.udiskie" pkgs platforms.linux) + ]; + xdg.configFile."udiskie/config.yml".source = yaml.generate "udiskie-config.yml" (mergeSets [ { diff --git a/third_party/home-manager/modules/services/unison.nix b/third_party/home-manager/modules/services/unison.nix index d7f8a628a5..7f8a47a627 100644 --- a/third_party/home-manager/modules/services/unison.nix +++ b/third_party/home-manager/modules/services/unison.nix @@ -22,7 +22,7 @@ let }; commandOptions = mkOption rec { - type = with types; attrsOf str; + type = with types; attrsOf (either str (listOf str)); apply = mergeAttrs default; default = { repeat = "watch"; @@ -34,13 +34,12 @@ let }; description = '' Additional command line options as a dictionary to pass to the - unison program. - + `unison` program. + + Use a list of strings to declare the same option multiple times. + See - - unison - 1 - + {manpage}`unison(1)` for a list of available options. ''; }; @@ -60,7 +59,9 @@ let }; }; - serialiseArg = key: val: escapeShellArg "-${key}=${escape [ "=" ] val}"; + serialiseArg = key: val: + concatStringsSep " " + (forEach (toList val) (x: escapeShellArg "-${key}=${escape [ "=" ] x}")); serialiseArgs = args: concatStringsSep " " (mapAttrsToList serialiseArg args); diff --git a/third_party/home-manager/modules/services/vdirsyncer.nix b/third_party/home-manager/modules/services/vdirsyncer.nix new file mode 100644 index 0000000000..4eb376f9f8 --- /dev/null +++ b/third_party/home-manager/modules/services/vdirsyncer.nix @@ -0,0 +1,86 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.vdirsyncer; + + vdirsyncerOptions = [ ] + ++ optional (cfg.verbosity != null) "--verbosity ${cfg.verbosity}" + ++ optional (cfg.configFile != null) "--config ${cfg.configFile}"; + +in { + meta.maintainers = [ maintainers.pjones ]; + + options.services.vdirsyncer = { + enable = mkEnableOption "vdirsyncer"; + + package = mkOption { + type = types.package; + default = pkgs.vdirsyncer; + defaultText = "pkgs.vdirsyncer"; + example = literalExpression "pkgs.vdirsyncer"; + description = "The package to use for the vdirsyncer binary."; + }; + + frequency = mkOption { + type = types.str; + default = "*:0/5"; + description = '' + How often to run vdirsyncer. This value is passed to the systemd + timer configuration as the onCalendar option. See + {manpage}`systemd.time(7)` + for more information about the format. + ''; + }; + + verbosity = mkOption { + type = types.nullOr + (types.enum [ "CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG" ]); + default = null; + description = '' + Whether vdirsyncer should produce verbose output. + ''; + }; + + configFile = mkOption { + type = types.nullOr types.path; + default = null; + description = '' + Optional configuration file to link to use instead of + the default file ({file}`$XDG_CONFIG_HOME/vdirsyncer/config`). + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services.vdirsyncer = { + Unit = { + Description = "vdirsyncer calendar&contacts synchronization"; + PartOf = [ "network-online.target" ]; + }; + + Service = { + Type = "oneshot"; + # TODO `vdirsyncer discover` + ExecStart = let optStr = concatStringsSep " " vdirsyncerOptions; + in [ + "${cfg.package}/bin/vdirsyncer ${optStr} metasync" + "${cfg.package}/bin/vdirsyncer ${optStr} sync" + ]; + }; + }; + + systemd.user.timers.vdirsyncer = { + Unit = { Description = "vdirsyncer calendar&contacts synchronization"; }; + + Timer = { + OnCalendar = cfg.frequency; + Unit = "vdirsyncer.service"; + }; + + Install = { WantedBy = [ "timers.target" ]; }; + }; + }; +} diff --git a/third_party/home-manager/modules/services/volnoti.nix b/third_party/home-manager/modules/services/volnoti.nix index 016fe7ab76..e90db2c209 100644 --- a/third_party/home-manager/modules/services/volnoti.nix +++ b/third_party/home-manager/modules/services/volnoti.nix @@ -18,7 +18,7 @@ in { default = pkgs.volnoti; defaultText = literalExpression "pkgs.volnoti"; description = '' - Package containing the volnoti program. + Package containing the {command}`volnoti` program. ''; }; }; diff --git a/third_party/home-manager/modules/services/window-managers/bspwm/options.nix b/third_party/home-manager/modules/services/window-managers/bspwm/options.nix index 848e991bdd..fab95f88f9 100644 --- a/third_party/home-manager/modules/services/window-managers/bspwm/options.nix +++ b/third_party/home-manager/modules/services/window-managers/bspwm/options.nix @@ -90,7 +90,7 @@ let type = types.nullOr types.bool; default = null; description = '' - Whether the node should ignore node --close + Whether the node should ignore {command}`node --close` messages. ''; example = true; @@ -147,8 +147,7 @@ let rectangle = mkOption { type = types.nullOr types.str; default = null; - description = - "The node's geometry, in the format WxH+X+Y."; + description = "The node's geometry, in the format `WxH+X+Y`."; example = "800x600+32+32"; }; }; @@ -169,7 +168,7 @@ in { settings = mkOption { type = with types; attrsOf (either primitive (listOf primitive)); default = { }; - description = "General settings given to bspc config."; + description = "General settings given to `bspc config`."; example = { "border_width" = 2; "split_ratio" = 0.52; @@ -206,12 +205,12 @@ in { type = types.bool; default = true; description = '' - If set to true, desktops configured in will be reset + If set to `true`, desktops configured in {option}`monitors` will be reset every time the config is run. - If set to false, desktops will only be configured the first time the config is run. + If set to `false`, desktops will only be configured the first time the config is run. This is useful if you want to dynamically add desktops and you don't want them to be destroyed if you - re-run bspwmrc. + re-run `bspwmrc`. ''; }; diff --git a/third_party/home-manager/modules/services/window-managers/fluxbox.nix b/third_party/home-manager/modules/services/window-managers/fluxbox.nix index 6b05d29587..99dfa50e04 100644 --- a/third_party/home-manager/modules/services/window-managers/fluxbox.nix +++ b/third_party/home-manager/modules/services/window-managers/fluxbox.nix @@ -20,10 +20,8 @@ in { default = ""; description = '' Init configuration for Fluxbox, written to - ~/.fluxbox/init. Look at the - - fluxbox - 1 manpage for details. + {file}`~/.fluxbox/init`. Look at the + {manpage}`fluxbox(1)` manpage for details. ''; }; @@ -32,9 +30,8 @@ in { default = ""; description = '' Apps configuration for Fluxbox, written to - ~/.fluxbox/apps. Look at the - fluxbox - 1 manpage for details. + {file}`~/.fluxbox/apps`. Look at the + {manpage}`fluxbox(1)` manpage for details. ''; }; @@ -43,9 +40,8 @@ in { default = ""; description = '' Keyboard shortcuts configuration for Fluxbox, written to - ~/.fluxbox/keys. Look at the - fluxbox-keys - 1 manpage for details. + {file}`~/.fluxbox/keys`. Look at the + {manpage}`fluxbox-keys(1)` manpage for details. ''; }; @@ -54,9 +50,8 @@ in { default = ""; description = '' Menu configuration for Fluxbox, written to - ~/.fluxbox/menu. Look at the - fluxbox-menu - 1 manpage for details. + {file}`~/.fluxbox/menu`. Look at the + {manpage}`fluxbox-menu(1)` manpage for details. ''; }; @@ -65,9 +60,8 @@ in { default = ""; description = '' Slitlist configuration for Fluxbox, written to - ~/.fluxbox/slitlist. Look at the - fluxbox - 1 manpage for details. + {file}`~/.fluxbox/slitlist`. Look at the + {manpage}`fluxbox(1)` manpage for details. ''; }; @@ -76,9 +70,8 @@ in { default = ""; description = '' Window menu configuration for Fluxbox, written to - ~/.fluxbox/windowmenu. Look at the - fluxbox-menu - 1 + {file}`~/.fluxbox/windowmenu`. Look at the + {manpage}`fluxbox-menu(1)` manpage for details. ''; }; @@ -88,10 +81,9 @@ in { default = [ ]; example = [ "-log" "/tmp/fluxbox.log" ]; description = '' - Extra command line arguments to pass to fluxbox. + Extra command line arguments to pass to {command}`fluxbox`. Look at the - fluxbox - 1 manpage for details. + {manpage}`fluxbox(1)` manpage for details. ''; }; }; diff --git a/third_party/home-manager/modules/services/window-managers/herbstluftwm.nix b/third_party/home-manager/modules/services/window-managers/herbstluftwm.nix index 67457e95a7..a407da6cc7 100644 --- a/third_party/home-manager/modules/services/window-managers/herbstluftwm.nix +++ b/third_party/home-manager/modules/services/window-managers/herbstluftwm.nix @@ -29,6 +29,8 @@ let settingType = lib.types.oneOf [ lib.types.bool lib.types.int lib.types.str ]; + escapedTags = map lib.escapeShellArg cfg.tags; + in { meta.maintainers = [ lib.hm.maintainers.olmokramer ]; @@ -40,8 +42,8 @@ in { default = pkgs.herbstluftwm; defaultText = lib.literalExpression "pkgs.herbstluftwm"; description = '' - Package providing the herbstluftwm and - herbstclient commands. + Package providing the {command}`herbstluftwm` and + {command}`herbstclient` commands. ''; }; @@ -112,7 +114,7 @@ in { ''; description = '' Extra configuration lines to add verbatim to - $XDG_CONFIG_HOME/herbstluftwm/autostart. + {file}`$XDG_CONFIG_HOME/herbstluftwm/autostart`. ''; }; }; @@ -147,15 +149,14 @@ in { ${renderSettings cfg.settings} ${lib.optionalString (cfg.tags != [ ]) '' - if ${cfg.package}/bin/herbstclient object_tree tags.default &>/dev/null; then - herbstclient rename default ${ - lib.escapeShellArg (builtins.head cfg.tags) - } - fi - - for tag in ${lib.escapeShellArgs cfg.tags}; do + for tag in ${lib.concatStringsSep " " escapedTags}; do herbstclient add "$tag" done + + if ${cfg.package}/bin/herbstclient object_tree tags.by-name.default &>/dev/null; then + herbstclient use ${lib.head escapedTags} + herbstclient merge_tag default ${lib.head escapedTags} + fi ''} ${renderKeybinds cfg.keybinds} diff --git a/third_party/home-manager/modules/services/window-managers/hyprland.nix b/third_party/home-manager/modules/services/window-managers/hyprland.nix new file mode 100644 index 0000000000..41ceb356c0 --- /dev/null +++ b/third_party/home-manager/modules/services/window-managers/hyprland.nix @@ -0,0 +1,229 @@ +{ config, lib, pkgs, ... }: +let + + cfg = config.wayland.windowManager.hyprland; + +in { + meta.maintainers = [ lib.maintainers.fufexan ]; + + # A few option removals and renames to aid those migrating from the upstream + # module. + imports = [ + (lib.mkRemovedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "disableAutoreload" ] + "Autoreloading now always happen") + + (lib.mkRemovedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "recommendedEnvironment" ] + "Recommended environment variables are now always set") + + (lib.mkRenamedOptionModule # \ + [ "wayland" "windowManager" "hyprland" "nvidiaPatches" ] # \ + [ "wayland" "windowManager" "hyprland" "enableNvidiaPatches" ]) + ]; + + options.wayland.windowManager.hyprland = { + enable = lib.mkEnableOption "Hyprland wayland compositor"; + + package = lib.mkPackageOption pkgs "hyprland" { }; + + finalPackage = lib.mkOption { + type = lib.types.package; + readOnly = true; + default = cfg.package.override { + enableXWayland = cfg.xwayland.enable; + hidpiXWayland = cfg.xwayland.hidpi; + nvidiaPatches = cfg.enableNvidiaPatches; + }; + defaultText = lib.literalMD + "`wayland.windowManager.hyprland.package` with applied configuration"; + description = '' + The Hyprland package after applying configuration. + ''; + }; + + plugins = lib.mkOption { + type = with lib.types; listOf (either package path); + default = [ ]; + description = '' + List of Hyprland plugins to use. Can either be packages or + absolute plugin paths. + ''; + }; + + systemdIntegration = lib.mkOption { + type = lib.types.bool; + default = pkgs.stdenv.isLinux; + description = '' + Whether to enable {file}`hyprland-session.target` on + hyprland startup. This links to `graphical-session.target`. + Some important environment variables will be imported to systemd + and dbus user environment before reaching the target, including + - `DISPLAY` + - `HYPRLAND_INSTANCE_SIGNATURE` + - `WAYLAND_DISPLAY` + - `XDG_CURRENT_DESKTOP` + ''; + }; + + xwayland = { + enable = lib.mkEnableOption "XWayland" // { default = true; }; + hidpi = lib.mkEnableOption null // { + description = '' + Enable HiDPI XWayland, based on [XWayland MR 733](https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733). + See for more info. + ''; + }; + }; + + enableNvidiaPatches = + lib.mkEnableOption "patching wlroots for better Nvidia support"; + + settings = lib.mkOption { + type = with lib.types; + let + valueType = nullOr (oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "Hyprland configuration value"; + }; + in valueType; + default = { }; + description = '' + Hyprland 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. + + ::: {.note} + Use the [](#opt-wayland.windowManager.hyprland.plugins) option to + declare plugins. + ::: + + ''; + example = lib.literalExpression '' + { + decoration = { + shadow_offset = "0 5"; + "col.shadow" = "rgba(00000099)"; + }; + + "$mod" = "SUPER"; + + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + } + ''; + }; + + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + example = '' + # 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 + ''; + description = '' + Extra configuration lines to add to `~/.config/hypr/hyprland.conf`. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "wayland.windowManager.hyprland" pkgs + lib.platforms.linux) + ]; + + warnings = let + inconsistent = (cfg.systemdIntegration || cfg.plugins != [ ]) + && cfg.extraConfig == "" && cfg.settings == { }; + warning = + "You have enabled hyprland.systemdIntegration or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake."; + in lib.optional inconsistent warning; + + 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.systemdIntegration || cfg.extraConfig != "" + || combinedSettings != { }; + + 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; + }; + allFields = filterAttrs (n: v: !(isAttrs v)) attrs; + importantFields = + filterAttrs (n: _: (hasPrefix "$" n) || (hasPrefix "bezier" n)) + allFields; + fields = builtins.removeAttrs allFields + (mapAttrsToList (n: _: n) importantFields); + in mkFields importantFields + + concatStringsSep "\n" (mapAttrsToList mkSection sections) + + mkFields fields; + in lib.mkIf shouldGenerate { + text = lib.optionalString cfg.systemdIntegration '' + exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target + '' + lib.optionalString (combinedSettings != { }) + (toHyprconf combinedSettings 0) + + lib.optionalString (cfg.extraConfig != "") cfg.extraConfig; + onChange = lib.mkIf (cfg.package != null) '' + ( # execute in subshell so that `shopt` won't affect other scripts + shopt -s nullglob # so that nothing is done if /tmp/hypr/ does not exist or is empty + for instance in /tmp/hypr/*; do + HYPRLAND_INSTANCE_SIGNATURE=''${instance##*/} ${cfg.finalPackage}/bin/hyprctl reload config-only \ + || true # ignore dead instance(s) + done + ) + ''; + }; + + systemd.user.targets.hyprland-session = lib.mkIf cfg.systemdIntegration { + Unit = { + Description = "Hyprland compositor session"; + Documentation = [ "man:systemd.special(7)" ]; + BindsTo = [ "graphical-session.target" ]; + Wants = [ "graphical-session-pre.target" ]; + After = [ "graphical-session-pre.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 f28b9b6729..183463d313 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 @@ -93,9 +93,9 @@ let defaultText = "Default i3 keybindings."; description = '' An attribute set that assigns a key press to an action using a key symbol. - See . - - Consider to use lib.mkOptionDefault function to extend or override + See . + + Consider to use `lib.mkOptionDefault` function to extend or override default keybindings instead of specifying all of them from scratch. ''; example = literalExpression '' @@ -160,7 +160,7 @@ let "floating_modifier ${floating.modifier}" (windowBorderString window floating) "hide_edge_borders ${window.hideEdgeBorders}" - "force_focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}" + "focus_wrapping ${focus.wrapping}" "focus_follows_mouse ${lib.hm.booleans.yesNo focus.followMouse}" "focus_on_window_activation ${focus.newWindow}" "mouse_warping ${if focus.mouseWarping then "output" else "none"}" @@ -256,16 +256,15 @@ in { ++ flatten (map (b: optional (isList b.fonts) "Specifying i3.config.bars[].fonts as a list is deprecated. Use the attrset version instead.") - cfg.config.bars); + cfg.config.bars) ++ [ + (mkIf (any (s: s.workspace != null) cfg.config.startup) + ("'xsession.windowManager.i3.config.startup.*.workspace' is deprecated, " + + "use 'xsession.windowManager.i3.config.assigns' instead." + + "See https://github.com/nix-community/home-manager/issues/265.")) + (mkIf cfg.config.focus.forceWrapping + ("'xsession.windowManager.i3.config.focus.forceWrapping' is deprecated, " + + "use 'xsession.windowManager.i3.config.focus.wrapping' instead.")) + ]; }) - - (mkIf (cfg.config != null - && (any (s: s.workspace != null) cfg.config.startup)) { - warnings = [ - ("'xsession.windowManager.i3.config.startup.*.workspace' is deprecated, " - + "use 'xsession.windowManager.i3.config.assigns' instead." - + "See https://github.com/nix-community/home-manager/issues/265.") - ]; - }) ]); } diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/functions.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/functions.nix index c6a6ada156..5f661ca898 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/functions.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/functions.nix @@ -69,66 +69,57 @@ rec { }; barStr = { id, fonts, mode, hiddenState, position, workspaceButtons - , workspaceNumbers, command, statusCommand, colors, trayOutput, extraConfig - , ... }: + , workspaceNumbers, command, statusCommand, colors, trayOutput, trayPadding + , extraConfig, ... }: let colorsNotNull = lib.filterAttrs (n: v: v != null) colors != { }; - in '' - bar { - ${ - concatStringsSep "\n" (indent (lists.subtractLists [ "" null ] - (flatten [ - (optionalString (id != null) "id ${id}") - (fontConfigStr fonts) - (optionalString (mode != null) "mode ${mode}") - (optionalString (hiddenState != null) - "hidden_state ${hiddenState}") - (optionalString (position != null) "position ${position}") - (optionalString (statusCommand != null) - "status_command ${statusCommand}") - "${moduleName}bar_command ${command}" - (optionalString (workspaceButtons != null) - "workspace_buttons ${lib.hm.booleans.yesNo workspaceButtons}") - (optionalString (workspaceNumbers != null) - "strip_workspace_numbers ${ - lib.hm.booleans.yesNo (!workspaceNumbers) - }") - (optionalString (trayOutput != null) "tray_output ${trayOutput}") - (optionals colorsNotNull (indent - (lists.subtractLists [ "" null ] [ - "colors {" - (optionalString (colors.background != null) - "background ${colors.background}") - (optionalString (colors.statusline != null) - "statusline ${colors.statusline}") - (optionalString (colors.separator != null) - "separator ${colors.separator}") - (optionalString (colors.focusedBackground != null) - "focused_background ${colors.focusedBackground}") - (optionalString (colors.focusedStatusline != null) - "focused_statusline ${colors.focusedStatusline}") - (optionalString (colors.focusedSeparator != null) - "focused_separator ${colors.focusedSeparator}") - (optionalString (colors.focusedWorkspace != null) - "focused_workspace ${ - barColorSetStr colors.focusedWorkspace - }") - (optionalString (colors.activeWorkspace != null) - "active_workspace ${barColorSetStr colors.activeWorkspace}") - (optionalString (colors.inactiveWorkspace != null) - "inactive_workspace ${ - barColorSetStr colors.inactiveWorkspace - }") - (optionalString (colors.urgentWorkspace != null) - "urgent_workspace ${barColorSetStr colors.urgentWorkspace}") - (optionalString (colors.bindingMode != null) - "binding_mode ${barColorSetStr colors.bindingMode}") - "}" - ]) { })) - extraConfig - ])) { }) - } - } - ''; + in concatMapStrings (x: x + "\n") (indent (lists.subtractLists [ "" null ] + (flatten [ + "bar {" + (optionalString (id != null) "id ${id}") + (fontConfigStr fonts) + (optionalString (mode != null) "mode ${mode}") + (optionalString (hiddenState != null) "hidden_state ${hiddenState}") + (optionalString (position != null) "position ${position}") + (optionalString (statusCommand != null) + "status_command ${statusCommand}") + "${moduleName}bar_command ${command}" + (optionalString (workspaceButtons != null) + "workspace_buttons ${lib.hm.booleans.yesNo workspaceButtons}") + (optionalString (workspaceNumbers != null) "strip_workspace_numbers ${ + lib.hm.booleans.yesNo (!workspaceNumbers) + }") + (optionalString (trayOutput != null) "tray_output ${trayOutput}") + (optionalString (trayPadding != null) + "tray_padding ${toString trayPadding}") + (optionals colorsNotNull (indent (lists.subtractLists [ "" null ] [ + "colors {" + (optionalString (colors.background != null) + "background ${colors.background}") + (optionalString (colors.statusline != null) + "statusline ${colors.statusline}") + (optionalString (colors.separator != null) + "separator ${colors.separator}") + (optionalString (colors.focusedBackground != null) + "focused_background ${colors.focusedBackground}") + (optionalString (colors.focusedStatusline != null) + "focused_statusline ${colors.focusedStatusline}") + (optionalString (colors.focusedSeparator != null) + "focused_separator ${colors.focusedSeparator}") + (optionalString (colors.focusedWorkspace != null) + "focused_workspace ${barColorSetStr colors.focusedWorkspace}") + (optionalString (colors.activeWorkspace != null) + "active_workspace ${barColorSetStr colors.activeWorkspace}") + (optionalString (colors.inactiveWorkspace != null) + "inactive_workspace ${barColorSetStr colors.inactiveWorkspace}") + (optionalString (colors.urgentWorkspace != null) + "urgent_workspace ${barColorSetStr colors.urgentWorkspace}") + (optionalString (colors.bindingMode != null) + "binding_mode ${barColorSetStr colors.bindingMode}") + "}" + ]) { })) + extraConfig + "}" + ])) { }); gapsStr = with cfg.config.gaps; concatStringsSep "\n" (lists.subtractLists [ "" null ] [ @@ -159,7 +150,8 @@ rec { windowCommandsStr = { command, criteria, ... }: "for_window ${criteriaStr criteria} ${command}"; workspaceOutputStr = item: - ''workspace "${item.workspace}" output ${item.output}''; + let outputs = concatMapStringsSep " " strings.escapeNixString item.output; + in ''workspace "${item.workspace}" output ${outputs}''; indent = list: { includesWrapper ? true, level ? 1 }: diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix index d04a11762f..b9182439c8 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/lib/options.nix @@ -59,7 +59,7 @@ let default = true; description = '' Whether to enable startup-notification support for the command. - See option description in the i3 user guide. + See {option}`--no-startup-id` option description in the i3 user guide. ''; }; @@ -68,8 +68,8 @@ let default = null; description = '' Launch application on a particular workspace. DEPRECATED: - Use - instead. See . + Use [](#opt-xsession.windowManager.i3.config.assigns) + instead. See . ''; }; }; @@ -284,7 +284,7 @@ let See default values for the reference. Note that 'background', 'status', and 'separator' parameters take a single RGB value. - See . + See . ''; }; @@ -293,6 +293,15 @@ let default = "primary"; description = "Where to output tray."; }; + + trayPadding = mkNullableOption { + type = types.int; + default = null; + description = '' + Sets the pixel padding of the system tray. + This padding will surround the tray on all sides and between each item. + ''; + }; }; }; @@ -356,8 +365,8 @@ let type = criteriaModule; description = '' Criteria of the windows on which command should be executed. - - A value of true is equivalent to using an empty + + A value of `true` is equivalent to using an empty criteria (which is different from an empty string criteria). ''; example = literalExpression '' @@ -421,7 +430,7 @@ in { default = [ ]; description = '' List of commands that should be executed on specific windows. - See ${moduleName}wm option documentation. + See {option}`for_window` ${moduleName}wm option documentation. ''; example = [{ command = "border pixel 1"; @@ -460,12 +469,11 @@ in { }; modifier = mkOption { - type = - types.enum [ "Shift" "Control" "Mod1" "Mod2" "Mod3" "Mod4" "Mod5" ]; + type = types.str; default = cfg.config.modifier; defaultText = "${moduleName}.config.modifier"; description = - "Modifier key that can be used to drag floating windows."; + "Modifier key or keys that can be used to drag floating windows."; example = "Mod4"; }; @@ -494,7 +502,7 @@ in { description = '' This option modifies focus behavior on new window activation. - See + See ''; example = "none"; }; @@ -510,13 +518,28 @@ in { if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val; }; + wrapping = mkOption { + type = types.enum [ "yes" "no" "force" "workspace" ]; + default = { + i3 = if cfg.config.focus.forceWrapping then "force" else "yes"; + # the sway module's logic was inverted and incorrect, + # so preserve it for backwards compatibility purposes + sway = if cfg.config.focus.forceWrapping then "yes" else "no"; + }.${moduleName}; + description = '' + Whether the window focus commands automatically wrap around the edge of containers. + + See + ''; + }; + forceWrapping = mkOption { type = types.bool; default = false; description = '' - Whether to force focus wrapping in tabbed or stacked container. + Whether to force focus wrapping in tabbed or stacked containers. - See + This option is deprecated, use {option}`focus.wrapping` instead. ''; }; @@ -586,7 +609,7 @@ in { default = { }; description = '' An attribute set that assigns keypress to an action using key code. - See . + See . ''; example = { "214" = "exec /bin/script.sh"; }; }; @@ -677,7 +700,7 @@ in { and RGB color hex-codes as values. See default values for the reference. Note that '${moduleName}.config.colors.background' parameter takes a single RGB value. - See . + See . ''; }; @@ -739,14 +762,14 @@ in { description = '' Commands that should be executed at startup. - See . + See . ''; example = if isI3 then literalExpression '' [ { command = "systemctl --user restart polybar"; always = true; notification = false; } { command = "dropbox start"; notification = false; } - { command = "firefox"; workspace = "1: web"; } + { command = "firefox"; } ]; '' else @@ -888,13 +911,14 @@ in { }; output = mkOption { - type = str; + type = with types; either str (listOf str); default = ""; + apply = lists.toList; example = "eDP"; description = '' - Name of the output from + Name(s) of the output(s) from {command}` ${if isSway then "swaymsg" else "i3-msg"} -t get_outputs - . + `. ''; }; }; 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 fdcbaabcd0..9031a0a70e 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 @@ -123,9 +123,9 @@ let defaultText = "Default sway keybindings."; description = '' An attribute set that assigns a key press to an action using a key symbol. - See . - - Consider to use lib.mkOptionDefault function to extend or override + See . + + Consider to use `lib.mkOptionDefault` function to extend or override default keybindings instead of specifying all of them from scratch. ''; example = literalExpression '' @@ -144,7 +144,7 @@ let default = false; example = true; description = '' - Whether to make use of in keybindings. + Whether to make use of {option}`--to-code` in keybindings. ''; }; @@ -154,10 +154,7 @@ let example = { "*" = { xkb_variant = "dvorak"; }; }; description = '' An attribute set that defines input modules. See - - sway-input - 5 - + {manpage}`sway-input(5)` for options. ''; }; @@ -168,10 +165,7 @@ let example = { "HDMI-A-2" = { bg = "~/path/to/background.png fill"; }; }; description = '' An attribute set that defines output modules. See - - sway-output - 5 - + {manpage}`sway-output(5)` for options. ''; }; @@ -182,10 +176,7 @@ let example = { "*" = { hide_cursor = "when-typing enable"; }; }; description = '' An attribute set that defines seat modules. See - - sway-input - 5 - + {manpage}`sway-input(5)` for options. ''; }; @@ -271,7 +262,7 @@ let "floating_modifier ${floating.modifier}" (windowBorderString window floating) "hide_edge_borders ${window.hideEdgeBorders}" - "focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}" + "focus_wrapping ${focus.wrapping}" "focus_follows_mouse ${focus.followMouse}" "focus_on_window_activation ${focus.newWindow}" "mouse_warping ${ @@ -316,8 +307,8 @@ let ++ map workspaceOutputStr workspaceOutputAssign # custom mapping ) else - [ ]) ++ (optional cfg.systemdIntegration '' - exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target"'') + [ ]) ++ (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 ])); defaultSwayPackage = pkgs.sway.override { @@ -328,7 +319,19 @@ let }; in { - meta.maintainers = with maintainers; [ alexarice sumnerevans sebtm oxalica ]; + meta.maintainers = with maintainers; [ + Scrumplex + alexarice + sumnerevans + sebtm + oxalica + ]; + + imports = let modulePath = [ "wayland" "windowManager" "sway" ]; + in [ + (mkRenamedOptionModule (modulePath ++ [ "systemdIntegration" ]) + (modulePath ++ [ "systemd" "enable" ])) + ]; options.wayland.windowManager.sway = { enable = mkEnableOption "sway wayland compositor"; @@ -340,28 +343,33 @@ in { description = '' Sway package to use. Will override the options 'wrapperFeatures', 'extraSessionCommands', and 'extraOptions'. - Set to null to not add any Sway package to your + Set to `null` to not add any Sway package to your path. This should be done if you want to use the NixOS Sway module to install Sway. ''; }; - systemdIntegration = mkOption { - type = types.bool; - default = pkgs.stdenv.isLinux; - example = false; - description = '' - Whether to enable sway-session.target on - sway startup. This links to - graphical-session.target. - Some important environment variables will be imported to systemd - and dbus user environment before reaching the target, including - - DISPLAY - WAYLAND_DISPLAY - SWAYSOCK - XDG_CURRENT_DESKTOP - + systemd = { + enable = mkOption { + type = types.bool; + default = pkgs.stdenv.isLinux; + example = false; + description = '' + Whether to enable {file}`sway-session.target` on + sway startup. This links to + {file}`graphical-session.target`. + Some important environment variables will be imported to systemd + and dbus user environment before reaching the target, including + * {env}`DISPLAY` + * {env}`WAYLAND_DISPLAY` + * {env}`SWAYSOCK` + * {env}`XDG_CURRENT_DESKTOP` + ''; + }; + + xdgAutostart = mkEnableOption '' + autostart of applications using + {manpage}`systemd-xdg-autostart-generator(8)` ''; }; @@ -442,7 +450,10 @@ in { ++ flatten (map (b: optional (isList b.fonts) "Specifying sway.config.bars[].fonts as a list is deprecated. Use the attrset version instead.") - cfg.config.bars); + cfg.config.bars) ++ [ + (mkIf cfg.config.focus.forceWrapping + "sway.config.focus.forceWrapping is deprecated, use focus.wrapping instead.") + ]; }) { @@ -466,13 +477,16 @@ in { ''; }; - systemd.user.targets.sway-session = mkIf cfg.systemdIntegration { + systemd.user.targets.sway-session = mkIf cfg.systemd.enable { Unit = { Description = "sway compositor session"; Documentation = [ "man:systemd.special(7)" ]; BindsTo = [ "graphical-session.target" ]; - Wants = [ "graphical-session-pre.target" ]; + Wants = [ "graphical-session-pre.target" ] + ++ optional cfg.systemd.xdgAutostart "xdg-desktop-autostart.target"; After = [ "graphical-session-pre.target" ]; + Before = + optional cfg.systemd.xdgAutostart "xdg-desktop-autostart.target"; }; }; diff --git a/third_party/home-manager/modules/services/window-managers/i3-sway/swaynag.nix b/third_party/home-manager/modules/services/window-managers/i3-sway/swaynag.nix index 8b77b55fc5..fcdedd3d87 100644 --- a/third_party/home-manager/modules/services/window-managers/i3-sway/swaynag.nix +++ b/third_party/home-manager/modules/services/window-managers/i3-sway/swaynag.nix @@ -26,15 +26,12 @@ in { default = { }; description = '' Configuration written to - $XDG_CONFIG_HOME/swaynag/config. - + {file}`$XDG_CONFIG_HOME/swaynag/config`. + See - - swaynag - 5 - + {manpage}`swaynag(5)` for a list of available options and an example configuration. - Note, configurations declared under <config> + Note, configurations declared under `` will override the default type values of swaynag. ''; example = literalExpression '' diff --git a/third_party/home-manager/modules/services/window-managers/spectrwm.nix b/third_party/home-manager/modules/services/window-managers/spectrwm.nix index f2d7af4c0a..5561759b82 100644 --- a/third_party/home-manager/modules/services/window-managers/spectrwm.nix +++ b/third_party/home-manager/modules/services/window-managers/spectrwm.nix @@ -37,7 +37,7 @@ in { default = pkgs.spectrwm; defaultText = literalExpression "pkgs.spectrwm"; description = '' - Package providing the spectrwm command. + Package providing the {command}`spectrwm` command. ''; }; 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 8066bae2cc..59b403d306 100644 --- a/third_party/home-manager/modules/services/window-managers/xmonad.nix +++ b/third_party/home-manager/modules/services/window-managers/xmonad.nix @@ -25,10 +25,10 @@ in { defaultText = literalExpression "pkgs.haskellPackages"; example = literalExpression "pkgs.haskell.packages.ghc784"; description = '' - The haskellPackages used to build xmonad + The {var}`haskellPackages` used to build xmonad and other packages. This can be used to change the GHC version used to build xmonad and the packages listed in - extraPackages. + {var}`extraPackages`. ''; }; @@ -44,7 +44,7 @@ in { description = '' Extra packages available to GHC when rebuilding xmonad. The value must be a function which receives the attribute set - defined in haskellPackages as the sole + defined in {var}`haskellPackages` as the sole argument. ''; }; @@ -70,14 +70,13 @@ in { ''; description = '' The configuration file to be used for xmonad. This must be - an absolute path or null in which case - ~/.xmonad/xmonad.hs will not be managed + an absolute path or `null` in which case + {file}`~/.xmonad/xmonad.hs` will not be managed by Home Manager. - - - If this option is set to a non-null value, + + If this option is set to a non-`null` value, recompilation of xmonad outside of Home Manager (e.g. via - xmonad --recompile) will fail. + {command}`xmonad --recompile`) will fail. ''; }; @@ -94,7 +93,7 @@ in { ''; description = '' Additional files that will be saved in - ~/.xmonad/lib/ and included in the configuration + {file}`~/.xmonad/lib/` and included in the configuration build. The keys are the file names while the values are paths to the contents of the files. ''; diff --git a/third_party/home-manager/modules/services/wlsunset.nix b/third_party/home-manager/modules/services/wlsunset.nix index 6cd45ed5e4..3bc3f2f74c 100644 --- a/third_party/home-manager/modules/services/wlsunset.nix +++ b/third_party/home-manager/modules/services/wlsunset.nix @@ -22,16 +22,16 @@ in { latitude = mkOption { type = types.str; description = '' - Your current latitude, between -90.0 and - 90.0. + Your current latitude, between `-90.0` and + `90.0`. ''; }; longitude = mkOption { type = types.str; description = '' - Your current longitude, between -180.0 and - 180.0. + Your current longitude, between `-180.0` and + `180.0`. ''; }; @@ -41,7 +41,7 @@ in { default = 6500; description = '' Colour temperature to use during the day, in Kelvin (K). - This value must be greater than temperature.night. + This value must be greater than `temperature.night`. ''; }; @@ -50,7 +50,7 @@ in { default = 4000; description = '' Colour temperature to use during the night, in Kelvin (K). - This value must be smaller than temperature.day. + This value must be smaller than `temperature.day`. ''; }; }; diff --git a/third_party/home-manager/modules/services/xcape.nix b/third_party/home-manager/modules/services/xcape.nix index 72b8303bb4..130db65b5f 100644 --- a/third_party/home-manager/modules/services/xcape.nix +++ b/third_party/home-manager/modules/services/xcape.nix @@ -31,19 +31,17 @@ in { Control_L = "Control_L|O"; }; description = '' - The value has the grammar Key[|OtherKey]. - - + The value has the grammar `Key[|OtherKey]`. + The list of key names is found in the header file - X11/keysymdef.h (remove the - XK_ prefix). Note that due to limitations + {file}`X11/keysymdef.h` (remove the + `XK_` prefix). Note that due to limitations of X11 shifted keys must be specified as a shift key followed by the key to be pressed rather than the actual name of the character. For example to generate "{" the - expression Shift_L|bracketleft could be + expression `Shift_L|bracketleft` could be used (assuming that you have a key with "{" above "["). - - + You can also specify keys in decimal (prefix #), octal (#0), or hexadecimal (#0x). They will be interpreted as keycodes unless no corresponding key name is found. diff --git a/third_party/home-manager/modules/services/xembed-sni-proxy.nix b/third_party/home-manager/modules/services/xembed-sni-proxy.nix index 54ea0599cb..e0b1f8464e 100644 --- a/third_party/home-manager/modules/services/xembed-sni-proxy.nix +++ b/third_party/home-manager/modules/services/xembed-sni-proxy.nix @@ -18,7 +18,7 @@ in { default = pkgs.plasma-workspace; defaultText = literalExpression "pkgs.plasma-workspace"; description = '' - Package containing the xembedsniproxy + Package containing the {command}`xembedsniproxy` program. ''; }; diff --git a/third_party/home-manager/modules/services/xidlehook.nix b/third_party/home-manager/modules/services/xidlehook.nix index d769ccafb2..2ce64e6910 100644 --- a/third_party/home-manager/modules/services/xidlehook.nix +++ b/third_party/home-manager/modules/services/xidlehook.nix @@ -52,7 +52,7 @@ in { ''; description = '' Extra environment variables to be exported in the script. - These options are passed unescaped as export name=value. + These options are passed unescaped as `export name=value`. ''; }; @@ -127,10 +127,10 @@ in { ''; description = '' A set of commands to be executed after a specific idle timeout. - The commands specified in command and canceller + The commands specified in `command` and `canceller` are passed escaped to the script. To use or re-use environment variables that are script-dependent, specify them - in the environment section. + in the `environment` section. ''; }; }; diff --git a/third_party/home-manager/modules/services/xsettingsd.nix b/third_party/home-manager/modules/services/xsettingsd.nix index 58eb2665ee..c949676fa6 100644 --- a/third_party/home-manager/modules/services/xsettingsd.nix +++ b/third_party/home-manager/modules/services/xsettingsd.nix @@ -32,7 +32,7 @@ in { default = pkgs.xsettingsd; defaultText = literalExpression "pkgs.xsettingsd"; description = '' - Package containing the xsettingsd program. + Package containing the {command}`xsettingsd` program. ''; }; @@ -49,7 +49,7 @@ in { ''; description = '' Xsettingsd options for configuration file. See - + for documentation on these values. ''; }; diff --git a/third_party/home-manager/modules/services/xsuspender.nix b/third_party/home-manager/modules/services/xsuspender.nix index 54f13c8d5a..058f154711 100644 --- a/third_party/home-manager/modules/services/xsuspender.nix +++ b/third_party/home-manager/modules/services/xsuspender.nix @@ -191,7 +191,7 @@ in { Service = { ExecStart = "${pkgs.xsuspender}/bin/xsuspender"; - Environment = mkIf cfg.debug [ "G_MESSAGE_DEBUG=all" ]; + Environment = mkIf cfg.debug [ "G_MESSAGES_DEBUG=all" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/third_party/home-manager/modules/systemd.nix b/third_party/home-manager/modules/systemd.nix index e4c36ae420..22490218e0 100644 --- a/third_party/home-manager/modules/systemd.nix +++ b/third_party/home-manager/modules/systemd.nix @@ -10,16 +10,6 @@ let mkPathSafeName = lib.replaceStrings [ "@" ":" "\\" "[" "]" ] [ "-" "-" "-" "" "" ]; - enabled = cfg.services != { } # \ - || cfg.slices != { } # \ - || cfg.sockets != { } # \ - || cfg.targets != { } # \ - || cfg.timers != { } # \ - || cfg.paths != { } # \ - || cfg.mounts != { } # \ - || cfg.automounts != { } # \ - || cfg.sessionVariables != { }; - toSystemdIni = lib.generators.toINI { listsAsDuplicateKeys = true; mkKeyValue = key: value: @@ -61,7 +51,7 @@ let unitType = unitKind: with types; - let primitive = either bool (either int str); + let primitive = oneOf [ bool int str path ]; in attrsOf (attrsOf (attrsOf (either primitive (listOf primitive)))) // { description = "systemd ${unitKind} unit configuration"; }; @@ -69,13 +59,10 @@ let unitDescription = type: '' Definition of systemd per-user ${type} units. Attributes are merged recursively. - + Note that the attributes follow the capitalization and naming used by systemd. More details can be found in - - systemd.${type} - 5 - . + {manpage}`systemd.${type}(5)`. ''; unitExample = type: @@ -110,7 +97,7 @@ in { defaultText = literalExpression ''"''${pkgs.systemd}/bin/systemctl"''; type = types.str; description = '' - Absolute path to the systemctl tool. This + Absolute path to the {command}`systemctl` tool. This option may need to be set if running Home Manager on a non-NixOS distribution. ''; @@ -119,56 +106,56 @@ in { services = mkOption { default = { }; type = unitType "service"; - description = unitDescription "service"; + description = (unitDescription "service"); example = unitExample "Service"; }; slices = mkOption { default = { }; type = unitType "slice"; - description = unitDescription "slice"; + description = (unitDescription "slice"); example = unitExample "Slice"; }; sockets = mkOption { default = { }; type = unitType "socket"; - description = unitDescription "socket"; + description = (unitDescription "socket"); example = unitExample "Socket"; }; targets = mkOption { default = { }; type = unitType "target"; - description = unitDescription "target"; + description = (unitDescription "target"); example = unitExample "Target"; }; timers = mkOption { default = { }; type = unitType "timer"; - description = unitDescription "timer"; + description = (unitDescription "timer"); example = unitExample "Timer"; }; paths = mkOption { default = { }; type = unitType "path"; - description = unitDescription "path"; + description = (unitDescription "path"); example = unitExample "Path"; }; mounts = mkOption { default = { }; type = unitType "mount"; - description = unitDescription "mount"; + description = (unitDescription "mount"); example = unitExample "Mount"; }; automounts = mkOption { default = { }; type = unitType "automount"; - description = unitDescription "automount"; + description = (unitDescription "automount"); example = unitExample "Automount"; }; @@ -181,36 +168,25 @@ in { Whether new or changed services that are wanted by active targets should be started. Additionally, stop obsolete services from the previous generation. - + The alternatives are - - - suggest (or false) - - Use a very simple shell script to print suggested - systemctl commands to run. You will have to - manually run those commands after the switch. - - - - legacy (or true) - - Use a Ruby script to, in a more robust fashion, determine the - necessary changes and automatically run the - systemctl commands. - - - - sd-switch - - Use sd-switch, a third party application, to perform the service - updates. This tool offers more features while having a small - closure size. Note, it requires a fully functional user D-Bus - session. Once tested and deemed sufficiently robust, this will - become the default. - - - + + `suggest` (or `false`) + : Use a very simple shell script to print suggested + {command}`systemctl` commands to run. You will have to + manually run those commands after the switch. + + `legacy` (or `true`) + : Use a Ruby script to, in a more robust fashion, determine the + necessary changes and automatically run the + {command}`systemctl` commands. + + `sd-switch` + : Use sd-switch, a third party application, to perform the service + updates. This tool offers more features while having a small + closure size. Note, it requires a fully functional user D-Bus + session. Once tested and deemed sufficiently robust, this will + become the default. ''; }; @@ -230,101 +206,78 @@ in { description = '' Environment variables that will be set for the user session. The variable values must be as described in - - environment.d - 5 - . + {manpage}`environment.d(5)`. ''; }; }; }; - config = mkMerge [ - { - assertions = [{ - assertion = enabled -> pkgs.stdenv.isLinux; - message = let - names = lib.concatStringsSep ", " (lib.attrNames ( # \ - cfg.services # \ - // cfg.slices # \ - // cfg.sockets # \ - // cfg.targets # \ - // cfg.timers # \ - // cfg.paths # \ - // cfg.mounts # \ - // cfg.sessionVariables)); - in "Must use Linux for modules that require systemd: " + names; - }]; - } + # 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") { + xdg.configFile = mkMerge [ + (lib.listToAttrs ((buildServices "service" cfg.services) + ++ (buildServices "slice" cfg.slices) + ++ (buildServices "socket" cfg.sockets) + ++ (buildServices "target" cfg.targets) + ++ (buildServices "timer" cfg.timers) + ++ (buildServices "path" cfg.paths) + ++ (buildServices "mount" cfg.mounts) + ++ (buildServices "automount" cfg.automounts))) - # 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. - (mkIf (pkgs.stdenv.isLinux && config.home.username != "root") { - xdg.configFile = mkMerge [ - (lib.listToAttrs ((buildServices "service" cfg.services) - ++ (buildServices "slice" cfg.slices) - ++ (buildServices "socket" cfg.sockets) - ++ (buildServices "target" cfg.targets) - ++ (buildServices "timer" cfg.timers) - ++ (buildServices "path" cfg.paths) - ++ (buildServices "mount" cfg.mounts) - ++ (buildServices "automount" cfg.automounts))) + sessionVariables + ]; - sessionVariables - ]; - - # Run systemd service reload if user is logged in. If we're - # running this from the NixOS module then XDG_RUNTIME_DIR is not - # set and systemd commands will fail. We'll therefore have to - # set it ourselves in that case. - home.activation.reloadSystemd = hm.dag.entryAfter [ "linkGeneration" ] - (let - cmd = { - suggest = '' - PATH=${dirOf cfg.systemctlPath}:$PATH \ - bash ${./systemd-activate.sh} "''${oldGenPath=}" "$newGenPath" - ''; - legacy = '' - PATH=${dirOf cfg.systemctlPath}:$PATH \ - ${pkgs.ruby}/bin/ruby ${./systemd-activate.rb} \ - "''${oldGenPath=}" "$newGenPath" "${servicesStartTimeoutMs}" - ''; - sd-switch = let - timeoutArg = if cfg.servicesStartTimeoutMs != 0 then - "--timeout " + servicesStartTimeoutMs - else - ""; - in '' - ${pkgs.sd-switch}/bin/sd-switch \ - ''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \ - ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \ - --new-units $newGenPath/home-files/.config/systemd/user - ''; - }; - - ensureRuntimeDir = - "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"; - - systemctl = "${ensureRuntimeDir} ${cfg.systemctlPath}"; - in '' - systemdStatus=$(${systemctl} --user is-system-running 2>&1 || true) - - if [[ $systemdStatus == 'running' || $systemdStatus == 'degraded' ]]; then - if [[ $systemdStatus == 'degraded' ]]; then - warnEcho "The user systemd session is degraded:" - ${systemctl} --user --no-pager --state=failed - warnEcho "Attempting to reload services anyway..." - fi - - ${ensureRuntimeDir} \ - ${getAttr cfg.startServices cmd} + # Run systemd service reload if user is logged in. If we're + # running this from the NixOS module then XDG_RUNTIME_DIR is not + # set and systemd commands will fail. We'll therefore have to + # set it ourselves in that case. + home.activation.reloadSystemd = hm.dag.entryAfter [ "linkGeneration" ] (let + cmd = { + suggest = '' + PATH=${dirOf cfg.systemctlPath}:$PATH \ + bash ${./systemd-activate.sh} "''${oldGenPath=}" "$newGenPath" + ''; + legacy = '' + PATH=${dirOf cfg.systemctlPath}:$PATH \ + ${pkgs.ruby}/bin/ruby ${./systemd-activate.rb} \ + "''${oldGenPath=}" "$newGenPath" "${servicesStartTimeoutMs}" + ''; + sd-switch = let + timeoutArg = if cfg.servicesStartTimeoutMs != 0 then + "--timeout " + servicesStartTimeoutMs else - echo "User systemd daemon not running. Skipping reload." - fi + ""; + in '' + ${pkgs.sd-switch}/bin/sd-switch \ + ''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \ + ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \ + --new-units $newGenPath/home-files/.config/systemd/user + ''; + }; - unset systemdStatus - ''); - }) - ]; + ensureRuntimeDir = + "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"; + + systemctl = "${ensureRuntimeDir} ${cfg.systemctlPath}"; + in '' + systemdStatus=$(${systemctl} --user is-system-running 2>&1 || true) + + if [[ $systemdStatus == 'running' || $systemdStatus == 'degraded' ]]; then + if [[ $systemdStatus == 'degraded' ]]; then + warnEcho "The user systemd session is degraded:" + ${systemctl} --user --no-pager --state=failed + warnEcho "Attempting to reload services anyway..." + fi + + ${ensureRuntimeDir} \ + ${getAttr cfg.startServices cmd} + else + echo "User systemd daemon not running. Skipping reload." + fi + + unset systemdStatus + ''); + }; } diff --git a/third_party/home-manager/modules/targets/darwin/keybindings.nix b/third_party/home-manager/modules/targets/darwin/keybindings.nix index 824daa5721..c4348333fe 100644 --- a/third_party/home-manager/modules/targets/darwin/keybindings.nix +++ b/third_party/home-manager/modules/targets/darwin/keybindings.nix @@ -18,15 +18,13 @@ in { description = '' This will configure the default keybindings for text fields in macOS applications. See - Apple's documentation + [Apple's documentation](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html) for more details. - - - Existing keybinding configuration will be wiped when using this - option. - - + ::: {.warning} + Existing keybinding configuration will be wiped when using this + option. + ::: ''; }; 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 c44d4f9c42..8d4e17a208 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 @@ -42,20 +42,17 @@ in { }; }; description = '' - Set macOS user defaults. Values set to null are + Set macOS user defaults. Values set to `null` are ignored. - - - Some settings might require a re-login to take effect. - - - - - Some settings are only read from - . - - + ::: {.warning} + Some settings might require a re-login to take effect. + ::: + + ::: {.warning} + Some settings are only read from + {option}`targets.darwin.currentHostDefaults`. + ::: ''; }; @@ -66,17 +63,15 @@ in { "com.apple.controlcenter" = { BatteryShowPercentage = true; }; }; description = '' - Set macOS user defaults. Unlike , + Set macOS user defaults. Unlike {option}`targets.darwin.defaults`, the preferences will only be applied to the currently logged-in host. This distinction is important for networked accounts. - Values set to null are ignored. + Values set to `null` are ignored. - - - Some settings might require a re-login to take effect. - - + ::: {.warning} + Some settings might require a re-login to take effect. + ::: ''; }; 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 832318a9d2..820f05b3d8 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 @@ -70,16 +70,16 @@ in { type = types.bool; example = false; description = '' - Disable use of .DS_Store files on network shares. - See the - official article for more info. + Disable use of {file}`.DS_Store` files on network shares. + See [the + official article](https://support.apple.com/en-us/HT208209) for more info. ''; }; DSDontWriteUSBStores = mkNullableOption { type = types.bool; example = false; description = '' - Disable use of .DS_Store files on thumb drives. + Disable use of {file}`.DS_Store` files on thumb drives. ''; }; }; @@ -100,7 +100,7 @@ in { example = "NO"; description = '' This option no longer works on macOS 11 and later. Instead, use - . + {option}`targets.darwin.currentHostDefaults.\"com.apple.controlcenter\".BatteryShowPercentage`. Whether to show battery percentage in the menu bar. ''; @@ -122,12 +122,10 @@ in { description = '' Configures the web inspector. - - - Instead of setting this option directly, set - instead. - - + ::: {.warning} + Instead of setting this option directly, set + {option}`IncludeDevelopMenu` instead. + ::: ''; }; "WebKitPreferences.developerExtrasEnabled" = mkNullableOption { @@ -135,12 +133,10 @@ in { description = '' Configures the web inspector. - - - Instead of setting this option directly, set - instead. - - + ::: {.warning} + Instead of setting this option directly, set + {option}`IncludeDevelopMenu` instead. + ::: ''; }; }; @@ -151,12 +147,10 @@ in { description = '' Show the "Develop" menu in Safari's menubar. - - - Instead of setting this option directly, set - instead. - - + ::: {.warning} + Instead of setting this option directly, set + {option}`"com.apple.Safari".IncludeDevelopMenu` instead. + ::: ''; }; }; @@ -177,20 +171,16 @@ in { description = '' Configures how to restore tmux windows when attaching to a session. - Possible Values - - 0 - Native windows - - - 1 - Native tabs in a new window - - - 2 - Tabs in the attaching window - - + **Possible Values** + + `0` + : Native windows + + `1` + : Native tabs in a new window + + `2` + : Tabs in the attaching window ''; }; diff --git a/third_party/home-manager/modules/xresources.nix b/third_party/home-manager/modules/xresources.nix index 31eb6eaadd..e4ba0e47e4 100644 --- a/third_party/home-manager/modules/xresources.nix +++ b/third_party/home-manager/modules/xresources.nix @@ -50,8 +50,8 @@ in { All other values are directly formatted using builtins.toString. Note, that 2-dimensional lists are not supported and specifying one will throw an exception. If this and all other xresources options are - null, then this feature is disabled and no - ~/.Xresources link is produced. + `null`, then this feature is disabled and no + {file}`~/.Xresources` link is produced. ''; }; @@ -71,8 +71,8 @@ in { description = '' Additional X server resources contents. If this and all other xresources options are - null, then this feature is disabled and no - ~/.Xresources link is produced. + `null`, then this feature is disabled and no + {file}`~/.Xresources` link is produced. ''; }; @@ -81,7 +81,7 @@ in { default = "${config.home.homeDirectory}/.Xresources"; defaultText = "$HOME/.Xresources"; description = - "Path where Home Manager should link the .Xresources file."; + "Path where Home Manager should link the {file}`.Xresources` file."; }; }; diff --git a/third_party/home-manager/modules/xsession.nix b/third_party/home-manager/modules/xsession.nix index 7ba9b54e93..d8e2a71c22 100644 --- a/third_party/home-manager/modules/xsession.nix +++ b/third_party/home-manager/modules/xsession.nix @@ -18,7 +18,7 @@ in { default = ".xsession"; example = ".xsession-hm"; description = '' - Path, relative to HOME, where Home Manager + Path, relative to {env}`HOME`, where Home Manager should write the X session script. ''; }; @@ -28,7 +28,7 @@ in { default = ".xprofile"; example = ".xprofile-hm"; description = '' - Path, relative to HOME, where Home Manager + Path, relative to {env}`HOME`, where Home Manager should write the X profile script. ''; }; @@ -46,10 +46,10 @@ in { default = ''test -n "$1" && eval "$@"''; description = '' Command to use to start the window manager. - + The default value allows integration with NixOS' generated xserver configuration. - - Extra actions and commands can be specified in . + + Extra actions and commands can be specified in {option}`xsession.initExtra`. ''; }; @@ -78,6 +78,7 @@ in { importedVariables = mkOption { type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*"); + apply = unique; example = [ "GDK_PIXBUF_ICON_LOADER" ]; visible = false; description = '' @@ -184,7 +185,7 @@ in { ${optionalString (cfg.importedVariables != [ ]) ("systemctl --user import-environment " - + toString (unique cfg.importedVariables))} + + escapeShellArgs cfg.importedVariables)} ${cfg.profileExtra} @@ -212,6 +213,10 @@ in { while [ -n "$(systemctl --user --no-legend --state=deactivating list-units)" ]; do sleep 0.5 done + + ${optionalString (cfg.importedVariables != [ ]) + ("systemctl --user unset-environment " + + escapeShellArgs cfg.importedVariables)} ''; }; }; diff --git a/third_party/home-manager/nixos/common.nix b/third_party/home-manager/nixos/common.nix index 25872b2544..38c5aabb4a 100644 --- a/third_party/home-manager/nixos/common.nix +++ b/third_party/home-manager/nixos/common.nix @@ -9,7 +9,7 @@ let cfg = config.home-manager; - extendedLib = import ../modules/lib/stdlib-extended.nix pkgs.lib; + extendedLib = import ../modules/lib/stdlib-extended.nix lib; hmModule = types.submoduleWith { description = "Home Manager module"; @@ -45,14 +45,12 @@ in { options.home-manager = { useUserPackages = mkEnableOption '' installation of user packages through the - option - ''; + {option}`users.users..packages` option''; useGlobalPkgs = mkEnableOption '' - using the system configuration's pkgs + using the system configuration's `pkgs` argument in Home Manager. This disables the Home Manager - options - ''; + options {option}`nixpkgs.*`''; backupFileExtension = mkOption { type = types.nullOr types.str; @@ -69,7 +67,7 @@ in { default = { }; example = literalExpression "{ inherit emacs-overlay; }"; description = '' - Extra specialArgs passed to Home Manager. This + Extra `specialArgs` passed to Home Manager. This option can be used to pass additional arguments to all modules. ''; }; diff --git a/third_party/home-manager/nixos/default.nix b/third_party/home-manager/nixos/default.nix index f8a5d64261..736a787df3 100644 --- a/third_party/home-manager/nixos/default.nix +++ b/third_party/home-manager/nixos/default.nix @@ -23,6 +23,9 @@ in { # fontconfig by default. fonts.fontconfig.enable = lib.mkDefault (cfg.useUserPackages && config.fonts.fontconfig.enable); + + # Inherit glibcLocales setting from NixOS. + i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales; }]; }; } diff --git a/third_party/home-manager/release.json b/third_party/home-manager/release.json new file mode 100644 index 0000000000..5675c269e0 --- /dev/null +++ b/third_party/home-manager/release.json @@ -0,0 +1,4 @@ +{ + "release": "23.11", + "isReleaseBranch": false +} diff --git a/third_party/home-manager/tests/big-test.nix b/third_party/home-manager/tests/big-test.nix index 421eaebbd8..5396f170e7 100644 --- a/third_party/home-manager/tests/big-test.nix +++ b/third_party/home-manager/tests/big-test.nix @@ -5,7 +5,7 @@ type = lib.types.bool; default = true; description = '' - Whether to enable big tests. These are tests that require + Whether to enable "big" tests. These are tests that require more resources than typical tests. For example, tests that depend on large packages or tests that take long to run. ''; diff --git a/third_party/home-manager/tests/default.nix b/third_party/home-manager/tests/default.nix index ac31f3b50a..33331264bf 100644 --- a/third_party/home-manager/tests/default.nix +++ b/third_party/home-manager/tests/default.nix @@ -6,8 +6,8 @@ let nmt = fetchTarball { url = - "https://gitlab.com/api/v4/projects/rycee%2Fnmt/repository/archive.tar.gz?sha=d83601002c99b78c89ea80e5e6ba21addcfe12ae"; - sha256 = "1xzwwxygzs1cmysg97hzd285r7n1g1lwx5y1ar68gwq07a1rczmv"; + "https://gitlab.com/api/v4/projects/rycee%2Fnmt/repository/archive.tar.gz?sha=4df00c569b1badfedffecd7ccd60f794550486db"; + sha256 = "1cyly1zazgj8z6bazml4js7lqaqvpp8lw045aqchlpvp42bl1lp4"; }; modules = import ../modules/modules.nix { @@ -30,7 +30,7 @@ let # Avoid including documentation since this will cause # unnecessary rebuilds of the tests. - manual.manpages.enable = false; + manual.manpages.enable = lib.mkDefault false; imports = [ ./asserts.nix ./big-test.nix ./stubs.nix ]; @@ -47,15 +47,18 @@ import nmt { inherit lib pkgs modules; testedAttrPath = [ "home" "activationPackage" ]; tests = builtins.foldl' (a: b: a // (import b)) { } ([ + ./lib/generators ./lib/types ./modules/files ./modules/home-environment ./modules/misc/fontconfig + ./modules/misc/manual ./modules/misc/nix - ./modules/misc/specialization + ./modules/misc/specialisation ./modules/programs/aerc ./modules/programs/alacritty ./modules/programs/alot + ./modules/programs/antidote ./modules/programs/aria2 ./modules/programs/atuin ./modules/programs/autojump @@ -65,6 +68,8 @@ import nmt { ./modules/programs/broot ./modules/programs/browserpass ./modules/programs/btop + ./modules/programs/comodoro + ./modules/programs/darcs ./modules/programs/dircolors ./modules/programs/direnv ./modules/programs/emacs @@ -72,6 +77,8 @@ import nmt { ./modules/programs/fish ./modules/programs/gallery-dl ./modules/programs/gh + ./modules/programs/gh-dash + ./modules/programs/git-cliff ./modules/programs/git ./modules/programs/gpg ./modules/programs/helix @@ -80,9 +87,12 @@ import nmt { ./modules/programs/hyfetch ./modules/programs/i3status ./modules/programs/irssi + ./modules/programs/jujutsu ./modules/programs/k9s ./modules/programs/kakoune ./modules/programs/kitty + ./modules/programs/khal + ./modules/programs/ledger ./modules/programs/less ./modules/programs/lf ./modules/programs/lieer @@ -95,6 +105,7 @@ import nmt { ./modules/programs/ncmpcpp ./modules/programs/ne ./modules/programs/neomutt + ./modules/programs/neovim ./modules/programs/newsboat ./modules/programs/nheko ./modules/programs/nix-index @@ -102,13 +113,17 @@ import nmt { ./modules/programs/nushell ./modules/programs/oh-my-posh ./modules/programs/pandoc + ./modules/programs/papis ./modules/programs/pet ./modules/programs/pistol ./modules/programs/pls ./modules/programs/powerline-go ./modules/programs/pubs + ./modules/programs/pyenv ./modules/programs/qutebrowser ./modules/programs/readline + ./modules/programs/ripgrep + ./modules/programs/rtx ./modules/programs/sagemath ./modules/programs/sbt ./modules/programs/scmpuff @@ -116,19 +131,25 @@ import nmt { ./modules/programs/sm64ex ./modules/programs/ssh ./modules/programs/starship + ./modules/services/syncthing/common ./modules/programs/taskwarrior ./modules/programs/texlive ./modules/programs/tmate ./modules/programs/tmux ./modules/programs/topgrade + ./modules/programs/translate-shell + ./modules/programs/vim-vint ./modules/programs/vscode ./modules/programs/watson ./modules/programs/wezterm + ./modules/programs/zellij ./modules/programs/zplug ./modules/programs/zsh ./modules/xresources ] ++ lib.optionals isDarwin [ ./modules/launchd + ./modules/services/git-sync-darwin + ./modules/services/imapnotify-darwin ./modules/targets-darwin ] ++ lib.optionals isLinux [ ./modules/config/i18n @@ -143,18 +164,21 @@ import nmt { ./modules/misc/xsession ./modules/programs/abook ./modules/programs/autorandr + ./modules/programs/beets # One test relies on services.mpd ./modules/programs/borgmatic + ./modules/programs/boxxy ./modules/programs/firefox ./modules/programs/foot + ./modules/programs/fuzzel ./modules/programs/getmail ./modules/programs/gnome-terminal ./modules/programs/hexchat ./modules/programs/i3status-rust + ./modules/programs/imv ./modules/programs/kodi ./modules/programs/looking-glass-client ./modules/programs/mangohud ./modules/programs/ncmpcpp-linux - ./modules/programs/neovim # Broken package dependency on Darwin. ./modules/programs/rbw ./modules/programs/rofi ./modules/programs/rofi-pass @@ -162,12 +186,16 @@ import nmt { ./modules/programs/terminator ./modules/programs/thunderbird ./modules/programs/waybar + ./modules/programs/wlogout + ./modules/programs/wofi ./modules/programs/xmobar ./modules/programs/yt-dlp + ./modules/services/avizo ./modules/services/barrier ./modules/services/borgmatic ./modules/services/cachix-agent ./modules/services/clipman + ./modules/services/comodoro ./modules/services/devilspie2 ./modules/services/dropbox ./modules/services/emacs @@ -180,13 +208,16 @@ import nmt { ./modules/services/gpg-agent ./modules/services/gromit-mpx ./modules/services/home-manager-auto-upgrade + ./modules/services/imapnotify ./modules/services/kanshi ./modules/services/lieer ./modules/services/mopidy ./modules/services/mpd ./modules/services/mpdris2 + ./modules/services/mpd-mpris ./modules/services/pantalaimon ./modules/services/parcellite + ./modules/services/pass-secret-service ./modules/services/pbgopy ./modules/services/picom ./modules/services/playerctld @@ -195,13 +226,15 @@ import nmt { ./modules/services/redshift-gammastep ./modules/services/screen-locker ./modules/services/swayidle + ./modules/services/swayosd ./modules/services/sxhkd - ./modules/services/syncthing + ./modules/services/syncthing/linux ./modules/services/trayer ./modules/services/twmn ./modules/services/udiskie ./modules/services/window-managers/bspwm ./modules/services/window-managers/herbstluftwm + ./modules/services/window-managers/hyprland ./modules/services/window-managers/i3 ./modules/services/window-managers/spectrwm ./modules/services/window-managers/sway diff --git a/third_party/home-manager/tests/lib/generators/default.nix b/third_party/home-manager/tests/lib/generators/default.nix new file mode 100644 index 0000000000..37bb200478 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/default.nix @@ -0,0 +1 @@ +{ generators-tokdl = ./tokdl.nix; } diff --git a/third_party/home-manager/tests/lib/generators/tokdl-result.txt b/third_party/home-manager/tests/lib/generators/tokdl-result.txt new file mode 100644 index 0000000000..6ad2af368a --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/tokdl-result.txt @@ -0,0 +1,41 @@ +a 1 +b "string" +bigFlatItems 23847590283751 1.239000 "multiline \" \" \"\nstring\n" null +c "multiline string\nwith special characters:\n\t \n \\" \"\n" +extraAttrs 2 true arg1=1 arg2=false { + nested { + a 1 + b null + } +} +flatItems 1 2 "asdf" true null +listInAttrsInList { + list1 { + - { + a 1 + } + - { + b true + } + - { + c null + d { + - { + e "asdfadfasdfasdf" + } + } + } + } + list2 { + - { + a 8 + } + } +} +nested { + - 1 2 + - true false + - + - null +} +unsafeString " \" \n " diff --git a/third_party/home-manager/tests/lib/generators/tokdl.nix b/third_party/home-manager/tests/lib/generators/tokdl.nix new file mode 100644 index 0000000000..88c5752b87 --- /dev/null +++ b/third_party/home-manager/tests/lib/generators/tokdl.nix @@ -0,0 +1,53 @@ +{ config, lib, ... }: + +{ + home.file."result.txt".text = lib.hm.generators.toKDL { } { + a = 1; + b = "string"; + c = '' + multiline string + with special characters: + \t \n \" " + ''; + unsafeString = " \" \n "; + flatItems = [ 1 2 "asdf" true null ]; + bigFlatItems = [ + 23847590283751 + 1.239 + '' + multiline " " " + string + '' + null + ]; + nested = [ [ 1 2 ] [ true false ] [ ] [ null ] ]; + extraAttrs = { + _args = [ 2 true ]; + _props = { + arg1 = 1; + arg2 = false; + }; + nested = { + a = 1; + b = null; + }; + }; + listInAttrsInList = { + list1 = [ + { a = 1; } + { b = true; } + { + c = null; + d = [{ e = "asdfadfasdfasdf"; }]; + } + ]; + list2 = [{ a = 8; }]; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/result.txt \ + ${./tokdl-result.txt} + ''; +} diff --git a/third_party/home-manager/tests/lib/types/dag-merge-result.txt b/third_party/home-manager/tests/lib/types/dag-merge-result.txt index 0330161e67..30df9deced 100644 --- a/third_party/home-manager/tests/lib/types/dag-merge-result.txt +++ b/third_party/home-manager/tests/lib/types/dag-merge-result.txt @@ -2,3 +2,11 @@ before:before merged:left,middle,middle,right between:between after:after +list-anywhere-0:list-anywhere-0 +list-before-0:list-before-0,sneaky-merge +list-before-1:list-before-1 +list-anywhere-1:list-anywhere-1 +inside-list:inside-list +list-after-0:list-after-0 +list-after-1:list-after-1 +list-anywhere-2:list-anywhere-2 diff --git a/third_party/home-manager/tests/lib/types/dag-merge.nix b/third_party/home-manager/tests/lib/types/dag-merge.nix index 5d502924aa..a77c71eacf 100644 --- a/third_party/home-manager/tests/lib/types/dag-merge.nix +++ b/third_party/home-manager/tests/lib/types/dag-merge.nix @@ -27,7 +27,27 @@ in { { merged = dag.entryBefore [ "between" ] "middle"; } { merged = mkBefore "left"; } { merged = dag.entryBetween [ "after" ] [ "before" ] (mkAfter "right"); } - { merged = dag.entryBefore [ "between" ] "middle"; } + { + merged = dag.entryBefore [ "between" ] "middle"; + } + + # Some tests of list entries. + (dag.entriesAnywhere "list-anywhere" [ + "list-anywhere-0" + "list-anywhere-1" + "list-anywhere-2" + ]) + { inside-list = dag.entryAfter [ "list-anywhere-1" ] "inside-list"; } + (dag.entriesBefore "list-before" [ "list-anywhere-1" ] [ + "list-before-0" + "list-before-1" + ]) + (dag.entriesAfter "list-after" [ "list-before-0" ] [ + "list-after-0" + "list-after-1" + ]) + (dag.entriesAnywhere "list-empty" [ ]) + { "list-before-0" = mkAfter "sneaky-merge"; } ]; home.file."result.txt".text = result; diff --git a/third_party/home-manager/tests/lib/types/default.nix b/third_party/home-manager/tests/lib/types/default.nix index acb5650127..f8a7e77cf3 100644 --- a/third_party/home-manager/tests/lib/types/default.nix +++ b/third_party/home-manager/tests/lib/types/default.nix @@ -1,7 +1,6 @@ { lib-types-dag-submodule = ./dag-submodule.nix; lib-types-dag-merge = ./dag-merge.nix; - lib-types-list-or-dag-merge = ./list-or-dag-merge.nix; lib-types-gvariant-merge = ./gvariant-merge.nix; } diff --git a/third_party/home-manager/tests/lib/types/list-or-dag-merge-result.txt b/third_party/home-manager/tests/lib/types/list-or-dag-merge-result.txt deleted file mode 100644 index 5fb67a5101..0000000000 --- a/third_party/home-manager/tests/lib/types/list-or-dag-merge-result.txt +++ /dev/null @@ -1,15 +0,0 @@ -before:before -between:between -after:after -unnamed-1.1:k -unnamed-1.2:l -unnamed-2.01:a -unnamed-2.02:b -unnamed-2.03:c -unnamed-2.04:d -unnamed-2.05:e -unnamed-2.06:f -unnamed-2.07:g -unnamed-2.08:h -unnamed-2.09:i -unnamed-2.10:j diff --git a/third_party/home-manager/tests/lib/types/list-or-dag-merge.nix b/third_party/home-manager/tests/lib/types/list-or-dag-merge.nix deleted file mode 100644 index 4706c5cede..0000000000 --- a/third_party/home-manager/tests/lib/types/list-or-dag-merge.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) concatStringsSep hm mkMerge mkOption types; - - dag = lib.hm.dag; - - result = let - sorted = dag.topoSort config.tested.dag; - data = map (e: "${e.name}:${e.data}") sorted.result; - in concatStringsSep "\n" data + "\n"; - -in { - options.tested.dag = mkOption { type = hm.types.listOrDagOf types.str; }; - - config = { - tested = mkMerge [ - { dag = [ "k" "l" ]; } - { dag = [ "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" ]; } - { dag.after = "after"; } - { dag.before = dag.entryBefore [ "after" ] "before"; } - { dag.between = dag.entryBetween [ "after" ] [ "before" ] "between"; } - ]; - - home.file."result.txt".text = result; - - nmt.script = '' - assertFileContent \ - home-files/result.txt \ - ${./list-or-dag-merge-result.txt} - ''; - }; -} diff --git a/third_party/home-manager/tests/modules/config/i18n/default.nix b/third_party/home-manager/tests/modules/config/i18n/default.nix index 10b35b6f46..667b3b1d93 100644 --- a/third_party/home-manager/tests/modules/config/i18n/default.nix +++ b/third_party/home-manager/tests/modules/config/i18n/default.nix @@ -14,4 +14,26 @@ ''; }; }; + + i18n-custom-locales = { pkgs, ... }: { + config = let stub = pkgs.glibcLocalesCustom; + in { + test.stubs.glibcLocalesCustom = { + inherit (pkgs.glibcLocales) version; + outPath = null; # we need a real path for this stub + }; + + i18n.glibcLocales = stub; + + nmt.script = '' + hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh + assertFileExists $hmEnvFile + assertFileRegex $hmEnvFile 'LOCALE_ARCHIVE_.*${stub}' + + envFile=home-files/.config/environment.d/10-home-manager.conf + assertFileExists $envFile + assertFileRegex $envFile 'LOCALE_ARCHIVE_.*${stub}' + ''; + }; + }; } diff --git a/third_party/home-manager/tests/modules/files/default.nix b/third_party/home-manager/tests/modules/files/default.nix index 52e44d22b1..2c35b9a2e5 100644 --- a/third_party/home-manager/tests/modules/files/default.nix +++ b/third_party/home-manager/tests/modules/files/default.nix @@ -1,4 +1,5 @@ { + files-disabled = ./disabled.nix; files-executable = ./executable.nix; files-hidden-source = ./hidden-source.nix; files-out-of-store-symlink = ./out-of-store-symlink.nix; diff --git a/third_party/home-manager/tests/modules/files/disabled.nix b/third_party/home-manager/tests/modules/files/disabled.nix new file mode 100644 index 0000000000..b9ed858aaf --- /dev/null +++ b/third_party/home-manager/tests/modules/files/disabled.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + home.file."disabled" = { + enable = false; + text = '' + This file should not exist + ''; + }; + + nmt.script = '' + assertPathNotExists home-files/disabled + ''; +} diff --git a/third_party/home-manager/tests/modules/files/executable.nix b/third_party/home-manager/tests/modules/files/executable.nix index b286c2b499..9ab8f3591e 100644 --- a/third_party/home-manager/tests/modules/files/executable.nix +++ b/third_party/home-manager/tests/modules/files/executable.nix @@ -1,17 +1,13 @@ -{ config, lib, ... }: - -with lib; +{ ... }: { - config = { - home.file."executable" = { - text = ""; - executable = true; - }; - - nmt.script = '' - assertFileExists home-files/executable - assertFileIsExecutable home-files/executable; - ''; + home.file."executable" = { + text = ""; + executable = true; }; + + nmt.script = '' + assertFileExists home-files/executable + assertFileIsExecutable home-files/executable; + ''; } diff --git a/third_party/home-manager/tests/modules/files/hidden-source.nix b/third_party/home-manager/tests/modules/files/hidden-source.nix index 8169fedcd7..380a2cb2d9 100644 --- a/third_party/home-manager/tests/modules/files/hidden-source.nix +++ b/third_party/home-manager/tests/modules/files/hidden-source.nix @@ -1,19 +1,15 @@ -{ config, lib, ... }: - -with lib; +{ ... }: { - config = { - home.file.".hidden".source = ./.hidden; + home.file.".hidden".source = ./.hidden; - nmt.script = '' - assertFileExists home-files/.hidden; - assertFileContent home-files/.hidden ${ - builtins.path { - path = ./.hidden; - name = "expected"; - } + nmt.script = '' + assertFileExists home-files/.hidden; + assertFileContent home-files/.hidden ${ + builtins.path { + path = ./.hidden; + name = "expected"; } - ''; - }; + } + ''; } diff --git a/third_party/home-manager/tests/modules/files/out-of-store-symlink.nix b/third_party/home-manager/tests/modules/files/out-of-store-symlink.nix index af274aaebe..15a70fa7ea 100644 --- a/third_party/home-manager/tests/modules/files/out-of-store-symlink.nix +++ b/third_party/home-manager/tests/modules/files/out-of-store-symlink.nix @@ -1,29 +1,25 @@ -{ config, lib, ... }: - -with lib; +{ config, ... }: let filePath = ./. + "/source with spaces!"; in { - config = { - home.file."oos".source = config.lib.file.mkOutOfStoreSymlink filePath; + home.file."oos".source = config.lib.file.mkOutOfStoreSymlink filePath; - nmt.script = '' - assertLinkExists "home-files/oos" + nmt.script = '' + assertLinkExists "home-files/oos" - storePath="$(readlink $TESTED/home-files/oos)" + storePath="$(readlink $TESTED/home-files/oos)" - if [[ ! -L $storePath ]]; then - fail "Expected $storePath to be a symbolic link, but it was not." - fi + if [[ ! -L $storePath ]]; then + fail "Expected $storePath to be a symbolic link, but it was not." + fi - actual="$(readlink "$storePath")" - expected="${toString filePath}" - if [[ $actual != $expected ]]; then - fail "Symlink home-files/oos should point to $expected via the Nix store, but it actually points to $actual." - fi - ''; - }; + actual="$(readlink "$storePath")" + expected="${toString filePath}" + if [[ $actual != $expected ]]; then + fail "Symlink home-files/oos should point to $expected via the Nix store, but it actually points to $actual." + fi + ''; } diff --git a/third_party/home-manager/tests/modules/files/source-with-spaces.nix b/third_party/home-manager/tests/modules/files/source-with-spaces.nix index 1d593c6425..cd78664e54 100644 --- a/third_party/home-manager/tests/modules/files/source-with-spaces.nix +++ b/third_party/home-manager/tests/modules/files/source-with-spaces.nix @@ -1,20 +1,16 @@ -{ config, lib, ... }: - -with lib; +{ ... }: { - config = { - home.file."source with spaces!".source = ./. + "/source with spaces!"; + home.file."source with spaces!".source = ./. + "/source with spaces!"; - nmt.script = '' - assertFileExists 'home-files/source with spaces!'; - assertFileContent 'home-files/source with spaces!' \ - ${ - builtins.path { - path = ./. + "/source with spaces!"; - name = "source-with-spaces-expected"; - } + nmt.script = '' + assertFileExists 'home-files/source with spaces!'; + assertFileContent 'home-files/source with spaces!' \ + ${ + builtins.path { + path = ./. + "/source with spaces!"; + name = "source-with-spaces-expected"; } - ''; - }; + } + ''; } diff --git a/third_party/home-manager/tests/modules/files/target-conflict.nix b/third_party/home-manager/tests/modules/files/target-conflict.nix index dbcee80a00..9677cf9de7 100644 --- a/third_party/home-manager/tests/modules/files/target-conflict.nix +++ b/third_party/home-manager/tests/modules/files/target-conflict.nix @@ -1,26 +1,24 @@ { ... }: { - config = { - home.file = { - conflict1 = { - text = ""; - target = "baz"; - }; - conflict2 = { - source = ./target-conflict.nix; - target = "baz"; - }; + home.file = { + conflict1 = { + text = ""; + target = "baz"; + }; + conflict2 = { + source = ./target-conflict.nix; + target = "baz"; }; - - test.asserts.assertions.expected = ['' - Conflicting managed target files: baz - - This may happen, for example, if you have a configuration similar to - - home.file = { - conflict1 = { source = ./foo.nix; target = "baz"; }; - conflict2 = { source = ./bar.nix; target = "baz"; }; - }'']; }; + + test.asserts.assertions.expected = ['' + Conflicting managed target files: baz + + This may happen, for example, if you have a configuration similar to + + home.file = { + conflict1 = { source = ./foo.nix; target = "baz"; }; + conflict2 = { source = ./bar.nix; target = "baz"; }; + }'']; } diff --git a/third_party/home-manager/tests/modules/files/target-with-shellvar.nix b/third_party/home-manager/tests/modules/files/target-with-shellvar.nix index c54946eb9e..59fc02fdea 100644 --- a/third_party/home-manager/tests/modules/files/target-with-shellvar.nix +++ b/third_party/home-manager/tests/modules/files/target-with-shellvar.nix @@ -1,15 +1,11 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ ... }: { - config = { - home.file."$HOME/$FOO/bar baz".text = "blah"; + home.file."$HOME/$FOO/bar baz".text = "blah"; - nmt.script = '' - assertFileExists 'home-files/$HOME/$FOO/bar baz'; - assertFileContent 'home-files/$HOME/$FOO/bar baz' \ - ${pkgs.writeText "expected" "blah"} - ''; - }; + nmt.script = '' + assertFileExists 'home-files/$HOME/$FOO/bar baz'; + assertFileContent 'home-files/$HOME/$FOO/bar baz' \ + ${builtins.toFile "expected" "blah"} + ''; } diff --git a/third_party/home-manager/tests/modules/files/text.nix b/third_party/home-manager/tests/modules/files/text.nix index 6fc9a26fcb..c09c56c4a4 100644 --- a/third_party/home-manager/tests/modules/files/text.nix +++ b/third_party/home-manager/tests/modules/files/text.nix @@ -1,18 +1,14 @@ -{ config, lib, ... }: - -with lib; +{ ... }: { - config = { - home.file."using-text".text = '' - This is the - expected text. - ''; + home.file."using-text".text = '' + This is the + expected text. + ''; - nmt.script = '' - assertFileExists home-files/using-text - assertFileIsNotExecutable home-files/using-text - assertFileContent home-files/using-text ${./text-expected.txt} - ''; - }; + nmt.script = '' + assertFileExists home-files/using-text + assertFileIsNotExecutable home-files/using-text + assertFileContent home-files/using-text ${./text-expected.txt} + ''; } diff --git a/third_party/home-manager/tests/modules/home-environment/session-variables.nix b/third_party/home-manager/tests/modules/home-environment/session-variables.nix index 08c988d2bb..e1c8bedf8c 100644 --- a/third_party/home-manager/tests/modules/home-environment/session-variables.nix +++ b/third_party/home-manager/tests/modules/home-environment/session-variables.nix @@ -9,7 +9,7 @@ let if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi export __HM_SESS_VARS_SOURCED=1 - export LOCALE_ARCHIVE_2_27="${pkgs.glibcLocales}/lib/locale/locale-archive" + export LOCALE_ARCHIVE_2_27="${config.i18n.glibcLocales}/lib/locale/locale-archive" export V1="v1" export V2="v2-v1" export XDG_CACHE_HOME="/home/hm-user/.cache" diff --git a/third_party/home-manager/tests/modules/launchd/agents.nix b/third_party/home-manager/tests/modules/launchd/agents.nix index cbcff6b5a2..ccf4f6e242 100644 --- a/third_party/home-manager/tests/modules/launchd/agents.nix +++ b/third_party/home-manager/tests/modules/launchd/agents.nix @@ -13,6 +13,7 @@ with lib; SuccessfulExit = false; }; ProcessType = "Background"; + UnrecognizedByHomeManager = "should make it to the resulting plist"; }; }; diff --git a/third_party/home-manager/tests/modules/launchd/expected-agent.plist b/third_party/home-manager/tests/modules/launchd/expected-agent.plist index c56ad4da44..890b99339c 100644 --- a/third_party/home-manager/tests/modules/launchd/expected-agent.plist +++ b/third_party/home-manager/tests/modules/launchd/expected-agent.plist @@ -19,5 +19,7 @@ --with-arguments foo + UnrecognizedByHomeManager + should make it to the resulting plist \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/misc/debug/default.nix b/third_party/home-manager/tests/modules/misc/debug/default.nix index 19ff4e2b81..7eb2866660 100644 --- a/third_party/home-manager/tests/modules/misc/debug/default.nix +++ b/third_party/home-manager/tests/modules/misc/debug/default.nix @@ -15,7 +15,7 @@ assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ 'NIX_DEBUG_INFO_DIRS=.*/lib/debug' - # We need to override NIX_DEBUG_INFO_DIRS here as $HOME evalutes to the home + # We need to override NIX_DEBUG_INFO_DIRS here as $HOME evaluates to the home # of the user who executes this testcase :/ { echo quit | PATH="$TESTED/home-path/bin''${PATH:+:}$PATH" NIX_DEBUG_INFO_DIRS=$TESTED/home-path/lib/debug \ gdb curl 2>&1 | \ diff --git a/third_party/home-manager/tests/modules/misc/manual/default.nix b/third_party/home-manager/tests/modules/misc/manual/default.nix new file mode 100644 index 0000000000..095809c91c --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/manual/default.nix @@ -0,0 +1 @@ +{ manual = ./manual.nix; } diff --git a/third_party/home-manager/tests/modules/misc/manual/manual.nix b/third_party/home-manager/tests/modules/misc/manual/manual.nix new file mode 100644 index 0000000000..eb70374a34 --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/manual/manual.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + config = { + manual = { + html.enable = true; + manpages.enable = true; + json.enable = true; + }; + + nmt.script = '' + assertFileExists home-path/share/doc/home-manager/index.html + assertFileExists home-path/share/doc/home-manager/options.html + assertFileExists home-path/share/doc/home-manager/options.json + assertFileExists home-path/share/man/man1/home-manager.1.gz + assertFileExists home-path/share/man/man5/home-configuration.nix.5.gz + ''; + }; +} 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 80baeae6f4..58b4cd7a1f 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 @@ -5,10 +5,7 @@ qt = { enable = true; platformTheme = "gnome"; - style = { - name = "adwaita"; - package = config.lib.test.mkStubPackage { }; - }; + style.name = "adwaita"; }; test.stubs.qgnomeplatform = { }; diff --git a/third_party/home-manager/tests/modules/misc/specialisation/default.nix b/third_party/home-manager/tests/modules/misc/specialisation/default.nix new file mode 100644 index 0000000000..33c240ff6f --- /dev/null +++ b/third_party/home-manager/tests/modules/misc/specialisation/default.nix @@ -0,0 +1 @@ +{ specialisation = ./specialisation.nix; } diff --git a/third_party/home-manager/tests/modules/misc/specialization/specialization.nix b/third_party/home-manager/tests/modules/misc/specialisation/specialisation.nix similarity index 62% rename from third_party/home-manager/tests/modules/misc/specialization/specialization.nix rename to third_party/home-manager/tests/modules/misc/specialisation/specialisation.nix index 9d6149a0a5..a8d417d487 100644 --- a/third_party/home-manager/tests/modules/misc/specialization/specialization.nix +++ b/third_party/home-manager/tests/modules/misc/specialisation/specialisation.nix @@ -4,7 +4,7 @@ with lib; { home.file.testfile.text = "not special"; - specialization.test.configuration = { + specialisation.test.configuration = { home.file.testfile.text = "very special"; }; @@ -12,7 +12,7 @@ with lib; assertFileExists home-files/testfile assertFileContains home-files/testfile "not special" - assertFileExists specialization/test/home-files/testfile - assertFileContains specialization/test/home-files/testfile "not special" + assertFileExists specialisation/test/home-files/testfile + assertFileContains specialisation/test/home-files/testfile "not special" ''; } diff --git a/third_party/home-manager/tests/modules/misc/specialization/default.nix b/third_party/home-manager/tests/modules/misc/specialization/default.nix deleted file mode 100644 index ddbc22c6ac..0000000000 --- a/third_party/home-manager/tests/modules/misc/specialization/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ specialization = ./specialization.nix; } diff --git a/third_party/home-manager/tests/modules/misc/xdg/desktop-entries.nix b/third_party/home-manager/tests/modules/misc/xdg/desktop-entries.nix index 541a7cc53f..5f00029b6d 100644 --- a/third_party/home-manager/tests/modules/misc/xdg/desktop-entries.nix +++ b/third_party/home-manager/tests/modules/misc/xdg/desktop-entries.nix @@ -32,7 +32,6 @@ with lib; }; }; min = { # minimal definition - exec = "test --option"; name = "Test"; }; deprecated = { diff --git a/third_party/home-manager/tests/modules/misc/xdg/desktop-min-expected.desktop b/third_party/home-manager/tests/modules/misc/xdg/desktop-min-expected.desktop index 1b36b57c67..da4d7bfd23 100644 --- a/third_party/home-manager/tests/modules/misc/xdg/desktop-min-expected.desktop +++ b/third_party/home-manager/tests/modules/misc/xdg/desktop-min-expected.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Exec=test --option Name=Test Terminal=false Type=Application diff --git a/third_party/home-manager/tests/modules/misc/xdg/system-dirs.nix b/third_party/home-manager/tests/modules/misc/xdg/system-dirs.nix index fa34ae0b5f..432724bf83 100644 --- a/third_party/home-manager/tests/modules/misc/xdg/system-dirs.nix +++ b/third_party/home-manager/tests/modules/misc/xdg/system-dirs.nix @@ -10,7 +10,7 @@ assertFileExists $envFile assertFileContent $envFile ${ pkgs.writeText "expected" '' - LOCALE_ARCHIVE_2_27=${pkgs.glibcLocales}/lib/locale/locale-archive + LOCALE_ARCHIVE_2_27=${config.i18n.glibcLocales}/lib/locale/locale-archive XDG_CACHE_HOME=/home/hm-user/.cache XDG_CONFIG_DIRS=/etc/xdg:/foo/bar''${XDG_CONFIG_DIRS:+:$XDG_CONFIG_DIRS} XDG_CONFIG_HOME=/home/hm-user/.config diff --git a/third_party/home-manager/tests/modules/misc/xsession/basic-xprofile-expected.txt b/third_party/home-manager/tests/modules/misc/xsession/basic-xprofile-expected.txt index 282f8f5c5d..b3d591c225 100644 --- a/third_party/home-manager/tests/modules/misc/xsession/basic-xprofile-expected.txt +++ b/third_party/home-manager/tests/modules/misc/xsession/basic-xprofile-expected.txt @@ -9,7 +9,7 @@ fi # script starts up graphical-session.target. systemctl --user stop graphical-session.target graphical-session-pre.target -systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID EXTRA_IMPORTED_VARIABLE +systemctl --user import-environment 'DBUS_SESSION_BUS_ADDRESS' 'DISPLAY' 'SSH_AUTH_SOCK' 'XAUTHORITY' 'XDG_DATA_DIRS' 'XDG_RUNTIME_DIR' 'XDG_SESSION_ID' 'EXTRA_IMPORTED_VARIABLE' profile extra commands diff --git a/third_party/home-manager/tests/modules/misc/xsession/basic-xsession-expected.txt b/third_party/home-manager/tests/modules/misc/xsession/basic-xsession-expected.txt index 423e7779c1..a95bb35abc 100644 --- a/third_party/home-manager/tests/modules/misc/xsession/basic-xsession-expected.txt +++ b/third_party/home-manager/tests/modules/misc/xsession/basic-xsession-expected.txt @@ -16,3 +16,5 @@ systemctl --user stop graphical-session-pre.target while [ -n "$(systemctl --user --no-legend --state=deactivating list-units)" ]; do sleep 0.5 done + +systemctl --user unset-environment 'DBUS_SESSION_BUS_ADDRESS' 'DISPLAY' 'SSH_AUTH_SOCK' 'XAUTHORITY' 'XDG_DATA_DIRS' 'XDG_RUNTIME_DIR' 'XDG_SESSION_ID' 'EXTRA_IMPORTED_VARIABLE' diff --git a/third_party/home-manager/tests/modules/programs/aerc/assertion.nix b/third_party/home-manager/tests/modules/programs/aerc/assertion.nix new file mode 100644 index 0000000000..9b37f0824c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/aerc/assertion.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + test.asserts.assertions.expected = ['' + Only the ui section of $XDG_CONFIG_HOME/aerc.conf supports contextual (per-account) configuration. + Please configure it with accounts.email.accounts._.aerc.extraConfig.ui and move any other + configuration to programs.aerc.extraConfig. + '']; + test.asserts.warnings.expected = ['' + aerc: `programs.aerc.enable` is set, but `...extraConfig.general.unsafe-accounts-conf` is set to false or unset. + This will prevent aerc from starting; see `unsafe-accounts-conf` in the man page aerc-config(5): + > By default, the file permissions of accounts.conf must be restrictive and only allow reading by the file owner (0600). + > Set this option to true to ignore this permission check. Use this with care as it may expose your credentials. + These permissions are not possible with home-manager, since the generated file is in the nix-store (permissions 0444). + Therefore, please set `programs.aerc.extraConfig.general.unsafe-accounts-conf = true`. + This option is safe; if `passwordCommand` is properly set, no credentials will be written to the nix store. + '']; + + test.stubs.aerc = { }; + + programs.aerc = { + enable = true; + extraAccounts = { + Test1 = { + source = "maildir:///dev/null"; + enable-folders-sort = true; + folders = [ "INBOX" "SENT" "JUNK" ]; + }; + }; + extraConfig.general = { + # unsafe-accounts-conf = true; + pgp-provider = "gpg"; + }; + }; + + accounts.email.accounts.Test2 = { + address = "addr@mail.invalid"; + userName = "addr@mail.invalid"; + realName = "Foo Bar"; + primary = true; + imap.host = "imap.host.invalid"; + passwordCommand = "echo PaSsWorD!"; + aerc = { + enable = true; + extraConfig.general.pgp-provider = "internal"; + }; + }; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/aerc/default.nix b/third_party/home-manager/tests/modules/programs/aerc/default.nix index f5d810927b..9417a2197b 100644 --- a/third_party/home-manager/tests/modules/programs/aerc/default.nix +++ b/third_party/home-manager/tests/modules/programs/aerc/default.nix @@ -1,4 +1,5 @@ { aerc-noSettings = ./noSettings.nix; aerc-settings = ./settings.nix; + aerc-assertion = ./assertion.nix; } diff --git a/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected b/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected index 15749c0382..172e3452fc 100644 --- a/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected +++ b/third_party/home-manager/tests/modules/programs/aerc/extraAccounts.expected @@ -8,6 +8,10 @@ source = maildir:///dev/null [Test2] pgp-key-id = 42 +[primary] +from = Foo Bar +source = imap://foobar@imap.host.invalid:1337 + [a_imap-nopasscmd-tls-starttls-folders] copy-to = aercSent default = aercInbox @@ -34,7 +38,6 @@ source-cred-cmd = echo PaSsWorD! [e_smtp-nopasscmd-tls-starttls] from = Foo Bar outgoing = smtp+plain://foobar@smtp.host.invalid:42 -smtp-starttls = yes [f_smtp-passcmd-tls-nostarttls] from = Foo Bar @@ -43,12 +46,12 @@ outgoing-cred-cmd = echo PaSsWorD! [g_smtp-passcmd-notls-nostarttls] from = Foo Bar -outgoing = smtp+plain://foobar@smtp.host.invalid:42 +outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42 outgoing-cred-cmd = echo PaSsWorD! [h_smtp-passcmd-notls-starttls] from = Foo Bar -outgoing = smtp+plain://foobar@smtp.host.invalid:42 +outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42 outgoing-cred-cmd = echo PaSsWorD! [i_maildir-mbsync] @@ -59,18 +62,24 @@ source = maildir:///home/hm-user/Maildir/i_maildir-mbsync from = Foo Bar source = maildir:///home/hm-user/Maildir/j_maildir-offlineimap -[l_smpt-auth-none] +[l_smtp-auth-none] from = Foo Bar outgoing = smtps+none://foobar@smtp.host.invalid:42 -[m_smpt-auth-plain] +[m_smtp-auth-plain] from = Foo Bar outgoing = smtps+plain://foobar@smtp.host.invalid:42 -[n_smpt-auth-login] +[n_smtp-auth-login] from = Foo Bar outgoing = smtps+login://foobar@smtp.host.invalid:42 [o_msmtp] from = Foo Bar outgoing = msmtpq --read-envelope-from --read-recipients + +[p_overwrite_defaults] +from = test +outgoing = imap+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337 +postpone = dRaFts +source = smtp+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337 diff --git a/third_party/home-manager/tests/modules/programs/aerc/settings.nix b/third_party/home-manager/tests/modules/programs/aerc/settings.nix index 2fded9cc84..fa385655ae 100644 --- a/third_party/home-manager/tests/modules/programs/aerc/settings.nix +++ b/third_party/home-manager/tests/modules/programs/aerc/settings.nix @@ -102,7 +102,7 @@ with lib; }; }; in { - a_imap-nopasscmd-tls-starttls-folders = basics // { + primary = basics // { primary = true; imap = { host = "imap.host.invalid"; @@ -110,6 +110,14 @@ with lib; tls.enable = true; tls.useStartTls = true; }; + }; + a_imap-nopasscmd-tls-starttls-folders = basics // { + imap = { + host = "imap.host.invalid"; + port = 1337; + tls.enable = true; + tls.useStartTls = true; + }; folders = { drafts = "aercDrafts"; inbox = "aercInbox"; @@ -193,7 +201,7 @@ with lib; i_maildir-mbsync = basics // { mbsync.enable = true; }; j_maildir-offlineimap = basics // { offlineimap.enable = true; }; k_notEnabled = basics // { aerc.enable = false; }; - l_smpt-auth-none = basics // { + l_smtp-auth-none = basics // { smtp = { host = "smtp.host.invalid"; port = 42; @@ -203,7 +211,7 @@ with lib; smtpAuth = "none"; }; }; - m_smpt-auth-plain = basics // { + m_smtp-auth-plain = basics // { smtp = { host = "smtp.host.invalid"; port = 42; @@ -213,7 +221,7 @@ with lib; smtpAuth = "plain"; }; }; - n_smpt-auth-login = basics // { + n_smtp-auth-login = basics // { smtp = { host = "smtp.host.invalid"; port = 42; @@ -224,6 +232,21 @@ with lib; }; }; o_msmtp = basics // { msmtp = { enable = true; }; }; + p_overwrite_defaults = basics // { + smtp.host = "should.be.overwritten.invalid"; + imap.host = "should.be.overwritten.invalid"; + aerc = { + enable = true; + extraAccounts = { + from = "test "; + outgoing = + "imap+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337"; + source = + "smtp+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337"; + postpone = "dRaFts"; + }; + }; + }; }; }; } diff --git a/third_party/home-manager/tests/modules/programs/antidote/antidote.nix b/third_party/home-manager/tests/modules/programs/antidote/antidote.nix new file mode 100644 index 0000000000..3d8fff6a93 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/antidote/antidote.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: + +let relToDotDirCustom = ".zshplugins"; +in { + programs.zsh = { + enable = true; + dotDir = relToDotDirCustom; + antidote = { + enable = true; + useFriendlyNames = true; + plugins = [ "zsh-users/zsh-autosuggestions" ]; + }; + }; + + test.stubs = { + antidote = { }; + zsh = { }; + }; + + nmt.script = '' + assertFileContains home-files/${relToDotDirCustom}/.zshrc \ + 'source @antidote@/share/antidote/antidote.zsh' + assertFileContains home-files/${relToDotDirCustom}/.zshrc \ + 'antidote load' + assertFileContains home-files/${relToDotDirCustom}/.zshrc \ + "zstyle ':antidote:bundle' use-friendly-names 'yes'" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/antidote/default.nix b/third_party/home-manager/tests/modules/programs/antidote/default.nix new file mode 100644 index 0000000000..24f19dd98c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/antidote/default.nix @@ -0,0 +1 @@ +{ antidote-program = ./antidote.nix; } diff --git a/third_party/home-manager/tests/modules/programs/atuin/bash.nix b/third_party/home-manager/tests/modules/programs/atuin/bash.nix index 521886b2eb..a84ea99e3a 100644 --- a/third_party/home-manager/tests/modules/programs/atuin/bash.nix +++ b/third_party/home-manager/tests/modules/programs/atuin/bash.nix @@ -18,6 +18,6 @@ assertFileExists home-files/.bashrc assertFileContains \ home-files/.bashrc \ - 'eval "$(@atuin@/bin/atuin init bash)"' + 'eval "$(@atuin@/bin/atuin init bash )"' ''; } diff --git a/third_party/home-manager/tests/modules/programs/atuin/default.nix b/third_party/home-manager/tests/modules/programs/atuin/default.nix index ee22818a35..51bf653e28 100644 --- a/third_party/home-manager/tests/modules/programs/atuin/default.nix +++ b/third_party/home-manager/tests/modules/programs/atuin/default.nix @@ -5,4 +5,5 @@ atuin-fish = ./fish.nix; atuin-no-shell = ./no-shell.nix; atuin-zsh = ./zsh.nix; + atuin-set-flags = ./set-flags.nix; } diff --git a/third_party/home-manager/tests/modules/programs/atuin/fish.nix b/third_party/home-manager/tests/modules/programs/atuin/fish.nix index 527943d67b..ae3122cf15 100644 --- a/third_party/home-manager/tests/modules/programs/atuin/fish.nix +++ b/third_party/home-manager/tests/modules/programs/atuin/fish.nix @@ -19,6 +19,6 @@ assertFileExists home-files/.config/fish/config.fish assertFileContains \ home-files/.config/fish/config.fish \ - 'atuin init fish | source' + '@atuin@/bin/atuin init fish | source' ''; } diff --git a/third_party/home-manager/tests/modules/programs/atuin/set-flags.nix b/third_party/home-manager/tests/modules/programs/atuin/set-flags.nix new file mode 100644 index 0000000000..7e3a7982fe --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/atuin/set-flags.nix @@ -0,0 +1,39 @@ +{ lib, ... }: + +{ + programs = { + atuin.enable = true; + atuin.flags = [ "--disable-ctrl-r" "--disable-up-arrow" ]; + bash = { + enable = true; + enableCompletion = false; + }; + zsh.enable = true; + fish.enable = true; + }; + + # Needed to avoid error with dummy fish package. + xdg.dataFile."fish/home-manager_generated_completions".source = + lib.mkForce (builtins.toFile "empty" ""); + + test.stubs = { + atuin = { }; + bash-preexec = { }; + }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + "eval \"\$(@atuin@/bin/atuin init bash '--disable-ctrl-r' '--disable-up-arrow')\"" + + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + "eval \"\$(@atuin@/bin/atuin init zsh '--disable-ctrl-r' '--disable-up-arrow')\"" + assertFileExists home-files/.config/fish/config.fish + assertFileContains \ + home-files/.config/fish/config.fish \ + "@atuin@/bin/atuin init fish --disable-ctrl-r --disable-up-arrow | source" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/atuin/zsh.nix b/third_party/home-manager/tests/modules/programs/atuin/zsh.nix index 45f0254ca9..14adddcac4 100644 --- a/third_party/home-manager/tests/modules/programs/atuin/zsh.nix +++ b/third_party/home-manager/tests/modules/programs/atuin/zsh.nix @@ -15,6 +15,6 @@ assertFileExists home-files/.zshrc assertFileContains \ home-files/.zshrc \ - 'eval "$(@atuin@/bin/atuin init zsh)"' + 'eval "$(@atuin@/bin/atuin init zsh )"' ''; } diff --git a/third_party/home-manager/tests/modules/programs/autojump/default-settings.nix b/third_party/home-manager/tests/modules/programs/autojump/default-settings.nix index 2cca7de88c..e7d40bb370 100644 --- a/third_party/home-manager/tests/modules/programs/autojump/default-settings.nix +++ b/third_party/home-manager/tests/modules/programs/autojump/default-settings.nix @@ -8,6 +8,7 @@ with lib; test.stubs.autojump = { buildScript = "mkdir -p $out/bin; touch $out/bin/autojump"; + outPath = null; }; nmt.script = '' diff --git a/third_party/home-manager/tests/modules/programs/beets/default.nix b/third_party/home-manager/tests/modules/programs/beets/default.nix new file mode 100644 index 0000000000..93bf207c61 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/default.nix @@ -0,0 +1,5 @@ +{ + beets-mpdstats = ./mpdstats.nix; + beets-mpdstats-external = ./mpdstats-external.nix; + beets-mpdupdate = ./mpdupdate.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.service b/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.service new file mode 100644 index 0000000000..3f1dbf63ba --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.service @@ -0,0 +1,10 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=@beets@/bin/beet mpdstats + +[Unit] +After=mpd.service +Description=Beets MPDStats daemon +Requires=mpd.service diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.yaml b/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.yaml new file mode 100644 index 0000000000..4f3e6b0a93 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats-expected.yaml @@ -0,0 +1,5 @@ +mpd: + host: localhost + port: 4242 +plugins: +- mpdstats diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.service b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.service new file mode 100644 index 0000000000..85efc1f507 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.service @@ -0,0 +1,8 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=@beets@/bin/beet mpdstats + +[Unit] +Description=Beets MPDStats daemon diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.yaml b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.yaml new file mode 100644 index 0000000000..ce4784df80 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external-expected.yaml @@ -0,0 +1,5 @@ +mpd: + host: 10.0.0.42 + port: 6601 +plugins: +- mpdstats diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats-external.nix b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external.nix new file mode 100644 index 0000000000..32a9c0736a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats-external.nix @@ -0,0 +1,27 @@ +{ config, ... }: + +{ + home.stateVersion = "23.05"; + + programs.beets = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@beets@"; }; + mpdIntegration = { + enableStats = true; + host = "10.0.0.42"; + port = 6601; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/beets/config.yaml + assertFileContent \ + home-files/.config/beets/config.yaml \ + ${./mpdstats-external-expected.yaml} + + assertFileExists home-files/.config/systemd/user/beets-mpdstats.service + assertFileContent \ + home-files/.config/systemd/user/beets-mpdstats.service \ + ${./mpdstats-external-expected.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix b/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix new file mode 100644 index 0000000000..781eaa84a1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdstats.nix @@ -0,0 +1,29 @@ +{ config, ... }: + +{ + home.stateVersion = "23.05"; + + services.mpd = { + enable = true; + musicDirectory = "/my/music/dir"; + network.port = 4242; + }; + + programs.beets = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@beets@"; }; + mpdIntegration.enableStats = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/beets/config.yaml + assertFileContent \ + home-files/.config/beets/config.yaml \ + ${./mpdstats-expected.yaml} + + assertFileExists home-files/.config/systemd/user/beets-mpdstats.service + assertFileContent \ + home-files/.config/systemd/user/beets-mpdstats.service \ + ${./mpdstats-expected.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdupdate-expected.yaml b/third_party/home-manager/tests/modules/programs/beets/mpdupdate-expected.yaml new file mode 100644 index 0000000000..1f998bd9a4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdupdate-expected.yaml @@ -0,0 +1,5 @@ +mpd: + host: localhost + port: 6600 +plugins: +- mpdupdate diff --git a/third_party/home-manager/tests/modules/programs/beets/mpdupdate.nix b/third_party/home-manager/tests/modules/programs/beets/mpdupdate.nix new file mode 100644 index 0000000000..b73da81e8e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/beets/mpdupdate.nix @@ -0,0 +1,18 @@ +{ config, ... }: + +{ + home.stateVersion = "23.05"; + + programs.beets = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@beets@"; }; + mpdIntegration.enableUpdate = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/beets/config.yaml + assertFileContent \ + home-files/.config/beets/config.yaml \ + ${./mpdupdate-expected.yaml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix index b9988d4706..50b4a0f2a5 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/basic-configuration.nix @@ -1,116 +1,128 @@ { config, pkgs, ... }: let + boolToString = bool: if bool then "true" else "false"; backups = config.programs.borgmatic.backups; + in { - config = { - programs.borgmatic = { - enable = true; - backups = { - main = { - location = { - sourceDirectories = [ "/my-stuff-to-backup" ]; - repositories = [ "/mnt/disk1" "/mnt/disk2" ]; - extraConfig = { - one_file_system = true; - exclude_patterns = [ "*.swp" ]; - }; + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + sourceDirectories = [ "/my-stuff-to-backup" ]; + repositories = [ "/mnt/disk1" "/mnt/disk2" ]; + extraConfig = { + one_file_system = true; + exclude_patterns = [ "*.swp" ]; }; + }; - storage = { - encryptionPasscommand = "fetch-the-password.sh"; - extraConfig = { checkpoint_interval = 200; }; - }; + storage = { + encryptionPasscommand = "fetch-the-password.sh"; + extraConfig = { checkpoint_interval = 200; }; + }; - retention = { - keepWithin = "14d"; - keepSecondly = 12; - extraConfig = { prefix = "hostname"; }; - }; + retention = { + keepWithin = "14d"; + keepSecondly = 12; + extraConfig = { prefix = "hostname"; }; + }; - consistency = { - checks = [ - { - name = "repository"; - frequency = "2 weeks"; - } - { - name = "archives"; - frequency = "4 weeks"; - } - ]; + consistency = { + checks = [ + { + name = "repository"; + frequency = "2 weeks"; + } + { + name = "archives"; + frequency = "4 weeks"; + } + ]; - extraConfig = { prefix = "hostname"; }; - }; + extraConfig = { prefix = "hostname"; }; + }; + + output = { extraConfig = { color = false; }; }; + + hooks = { + extraConfig = { before_actions = [ "echo Starting actions." ]; }; }; }; }; - - test.stubs.borgmatic = { }; - - nmt.script = '' - config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml - assertFileExists $config_file - - declare -A expectations - - expectations[location.source_directories[0]]="${ - builtins.elemAt backups.main.location.sourceDirectories 0 - }" - expectations[location.repositories[0]]="${ - builtins.elemAt backups.main.location.repositories 0 - }" - expectations[location.repositories[1]]="${ - builtins.elemAt backups.main.location.repositories 1 - }" - expectations[location.one_file_system]="${ - boolToString backups.main.location.extraConfig.one_file_system - }" - expectations[location.exclude_patterns[0]]="${ - builtins.elemAt backups.main.location.extraConfig.exclude_patterns 0 - }" - - expectations[storage.encryption_passcommand]="${backups.main.storage.encryptionPasscommand}" - expectations[storage.checkpoint_interval]="${ - toString backups.main.storage.extraConfig.checkpoint_interval - }" - - expectations[retention.keep_within]="${backups.main.retention.keepWithin}" - expectations[retention.keep_secondly]="${ - toString backups.main.retention.keepSecondly - }" - expectations[retention.prefix]="${backups.main.retention.extraConfig.prefix}" - - expectations[consistency.checks[0].name]="${ - (builtins.elemAt backups.main.consistency.checks 0).name - }" - expectations[consistency.checks[0].frequency]="${ - (builtins.elemAt backups.main.consistency.checks 0).frequency - }" - expectations[consistency.checks[1].name]="${ - (builtins.elemAt backups.main.consistency.checks 1).name - }" - expectations[consistency.checks[1].frequency]="${ - (builtins.elemAt backups.main.consistency.checks 1).frequency - }" - expectations[consistency.prefix]="${backups.main.consistency.extraConfig.prefix}" - - 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 - - one_file_system=$($yq ".location.one_file_system" $config_file) - if [[ $one_file_system != "true" ]]; then - fail "Expected one_file_system to be true but it was $one_file_system" - fi - ''; }; + + test.stubs.borgmatic = { }; + + nmt.script = '' + config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml + assertFileExists $config_file + + declare -A expectations + + expectations[location.source_directories[0]]="${ + builtins.elemAt backups.main.location.sourceDirectories 0 + }" + expectations[location.repositories[0]]="${ + builtins.elemAt backups.main.location.repositories 0 + }" + expectations[location.repositories[1]]="${ + builtins.elemAt backups.main.location.repositories 1 + }" + expectations[location.one_file_system]="${ + boolToString backups.main.location.extraConfig.one_file_system + }" + expectations[location.exclude_patterns[0]]="${ + builtins.elemAt backups.main.location.extraConfig.exclude_patterns 0 + }" + + expectations[storage.encryption_passcommand]="${backups.main.storage.encryptionPasscommand}" + expectations[storage.checkpoint_interval]="${ + toString backups.main.storage.extraConfig.checkpoint_interval + }" + + expectations[retention.keep_within]="${backups.main.retention.keepWithin}" + expectations[retention.keep_secondly]="${ + toString backups.main.retention.keepSecondly + }" + expectations[retention.prefix]="${backups.main.retention.extraConfig.prefix}" + + expectations[consistency.checks[0].name]="${ + (builtins.elemAt backups.main.consistency.checks 0).name + }" + expectations[consistency.checks[0].frequency]="${ + (builtins.elemAt backups.main.consistency.checks 0).frequency + }" + expectations[consistency.checks[1].name]="${ + (builtins.elemAt backups.main.consistency.checks 1).name + }" + expectations[consistency.checks[1].frequency]="${ + (builtins.elemAt backups.main.consistency.checks 1).frequency + }" + expectations[consistency.prefix]="${backups.main.consistency.extraConfig.prefix}" + expectations[output.color]="${ + boolToString backups.main.output.extraConfig.color + }" + expectations[hooks.before_actions[0]]="${ + builtins.elemAt backups.main.hooks.extraConfig.before_actions 0 + }" + + 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 + + one_file_system=$($yq ".location.one_file_system" $config_file) + if [[ $one_file_system != "true" ]]; then + fail "Expected one_file_system to be true but it was $one_file_system" + fi + ''; } diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/default.nix b/third_party/home-manager/tests/modules/programs/borgmatic/default.nix index 721c482318..53ea9be89b 100644 --- a/third_party/home-manager/tests/modules/programs/borgmatic/default.nix +++ b/third_party/home-manager/tests/modules/programs/borgmatic/default.nix @@ -1 +1,7 @@ -{ borgmatic-program-basic-configuration = ./basic-configuration.nix; } +{ + borgmatic-program-basic-configuration = ./basic-configuration.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 = + ./exclude-hm-symlinks-nothing-else.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix new file mode 100644 index 0000000000..1d238b9152 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks-nothing-else.nix @@ -0,0 +1,40 @@ +{ config, pkgs, ... }: + +let + + backups = config.programs.borgmatic.backups; + excludeFile = builtins.toFile "excludeFile.txt" "/foo/bar"; + +in { + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + sourceDirectories = [ "/my-stuff-to-backup" ]; + repositories = [ "/mnt/disk1" ]; + excludeHomeManagerSymlinks = true; + }; + }; + }; + }; + + test.stubs.borgmatic = { }; + + nmt.script = '' + config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml + assertFileExists $config_file + + yq=${pkgs.yq-go}/bin/yq + + hmExclusionsFile=$($yq '.location.exclude_from[0]' $config_file) + expected_content='/home/hm-user/.config/borgmatic.d/main.yaml' + + grep --quiet "$expected_content" "$hmExclusionsFile" + + if [[ $? -ne 0 ]]; then + echo "Expected to find $expected_content in file $hmExclusionsFile but didn't" >&2 + exit 1 + fi + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix new file mode 100644 index 0000000000..8635b28d0b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/exclude-hm-symlinks.nix @@ -0,0 +1,54 @@ +{ config, pkgs, ... }: + +let + + backups = config.programs.borgmatic.backups; + excludeFile = builtins.toFile "excludeFile.txt" "/foo/bar"; + +in { + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + sourceDirectories = [ "/my-stuff-to-backup" ]; + repositories = [ "/mnt/disk1" ]; + excludeHomeManagerSymlinks = true; + extraConfig = { exclude_from = [ (toString excludeFile) ]; }; + }; + }; + }; + }; + + test.stubs.borgmatic = { }; + + nmt.script = '' + config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml + assertFileExists $config_file + + declare -A expectations + + expectations[location.exclude_from[0]]="${excludeFile}" + + 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 + + hmExclusionsFile=$($yq '.location.exclude_from[1]' $config_file) + expected_content='/home/hm-user/.config/borgmatic.d/main.yaml' + + grep --quiet "$expected_content" "$hmExclusionsFile" + + if [[ $? -ne 0 ]]; then + echo "Expected to find $expected_content in file $hmExclusionsFile but didn't" >&2 + exit 1 + fi + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix b/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix new file mode 100644 index 0000000000..f4f5bfcd8b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/borgmatic/include-hm-symlinks.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: + +let + + backups = config.programs.borgmatic.backups; + excludeFile = builtins.toFile "excludeFile.txt" "/foo/bar"; + +in { + programs.borgmatic = { + enable = true; + backups = { + main = { + location = { + sourceDirectories = [ "/my-stuff-to-backup" ]; + repositories = [ "/mnt/disk1" ]; + excludeHomeManagerSymlinks = false; + extraConfig = { exclude_from = [ (toString excludeFile) ]; }; + }; + }; + }; + }; + + test.stubs.borgmatic = { }; + + nmt.script = '' + config_file=$TESTED/home-files/.config/borgmatic.d/main.yaml + assertFileExists $config_file + + declare -A expectations + + expectations[location.exclude_from[0]]="${excludeFile}" + + 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/bottom/empty-settings.nix b/third_party/home-manager/tests/modules/programs/bottom/empty-settings.nix index 15c03c11a2..71799c8318 100644 --- a/third_party/home-manager/tests/modules/programs/bottom/empty-settings.nix +++ b/third_party/home-manager/tests/modules/programs/bottom/empty-settings.nix @@ -9,13 +9,8 @@ with lib; package = config.lib.test.mkStubPackage { }; }; - nmt.script = let - configDir = if pkgs.stdenv.isDarwin then - "home-files/Library/Application Support" - else - "home-files/.config"; - in '' - assertPathNotExists ${configDir}/bottom + nmt.script = '' + assertPathNotExists home-files/.config/bottom ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/bottom/example-settings.nix b/third_party/home-manager/tests/modules/programs/bottom/example-settings.nix index 1777b5264b..a0ed11085d 100644 --- a/third_party/home-manager/tests/modules/programs/bottom/example-settings.nix +++ b/third_party/home-manager/tests/modules/programs/bottom/example-settings.nix @@ -18,14 +18,9 @@ with lib; }; }; - nmt.script = let - configDir = if pkgs.stdenv.isDarwin then - "home-files/Library/Application Support" - else - "home-files/.config"; - in '' + nmt.script = '' assertFileContent \ - "${configDir}/bottom/bottom.toml" \ + "home-files/.config/bottom/bottom.toml" \ ${./example-settings-expected.toml} ''; }; diff --git a/third_party/home-manager/tests/modules/programs/boxxy/default.nix b/third_party/home-manager/tests/modules/programs/boxxy/default.nix new file mode 100644 index 0000000000..52ebcacc4f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/boxxy/default.nix @@ -0,0 +1,4 @@ +{ + boxxy-empty-settings = ./empty-settings.nix; + boxxy-example-settings = ./example-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/boxxy/empty-settings.nix b/third_party/home-manager/tests/modules/programs/boxxy/empty-settings.nix new file mode 100644 index 0000000000..3a34cd5cd6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/boxxy/empty-settings.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.boxxy.enable = true; + + test.stubs.boxxy = { }; + + nmt.script = '' + assertPathNotExists home-files/.config/boxxy + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/boxxy/example-boxxy.yaml b/third_party/home-manager/tests/modules/programs/boxxy/example-boxxy.yaml new file mode 100644 index 0000000000..edd7aeda45 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/boxxy/example-boxxy.yaml @@ -0,0 +1,12 @@ +rules: +- context: + - /home/test_user/your_project_repo + env: + ENVIRONMENT_THING: some value + mode: directory + name: example rule + only: + - arduino + - Arduino + rewrite: ~/.local/share/boxxy + target: ~/Arduino diff --git a/third_party/home-manager/tests/modules/programs/boxxy/example-settings.nix b/third_party/home-manager/tests/modules/programs/boxxy/example-settings.nix new file mode 100644 index 0000000000..7ecec4167e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/boxxy/example-settings.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.boxxy.enable = true; + programs.boxxy.rules = [{ + name = "example rule"; + target = "~/Arduino"; + rewrite = "~/.local/share/boxxy"; + mode = "directory"; + only = [ "arduino" "Arduino" ]; + env = { "ENVIRONMENT_THING" = "some value"; }; + context = [ "/home/test_user/your_project_repo" ]; + }]; + + test.stubs.boxxy = { }; + + nmt.script = '' + boxxyyaml=home-files/.config/boxxy/boxxy.yaml + assertFileExists $boxxyyaml + assertFileContent $boxxyyaml ${./example-boxxy.yaml} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/broot/broot.nix b/third_party/home-manager/tests/modules/programs/broot/broot.nix index b39929e365..17577f6f7e 100644 --- a/third_party/home-manager/tests/modules/programs/broot/broot.nix +++ b/third_party/home-manager/tests/modules/programs/broot/broot.nix @@ -8,19 +8,6 @@ nmt.script = '' assertFileExists home-files/.config/broot/conf.toml - assertFileContent home-files/.config/broot/conf.toml ${ - builtins.toFile "broot.expected" '' - content_search_max_file_size = "10MB" - imports = ["verbs.hjson", {file = "dark-blue-skin.hjson", luma = ["dark", "unknown"]}, {file = "white-skin.hjson", luma = "light"}] - modal = true - show_selection_mark = true - verbs = [] - - [skin] - - [special_paths] - "/media" = "no-enter" - '' - } + assertFileContains home-files/.config/broot/conf.toml 'modal = true' ''; } diff --git a/third_party/home-manager/tests/modules/programs/comodoro/comodoro.nix b/third_party/home-manager/tests/modules/programs/comodoro/comodoro.nix new file mode 100644 index 0000000000..37f43b448c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/comodoro/comodoro.nix @@ -0,0 +1,35 @@ +{ ... }: + +{ + programs.comodoro = { + enable = true; + settings = { + test-preset = { + cycles = [ + { + name = "Work"; + duration = 1500; + } + { + name = "Rest"; + duration = 500; + } + ]; + + tcp-host = "localhost"; + tcp-port = 8080; + + on-server-start = "echo server started"; + on-timer-stop = "echo timer stopped"; + on-work-begin = "echo work cycle began"; + }; + }; + }; + + test.stubs.comodoro = { }; + + nmt.script = '' + assertFileExists home-files/.config/comodoro/config.toml + assertFileContent home-files/.config/comodoro/config.toml ${./expected.toml} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/comodoro/default.nix b/third_party/home-manager/tests/modules/programs/comodoro/default.nix new file mode 100644 index 0000000000..23f4b17501 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/comodoro/default.nix @@ -0,0 +1 @@ +{ comodoro-program = ./comodoro.nix; } diff --git a/third_party/home-manager/tests/modules/programs/comodoro/expected.toml b/third_party/home-manager/tests/modules/programs/comodoro/expected.toml new file mode 100644 index 0000000000..9d0d4c5640 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/comodoro/expected.toml @@ -0,0 +1,13 @@ +[test-preset] +on-server-start = "echo server started" +on-timer-stop = "echo timer stopped" +on-work-begin = "echo work cycle began" +tcp-host = "localhost" +tcp-port = 8080 +[[test-preset.cycles]] +duration = 1500 +name = "Work" + +[[test-preset.cycles]] +duration = 500 +name = "Rest" diff --git a/third_party/home-manager/tests/modules/programs/darcs/author-expected.txt b/third_party/home-manager/tests/modules/programs/darcs/author-expected.txt new file mode 100644 index 0000000000..94be112778 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/darcs/author-expected.txt @@ -0,0 +1,2 @@ +Real Person +Real Person diff --git a/third_party/home-manager/tests/modules/programs/darcs/author.nix b/third_party/home-manager/tests/modules/programs/darcs/author.nix new file mode 100644 index 0000000000..26cfb469ed --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/darcs/author.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + config = { + programs.darcs = { + enable = true; + author = [ + "Real Person " + "Real Person " + ]; + }; + + nmt.script = '' + assertFileContent home-files/.darcs/author ${./author-expected.txt} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/darcs/boring-expected.txt b/third_party/home-manager/tests/modules/programs/darcs/boring-expected.txt new file mode 100644 index 0000000000..4a41138cd7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/darcs/boring-expected.txt @@ -0,0 +1,3 @@ +^.idea$ +.iml$ +^.stack-work$ diff --git a/third_party/home-manager/tests/modules/programs/darcs/boring.nix b/third_party/home-manager/tests/modules/programs/darcs/boring.nix new file mode 100644 index 0000000000..ae02f18cfc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/darcs/boring.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + config = { + programs.darcs = { + enable = true; + boring = [ "^.idea$" ".iml$" "^.stack-work$" ]; + }; + + nmt.script = '' + assertFileContent home-files/.darcs/boring ${./boring-expected.txt} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/darcs/default.nix b/third_party/home-manager/tests/modules/programs/darcs/default.nix new file mode 100644 index 0000000000..7898412398 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/darcs/default.nix @@ -0,0 +1,4 @@ +{ + darcs-author = ./author.nix; + darcs-boring = ./boring.nix; +} 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 d60e88ff45..c65cb1b12f 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 @@ -10,12 +10,12 @@

Home Manager

-
wikipedia +
wikipedia
kernel.org

Nix sites

homepage -
wiki +
wiki

Nix sites

homepage diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search-without-default.json b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search-without-default.json new file mode 100644 index 0000000000..b845dad42f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-search-without-default.json @@ -0,0 +1,41 @@ +{ + "engines": [ + { + "_isAppProvided": true, + "_metaData": { + "order": 1 + }, + "_name": "Google" + }, + { + "_definedAliases": [ + "@np" + ], + "_isAppProvided": false, + "_loadPath": "[home-manager]/programs.firefox.profiles.searchWithoutDefault.search.engines.\"Nix Packages\"", + "_metaData": { + "order": 2 + }, + "_name": "Nix Packages", + "_urls": [ + { + "params": [ + { + "name": "type", + "value": "packages" + }, + { + "name": "query", + "value": "{searchTerms}" + } + ], + "template": "https://search.nixos.org/packages" + } + ] + } + ], + "metaData": { + "useSavedOrder": true + }, + "version": 6 +} diff --git a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-user.js b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-user.js index 0edd47b910..d929df2b3d 100644 --- a/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-user.js +++ b/third_party/home-manager/tests/modules/programs/firefox/profile-settings-expected-user.js @@ -1,5 +1,6 @@ // Generated by Home Manager. +user_pref("browser.newtabpage.pinned", "[{\"title\":\"NixOS\",\"url\":\"https://nixos.org\"}]"); user_pref("general.smoothScroll", false); 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 b28e64597e..6cb1a0cbe3 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 @@ -9,7 +9,13 @@ lib.mkIf config.test.enableBig { profiles.test = { id = 1; - settings = { "general.smoothScroll" = false; }; + settings = { + "general.smoothScroll" = false; + "browser.newtabpage.pinned" = [{ + title = "NixOS"; + url = "https://nixos.org"; + }]; + }; }; profiles.bookmarks = { @@ -25,6 +31,7 @@ lib.mkIf config.test.enableBig { } { name = "wikipedia"; + tags = [ "wiki" ]; keyword = "wiki"; url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; } @@ -41,6 +48,7 @@ lib.mkIf config.test.enableBig { } { name = "wiki"; + tags = [ "wiki" "nix" ]; url = "https://nixos.wiki/"; } { @@ -103,6 +111,33 @@ lib.mkIf config.test.enableBig { }; }; }; + + profiles.searchWithoutDefault = { + id = 4; + search = { + force = true; + order = [ "Google" "Nix Packages" ]; + engines = { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + }]; + + definedAliases = [ "@np" ]; + }; + }; + }; + }; }; nixpkgs.overlays = [ @@ -145,14 +180,23 @@ lib.mkIf config.test.enableBig { $bookmarksFile \ ${./profile-settings-expected-bookmarks.html} - compressedSearch=$(normalizeStorePaths \ - home-files/.mozilla/firefox/search/search.json.mozlz4) + function assertFirefoxSearchContent() { + compressedSearch=$(normalizeStorePaths "$1") - decompressedSearch=$(dirname $compressedSearch)/search.json - ${pkgs.mozlz4a}/bin/mozlz4a -d "$compressedSearch" >(${pkgs.jq}/bin/jq . > "$decompressedSearch") + decompressedSearch=$(dirname $compressedSearch)/search.json + ${pkgs.mozlz4a}/bin/mozlz4a -d "$compressedSearch" >(${pkgs.jq}/bin/jq . > "$decompressedSearch") - assertFileContent \ - $decompressedSearch \ + assertFileContent \ + $decompressedSearch \ + "$2" + } + + assertFirefoxSearchContent \ + home-files/.mozilla/firefox/search/search.json.mozlz4 \ ${./profile-settings-expected-search.json} + + assertFirefoxSearchContent \ + home-files/.mozilla/firefox/searchWithoutDefault/search.json.mozlz4 \ + ${./profile-settings-expected-search-without-default.json} ''; } diff --git a/third_party/home-manager/tests/modules/programs/fuzzel/default.nix b/third_party/home-manager/tests/modules/programs/fuzzel/default.nix new file mode 100644 index 0000000000..702bd0d670 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fuzzel/default.nix @@ -0,0 +1,4 @@ +{ + fuzzel-example-settings = ./example-settings.nix; + fuzzel-empty-settings = ./empty-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/fuzzel/empty-settings.nix b/third_party/home-manager/tests/modules/programs/fuzzel/empty-settings.nix new file mode 100644 index 0000000000..e14aad4f5a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fuzzel/empty-settings.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + programs.fuzzel.enable = true; + + test.stubs.fuzzel = { }; + + nmt.script = '' + assertPathNotExists home-files/.config/fuzzel + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/fuzzel/example-settings-expected.ini b/third_party/home-manager/tests/modules/programs/fuzzel/example-settings-expected.ini new file mode 100644 index 0000000000..8e9c8e58b3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fuzzel/example-settings-expected.ini @@ -0,0 +1,6 @@ +[border] +width=6 + +[main] +dpi-aware=yes +font=Fira Code:size=11 diff --git a/third_party/home-manager/tests/modules/programs/fuzzel/example-settings.nix b/third_party/home-manager/tests/modules/programs/fuzzel/example-settings.nix new file mode 100644 index 0000000000..3273af5853 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/fuzzel/example-settings.nix @@ -0,0 +1,23 @@ +{ config, ... }: + +{ + programs.fuzzel = { + enable = true; + package = config.lib.test.mkStubPackage { }; + + settings = { + main = { + font = "Fira Code:size=11"; + dpi-aware = "yes"; + }; + + border = { width = 6; }; + }; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/fuzzel/fuzzel.ini \ + ${./example-settings-expected.ini} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/gh-dash/config.nix b/third_party/home-manager/tests/modules/programs/gh-dash/config.nix new file mode 100644 index 0000000000..9972d67380 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gh-dash/config.nix @@ -0,0 +1,26 @@ +{ ... }: + +{ + programs.gh-dash = { + enable = true; + settings = { + prSections = [{ + title = "My Pull Requests"; + filters = "is:open author:@me"; + }]; + }; + }; + + test.stubs.gh = { }; + + nmt.script = '' + assertFileExists home-files/.config/gh-dash/config.yml + assertFileContent home-files/.config/gh-dash/config.yml ${ + builtins.toFile "config-file.yml" '' + prSections: + - filters: is:open author:@me + title: My Pull Requests + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/gh-dash/default.nix b/third_party/home-manager/tests/modules/programs/gh-dash/default.nix new file mode 100644 index 0000000000..16c221584e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gh-dash/default.nix @@ -0,0 +1 @@ +{ gh-dash-config = ./config.nix; } diff --git a/third_party/home-manager/tests/modules/programs/gh/credential-helper.git.conf b/third_party/home-manager/tests/modules/programs/gh/credential-helper.git.conf index ea2c61ee46..529d6725ac 100644 --- a/third_party/home-manager/tests/modules/programs/gh/credential-helper.git.conf +++ b/third_party/home-manager/tests/modules/programs/gh/credential-helper.git.conf @@ -1,2 +1,5 @@ [credential "https://github.com"] helper = "@gh@/bin/gh auth git-credential" + +[credential "https://github.example.com"] + helper = "@gh@/bin/gh auth git-credential" diff --git a/third_party/home-manager/tests/modules/programs/gh/credential-helper.nix b/third_party/home-manager/tests/modules/programs/gh/credential-helper.nix index 0c5ed872f3..771572318b 100644 --- a/third_party/home-manager/tests/modules/programs/gh/credential-helper.nix +++ b/third_party/home-manager/tests/modules/programs/gh/credential-helper.nix @@ -3,7 +3,10 @@ { programs.gh = { enable = true; - enableGitCredentialHelper = true; + gitCredentialHelper = { + enable = true; + hosts = [ "https://github.com" "https://github.example.com" ]; + }; }; programs.git.enable = true; diff --git a/third_party/home-manager/tests/modules/programs/git-cliff/default.nix b/third_party/home-manager/tests/modules/programs/git-cliff/default.nix new file mode 100644 index 0000000000..3bad375c84 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/git-cliff/default.nix @@ -0,0 +1 @@ +{ git-cliff-example-settings = ./example-settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/git-cliff/example-settings.nix b/third_party/home-manager/tests/modules/programs/git-cliff/example-settings.nix new file mode 100644 index 0000000000..5c865d48e4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/git-cliff/example-settings.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + programs.git-cliff = { + enable = true; + + settings = { + header = "Changelog"; + footer = ""; + trim = true; + }; + }; + + test.stubs.git-cliff = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/git-cliff/cliff.toml \ + ${ + builtins.toFile "expected.toml" '' + footer = "" + header = "Changelog" + trim = true + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/gnome-terminal/bad-profile-name.nix b/third_party/home-manager/tests/modules/programs/gnome-terminal/bad-profile-name.nix new file mode 100644 index 0000000000..ebd8544060 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/gnome-terminal/bad-profile-name.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + programs.gnome-terminal = { + enable = true; + profile = { + bad-name = { visibleName = "a"; }; + "e0b782ed-6aca-44eb-8c75-62b3706b6220" = { + default = true; + visibleName = "b"; + }; + another-bad-name = { visibleName = "c"; }; + }; + }; + + nixpkgs.overlays = [ + (self: super: { gnome.gnome-terminal = config.lib.test.mkStubPackage { }; }) + ]; + + test.stubs.dconf = { }; + + test.asserts.assertions.expected = ['' + The attribute name of a Gnome Terminal profile must be a UUID. + Incorrect profile names: another-bad-name, bad-name'']; +} diff --git a/third_party/home-manager/tests/modules/programs/gnome-terminal/default.nix b/third_party/home-manager/tests/modules/programs/gnome-terminal/default.nix index 2cfb492361..d4a2242721 100644 --- a/third_party/home-manager/tests/modules/programs/gnome-terminal/default.nix +++ b/third_party/home-manager/tests/modules/programs/gnome-terminal/default.nix @@ -1 +1,4 @@ -{ gnome-terminal-1 = ./gnome-terminal-1.nix; } +{ + gnome-terminal-1 = ./gnome-terminal-1.nix; + gnome-terminal-bad-profile-name = ./bad-profile-name.nix; +} 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 55a38ecc72..4e3e2bbcc5 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://keybase.io/rycee/pgp_keys.asc?fingerprint=36cacf52d098cc0e78fb0cb13573356c25c424d4"; - hash = "sha256-5z2kTUXQp0f7kyP0Id6NS3rCdzGGrrkIYzGK42Qy9Sw="; + "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x36cacf52d098cc0e78fb0cb13573356c25c424d4"; + hash = "sha256-9Zjsb/TtOyiPzMO/Jg3CtJwSxuw7QmX0pcfZT2/1w5E="; }; trust = 1; # "unknown" } 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 588c907048..d2028e4b4d 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 @@ -14,6 +14,7 @@ }; test.stubs.gnupg = { }; + test.stubs.systemd = { }; # depends on gnupg.override nmt.script = '' assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'" 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 ed0b4713b4..86c6766a89 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 @@ -9,18 +9,39 @@ with lib; settings = { theme = "base16"; - lsp.display-messages = true; + editor = { + line-number = "relative"; + lsp.display-messages = true; + }; keys.normal = { space.space = "file_picker"; space.w = ":w"; space.q = ":q"; + esc = [ "collapse_selection" "keep_primary_selection" ]; }; }; - languages = [{ - name = "rust"; - auto-format = false; - }]; + languages = { + language-server.typescript-language-server = let + typescript-language-server = config.lib.test.mkStubPackage { + outPath = "@typescript-language-server@"; + }; + typescript = + config.lib.test.mkStubPackage { outPath = "@typescript@"; }; + in { + command = + "${typescript-language-server}/bin/typescript-language-server"; + args = [ + "--stdio" + "--tsserver-path=${typescript}/lib/node_modules/typescript/lib" + ]; + }; + + language = [{ + name = "rust"; + auto-format = false; + }]; + }; themes = { base16 = let diff --git a/third_party/home-manager/tests/modules/programs/helix/languages-expected.toml b/third_party/home-manager/tests/modules/programs/helix/languages-expected.toml index d3404397b3..cb77ed2b94 100644 --- a/third_party/home-manager/tests/modules/programs/helix/languages-expected.toml +++ b/third_party/home-manager/tests/modules/programs/helix/languages-expected.toml @@ -1,3 +1,7 @@ [[language]] auto-format = false name = "rust" + +[language-server.typescript-language-server] +args = ["--stdio", "--tsserver-path=@typescript@/lib/node_modules/typescript/lib"] +command = "@typescript-language-server@/bin/typescript-language-server" diff --git a/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml b/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml index 772bcf5253..a18ec34745 100644 --- a/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml +++ b/third_party/home-manager/tests/modules/programs/helix/settings-expected.toml @@ -1,9 +1,15 @@ theme = "base16" +[editor] +line-number = "relative" + +[editor.lsp] +display-messages = true + +[keys.normal] +esc = ["collapse_selection", "keep_primary_selection"] + [keys.normal.space] q = ":q" space = "file_picker" w = ":w" - -[lsp] -display-messages = true 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 new file mode 100644 index 0000000000..2df6b85fac --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/basic-expected.toml @@ -0,0 +1,30 @@ +["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] +drafts = "Drafts" +inbox = "Inbox" +sent = "Sent" +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/basic.nix b/third_party/home-manager/tests/modules/programs/himalaya/basic.nix new file mode 100644 index 0000000000..1555d1e95b --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/basic.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + accounts.email.accounts = { + "hm@example.com" = { + imap.port = 993; + smtp.port = 465; + himalaya.enable = true; + himalaya.backend = test.asserts.warnings.expected; + himalaya.sender = test.asserts.warnings.expected; + }; + }; + + programs.himalaya = { enable = true; }; + + test.stubs.himalaya = { }; + + nmt.script = '' + assertFileExists home-files/.config/himalaya/config.toml + assertFileContent home-files/.config/himalaya/config.toml ${ + ./basic-expected.toml + } + ''; +} 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 54c3978d8a..b357361e20 100644 --- a/third_party/home-manager/tests/modules/programs/himalaya/default.nix +++ b/third_party/home-manager/tests/modules/programs/himalaya/default.nix @@ -1 +1,6 @@ -{ himalaya = ./himalaya.nix; } +{ + himalaya-basic = ./basic.nix; + himalaya-imap-smtp = ./imap-smtp.nix; + himalaya-maildir-sendmail = ./maildir-sendmail.nix; + himalaya-notmuch-sendmail = ./notmuch-sendmail.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/himalaya/himalaya-expected.toml b/third_party/home-manager/tests/modules/programs/himalaya/himalaya-expected.toml deleted file mode 100644 index ca7ada66de..0000000000 --- a/third_party/home-manager/tests/modules/programs/himalaya/himalaya-expected.toml +++ /dev/null @@ -1,25 +0,0 @@ -display-name = "" -downloads-dir = "/data/download" - -["hm@example.com"] -backend = "imap" -default = true -display-name = "H. M. Test" -email = "hm@example.com" -email-listing-page-size = 50 -imap-host = "imap.example.com" -imap-login = "home.manager" -imap-passwd-cmd = "'password-command'" -imap-port = 995 -imap-starttls = false -sender = "smtp" -smtp-host = "smtp.example.com" -smtp-login = "home.manager" -smtp-passwd-cmd = "'password-command'" -smtp-port = 465 -smtp-starttls = false - -["hm@example.com".mailboxes] -draft = "Drafts" -inbox = "In" -sent = "Out" 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 new file mode 100644 index 0000000000..6db2542df5 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp-expected.toml @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000000..c1347d23c4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/imap-smtp.nix @@ -0,0 +1,58 @@ +{ 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 new file mode 100644 index 0000000000..61ae940ded --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail-expected.toml @@ -0,0 +1,16 @@ +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/himalaya.nix b/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix similarity index 50% rename from third_party/home-manager/tests/modules/programs/himalaya/himalaya.nix rename to third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix index 4d556ff860..d40f39ba86 100644 --- a/third_party/home-manager/tests/modules/programs/himalaya/himalaya.nix +++ b/third_party/home-manager/tests/modules/programs/himalaya/maildir-sendmail.nix @@ -3,32 +3,25 @@ with lib; { - imports = [ ../../accounts/email-test-accounts.nix ]; - 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; - - backend = "imap"; - sender = "smtp"; - settings = { email-listing-page-size = 50; }; + settings = { sendmail-cmd = "msmtp"; }; }; - - folders = { - inbox = "In"; - sent = "Out"; - drafts = "Drafts"; - }; - - imap.port = 995; - smtp.port = 465; }; }; programs.himalaya = { enable = true; - settings = { downloads-dir = "/data/download"; }; + settings = { email-listing-page-size = 50; }; }; test.stubs.himalaya = { }; @@ -36,7 +29,7 @@ with lib; nmt.script = '' assertFileExists home-files/.config/himalaya/config.toml assertFileContent home-files/.config/himalaya/config.toml ${ - ./himalaya-expected.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 new file mode 100644 index 0000000000..fcc00c7c8e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail-expected.toml @@ -0,0 +1,16 @@ +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 new file mode 100644 index 0000000000..ff96dfd1f2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/himalaya/notmuch-sendmail.nix @@ -0,0 +1,36 @@ +{ 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/i3status-rust/default.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/default.nix index 50d8c7b853..d99b0156a6 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/default.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/default.nix @@ -3,4 +3,6 @@ i3status-rust-with-custom = ./with-custom.nix; i3status-rust-with-extra-settings = ./with-extra-settings.nix; i3status-rust-with-multiple-bars = ./with-multiple-bars.nix; + i3status-rust-with-version-02xx = ./with-version-02xx.nix; + i3status-rust-with-version-0311 = ./with-version-0311.nix; } diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-custom.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-custom.nix index c4131e02ad..46887a58ee 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/with-custom.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-custom.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, ... }: -with lib; - { config = { programs.i3status-rust = { @@ -12,9 +10,7 @@ with lib; { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; @@ -28,34 +24,27 @@ with lib; { block = "cpu"; interval = 1; - format = "{barchart}"; + format = " $icon $barchart "; } { block = "load"; interval = 1; - format = "{1m} {5m}"; + format = " $icon $1m $5m "; } { block = "temperature"; - collapsed = true; interval = 10; - format = "{min}° min, {max}° max, {average}° avg"; + format = "$icon $min min, $max max, $average avg"; chip = "*-isa-*"; } - { - block = "networkmanager"; - ap_format = "{ssid} @ {strength}%"; - on_click = "kcmshell5 kcm_networkmanagement"; - } { block = "net"; device = "enp9s0u2u1u2c2"; - speed_up = true; interval = 5; } { block = "speedtest"; - bytes = true; + format = " ^icon_ping $ping "; } { block = "xrandr"; @@ -65,7 +54,10 @@ with lib; { block = "sound"; format = "{output_name} {volume}%"; - on_click = "pavucontrol --tab=3"; + click = [{ + button = "left"; + cmd = "pavucontrol --tab=3"; + }]; mappings = { "alsa_output.pci-0000_00_1f.3.analog-stereo" = ""; "bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = ""; @@ -75,12 +67,25 @@ with lib; block = "music"; player = "spotify"; buttons = [ "play" "prev" "next" ]; - on_collapsed_click = "i3-msg '[class=Spotify] focus'"; + click = [ + { + button = "play"; + action = "music_play"; + } + { + button = "prev"; + action = "music_prev"; + } + { + button = "next"; + action = "music_next"; + } + ]; } { block = "time"; interval = 60; - format = "%a %d.%m %R"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; } { block = "battery"; } ]; @@ -92,23 +97,19 @@ with lib; }; }; - test.stubs.i3status-rust = { }; + test.stubs.i3status-rust = { version = "0.30.0"; }; nmt.script = '' assertFileExists home-files/.config/i3status-rust/config-custom.toml assertFileContent home-files/.config/i3status-rust/config-custom.toml \ ${ pkgs.writeText "i3status-rust-expected-config" '' - icons = "awesome5" - theme = "gruvbox-dark" [[block]] alert = 10.0 - alias = "/" block = "disk_space" info_type = "available" interval = 60 path = "/" - unit = "GB" warning = 20.0 [[block]] @@ -119,35 +120,28 @@ with lib; [[block]] block = "cpu" - format = "{barchart}" + format = " $icon $barchart " interval = 1 [[block]] block = "load" - format = "{1m} {5m}" + format = " $icon $1m $5m " interval = 1 [[block]] block = "temperature" chip = "*-isa-*" - collapsed = true - format = "{min}° min, {max}° max, {average}° avg" + format = "$icon $min min, $max max, $average avg" interval = 10 - [[block]] - ap_format = "{ssid} @ {strength}%" - block = "networkmanager" - on_click = "kcmshell5 kcm_networkmanagement" - [[block]] block = "net" device = "enp9s0u2u1u2c2" interval = 5 - speed_up = true [[block]] block = "speedtest" - bytes = true + format = " ^icon_ping $ping " [[block]] block = "xrandr" @@ -156,7 +150,10 @@ with lib; [[block]] block = "sound" format = "{output_name} {volume}%" - on_click = "pavucontrol --tab=3" + + [[block.click]] + button = "left" + cmd = "pavucontrol --tab=3" [block.mappings] "alsa_output.pci-0000_00_1f.3.analog-stereo" = "" @@ -165,16 +162,33 @@ with lib; [[block]] block = "music" buttons = ["play", "prev", "next"] - on_collapsed_click = "i3-msg '[class=Spotify] focus'" player = "spotify" + [[block.click]] + action = "music_play" + button = "play" + + [[block.click]] + action = "music_prev" + button = "prev" + + [[block.click]] + action = "music_next" + button = "next" + [[block]] block = "time" - format = "%a %d.%m %R" + format = " $timestamp.datetime(f:'%a %d/%m %R') " interval = 60 [[block]] block = "battery" + + [icons] + icons = "awesome5" + + [theme] + theme = "gruvbox-dark" '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-default.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-default.nix index b5c20cee73..3b5b2213a7 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/with-default.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-default.nix @@ -1,35 +1,28 @@ { config, lib, pkgs, ... }: -with lib; - { config = { programs.i3status-rust = { enable = true; }; - test.stubs.i3status-rust = { }; + test.stubs.i3status-rust = { version = "0.31.2"; }; nmt.script = '' assertFileExists home-files/.config/i3status-rust/config-default.toml assertFileContent home-files/.config/i3status-rust/config-default.toml \ ${ pkgs.writeText "i3status-rust-expected-config" '' - icons = "none" - theme = "plain" [[block]] alert = 10.0 - alias = "/" block = "disk_space" info_type = "available" interval = 60 path = "/" - unit = "GB" warning = 20.0 [[block]] block = "memory" - display_type = "memory" - format_mem = "{mem_used_percents}" - format_swap = "{swap_used_percents}" + format = " $icon mem_used_percents " + format_alt = " $icon $swap_used_percents " [[block]] block = "cpu" @@ -37,7 +30,7 @@ with lib; [[block]] block = "load" - format = "{1m}" + format = " $icon $1m " interval = 1 [[block]] @@ -45,8 +38,14 @@ with lib; [[block]] block = "time" - format = "%a %d/%m %R" + format = " $timestamp.datetime(f:'%a %d/%m %R') " interval = 60 + + [icons] + icons = "none" + + [theme] + theme = "plain" '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix index aad7618ed6..0d8b4663b2 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-extra-settings.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, ... }: -with lib; - { config = { programs.i3status-rust = { @@ -12,9 +10,7 @@ with lib; { block = "disk_space"; path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; @@ -28,34 +24,27 @@ with lib; { block = "cpu"; interval = 1; - format = "{barchart}"; + format = " $icon $barchart "; } { block = "load"; interval = 1; - format = "{1m} {5m}"; + format = " $icon $1m $5m "; } { block = "temperature"; - collapsed = true; interval = 10; - format = "{min}° min, {max}° max, {average}° avg"; + format = "$icon $min min, $max max, $average avg"; chip = "*-isa-*"; } - { - block = "networkmanager"; - ap_format = "{ssid} @ {strength}%"; - on_click = "kcmshell5 kcm_networkmanagement"; - } { block = "net"; device = "enp9s0u2u1u2c2"; - speed_up = true; interval = 5; } { block = "speedtest"; - bytes = true; + format = " ^icon_ping $ping "; } { block = "xrandr"; @@ -65,7 +54,10 @@ with lib; { block = "sound"; format = "{output_name} {volume}%"; - on_click = "pavucontrol --tab=3"; + click = [{ + button = "left"; + cmd = "pavucontrol --tab=3"; + }]; mappings = { "alsa_output.pci-0000_00_1f.3.analog-stereo" = ""; "bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = ""; @@ -75,12 +67,25 @@ with lib; block = "music"; player = "spotify"; buttons = [ "play" "prev" "next" ]; - on_collapsed_click = "i3-msg '[class=Spotify] focus'"; + click = [ + { + button = "play"; + action = "music_play"; + } + { + button = "prev"; + action = "music_prev"; + } + { + button = "next"; + action = "music_next"; + } + ]; } { block = "time"; interval = 60; - format = "%a %d.%m %R"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; } { block = "battery"; } ]; @@ -89,7 +94,7 @@ with lib; settings = { theme = { - name = "solarized-dark"; + theme = "solarized-dark"; overrides = { idle_bg = "#123456"; idle_fg = "#abcdef"; @@ -102,22 +107,19 @@ with lib; }; }; - test.stubs.i3status-rust = { }; + test.stubs.i3status-rust = { version = "0.30.0"; }; nmt.script = '' assertFileExists home-files/.config/i3status-rust/config-extra-settings.toml assertFileContent home-files/.config/i3status-rust/config-extra-settings.toml \ ${ pkgs.writeText "i3status-rust-expected-config" '' - icons = "awesome5" [[block]] alert = 10.0 - alias = "/" block = "disk_space" info_type = "available" interval = 60 path = "/" - unit = "GB" warning = 20.0 [[block]] @@ -128,35 +130,28 @@ with lib; [[block]] block = "cpu" - format = "{barchart}" + format = " $icon $barchart " interval = 1 [[block]] block = "load" - format = "{1m} {5m}" + format = " $icon $1m $5m " interval = 1 [[block]] block = "temperature" chip = "*-isa-*" - collapsed = true - format = "{min}° min, {max}° max, {average}° avg" + format = "$icon $min min, $max max, $average avg" interval = 10 - [[block]] - ap_format = "{ssid} @ {strength}%" - block = "networkmanager" - on_click = "kcmshell5 kcm_networkmanagement" - [[block]] block = "net" device = "enp9s0u2u1u2c2" interval = 5 - speed_up = true [[block]] block = "speedtest" - bytes = true + format = " ^icon_ping $ping " [[block]] block = "xrandr" @@ -165,7 +160,10 @@ with lib; [[block]] block = "sound" format = "{output_name} {volume}%" - on_click = "pavucontrol --tab=3" + + [[block.click]] + button = "left" + cmd = "pavucontrol --tab=3" [block.mappings] "alsa_output.pci-0000_00_1f.3.analog-stereo" = "" @@ -174,19 +172,33 @@ with lib; [[block]] block = "music" buttons = ["play", "prev", "next"] - on_collapsed_click = "i3-msg '[class=Spotify] focus'" player = "spotify" + [[block.click]] + action = "music_play" + button = "play" + + [[block.click]] + action = "music_prev" + button = "prev" + + [[block.click]] + action = "music_next" + button = "next" + [[block]] block = "time" - format = "%a %d.%m %R" + format = " $timestamp.datetime(f:'%a %d/%m %R') " interval = 60 [[block]] block = "battery" + [icons] + icons = "awesome5" + [theme] - name = "solarized-dark" + theme = "solarized-dark" [theme.overrides] idle_bg = "#123456" diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-multiple-bars.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-multiple-bars.nix index a8ffd37383..2a56d6a9c4 100644 --- a/third_party/home-manager/tests/modules/programs/i3status-rust/with-multiple-bars.nix +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-multiple-bars.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, ... }: -with lib; - { config = { programs.i3status-rust = { @@ -13,19 +11,15 @@ with lib; blocks = [ { block = "disk_space"; - path = "/"; - alias = "/"; info_type = "available"; - unit = "GB"; interval = 60; warning = 20.0; alert = 10.0; } { block = "memory"; - display_type = "memory"; - format_mem = "{Mug}GB ({Mup}%)"; - format_swap = "{SUp}%"; + format_mem = " $icon $Mug ($Mup) "; + format_swap = " $icon $SUp "; } ]; }; @@ -35,12 +29,12 @@ with lib; { block = "cpu"; interval = 1; - format = "{barchart}"; + format = " $icon $barchart "; } { block = "load"; interval = 1; - format = "{1m} {5m}"; + format = " $icon $1m $5m "; } ]; icons = "awesome5"; @@ -52,30 +46,30 @@ with lib; }; - test.stubs.i3status-rust = { }; + test.stubs.i3status-rust = { version = "0.30.0"; }; nmt.script = '' assertFileExists home-files/.config/i3status-rust/config-top.toml assertFileContent home-files/.config/i3status-rust/config-top.toml \ ${ pkgs.writeText "i3status-rust-expected-config" '' - icons = "none" - theme = "plain" [[block]] alert = 10.0 - alias = "/" block = "disk_space" info_type = "available" interval = 60 - path = "/" - unit = "GB" warning = 20.0 [[block]] block = "memory" - display_type = "memory" - format_mem = "{Mug}GB ({Mup}%)" - format_swap = "{SUp}%" + format_mem = " $icon $Mug ($Mup) " + format_swap = " $icon $SUp " + + [icons] + icons = "none" + + [theme] + theme = "plain" '' } @@ -84,17 +78,21 @@ with lib; home-files/.config/i3status-rust/config-bottom.toml \ ${ pkgs.writeText "i3status-rust-expected-config" '' - icons = "awesome5" - theme = "gruvbox-dark" [[block]] block = "cpu" - format = "{barchart}" + format = " $icon $barchart " interval = 1 [[block]] block = "load" - format = "{1m} {5m}" + format = " $icon $1m $5m " interval = 1 + + [icons] + icons = "awesome5" + + [theme] + theme = "gruvbox-dark" '' } ''; diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-02xx.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-02xx.nix new file mode 100644 index 0000000000..ec8c2f9a9c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-02xx.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + programs.i3status-rust = { enable = true; }; + + test.stubs.i3status-rust = { version = "0.29.9"; }; + + nmt.script = '' + assertFileExists home-files/.config/i3status-rust/config-default.toml + assertFileContent home-files/.config/i3status-rust/config-default.toml \ + ${ + pkgs.writeText "i3status-rust-expected-config" '' + icons = "none" + theme = "plain" + [[block]] + alert = 10.0 + block = "disk_space" + info_type = "available" + interval = 60 + path = "/" + warning = 20.0 + + [[block]] + block = "memory" + format = " $icon mem_used_percents " + format_alt = " $icon $swap_used_percents " + + [[block]] + block = "cpu" + interval = 1 + + [[block]] + block = "load" + format = " $icon $1m " + interval = 1 + + [[block]] + block = "sound" + + [[block]] + block = "time" + format = " $timestamp.datetime(f:'%a %d/%m %R') " + interval = 60 + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-0311.nix b/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-0311.nix new file mode 100644 index 0000000000..d84cdd7cc8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/i3status-rust/with-version-0311.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + programs.i3status-rust = { enable = true; }; + + test.stubs.i3status-rust = { version = "0.31.1"; }; + + test.asserts.assertions.expected = [ + "Only i3status-rust <0.31.0 or ≥0.31.2 is supported due to a config format incompatibility." + ]; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/imv/basic-configuration.conf b/third_party/home-manager/tests/modules/programs/imv/basic-configuration.conf new file mode 100644 index 0000000000..12f266d96c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/imv/basic-configuration.conf @@ -0,0 +1,6 @@ +# Generated by Home Manager. +[aliases] +x=close + +[options] +background=ffffff diff --git a/third_party/home-manager/tests/modules/programs/imv/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/imv/basic-configuration.nix new file mode 100644 index 0000000000..e62a9d49c2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/imv/basic-configuration.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + config = { + programs.imv = { + enable = true; + package = pkgs.writeScriptBin "dummy-imv" ""; + settings = { + options.background = "ffffff"; + aliases.x = "close"; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/imv/config + assertFileContent home-files/.config/imv/config \ + ${./basic-configuration.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/imv/default.nix b/third_party/home-manager/tests/modules/programs/imv/default.nix new file mode 100644 index 0000000000..b035c72785 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/imv/default.nix @@ -0,0 +1,4 @@ +{ + imv-basic-configuration = ./basic-configuration.nix; + imv-empty-configuration = ./empty-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/imv/empty-configuration.nix b/third_party/home-manager/tests/modules/programs/imv/empty-configuration.nix new file mode 100644 index 0000000000..1c46b4c659 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/imv/empty-configuration.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + config = { + programs.imv = { + enable = true; + package = pkgs.writeScriptBin "dummy-imv" ""; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/imv/config + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/jujutsu/default.nix b/third_party/home-manager/tests/modules/programs/jujutsu/default.nix new file mode 100644 index 0000000000..56811133eb --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/jujutsu/default.nix @@ -0,0 +1,4 @@ +{ + jujutsu-example-config = ./example-config.nix; + jujutsu-empty-config = ./empty-config.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 new file mode 100644 index 0000000000..12c4a2f54f --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/jujutsu/empty-config.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + programs.jujutsu.enable = true; + + test.stubs.jujutsu = { }; + + nmt.script = '' + assertPathNotExists home-files/.jjconfig.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 new file mode 100644 index 0000000000..06b68f18c0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/jujutsu/example-config.nix @@ -0,0 +1,27 @@ +{ config, ... }: + +{ + programs.jujutsu = { + enable = true; + package = config.lib.test.mkStubPackage { }; + settings = { + user = { + name = "John Doe"; + email = "jdoe@example.org"; + }; + }; + }; + + nmt.script = '' + assertFileExists home-files/.jjconfig.toml + assertFileContent \ + home-files/.jjconfig.toml \ + ${ + builtins.toFile "expected.toml" '' + [user] + email = "jdoe@example.org" + name = "John Doe" + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khal/config.nix b/third_party/home-manager/tests/modules/programs/khal/config.nix new file mode 100644 index 0000000000..1633d132b8 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khal/config.nix @@ -0,0 +1,32 @@ +{ ... }: + +{ + programs.khal.enable = true; + accounts.calendar = { + basePath = "$XDG_CONFIG_HOME/cal"; + accounts = { + test = { + primary = true; + primaryCollection = "test"; + khal = { + enable = true; + readOnly = true; + type = "calendar"; + }; + local.type = "filesystem"; + local.fileExt = ".ics"; + name = "test"; + remote = { + type = "http"; + url = "https://example.com/events.ical"; + }; + }; + }; + }; + + test.stubs = { khal = { }; }; + + nmt.script = '' + assertFileExists home-files/.config/khal/config + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/khal/default.nix b/third_party/home-manager/tests/modules/programs/khal/default.nix new file mode 100644 index 0000000000..999dc4c5a6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/khal/default.nix @@ -0,0 +1 @@ +{ khal-config = ./config.nix; } 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 31d2fdc122..41a209eae2 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 @@ -4,6 +4,9 @@ font_family DejaVu Sans font_size 8 +# Shell integration is sourced and configured manually +shell_integration no-rc enabled + enable_audio_bell no scrollback_lines 10000 update_check_interval 0 diff --git a/third_party/home-manager/tests/modules/programs/ledger/default.nix b/third_party/home-manager/tests/modules/programs/ledger/default.nix new file mode 100644 index 0000000000..d7556a0bbc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ledger/default.nix @@ -0,0 +1 @@ +{ ledger = ./ledger.nix; } diff --git a/third_party/home-manager/tests/modules/programs/ledger/ledger.nix b/third_party/home-manager/tests/modules/programs/ledger/ledger.nix new file mode 100644 index 0000000000..f120a654d1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ledger/ledger.nix @@ -0,0 +1,35 @@ +{ ... }: + +{ + programs.ledger = { + enable = true; + settings = { + sort = "date"; + strict = true; + pedantic = true; + leeway = 30; + date-format = "%Y-%m-%d"; + file = [ + "~/finances/journal.ledger" + "~/finances/assets.ledger" + "~/finances/income.ledger" + ]; + }; + }; + + test.stubs.ledger = { }; + + nmt.script = '' + assertFileContent home-files/.config/ledger/ledgerrc \ + ${builtins.toFile "ledger-expected-settings" '' + --date-format %Y-%m-%d + --file ~/finances/journal.ledger + --file ~/finances/assets.ledger + --file ~/finances/income.ledger + --leeway 30 + --pedantic + --sort date + --strict + ''} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/lf/all-options.nix b/third_party/home-manager/tests/modules/programs/lf/all-options.nix index 35d7901d6c..9632e7cf68 100644 --- a/third_party/home-manager/tests/modules/programs/lf/all-options.nix +++ b/third_party/home-manager/tests/modules/programs/lf/all-options.nix @@ -71,7 +71,7 @@ in { ignorecase = false; icons = true; tabstop = 4; - ratios = "2:2:3"; + ratios = [ 2 2 3 ]; }; }; diff --git a/third_party/home-manager/tests/modules/programs/mbsync/mbsync-master-slave-change.nix b/third_party/home-manager/tests/modules/programs/mbsync/mbsync-master-slave-change.nix index 2e87732087..c6861374b3 100644 --- a/third_party/home-manager/tests/modules/programs/mbsync/mbsync-master-slave-change.nix +++ b/third_party/home-manager/tests/modules/programs/mbsync/mbsync-master-slave-change.nix @@ -16,7 +16,7 @@ with lib; # programs.mbsync.groups and # accounts.email.accounts..mbsync.groups should NOT be used at the # same time. - # If they are, then the new version will take precendence. + # If they are, then the new version will take precedence. groups.inboxes = { "hm@example.com" = [ "Inbox1" "Inbox2" ]; hm-account = [ "Inbox" ]; diff --git a/third_party/home-manager/tests/modules/programs/mbsync/mbsync.nix b/third_party/home-manager/tests/modules/programs/mbsync/mbsync.nix index 862e1c0e00..ffc1635e2e 100644 --- a/third_party/home-manager/tests/modules/programs/mbsync/mbsync.nix +++ b/third_party/home-manager/tests/modules/programs/mbsync/mbsync.nix @@ -11,7 +11,7 @@ with lib; # programs.mbsync.groups and # accounts.email.accounts..mbsync.groups should NOT be used at the # same time. - # If they are, then the new version will take precendence. + # If they are, then the new version will take precedence. groups.inboxes = { "hm@example.com" = [ "Inbox1" "Inbox2" ]; hm-account = [ "Inbox" ]; diff --git a/third_party/home-manager/tests/modules/programs/mpv/default.nix b/third_party/home-manager/tests/modules/programs/mpv/default.nix index 6e071610f2..66932b0b24 100644 --- a/third_party/home-manager/tests/modules/programs/mpv/default.nix +++ b/third_party/home-manager/tests/modules/programs/mpv/default.nix @@ -1,5 +1,5 @@ { # Temporarily commented until fixed for recent changes in Nixpkgs. - # mpv-example-settings = ./mpv-example-settings.nix; - # mpv-invalid-settings = ./mpv-invalid-settings.nix; + mpv-example-settings = ./mpv-example-settings.nix; + mpv-invalid-settings = ./mpv-invalid-settings.nix; } diff --git a/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-osc-opts b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-osc-opts new file mode 100644 index 0000000000..db377967b6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/mpv/mpv-example-settings-expected-osc-opts @@ -0,0 +1,3 @@ +scalewindowed=2.000000 +vidscale=no +visibility=always 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 9bb53e57d4..58467de0b8 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 @@ -18,6 +18,14 @@ cache-default = 4000000; }; + scriptOpts = { + osc = { + scalewindowed = 2.0; + vidscale = false; + visibility = "always"; + }; + }; + profiles = { fast = { vo = "vdpau"; }; "protocol.dvd" = { @@ -38,6 +46,9 @@ 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 1c4a80c112..701c823fb3 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 @@ -10,24 +10,12 @@ nixpkgs.overlays = [ (self: super: { - mpv-unwrapped = pkgs.runCommandLocal "mpv" { - version = "0"; - passthru = { - lua.luaversion = "0"; - luaEnv = "/dummy"; - vapoursynthSupport = false; - }; - } '' - mkdir -p $out/bin $out/Applications/mpv.app/Contents/MacOS - touch $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv - chmod 755 $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv - ''; - mpvDummy = config.lib.test.mkStubPackage { }; mpvScript = pkgs.runCommandLocal "mpvScript" { scriptName = "something"; } "mkdir $out"; }) ]; + test.stubs.mpvDummy = { }; test.asserts.assertions.expected = [ '' 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 4b315c2e9c..70b66fb9ae 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 @@ -12,7 +12,7 @@ programs.mu.enable = true; - test.stubs.mu = { }; + test.stubs.mu = { name = "mu"; }; nmt.script = '' assertFileContains activate \ 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 78b756364a..51fdcc6ec7 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 @@ -35,4 +35,4 @@ color status cyan default unset signature # notmuch section set nm_default_uri = "notmuch:///home/hm-user/Mail" -virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" +virtual-mailboxes "My INBOX" "notmuch://?query=tag%3Ainbox" 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 dfc8bc39ad..c3b3506704 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 @@ -35,4 +35,4 @@ color status cyan default set signature = "/nix/store/00000000000000000000000000000000-signature|" # notmuch section set nm_default_uri = "notmuch:///home/hm-user/Mail" -virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" +virtual-mailboxes "My INBOX" "notmuch://?query=tag%3Ainbox" 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 441374a9b8..66e941c180 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 @@ -35,4 +35,4 @@ color status cyan default set signature = /nix/store/00000000000000000000000000000000-signature.txt # notmuch section set nm_default_uri = "notmuch:///home/hm-user/Mail" -virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" +virtual-mailboxes "My INBOX" "notmuch://?query=tag%3Ainbox" diff --git a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-invalid-settings.nix b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-invalid-settings.nix index deaf021f7b..69fe4d9b55 100644 --- a/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-invalid-settings.nix +++ b/third_party/home-manager/tests/modules/programs/neomutt/neomutt-with-binds-invalid-settings.nix @@ -20,6 +20,8 @@ with lib; }]; }; + test.stubs.neomutt = { }; + test.asserts.assertions.expected = [ "The 'programs.neomutt.(binds|macros).map' list must contain at least one element." ]; diff --git a/third_party/home-manager/tests/modules/programs/neovim/default.nix b/third_party/home-manager/tests/modules/programs/neovim/default.nix index 3950dc8b86..d3224666b3 100644 --- a/third_party/home-manager/tests/modules/programs/neovim/default.nix +++ b/third_party/home-manager/tests/modules/programs/neovim/default.nix @@ -5,4 +5,5 @@ # waiting for a nixpkgs patch neovim-no-init = ./no-init.nix; + neovim-extra-lua-init = ./extra-lua-init.nix; } diff --git a/third_party/home-manager/tests/modules/programs/neovim/extra-lua-init.nix b/third_party/home-manager/tests/modules/programs/neovim/extra-lua-init.nix new file mode 100644 index 0000000000..2abaa6e9e7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/neovim/extra-lua-init.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.neovim = { + enable = true; + + extraLuaConfig = '' + -- extraLuaConfig + ''; + }; + nmt.script = '' + nvimFolder="home-files/.config/nvim" + assertFileContent "$nvimFolder/init.lua" ${ + pkgs.writeText "init.lua-expected" '' + -- extraLuaConfig + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/nnn/nnn.nix b/third_party/home-manager/tests/modules/programs/nnn/nnn.nix index 7a01fd8540..948317ae72 100644 --- a/third_party/home-manager/tests/modules/programs/nnn/nnn.nix +++ b/third_party/home-manager/tests/modules/programs/nnn/nnn.nix @@ -1,55 +1,53 @@ -{ config, lib, pkgs, ... }: +{ pkgs, ... }: { - config = { - programs.nnn = { - enable = true; - bookmarks = { - d = "~/Documents"; - D = "~/Downloads"; - p = "~/Pictures"; - v = "~/Videos"; - }; - package = pkgs.nnnDummy; - extraPackages = with pkgs; [ foo bar ]; - plugins = { - src = ./plugins; - mappings = { - c = "fzcd"; - f = "finder"; - v = "imgview"; - }; - }; + programs.nnn = { + enable = true; + bookmarks = { + d = "~/Documents"; + D = "~/Downloads"; + p = "~/Pictures"; + v = "~/Videos"; }; - - test.stubs = { - nnnDummy.buildScript = '' - runHook preInstall - - mkdir -p "$out/bin" - touch "$out/bin/nnn" - chmod +x "$out/bin/nnn" - - runHook postInstall - ''; - foo = { name = "foo"; }; - bar = { name = "bar"; }; - }; - - nmt = { - description = - "Check if the binary is correctly wrapped and if the symlinks are made"; - script = '' - assertDirectoryExists home-files/.config/nnn/plugins - - for bookmark in 'export NNN_BMS' '~/Downloads' '~/Documents' '~/Pictures' '~/Videos'; do - assertFileRegex home-path/bin/nnn "$bookmark" - done - - for plugin in 'export NNN_PLUG' 'fzcd' 'finder' 'imgview'; do - assertFileRegex home-path/bin/nnn "$plugin" - done - ''; + package = pkgs.nnnDummy; + extraPackages = with pkgs; [ foo bar ]; + plugins = { + src = ./plugins; + mappings = { + c = "fzcd"; + f = "finder"; + v = "imgview"; + }; }; }; + + test.stubs = { + nnnDummy.buildScript = '' + runHook preInstall + + mkdir -p "$out/bin" + touch "$out/bin/nnn" + chmod +x "$out/bin/nnn" + + runHook postInstall + ''; + foo = { name = "foo"; }; + bar = { name = "bar"; }; + }; + + nmt = { + description = + "Check if the binary is correctly wrapped and if the symlinks are made"; + script = '' + assertDirectoryExists home-files/.config/nnn/plugins + + for bookmark in 'export NNN_BMS' '~/Downloads' '~/Documents' '~/Pictures' '~/Videos'; do + assertFileRegex home-path/bin/nnn "$bookmark" + done + + for plugin in 'export NNN_PLUG' 'fzcd' 'finder' 'imgview'; do + assertFileRegex home-path/bin/nnn "$plugin" + done + ''; + }; } diff --git a/third_party/home-manager/tests/modules/programs/nushell/config-expected.nu b/third_party/home-manager/tests/modules/programs/nushell/config-expected.nu index c70286d702..a306fabd87 100644 --- a/third_party/home-manager/tests/modules/programs/nushell/config-expected.nu +++ b/third_party/home-manager/tests/modules/programs/nushell/config-expected.nu @@ -4,3 +4,6 @@ let $config = { use_ls_colors: true } + +alias ll = ls -a +alias lsname = (ls | get name) \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/programs/nushell/env-expected.nu b/third_party/home-manager/tests/modules/programs/nushell/env-expected.nu index 280b59bfaa..07105fc549 100644 --- a/third_party/home-manager/tests/modules/programs/nushell/env-expected.nu +++ b/third_party/home-manager/tests/modules/programs/nushell/env-expected.nu @@ -1,2 +1,4 @@ -let-env FOO = 'BAR' +$env.FOO = 'BAR' + +$env.BAR = $'(echo BAZ)' \ No newline at end of file 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 21d94a70a7..73038584b6 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 @@ -13,8 +13,22 @@ ''; envFile.text = '' - let-env FOO = 'BAR' + $env.FOO = 'BAR' ''; + + loginFile.text = '' + # Prints "Hello, World" upon logging into tty1 + if (tty) == "/dev/tty1" { + echo "Hello, World" + } + ''; + + shellAliases = { + "lsname" = "(ls | get name)"; + "ll" = "ls -a"; + }; + + environmentVariables = { BAR = "$'(echo BAZ)'"; }; }; test.stubs.nushell = { }; @@ -31,5 +45,8 @@ assertFileContent \ "${configDir}/env.nu" \ ${./env-expected.nu} + assertFileContent \ + "${configDir}/login.nu" \ + ${./login-expected.nu} ''; } diff --git a/third_party/home-manager/tests/modules/programs/nushell/login-expected.nu b/third_party/home-manager/tests/modules/programs/nushell/login-expected.nu new file mode 100644 index 0000000000..9c21789df1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/nushell/login-expected.nu @@ -0,0 +1,5 @@ +# Prints "Hello, World" upon logging into tty1 +if (tty) == "/dev/tty1" { + echo "Hello, World" +} + diff --git a/third_party/home-manager/tests/modules/programs/papis/default.nix b/third_party/home-manager/tests/modules/programs/papis/default.nix new file mode 100644 index 0000000000..a849be85f1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/papis/default.nix @@ -0,0 +1 @@ +{ papis = ./papis.nix; } diff --git a/third_party/home-manager/tests/modules/programs/papis/papis.nix b/third_party/home-manager/tests/modules/programs/papis/papis.nix new file mode 100644 index 0000000000..507056bed9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/papis/papis.nix @@ -0,0 +1,46 @@ +{ ... }: + +{ + programs.papis = { + enable = true; + settings = { + picktool = "fzf"; + file-browser = "ranger"; + add-edit = true; + }; + libraries = { + papers = { + isDefault = true; + settings = { + dir = "~/papers"; + opentool = "okular"; + }; + }; + books.settings = { + dir = "~/books"; + opentool = "firefox"; + }; + }; + }; + + test.stubs.papis = { }; + + nmt.script = '' + assertFileContent home-files/.config/papis/config \ + ${builtins.toFile "papis-expected-settings.ini" '' + [books] + dir=~/books + opentool=firefox + + [papers] + dir=~/papers + opentool=okular + + [settings] + add-edit=true + default-library=papers + file-browser=ranger + picktool=fzf + ''} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/pyenv/bash.nix b/third_party/home-manager/tests/modules/programs/pyenv/bash.nix new file mode 100644 index 0000000000..ac6a8f0c12 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pyenv/bash.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs = { + bash.enable = true; + pyenv.enable = true; + }; + + test.stubs.pyenv = { name = "pyenv"; }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(@pyenv@/bin/pyenv init - bash)"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/pyenv/default.nix b/third_party/home-manager/tests/modules/programs/pyenv/default.nix new file mode 100644 index 0000000000..c2e6505874 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pyenv/default.nix @@ -0,0 +1,5 @@ +{ + pyenv-bash = ./bash.nix; + pyenv-zsh = ./zsh.nix; + pyenv-fish = ./fish.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/pyenv/fish.nix b/third_party/home-manager/tests/modules/programs/pyenv/fish.nix new file mode 100644 index 0000000000..41b4911bb7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pyenv/fish.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs = { + fish.enable = true; + pyenv.enable = true; + }; + + test.stubs.pyenv = { name = "pyenv"; }; + + nmt.script = '' + assertFileExists home-files/.config/fish/config.fish + assertFileContains \ + home-files/.config/fish/config.fish \ + '@pyenv@/bin/pyenv init - fish | source' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/pyenv/zsh.nix b/third_party/home-manager/tests/modules/programs/pyenv/zsh.nix new file mode 100644 index 0000000000..da029fc2cc --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/pyenv/zsh.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs = { + zsh.enable = true; + pyenv.enable = true; + }; + + test.stubs.pyenv = { name = "pyenv"; }; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(@pyenv@/bin/pyenv init - zsh)"' + ''; +} 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 a719d9f763..00e730efa1 100644 --- a/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/keybindings.nix @@ -1,41 +1,43 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ lib, pkgs, ... }: { - config = { - programs.qutebrowser = { - enable = true; + programs.qutebrowser = { + enable = true; - enableDefaultBindings = false; + enableDefaultBindings = false; - keyBindings = { - normal = { - "" = "spawn mpv {url}"; - ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]''; - }; - prompt = { "" = "prompt-yes"; }; + keyBindings = { + normal = { + "" = "spawn mpv {url}"; + ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]''; + "" = lib.mkMerge [ + "config-cycle tabs.show never always" + "config-cycle statusbar.show in-mode always" + "config-cycle scrolling.bar never always" + ]; }; + prompt = { "" = "prompt-yes"; }; }; - - test.stubs.qutebrowser = { }; - - nmt.script = let - qutebrowserConfig = if pkgs.stdenv.hostPlatform.isDarwin then - ".qutebrowser/config.py" - else - ".config/qutebrowser/config.py"; - in '' - assertFileContent \ - home-files/${qutebrowserConfig} \ - ${ - pkgs.writeText "qutebrowser-expected-config.py" '' - config.load_autoconfig(False) - c.bindings.default = {} - config.bind(",l", "config-cycle spellcheck.languages [\"en-GB\"] [\"en-US\"]", mode="normal") - config.bind("", "spawn mpv {url}", mode="normal") - config.bind("", "prompt-yes", mode="prompt")'' - } - ''; }; + + test.stubs.qutebrowser = { }; + + nmt.script = let + qutebrowserConfig = if pkgs.stdenv.hostPlatform.isDarwin then + ".qutebrowser/config.py" + else + ".config/qutebrowser/config.py"; + in '' + assertFileContent \ + home-files/${qutebrowserConfig} \ + ${ + pkgs.writeText "qutebrowser-expected-config.py" '' + config.load_autoconfig(False) + c.bindings.default = {} + config.bind(",l", "config-cycle spellcheck.languages [\"en-GB\"] [\"en-US\"]", 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/qutebrowser/quickmarks.nix b/third_party/home-manager/tests/modules/programs/qutebrowser/quickmarks.nix index 1491a1e67f..9437fc6142 100644 --- a/third_party/home-manager/tests/modules/programs/qutebrowser/quickmarks.nix +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/quickmarks.nix @@ -1,33 +1,29 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ pkgs, ... }: { - config = { - programs.qutebrowser = { - enable = true; + programs.qutebrowser = { + enable = true; - quickmarks = { - nixpkgs = "https://github.com/NixOS/nixpkgs"; - home-manager = "https://github.com/nix-community/home-manager"; - }; + quickmarks = { + nixpkgs = "https://github.com/NixOS/nixpkgs"; + home-manager = "https://github.com/nix-community/home-manager"; }; - - test.stubs.qutebrowser = { }; - - nmt.script = let - quickmarksFile = if pkgs.stdenv.hostPlatform.isDarwin then - ".qutebrowser/quickmarks" - else - ".config/qutebrowser/quickmarks"; - in '' - assertFileContent \ - home-files/${quickmarksFile} \ - ${ - pkgs.writeText "qutebrowser-expected-quickmarks" '' - home-manager https://github.com/nix-community/home-manager - nixpkgs https://github.com/NixOS/nixpkgs'' - } - ''; }; + + test.stubs.qutebrowser = { }; + + nmt.script = let + quickmarksFile = if pkgs.stdenv.hostPlatform.isDarwin then + ".qutebrowser/quickmarks" + else + ".config/qutebrowser/quickmarks"; + in '' + assertFileContent \ + home-files/${quickmarksFile} \ + ${ + pkgs.writeText "qutebrowser-expected-quickmarks" '' + home-manager https://github.com/nix-community/home-manager + nixpkgs https://github.com/NixOS/nixpkgs'' + } + ''; } diff --git a/third_party/home-manager/tests/modules/programs/qutebrowser/settings.nix b/third_party/home-manager/tests/modules/programs/qutebrowser/settings.nix index dca6ae6f53..e2cf3915fe 100644 --- a/third_party/home-manager/tests/modules/programs/qutebrowser/settings.nix +++ b/third_party/home-manager/tests/modules/programs/qutebrowser/settings.nix @@ -1,50 +1,46 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ pkgs, ... }: { - config = { - programs.qutebrowser = { - enable = true; + programs.qutebrowser = { + enable = true; - settings = { - colors = { - hints = { - bg = "#000000"; - fg = "#ffffff"; - }; - tabs.bar.bg = "#000000"; + settings = { + colors = { + hints = { + bg = "#000000"; + fg = "#ffffff"; }; - spellcheck.languages = [ "en-US" "sv-SE" ]; - tabs.tabs_are_windows = true; + tabs.bar.bg = "#000000"; }; - - extraConfig = '' - # Extra qutebrowser configuration. - ''; + spellcheck.languages = [ "en-US" "sv-SE" ]; + tabs.tabs_are_windows = true; }; - test.stubs.qutebrowser = { }; - - nmt.script = let - qutebrowserConfig = if pkgs.stdenv.hostPlatform.isDarwin then - ".qutebrowser/config.py" - else - ".config/qutebrowser/config.py"; - in '' - assertFileContent \ - home-files/${qutebrowserConfig} \ - ${ - pkgs.writeText "qutebrowser-expected-config.py" '' - config.load_autoconfig(False) - c.colors.hints.bg = "#000000" - c.colors.hints.fg = "#ffffff" - c.colors.tabs.bar.bg = "#000000" - c.spellcheck.languages = ["en-US", "sv-SE"] - c.tabs.tabs_are_windows = True - # Extra qutebrowser configuration. - '' - } + extraConfig = '' + # Extra qutebrowser configuration. ''; }; + + test.stubs.qutebrowser = { }; + + nmt.script = let + qutebrowserConfig = if pkgs.stdenv.hostPlatform.isDarwin then + ".qutebrowser/config.py" + else + ".config/qutebrowser/config.py"; + in '' + assertFileContent \ + home-files/${qutebrowserConfig} \ + ${ + pkgs.writeText "qutebrowser-expected-config.py" '' + config.load_autoconfig(False) + c.colors.hints.bg = "#000000" + c.colors.hints.fg = "#ffffff" + c.colors.tabs.bar.bg = "#000000" + c.spellcheck.languages = ["en-US", "sv-SE"] + c.tabs.tabs_are_windows = True + # Extra qutebrowser configuration. + '' + } + ''; } diff --git a/third_party/home-manager/tests/modules/programs/readline/using-all-options.nix b/third_party/home-manager/tests/modules/programs/readline/using-all-options.nix index ab851020c2..85c9fc140b 100644 --- a/third_party/home-manager/tests/modules/programs/readline/using-all-options.nix +++ b/third_party/home-manager/tests/modules/programs/readline/using-all-options.nix @@ -7,7 +7,10 @@ with lib; programs.readline = { enable = true; - bindings = { "\\C-h" = "backward-kill-word"; }; + bindings = { + "\\C-h" = "backward-kill-word"; + "Control-p" = ''"whups"''; + }; variables = { bell-style = "audible"; diff --git a/third_party/home-manager/tests/modules/programs/readline/using-all-options.txt b/third_party/home-manager/tests/modules/programs/readline/using-all-options.txt index 6b4aef51e6..e8f1093240 100644 --- a/third_party/home-manager/tests/modules/programs/readline/using-all-options.txt +++ b/third_party/home-manager/tests/modules/programs/readline/using-all-options.txt @@ -4,6 +4,7 @@ $include /etc/inputrc set bell-style audible set completion-map-case on set completion-prefix-display-length 2 +Control-p: "whups" "\C-h": backward-kill-word $if mode=emacs "\e[1~": beginning-of-line diff --git a/third_party/home-manager/tests/modules/programs/ripgrep/custom-arguments.nix b/third_party/home-manager/tests/modules/programs/ripgrep/custom-arguments.nix new file mode 100644 index 0000000000..e18efe8278 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ripgrep/custom-arguments.nix @@ -0,0 +1,24 @@ +{ pkgs, config, ... }: { + config = { + programs.ripgrep = { + enable = true; + package = config.lib.test.mkStubPackage { name = "ripgrep"; }; + arguments = [ + "--max-columns-preview" + "--colors=line:style:bold" + "--no-require-git" + ]; + }; + + nmt.script = '' + assertFileExists home-files/.config/ripgrep/ripgreprc + assertFileContent home-files/.config/ripgrep/ripgreprc ${ + pkgs.writeText "ripgrep.expected" '' + --max-columns-preview + --colors=line:style:bold + --no-require-git + '' + } + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/ripgrep/default-arguments.nix b/third_party/home-manager/tests/modules/programs/ripgrep/default-arguments.nix new file mode 100644 index 0000000000..43525316e9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ripgrep/default-arguments.nix @@ -0,0 +1,12 @@ +{ config, ... }: { + config = { + programs.ripgrep = { + enable = true; + package = config.lib.test.mkStubPackage { name = "ripgrep"; }; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/ripgrep/ripgreprc + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/ripgrep/default.nix b/third_party/home-manager/tests/modules/programs/ripgrep/default.nix new file mode 100644 index 0000000000..6146a0bde3 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/ripgrep/default.nix @@ -0,0 +1,4 @@ +{ + ripgrep-default-arguments = ./default-arguments.nix; + ripgrep-custom-arguments = ./custom-arguments.nix; +} 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 new file mode 100644 index 0000000000..3c05c25cb5 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/bash-integration.nix @@ -0,0 +1,16 @@ +{ 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 new file mode 100644 index 0000000000..74c52f9439 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/custom-settings.nix @@ -0,0 +1,35 @@ +{ 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 new file mode 100644 index 0000000000..c1a0e7ae5e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/default-settings.nix @@ -0,0 +1,12 @@ +{ 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 new file mode 100644 index 0000000000..250b5ec6fd --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/default.nix @@ -0,0 +1,7 @@ +{ + 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/fish-integration.nix b/third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix new file mode 100644 index 0000000000..edc752bd25 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/fish-integration.nix @@ -0,0 +1,16 @@ +{ config, ... }: { + programs = { + rtx = { + package = config.lib.test.mkStubPackage { name = "rtx"; }; + enable = true; + enableFishIntegration = true; + }; + + fish.enable = true; + }; + + nmt.script = '' + assertFileRegex home-files/.config/fish/config.fish '/nix/store/.*rtx.*/bin/rtx activate fish | source' + ''; +} + 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 new file mode 100644 index 0000000000..fcff308d05 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/rtx/zsh-integration.nix @@ -0,0 +1,16 @@ +{ 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/scmpuff/bash.nix b/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix index ea34373b9c..942d472f9d 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/bash.nix @@ -1,15 +1,17 @@ -{ pkgs, ... }: { - config = { - programs = { - scmpuff.enable = true; - bash.enable = true; - }; +{ ... }: - nmt.script = '' - assertFileExists home-files/.bashrc - assertFileContains \ - home-files/.bashrc \ - 'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"' - ''; +{ + programs = { + scmpuff.enable = true; + bash.enable = true; }; + + test.stubs.scmpuff = { }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(@scmpuff@/bin/scmpuff init -s)"' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix b/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix index 5326995f50..920196b16c 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/fish.nix @@ -1,4 +1,6 @@ -{ pkgs, lib, ... }: { +{ lib, ... }: + +{ programs = { scmpuff.enable = true; fish.enable = true; diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix index e3852b84a0..e76295a533 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-bash.nix @@ -1,15 +1,17 @@ -{ pkgs, ... }: { - config = { - programs = { - scmpuff = { - enable = true; - enableBashIntegration = false; - }; - bash.enable = true; - }; +{ ... }: - nmt.script = '' - assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff}/bin/scmpuff' - ''; +{ + programs = { + scmpuff = { + enable = true; + enableBashIntegration = false; + }; + bash.enable = true; }; + + test.stubs.scmpuff = { }; + + nmt.script = '' + assertFileNotRegex home-files/.bashrc '@scmpuff@/bin/scmpuff' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-fish.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-fish.nix index 94666a5984..977b8fd3aa 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-fish.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-fish.nix @@ -1,4 +1,6 @@ -{ pkgs, lib, ... }: { +{ lib, ... }: + +{ programs = { scmpuff = { enable = true; diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix index ddc40773e4..1f479efdad 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-shell.nix @@ -1,20 +1,23 @@ -{ pkgs, ... }: { - config = { - programs = { - scmpuff = { - enable = true; - enableBashIntegration = false; - enableZshIntegration = false; - }; - bash.enable = true; - zsh.enable = true; +{ ... }: + +{ + programs = { + scmpuff = { + enable = true; + enableBashIntegration = false; + enableZshIntegration = false; }; - - test.stubs.zsh = { }; - - nmt.script = '' - assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s' - assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff} init -s' - ''; + bash.enable = true; + zsh.enable = true; }; + + test.stubs = { + zsh = { }; + scmpuff = { }; + }; + + nmt.script = '' + assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s' + assertFileNotRegex home-files/.bashrc '@scmpuff@ init -s' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/no-zsh.nix b/third_party/home-manager/tests/modules/programs/scmpuff/no-zsh.nix index 5854fdd6f6..d6ed244900 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/no-zsh.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/no-zsh.nix @@ -1,17 +1,20 @@ -{ pkgs, ... }: { - config = { - programs = { - scmpuff = { - enable = true; - enableZshIntegration = false; - }; - zsh.enable = true; +{ ... }: + +{ + programs = { + scmpuff = { + enable = true; + enableZshIntegration = false; }; - - test.stubs.zsh = { }; - - nmt.script = '' - assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s' - ''; + zsh.enable = true; }; + + test.stubs = { + zsh = { }; + scmpuff = { }; + }; + + nmt.script = '' + assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix b/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix index d132945f60..ce0a0eaeb0 100644 --- a/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix +++ b/third_party/home-manager/tests/modules/programs/scmpuff/zsh.nix @@ -1,17 +1,20 @@ -{ pkgs, ... }: { - config = { - programs = { - scmpuff.enable = true; - zsh.enable = true; - }; +{ ... }: - test.stubs.zsh = { }; - - nmt.script = '' - assertFileExists home-files/.zshrc - assertFileContains \ - home-files/.zshrc \ - 'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"' - ''; +{ + programs = { + scmpuff.enable = true; + zsh.enable = true; }; + + test.stubs = { + zsh = { }; + scmpuff = { }; + }; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(@scmpuff@/bin/scmpuff init -s)"' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf index 1a197b26f7..b6b760ce6e 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf +++ b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs-expected.conf @@ -5,6 +5,7 @@ Host * !github.com Host abc ProxyJump jump-host Host xyz + SetEnv BAR="_bar_ 42" FOO="foo12" ServerAliveInterval 60 ServerAliveCountMax 10 IdentityFile file diff --git a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs.nix b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs.nix index eaa20c6e32..d8584e3a0c 100644 --- a/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs.nix +++ b/third_party/home-manager/tests/modules/programs/ssh/match-blocks-attrs.nix @@ -35,6 +35,10 @@ with lib; } ]; dynamicForwards = [{ port = 2839; }]; + setEnv = { + FOO = "foo12"; + BAR = "_bar_ 42"; + }; }; "* !github.com" = { diff --git a/third_party/home-manager/tests/modules/programs/starship/default.nix b/third_party/home-manager/tests/modules/programs/starship/default.nix index 814aed6587..6fed130390 100644 --- a/third_party/home-manager/tests/modules/programs/starship/default.nix +++ b/third_party/home-manager/tests/modules/programs/starship/default.nix @@ -1 +1,5 @@ -{ starship-settings = ./settings.nix; } +{ + starship-settings = ./settings.nix; + starship-fish-with-transience = ./fish_with_transience.nix; + starship-fish-without-transience = ./fish_without_transience.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/starship/fish_with_transience.nix b/third_party/home-manager/tests/modules/programs/starship/fish_with_transience.nix new file mode 100644 index 0000000000..c7a0fbf52c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/starship/fish_with_transience.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs = { + fish.enable = true; + + starship = { + enable = true; + enableTransience = true; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/fish/config.fish + assertFileRegex home-files/.config/fish/config.fish 'enable_transience' + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/starship/fish_without_transience.nix b/third_party/home-manager/tests/modules/programs/starship/fish_without_transience.nix new file mode 100644 index 0000000000..7ba8e67fc2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/starship/fish_without_transience.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs = { + fish.enable = true; + starship.enable = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/fish/config.fish + assertFileNotRegex home-files/.config/fish/config.fish 'enable_transience' + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/swaylock/default.nix b/third_party/home-manager/tests/modules/programs/swaylock/default.nix index a8a33fd691..65434be25f 100644 --- a/third_party/home-manager/tests/modules/programs/swaylock/default.nix +++ b/third_party/home-manager/tests/modules/programs/swaylock/default.nix @@ -1,4 +1,6 @@ { swaylock-disabled = import ./disabled.nix; swaylock-settings = import ./settings.nix; + swaylock-enabled = import ./enabled.nix; + swaylock-legacy = import ./legacy.nix; } diff --git a/third_party/home-manager/tests/modules/programs/swaylock/enabled.nix b/third_party/home-manager/tests/modules/programs/swaylock/enabled.nix new file mode 100644 index 0000000000..27bea281c0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swaylock/enabled.nix @@ -0,0 +1,10 @@ +{ config, ... }: { + programs.swaylock = { + enable = true; + package = config.lib.test.mkStubPackage { }; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/swaylock/config + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/swaylock/legacy.nix b/third_party/home-manager/tests/modules/programs/swaylock/legacy.nix new file mode 100644 index 0000000000..daee2aa01a --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/swaylock/legacy.nix @@ -0,0 +1,19 @@ +{ + home.stateVersion = "20.09"; + programs.swaylock = { + settings = { + color = "808080"; + font-size = 24; + indicator-idle-visible = false; # Test that this does nothing + indicator-radius = 100; + line-color = "ffffff"; + show-failed-attempts = true; + }; + }; + + nmt.script = let homeConfig = "home-files/.config/swaylock/config"; + in '' + assertFileExists ${homeConfig} + assertFileContent ${homeConfig} ${./config} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/swaylock/settings.nix b/third_party/home-manager/tests/modules/programs/swaylock/settings.nix index 9ad46ba5a6..3dd9c68d0f 100644 --- a/third_party/home-manager/tests/modules/programs/swaylock/settings.nix +++ b/third_party/home-manager/tests/modules/programs/swaylock/settings.nix @@ -1,11 +1,14 @@ -{ ... }: { - programs.swaylock.settings = { - color = "808080"; - font-size = 24; - indicator-idle-visible = false; # Test that this does nothing - indicator-radius = 100; - line-color = "ffffff"; - show-failed-attempts = true; +{ + programs.swaylock = { + enable = true; + settings = { + color = "808080"; + font-size = 24; + indicator-idle-visible = false; # Test that this does nothing + indicator-radius = 100; + line-color = "ffffff"; + show-failed-attempts = true; + }; }; nmt.script = let homeConfig = "home-files/.config/swaylock/config"; diff --git a/third_party/home-manager/tests/modules/programs/terminator/config-file.nix b/third_party/home-manager/tests/modules/programs/terminator/config-file.nix index 50b9c42e79..9e4e5d6e61 100644 --- a/third_party/home-manager/tests/modules/programs/terminator/config-file.nix +++ b/third_party/home-manager/tests/modules/programs/terminator/config-file.nix @@ -1,24 +1,24 @@ -{ config, lib, pkgs, ... }: { - config = { - programs.terminator = { - enable = true; - config = { - global_config.borderless = true; - profiles.default.background_color = "#002b36"; - }; +{ pkgs, ... }: + +{ + programs.terminator = { + enable = true; + config = { + global_config.borderless = true; + profiles.default.background_color = "#002b36"; }; - - test.stubs.terminator = { }; - - nmt.script = '' - assertFileContent home-files/.config/terminator/config ${ - pkgs.writeText "expected" '' - [global_config] - borderless = True - [profiles] - [[default]] - background_color = "#002b36"'' - } - ''; }; + + test.stubs.terminator = { }; + + nmt.script = '' + assertFileContent home-files/.config/terminator/config ${ + pkgs.writeText "expected" '' + [global_config] + borderless = True + [profiles] + [[default]] + background_color = "#002b36"'' + } + ''; } 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 de67757544..0c5a65a828 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 @@ -3,10 +3,22 @@ user_pref("general.useragent.override", ""); user_pref("mail.account.account_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.identities", "id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc"); user_pref("mail.account.account_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.server", "server_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc"); -user_pref("mail.account.account_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.identities", "id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); +user_pref("mail.account.account_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.identities", "id_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f,id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562"); user_pref("mail.account.account_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.server", "server_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); user_pref("mail.accountmanager.accounts", "account_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,account_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); user_pref("mail.accountmanager.defaultaccount", "account_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.attachPgpKey", false); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.autoEncryptDrafts", true); +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.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"); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.protectSubject", true); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.sign_mail", false); +user_pref("mail.identity.id_8bbcff78f53202c0bfaa490a2068e3e5d6e36872144c659952ecc0ada47d7562.useremail", "home-manager@example.com"); +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.protectSubject", false); @@ -59,3 +71,5 @@ user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfa user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); user_pref("privacy.donottrackheader.enabled", true); +user_pref("mail.html_compose", false); + 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 12d7991e06..a7c32fd865 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 @@ -29,3 +29,4 @@ user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d9938 user_pref("privacy.donottrackheader.enabled", true); user_pref("second.setting", "some-test-setting"); + 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 ee16efa067..1b0441a1d9 100644 --- a/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix +++ b/third_party/home-manager/tests/modules/programs/thunderbird/thunderbird.nix @@ -8,6 +8,8 @@ profiles = [ "first" ]; }; + aliases = [ "home-manager@example.com" ]; + gpg.key = "ABC"; imap = { @@ -35,6 +37,15 @@ first = { isDefault = true; withExternalGnupg = true; + userChrome = '' + * { color: blue !important; } + ''; + userContent = '' + * { color: red !important; } + ''; + extraConfig = '' + user_pref("mail.html_compose", false); + ''; }; second.settings = { "second.setting" = "some-test-setting"; }; @@ -60,5 +71,13 @@ assertFileExists home-files/.thunderbird/second/user.js assertFileContent home-files/.thunderbird/second/user.js \ ${./thunderbird-expected-second.js} + + assertFileExists home-files/.thunderbird/first/chrome/userChrome.css + assertFileContent home-files/.thunderbird/first/chrome/userChrome.css \ + <(echo "* { color: blue !important; }") + + assertFileExists home-files/.thunderbird/first/chrome/userContent.css + assertFileContent home-files/.thunderbird/first/chrome/userContent.css \ + <(echo "* { color: red !important; }") ''; } diff --git a/third_party/home-manager/tests/modules/programs/tmux/default-shell.conf b/third_party/home-manager/tests/modules/programs/tmux/default-shell.conf index a336236307..8eb4e40fad 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/default-shell.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/default-shell.conf @@ -23,6 +23,7 @@ set -g mode-keys emacs +set -g mouse off setw -g aggressive-resize off setw -g clock-mode-style 12 set -s escape-time 500 diff --git a/third_party/home-manager/tests/modules/programs/tmux/default.nix b/third_party/home-manager/tests/modules/programs/tmux/default.nix index be78c2620a..979774a717 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/default.nix +++ b/third_party/home-manager/tests/modules/programs/tmux/default.nix @@ -7,4 +7,5 @@ tmux-default-shell = ./default-shell.nix; tmux-shortcut-without-prefix = ./shortcut-without-prefix.nix; tmux-prefix = ./prefix.nix; + tmux-mouse-enabled = ./mouse-enabled.nix; } diff --git a/third_party/home-manager/tests/modules/programs/tmux/disable-confirmation-prompt.conf b/third_party/home-manager/tests/modules/programs/tmux/disable-confirmation-prompt.conf index e97a94d192..b4359316c0 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/disable-confirmation-prompt.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/disable-confirmation-prompt.conf @@ -23,6 +23,7 @@ bind-key -N "Kill the current window" & kill-window bind-key -N "Kill the current pane" x kill-pane +set -g mouse off setw -g aggressive-resize off setw -g clock-mode-style 12 set -s escape-time 500 diff --git a/third_party/home-manager/tests/modules/programs/tmux/emacs-with-plugins.conf b/third_party/home-manager/tests/modules/programs/tmux/emacs-with-plugins.conf index d015019252..54ddce1360 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/emacs-with-plugins.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/emacs-with-plugins.conf @@ -23,6 +23,7 @@ set -g mode-keys emacs +set -g mouse off setw -g aggressive-resize on setw -g clock-mode-style 24 set -s escape-time 500 diff --git a/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.conf b/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.conf new file mode 100644 index 0000000000..2069920de2 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.conf @@ -0,0 +1,29 @@ +# ============================================= # +# Start with defaults from the Sensible plugin # +# --------------------------------------------- # +run-shell @sensible_rtp@ +# ============================================= # + +set -g default-terminal "screen" +set -g base-index 0 +setw -g pane-base-index 0 + + + + + +set -g status-keys emacs +set -g mode-keys emacs + + + + + + + +set -g mouse on +setw -g aggressive-resize off +setw -g clock-mode-style 12 +set -s escape-time 500 +set -g history-limit 2000 + diff --git a/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.nix b/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.nix new file mode 100644 index 0000000000..6fc5b526e9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/tmux/mouse-enabled.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.tmux = { + enable = true; + mouse = true; + }; + + nixpkgs.overlays = [ + (self: super: { + tmuxPlugins = super.tmuxPlugins // { + sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; }; + }; + }) + ]; + + nmt.script = '' + assertFileExists home-files/.config/tmux/tmux.conf + assertFileContent home-files/.config/tmux/tmux.conf \ + ${./mouse-enabled.conf} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/tmux/prefix.conf b/third_party/home-manager/tests/modules/programs/tmux/prefix.conf index 831ec3b0ec..00f950e09c 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/prefix.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/prefix.conf @@ -26,6 +26,7 @@ bind -N "Send the prefix key through to the application" \ +set -g mouse off setw -g aggressive-resize off setw -g clock-mode-style 12 set -s escape-time 500 diff --git a/third_party/home-manager/tests/modules/programs/tmux/secure-socket-enabled.nix b/third_party/home-manager/tests/modules/programs/tmux/secure-socket-enabled.nix index ca2de66310..60b3f70877 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/secure-socket-enabled.nix +++ b/third_party/home-manager/tests/modules/programs/tmux/secure-socket-enabled.nix @@ -12,7 +12,7 @@ with lib; nmt.script = '' assertFileExists home-path/etc/profile.d/hm-session-vars.sh assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ - 'export TMUX_TMPDIR="''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}"' + 'export TMUX_TMPDIR="''${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}"' ''; }; } diff --git a/third_party/home-manager/tests/modules/programs/tmux/shortcut-without-prefix.conf b/third_party/home-manager/tests/modules/programs/tmux/shortcut-without-prefix.conf index 4fd89ad242..938ecfa823 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/shortcut-without-prefix.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/shortcut-without-prefix.conf @@ -27,6 +27,7 @@ bind C-a last-window +set -g mouse off setw -g aggressive-resize off setw -g clock-mode-style 12 set -s escape-time 500 diff --git a/third_party/home-manager/tests/modules/programs/tmux/vi-all-true.conf b/third_party/home-manager/tests/modules/programs/tmux/vi-all-true.conf index 6a6fd61147..03bf2f5a18 100644 --- a/third_party/home-manager/tests/modules/programs/tmux/vi-all-true.conf +++ b/third_party/home-manager/tests/modules/programs/tmux/vi-all-true.conf @@ -23,6 +23,7 @@ set -g mode-keys vi +set -g mouse off setw -g aggressive-resize on setw -g clock-mode-style 24 set -s escape-time 500 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 a8f5c6d105..e80e98b860 100644 --- a/third_party/home-manager/tests/modules/programs/topgrade/settings.nix +++ b/third_party/home-manager/tests/modules/programs/topgrade/settings.nix @@ -1,36 +1,32 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ lib, ... }: { - config = { - programs.topgrade = { - enable = true; + programs.topgrade = { + enable = true; - settings = mkMerge [ - { - disable = [ "sdkman" "flutter" "node" "nix" "home_manager" ]; + settings = lib.mkMerge [ + { + 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; + { + set_title = false; + cleanup = true; - commands = { "Purge unused APT packages" = "sudo apt autoremove"; }; - } - ]; - }; - - test.stubs.topgrade = { }; - - nmt.script = '' - assertFileContent \ - home-files/.config/topgrade.toml \ - ${./settings-expected.toml} - ''; + commands = { "Purge unused APT packages" = "sudo apt autoremove"; }; + } + ]; }; + + test.stubs.topgrade = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/topgrade.toml \ + ${./settings-expected.toml} + ''; } diff --git a/third_party/home-manager/tests/modules/programs/translate-shell/default.nix b/third_party/home-manager/tests/modules/programs/translate-shell/default.nix new file mode 100644 index 0000000000..539206a735 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/translate-shell/default.nix @@ -0,0 +1 @@ +{ translate-shell = ./translate-shell.nix; } diff --git a/third_party/home-manager/tests/modules/programs/translate-shell/translate-shell.nix b/third_party/home-manager/tests/modules/programs/translate-shell/translate-shell.nix new file mode 100644 index 0000000000..3c1d27bdd9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/translate-shell/translate-shell.nix @@ -0,0 +1,27 @@ +{ ... }: + +{ + programs.translate-shell = { + enable = true; + settings = { + verbose = true; + engine = "bing"; + play = true; + hl = "en"; + tl = [ "de" "fr" ]; + }; + }; + + test.stubs.translate-shell = { }; + + nmt.script = '' + assertFileContent home-files/.config/translate-shell/init.trans \ + ${builtins.toFile "translate-shell-expected-settings.trans" '' + {:engine "bing" + :hl "en" + :play true + :tl [ "de" "fr" ] + :verbose true + }''} + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.nix new file mode 100644 index 0000000000..59bfafa5a7 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.nix @@ -0,0 +1,27 @@ +{ config, pkgs, lib, xdg, ... }: + +{ + programs.vim-vint = { + enable = true; + settings = { + cmdargs = { + severity = "error"; + color = true; + env = { neovim = true; }; + }; + policies = { + ProhibitEqualTildeOperator.enabled = false; + ProhibitUsingUndeclaredVariable.enabled = false; + ProhibitAbbreviationOption.enabled = false; + ProhibitImplicitScopeVariable.enabled = false; + ProhibitSetNoCompatible.enabled = false; + }; + }; + }; + + nmt.script = '' + assertFileContent home-files/.config/.vintrc.yaml ${ + ./basic-configuration.yaml + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.yaml b/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.yaml new file mode 100644 index 0000000000..1273b14e94 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/vim-vint/basic-configuration.yaml @@ -0,0 +1,16 @@ +cmdargs: + color: true + env: + neovim: true + severity: error +policies: + ProhibitAbbreviationOption: + enabled: false + ProhibitEqualTildeOperator: + enabled: false + ProhibitImplicitScopeVariable: + enabled: false + ProhibitSetNoCompatible: + enabled: false + ProhibitUsingUndeclaredVariable: + enabled: false diff --git a/third_party/home-manager/tests/modules/programs/vim-vint/default.nix b/third_party/home-manager/tests/modules/programs/vim-vint/default.nix new file mode 100644 index 0000000000..0066eaf8f1 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/vim-vint/default.nix @@ -0,0 +1 @@ +{ vim-vint-basic-configuration = ./basic-configuration.nix; } diff --git a/third_party/home-manager/tests/modules/programs/vscode/default.nix b/third_party/home-manager/tests/modules/programs/vscode/default.nix index 4015121d5a..a32768a925 100644 --- a/third_party/home-manager/tests/modules/programs/vscode/default.nix +++ b/third_party/home-manager/tests/modules/programs/vscode/default.nix @@ -2,4 +2,5 @@ vscode-keybindings = ./keybindings.nix; vscode-tasks = ./tasks.nix; vscode-update-checks = ./update-checks.nix; + vscode-snippets = ./snippets.nix; } diff --git a/third_party/home-manager/tests/modules/programs/vscode/keybindings.nix b/third_party/home-manager/tests/modules/programs/vscode/keybindings.nix index ed457a9ba0..64212e29a5 100644 --- a/third_party/home-manager/tests/modules/programs/vscode/keybindings.nix +++ b/third_party/home-manager/tests/modules/programs/vscode/keybindings.nix @@ -1,7 +1,5 @@ # Test that keybindings.json is created correctly. -{ config, lib, pkgs, ... }: - -with lib; +{ pkgs, ... }: let bindings = [ @@ -65,18 +63,16 @@ let ''; in { - config = { - programs.vscode = { - enable = true; - keybindings = bindings; - package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; - }; - - nmt.script = '' - assertFileExists "home-files/${keybindingsPath}" - assertFileContent "home-files/${keybindingsPath}" "${expectedKeybindings}" - - assertPathNotExists "home-files/${settingsPath}" - ''; + programs.vscode = { + enable = true; + keybindings = bindings; + package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; }; + + nmt.script = '' + assertFileExists "home-files/${keybindingsPath}" + assertFileContent "home-files/${keybindingsPath}" "${expectedKeybindings}" + + assertPathNotExists "home-files/${settingsPath}" + ''; } diff --git a/third_party/home-manager/tests/modules/programs/vscode/snippets.nix b/third_party/home-manager/tests/modules/programs/vscode/snippets.nix new file mode 100644 index 0000000000..a7ea44f76c --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/vscode/snippets.nix @@ -0,0 +1,71 @@ +{ pkgs, ... }: + +let + + snippetsDir = if pkgs.stdenv.hostPlatform.isDarwin then + "Library/Application Support/Code/User/snippets" + else + ".config/Code/User/snippets"; + + globalSnippetsPath = "${snippetsDir}/global.code-snippets"; + + globalSnippetsExpectedContent = pkgs.writeText "global.code-snippet" '' + { + "fixme": { + "body": [ + "fixme body in global user snippet" + ], + "description": "Insert a FIXME remark", + "prefix": [ + "fixme" + ] + } + } + ''; + + haskellSnippetsPath = "${snippetsDir}/haskell.json"; + + haskellSnippetsExpectedContent = pkgs.writeText "haskell.json" '' + { + "impl": { + "body": [ + "impl body in user haskell snippet" + ], + "description": "Insert an implementation stub", + "prefix": [ + "impl" + ] + } + } + ''; + +in { + programs.vscode = { + enable = true; + package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; + globalSnippets = { + fixme = { + prefix = [ "fixme" ]; + body = [ "fixme body in global user snippet" ]; + description = "Insert a FIXME remark"; + }; + }; + languageSnippets = { + haskell = { + impl = { + prefix = [ "impl" ]; + body = [ "impl body in user haskell snippet" ]; + description = "Insert an implementation stub"; + }; + }; + }; + }; + + nmt.script = '' + assertFileExists "home-files/${globalSnippetsPath}" + assertFileContent "home-files/${globalSnippetsPath}" "${globalSnippetsExpectedContent}" + + assertFileExists "home-files/${haskellSnippetsPath}" + assertFileContent "home-files/${haskellSnippetsPath}" "${haskellSnippetsExpectedContent}" + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/vscode/tasks.nix b/third_party/home-manager/tests/modules/programs/vscode/tasks.nix index f0d2838054..ea85b3d6c5 100644 --- a/third_party/home-manager/tests/modules/programs/vscode/tasks.nix +++ b/third_party/home-manager/tests/modules/programs/vscode/tasks.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, ... }: let diff --git a/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-default.nix b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-default.nix new file mode 100644 index 0000000000..84f34effbf --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-default.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + programs.bash.enable = true; + + # Bash integration is enabled by default. + programs.wezterm.enable = true; + + test.stubs.wezterm = { }; + + nmt.script = '' + assertFileContains home-files/.bashrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-disabled.nix b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-disabled.nix new file mode 100644 index 0000000000..43c5f5fd95 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-disabled.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + programs.bash.enable = true; + + programs.wezterm = { + enable = true; + enableBashIntegration = false; + }; + + test.stubs.wezterm = { }; + + nmt.script = '' + assertFileNotRegex home-files/.bashrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-enabled.nix new file mode 100644 index 0000000000..007bc0d1a4 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/bash-integration-enabled.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + programs.bash.enable = true; + + programs.wezterm = { + enable = true; + enableBashIntegration = true; + }; + + test.stubs.wezterm = { }; + + nmt.script = '' + assertFileContains home-files/.bashrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/default.nix b/third_party/home-manager/tests/modules/programs/wezterm/default.nix index 6a521c9c48..0ed73acb4b 100644 --- a/third_party/home-manager/tests/modules/programs/wezterm/default.nix +++ b/third_party/home-manager/tests/modules/programs/wezterm/default.nix @@ -1,4 +1,12 @@ { wezterm-example-setting = ./example-setting.nix; wezterm-empty-setting = ./empty-setting.nix; + + wezterm-bash-integration-default = ./bash-integration-default.nix; + wezterm-bash-integration-disabled = ./bash-integration-disabled.nix; + wezterm-bash-integration-enabled = ./bash-integration-enabled.nix; + + wezterm-zsh-integration-default = ./zsh-integration-default.nix; + wezterm-zsh-integration-disabled = ./zsh-integration-disabled.nix; + wezterm-zsh-integration-enabled = ./zsh-integration-enabled.nix; } diff --git a/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-default.nix b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-default.nix new file mode 100644 index 0000000000..cc398c9d92 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + programs.zsh.enable = true; + + # Zsh integration is enabled by default. + programs.wezterm.enable = true; + + test.stubs.wezterm = { }; + test.stubs.zsh = { }; + + nmt.script = '' + assertFileContains home-files/.zshrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-disabled.nix b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-disabled.nix new file mode 100644 index 0000000000..fe7375245d --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-disabled.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs.zsh.enable = true; + + programs.wezterm = { + enable = true; + enableZshIntegration = false; + }; + + test.stubs.wezterm = { }; + test.stubs.zsh = { }; + + nmt.script = '' + assertFileNotRegex home-files/.zshrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-enabled.nix b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-enabled.nix new file mode 100644 index 0000000000..4e0928709e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wezterm/zsh-integration-enabled.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + programs.zsh.enable = true; + + programs.wezterm = { + enable = true; + enableZshIntegration = true; + }; + + test.stubs.wezterm = { }; + test.stubs.zsh = { }; + + nmt.script = '' + assertFileContains home-files/.zshrc 'source "@wezterm@/etc/profile.d/wezterm.sh"' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/default.nix b/third_party/home-manager/tests/modules/programs/wlogout/default.nix new file mode 100644 index 0000000000..294772e749 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/default.nix @@ -0,0 +1,5 @@ +{ + wlogout-styling = ./styling.nix; + wlogout-layout-single = ./layout-single.nix; + wlogout-layout-multiple = ./layout-multiple.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple-expected.json b/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple-expected.json new file mode 100644 index 0000000000..9e69d4e930 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple-expected.json @@ -0,0 +1,6 @@ +{"action":"systemctl poweroff","keybind":"s","label":"shutdown","text":"Shutdown"} +{"action":"systemctl hibernate","height":0.5,"keybind":"h","label":"hibernate","text":"Hibernate","width":0.5} +{"action":"systemctl suspend","circular":true,"keybind":"u","label":"suspend","text":"Suspend"} +{"action":"swaymsg exit","keybind":"e","label":"exit","text":"Exit"} +{"action":"systemctl reboot","keybind":"r","label":"reboot","text":"Reboot"} +{"action":"gtklock","keybind":"l","label":"lock","text":"Lock"} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple.nix b/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple.nix new file mode 100644 index 0000000000..108961aaeb --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/layout-multiple.nix @@ -0,0 +1,62 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + home.stateVersion = "22.11"; + + programs.wlogout = { + package = config.lib.test.mkStubPackage { outPath = "@wlogout@"; }; + enable = true; + layout = [ + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + { + label = "hibernate"; + action = "systemctl hibernate"; + text = "Hibernate"; + keybind = "h"; + height = 0.5; + width = 0.5; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = "Suspend"; + keybind = "u"; + circular = true; + } + { + label = "exit"; + action = "swaymsg exit"; + text = "Exit"; + keybind = "e"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + keybind = "r"; + } + { + label = "lock"; + action = "gtklock"; + text = "Lock"; + keybind = "l"; + } + ]; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/wlogout/style.css + assertFileContent \ + home-files/.config/wlogout/layout \ + ${./layout-multiple-expected.json} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/layout-single-expected.json b/third_party/home-manager/tests/modules/programs/wlogout/layout-single-expected.json new file mode 100644 index 0000000000..d4d43dde38 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/layout-single-expected.json @@ -0,0 +1 @@ +{"action":"systemctl poweroff","keybind":"s","label":"shutdown","text":"Shutdown"} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/layout-single.nix b/third_party/home-manager/tests/modules/programs/wlogout/layout-single.nix new file mode 100644 index 0000000000..bbb5d61e66 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/layout-single.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + home.stateVersion = "22.11"; + + programs.wlogout = { + package = config.lib.test.mkStubPackage { outPath = "@wlogout@"; }; + enable = true; + layout = [{ + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + }]; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/wlogout/style.css + assertFileContent \ + home-files/.config/wlogout/layout \ + ${./layout-single-expected.json} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/styling-expected.css b/third_party/home-manager/tests/modules/programs/wlogout/styling-expected.css new file mode 100644 index 0000000000..49050beb41 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/styling-expected.css @@ -0,0 +1,16 @@ +* { + border: none; + border-radius: 0; + font-family: Source Code Pro; + font-weight: bold; + color: #abb2bf; + font-size: 18px; + min-height: 0px; +} +window { + background: #16191C; + color: #aab2bf; +} +#window { + padding: 0 0px; +} diff --git a/third_party/home-manager/tests/modules/programs/wlogout/styling.nix b/third_party/home-manager/tests/modules/programs/wlogout/styling.nix new file mode 100644 index 0000000000..6df6290fd6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wlogout/styling.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + home.stateVersion = "22.11"; + + programs.wlogout = { + package = config.lib.test.mkStubPackage { outPath = "@wlogout@"; }; + enable = true; + style = '' + * { + border: none; + border-radius: 0; + font-family: Source Code Pro; + font-weight: bold; + color: #abb2bf; + font-size: 18px; + min-height: 0px; + } + window { + background: #16191C; + color: #aab2bf; + } + #window { + padding: 0 0px; + } + ''; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/wlogout/layout + assertFileContent \ + home-files/.config/wlogout/style.css \ + ${./styling-expected.css} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.conf b/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.conf new file mode 100644 index 0000000000..0d0a79d0b0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.conf @@ -0,0 +1,6 @@ +# Generated by Home Manager. +drun-print_command=true +insensitive=true +show=drun +xoffset=50 +yoffset=200 diff --git a/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.nix b/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.nix new file mode 100644 index 0000000000..afcb69c77e --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wofi/basic-configuration.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: + +{ + config = { + programs.wofi = { + enable = true; + package = pkgs.writeScriptBin "dummy-wofi" ""; + style = '' + * { + font-family: monospace; + } + window { + background-color: #7c818c; + } + ''; + settings = { + drun-print_command = true; + insensitive = true; + show = "drun"; + xoffset = 50; + yoffset = 200; + }; + }; + + nmt.script = '' + assertFileExists home-files/.config/wofi/config + assertFileContent home-files/.config/wofi/config \ + ${./basic-configuration.conf} + + assertFileExists home-files/.config/wofi/style.css + assertFileContent home-files/.config/wofi/style.css \ + ${./basic-style.css} + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/wofi/basic-style.css b/third_party/home-manager/tests/modules/programs/wofi/basic-style.css new file mode 100644 index 0000000000..734e537aa0 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wofi/basic-style.css @@ -0,0 +1,6 @@ +* { + font-family: monospace; +} +window { + background-color: #7c818c; +} diff --git a/third_party/home-manager/tests/modules/programs/wofi/default.nix b/third_party/home-manager/tests/modules/programs/wofi/default.nix new file mode 100644 index 0000000000..f06667b0f6 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wofi/default.nix @@ -0,0 +1,4 @@ +{ + wofi-basic-configuration = ./basic-configuration.nix; + wofi-empty-configuration = ./empty-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/wofi/empty-configuration.nix b/third_party/home-manager/tests/modules/programs/wofi/empty-configuration.nix new file mode 100644 index 0000000000..b3e4a4f6c9 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/wofi/empty-configuration.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + config = { + programs.wofi = { + enable = true; + package = pkgs.writeScriptBin "dummy-wofi" ""; + }; + + nmt.script = '' + assertPathNotExists home-files/.config/wofi/config + assertPathNotExists home-files/.config/wofi/style.css + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/programs/yt-dlp/default.nix b/third_party/home-manager/tests/modules/programs/yt-dlp/default.nix index 4b09a9c5a6..74a664edc2 100644 --- a/third_party/home-manager/tests/modules/programs/yt-dlp/default.nix +++ b/third_party/home-manager/tests/modules/programs/yt-dlp/default.nix @@ -1 +1,4 @@ -{ yt-dlp-simple-config = ./yt-dlp-simple-config.nix; } +{ + yt-dlp-simple-config = ./yt-dlp-simple-config.nix; + yt-dlp-extraConfig = ./yt-dlp-extraConfig.nix; +} diff --git a/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig-expected b/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig-expected new file mode 100644 index 0000000000..3396067788 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig-expected @@ -0,0 +1,2 @@ +--config-locations /home/user/.yt-dlp.conf + diff --git a/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig.nix b/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig.nix new file mode 100644 index 0000000000..c28d44e579 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/yt-dlp/yt-dlp-extraConfig.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + programs.yt-dlp = { + enable = true; + extraConfig = '' + --config-locations /home/user/.yt-dlp.conf + ''; + }; + + test.stubs.yt-dlp = { }; + + nmt.script = '' + assertFileExists home-files/.config/yt-dlp/config + assertFileContent home-files/.config/yt-dlp/config ${ + ./yt-dlp-extraConfig-expected + } + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/zellij/default.nix b/third_party/home-manager/tests/modules/programs/zellij/default.nix new file mode 100644 index 0000000000..f4b5213866 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zellij/default.nix @@ -0,0 +1 @@ +{ zellij-enable-shells = ./enable-shells.nix; } 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 new file mode 100644 index 0000000000..b8f8009399 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zellij/enable-shells.nix @@ -0,0 +1,41 @@ +{ lib, ... }: + +{ + programs = { + zellij = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + }; + bash.enable = true; + zsh.enable = true; + fish.enable = true; + }; + + # Needed to avoid error with dummy fish package. + xdg.dataFile."fish/home-manager_generated_completions".source = + lib.mkForce (builtins.toFile "empty" ""); + + test.stubs = { + zsh = { }; + zellij = { }; + }; + + nmt.script = '' + assertFileExists home-files/.bashrc + assertFileContains \ + home-files/.bashrc \ + 'eval "$(zellij setup --generate-auto-start bash)"' + + assertFileExists home-files/.zshrc + assertFileContains \ + home-files/.zshrc \ + 'eval "$(zellij 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)' + ''; +} diff --git a/third_party/home-manager/tests/modules/programs/zplug/modules.nix b/third_party/home-manager/tests/modules/programs/zplug/modules.nix index 9f4d4332a5..1256e33c20 100644 --- a/third_party/home-manager/tests/modules/programs/zplug/modules.nix +++ b/third_party/home-manager/tests/modules/programs/zplug/modules.nix @@ -1,52 +1,48 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ config, pkgs, ... }: { - config = { - programs.zsh = { + programs.zsh = { + enable = true; + zplug = { enable = true; - zplug = { - enable = true; - zplugHome = pkgs.emptyDirectory; - plugins = [ - { - name = "plugins/git"; - tags = [ "from:oh-my-zsh" ]; - } - { - name = "lib/clipboard"; - tags = [ "from:oh-my-zsh" ''if:"[[ $OSTYPE == *darwin* ]]"'' ]; - } - ]; - }; + zplugHome = pkgs.emptyDirectory; + plugins = [ + { + name = "plugins/git"; + tags = [ "from:oh-my-zsh" ]; + } + { + name = "lib/clipboard"; + tags = [ "from:oh-my-zsh" ''if:"[[ $OSTYPE == *darwin* ]]"'' ]; + } + ]; }; - - test.stubs = { - zplug = { }; - zsh = { }; - }; - - nmt.script = '' - assertFileContains home-files/.zshrc \ - 'source @zplug@/init.zsh' - - assertFileContains home-files/.zshrc \ - 'zplug "plugins/git", from:oh-my-zsh' - - assertFileContains home-files/.zshrc \ - 'zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"' - - assertFileContains home-files/.zshrc \ - 'if ! zplug check; then - zplug install - fi' - - assertFileRegex home-files/.zshrc \ - '^zplug load$' - - assertFileContains home-files/.zshrc \ - 'export ZPLUG_HOME=${config.programs.zsh.zplug.zplugHome}' - ''; }; + + test.stubs = { + zplug = { }; + zsh = { }; + }; + + nmt.script = '' + assertFileContains home-files/.zshrc \ + 'source @zplug@/share/zplug/init.zsh' + + assertFileContains home-files/.zshrc \ + 'zplug "plugins/git", from:oh-my-zsh' + + assertFileContains home-files/.zshrc \ + 'zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"' + + assertFileContains home-files/.zshrc \ + 'if ! zplug check; then + zplug install + fi' + + assertFileRegex home-files/.zshrc \ + '^zplug load$' + + assertFileContains home-files/.zshrc \ + 'export ZPLUG_HOME=${config.programs.zsh.zplug.zplugHome}' + ''; } diff --git a/third_party/home-manager/tests/modules/programs/zsh/default.nix b/third_party/home-manager/tests/modules/programs/zsh/default.nix index 81e0d2d415..fcfb642ffc 100644 --- a/third_party/home-manager/tests/modules/programs/zsh/default.nix +++ b/third_party/home-manager/tests/modules/programs/zsh/default.nix @@ -5,5 +5,7 @@ zsh-history-path-old-default = ./history-path-old-default.nix; zsh-history-path-old-custom = ./history-path-old-custom.nix; zsh-history-ignore-pattern = ./history-ignore-pattern.nix; + zsh-history-substring-search = ./history-substring-search.nix; zsh-prezto = ./prezto.nix; + zsh-syntax-highlighting = ./syntax-highlighting.nix; } diff --git a/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix b/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix new file mode 100644 index 0000000000..4e9054d931 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zsh/history-substring-search.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.zsh = { + enable = true; + historySubstringSearch = { + enable = true; + searchDownKey = "^[[B"; + searchUpKey = [ "^[[A" "\\eOA" ]; + }; + }; + + test.stubs.zsh = { }; + + # Written with regex to ensure we don't end up missing newlines in the future + nmt.script = '' + assertFileRegex home-files/.zshrc "^bindkey '\^\[\[B' history-substring-search-down$" + assertFileRegex home-files/.zshrc "^bindkey '\^\[\[A' history-substring-search-up$" + assertFileRegex home-files/.zshrc "^bindkey '\\\\eOA' history-substring-search-up$" + ''; + }; +} 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 new file mode 100644 index 0000000000..73297c8c16 --- /dev/null +++ b/third_party/home-manager/tests/modules/programs/zsh/syntax-highlighting.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.zsh = { + enable = true; + syntaxHighlighting = { + enable = true; + package = pkgs.hello; + styles.comment = "fg=#6c6c6c"; + }; + }; + + test.stubs.zsh = { }; + + nmt.script = '' + assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=('comment' 'fg=#6c6c6c')" + ''; + }; +} diff --git a/third_party/home-manager/tests/modules/services/avizo/default.nix b/third_party/home-manager/tests/modules/services/avizo/default.nix new file mode 100644 index 0000000000..598f1cc519 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/avizo/default.nix @@ -0,0 +1,4 @@ +{ + avizo-with-settings = ./with-settings.nix; + avizo-without-settings = ./without-settings.nix; +} diff --git a/third_party/home-manager/tests/modules/services/avizo/with-settings.nix b/third_party/home-manager/tests/modules/services/avizo/with-settings.nix new file mode 100644 index 0000000000..4c54f261d9 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/avizo/with-settings.nix @@ -0,0 +1,54 @@ +{ ... }: + +{ + services.avizo = { + enable = true; + settings = { + default = { + time = 1.0; + y-offset = 0.5; + fade-in = 0.1; + fade-out = 0.2; + padding = 10; + }; + }; + }; + + test.stubs.avizo = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/avizo.service + assertFileExists $serviceFile + assertFileContent $serviceFile ${ + builtins.toFile "expected" '' + [Install] + WantedBy=graphical-session.target + + [Service] + ExecStart=@avizo@/bin/avizo-service + Restart=always + Type=simple + + [Unit] + After=graphical-session.target + ConditionEnvironment=WAYLAND_DISPLAY + Description=Volume/backlight OSD indicator + Documentation=man:avizo(1) + PartOf=graphical-session.target + '' + } + + configFile=home-files/.config/avizo/config.ini + assertFileExists $configFile + assertFileContent $configFile ${ + builtins.toFile "expected" '' + [default] + fade-in=0.100000 + fade-out=0.200000 + padding=10 + time=1.000000 + y-offset=0.500000 + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/services/avizo/without-settings.nix b/third_party/home-manager/tests/modules/services/avizo/without-settings.nix new file mode 100644 index 0000000000..49a9606142 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/avizo/without-settings.nix @@ -0,0 +1,33 @@ +{ ... }: + +{ + services.avizo.enable = true; + + test.stubs.avizo = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/avizo.service + assertFileExists $serviceFile + assertFileContent $serviceFile ${ + builtins.toFile "expected" '' + [Install] + WantedBy=graphical-session.target + + [Service] + ExecStart=@avizo@/bin/avizo-service + Restart=always + Type=simple + + [Unit] + After=graphical-session.target + ConditionEnvironment=WAYLAND_DISPLAY + Description=Volume/backlight OSD indicator + Documentation=man:avizo(1) + PartOf=graphical-session.target + '' + } + + configFile=home-files/.config/avizo/config.ini + assertPathNotExists $configFile + ''; +} diff --git a/third_party/home-manager/tests/modules/services/barrier/basic-configuration.nix b/third_party/home-manager/tests/modules/services/barrier/basic-configuration.nix index d083428566..e7e393184e 100644 --- a/third_party/home-manager/tests/modules/services/barrier/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/barrier/basic-configuration.nix @@ -1,19 +1,17 @@ -{ config, pkgs, ... }: +{ ... }: { - config = { - services.barrier.client = { - enable = true; - server = "testServer"; - }; - - test.stubs.barrier = { }; - - nmt.script = '' - clientServiceFile=home-files/.config/systemd/user/barrierc.service - - assertFileExists $clientServiceFile - assertFileRegex $clientServiceFile 'ExecStart=.*/bin/barrierc -f testServer' - ''; + services.barrier.client = { + enable = true; + server = "testServer"; }; + + test.stubs.barrier = { }; + + nmt.script = '' + clientServiceFile=home-files/.config/systemd/user/barrierc.service + + assertFileExists $clientServiceFile + assertFileRegex $clientServiceFile 'ExecStart=.*/bin/barrierc -f testServer' + ''; } diff --git a/third_party/home-manager/tests/modules/services/borgmatic/basic-configuration.service b/third_party/home-manager/tests/modules/services/borgmatic/basic-configuration.service index 4840f11bc9..80713fd905 100644 --- a/third_party/home-manager/tests/modules/services/borgmatic/basic-configuration.service +++ b/third_party/home-manager/tests/modules/services/borgmatic/basic-configuration.service @@ -2,6 +2,7 @@ CPUSchedulingPolicy=batch ExecStart=/nix/store/00000000000000000000000000000000-systemd/bin/systemd-inhibit \ --who="borgmatic" \ + --what="sleep:shutdown" \ --why="Prevent interrupting scheduled backup" \ @borgmatic@/bin/borgmatic \ --stats \ diff --git a/third_party/home-manager/tests/modules/services/comodoro/comodoro.nix b/third_party/home-manager/tests/modules/services/comodoro/comodoro.nix new file mode 100644 index 0000000000..35974ecd72 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/comodoro/comodoro.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + services.comodoro = { + enable = true; + preset = "preset"; + protocols = [ "tcp" ]; + }; + + test.stubs.comodoro = { }; + + nmt.script = '' + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/comodoro.service) + assertFileContent "$serviceFile" ${./expected.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/comodoro/default.nix b/third_party/home-manager/tests/modules/services/comodoro/default.nix new file mode 100644 index 0000000000..84281f3a49 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/comodoro/default.nix @@ -0,0 +1 @@ +{ comodoro-service = ./comodoro.nix; } diff --git a/third_party/home-manager/tests/modules/services/comodoro/expected.service b/third_party/home-manager/tests/modules/services/comodoro/expected.service new file mode 100644 index 0000000000..346619d52d --- /dev/null +++ b/third_party/home-manager/tests/modules/services/comodoro/expected.service @@ -0,0 +1,12 @@ +[Install] +WantedBy=default.target + +[Service] +ExecSearchPath=/bin +ExecStart=@comodoro@/bin/comodoro server start preset tcp +Restart=always +RestartSec=10 + +[Unit] +After=network.target +Description=Comodoro server diff --git a/third_party/home-manager/tests/modules/services/devilspie2/configuration.nix b/third_party/home-manager/tests/modules/services/devilspie2/configuration.nix index 2072d4d844..14bdc6f0cc 100644 --- a/third_party/home-manager/tests/modules/services/devilspie2/configuration.nix +++ b/third_party/home-manager/tests/modules/services/devilspie2/configuration.nix @@ -1,37 +1,37 @@ -{ config, pkgs, ... }: { - config = { - services.devilspie2 = { - enable = true; +{ ... }: - config = '' - if (get_window_class() == "Gnome-terminal") then - make_always_on_top(); - end +{ + services.devilspie2 = { + enable = true; - if string.match(get_window_name(), "LibreOffice Writer") then - maximize(); - end + config = '' + if (get_window_class() == "Gnome-terminal") then + make_always_on_top(); + end - if (get_window_class()=="Org.gnome.Nautilus") then - set_window_geometry(1600,300,900,700); - end - ''; - }; + if string.match(get_window_name(), "LibreOffice Writer") then + maximize(); + end - test.stubs.devilspie2 = { }; - - nmt.script = '' - configlua=home-files/.config/devilspie2/config.lua - - assertFileExists $configlua - - assertFileContent $configlua ${./config.lua} - - serviceFile=home-files/.config/systemd/user/devilspie2.service - - assertFileExists $serviceFile - - assertFileRegex $serviceFile 'ExecStart=.*/bin/devilspie2' + if (get_window_class()=="Org.gnome.Nautilus") then + set_window_geometry(1600,300,900,700); + end ''; }; + + test.stubs.devilspie2 = { }; + + nmt.script = '' + configlua=home-files/.config/devilspie2/config.lua + + assertFileExists $configlua + + assertFileContent $configlua ${./config.lua} + + serviceFile=home-files/.config/systemd/user/devilspie2.service + + assertFileExists $serviceFile + + assertFileRegex $serviceFile 'ExecStart=.*/bin/devilspie2' + ''; } diff --git a/third_party/home-manager/tests/modules/services/emacs/default.nix b/third_party/home-manager/tests/modules/services/emacs/default.nix index cbbd6f6aa7..f3647efd65 100644 --- a/third_party/home-manager/tests/modules/services/emacs/default.nix +++ b/third_party/home-manager/tests/modules/services/emacs/default.nix @@ -1,6 +1,8 @@ { emacs-service-27 = ./emacs-service-27.nix; emacs-service-28 = ./emacs-service-28.nix; + emacs-service-28-after-graphical-session-target = + ./emacs-service-28-after-graphical-session-target.nix; emacs-socket-27 = ./emacs-socket-27.nix; emacs-socket-28 = ./emacs-socket-28.nix; emacs-default-editor = ./emacs-default-editor.nix; diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-default-editor.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-default-editor.nix index 77897a5b12..de91846c9a 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-default-editor.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-default-editor.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ pkgs, ... }: { nixpkgs.overlays = [ diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-service-27.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-service-27.nix index 6bc99ced46..76c33a5e0c 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-service-27.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-service-27.nix @@ -1,38 +1,37 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ lib, pkgs, ... }: { - config = { - nixpkgs.overlays = [ - (self: super: rec { - emacs = pkgs.writeShellScriptBin "dummy-emacs-27.2" "" // { - outPath = "@emacs@"; - }; - emacsPackagesFor = _: - makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); - }) - ]; + nixpkgs.overlays = [ + (self: super: rec { + emacs = pkgs.writeShellScriptBin "dummy-emacs-27.2" "" // { + outPath = "@emacs@"; + }; + emacsPackagesFor = _: + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + }) + ]; - programs.emacs.enable = true; - services.emacs.enable = true; - services.emacs.client.enable = true; - services.emacs.extraOptions = [ "-f" "exwm-enable" ]; + programs.emacs.enable = true; + services.emacs.enable = true; + services.emacs.client.enable = true; + services.emacs.extraOptions = [ "-f" "exwm-enable" ]; - nmt.script = '' - assertPathNotExists home-files/.config/systemd/user/emacs.socket - assertFileExists home-files/.config/systemd/user/emacs.service - assertFileExists home-path/share/applications/emacsclient.desktop + nmt.script = '' + assertPathNotExists home-files/.config/systemd/user/emacs.socket + assertFileExists home-files/.config/systemd/user/emacs.service + assertFileExists home-path/share/applications/emacsclient.desktop - assertFileContent home-files/.config/systemd/user/emacs.service \ - ${ - pkgs.substituteAll { - inherit (pkgs) runtimeShell; - src = ./emacs-service-emacs.service; - } - } - assertFileContent home-path/share/applications/emacsclient.desktop \ - ${./emacs-27-emacsclient.desktop} - ''; - }; + assertFileContent \ + home-files/.config/systemd/user/emacs.service \ + ${ + pkgs.substituteAll { + inherit (pkgs) runtimeShell; + src = ./emacs-service-emacs.service; + } + } + + assertFileContent \ + home-path/share/applications/emacsclient.desktop \ + ${./emacs-27-emacsclient.desktop} + ''; } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-service-28-after-graphical-session-target.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-service-28-after-graphical-session-target.nix new file mode 100644 index 0000000000..edd232e448 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-service-28-after-graphical-session-target.nix @@ -0,0 +1,38 @@ +{ lib, pkgs, ... }: + +{ + nixpkgs.overlays = [ + (self: super: rec { + emacs = pkgs.writeShellScriptBin "dummy-emacs-28.2" "" // { + outPath = "@emacs@"; + }; + emacsPackagesFor = _: + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + }) + ]; + + programs.emacs.enable = true; + services.emacs.enable = true; + services.emacs.client.enable = true; + services.emacs.extraOptions = [ "-f" "exwm-enable" ]; + services.emacs.startWithUserSession = "graphical"; + + nmt.script = '' + assertPathNotExists home-files/.config/systemd/user/emacs.socket + assertFileExists home-files/.config/systemd/user/emacs.service + assertFileExists home-path/share/applications/emacsclient.desktop + + assertFileContent \ + home-files/.config/systemd/user/emacs.service \ + ${ + pkgs.substituteAll { + inherit (pkgs) runtimeShell; + src = ./emacs-service-emacs-after-graphical-session-target.service; + } + } + + assertFileContent \ + home-path/share/applications/emacsclient.desktop \ + ${./emacs-28-emacsclient.desktop} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-service-28.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-service-28.nix index febfe8288f..a5d9c87c21 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-service-28.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-service-28.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ lib, pkgs, ... }: { config = { @@ -10,7 +8,7 @@ with lib; outPath = "@emacs@"; }; emacsPackagesFor = _: - makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); }) ]; @@ -24,15 +22,18 @@ with lib; assertFileExists home-files/.config/systemd/user/emacs.service assertFileExists home-path/share/applications/emacsclient.desktop - assertFileContent home-files/.config/systemd/user/emacs.service \ - ${ - pkgs.substituteAll { - inherit (pkgs) runtimeShell; - src = ./emacs-service-emacs.service; - } - } - assertFileContent home-path/share/applications/emacsclient.desktop \ - ${./emacs-28-emacsclient.desktop} + assertFileContent \ + home-files/.config/systemd/user/emacs.service \ + ${ + pkgs.substituteAll { + inherit (pkgs) runtimeShell; + src = ./emacs-service-emacs.service; + } + } + + assertFileContent \ + home-path/share/applications/emacsclient.desktop \ + ${./emacs-28-emacsclient.desktop} ''; }; } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-service-emacs-after-graphical-session-target.service b/third_party/home-manager/tests/modules/services/emacs/emacs-service-emacs-after-graphical-session-target.service new file mode 100644 index 0000000000..1933276211 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-service-emacs-after-graphical-session-target.service @@ -0,0 +1,15 @@ +[Install] +WantedBy=graphical-session.target + +[Service] +ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon '-f' 'exwm-enable'" +Restart=on-failure +SuccessExitStatus=15 +Type=notify + +[Unit] +After=graphical-session.target +Description=Emacs text editor +Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ +PartOf=graphical-session.target +X-RestartIfChanged=false diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix index b3b71e0273..c7282bdb8f 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-27.nix @@ -1,10 +1,6 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: -with lib; - -let - -in { +{ config = { nixpkgs.overlays = [ (self: super: rec { @@ -12,7 +8,7 @@ in { outPath = "@emacs@"; }; emacsPackagesFor = _: - makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); }) ]; @@ -27,17 +23,22 @@ in { assertFileExists home-files/.config/systemd/user/emacs.service assertFileExists home-path/share/applications/emacsclient.desktop - assertFileContent home-files/.config/systemd/user/emacs.socket \ - ${./emacs-socket-emacs.socket} - assertFileContent home-files/.config/systemd/user/emacs.service \ - ${ - pkgs.substituteAll { - inherit (pkgs) runtimeShell coreutils; - src = ./emacs-socket-emacs.service; - } - } - assertFileContent home-path/share/applications/emacsclient.desktop \ - ${./emacs-27-emacsclient.desktop} + assertFileContent \ + home-files/.config/systemd/user/emacs.socket \ + ${./emacs-socket-emacs.socket} + + assertFileContent \ + home-files/.config/systemd/user/emacs.service \ + ${ + pkgs.substituteAll { + inherit (pkgs) runtimeShell coreutils; + src = ./emacs-socket-emacs.service; + } + } + + assertFileContent \ + home-path/share/applications/emacsclient.desktop \ + ${./emacs-27-emacsclient.desktop} ''; }; } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix index 9110666568..c822f535e7 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-28.nix @@ -1,10 +1,6 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: -with lib; - -let - -in { +{ config = { nixpkgs.overlays = [ (self: super: rec { @@ -12,7 +8,7 @@ in { outPath = "@emacs@"; }; emacsPackagesFor = _: - makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); }) ]; @@ -27,17 +23,22 @@ in { assertFileExists home-files/.config/systemd/user/emacs.service assertFileExists home-path/share/applications/emacsclient.desktop - assertFileContent home-files/.config/systemd/user/emacs.socket \ - ${./emacs-socket-emacs.socket} - assertFileContent home-files/.config/systemd/user/emacs.service \ - ${ - pkgs.substituteAll { - inherit (pkgs) runtimeShell coreutils; - src = ./emacs-socket-emacs.service; - } - } - assertFileContent home-path/share/applications/emacsclient.desktop \ - ${./emacs-28-emacsclient.desktop} + assertFileContent \ + home-files/.config/systemd/user/emacs.socket \ + ${./emacs-socket-emacs.socket} + + assertFileContent \ + home-files/.config/systemd/user/emacs.service \ + ${ + pkgs.substituteAll { + inherit (pkgs) runtimeShell coreutils; + src = ./emacs-socket-emacs.service; + } + } + + assertFileContent \ + home-path/share/applications/emacsclient.desktop \ + ${./emacs-28-emacsclient.desktop} ''; }; } diff --git a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-and-startWithUserSession.nix b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-and-startWithUserSession.nix index 5f47089ef8..1f6d567386 100644 --- a/third_party/home-manager/tests/modules/services/emacs/emacs-socket-and-startWithUserSession.nix +++ b/third_party/home-manager/tests/modules/services/emacs/emacs-socket-and-startWithUserSession.nix @@ -1,7 +1,5 @@ { lib, pkgs, ... }: -with lib; - { services.emacs = { enable = true; @@ -15,7 +13,7 @@ with lib; outPath = "@emacs@"; }; emacsPackagesFor = _: - makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); + lib.makeScope super.newScope (_: { emacsWithPackages = _: emacs; }); }) ]; diff --git a/third_party/home-manager/tests/modules/services/espanso/basic-configuration.nix b/third_party/home-manager/tests/modules/services/espanso/basic-configuration.nix index 34c6d533b8..6d04c53d23 100644 --- a/third_party/home-manager/tests/modules/services/espanso/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/espanso/basic-configuration.nix @@ -3,31 +3,38 @@ { services.espanso = { enable = true; - settings = { - matches = [ - { # Simple text replacement - trigger = ":espanso"; - replace = "Hi there!"; - } - { # Dates - trigger = ":date"; - replace = "{{mydate}}"; - vars = [{ - name = "mydate"; + 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 = "%m/%d/%Y"; }; - }]; - } - { # Shell commands - trigger = ":shell"; - replace = "{{output}}"; - vars = [{ - name = "output"; - type = "shell"; - params = { cmd = "echo Hello from your shell"; }; - }]; - } - ]; + params = { format = "%d/%m/%Y"; }; + } + { + name = "currenttime"; + type = "date"; + params = { format = "%R"; }; + } + ]; + }; }; }; @@ -38,8 +45,12 @@ assertFileExists "$serviceFile" assertFileContent "$serviceFile" ${./basic-configuration.service} - configFile=home-files/.config/espanso/default.yml + configFile=home-files/.config/espanso/config/default.yml assertFileExists "$configFile" assertFileContent "$configFile" ${./basic-configuration.yaml} + + matchFile=home-files/.config/espanso/match/base.yml + assertFileExists "$matchFile" + assertFileContent "$matchFile" ${./basic-matches.yaml} ''; } diff --git a/third_party/home-manager/tests/modules/services/espanso/basic-configuration.yaml b/third_party/home-manager/tests/modules/services/espanso/basic-configuration.yaml index 3789df04b0..9dc9aa99de 100644 --- a/third_party/home-manager/tests/modules/services/espanso/basic-configuration.yaml +++ b/third_party/home-manager/tests/modules/services/espanso/basic-configuration.yaml @@ -1,17 +1 @@ -matches: -- replace: Hi there! - trigger: :espanso -- replace: '{{mydate}}' - trigger: :date - vars: - - name: mydate - params: - format: '%m/%d/%Y' - type: date -- replace: '{{output}}' - trigger: :shell - vars: - - name: output - params: - cmd: echo Hello from your shell - type: shell +show_notifications: false diff --git a/third_party/home-manager/tests/modules/services/espanso/basic-matches.yaml b/third_party/home-manager/tests/modules/services/espanso/basic-matches.yaml new file mode 100644 index 0000000000..3cf98c9893 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/espanso/basic-matches.yaml @@ -0,0 +1,18 @@ +global_vars: +- name: currentdate + params: + format: '%d/%m/%Y' + type: date +- name: currenttime + params: + format: '%R' + type: date +matches: +- replace: It's {{currentdate}} {{currenttime}} + trigger: :now +- replace: 'line1 + + line2' + trigger: :hello +- regex: :hi(?P.*)\. + replace: Hi {{person}}! diff --git a/third_party/home-manager/tests/modules/services/flameshot/empty-settings.nix b/third_party/home-manager/tests/modules/services/flameshot/empty-settings.nix index a5205660b3..2c700c49d2 100644 --- a/third_party/home-manager/tests/modules/services/flameshot/empty-settings.nix +++ b/third_party/home-manager/tests/modules/services/flameshot/empty-settings.nix @@ -1,13 +1,11 @@ { ... }: { - config = { - services.flameshot = { enable = true; }; + services.flameshot = { enable = true; }; - test.stubs.flameshot = { }; + test.stubs.flameshot = { }; - nmt.script = '' - assertPathNotExists home-files/.config/flameshot/flameshot.ini - ''; - }; + nmt.script = '' + assertPathNotExists home-files/.config/flameshot/flameshot.ini + ''; } diff --git a/third_party/home-manager/tests/modules/services/flameshot/example-settings.nix b/third_party/home-manager/tests/modules/services/flameshot/example-settings.nix index 213e86b341..d61b93e938 100644 --- a/third_party/home-manager/tests/modules/services/flameshot/example-settings.nix +++ b/third_party/home-manager/tests/modules/services/flameshot/example-settings.nix @@ -1,30 +1,28 @@ { ... }: { - config = { - services.flameshot = { - enable = true; + services.flameshot = { + enable = true; - settings = { - General = { - disabledTrayIcon = true; - showStartupLaunchMessage = false; - }; + settings = { + General = { + disabledTrayIcon = true; + showStartupLaunchMessage = false; }; }; - - test.stubs.flameshot = { }; - - nmt.script = '' - assertFileContent \ - home-files/.config/flameshot/flameshot.ini \ - ${ - builtins.toFile "expected.ini" '' - [General] - disabledTrayIcon=true - showStartupLaunchMessage=false - '' - } - ''; }; + + test.stubs.flameshot = { }; + + nmt.script = '' + assertFileContent \ + home-files/.config/flameshot/flameshot.ini \ + ${ + builtins.toFile "expected.ini" '' + [General] + disabledTrayIcon=true + showStartupLaunchMessage=false + '' + } + ''; } diff --git a/third_party/home-manager/tests/modules/services/fluidsynth/service.nix b/third_party/home-manager/tests/modules/services/fluidsynth/service.nix index 7fbfa79ce9..ce0427b83f 100644 --- a/third_party/home-manager/tests/modules/services/fluidsynth/service.nix +++ b/third_party/home-manager/tests/modules/services/fluidsynth/service.nix @@ -1,25 +1,25 @@ -{ config, pkgs, ... }: { - config = { - services.fluidsynth.enable = true; - services.fluidsynth.soundService = "pipewire-pulse"; - services.fluidsynth.soundFont = "/path/to/soundFont"; - services.fluidsynth.extraOptions = [ "--sample-rate 96000" ]; +{ ... }: - test.stubs.fluidsynth = { }; +{ + services.fluidsynth.enable = true; + services.fluidsynth.soundService = "pipewire-pulse"; + services.fluidsynth.soundFont = "/path/to/soundFont"; + services.fluidsynth.extraOptions = [ "--sample-rate 96000" ]; - nmt.script = '' - serviceFile=home-files/.config/systemd/user/fluidsynth.service + test.stubs.fluidsynth = { }; - assertFileExists $serviceFile + nmt.script = '' + serviceFile=home-files/.config/systemd/user/fluidsynth.service - assertFileContains $serviceFile \ - 'ExecStart=@fluidsynth@/bin/fluidsynth -a pulseaudio -si --sample-rate 96000 /path/to/soundFont' + assertFileExists $serviceFile - assertFileContains $serviceFile \ - 'After=pipewire-pulse.service' + assertFileContains $serviceFile \ + 'ExecStart=@fluidsynth@/bin/fluidsynth -a pulseaudio -si --sample-rate 96000 /path/to/soundFont' - assertFileContains $serviceFile \ - 'BindsTo=pipewire-pulse.service' - ''; - }; + assertFileContains $serviceFile \ + 'After=pipewire-pulse.service' + + assertFileContains $serviceFile \ + 'BindsTo=pipewire-pulse.service' + ''; } diff --git a/third_party/home-manager/tests/modules/services/fnott/systemd-user-dbus-service-expected.service b/third_party/home-manager/tests/modules/services/fnott/systemd-user-dbus-service-expected.service new file mode 100644 index 0000000000..4abb28a704 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/fnott/systemd-user-dbus-service-expected.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=org.freedesktop.Notifications +Exec=@fnott@/bin/fnott +SystemdService=fnott.service diff --git a/third_party/home-manager/tests/modules/services/fnott/systemd-user-service.nix b/third_party/home-manager/tests/modules/services/fnott/systemd-user-service.nix index 7efa06435a..ebb6bf0044 100644 --- a/third_party/home-manager/tests/modules/services/fnott/systemd-user-service.nix +++ b/third_party/home-manager/tests/modules/services/fnott/systemd-user-service.nix @@ -11,6 +11,10 @@ assertFileContent \ home-files/.config/systemd/user/fnott.service \ ${./systemd-user-service-expected.service} + + assertFileContent \ + home-files/.local/share/dbus-1/services/fnott.service \ + ${./systemd-user-dbus-service-expected.service} ''; }; } diff --git a/third_party/home-manager/tests/modules/services/git-sync-darwin/basic.nix b/third_party/home-manager/tests/modules/services/git-sync-darwin/basic.nix new file mode 100644 index 0000000000..a50c1e0413 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/git-sync-darwin/basic.nix @@ -0,0 +1,18 @@ +{ config, ... }: + +{ + services.git-sync = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@git-sync@"; }; + repositories.test = { + path = "/a/path"; + uri = "git+ssh://user@example.com:/~user/path/to/repo.git"; + }; + }; + + nmt.script = '' + serviceFile=LaunchAgents/org.nix-community.home.git-sync-test.plist + assertFileExists "$serviceFile" + assertFileContent "$serviceFile" ${./expected-agent.plist} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/git-sync-darwin/default.nix b/third_party/home-manager/tests/modules/services/git-sync-darwin/default.nix new file mode 100644 index 0000000000..0e9db79d0a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/git-sync-darwin/default.nix @@ -0,0 +1 @@ +{ git-sync = ./basic.nix; } diff --git a/third_party/home-manager/tests/modules/services/git-sync-darwin/expected-agent.plist b/third_party/home-manager/tests/modules/services/git-sync-darwin/expected-agent.plist new file mode 100644 index 0000000000..2699a99651 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/git-sync-darwin/expected-agent.plist @@ -0,0 +1,22 @@ + + + + + Label + org.nix-community.home.git-sync-test + ProcessType + Background + ProgramArguments + + @git-sync@/bin/git-sync + + StartInterval + 500 + WatchPaths + + /a/path + + WorkingDirectory + /a/path + + \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/git-sync/basic.nix b/third_party/home-manager/tests/modules/services/git-sync/basic.nix index 039044bfe6..a82e9a4b1b 100644 --- a/third_party/home-manager/tests/modules/services/git-sync/basic.nix +++ b/third_party/home-manager/tests/modules/services/git-sync/basic.nix @@ -10,10 +10,7 @@ }; }; - test.stubs = { - git = { name = "git"; }; - openssh = { name = "openssh"; }; - }; + test.stubs.openssh = { name = "openssh"; }; nmt.script = '' serviceFile=home-files/.config/systemd/user/git-sync-test.service @@ -27,7 +24,7 @@ WantedBy=default.target [Service] - Environment=PATH=/nix/store/00000000000000000000000000000000-openssh/bin:/nix/store/00000000000000000000000000000000-git/bin + Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin Environment=GIT_SYNC_DIRECTORY=/a/path Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git 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 faf1537493..9e21eb6dba 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 @@ -9,6 +9,7 @@ with lib; programs.gpg.enable = true; test.stubs.gnupg = { }; + test.stubs.systemd = { }; # depends on gnupg.override nmt.script = '' in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}" 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 23d9f87654..1a314e4143 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 @@ -12,6 +12,7 @@ with lib; }; test.stubs.gnupg = { }; + test.stubs.systemd = { }; # depends on gnupg.override nmt.script = '' in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}" diff --git a/third_party/home-manager/tests/modules/services/imapnotify-darwin/default.nix b/third_party/home-manager/tests/modules/services/imapnotify-darwin/default.nix new file mode 100644 index 0000000000..a722604d7b --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify-darwin/default.nix @@ -0,0 +1 @@ +{ imapnotify-launchd = ./launchd.nix; } diff --git a/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.nix b/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.nix new file mode 100644 index 0000000000..5502ebbfc0 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + accounts.email.accounts = { + "hm@example.com" = { + notmuch.enable = true; + imap.port = 993; + + imapnotify = { + enable = true; + boxes = [ "Inbox" ]; + onNotify = '' + ${pkgs.notmuch}/bin/notmuch new + ''; + }; + }; + }; + + services.imapnotify = { + enable = true; + package = (config.lib.test.mkStubPackage { + name = "goimapnotify"; + outPath = "@goimapnotify@"; + }); + }; + + test.stubs.notmuch = { }; + + nmt.script = let + serviceFileName = "org.nix-community.home.imapnotify-hm-example.com.plist"; + in '' + serviceFile="LaunchAgents/${serviceFileName}" + serviceFileNormalized="$(normalizeStorePaths "$serviceFile")" + assertFileExists $serviceFile + assertFileContent $serviceFileNormalized ${./launchd.plist} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.plist b/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.plist new file mode 100644 index 0000000000..75009bb677 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify-darwin/launchd.plist @@ -0,0 +1,29 @@ + + + + + EnvironmentVariables + + NOTMUCH_CONFIG + /home/hm-user/.config/notmuch/default/config + + ExitTimeOut + 0 + KeepAlive + + Label + org.nix-community.home.imapnotify-hm-example.com + ProcessType + Background + ProgramArguments + + @goimapnotify@/bin/goimapnotify + -conf + /nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json + + RunAtLoad + + ThrottleInterval + 30 + + \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/imapnotify/default.nix b/third_party/home-manager/tests/modules/services/imapnotify/default.nix new file mode 100644 index 0000000000..f3a725dd09 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify/default.nix @@ -0,0 +1 @@ +{ imapnotify = ./imapnotify.nix; } diff --git a/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix new file mode 100644 index 0000000000..c607c042c2 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ ../../accounts/email-test-accounts.nix ]; + + accounts.email.accounts = { + "hm@example.com" = { + notmuch.enable = true; + imap.port = 993; + + imapnotify = { + enable = true; + boxes = [ "Inbox" ]; + onNotify = '' + ${pkgs.notmuch}/bin/notmuch new + ''; + }; + }; + }; + + services.imapnotify = { + enable = true; + package = (config.lib.test.mkStubPackage { + name = "goimapnotify"; + outPath = "@goimapnotify@"; + }); + }; + + test.stubs.notmuch = { }; + + nmt.script = '' + serviceFile="home-files/.config/systemd/user/imapnotify-hm-example.com.service" + serviceFileNormalized="$(normalizeStorePaths "$serviceFile")" + assertFileExists $serviceFile + assertFileContent $serviceFileNormalized ${./imapnotify.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.service b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.service new file mode 100644 index 0000000000..3e3bd9ff60 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/imapnotify/imapnotify.service @@ -0,0 +1,12 @@ +[Install] +WantedBy=default.target + +[Service] +Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config +ExecStart=@goimapnotify@/bin/goimapnotify -conf '/nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json' +Restart=always +RestartSec=30 +Type=simple + +[Unit] +Description=imapnotify for hm-example.com diff --git a/third_party/home-manager/tests/modules/services/lieer/lieer-service.nix b/third_party/home-manager/tests/modules/services/lieer/lieer-service.nix index f11f1f6e69..796afc072d 100644 --- a/third_party/home-manager/tests/modules/services/lieer/lieer-service.nix +++ b/third_party/home-manager/tests/modules/services/lieer/lieer-service.nix @@ -1,34 +1,30 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ ... }: { imports = [ ../../accounts/email-test-accounts.nix ]; - config = { - services.lieer.enable = true; + services.lieer.enable = true; - accounts.email.accounts = { - "hm@example.com" = { - flavor = "gmail.com"; - lieer = { - enable = true; - sync.enable = true; - }; - notmuch.enable = true; + accounts.email.accounts = { + "hm@example.com" = { + flavor = "gmail.com"; + lieer = { + enable = true; + sync.enable = true; }; + notmuch.enable = true; }; - - test.stubs.lieer = { }; - - nmt.script = '' - assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.service - assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.timer - - assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.service \ - ${./lieer-service-expected.service} - assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.timer \ - ${./lieer-service-expected.timer} - ''; }; + + test.stubs.lieer = { }; + + nmt.script = '' + assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.service + assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.timer + + assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.service \ + ${./lieer-service-expected.service} + assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.timer \ + ${./lieer-service-expected.timer} + ''; } diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.nix b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.nix new file mode 100644 index 0000000000..de7c594f33 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + services.mpd-mpris = { enable = true; }; + + test.stubs.mpd-mpris = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/mpd-mpris.service + assertFileContent "$serviceFile" ${./configuration-basic.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.service b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.service new file mode 100644 index 0000000000..32584eb3f1 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-basic.service @@ -0,0 +1,12 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=@mpd-mpris@/bin/mpd-mpris -no-instance +Restart=on-failure +RestartSec=5s +Type=simple + +[Unit] +After=mpd.service +Description=mpd-mpris: An implementation of the MPRIS protocol for MPD diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.nix b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.nix new file mode 100644 index 0000000000..a3a6b38d93 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + services.mpd-mpris = { + enable = true; + mpd.useLocal = true; + }; + + test.stubs.mpd-mpris = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/mpd-mpris.service + assertFileContent "$serviceFile" ${./configuration-with-local-mpd.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.service b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.service new file mode 100644 index 0000000000..a4a01fce18 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-local-mpd.service @@ -0,0 +1,13 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=@mpd-mpris@/bin/mpd-mpris -no-instance +Restart=on-failure +RestartSec=5s +Type=simple + +[Unit] +After=mpd.service +Description=mpd-mpris: An implementation of the MPRIS protocol for MPD +Requires=mpd.service diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.nix b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.nix new file mode 100644 index 0000000000..b10958253a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + services.mpd-mpris = { + enable = true; + mpd = { + network = "tcp"; + host = "example.com"; + port = 1234; + password = "my_password"; + }; + }; + + test.stubs.mpd-mpris = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/mpd-mpris.service + assertFileContent "$serviceFile" ${./configuration-with-password.service} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.service b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.service new file mode 100644 index 0000000000..868d55539d --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/configuration-with-password.service @@ -0,0 +1,12 @@ +[Install] +WantedBy=default.target + +[Service] +ExecStart=@mpd-mpris@/bin/mpd-mpris -host 'example.com' -network 'tcp' -no-instance -port 1234 -pwd 'my_password' +Restart=on-failure +RestartSec=5s +Type=simple + +[Unit] +After=mpd.service +Description=mpd-mpris: An implementation of the MPRIS protocol for MPD diff --git a/third_party/home-manager/tests/modules/services/mpd-mpris/default.nix b/third_party/home-manager/tests/modules/services/mpd-mpris/default.nix new file mode 100644 index 0000000000..ffcd04b172 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/mpd-mpris/default.nix @@ -0,0 +1,5 @@ +{ + mpd-mpris-configuration-basic = ./configuration-basic.nix; + mpd-mpris-configuration-with-local-mpd = ./configuration-with-local-mpd.nix; + mpd-mpris-configuration-with-password = ./configuration-with-password.nix; +} diff --git a/third_party/home-manager/tests/modules/services/mpd/basic-configuration.nix b/third_party/home-manager/tests/modules/services/mpd/basic-configuration.nix index 6d6250d90b..6ae0e91fce 100644 --- a/third_party/home-manager/tests/modules/services/mpd/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/mpd/basic-configuration.nix @@ -6,6 +6,7 @@ with lib; services.mpd = { enable = true; musicDirectory = "/my/music/dir"; + extraArgs = [ "--verbose" ]; }; home.stateVersion = "22.11"; diff --git a/third_party/home-manager/tests/modules/services/mpd/basic-configuration.service b/third_party/home-manager/tests/modules/services/mpd/basic-configuration.service index fd44042a9b..678d16d702 100644 --- a/third_party/home-manager/tests/modules/services/mpd/basic-configuration.service +++ b/third_party/home-manager/tests/modules/services/mpd/basic-configuration.service @@ -3,7 +3,7 @@ WantedBy=default.target [Service] Environment=PATH=/home/hm-user/.nix-profile/bin -ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf +ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf '--verbose' ExecStartPre=/nix/store/00000000000000000000000000000000-bash/bin/bash -c "/nix/store/00000000000000000000000000000000-coreutils/bin/mkdir -p '/home/hm-user/.local/share/mpd' '/home/hm-user/.local/share/mpd/playlists'" Type=notify diff --git a/third_party/home-manager/tests/modules/services/mpd/before-state-version-22_11.nix b/third_party/home-manager/tests/modules/services/mpd/before-state-version-22_11.nix index 6e044b3661..f29859ace6 100644 --- a/third_party/home-manager/tests/modules/services/mpd/before-state-version-22_11.nix +++ b/third_party/home-manager/tests/modules/services/mpd/before-state-version-22_11.nix @@ -3,7 +3,10 @@ with lib; { - services.mpd.enable = true; + services.mpd = { + enable = true; + extraArgs = [ "--verbose" ]; + }; home.stateVersion = "18.09"; diff --git a/third_party/home-manager/tests/modules/services/mpd/xdg-music-dir.nix b/third_party/home-manager/tests/modules/services/mpd/xdg-music-dir.nix index 775043c155..6df2cec46f 100644 --- a/third_party/home-manager/tests/modules/services/mpd/xdg-music-dir.nix +++ b/third_party/home-manager/tests/modules/services/mpd/xdg-music-dir.nix @@ -3,7 +3,11 @@ with lib; { - services.mpd.enable = true; + services.mpd = { + enable = true; + extraArgs = [ "--verbose" ]; + }; + xdg.userDirs.enable = true; home.stateVersion = "22.11"; diff --git a/third_party/home-manager/tests/modules/services/pass-secret-service/basic-configuration.nix b/third_party/home-manager/tests/modules/services/pass-secret-service/basic-configuration.nix new file mode 100644 index 0000000000..f5568df773 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pass-secret-service/basic-configuration.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + services.pass-secret-service = { + enable = true; + package = config.lib.test.mkStubPackage { }; + storePath = "/mnt/password-store"; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/pass-secret-service.service + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*/bin/pass_secret_service' + assertFileRegex $serviceFile '/mnt/password-store' + ''; +} diff --git a/third_party/home-manager/tests/modules/services/pass-secret-service/default-configuration.nix b/third_party/home-manager/tests/modules/services/pass-secret-service/default-configuration.nix new file mode 100644 index 0000000000..d418d823ba --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pass-secret-service/default-configuration.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + services.pass-secret-service = { + enable = true; + package = config.lib.test.mkStubPackage { }; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/pass-secret-service.service + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'ExecStart=.*/bin/pass_secret_service' + ''; +} diff --git a/third_party/home-manager/tests/modules/services/pass-secret-service/default.nix b/third_party/home-manager/tests/modules/services/pass-secret-service/default.nix new file mode 100644 index 0000000000..d841c97eb0 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/pass-secret-service/default.nix @@ -0,0 +1,4 @@ +{ + pass-secret-service-default-configuration = ./default-configuration.nix; + pass-secret-service-basic-configuration = ./basic-configuration.nix; +} diff --git a/third_party/home-manager/tests/modules/services/recoll/basic-configuration.conf b/third_party/home-manager/tests/modules/services/recoll/basic-configuration.conf index 185768a8e6..25e50c4c4a 100644 --- a/third_party/home-manager/tests/modules/services/recoll/basic-configuration.conf +++ b/third_party/home-manager/tests/modules/services/recoll/basic-configuration.conf @@ -1,16 +1,18 @@ +dbdir = ~/.cache/recoll/xapiandb + nocjk = 0 -skippedNames+ = node_modules +skippedNames+ = "node_modules" -topdirs = ~/Downloads ~/Documents ~/library +topdirs = "~/Downloads" "~/Documents" "~/library" "~/\"cool\" files" underscoresasletter = 1 [~/library/projects] -skippedNames+ = .editorconfig .gitignore result flake.lock go.sum +skippedNames+ = ".editorconfig" ".gitignore" "result" "flake.lock" "go.sum" [~/library/projects/software] -skippedNames+ = target result +skippedNames+ = "target" "result" [~/what-is-this-project] -skippedNames+ = whoa-there +skippedNames+ = "whoa-there" diff --git a/third_party/home-manager/tests/modules/services/recoll/basic-configuration.nix b/third_party/home-manager/tests/modules/services/recoll/basic-configuration.nix index 9775c170ca..4e6ad03e7f 100644 --- a/third_party/home-manager/tests/modules/services/recoll/basic-configuration.nix +++ b/third_party/home-manager/tests/modules/services/recoll/basic-configuration.nix @@ -6,7 +6,8 @@ package = config.lib.test.mkStubPackage { }; configDir = "${config.xdg.configHome}/recoll"; settings = { - topdirs = [ "~/Downloads" "~/Documents" "~/library" ]; + dbdir = "~/.cache/recoll/xapiandb"; + topdirs = [ "~/Downloads" "~/Documents" "~/library" ''~/"cool" files'' ]; "skippedNames+" = [ "node_modules" ]; underscoresasletter = true; nocjk = false; diff --git a/third_party/home-manager/tests/modules/services/recoll/config-format-order.conf b/third_party/home-manager/tests/modules/services/recoll/config-format-order.conf index f1e251ff3d..82bd273738 100644 --- a/third_party/home-manager/tests/modules/services/recoll/config-format-order.conf +++ b/third_party/home-manager/tests/modules/services/recoll/config-format-order.conf @@ -4,7 +4,7 @@ d = 0 e = This should be the second to the last non-attrset value in the config. -g = This is coming from a list +g = "This" "is" "coming" "from" "a" "list" [a] foo = bar @@ -18,7 +18,7 @@ b = 53 a = This should be second to the last for the attribute names with an attrset. b = 3193 c = 0 -d = Hello there +d = "Hello" "there" [foo] bar = This should be the last attribute with an attrset. diff --git a/third_party/home-manager/tests/modules/services/swayosd/default.nix b/third_party/home-manager/tests/modules/services/swayosd/default.nix new file mode 100644 index 0000000000..c327610a92 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/swayosd/default.nix @@ -0,0 +1 @@ +{ swayosd = ./swayosd.nix; } diff --git a/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix b/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix new file mode 100644 index 0000000000..b371d86ad6 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/swayosd/swayosd.nix @@ -0,0 +1,35 @@ +{ config, ... }: + +{ + services.swayosd = { + enable = true; + package = config.lib.test.mkStubPackage { + name = "swayosd"; + outPath = "@swayosd@"; + }; + maxVolume = 10; + }; + + nmt.script = '' + assertFileContent \ + home-files/.config/systemd/user/swayosd.service \ + ${ + builtins.toFile "swayosd.service" '' + [Install] + WantedBy=graphical-session.target + + [Service] + ExecStart=@swayosd@/bin/swayosd --max-volume 10 + Restart=always + Type=simple + + [Unit] + After=graphical-session.target + ConditionEnvironment=WAYLAND_DISPLAY + Description=Volume/backlight OSD indicator + Documentation=man:swayosd(1) + PartOf=graphical-session.target + '' + } + ''; +} diff --git a/third_party/home-manager/tests/modules/services/sxhkd/configuration.nix b/third_party/home-manager/tests/modules/services/sxhkd/configuration.nix index 9e99650519..7ca7b53075 100644 --- a/third_party/home-manager/tests/modules/services/sxhkd/configuration.nix +++ b/third_party/home-manager/tests/modules/services/sxhkd/configuration.nix @@ -1,6 +1,10 @@ { config, pkgs, ... }: -{ +let + script = pkgs.writeShellScript "script.sh" '' + echo "test" + ''; +in { services.sxhkd = { enable = true; @@ -10,6 +14,7 @@ "super + a" = "run command a"; "super + b" = null; "super + Shift + b" = "run command b"; + "super + s" = script; }; extraConfig = '' @@ -27,6 +32,11 @@ assertFileExists $sxhkdrc - assertFileContent $sxhkdrc ${./sxhkdrc} + assertFileContent $sxhkdrc ${ + pkgs.substituteAll { + src = ./sxhkdrc; + inherit script; + } + } ''; } diff --git a/third_party/home-manager/tests/modules/services/sxhkd/sxhkdrc b/third_party/home-manager/tests/modules/services/sxhkd/sxhkdrc index c8883464b2..038253760f 100644 --- a/third_party/home-manager/tests/modules/services/sxhkd/sxhkdrc +++ b/third_party/home-manager/tests/modules/services/sxhkd/sxhkdrc @@ -5,6 +5,9 @@ super + a run command a +super + s + @script@ + super + c call command c diff --git a/third_party/home-manager/tests/modules/services/syncthing/common/default.nix b/third_party/home-manager/tests/modules/services/syncthing/common/default.nix new file mode 100644 index 0000000000..2cdef6ff19 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/syncthing/common/default.nix @@ -0,0 +1 @@ +{ syncthing-extra-options = ./extra-options.nix; } diff --git a/third_party/home-manager/tests/modules/services/syncthing/common/expected-agent.plist b/third_party/home-manager/tests/modules/services/syncthing/common/expected-agent.plist new file mode 100644 index 0000000000..3b9a28ff2d --- /dev/null +++ b/third_party/home-manager/tests/modules/services/syncthing/common/expected-agent.plist @@ -0,0 +1,26 @@ + + + + + KeepAlive + + Crashed + + SuccessfulExit + + + Label + org.nix-community.home.syncthing + ProcessType + Background + ProgramArguments + + @syncthing@/bin/syncthing + -no-browser + -no-restart + -logflags=0 + -foo + -bar "baz" + + + \ No newline at end of file diff --git a/third_party/home-manager/tests/modules/services/syncthing/common/extra-options.nix b/third_party/home-manager/tests/modules/services/syncthing/common/extra-options.nix new file mode 100644 index 0000000000..016850cc37 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/syncthing/common/extra-options.nix @@ -0,0 +1,26 @@ +{ lib, pkgs, ... }: + +lib.mkMerge [ + { + services.syncthing = { + enable = true; + extraOptions = [ "-foo" ''-bar "baz"'' ]; + }; + + test.stubs.syncthing = { }; + } + (lib.mkIf pkgs.stdenv.isLinux { + nmt.script = '' + assertFileExists home-files/.config/systemd/user/syncthing.service + assertFileContains home-files/.config/systemd/user/syncthing.service \ + "ExecStart='@syncthing@/bin/syncthing' '-no-browser' '-no-restart' '-logflags=0' '-foo' '-bar \"baz\"'" + ''; + }) + (lib.mkIf pkgs.stdenv.isDarwin { + nmt.script = '' + serviceFile=LaunchAgents/org.nix-community.home.syncthing.plist + assertFileExists "$serviceFile" + assertFileContent "$serviceFile" ${./expected-agent.plist} + ''; + }) +] diff --git a/third_party/home-manager/tests/modules/services/syncthing/extra-options.nix b/third_party/home-manager/tests/modules/services/syncthing/extra-options.nix deleted file mode 100644 index c78b00f9c1..0000000000 --- a/third_party/home-manager/tests/modules/services/syncthing/extra-options.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, ... }: - -{ - services.syncthing = { - enable = true; - extraOptions = [ "-foo" ''-bar "baz"'' ]; - }; - - test.stubs.syncthing = { }; - - nmt.script = '' - assertFileExists home-files/.config/systemd/user/syncthing.service - assertFileContains home-files/.config/systemd/user/syncthing.service \ - "ExecStart=@syncthing@/bin/syncthing -no-browser -no-restart -logflags=0 '-foo' '-bar \"baz\"'" - ''; -} diff --git a/third_party/home-manager/tests/modules/services/syncthing/default.nix b/third_party/home-manager/tests/modules/services/syncthing/linux/default.nix similarity index 70% rename from third_party/home-manager/tests/modules/services/syncthing/default.nix rename to third_party/home-manager/tests/modules/services/syncthing/linux/default.nix index 86f72b571f..14136fe637 100644 --- a/third_party/home-manager/tests/modules/services/syncthing/default.nix +++ b/third_party/home-manager/tests/modules/services/syncthing/linux/default.nix @@ -1,5 +1,4 @@ { - syncthing-extra-options = ./extra-options.nix; syncthing-tray = ./tray.nix; syncthing-tray-as-bool-triggers-warning = ./tray-as-bool-triggers-warning.nix; } diff --git a/third_party/home-manager/tests/modules/services/syncthing/tray-as-bool-triggers-warning.nix b/third_party/home-manager/tests/modules/services/syncthing/linux/tray-as-bool-triggers-warning.nix similarity index 100% rename from third_party/home-manager/tests/modules/services/syncthing/tray-as-bool-triggers-warning.nix rename to third_party/home-manager/tests/modules/services/syncthing/linux/tray-as-bool-triggers-warning.nix diff --git a/third_party/home-manager/tests/modules/services/syncthing/tray.nix b/third_party/home-manager/tests/modules/services/syncthing/linux/tray.nix similarity index 100% rename from third_party/home-manager/tests/modules/services/syncthing/tray.nix rename to third_party/home-manager/tests/modules/services/syncthing/linux/tray.nix diff --git a/third_party/home-manager/tests/modules/services/window-managers/bspwm/configuration.nix b/third_party/home-manager/tests/modules/services/window-managers/bspwm/configuration.nix index 49c82f6fe4..cd2bfa2e31 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/bspwm/configuration.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/bspwm/configuration.nix @@ -1,47 +1,42 @@ -{ lib, pkgs, ... }: - -with lib; +{ pkgs, ... }: { - config = { - xsession.windowManager.bspwm = { - enable = true; - monitors.focused = - [ "desktop 1" "d'esk top" ]; # pathological desktop names - alwaysResetDesktops = false; - settings = { - border_width = 2; - split_ratio = 0.52; - gapless_monocle = true; - external_rules_command = "/path/to/external rules command"; - ignore_ewmh_fullscreen = [ "enter" "exit" ]; - }; - rules."*" = { - sticky = true; - center = false; - desktop = "d'esk top#next"; - splitDir = "north"; - border = null; - unknownRule = 42; - }; - extraConfigEarly = '' - extra config early - ''; - extraConfig = '' - extra config - ''; - startupPrograms = [ "foo" "bar || qux" ]; + xsession.windowManager.bspwm = { + enable = true; + monitors.focused = [ "desktop 1" "d'esk top" ]; # pathological desktop names + alwaysResetDesktops = false; + settings = { + border_width = 2; + split_ratio = 0.52; + gapless_monocle = true; + external_rules_command = "/path/to/external rules command"; + ignore_ewmh_fullscreen = [ "enter" "exit" ]; }; - - test.stubs.bspwm = { }; - - nmt.script = '' - bspwmrc=home-files/.config/bspwm/bspwmrc - assertFileExists "$bspwmrc" - assertFileIsExecutable "$bspwmrc" - assertFileContent "$bspwmrc" ${ - pkgs.writeShellScript "bspwmrc-expected" (readFile ./bspwmrc) - } + rules."*" = { + sticky = true; + center = false; + desktop = "d'esk top#next"; + splitDir = "north"; + border = null; + unknownRule = 42; + }; + extraConfigEarly = '' + extra config early ''; + extraConfig = '' + extra config + ''; + startupPrograms = [ "foo" "bar || qux" ]; }; + + test.stubs.bspwm = { }; + + nmt.script = '' + bspwmrc=home-files/.config/bspwm/bspwmrc + assertFileExists "$bspwmrc" + assertFileIsExecutable "$bspwmrc" + assertFileContent "$bspwmrc" ${ + pkgs.writeShellScript "bspwmrc-expected" (builtins.readFile ./bspwmrc) + } + ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/herbstluftwm/herbstluftwm-simple-config-autostart b/third_party/home-manager/tests/modules/services/window-managers/herbstluftwm/herbstluftwm-simple-config-autostart index 5f101e0bb3..78d4d7d564 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/herbstluftwm/herbstluftwm-simple-config-autostart +++ b/third_party/home-manager/tests/modules/services/window-managers/herbstluftwm/herbstluftwm-simple-config-autostart @@ -20,14 +20,15 @@ herbstclient set frame_bg_active_color '#000000' herbstclient set frame_gap '12' herbstclient set frame_padding '-12' -if @herbstluftwm@/bin/herbstclient object_tree tags.default &>/dev/null; then - herbstclient rename default '1' -fi - for tag in '1' 'with space' 'wə1rd#ch@rs'\'''; do herbstclient add "$tag" done +if @herbstluftwm@/bin/herbstclient object_tree tags.by-name.default &>/dev/null; then + herbstclient use '1' + herbstclient merge_tag default '1' +fi + herbstclient keybind Mod4-1 use 1 herbstclient keybind Mod4-2 use 2 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 new file mode 100644 index 0000000000..96cae5e453 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/default.nix @@ -0,0 +1,4 @@ +{ + hyprland-simple-config = ./simple-config.nix; + hyprland-inconsistent-config = ./inconsistent-config.nix; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix new file mode 100644 index 0000000000..3daad82604 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/inconsistent-config.nix @@ -0,0 +1,21 @@ +{ 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"; }) ]; + }; + + test.asserts.warnings.expected = [ + "You have enabled hyprland.systemdIntegration or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake." + ]; + test.asserts.warnings.enable = true; + + nmt.script = '' + config=home-files/.config/hypr/hyprland.conf + assertFileExists "$config" + ''; +} 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 new file mode 100644 index 0000000000..fa0f63f70b --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.conf @@ -0,0 +1,40 @@ +exec-once = /nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target +$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 +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 +} + +input { + touchpad { + scroll_factor=0.300000 + } + accel_profile=flat + follow_mouse=1 + kb_layout=ro +} +bindm=$mod, mouse:272, movewindow +bindm=$mod, mouse:273, resizewindow +bindm=$mod ALT, mouse:272, resizewindow +plugin=/path/to/plugin1 +plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +# window resize +bind = $mod, S, submap, resize + +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/simple-config.nix b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix new file mode 100644 index 0000000000..ee8227550a --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/hyprland/simple-config.nix @@ -0,0 +1,68 @@ +{ 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 = { + 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" + ]; + }; + 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" ${./simple-config.conf} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors-expected.conf index 92f23a921d..80a3e75333 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse yes focus_on_window_activation smart mouse_warping output @@ -94,6 +94,6 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors.nix index 66b4ca87a4..abb4112a7e 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-bar-focused-colors.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ ... }: { imports = [ ./i3-stubs.nix ]; diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse-expected.conf index 27234b96db..22231abda7 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse no focus_on_window_activation smart mouse_warping output @@ -91,6 +91,6 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse.nix index 43e15cda39..db84abd1f6 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-followmouse.nix @@ -1,31 +1,27 @@ -{ config, lib, ... }: - -with lib; +{ ... }: { - config = { - xsession.windowManager.i3 = { - enable = true; + xsession.windowManager.i3 = { + enable = true; - config.focus.followMouse = false; - }; - - nixpkgs.overlays = [ - (self: super: { - dmenu = super.dmenu // { outPath = "@dmenu@"; }; - - i3 = super.writeScriptBin "i3" "" // { outPath = "@i3@"; }; - - i3-gaps = super.writeScriptBin "i3" "" // { outPath = "@i3-gaps@"; }; - - i3status = super.i3status // { outPath = "@i3status@"; }; - }) - ]; - - nmt.script = '' - assertFileExists home-files/.config/i3/config - assertFileContent home-files/.config/i3/config \ - ${./i3-followmouse-expected.conf} - ''; + config.focus.followMouse = false; }; + + nixpkgs.overlays = [ + (self: super: { + dmenu = super.dmenu // { outPath = "@dmenu@"; }; + + i3 = super.writeScriptBin "i3" "" // { outPath = "@i3@"; }; + + i3-gaps = super.writeScriptBin "i3" "" // { outPath = "@i3-gaps@"; }; + + i3status = super.i3status // { outPath = "@i3status@"; }; + }) + ]; + + nmt.script = '' + assertFileExists home-files/.config/i3/config + assertFileContent home-files/.config/i3/config \ + ${./i3-followmouse-expected.conf} + ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-deprecated.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-deprecated.nix index 7e4532e571..0216681f35 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-deprecated.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-deprecated.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ ... }: { imports = [ ./i3-stubs.nix ]; diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-expected.conf index d85d978e07..e2606b3207 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse yes focus_on_window_activation smart mouse_warping output @@ -91,6 +91,6 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts.nix index 3618451f84..decd9fcca4 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-fonts.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ ... }: { imports = [ ./i3-stubs.nix ]; diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-keybindings-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-keybindings-expected.conf index b3b4c33dea..34460f120d 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-keybindings-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-keybindings-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse yes focus_on_window_activation smart mouse_warping output @@ -92,6 +92,6 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-null-config.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-null-config.nix index f321ad49a5..8433b0c7fb 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-null-config.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-null-config.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { imports = [ ./i3-stubs.nix ]; @@ -11,6 +11,6 @@ nmt.script = '' assertFileExists home-files/.config/i3/config assertFileContent home-files/.config/i3/config \ - ${pkgs.writeText "expected" ""} + ${builtins.toFile "expected" ""} ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default-expected.conf index d7fe4b6104..cf4f62df3c 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse yes focus_on_window_activation smart mouse_warping output @@ -90,6 +90,6 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default.nix index 521b5f5d75..733d619fd0 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ ... }: { imports = [ ./i3-stubs.nix ]; diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output-expected.conf b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output-expected.conf index dedad29e0b..d765ac1755 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output-expected.conf +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output-expected.conf @@ -3,7 +3,7 @@ floating_modifier Mod1 default_border normal 2 default_floating_border normal 2 hide_edge_borders none -force_focus_wrapping no +focus_wrapping yes focus_follows_mouse yes focus_on_window_activation smart mouse_warping output @@ -91,10 +91,11 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -workspace "1" output eDP -workspace "ABC" output DP -workspace "3: Test" output HDMI -workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI +workspace "1" output "eDP" +workspace "ABC" output "DP" +workspace "3: Test" output "HDMI" +workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI" +workspace "Multiple" output "DVI" "HDMI" "DP" diff --git a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output.nix b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output.nix index df4a2c7890..4e31acdef8 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/i3/i3-workspace-output.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ ... }: let i3 = { @@ -6,6 +6,7 @@ let ws2 = "ABC"; ws3 = "3: Test"; ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³''; + ws5 = "Multiple"; }; in { @@ -31,6 +32,10 @@ in { workspace = "${i3.ws4}"; output = "DVI"; } + { + workspace = "${i3.ws5}"; + output = [ "DVI" "HDMI" "DP" ]; + } ]; }; 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 f11ef7e389..2c7f5ff763 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 @@ -10,6 +10,7 @@ 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-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 a3b9905d6e..795ad59d9c 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 @@ -103,7 +103,7 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; systemctl --user start sway-session.target" 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 65780062fc..8b11cc1f64 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 @@ -102,8 +102,8 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; 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-default.conf b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.conf index e1fa6626b5..be91606202 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 @@ -100,7 +100,7 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; 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 24796118c0..59527247b4 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 @@ -14,5 +14,9 @@ assertFileExists home-files/.config/sway/config assertFileContent $(normalizeStorePaths home-files/.config/sway/config) \ ${./sway-default.conf} + + assertFileExists home-files/.config/systemd/user/sway-session.target + assertFileContent home-files/.config/systemd/user/sway-session.target \ + ${./sway-default.target} ''; } diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.target b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.target new file mode 100644 index 0000000000..be32aac8c8 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-default.target @@ -0,0 +1,6 @@ +[Unit] +After=graphical-session-pre.target +BindsTo=graphical-session.target +Description=sway compositor session +Documentation=man:systemd.special(7) +Wants=graphical-session-pre.target 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 bf99663784..19bed2a745 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 @@ -81,4 +81,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; 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; 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 d93031c90e..7389a67ab7 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 @@ -81,4 +81,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; 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; 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 52aa3cc4a6..03f64fc24d 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 @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ config, pkgs, ... }: { imports = [ ./sway-stubs.nix ]; 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 788ad218fa..b8a2bc1693 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 @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, pkgs, ... }: { imports = [ ./sway-stubs.nix ]; 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 b217f88475..b53d95bffe 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 @@ -112,7 +112,7 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; 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 567f7b5c6c..b8aa58c56c 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 @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, pkgs, ... }: { imports = [ ./sway-stubs.nix ]; 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 44077d4413..b40912671a 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 @@ -7,7 +7,7 @@ enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; config = null; - systemdIntegration = false; + 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 0c0d1e7b43..a859e04e67 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 @@ -7,7 +7,7 @@ enable = true; package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; config = null; - systemdIntegration = false; + systemd.enable = false; }; nmt.script = '' 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 e1fa6626b5..be91606202 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 @@ -100,7 +100,7 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; systemctl --user start sway-session.target" 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 new file mode 100644 index 0000000000..5a1d90e293 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./sway-stubs.nix ]; + + wayland.windowManager.sway = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@sway@"; }; + # overriding findutils causes issues + config.menu = "${pkgs.dmenu}/bin/dmenu_run"; + + systemd.xdgAutostart = true; + }; + + nmt.script = '' + assertFileExists home-files/.config/systemd/user/sway-session.target + assertFileContent home-files/.config/systemd/user/sway-session.target \ + ${./sway-systemd-autostart.target} + ''; +} diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.target b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.target new file mode 100644 index 0000000000..201f0ac650 --- /dev/null +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/sway-systemd-autostart.target @@ -0,0 +1,8 @@ +[Unit] +After=graphical-session-pre.target +Before=xdg-desktop-autostart.target +BindsTo=graphical-session.target +Description=sway compositor session +Documentation=man:systemd.special(7) +Wants=graphical-session-pre.target +Wants=xdg-desktop-autostart.target 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 b783d4c20f..34924bb1a8 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 @@ -99,7 +99,7 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; 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; systemctl --user start sway-session.target" 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 94ba5e27c0..c19373d1e6 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 @@ -100,11 +100,12 @@ bar { inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff binding_mode #2f343a #900000 #ffffff -} + } } -workspace "1" output eDP -workspace "ABC" output DP -workspace "3: Test" output HDMI -workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output DVI -exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target" +workspace "1" output "eDP" +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" 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 e096aa1f48..47fb7527e2 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 @@ -6,6 +6,7 @@ let ws2 = "ABC"; ws3 = "3: Test"; ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³''; + ws5 = "Multiple"; }; in { @@ -34,6 +35,10 @@ in { workspace = "${i3.ws4}"; output = "DVI"; } + { + workspace = "${i3.ws5}"; + output = [ "DVI" "HDMI" "DP" ]; + } ]; }; diff --git a/third_party/home-manager/tests/modules/services/window-managers/sway/swaynag-empty-settings.nix b/third_party/home-manager/tests/modules/services/window-managers/sway/swaynag-empty-settings.nix index 0180852a38..56782547f3 100644 --- a/third_party/home-manager/tests/modules/services/window-managers/sway/swaynag-empty-settings.nix +++ b/third_party/home-manager/tests/modules/services/window-managers/sway/swaynag-empty-settings.nix @@ -1,15 +1,13 @@ -{ config, lib, pkgs, ... }: +{ ... }: { - config = { - wayland.windowManager.sway.swaynag = { - enable = true; + wayland.windowManager.sway.swaynag = { + enable = true; - settings = { }; - }; - - nmt.script = '' - assertPathNotExists home-files/.config/swaynag - ''; + settings = { }; }; + + nmt.script = '' + assertPathNotExists home-files/.config/swaynag + ''; } diff --git a/third_party/home-manager/tests/modules/systemd/services-disabled-for-root.nix b/third_party/home-manager/tests/modules/systemd/services-disabled-for-root.nix index f54ebd08be..38d4f95575 100644 --- a/third_party/home-manager/tests/modules/systemd/services-disabled-for-root.nix +++ b/third_party/home-manager/tests/modules/systemd/services-disabled-for-root.nix @@ -1,23 +1,19 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ lib, ... }: { - config = { - home.username = mkForce "root"; + home.username = lib.mkForce "root"; - systemd.user.services."test-service@" = { - Unit = { Description = "A basic test service"; }; + systemd.user.services."test-service@" = { + Unit = { Description = "A basic test service"; }; - Service = { - Environment = [ "VAR1=1" "VAR2=2" ]; - ExecStart = ''/some/exec/start/command --with-arguments "%i"''; - }; + Service = { + Environment = [ "VAR1=1" "VAR2=2" ]; + ExecStart = ''/some/exec/start/command --with-arguments "%i"''; }; - - nmt.script = '' - serviceFile=home-files/.config/systemd/user/test-service@.service - assertPathNotExists $serviceFile - ''; }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/test-service@.service + assertPathNotExists $serviceFile + ''; } diff --git a/third_party/home-manager/tests/modules/systemd/services.nix b/third_party/home-manager/tests/modules/systemd/services.nix index fbef7b9c2e..439a03f2ea 100644 --- a/third_party/home-manager/tests/modules/systemd/services.nix +++ b/third_party/home-manager/tests/modules/systemd/services.nix @@ -1,33 +1,35 @@ -{ config, lib, pkgs, ... }: +{ pkgs, ... }: -with lib; +let + drvScript = pkgs.writeShellScript "drv-script.sh" '' + echo "Just a test" + ''; +in { + systemd.user.services."test-service@" = { + Unit = { Description = "A basic test service"; }; -{ - config = { - systemd.user.services."test-service@" = { - Unit = { Description = "A basic test service"; }; - - Service = { - Environment = [ "VAR1=1" "VAR2=2" ]; - ExecStart = ''/some/exec/start/command --with-arguments "%i"''; - }; + Service = { + Environment = [ "VAR1=1" "VAR2=2" ]; + ExecStartPre = drvScript; + ExecStart = ''/some/exec/start/command --with-arguments "%i"''; }; - - nmt.script = '' - serviceFile=home-files/.config/systemd/user/test-service@.service - assertFileExists $serviceFile - assertFileContent $serviceFile \ - ${ - builtins.toFile "services-expected.conf" '' - [Service] - Environment=VAR1=1 - Environment=VAR2=2 - ExecStart=/some/exec/start/command --with-arguments "%i" - - [Unit] - Description=A basic test service - '' - } - ''; }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/test-service@.service + assertFileExists $serviceFile + assertFileContent $serviceFile \ + ${ + pkgs.writeText "services-expected.conf" '' + [Service] + Environment=VAR1=1 + Environment=VAR2=2 + ExecStart=/some/exec/start/command --with-arguments "%i" + ExecStartPre=${drvScript} + + [Unit] + Description=A basic test service + '' + } + ''; } diff --git a/third_party/home-manager/tests/modules/systemd/session-variables.nix b/third_party/home-manager/tests/modules/systemd/session-variables.nix index cbc348c444..e427bbeeab 100644 --- a/third_party/home-manager/tests/modules/systemd/session-variables.nix +++ b/third_party/home-manager/tests/modules/systemd/session-variables.nix @@ -1,26 +1,24 @@ -{ config, lib, pkgs, ... }: +{ config, pkgs, ... }: { - config = { - systemd.user.sessionVariables = { - V_int = 1; - V_str = "2"; - }; - - nmt.script = '' - envFile=home-files/.config/environment.d/10-home-manager.conf - assertFileExists $envFile - assertFileContent $envFile ${ - pkgs.writeText "expected" '' - LOCALE_ARCHIVE_2_27=${pkgs.glibcLocales}/lib/locale/locale-archive - V_int=1 - V_str=2 - XDG_CACHE_HOME=/home/hm-user/.cache - XDG_CONFIG_HOME=/home/hm-user/.config - XDG_DATA_HOME=/home/hm-user/.local/share - XDG_STATE_HOME=/home/hm-user/.local/state - '' - } - ''; + systemd.user.sessionVariables = { + V_int = 1; + V_str = "2"; }; + + nmt.script = '' + envFile=home-files/.config/environment.d/10-home-manager.conf + assertFileExists $envFile + assertFileContent $envFile ${ + pkgs.writeText "expected" '' + LOCALE_ARCHIVE_2_27=${config.i18n.glibcLocales}/lib/locale/locale-archive + V_int=1 + V_str=2 + XDG_CACHE_HOME=/home/hm-user/.cache + XDG_CONFIG_HOME=/home/hm-user/.config + XDG_DATA_HOME=/home/hm-user/.local/share + XDG_STATE_HOME=/home/hm-user/.local/state + '' + } + ''; } diff --git a/third_party/home-manager/tests/modules/systemd/slices.nix b/third_party/home-manager/tests/modules/systemd/slices.nix index 0bb9050411..68f6c70a7a 100644 --- a/third_party/home-manager/tests/modules/systemd/slices.nix +++ b/third_party/home-manager/tests/modules/systemd/slices.nix @@ -1,31 +1,27 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ ... }: { - config = { - systemd.user.slices.app-test = { - Unit = { Description = "Slice for a test app"; }; + systemd.user.slices.app-test = { + Unit = { Description = "Slice for a test app"; }; - Slice = { - MemoryHigh = "30%"; - MemoryMax = "40%"; - }; + Slice = { + MemoryHigh = "30%"; + MemoryMax = "40%"; }; - - nmt.script = '' - sliceFile=home-files/.config/systemd/user/app-test.slice - assertFileExists $sliceFile - assertFileContent $sliceFile ${ - builtins.toFile "app-test-expected.conf" '' - [Slice] - MemoryHigh=30% - MemoryMax=40% - - [Unit] - Description=Slice for a test app - '' - } - ''; }; + + nmt.script = '' + sliceFile=home-files/.config/systemd/user/app-test.slice + assertFileExists $sliceFile + assertFileContent $sliceFile ${ + builtins.toFile "app-test-expected.conf" '' + [Slice] + MemoryHigh=30% + MemoryMax=40% + + [Unit] + Description=Slice for a test app + '' + } + ''; } diff --git a/third_party/home-manager/tests/modules/systemd/timers.nix b/third_party/home-manager/tests/modules/systemd/timers.nix index 1c0e272229..b9d167e3b7 100644 --- a/third_party/home-manager/tests/modules/systemd/timers.nix +++ b/third_party/home-manager/tests/modules/systemd/timers.nix @@ -1,25 +1,21 @@ -{ config, lib, pkgs, ... }: - -with lib; +{ ... }: { - config = { - systemd.user.timers.test-timer = { - Unit = { Description = "A basic test timer"; }; + systemd.user.timers.test-timer = { + Unit = { Description = "A basic test timer"; }; - Timer = { OnUnitActiveSec = "1h 30m"; }; + Timer = { OnUnitActiveSec = "1h 30m"; }; - Install = { WantedBy = [ "timers.target" ]; }; - }; - - nmt.script = '' - unitDir=home-files/.config/systemd/user - timerFile=$unitDir/test-timer.timer - - assertFileExists $timerFile - assertFileContent $timerFile ${./timers-expected.conf} - - assertFileExists $unitDir/timers.target.wants/test-timer.timer - ''; + Install = { WantedBy = [ "timers.target" ]; }; }; + + nmt.script = '' + unitDir=home-files/.config/systemd/user + timerFile=$unitDir/test-timer.timer + + assertFileExists $timerFile + assertFileContent $timerFile ${./timers-expected.conf} + + assertFileExists $unitDir/timers.target.wants/test-timer.timer + ''; } diff --git a/third_party/home-manager/tests/stubs.nix b/third_party/home-manager/tests/stubs.nix index dacafeb7d9..5dee8e43a1 100644 --- a/third_party/home-manager/tests/stubs.nix +++ b/third_party/home-manager/tests/stubs.nix @@ -15,12 +15,13 @@ let outPath = mkOption { type = types.nullOr types.str; default = "@${name}@"; - defaultText = "@\${name}@"; + defaultText = literalExpression ''"@''${name}@"''; }; version = mkOption { type = types.nullOr types.str; default = null; + defaultText = literalExpression "pkgs.\${name}.version or null"; }; buildScript = mkOption { @@ -41,8 +42,18 @@ let dummyPackage else pkgs.runCommandLocal name { pname = name; } buildScript; - in pkg // optionalAttrs (outPath != null) { inherit outPath; } - // optionalAttrs (version != null) { inherit version; }; + in pkg // optionalAttrs (outPath != null) { + inherit outPath; + + # Prevent getOutput from descending into outputs + outputSpecified = true; + + # Allow the original package to be used in derivation inputs + __spliced = { + buildHost = pkg; + hostTarget = pkg; + }; + } // optionalAttrs (version != null) { inherit version; }; in { options.test.stubs = mkOption { @@ -55,7 +66,12 @@ in { config = { lib.test.mkStubPackage = mkStubPackage; - nixpkgs.overlays = mkIf (config.test.stubs != { }) - [ (self: super: mapAttrs (n: mkStubPackage) config.test.stubs) ]; + nixpkgs.overlays = mkIf (config.test.stubs != { }) [ + (self: super: + mapAttrs (n: v: + mkStubPackage (v // optionalAttrs (v.version == null) { + version = super.${n}.version or null; + })) config.test.stubs) + ]; }; }