Commit Graph

899 Commits

Author SHA1 Message Date
musjj 406d34d919
lf: simplify option validation (#4334)
Don't try to validate a limited set of hardcoded options, instead just
convert them as-is. Now, users can keep all their options in a single
attribute set, including arbitrary `user_{option}`s which was impossible
to express with a hard-coded submodule. As a plus, there is also less
maintainence burden.
2023-08-12 18:10:49 +02:00
Jian Lin a8f8f48320
mu: add package option (#4325) 2023-08-09 18:40:43 +02:00
Maxim Karasev 0a014a729c
aerc: do not use smtp-starttls (#4272)
It was deprecated in 0.15.0, +insecure schema is suggested instead.
Thus, we can just copy imap logic, which already uses +insecure.
2023-08-05 10:56:10 +02:00
Yt 8c731978f0
nushell: deprecation of let-env (#4292) 2023-08-01 19:27:30 +02:00
satoqz 4fd794d3df
gh: option to enable helper for additional hosts (#4288)
* gh: option to enable helper for additional hosts

`gh` can also be used with github enterprise
hosts, for which there exists no easy option
to enable the credential helper except for
directly working with `programs.git.extraConfig`.
Not sure if this is a needed addition since it's
somewhat niche, at the same time it's not very
complex and makes the life of github enterprise
a little easier.

* gh: update credential-helper tests

* gh: refactor credential helper option

this moves from `enableGitCredentialHelper` to
`gitCredentialHelper.enable` and
`gitCredentialHelper.hosts`.

* gh: lib.mkIf -> mkIf
2023-08-01 01:40:37 +02:00
Robert Helgesson f58889c07e
gnome-terminal: add assertion on profile names 2023-07-29 19:43:20 +02:00
Janik H a30f5b5b35
gh-dash: add module 2023-07-24 12:38:44 +02:00
ryane ab70a02363
git-sync: add darwin support
- On darwin, creates a launch agent to run git-sync on an interval and
  when the `path` changes.

- The `uri` option is not used on Darwin. The auto-creation of the
  local git directory from the `uri` is a feature of the
  git-sync-on-inotify [1] wrapper (which won't work on Darwin afaik)
  and not `git-sync` itself.

[1] https://github.com/simonthum/git-sync/blob/master/contrib/git-sync-on-inotify
2023-07-24 11:16:09 +02:00
Mihai Fufezan 76dd6c6619
hyprland: prioritize variables and beziers (#4263)
* hyprland: prioritize variables and beziers

The `settings` key now handles `$variables` and `bezier`s differently,
putting them at the top of the file.
Also, proper indentation has been implemented.

* Update modules/services/window-managers/hyprland.nix

Co-authored-by: Naïm Favier <n@monade.li>

* hyprland: add animations & beziers test

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-07-22 13:58:46 +02:00
Mihai Fufezan ee5673246d
hyprland: add module
Ported from

  https://github.com/hyprwm/Hyprland/blob/main/nix/hm-module.nix

which was adapted from the sway module.

Co-authored-by: Robert Helgesson <robert@rycee.net>
2023-07-21 00:14:22 +02:00
Emily 9f9e277b60 treewide: remove now-redundant `lib.mdDoc` calls
These (and the `*MD` functions apart from `literalMD`) are now no-ops
in nixpkgs and serve no purpose other than to add additional noise and
potentially mislead people into thinking unmarked DocBook documentation
will still be accepted.

Note that if backporting changes including documentation to 23.05,
the `mdDoc` calls will need to be re-added.

To reproduce this commit, run:

    $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
      nix shell nixpkgs#coreutils \
      -c find . -name '*.nix' \
      -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
      --strip {} +
    $ ./format
2023-07-17 18:49:09 +01:00
Emily 36a53d9f26 treewide: convert all option docs to Markdown
This process was automated by [my fork of `nix-doc-munge`]. All
conversions were automatically checked to produce the same DocBook
result when converted back, modulo minor typographical/formatting
differences on the acceptable-to-desirable spectrum.

To reproduce this commit, run:

  $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
    nix shell nixpkgs#coreutils \
    -c find . -name '*.nix' \
    -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
    {} +
  $ ./format

[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge/tree/home-manager
2023-07-17 18:40:56 +01:00
Emily c1d8d2a3d1 treewide: adjust some DocBook for conversion
The NixOS variant of Markdown doesn't make a distinction between
`<code>` and `<literal>` or `<quote>` and... quotes, and doesn't
support `<parameter>` or `<replaceable>`. These are infrequently used
(apart from `<code>`) and don't add much, so just convert them to
simpler forms to allow the options containing them to be converted
to Markdown automatically.

A few minor syntactic adjustments were also made to make
`nix-doc-munge`'s job easier.
2023-07-17 16:49:35 +01:00
Emily 1add3c3a99 manual: add test
This checks that the documentation can be built in the context of a
Home Manager configuration.
2023-07-16 14:26:53 +01:00
Aaron Pietscher 5598567489
zsh: fix custom syntax highlighting styles (#4236)
Previously, lines in .zshrc were added with quotes in keys
(e.g. ZSH_HIGHLIGHT_STYLES['comment']='fg=#6c6c6c'). However, zsh
considered these quotes to be part of the key, so the "comment" key
remained unchanged.
2023-07-15 11:49:12 +02:00
Sven Friedrich f63b39a67d
i3-sway: multiple outputs (#4223)
multiple outputs can be assigned to a workspace
2023-07-14 21:25:55 +02:00
Genevieve bec87d536c
aerc: add assertion to limit per-account extraConfig to UI config (#4196)
* aerc: fix per-account extraConfig section names

The aerc configuration file `aerc.conf` can contain 10 different
sections, but only the UI section supports what the aerc manual calls
contextual configuration. This works by appending to the section heading
either `:account=name` or `:folder=bar`.

The aerc-accounts module, however, applied `mkAccountConfig` to each
section heading declared in
`config.accounts.email.accounts.<name>.aerc.extraConfig.*`. This means
home-manager will generate files with `[general:account=default]` and
the options will not be recognized by aerc.

To address this, and since it doesn't make sense for other sections to
only be under a single account's scope, an assertion has been added
to confirm that only sectons that support contextual config (i.e.,
only the UI section) is declared.

This also addresses confusions like declaring
`accounts.email.accounts.*.aerc.extraConfig.general.unsafe-accounts-conf
= true` and triggering a warning message because
`programs.aerc.extraConfig.general.unsafe-accounts-conf` was unset.

This commit also updated documentation throughout the aerc modules to
be in line with this change, and fixed minor typos/formatting therein.

Co-authored-by: Genevieve <genevieve@sunlashed.garden>

* aerc: make assertion plaintext and add test case

This commit adds a test case to check both the warning on unset
`unsafe-accounts-conf = true` when aerc accounts are configured
with Nix, and the new assertion when per-account configuration
contains unsupported subsections (i.e. general).

It also fixes minor formatting issues and typos.
2023-07-14 20:34:28 +02:00
Robert Helgesson b70db52ff0
imapnotify: move test
Also add test for the systemd service.
2023-07-09 10:53:28 +02:00
David Baynard fad475553a
imapnotify: use direct nix store path for config
As pointed out in #3291, using the XDG symlink means the agent/unit
files don’t change when the contents of the config changes, and so the
service will not be restarted.
2023-07-09 09:32:25 +02:00
SaiProton e15010ee6e
nushell: add login.nu configuration option
Nushell has the option to source from the login.nu file in the case
that nushell is used as a login shell. This commit adds the login file
alongside the existing config and env files as another configuration
option.
2023-07-08 23:58:37 +02:00
SiriusStarr 24805d3ca7
himalaya: fix notmuch backend
Previously, IMAP was preferred over notmuch, even if notmuch was
configured, causing problems with setting account flavor (which
automatically sets IMAP settings). The new backend order is:

    notmuch > IMAP > maildir

This also fixes the notmuch DB path being set to the wrong location.
The notmuch DB is located at the maildir base path, not in each
account's maildir.
2023-07-08 12:37:34 +02:00
Anton Plotnikov 98282a481d
swayosd: add module 2023-07-08 12:09:09 +02:00
Tobias Markus 069d450b6d
pyenv: add module
Adds a module for pyenv (https://github.com/pyenv/pyenv).
2023-07-08 11:26:21 +02:00
Chris Martin 050d01a62c
darcs: add module 2023-07-08 10:31:45 +02:00
Robert Helgesson af715ed857
tests: some minor cleanups 2023-07-08 10:12:35 +02:00
Robert Helgesson f288310b7a
goimapnotify: remove test dependency on notmuch
Also minor test cleanup.
2023-07-08 09:58:06 +02:00
David Baynard 719de878f7
imapnotify: Add launchd agent (#3291)
* imapnotify: expose package (and exe) options

There are multiple packages that provide an imapnotify interface. Those
packages have differently named executables. This can now be customized.

This change also means test configurations can use stub packages.

* imapnotify: use/create config in configHome

Exposing the configuration file makes testing imapnotify configurations much
easier. It also allows for golden tests in home-manager.

* imapnotify: extend with launchd agent

Now that home-manager supports launchd agents, the imapnotify service
can be configured (and enabled) for darwin. The configuration matches
that of the linux/systemd version. In particular, by not setting a
`UserName`, this runs as the user whose configuration includes the
module.

Due to the launchd `Program` implementation (it must take an absolute
path) it is not possible to use that for the program and stub the path
in tests. Instead, this uses `ProgramArguments` for the program name.

The `ThrottleInterval` is equivalent to `RestartSec`. `KeepAlive` is
equivalent to `Restart`.

The `ExitTimeOut` default is 20 seconds, but goimapnotify should not
time out — this is achieved by setting the `ExitTimeout` to 0.

* imapnotify: add launchd plist test

This only tests the generated plist (which is new), not the original
systemd implementation, nor the json config file.

(Note the lack of a newline at the end of the plist file.)
2023-07-07 11:39:12 +02:00
hitsmaxft 2f78e6fcba
antidote: static file move to /tmp
Make antidote create static file path with hm hash_id in /tmp.
2023-07-05 08:30:58 +02:00
Janik 4a26e21030
programs.khal
moved highlight_event_days where appropriated and added tests
2023-07-04 12:14:47 +02:00
Rodney Lorrimar 3be2abb2e6
i18n: Use glibcLocales from NixOS if possible (#2333) (#4177)
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: #2333
2023-07-04 11:28:25 +02:00
Kylie McClain 44d1a8542a
sxhkd: allow usage of derivations as keybind commands (#4169)
This makes it consistent with some other options, like
`systemd.user.services.Service.ExecStart`.
2023-06-30 17:49:05 -06:00
ThinkChaos f5f64ac022
zsh: allow setting custom syntax highlighting styles (#4122)
* zsh: allow setting custom syntax highlighting styles

Custom styles allow overriding the default colors.
Example:
```nix
zsh.syntaxHighlighting.styles.comment = "fg=#6c6c6c";
```

See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md

* zsh: allow configuring syntax-highlighting package
2023-06-28 11:12:58 +02:00
Naïm Favier 4c08f65ab5
broot: fix test (#4170)
We can't test for the whole contents of the config file because that is
out of our control and may change unexpectedly. Only check for the
settings we know should be set.
2023-06-27 11:02:53 +02:00
hitsmaxft 491f74db89
antidote: fix package source path
Changes

  'source %antidote%/antidote.zsh'

to

  'source %antidote%/share/antidote/antidote.zsh'
2023-06-23 09:36:00 +02:00
hitsmaxft 70ac18872a
antidote: add module
Antidote is a Zsh plugin manager.
2023-06-23 00:35:00 +02:00
Clément DOUIN 9ce6977fe7
himalaya: adjust module for 0.8.X (#4093)
Added notmuch support, and adjust password commands configuration.
2023-06-21 10:59:29 +02:00
Damien Cassou ec58f8bed7
borgmatic: add missing support for output and hooks
Fixes #3760
2023-06-20 19:19:10 +02:00
Will Leinweber f06a43dca0
starship: add enable_transience for fish (#3975)
Starship has an advanced, experimental feature where fancy stuff in the
prompt can be replaced with something more simple after the command is
ran. This is very helpful for copy and pasting shell history somewhere
else.

docs: https://starship.rs/advanced-config/#transientprompt-and-transientrightprompt-in-fish

Fish is currently the only shell as far as I can tell that both
home-manager and starship support for this feature. Since the function
has to be called after starship is loaded, this seems like the best
place to put it.

format
2023-06-19 21:56:48 +02:00
Clément DOUIN e0034971f9
comodoro: add module 2023-06-14 23:43:19 +02:00
Alois Wohlschlager 75b24cc557
thunderbird: support aliases
The main email address, as well as all aliases, each get mapped to one
identity in Thunderbird. All these identities are then linked to their
account.
2023-06-14 08:31:26 +02:00
Lukas Nagel 8da1135365
aerc: improve module (#3150)
* aerc: add space after definitions

* aerc: only generate files, if options were set

* aerc: improve file permission warning

* aerc: remove redundant access to builtins

* aerc: allow overwriting of derived values

the order of merging the config subsets did not allow the user to specify
outgoing, source and password command values,
if they were previously derived from the SMTP, IMAP, Maildir etc config.

The values from `account.<name>.extraAccounts` now have the highest precedence.
Appropriate tests were added as well.

* aerc: write primary account first
2023-06-13 10:59:42 +02:00
Robert Helgesson d437f0d4e0
specialisation: fix path 2023-06-13 08:51:05 +02:00
Robert Helgesson c8dafb187b
specialisation: renamed from specialization
Renamed to be consistent with NixOS.

Fixes #4074
2023-06-13 08:44:30 +02:00
Naïm Favier b0cdae4e9b
browserpass: test on Darwin again (#4081)
https://github.com/NixOS/nixpkgs/pull/236749 is in all channels now.
2023-06-12 11:29:59 +02:00
Sefa Eyeoglu 0144ac418e
sway: add support for XDG autostart using systemd (#3747)
* sway: add support for XDG autostart using systemd

Using the option wayland.windowManager.sway.systemd.xdgAutostart, users
can now choose to start applications present in
$XDG_CONFIG_HOME/autostart when starting their sway session.

This change also renames wayland.windowManager.sway.systemdIntegration
to wayland.windowManager.sway.systemd.enable;

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>

* sway: add Scrumplex to maintainers

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>

---------

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-06-10 12:10:40 +02:00
nikp123 0945875a2a
boxxy: add module (#4075)
* boxxy: add module

 * boxxy: added nikp123 to maintainers list

* boxxy: use mkPackageOption instead for the package

Co-authored-by: Naïm Favier <n@monade.li>

* boxxy: use yaml generator instead of json

Co-authored-by: Naïm Favier <n@monade.li>

* boxxy: various fixes

* boxxy: various fixes (part 2)

* boxxy: various fixes (part 3)

* boxxy: various fixes (part 4)

forgot to run ./format, whoops

* boxxy: use literalExpression for the rewrite example

Co-authored-by: Naïm Favier <n@monade.li>

* boxxy: add news entry

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-06-09 22:32:11 +02:00
Li Yang 1e5d741ea3
Espanso: Fix broken module to be compatible with Espanso version 2.x (#4066)
* Fix espanso module to work with 2.x version

* espanso: fix espanso module

This module is currently broken. It does not create `config` and `match` folders which are required by espanso 2.x version.

This PR fixed this issue and support creating multiple files under `config` and
`match` folder.

* Espanso: fix espanso module

This module is currently broken. It does not create `config` and `match` folders which are required by espanso 2.x version.

This PR fixed this issue and support creating multiple files under `config` and `match` folder.

Add descriptions

* Add versionAtLeast and mkRemovedOptionModule

* Correct maintainers list

* remove config key from example

* format basic-configuration.nix

* Update modules/services/espanso.nix

Co-authored-by: Naïm Favier <n@monade.li>

* fix maintainers list

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-06-09 12:05:01 +02:00
Naïm Favier 69bdd6de50
tests/stubs: inherit default versions from pkgs (#4069)
* tests/stubs: inherit default versions from pkgs

* tests/browserpass: temporarily disable on darwin

The package currently fails to evaluate on darwin due to a nixpkgs
problem: https://github.com/NixOS/nixpkgs/pull/236258#issuecomment-1583450593
2023-06-09 00:59:06 +02:00
Christoph Heiss 39c7d0a97a
imv: add module (#4032)
* imv: add module

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

* imv: add test cases

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

---------

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
Co-authored-by: Naïm Favier <n@monade.li>
2023-06-07 14:51:05 +02:00
Nikita Pedorich 3512a6dafb
rtx: add module (#4051) 2023-06-07 10:32:56 +02:00
Robert Helgesson 28614ed7a1
lib: add functions to create DAGs from lists 2023-06-05 23:08:30 +02:00
Robert Helgesson 79e03fbe24
lib: remove listOrDagOf type
It has been deprecated for a long time and should be safe to remove.
2023-06-05 23:08:29 +02:00
Olmo Kramer 24d590cc32
wezterm: add integrations for Bash and Zsh (#3934)
* wezterm: Add `enableBashIntegration` option

* wezterm: Add `enableZshIntegration` option
2023-06-05 22:46:18 +02:00
Naïm Favier 607d8fad96
i3-sway: quote output names (#4059)
They can contain spaces.
2023-06-04 15:23:23 +02:00
Naïm Favier 221056c59f
tests: fix `getOutput` on stubs
Setting `outputSpecified` prevents `getOutput` from descending into
outputs, which don't have an overridden `outPath`.

Additionally, use `__spliced` to permit derivations to use the dummy as
an input.
2023-06-04 09:15:14 +02:00
Nikita Pedorich 2951946183
ripgrep: add module (#4017)
* ripgrep: add module

* ripgrep: Apply suggestions from code review

Co-authored-by: Naïm Favier <n@monade.li>

* ripgrep: fix maintainers

Co-authored-by: Naïm Favier <n@monade.li>

* ripgrep: rename config into arguments

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-06-02 17:59:12 +02:00
Naïm Favier 2d963854ae
ssh: don't install a client by default (#4016)
Make use of the recently added nullable `mkPackageOption` feature
to disable installing an SSH client by default: most people should use
the client provided by their system.
2023-05-27 14:11:50 +02:00
Dany Marcoux d1f04b0f36
yt-dlp: generate config if settings or extraConfig are defined (#4018)
Previously, the config was generated only if settings were defined. In a
case where settings weren't defined, extraConfig was ignored.
2023-05-25 15:06:34 +02:00
Philipp Mildenberger 27ef11f021
helix: update languages.toml generation (support every option in languages.toml) (#4003)
Co-authored-by: Naïm Favier <n@monade.li>
2023-05-20 17:22:06 +02:00
Naïm Favier e14e797041
neomutt: add missing stub in test (#3996)
Fixes tests on Darwin
2023-05-17 12:46:04 +02:00
Robert Helgesson b7d814c574
tests: bump nmt to latest 2023-05-16 00:23:00 +02:00
George Macon 6702b22b98
ssh: install an ssh client
Fixes #3667
2023-05-13 16:50:10 +02:00
Sefa Eyeoglu e0026e16a5
fuzzel: add module 2023-05-13 15:54:34 +02:00
Robert Helgesson eec2272999
tests: various minor cleanups 2023-05-13 00:09:52 +02:00
Erik Krieg 70c8bd08e6
zellij: disables shell integrations by default (#3981)
* zellij: disables shell integrations by default

* zellij: removes outdated comment from test
2023-05-12 13:54:26 +02:00
Sefa Eyeoglu a835096fd2
kitty: add shellIntegration (#3759)
Kitty provides integrations for bash, fish and zsh. The new
programs.kitty.shellIntegration options allow the configuration of
these integrations.

See <https://sw.kovidgoyal.net/kitty/shell-integration> for more details.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-05-12 11:20:22 +02:00
Erik Krieg cc9f65d104
zellij: adds options to integrate with zsh, bash and fish shells (#3926)
* zellij: adds options to integrate with zsh, bash and fish shells

* zellij: add tests for shell integration options

* zellij: eval setup auto start for fish integration

* zellij: use interactiveShellInit for fish integration

* zellij: fixes format issues

* zellij: enable shell integrations by default

* zellij: compresses shell integration test cases

* zellij: removes the disabled shell integration tests

* zellij: formats tests
2023-05-11 21:25:46 +02:00
Ramses d97e8f8861
systemd: accept derivations as values for systemd options (#3974) 2023-05-11 15:50:37 +02:00
Gaétan Lepage 6be873663e
ssh: add setEnv option (#3935) 2023-05-11 14:22:40 +02:00
Naïm Favier 2f6a917ade
i3-sway: fix indentation of `bar` blocks (#3978)
The `indent` function unindents the first and last line by default, so
the `"bar {"` `"}"` wrapper should go inside the list.
2023-05-11 14:04:29 +02:00
Sefa Eyeoglu 622fa73725
beets: add mpdIntegration (#3755)
Allow configuration of mpdstats and mpdupdate plugins for Beets using
Home Manager.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-05-11 14:03:54 +02:00
Jian Lin f714b17031
emacs: extend startWithUserSession to start after graphical session (#3010) 2023-05-11 13:58:37 +02:00
Mario Rodas fa720861b5
translate-shell: add module (#3659) 2023-05-11 11:21:18 +02:00
Mario Rodas b365342adb
ledger: add structural `settings` option (#3661) 2023-05-11 11:20:49 +02:00
Nate Cox 983f8a1bb9
git-cliff: add module 2023-05-09 18:53:49 +02:00
arcnmx 78ceec68f2
xsession: cleanup systemd variables (#3636) 2023-05-07 23:59:56 +02:00
amesgen 6fc82e5697
i3status-rust: revert #3938 (#3957)
* Revert "i3status-rust: satisfy new 0.31 TOML output requirements (#3938)"

This reverts commit 0e4c33d760.

* i3status-rust: assertion for unsupported versions
2023-05-07 13:42:55 +02:00
Nathan Henrie f3824311a1
readline: Add support for keynames (#3947)
Kenames like `Control-n` or `meta-p` should not be quoted or they don't work.

Keyseqs like `\C-p` or `ab` must continue to be quoted.

See also: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html

Fixes https://github.com/nix-community/home-manager/issues/3611
2023-05-04 19:39:46 +02:00
Naïm Favier ae6d5466bf
firefox: support bookmark tags (#3942) 2023-05-04 16:58:13 +02:00
Clément DOUIN 6abb775e75
himalaya: improve derivation for v0.7.X (#3664)
* himalaya: add soywod to maintainers

* himalaya: make the config safer

Also added two services and more tests.

* himalaya: fix doc + typos

* himalaya: use freeform

* himalaya: run ./format

* himalaya: make use of mkPackageOption
2023-05-04 12:28:08 +02:00
Matthias Jonen 514c0a71f4
helix: provide more detailed settings description (#3932)
Helix changed the definition of options. E.g. editor specific options
need to be prefixed with editor.
2023-05-04 00:42:04 +02:00
Yt 788777b536
nushell: add envVars attribute (#3930) 2023-05-04 00:12:21 +02:00
amesgen 0e4c33d760
i3status-rust: satisfy new 0.31 TOML output requirements (#3938) 2023-05-01 23:46:41 +02:00
Bernardo Meurer 3144311f31
zsh: allow multiple bindings to history-substring-search (#3929)
It's pretty common to need multiple bindings to
history-substring-search, since different terminals will send different
keys for up/down.

This does not break back-compatibility, and introduces a new test
2023-04-29 16:53:09 +02:00
Sinkerine 27d89b49e3
zplug: Update the path of init.zsh (#3922)
The current zplug nixpkgs puts everything under `$out/`. It pollutes the nix
profile dir.

This is a breaking change. It depends on an change of the output path in the
nixpkgs zplug package.
2023-04-29 11:08:16 +02:00
William Phetsinorath c4f3a37071
jujutsu: add module 2023-04-28 22:14:13 +02:00
Ryan Lahfa 0263da497e
notmuch & neomutt: Control virtualboxes being set in NeoMutt for Notmuch integration (#3143)
Virtual mailboxes (described by Notmuch queries) can now configured for each account in NeoMutt.
Plus, it is possible to disable Notmuch section for a specific account.
2023-04-24 16:41:29 +02:00
Bernardo Meurer a5a294a622
sway: import NIXOS_OZONE_WL into systemd
Without this, even if you configure a preference for Electron apps to
use Ozone by setting `NIXOS_OZONE_WL=1`, GUI apps launched through
systemd user services use XWayland, since the variable is not set in
their environment.

This fixes that issue by importing it, like we do other variables.
2023-04-23 20:10:16 +02:00
Yuriy Taraday 32d3e39c49
neovim: enable tests on Darwin
Checked on Apple Silicon laptop with both `aarch64-darwin` and
`x86-64-darwin`. All tests succeeded on both.
2023-04-23 00:38:01 +02:00
Christoph Heiss 3895469036
fnott: add D-Bus service file
This is needed to make fnott bus-activatable. Otherwise it won't be
started when a bus request is made [0]. Done in the same way as e.g.
dunst sets that up [1,2].

[0] https://www.freedesktop.org/software/systemd/man/systemd.service.html#id-1.10.6
[1] https://github.com/nix-community/home-manager/blob/master/modules/services/dunst.nix#L139
[2] https://github.com/dunst-project/dunst/blob/master/org.knopwob.dunst.service.in
2023-04-22 16:49:26 +02:00
Olmo Kramer 64d1f75a1e
herbstluftwm: fix default tag renaming
The previous implementation tried to rename the tag named "default" to
the first tag in `cfg.tags`. This was a wrong approach because if a
tag with the same name already existed, the renaming failed and the
default tag would continue to exist.

The looking up of the default tag also contained a bug because it
should have used `by-name` in the path.
2023-04-22 16:38:31 +02:00
Christoph Heiss 5160039edc
wofi: add module (#3786)
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-04-20 00:11:30 -06:00
Jon Seager cc05d26326
avizo: don't write a config file if settings are empty
Before this change, the default config provided by this module wrote
an empty file to `$HOME/.config/avizo/config.ini`, which caused a
bunch of errors, as Avizo tries to read a 'group' from the ini file,
which fails.

This commit also adds associated test cases.

PR #3871
2023-04-19 21:17:56 +02:00
Mika Naylor 58b8685e47
nushell: add shellAliases option
This allows nushell users to define shell aliases that are inserted
into nushell's `config.nu`.
2023-04-17 22:59:32 +02:00
VwCSXg 6db559daa9
thunderbird: add extraConfig option
The added extraConfig option allowes users to insert custom text at
the end of the generated profile `user.js` file. This allows the users
to import templates as part of their configuration.
2023-04-17 22:42:32 +02:00
Utkarsh Gupta e17e5e4f48
bottom: use xdg.configHome on Darwin
Both locations are supported, see

  https://clementtsang.github.io/bottom/nightly/configuration/config-file/default-config/
2023-04-17 21:57:35 +02:00
Paul Meyer 2df3d5d39c
swaylock: add enable and package option
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-04-15 21:17:23 +02:00
Robert Helgesson 75f4f362e1
git-sync: fix test 2023-04-15 21:17:22 +02:00
Matthew_Cash 28698126bd
thunderbird: add userChrome and userContent options
Add an option to the Thunderbird module that allows specifying CSS for
userChrome and userContent styling

PR #3808
2023-04-12 00:06:38 +02:00
Naïm Favier ec06f419af
xdg-desktop-entries: make `exec` default to null (#3827)
The [specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)
does not require those keys to be set, and the type reflects that, so
they should default to null.
2023-04-04 10:41:46 +02:00
midchildan 2acea86583
launchd: make Launch Agents config a freeform setting
Because there probably are options we don't know about.
2023-03-25 23:59:58 +01:00
midchildan 885a504f80
syncthing: add Darwin support 2023-03-25 13:09:55 +01:00
Robert Helgesson a34aaad2ae
gpg: fix URL of key in test case
Fixes #3803
2023-03-25 09:57:33 +01:00
Chuang Zhu e386ec640e
mpv: add scriptOpts option, fix tests (#3491) 2023-03-21 11:33:36 +01:00
Damien Cassou a8f5ca239f
borgmatic: optionally exclude HM symlinks from backup
Co-authored-by: Naïm Favier <n@monade.li>
Co-authored-by: Robert Helgesson <robert@rycee.net>
2023-03-21 08:56:23 +01:00
Thiago Kenji Okada b832390db3
i3status-rust: update it to handle 0.30.x releases (#3773)
* i3status-rust: update it to handle 0.30.x releases

0.30.0 is a major release that brings many breaking changes to the
configuration file. See:
https://github.com/greshake/i3status-rust/blob/master/NEWS.md#i3status-rust-0300

The only one that actually affects the module though is the change in
how the theme/icons are defined. Other changes are mostly on how to
specify formatting/blocks, and since we just generate the TOML as-is, it
needs changes in the user side.

So most changes in this commit are documentation updates, having
up-to-date examples from things that changed, e.g.: the new `click`
attribute that now can be applied to any block.

* i3status-rust: only use new format if i3status-rust >= 0.30.0

* news: document the i3status-rust changes

* i3status-rust: add thiagokokada as maintainer
2023-03-16 12:48:55 +01:00
Kylie McClain 95201931f2
qutebrowser: allow for specifying multiple commands in bindings (#3322)
This command adds the ability to specify lists of qutebrowser
commands as values for key bindings, which avoids the need for
concatenating commands with ` ;; `.
2023-03-15 19:22:12 +01:00
Janik 215af6252d
atuin: add disable key options (#3754)
Co-authored-by: Janik H <janik@aq0.de>
2023-03-15 11:52:48 +01:00
Felix Leitz 24c1a6335e
vscode: add options for global and user snippets (#3765)
Co-authored-by: Felix Leitz <felix.leitz92@gmail.com>
2023-03-13 18:45:03 +01:00
h7x4 fce9dbfeb4
lib: add generator for KDL
Added a generator for the KDL document language.
This is in order for home-manager to natively generate
the new config format for zellij, as described in nix-community#3364.

There is not a one to one mapping between KDL and nix types,
but attrset translation is heavily based on KDLs JSON-IN-KDL microsyntax.
The exception here is the `_args` and `_props` arguments, which lets you
specify arguments and properties as described in the spec.

See more here:
- https://kdl.dev/
- https://github.com/kdl-org/kdl/blob/main/SPEC.md

The generator also conforms to the interface from the nixpkgs manual:
https://nixos.org/manual/nixpkgs/stable/#sec-generators

Co-authored-by: Gaetan Lepage <gaetan@glepage.com>
2023-03-10 16:48:10 +01:00
Naïm Favier 3c18113bd7
mpd: add `extraArgs` (#3735)
Allow passing arguments to the MPD command line. Currently the only
interesting one is `--verbose`.
2023-03-05 09:41:34 +01:00
Robert Helgesson b9e3a29864
recoll: fix generation of string lists
The updated implementation will quote string lists as per the
description at

  https://www.lesbonscomptes.com/recoll/usermanual/#RCL.INSTALL.CONFIG

Fixes #3732
2023-03-02 20:01:51 +01:00
Kira Bruneau 564b82b354
firefox: fix search options without a default engine 2023-02-21 22:13:10 +01:00
Olmo Kramer 5e889b385c
mpd-mpris: add module 2023-02-20 23:43:42 +01:00
Naïm Favier 72ce74d3ea
qt: auto-detect style package from name (#3692)
* qt: auto-detect style package from name

* qt: test package auto-detection
2023-02-20 12:30:29 +01:00
Naïm Favier 5ffb0f1f81
tests: fix gnupg stub (#3685)
systemd now depends on `gnupg.override`, so we need a stub for systemd too.
2023-02-19 11:19:00 +01:00
Sumner Evans 2dce7f1a55
tests: fix formatting (tab -> spaces) (#3660)
Signed-off-by: Sumner Evans <me@sumnerevans.com>
2023-02-09 10:37:26 +01:00
Naïm Favier 1232d0e133
Revert "mbsync: make passwordCommand escaping consistent" (#3657)
This reverts commit e2c1756e3a.
2023-02-08 21:39:10 +01:00
Robert Helgesson 7529a2674a
scmpuff: clean up tests
Stub the scmpuff package. Also remove unnecessary `config` wrapping.
2023-02-07 22:19:10 +01:00
Guillaume Desforges 9621e9ab80
programs.neovim: add extraLuaConfig (#3639)
* programs.neovim: add extraLuaConfig

Add a configuration option to add custom lua configuration lines to
`lua.init`.

* apply review: formatting

* apply review: fix test
2023-02-05 12:09:26 +01:00
Kira Bruneau 9f4268e6b6
firefox: support passing any json value to settings (#3580)
Firefox internally only supports bool, int, and string types for
preferences, but often stores objects, arrays and floats as strings.

This change makes it nicer to specify those type of preferences in
Nix, and it also makes it possible to merge objects & arrays across
multiple modules.
2023-02-05 11:23:22 +01:00
Stanislav Asunkin e3f28ddb0d
tmux: fix secureSocket environment variable (#3593) 2023-02-05 11:22:41 +01:00
Damien Cassou ca69be9335
borgmatic: Do not inhibit idle in service (#3637)
This reflects a systemd service sample file change made in borgmatic
1.7.6, commit 2e9f70d49647d47fb4ca05f428c592b0e4319544:

    When backing up a machine with a monitor using logind to control
    idle timeout and things like DPMS, borgmatic can block the screen
    from turning on/off with systemd-inhibit. This is because by
    default systemd-inhibit will block
    "idle:sleep:shutdown". Borgmatic does not need to care about idle,
    only about suspend and shutdown. So, add an explicit `--what` flag
    for what borgmatic should inhibit.

    For more information see systemd-inhibit(1).
2023-02-05 11:13:04 +01:00
Tomo ffc022b6a7
vim-vint: add module (#3604)
* vim-vint: add module

* vim-vint: add tests

* maintainers: add tomodachi94

* vim-vint: fix tests

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-05 11:12:28 +01:00
Sleroq 2ffc6d6496
tmux: mouse support (#3642)
Co-authored-by: Sleroq <sleroq@sleroq.link>
2023-02-05 11:02:14 +01:00
Jarkad e2c1756e3a
mbsync: make passwordCommand escaping consistent (#3630)
* Fix mbsync passwordCommand escaping

* email: use lib.escapeShellArgs

Co-authored-by: Naïm Favier <n@monade.li>

* mbsync: update tests

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-03 23:22:11 +01:00
David Houston 1d94de5604
pass-secret-service: various improvements
Allow setting the application package and storePath used by the
config. Since the `programs.password-store` Home Manager module sets
config values via global environment variables, the default behavior
of the module should continue to behave as before for the user.

Additionally,

- Adds a few tests.

- Use "escapeShellArg" function call to the path parameter call to
  ensure paths with spaces work.

- Allow not setting storePath, which will cause `pass_secret_service`
  to default to using `~/.password-store`.

- If `pass-secret-service` is enabled, set its store path to default
  to the one defined in our password-store environment settings.

- Add myself (houstdav000) as maintainer.
2023-01-31 23:19:09 +01:00
Sefa Eyeoglu 69696fe539
wlogout: add module (#3629) 2023-01-31 17:06:18 +01:00
Mario Rodas 08a778d803
papis: add module 2023-01-28 18:51:48 +01:00
Lars Mühmel 7efca2ca18
files: allow disabling creation of a file
PR #3622
2023-01-26 22:31:16 +01:00
Mario Rodas c59f0eac51
treewide: fix typos (#3618) 2023-01-24 11:30:04 +01:00
arcnmx d633afe0d9
i3-sway: config.focus.wrapping deprecates forceWrapping (#3467)
Stop using the legacy syntax described in the i3 documentation:
https://i3wm.org/docs/userguide.html#_focus_wrapping
2023-01-15 19:20:13 +01:00
Olmo Kramer 2cff1c7642
ncmpcpp: Allow `str` type values for `mpdMusicDir` option (#3565)
The default value of `programs.ncmpcpp.mpdMusicDir` is taken from
`services.mpd.musicDirectory` if the mpd module is enabled, which has
type `either path str`. `programs.ncmpcpp.mpdMusicDir` did not accept
`str` values, though, so an error was raised when the default value was
used and `services.mpd.musicDirectory` was set to a value of type `str`.

This commit changes the type of `programs.ncmpcpp.mpdMusicDir` to also
accept `str` to reflect the type of `services.mpd.musicDirectory`.

Fixes #3560
2023-01-07 11:59:51 +01:00
Martin Weinelt d01e7280ad
i3-sway: Use foot as default terminal on sway (#3490) 2023-01-03 19:26:08 +01:00
Ramses a993eac106
neovim: fix extraLuaPackages type. (#3533)
Assigning to `programs.neovim.extraLuaPackages` a function taking a lua package set as input
and returning a list of packages, as described in the documentation,
threw an error because the rest of the code assumed that the value was always a plain list.
Using `lib.types.coercedTo`, we can accept such functions, as per the documentation,
as well as plain lists, which we then convert to a function ignoring its input argument.
We print a warning when a plain list is assigned, since the function
form is preferred, as it ensures that the right lua package set is used.

For the lua packages, we also get the lua package set from the
finalPackage, to make sure that we are always using the same package set
as the actual unwrapped neovim package being built.

For `programs.neovim.extraPythonPackages` I did the same.

I updated the test case so that we test both ways of setting these options.
2022-12-29 01:48:45 +01:00
Jarosław Wygoda fb49fbc368
clipman: add module 2022-12-28 23:02:08 +01:00
Robert Helgesson 8745cc9a21
parcellite: add basic test case 2022-12-28 22:16:47 +01:00
Mika Naylor 3ad22341a2
direnv: enable nushell integration
This enables nushell integration by default for direnv, similar to
bash/zsh/fish. The slightly verbose way of setting this is to ensure
that peoples' existing nushell configuration isn't overwritten, only
appended to, as would be the case if we just used the integration
example from the nushell docs:

  https://www.nushell.sh/cookbook/direnv.html

Closes #3520
2022-12-28 21:09:31 +01:00
Robert Helgesson d7a3c26854
broot: simplify test slightly 2022-12-28 20:49:19 +01:00
Robert Helgesson 18b56e3f7d
broot: update test to match upstream changes
Fixes #3527
2022-12-28 20:36:15 +01:00
Robert Helgesson 939731b8cb
cachix-agent: add module 2022-12-25 09:54:43 +01:00
Robert Helgesson 0f8bf4f92e
herbstluftwm: merge improvements 2022-12-21 00:20:28 +01:00
David Armstrong Lewis b44f56dfcd
nushell: support darwin config file locations
Previously the nushell module did not differentiate between Linux and
Darwin when deciding where to place config files, whereas nushell
does. This commit fixes that.
2022-12-20 23:57:11 +01:00
Olmo Kramer 47bb9e7569
herbstluftwm: Reset mousebinds on (re)load
Keybinds and rules were already reset, but now also the mousebinds are.
2022-12-19 22:40:24 +01:00
Olmo Kramer 1a0a5f5037
herbstluftwm: Fix error when no tags set
The default value for `xsession.windowManager.herbstluftwm.tags` is an
empty list, but the config file uses `builtins.head` on it, which causes
an error upon evaluation. With this change the tags configuration is
skipped if the list is empty.
2022-12-19 22:40:24 +01:00
Matthew Toohey b7eb400d41
pistol: refactor
This pull requests refactors the pistol configuration options, since
the current options are deficient in a few ways.

Closes #3486
2022-12-16 17:05:30 +01:00
Matt Bryant e412025fff
borgmatic: allow lists in extraConfig
In particular, we should be able to specify `exclude_backups` in our
configuration.

Fixes #3489
2022-12-13 23:34:49 +01:00
Robert Helgesson 263f6e4523
i3status-rust: fix tests
Nix 2.12.0 slightly changed the JSON output format. This updates the
i3status-rust test cases to match.
2022-12-13 22:10:22 +01:00
Gaetan Lepage 054d9e3187
gpg: update hash in test 2022-12-08 16:36:10 +01:00
mat ess 7e81e7ae2b
fish: always run fish_indent 2022-12-05 23:16:39 +01:00
Mario Rodas 6ce326cef9
treewide: use liberachat and OFTC in examples
Freenode was taken over by a wannabe bitcoin millionaire [1], which
prompted the migration of communities to Libera Chat and OFTC [2].

[1] https://blog.bofh.it/debian/id_461
[2] https://hackaday.com/2021/05/20/freenode-debacle-prompts-staff-exodus-new-network/
2022-12-05 10:38:54 +01:00
David 2b02f8c7cb
thunderbird: use account id for IMAP directory name
This allows users to have multiple accounts on the same domain within
the same profile.

Fixes #3448.
2022-12-04 13:49:29 +01:00
Robert Helgesson 7bfe3cd9b0
firefox: fix expected bookmarks in test 2022-12-04 13:29:25 +01:00
Robert Helgesson 848ae0d6bb
neovim: avoid aliased package 2022-12-04 13:13:19 +01:00
Robert Helgesson 65700a4fd1
polybar: fix restart trigger
The old trigger would actually never cause a restart since the path
doesn't change. With this change the trigger is now using the actual
configuration path in the Nix store, which depends on the content.
2022-12-04 12:12:32 +01:00
toastal 9fb1bb9794
himalaya: 0.6.x config updates
Some properties were renamed. Big changes however include `backend` and
`sender` enum options.
2022-12-04 09:34:47 +01:00
mat ess ca48fced83
fish: format user and generated .fish files
Adds a `fishIndent` wrapper to pass fish scripts to the built in
`fish_indent` function.
2022-12-04 09:07:54 +01:00
Andrew Marshall 478610aa37
neovim: Source neovimRcContent directly from store (#3444)
The previous version linked the file into home, then sourced that. Since
nothing else expects that file to be there, this is unnecessary.
Additionally, doing so made it impossible to test a built config without
switching, e.g. using `XDG_CONFIG_HOME=… nvim` or `nvim -u`. This
remedies that, at least for this particular reference.

To test this, change from asserting contents of the config file to
actually starting nvim, outputting sentinel values, and then asserting
their values are present. This way it’s tested that nvim loaded the
config, rather than that some config is in a specific place.

This is all in one commit as the test, as written now, would not have
worked before since the previously hard-coded home path was not an
actual file in the test environment.
2022-11-30 17:19:31 +01:00
Jakub Fišer 1bdbebc3f8
ssh: add generic Match support for matchBlocks (#2992)
* ssh: add generic Match support for matchBlocks

Introduce conservative support for actual `Match`
blocks in ssh config.

"Conservative" means this PR doesn'tt try to process
the `match` expression and simply uses it as a string
provided by the user.

If set, `match` has precedence over `host` meaning
if both are set, `match` is used and `host` is ignored.

* Add news entry
2022-11-27 16:15:32 +01:00
Philipp Mildenberger 4a12f304e0
nushell: add options 'extraConfig' and 'extraEnv' 2022-11-27 09:09:09 +01:00
Andrew Marshall cc58d31953
flake: Expose tests to allow running purely (#3412)
* flake: Expose tests to allow running purely

The existing way to run tests with `nix-shell` relies on impure usage of
`<nixpkgs>`. This can lead to failures when the local nixpkgs is
incompatible with the locked one. I.e., where CI is passing but a
contributor may experience a failure.

So, expose tests as `devShells.tests` to use the locked nixpkgs and
allow easy invocation via `nix develop`.

* tests: Remove impure path

With Nix 2.10+ and pure evaluation mode e.g.

```
nix run nixpkgs/nixos-unstable#nixVersions.nix_2_10 -- develop -i .#tests.zplug-modules
```

this test would fail with:

> error: the path '~/.customZplugHome' can not be resolved in pure mode

Since the test only cares that it is a path, rather than anything about
its contents, use a dummy empty directory.
2022-11-27 01:37:24 +01:00
h7x4 64f7a77517
polybar: don't generate config if no options are set (#3383)
* polybar: don't generate config if no options are set

* polybar: add h7x4 as maintainer
2022-11-27 01:17:28 +01:00
Phillip Cloud f7641a3ff3
scmpuff: add fish integration flag 2022-11-21 23:51:05 +01:00
Thiago Kenji Okada c94c9c342f
picom: remove experimentalBackends, add extraArgs (#3423)
`--experimental-backends` flag was removed in the recent released picom
v10. Using it now will result in the program exiting.

v10 also introduces its counter-part, `--legacy-backends`. However this
will be removed soon. Instead of adding this as an separate option, add
`extraArgs` option so for those that they want they can pass it manuall.
It is also more future proof.
2022-11-18 08:59:30 -07:00
Andrew Marshall bc90de24d8
xdg-user-dirs: allow setting to null to skip setting
Previously, this module was all-or-nothing with its pre-defined user
dirs. This allows e.g. `xdg.userDirs.desktop = null;` to opt-out of
some configuration while still benefiting from the rest.
2022-11-13 10:38:54 +01:00
Robert Helgesson 5dd3ce3f1e
mu: use absolute path to mu in activation block 2022-11-07 15:09:31 +01:00
midchildan c728307482
darwin: use full path to commands in activation script 2022-11-05 12:14:08 +09:00
David b764068a50
thunderbird: add module
Add a new Thunderbird module that uses the configuration in
`accounts.email.accounts` to setup SMTP and IMAP accounts.

Multiple profiles are not supported at this point.
2022-11-04 16:12:12 +01:00
natsukium 9333581075
vscode: add userTasks test 2022-11-03 10:36:21 +01:00
Arjan Schrijver 04e844090e
oh-my-posh: add module 2022-11-02 01:04:42 +01:00
polykernel 2464c21ab2
sway: import XDG_SESSION_TYPE in systemd user environment (#3328)
- The `XDG_SESSION_TYPE` environment variable is used by some applications and frameworks to
  detect wayland sessions (i.e qt5/6, electron/chromium). It is set by wlroots since version 0.13.0 [1].

- Propagating `XDG_SESSION_TYPE` to the systemd user environment is necessary when processes launched by
  services (e.g emacs) need to inherit the environment variable.

[1] - 90c8452959
2022-10-31 13:09:06 +01:00
David Morgan 160025ca46
irssi: add option for SASL external authentication 2022-10-31 09:28:49 +01:00
Markus S. Wamser d3f21617ac
vscode: add options to disable update checks
Update notification popups are annoying when vscode/vscodium is
managed by Home Manager. However, as these settings also require the
configuration to be managed via `userSettings`, they are disabled by
default.
2022-10-27 18:16:03 +02:00
Paul Meyer 7dc4e4ebd7
k9s: add module 2022-10-25 00:05:50 +02:00
Damien Cassou 186d9399f9
borgmatic: specify where to find sleep (#3349)
Closes #3348.
2022-10-23 16:52:22 -04:00
Kira Bruneau 69d19b9839
firefox: support setting search engines
With this change, it's now possible to configure the default search
engine in Firefox with

  programs.firefox.profiles.<name>.search.default

and add custom engines with

  programs.firefox.profiles.<name>.search.engines.

It's also recommended to enable

  programs.firefox.profiles.<name>.search.force = true

since Firefox will replace the symlink for the search configuration on
every launch, but note that you'll loose any existing configuration by
enabling this.
2022-10-22 20:36:04 +02:00
David Warde-Farley c485669ca5
i3status: add `package` attribute 2022-10-20 10:04:30 +02:00
j-brn 42f81ac107
looking-glass-client: add module 2022-10-18 10:12:15 +02:00
Damien Cassou 04f5399978
borgmatic: add module 2022-10-16 21:51:52 +02:00
arcnmx e1f1160284
redshift/gammastep: add `enableVerboseLogging` option
This option controls whether the `-v` command line argument is given.

Co-authored-by: Sumner Evans <me@sumnerevans.com>
2022-10-09 01:21:05 +02:00
Gabriel Arazas bd87a34bb4
sioyek: enable multiple bindings for the same command 2022-10-08 22:11:55 +02:00
ralismark 9fcae11ff2 systemd: name slice unit correctly 2022-10-07 16:07:53 +11:00
Philippe Laflamme 7fee13eb4c
sbt: cache `passwordCommand` output
This will cache the output of `passwordCommand` per authentication
realm.

Context: the `credentials` key in `sbt` is a `TaskKey[Seq[Credentials]]`.
In `sbt`, tasks are evaluated on-demand and their output is not cached.
This particular key is referenced by all submodules in a project. When
the command is relatively expensive (e.g.: `pass show foo`), this
results in several seconds of delay when doing basic things like
`compile` or `test` which makes this unusable without some kind of
caching.
2022-10-07 00:40:50 +02:00
Philippe Laflamme 599e22b1c7
sbt: allow managing the `~/.sbt/repositories` file
sbt allows overriding the default repositories to use to resolve
dependencies. This is often used with proxies and/or private
repositories to host internal packages.

This change adds a `repositories` attribute to `sbt` to allow
specifying the values that will go in `~/.sbt/repositories` file.

To support the above change we also deprecate the `baseConfigPath`
option in favour of `baseUserConfigPath` which points one level higher
by default. This allows not using relative paths to refer to the
top-level configuration directory.

Also adds tests for the new option and the deprecation of the previous
one.
2022-10-07 00:23:29 +02:00
Tad Fisher e4e639dd4d
programs/lieer: use lieer package (#3262)
The gmailieer attribute was aliased to lieer in nixpkgs.
2022-10-03 09:50:40 +02:00
arjan-s e7be7c4688
pls: add module (#3285) 2022-09-30 12:53:39 -04:00
Liam Petrie 864ff685fe
lib: add two new gvariant types
Add GVariant variant and dictionary entry types
2022-09-29 13:05:51 +02:00
Chan Siu Man 1f5ef2bb41
broot: fix config file location (#3273)
At commit [5666e6b9](5666e6b9fb),
broot refactored the content of the file `/resources/default-conf.hjson`
into multiple files under the directory `/resources/default-conf`, using
[`imports`](5666e6b9fb/resources/default-conf/conf.hjson (L152-L165))
to refer to other configurations.

This refactoring is effective since version 1.14.0 of broot.

After this refactoring, in `xdg.configFile.broot` (which defaults to
`~/.config/broot`):
- we need to copy all potentially referenced files (all files under
  `resources/default-conf`),
- except we need to leave out `conf.hjson` which conflicts with the
  `conf.toml` generated by home-manager (because broot [accepts both conf.toml and conf.hjson](https://dystroy.org/broot/conf_file/))

To implement this, we use `symlinkJoin` to create the content of
`xdg.configFile.broot` by merging multiple sources.
2022-09-27 12:19:02 +02:00
Robin Stumm 65b65ce5ef
broot: use upstream defaults, allow all config options (#2644)
* broot: use freeformType for config

* broot: use defaults from upstream

closes #2395

* broot: generate shell function

* broot: add @dermetfan to CODEOWNERS

* broot: rename `config` option to `settings`

* broot: make example more idiomatic

Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>

Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
2022-09-26 20:36:06 +02:00
José Luis Lafuente 707cb75ed3
tmate: add module 2022-09-26 00:28:00 +02:00
Joosep Jääger de3758e31a
neovim: fix a typo in the generated init.lua (#3252)
neovim complains when having both an init.lua and an init.vim
2022-09-23 13:33:17 +02:00
Matthieu Coudron bd83eab622
programs.neovim: default to init.lua (#3233)
We change the current logic: instead of writing an init.vim which loads
lua/init-home-manager.lua, we write an init.lua that sources init.vim

This commit also avoids writing any of these files if the plugins have
no config.
2022-09-22 10:39:55 +02:00
Loïc Reynier f5e4614c11
yt-dlp: add `settings` option 2022-09-22 00:09:35 +02:00
David Baynard 41790ba656
mbsync: extend config type with list of strings
Some configuration options can take space separated strings; for
example `SSLVersions` can be configured with multiple allowed
versions.

    SSLVersions TLSv1.3 TLSv1.2

This can now be represented in Home Manager.

    SSLVersions = [ “TLSv1.3” “TLSv1.2” ];

In implementing this change, it uses oneOf for config type, as it is a
cleaner way to represent the union than the nested eithers
formulation.

Also add SSLVersions to test lists of strings in
`account.extraConfig`.
2022-09-20 01:24:21 +02:00
Robert Helgesson 5427f3d1f0
mpd: use XDG music dir if XDG user dirs are enabled
If the user has enabled the XDG user directories module then we can
use the XDG music directory in the MPD module. Otherwise we'll leave
the option undefined so that the user is forced to define the
directory to use.

This applies to state version 22.11 and above.

Fixes #3225
2022-09-16 13:41:40 +02:00
Mario Rodas f9f4c8e1e7
gallery-dl: add module
gallery-dl [1] is a cli to download image galleries from several image
hosting sites.

[1] https://github.com/mikf/gallery-dl
2022-09-09 11:56:37 +02:00
Gabriel Volpe 6ec6b2e362
nheko: add module 2022-09-08 19:09:30 +02:00
Charlie Moog 340ec22f6f
git: add config helper for hooks 2022-09-08 11:05:07 +02:00
Loïc Reynier de94878b6b
editorconfig: add module (#3204)
Add a module to generate `~/.editorconfig` configuration file.

Co-authored-by: Robert Helgesson <robert@rycee.net>
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2022-09-06 07:50:36 -06:00
Lily Foster 140aaed3df
git: gpg sign tags with signing.signByDefault set
The `tag.gpgSign` config option was added in Git 2.23.0 and seems like
it should be set in addition to `commit.gpgSign` when
`programs.git.signing.signByDefault` is enabled
2022-09-05 14:52:39 +02:00
Gaetan Lepage de079ec371
btop: add module 2022-09-05 14:34:37 +02:00
Robert Helgesson 960c009ce0
git-sync: minor test cleanup 2022-09-05 13:51:03 +02:00
cab 66cc5c7ef9
git-sync: add ssh to path
This fixes automated pushing to repository.
2022-09-05 13:15:40 +02:00
Matthew Toohey d89bdff445
sway, bspwm: add extraConfigEarly (#2847) 2022-08-27 00:09:46 -04:00
Ryan Horiguchi 375631f35b
firefox: support nested folders in bookmarks (#3112) 2022-08-26 21:28:57 -04:00
Ronny Pfannschmidt 5bb1f67568
git: add option to define store names for generated include files (#3171)
This allows to use gitconfig/gitconfig-some-intent
as store path suffixes for the texts.
2022-08-26 15:48:50 -04:00
Matthieu Coudron 4c8c1c9977
kitty: produce fewer empty lines
This generates a more compact configuration file.
2022-08-26 00:17:05 +02:00
Matthieu Coudron 353d21e108
neovim runtime (#3168) 2022-08-23 22:02:05 +02:00
Lily Foster 991ff35249
udiskie: add tests 2022-08-23 20:11:40 +02:00
Sumner Evans 688e5c85b7
neovim: fix tests (#3147)
https://github.com/NixOS/nixpkgs/pull/184364 broke the tests

Closes #3146

Signed-off-by: Sumner Evans <me@sumnerevans.com>
2022-08-15 08:41:57 -06:00
Chua Hou 44dcad5604
wezterm: support color schemes
Allows users to specify TOML color schemes using Nix.
2022-08-14 20:57:22 +02:00
amesgen 8675cfa549
gh: add `extensions` option 2022-08-12 20:49:50 +02:00
amesgen 78f964347c
tests.stubs: set `pname` 2022-08-12 20:49:49 +02:00
Lukas Nagel 324fedcf9f
Add module for aerc (#3070)
This adds support for configuring email accounts, with automatic smtp, imap,
sendmail (msmpt) and maildir (mbsync, offlineimap) setup in aerc,
via `accounts.email`.
2022-08-11 23:08:28 +02:00
Robert Helgesson f5e9879e74
bash: support bash completion 2022-08-07 15:25:44 +02:00
Hemanth Bollamreddi d9e03b7f8c
wezterm: add module 2022-08-07 11:11:56 +02:00
Robert Helgesson 91f26e0b0e
polybar: use add `.ini` suffix to configuration file
The old name is deprecated and causes a warning to be logged.
2022-08-07 10:51:38 +02:00
Lily Foster 77648a07e4
hyfetch: prevent writing config with default/empty settings (#3124) 2022-08-01 19:58:38 -04:00
Lily Foster d1c677ac25
hyfetch: add module 2022-08-01 18:38:42 +02:00
Gabriel Arazas 0e2f7876d2
recoll: add module 2022-07-27 14:25:27 +02:00
Loïc Reynier a3b778e672
spectrwm: add module
PR #3077
2022-07-25 13:42:06 +02:00
midchildan 572f348a10
darwin: add support for 'defaults -currentHost' options
Closes #2615
2022-07-24 15:17:21 +02:00
Ryan Horiguchi d86c189158
firefox: support showing bookmarks on toolbar 2022-07-23 15:28:14 +02:00
h7x4 64c745fe1c
firefox: add support for nested bookmarks
Change type of `firefox.profile.<name>.bookmarks` to allow for nested
bookmarks with user defined order.
2022-07-18 14:55:54 +02:00
Robert Helgesson 45ef70cc73
swayidle: remove unnecessary config wrapper 2022-07-12 12:02:01 +02:00
Joe Neeman 43ea4c5123
swayidle: fix systemd service
swayidle executes commands using "sh -c" and so its PATH must contain
a shell. This adds such PATH entry to the environment of the systemd
service.

Fixes #2811.
2022-07-12 12:01:04 +02:00
Naïm Favier 6311f4adc3
lib/types: make DAG entries mergeable
Removes the `uniq` constraint on `after` and `before` so that we can
merge multiple definitions for the same DAG entry:

    {
      dag = mkMerge [
        {
          foo = lib.hm.dag.entryBefore [ "bar" ] {
            # definition 1
          };
        }
        {
          foo = lib.hm.dag.entryBefore [ "qux" ] {
            # definition 2
          };
        }
        {
          foo = {
            # definition 3
          };
        }
      ];
    }

In this example `foo` will come before `bar` and `qux`.
2022-07-12 11:47:38 +02:00
Thiago Kenji Okada b908e61dfa
picom: sync module with the NixOS version
This brings a few advantages:

- Use of float instead of strings to represent float values,

- Use of structure settings, and

- Better type checking for some settings

Also add thiagokokada as codeowner of picom.
2022-07-12 11:21:49 +02:00
Shamrock Lee 8d5b07fc83
tests: fix impurity of _module.args.pkgsPath 2022-07-09 16:30:17 +02:00
oxalica 25a9948361
sway: import dbus env vars and explicitly specify them (#3031)
- Importing all environment variables is considered deprecated for
  `systemdctl import-environment`. The list of variables are picked
  from:
  https://github.com/swaywm/sway/wiki/Systemd-integration#managing-user-applications-with-systemd

  The `XDG_CURRENT_DESKTOP` is said to be required for portals, see:
  https://github.com/nix-community/home-manager/pull/2385#issuecomment-1026454162

- DBus activation environment should also be updated. Otherwise, DBus
  activated programs, without a coresponding systemd service, cannot get a
  correct environment and would fail, eg. `mako`.
2022-07-07 11:03:58 -06:00
Naïm Camille Favier face4094d4
bspwm: add missing rule setting `rectangle` (#2974)
Also add a `freeformType` so that we don't have to do this in the
future.
2022-07-06 23:36:20 -04:00
Robert Helgesson 9550595502
docs,tests: fetch nmd and nmt using fetchTarball
This simplifies the code a bit and avoids using experimental Flake
functionality. If Flakes become stable before NixOS 22.11 then we can
consider having nmd and nmt as Flake inputs. Maybe could then also
avoid the need for flake-compat.
2022-06-26 22:22:46 +02:00
Matthew Toohey 223b9deead
pistol: add module 2022-06-25 01:00:32 +02:00
Michael Forster 65bcfaccc5
micro: add module
This adds initial bare-bones support for the `micro` editor.
2022-06-24 19:19:11 +02:00
Eliza Velasquez d059b9448a
mujmap: add module
mujmap is a tool that synchronizes mail between a mail server and
notmuch via JMAP. It's very similar to lieer, so I heavily based the
implementation of the notmuch module on lieer's. I did not include an
equivalent to lieer's periodic synchronization service, however,
because I plan to soon introduce a daemon mode to mujmap.

https://github.com/elizagamedev/mujmap
2022-06-22 00:33:10 +02:00
Kritnich 1ebbef8642
barrier: change `enableCrypto` behaviour
`--enable-crypto` is deprecated because crypto is now enabled by default.
`--disable-crypto` should be used instead.
Fixes https://github.com/nix-community/home-manager/issues/3001
2022-06-21 21:59:19 +02:00
Shamrock Lee 60b064249d
treewide: remove trailing white spaces and tabs 2022-06-21 00:55:32 +02:00
Philipp Mildenberger 931e610552
nushell: update configuration management
Recent versions of nushell uses a different configuration setup. This
commit adjusts the module to match.

Fixes #2952
Fixes #2837
2022-06-21 00:39:00 +02:00
Robert Helgesson 3c710201d5
version: remove default value
The user should always explicitly set the state version they wish to
use. Indeed, the configuration generated by the Home Manager install
script has set this option for a long time. This removal should
therefore not affect many users.
2022-06-21 00:06:53 +02:00
Damien Cassou 931653b99f
emacs: optionally start service with the session
Add services.emacs.startWithUserSession boolean to indicate that Emacs
must be started with the systemd user session. This is true by default
unless socket activation is also true.

In the past, the user had to choose between socket activation (to get
the Emacs service started when the user uses emacsclient) and
immediate start with the user session. When choosing immediate start
over socket activation and if the Emacs service is stopped at some
point, using emacsclient would start a new Emacs daemon but the
service would still be turned off. This situation would prevent
`home-manager switch` from completing successfully because it wouldn't
be able to start the Emacs service as Emacs is already running.

This new setting makes it possible to have both socket activation and
immediate start at the same time. In this scenario, Emacs is started
with the user session and, after the Emacs service is stopped, using
emacsclient starts the service again.

This new settings also makes it possible to have neither socket
activation nor immediate start.
2022-06-19 01:09:41 +02:00
Naïm Camille Favier 1de492f6f8
format: update and remove exceptions (#3029)
Switches to nixfmt 0.5.0 and removes exceptions for files without open
PRs.
2022-06-16 14:13:06 +02:00
rcerc 70824bb5c7
swaylock: Add module (#3003) 2022-06-07 21:01:14 +02:00
Naïm Camille Favier 64ab7d6e8d
Prepare inclusion in nixos-search (#2971)
* Add flake.lock and clean up flake.nix

Add a lockfile to work around https://github.com/NixOS/nix/issues/6541
(and because it's a good idea anyway).

Also use flake-utils, and restrict ourselves to the five platforms
supported by nixpkgs. Otherwise, the IFD for nmd fails on weird
platforms. This fixes `nix flake check`.

Remove the redundant `apps` output, see https://github.com/nix-community/home-manager/pull/2442#issuecomment-1133670487

* nixos,nix-darwin: factor out into a common module

* nixos,nix-darwin: make `home-managers.users` shallowly visible

Make sure the option is included in the NixOS/nix-darwin manual (but the
HM submodule options aren't).

Also add a static description to the HM submodule type so that we don't need to
evaluate the submodules just to build the option manual. This makes
nixos-search able to index the home-manager flake.

Also clean up some TODOs.

* flake: add nmd and nmt

This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes
issues when indexing packages with nixos-search because `pkgs` is
instantiated with every platform.
2022-06-07 20:45:06 +02:00
NomisIV bda2c80b4c himalaya: fix account.folders to new config syntax 2022-05-30 21:06:52 +02:00
midchildan 64831f938b
emacs: allow extraConfig to reference extraPackages
This fixes the issue described in

  https://github.com/nix-community/home-manager/pull/1758#issuecomment-1113706592
2022-05-26 00:34:17 +02:00
Robert Helgesson 2c8489e57a
mpdris2: add basic test cases 2022-05-25 18:43:22 +02:00
Roman Timushev e6869735d2
htop: fix darwin defaults
M_SHARE is not a valid column on Darwin. It seems that previously htop
ignored unknown columns, but the current version does not display all
subsequent columns.
2022-05-19 23:33:20 +02:00
Gabriel Arazas cb9f03d519
mopidy: add module
This is adapted from the `services.mopidy` NixOS module. The
difference is the setting can be configured with Nix language, taking
advantage of generators from nixpkgs. The module is also suited more
for user-specific configuration, removing the `extraConfigFiles` and
`dataDir` option.
2022-05-19 00:31:37 +02:00
Robert Helgesson 0304f0f58b
specialization: add module
This module adds basic support for configuration specializations.
These allow the user to build multiple alternative configurations that
should be part of the same generation.
2022-05-03 00:42:23 +02:00
Sumner Evans f8b51be714
neomutt: add support for signature command (#2899)
Neomutt will run the given command (which can be a string or a path)
and take the output from stdout and use it as the signature for your
email.

Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
2022-04-29 14:01:53 -06:00