1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-01 10:58:31 +02:00
Commit Graph

483 Commits

Author SHA1 Message Date
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
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
rcerc
70824bb5c7
swaylock: Add module (#3003) 2022-06-07 21:01:14 +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
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
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
Robert Helgesson
778af87a98
i3status-rust: fix formatting 2022-04-26 23:04:50 +02:00
Robert Helgesson
65a32578d9
helix: fix test 2022-04-24 09:17:04 +02:00
Sumner Evans
2e473a7b09
neomutt/signature: unset if disabled (#2877)
Closes #2876
2022-04-16 16:36:31 -06:00
Daniel Thwaites
a640dddc9a
waybar: fix command not found when reloading (#2865) 2022-04-16 18:31:03 -04:00
Robert Helgesson
55779b20cd
pandoc: fix test case 2022-04-08 00:06:23 +02:00
x10an14
e361373b5f
taskwarrior: make .taskrc writable (#2761)
This is achieved by generating the Home Manager configuration
file as `~/.config/task/home-manager-taskrc`, and including that
file into ~/.config/task/taskrc.

Fixes #2360

Co-authored-by: mainrs <5113257+mainrs@users.noreply.github.com>
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
2022-04-07 13:29:53 -04:00
André Silva
66ffa7a0a6
systemd: fix creation of user service unit files (#2867)
* systemd: fix creation of user service unit files

* helix: fix failing test due to file output format change

Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
2022-04-07 02:38:20 -04:00
Yevhen Shymotiuk
d123fca83c
browserpass: add brave support 2022-03-27 01:12:50 +01:00
Leon Vack
e96fc6d8f9
tmux: add notes to existing keybindings (#2540) (#2742)
Adds notes to the keybindings created in the tmux config making them
show up in C-b ? and tmux list-keys -N

Fixes #2540
2022-03-19 19:12:21 -04:00
Kylie McClain
970b57fd3c
autorandr: add filter option (#2795)
xrandr's filter option is useful for enabling integer scaling on
displays that don't have support for it at a graphics card level.
2022-03-17 13:45:04 +01:00
NomisIV
472e67d1bb
himalaya: add support for account.folders
Add support for `account.folders.(inbox|sent|draft)` in the himalaya
account configuration.

PR #2747
2022-03-13 23:20:41 +01:00
Karl Hallsby
da92196a95
mu: allow aliases to be used by mu configuration file
This has no effect if the user does not have any aliases defined for
any accounts.

This will also only add `--my-address=` to only accounts that are
enabled to be tracked by mu.
2022-03-13 20:27:35 +01:00
Loïc Reynier
afe96e7433
pubs: add module
Note, the pubs configuration file uses ConfigObj syntax, which is
similar to the INI files syntax but with extra functionalities like
nested sections. This prevents it from using Nix's INI format
generator. Here is an example of pubs configuration that cannot be
generated using Nix's INI format generator:

    [plugins]

    [[git]]
    manual=False

For this reason, we opted for a stringly-typed configuration since the
use of a structured `settings` option would require a custom parser.
2022-03-06 10:40:28 +01:00
Yt
d119cea376
i3status-rust: change default to newer version (#2774) 2022-03-03 22:32:59 -05:00
Robert Helgesson
2499b91692
treewide: apply nixfmt to a few more files 2022-02-27 02:19:44 +01:00
Josh Holland
838d40d61a
foot: set OOMPolicy=continue for foot server (#2749)
Previously, if a process inside a foot client triggered the OOM killer,
systemd would also kill the parent unit, namely the foot server.
This is not ideal if a user has a lot of clients attached, and it's
usually not the terminal emulator's fault that a process inside it has
ended up using all the available memory.
2022-02-22 20:15:28 +01:00
Thiago Kenji Okada
b3af91d293
tests/nnn: fix tests (#2746)
There seems to be some changes on how wrapped binaries are implemented
on nixpkgs. This broke the nnn tests since the tests were coupled with
the old implementation.

This commit fix the tests, and also make it less coupled by just testing
if the bookmarks/plugins/environment variables are available.
2022-02-21 14:17:22 -07:00
Jian Lin
2116fe6b50
zsh: move sessionVariables from .zshrc to .zshenv (#2708)
This patch moves both home.sessionVariables and
programs.zsh.sessionVariables from .zshrc to .zshenv. Additionally,
these two kinds of session variables will not be sourced more than
once to allow user-customized ones to take effect.

Before, session variables are in .zshrc, which causes non-interactive
shells to not be able to get those variables. For example, running a
command through SSH is in a non-interactive and non-login shell, which
suffers from this. With this patch, all kinds of shells can get
session variables.

The reason why these session variables are not moved to .zprofile is
that programs started by systemd user instances are not able to get
variables defined in that file. For example, GNOME
Terminal (gnome-terminal-server.service) is one of these programs and
doesn't get variables defined in .zprofile. As a result, the shells it
starts, which are interactive and non-login, do not get those
variables.

Fixes #2445

Related NixOS/nixpkgs#33219
Related NixOS/nixpkgs#45784

This file is not formatted before and is excluded by ./format, so I don't format it.
2022-02-17 10:20:56 +01:00
Artem Shinkarov
a3c18a60d5
neovim: add extraLuaPackages to neovim, fixes #1964. (#2617)
Similarly to extraPytonPackages, we add extraLuaPackages that make
lua libraries available at runtime.
2022-02-16 16:38:10 +01:00
Nelson Alex Jeppesen
e2aa1f5986
kitty: add option theme (#2710)
Add Kitty option to install kitty-themes and configure Kitty to use
one of those themes
2022-02-08 11:54:24 -07:00
Jakub Kozłowski
acf824c9ed
sbt: trim output of password command 2022-01-29 00:14:05 +01:00
Daniel Wagenknecht
cbc176010b
kodi: add module
Kodi is a media center software.
2022-01-26 23:56:25 +01:00
Mr Hedgehog
462d4a7abd
atuin: add fish integration 2022-01-25 00:21:31 +01:00
Kirill Elagin
c47c350f65
pandoc: add new module
Add a module for pandoc that provides the following:

1. Setting default configuration options.
2. Installing templates.
3. Installing citation styles.
2022-01-22 21:16:50 +01:00
polykernel
d469b9bf8a
watson: add module
Watson is a CLI for tracking your time.

Two unit tests were added to validate the module behavior for an empty
configuration and the example configuration.
2022-01-22 16:12:34 +01:00
Philipp Mildenberger
32da35f65b
helix: add module 2022-01-22 15:42:49 +01:00
Kirill Elagin
204f9808d3
sagemath: add module 2022-01-11 14:38:02 +01:00
Nicolas Berbiche
8a5550aea3
gh: remove git overlay in tests 2022-01-10 22:20:49 -05:00
Naïm Favier
05d655146b
rofi: allow extending themes (#2571)
Move @import and @theme directives to the top of custom theme
definitions so as to allow extending other themes.
2022-01-09 17:15:24 -05:00
Robert Helgesson
5f00024e75
tests: make enableBig an option
This makes it possible to identify the test as big in the test file
itself. It also seems like a more natural way to control the test
running.
2022-01-02 10:36:52 +01:00
polykernel
7c0dc519e1
bottom: fix empty-settings test on darwin (#2603)
The empty configuration test for the bottom module introduced as of https://github.com/nix-community/home-manager/pull/2323
is not cross platform. Specifically, it silently fails under a darwin environment due to
the configuration file not being generated at $XDG_CONFIG_HOME. This PR add cross platform support
by specifying the platform-dependent configuration directories to check. The expected unit test data
was also extracted to a separate file to differentiate between test data changes and
changes to the test itself.
2022-01-01 20:28:45 -07:00
Tobias Happ
c2f151258a
bash: remove unnecessary shebang and executable bit for dotfiles (#2599) 2022-01-01 10:06:55 -07:00
Nicolas Berbiche
f15b151ca1
waybar: configurable systemd WantedBy target (#2524)
Before this commit, a user needed to override the systemd target that
would start Waybar with `mkForce`, this is no longer necessary.
2021-12-23 17:00:31 -05:00
Bruno Inec
3db6036775
waybar: allow using attrs for settings (#2547)
Co-authored-by: Bruno Inec <binec@scaleway.com>
2021-12-19 00:21:15 -05:00
Naïm Favier
78aa7cceff
gpg: allow specifying trust levels by name 2021-12-16 19:06:39 +01:00
Bruno BELANYI
829e89a16f
less: store 'lesskey' under XDG_CONFIG_HOME
Less clutter in the $HOME.
2021-12-08 11:23:56 +01:00
Benoit Louy
f46972e466
powerline-go: add support for -modules-right
Add modulesRight setting to instruct powerline-go to configure right
side prompt. Use eval mode when this setting is set.
2021-12-03 17:58:03 +01:00
Pamplemousse
f23073f1da
less: allow customization
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-11-30 23:28:32 +01:00
Nicolas Berbiche
7c320a5325
waybar: make module a freeform module, remove warnings
The `style` option now also accepts a path instead of a text
configuration.

Keeping up with new Waybar options is annoying, so make the module a
freeform module.

The `modules` option will be removed in release 22.05.

The logic to generate warnings for modules and everything was
removed. I don't want to maintain the code that generates these
warnings anymore.
2021-11-29 20:52:06 -05:00
Lily Foster
3ec7f6fb43
rofi: fix theme definition in configuration for 1.7.0+ (#2513)
Since Rofi 1.7.1 (specifically davatorium/rofi@0e70d8a), the deprecated
`theme` option in the `configuration` section no longer works. For 1.7.0
and up, `@theme "name"` is supposed to be used *after* the
`configuration` block.
2021-11-28 15:07:46 -05:00
Miles Breslin
ea1794a798
gpg: support declarative trust and public keys
PR #810
2021-11-26 09:02:36 +01:00
Robert Helgesson
2889ee2363
mpv: temporarily disable tests 2021-11-25 22:29:47 +01:00
Robert Helgesson
18461b5dda
firefox: fix tests 2021-11-25 08:21:54 +01:00
oxalica
df931a59a5
taskwarrior: change config file location and use relative theme paths (#2455)
After taskwarrior 2.6.0, its default config file now locates at
`$XDG_CONFIG_HOME/task/taskrc`, and builtin themes can be included
via relative paths.
2021-11-23 21:33:03 -05:00
Robert Helgesson
a19f40d39d
firefox: fix test case 2021-11-20 09:47:05 +01:00
Mmequignon
d85bf67c48
pet: fix settings format issue
Before it was not possible to place setting values outside the
`General` section.
2021-11-17 23:42:21 +01:00
Tobias Happ
5559ef0023
ssh: add includes option (#2453) 2021-11-16 11:51:10 -07:00
Robert Helgesson
be1ad30503
Remove remaining allowSubstitutes = false
See, e.g., https://github.com/NixOS/nix/issues/4442 for wider
discussions.
2021-11-12 23:24:08 +01:00
Robert Helgesson
2917ef23b3
kakoune: clean up tests
- Enable use-plugins test.

- Stub out `kakoune-unwrapped` to avoid unnecessary downloads.

- Unwrap unnecessary `config` attributes.
2021-11-07 09:43:42 +01:00
flexagoon
288faaa5a6
programs.zsh.zplug: add zplugHome option
Add an option to set custom `$ZPLUG_HOME`. Changing it with
`home.sessionVariables` doesnt work, since it has to be exported
before Zplug is initialised
2021-11-02 08:49:47 +01:00
Bart Bakker
7523252f97
htop: fix order or header_columns setting (#2435)
When `header_columns` is in settings it must appear before any of the
`column_meters_*` options.

Fixes 2426.
2021-11-01 15:27:29 -04:00
Robert Helgesson
134c5ccdd3
mbsync: stub test dependency 2021-10-30 20:44:21 +02:00
Robert Helgesson
e28a720ce9
irssi: fix test directory name
Also fix stub package name.
2021-10-30 20:40:49 +02:00
Robert Helgesson
78afc2fa74
git: stub test dependency on msmtp 2021-10-30 20:36:18 +02:00
superherointj
406eeec0b9
hexchat: add module
Review and contributions from Thiago Kenji Okada
<thiagokokada@gmail.com>.

Co-authored-by: Thiago Kenji Okada <thiagokokada@gmail.com>
Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-10-23 21:31:54 +02:00
Anselm Schüler
cfe82d9f44
gh: support gh as git credential manager for github.com
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-10-21 23:20:25 +02:00
Thiago Kenji Okada
b22004bf1f
rofi: add test case for config with deprecated options 2021-10-13 01:31:12 +02:00
Thiago Kenji Okada
32285d8fe6
rofi: remove options removed from upstream in v1.7.0 2021-10-09 00:45:20 +02:00
Nicolas Berbiche
82c92a18ba
gh: use structural settings (#2339) 2021-10-08 23:29:25 +02:00
Thiago Kenji Okada
592da767bd
nnn: init (#2368)
nnn is a terminal file manager.

It is configured mostly using environment variables, so the way I
found it to avoid needing to write either shell specific code or
using `home.sessionVariables` (that would need to make the user
relogin at every configuration change) is to wrap the program using
`wrapProgram`.
2021-10-05 19:14:52 -04:00
Robert Helgesson
af2007bb77
atuin: add module
This commit adds a module for configuring atuin, a replacement shell
history program.

The module adds options for generating atuin's `config.toml` from Nix,
and options to enable atuin's integration for bash and zsh
(which will rebind history keys to open the atuin history).
2021-10-05 23:48:52 +02:00
Emil Karlson
e0a87d75e9
firefox: add bookmarks support
Generate bookmarks html file and hook it up in user.js.
2021-10-03 12:16:40 +02:00
Robert Helgesson
cb09a968e9
tests: add option test.stubs
This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
2021-09-26 23:26:38 +02:00
Jakub Kozłowski
821299e90e
sbt: run passwordCommand without trailing newline 2021-09-21 22:16:34 +02:00
Tad Fisher
514acaebb9
lieer: change settings to freeform type
Also add missing options.
2021-09-14 23:59:56 +02:00
polykernel
4b964d2f7b
bottom: add module
Bottom is a cross-platform graphical process/system monitor with a
customizable interface and a multitude of features.

Two unit tests were added validate the module behavior for an empty
configuration and the example configuration.
2021-09-14 23:40:21 +02:00
Seth Etter
21a2ff4496
broot: expose modal option (#2300)
* broot: expose modal option

* broot: add basic test

* Use `mkEnableOption`
2021-08-31 10:52:20 -06:00
Jason Felice
33db7cc6a6
kitty: add environment and darwinLaunchOptions options (#2280)
* kitty: add environment option

* kitty: add darwinLaunchOptions option

See https://sw.kovidgoyal.net/kitty/faq/#how-do-i-specify-command-line-options-for-kitty-on-macos

* kitty: only allow darwinLaunchOptions on darwin

* kitty: make expression shorter

* kitty: fix assertion message
2021-08-26 22:08:34 -04:00
Jan van Brügge
bf6b85136b
neomutt: Allow named mailboxes (#2212)
At the moment, only the inbox of each mail account is added to neomutt.
This inbox is always called "Inbox", so if you configure multiple
accounts, it is hard to know which one is which.

This change allows the user to specify a display name per account that
uses `named-mailboxes` under the hood.

Additionally this change now allows to add other folders than the inbox,
for example the Trash, Spam or Drafts folders to be added on a per-account
basis. Using extraOptions is not possible here, as those are lazily
loaded on mailbox open and thus would appear at the bottom and not sorted
by account.

This commit also changes the default sidebar format string to use %D
instead of %B because %B will ignore named mailboxes and show the folder
name instead.
2021-08-19 00:33:53 -04:00
Robert Helgesson
5ed3a41afa
htop: use dummy package in tests 2021-08-16 23:31:59 +02:00
Bart Bakker
e60dca7bb3
htop: fix htoprc when fields is not explicitly set
When the 'fields' setting is not set in htoprc, the htop program won't read any
of the settings. Provide a default value for fields in case it's not explicitly
set by the user.
2021-08-16 23:20:32 +02:00
Bart Bakker
447f80f676
htop: verify htoprc contents for example settings test
Fix ending the generated htoprc with a newline.
2021-08-16 23:20:31 +02:00
Bart Bakker
e4553546cc
htop: let htop program use its default settings
Don't generate the `htoprc` when using default settings to use the defaults of
the htop program.

Rename the test for this case to 'empty-settings'.
2021-08-16 23:20:31 +02:00
Robert Helgesson
d819e0741a
rofi-pass: remove test dependency on rofi 2021-08-13 00:30:51 +02:00
Robert Helgesson
479e26dc8c
scmpuff: remove test dependency on zsh 2021-08-12 23:11:15 +02:00
Robert Helgesson
3d93e1e802
bat: support list settings and shell escaping
Fixes #2262
2021-08-12 21:29:14 +02:00
midchildan
b0d769691c
emacs: add extraConfig option 2021-08-06 23:57:14 +02:00
Robert Helgesson
29ea37374d
fish: use dummy fish package in tests 2021-08-06 23:33:19 +02:00
Robert Helgesson
d490797179
nix-index: use dummy fish package in tests 2021-08-06 22:55:57 +02:00
Vanilla
ab6517d34a
powerline-go: add fish integration 2021-08-06 22:46:58 +02:00
t4ccer
addc78bea0
neovim: Add coc support (#2154)
This adds two new options: 'programs.neovim.coc.{enable,settings}`.

These settings offer a simple interface over `xdg.configFile."nvim/coc-settings.json`,
using the standard Nix' syntax instead of a multiline string.
2021-07-25 22:40:07 -04:00
Robert Helgesson
41903a14b0
Remove a few format exceptions 2021-07-18 23:34:50 +02:00
Robert Helgesson
1617e56c2f
firefox: fix tests 2021-07-18 20:29:00 +02:00
IvarWithoutBones
775cb20bd4
sm64ex: add module 2021-07-12 08:57:35 +02:00
Robert Helgesson
06ee8ec8df
xmobar: use dummy package in test 2021-07-07 23:46:53 +02:00
Rosario Pulella
7df6656b11
foot: revert always create config file (#2091) (#2157)
This reverts commit 666eee4f72 (#2091).

As of NixOS/nixpkgs#128121, which incorporated changes from:
https://codeberg.org/dnkl/foot/pulls/588/, foot no longer
errors if there is no config file.
2021-07-01 12:05:37 -06:00
t4ccer
3f6cb409ca
xmobar: add module (#2120)
* xmobar: Add module

* xmobar: Add test case

xmobar: Add test default.nix

* xmobar: Order lists alphabetically

* xmobar: Change colon to comma in description

* xmobar: Fix macos tests

* xmobar: Remove extra line

* xmobar: Add literalExample

Co-authored-by: Sumner Evans <me@sumnerevans.com>

* xmobar: Update extraConfig description

Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-06-29 13:02:43 -06:00
Robert Helgesson
f4998f0adc
tests: bump nmt 2021-06-27 14:20:13 +02:00
Bruno BELANYI
8d3b273afe
himalaya: add module
A very simple TUI mail client.
2021-06-26 18:29:42 -04:00
Robert Helgesson
ab0e6c3e0e
tests: bump nmt 2021-06-24 22:47:21 +02:00
Robert Helgesson
762f860cfb
tests: prevent some unnecessary downloads 2021-06-23 00:37:25 +02:00
Philipp Dargel
d04e52b0c0
terminator: add module (#2063)
added configuration for terminator
2021-06-17 09:06:47 -06:00
Kevin Amado
e92f5bb79e
programs.gnome-terminal: terminal options (#2042)
- Add support for showing bold as bright colors
- Add support to configure the background transparency
- Fix the scrollOnOutput, it was not being dumped to the config
- Add tests!
- Add myself as maintainer
2021-06-15 23:39:56 +02:00
Ivar
be0e73a308
qutebrowser: add quickmark support (#2059)
Closes: https://github.com/nix-community/home-manager/issues/1230
2021-06-15 12:22:21 -04:00
Josh Holland
e0f2949c98
direnv: add enableFlakes option for enableNixDirenvIntegration (#2089)
NixOS/nixpkgs@03310df843 disabled flake
support by default, so we now need to build a custom package and use it
if the user wants to `use flake` successfully.  This should fix #2087.
2021-06-15 12:11:26 -04:00
ZerataX
fb50102daf
mangohud: add module 2021-06-12 09:55:58 +02:00
Rosario Pulella
666eee4f72
programs.foot: Always create config file (#2091)
foot complains if there is no config file.
2021-06-10 18:40:36 +02:00
Rodney Lorrimar
afb5fd962c
irssi: add ssl_cert option for servers (#2043)
* irssi: add ssl_cert option for servers

I was following these instructions
https://www.oftc.net/NickServ/CertFP/
and found that the `/server add -ssl_cert` option was needed.

This patch therefore adds an optional
`programs.irssi.networks.<name>.server.ssl.certificateFile` path.

Perhaps this could also be done with a `settings` attribute, but that
would probably require most of this module to be reworked.

* irsii: Add example-settings test case
2021-06-06 15:31:25 -06:00
Bruno BELANYI
7591c8041d
rbw: add module (#1998)
`rbw` is a stand-alone Bitwarden client, which makes use of a daemon to
cache your password and manage state.

Its configuration can be managed by `home-manager` or not, leaving the
user free to configure it through `rbw config`.
2021-06-05 18:09:02 -06:00
lunik1
e4c55ed4e6
Revert "foot: add foot binaries to user service's path (#2061)"
This reverts commit cb227dc6c2.
2021-06-05 20:53:45 +02:00
Matthieu Coudron
c7e79b5337
programs.neovim: dont wrap init.vim (#2058)
since we want to write it ourself in ~/.config/nvim/init.vim
2021-06-03 21:37:53 +02:00
Bart Bakker
d6bbd02e95
htop: fix preserving the order of meters (#2065)
Pass meters for formatting in a list of attrsets so that ordering can be
preserved. In addition provide some mode-specific functions to create these
attrsets, to make for a bit nicer config.

This fixes #2060.
2021-06-02 19:27:17 -04:00
lunik1
cb227dc6c2
foot: add foot binaries to user service's path (#2061)
This is needed for foot's new terminal spawning feature to function.
2021-06-01 19:24:59 -04:00
Matthieu Coudron
2a4ab0d891
programs.neovim: fix tests + swap extraConfig and pluginconfig (#2053)
makes more sense to have extraConfig afterwards in case use want to override config
2021-05-31 19:32:21 +02:00
Rosario Pulella
b840707a87
firefox: Always create profile directories
Write ".keep" file in profile dir for each profile regardless of any
other settings to creare profile dir.
2021-05-26 09:41:43 +02:00
Karl H
64607f58b7
isync/mbsync: replace master/slave with far/near (#1776)
* isync/mbsync: replace master/slave with far/near

  isync/mbsync: update tests to match new changes

* isync/mbsync: use mkRenamedOptionModule to alert user to near/far change

* isync/mbsync: use warnings to alert about master/slave far/near change

  Fix capitalization

  isync/mbsync: fix nitpicks

* isync/mbsync: run format script

* isync/mbsync: include new test for expected master/slave warnings

* isync/mbsync: add news about changes
2021-05-22 15:31:06 -06:00
Bruno BELANYI
b449cb77b1
firefox: deprecate 'enableGnomeExtensions'
Fixes #1990.
2021-05-19 08:51:52 +02:00
Bart Bakker
91450f23ce
htop: replace individual option with 'settings' (#1844)
* htop: add some missing meters
* htop: replace individual options with 'settings'
Deprecate all options and introduce `settings` for setting htop configuration
values in Nix configuration.

Use `lib.htop` to provide `fields` and `modes` for easy access to htop's integer
configuration. And `leftMeters` and `rightMeters` functions for building the
separate `*_meters` and `*_meter_modes` attributes.

* htop: add release-notes 21.05 entry
* htop: improve deprecation warnings

Move default configuration into `settings` and make deprecated options default
to `null`. Print deprecation warnings for any option that is non-null --
i.e. only show warnings for explicitly specified deprecated options.

* htop: make self code owner of module
* release notes: fix invalid programs.htop xref
2021-05-19 01:36:08 +02:00
Pierre Labadens
ff616b2734
foot: add module
Foot is a fast terminal emulator for Wayland. It can optionally be run
in a client-server configuration.

There are three unit tests to handle an empty configuration, the
default configuration, and systemd service file generation.
2021-05-18 22:29:41 +02:00
Robert Helgesson
f9e45390de
scmpuff: use pkgs.scmpuff 2021-05-18 00:47:40 +02:00
Robert Helgesson
e9b7d12e06
bash: generate files using writeShellScript
This ensures that the generated file is syntactically valid.

Issue #2015
2021-05-18 00:46:04 +02:00
Bruno BELANYI
3b799f6ea4
nix-index: add module (#1984)
`nix-index` is a tool to quickly locate the package providing a certain
file in `nixpkgs`. It indexes built derivations found in binary caches.

This module adds the shell integration for its `command-not-found`
script for interactive shells.
2021-05-09 18:13:10 -04:00
Robert Helgesson
15a2953c81
powerline-go: avoid dependency in tests 2021-05-09 12:23:44 +02:00
Sumner Evans
225bf275ba
neomutt: make folder change when sourcing account optional
This adds an option for disabling setting the folder when sourcing
accounts in neomutt.
2021-05-03 09:04:58 +02:00
oxalica
5709b5f953
zsh: add history.ignorePatterns option (#1933)
The corresponding variable is `HISTORY_IGNORE` described in zshparam(1).
2021-05-01 16:33:45 -04:00
Blaž Hrastnik
19fc0917c0
waybar: fix systemd service
Fix xdg-portal issue where it'd take 25s for a GTK app to start
2021-05-01 16:26:10 -04:00
Harsh Shandilya
137a584e22
topgrade: add module (#1924) 2021-04-28 19:56:58 -04:00
Robert Helgesson
5ae7817dc5
kitty: use dummy package in test
Also remove assignment to non-existent option
`programs.kitty.package`.
2021-04-29 00:40:32 +02:00
fortune
a513fbc395
qutebrowser: fix config location on darwin (#1925) 2021-04-28 14:41:30 -04:00
Sumner Evans
839645caf3
programs.neovim: fix failing test (#1943)
Updated the expected plugin-config.vim to match what is actually
returned by the neovim utils from upstream.
2021-04-23 20:19:26 +02:00
Mario Rodas
e00dd0d7d2
programs.tmux: use xdg config path (#1928)
Tmux 3.2 includes support to use `$XDG_CONFIG_HOME/tmux/tmux.conf` as
well as `~/.config/tmux/tmux.conf` for configuration file.
2021-04-23 09:25:13 +02:00
Phillip Cloud
26fa84ebce
scmpuff: init (#1921)
scmpuff is a command line tool that allows you to work quicker with Git by substituting numeric shortcuts for files
2021-04-22 22:27:29 -04:00
Tamás Hetesi
1e7e8ac75d
pet: Add support for tags in snippets (#1883)
Add missing `tag` option for elements of `programs.pet.snippets`.
2021-04-20 16:16:27 -04:00
fricklerhandwerk
348b5a5a69
gpg: make homedir configurable 2021-04-14 23:44:34 +02:00
Sumner Evans
f7159a0f76
newsboat: use $XDG_CONFIG_HOME/newsboat
As of Newsboat 2.19, configuration using XDG_CONFIG_HOME/newsboat is
supported:
https://newsboat.org/releases/2.19/docs/newsboat.html#_xdg_base_directory_support

This is a continuation of #1331 and includes gating logic so that the
change doesn't happen until state version 21.05.

Supersedes and Closes #1331
2021-04-11 22:20:02 +02:00
malte-v
91418d3e57
programs.neomutt: Make manual configuration take precedence over generated settings (#1896) 2021-04-11 19:52:31 +02:00
Sumner Evans
be56b6f2c5
neomutt: Add encryptByDefault support (#1882)
Adds support for encryptByDefault to the neomutt module using the
crypt_opportunistic_encrypt option.
2021-04-07 15:45:50 -04:00
Sebastian Zivota
33edf558a0
lib/types/fontType: Add size attribute (#1848)
* lib/types: Add size attribute to fontType
* tests: Add test for kitty
* modules/types/fontType: Make size nullable
* Add release notes

Co-authored-by: Sebastian Zivota <sebastian.zivota@mailbox.org>
2021-04-07 16:18:09 +02:00
Viacheslav Lotsmanov
cc60c22c69
programs.git: make signing key id be optional (#1886)
* Git: Make signing key id be optional

Thus by default the signing key is selected by commit’s author.

* Git: Add tests for config with and without signing key id
* Git: Format tests for signing key
* Git: Remove default value (null) for signing key
* Git: Update description for signing key
2021-04-05 14:28:36 +02:00
Sumner Evans
25a6a6d298
neomutt: support list in binds.map (#1885)
* neomutt: support list in binds.map
Closes #1245

Adds support for specifying programs.neomutt.binds[].map as a list. If
specified as a list, then the binds will be concatenated with a ",".

* neomutt: add deprecation warning for (binds|macros).map as string
Added note that specifying 'programs.neomutt.(binds|macros).map' as a string is deprecated. Instead, use the list form.

* neomutt: note deprecation warning in release notes
Added note that specifying 'programs.neomutt.(binds|macros).map' as a
single string is deprecated in favor of specifying it as a list

* neomutt: add assertion that map is not empty
Added an assertion that each 'programs.neomutt.(binds|macros).map' list contains at least one element.
2021-04-04 01:47:40 +02:00
lunik1
ad04237d51
dircolors: apply extraConfig after settings (#1890)
Applying extraConfig before settings made it unable to override the
defaults.
2021-03-31 22:01:02 +02:00
Rodney Lorrimar
cbf0667037
programs.neomutt: Fix eval error when primary account not enabled (#1873)
* neomutt: Fix eval error when primary account not enabled

If neomutt is enabled for an account, but not the primary account, the
configuration will fail with "list index 0 is out of bounds".

This adds the first neomutt-enabled account as a fallback.

* neomutt: add regression test/update tests
2021-03-29 00:44:47 -04:00
Pierre Labadens
abc9d96d19
waybar: fix slow service stop (#1852)
Set the systemd user service to use "mixed" killmode, which lets waybar
stop its module scripts. This fixes issues where waybar blocks shutdown
until systemd sends a SIGKILL to waybar child processes.
2021-03-06 02:09:51 -05:00
fortuneteller2k
73559e0dbc
qutebrowser: add option to load autoconfig (#1842)
See #1774.

The option default to false.
2021-03-04 22:33:23 -05:00
Andrew Fontaine
39e4991856
git: Add configured SSL certificate for SMTP (#1833)
If you have a custom SSL certificate configured for SMTP TLS, git should
use it.
2021-03-03 21:24:19 -05:00
Thibaut Marty
e72e241d7a
getmail: fix configuration mailboxes generation (#1719)
The mailboxes must be a tuple of string or the string "ALL".
The generated value was broken if the mailboxes configuration was a list
of only one string (but not "ALL"): the generated expression ( "str" )
was not a tuple but a string.
Now, we always generate a tuple (by adding a comma, even with a list of
size one). Getmail works with the special value "ALL" whether it is a
in tuple or not, so this case is not specifically handled.
2021-03-01 17:58:18 -05:00
Andrew Fontaine
f45c7000d5
git: correct value of envelopeSender for msmtp (#1838)
The value should be "auto", not `true`.

Also fix news entry.
2021-02-28 20:42:44 +01:00
Andrew Fontaine
aa479b0124
git: rely on msmtp for smtp if msmtp is enabled (#1829)
If a user using msmtp to send all their email, it would be preferred if
git used it as well.

The only settings necessary are to set the smtp server to the msmtp
binary and set envelop sender to true, which makes git call msmtp with
the -f flag to set the from address from the email.
2021-02-28 16:06:11 +01:00
Phillip Cloud
3327cbe1f9
gh: fix protocol setting (#1831)
* gh: fix protocol setting

* gh: fix test
2021-02-27 21:42:56 +01:00
Nicolas Berbiche
eb3a0342a8
gpg: allow for duplicate keys in config (#1814)
Allow for duplicate keys in the form of a list of strings.

Also update the `settings` example configuration to use `literalExample`.
2021-02-21 00:37:46 -05:00
Thiago Kenji Okada
87e2ec341b
rofi: support top-level clauses in rasi (#1788)
See https://github.com/nix-community/home-manager/pull/1748#issuecomment-774995577
for details.

Related documentation:
920de75c4b (splitting-configuration-over-multiple-files)
2021-02-09 15:59:29 +01:00
Pablo Ovelleiro Corral
b220d5c446
prezto: fix #1773 (#1778)
* zsh: update prezto path structure

The path structure was changed in Nixpkgs and this commit updates
the module to match.

Fixes #1773

* zsh-prezto: fix tests, small tidyup

Co-authored-by: Nick Hu <me@nickhu.co.uk>
2021-02-09 02:11:56 +00:00
Robert Helgesson
ef4370bedc
tests: allow testing assertions
By default tests are expected to produce no assertion.

This also updates the existing tests to match.
2021-02-07 22:48:22 +01:00
Jakub Kozłowski
d420287583
vscode: add args option to keybindings
Also make `when` optional.
2021-02-05 22:38:37 +01:00
Jakub Kozłowski
63d5d28db6
sbt: add new module 2021-02-04 23:42:37 +01:00
Robert Helgesson
22ecd0e568
vscode: fix typo 2021-02-04 23:26:00 +01:00
Thiago Kenji Okada
3f2f7f8efa
rofi: add support for lists in rasi (#1768)
This is now supported without the need of using to represent them:
9a843caa86/Official%20Themes/solarized.rasi (L134)
2021-02-03 18:48:34 -05:00
Thiago Kenji Okada
98d030f723
rofi: add support to custom themes
If this commit now it is possible to define a custom theme directly
using Nix, like this:

```nix
{
   programs.rofi.theme = {
      "*" = {
         background-color = "#000000";
         border-color = "FFFFFF";
         width = 512;
      };
      listview = {
         cycle = true;
      };
   };
}
```

And this will be converted to the proper rasi format to be used in
rofi.
2021-01-30 09:13:28 +01:00
Thiago Kenji Okada
6f7074d21d
rofi: migrate to rasi configuration format (#1736)
* rofi: migrate to rasi configuration format

The Xresources configuration format is deprecated in Rofi. For example,
using Rofi from unstable (1.6.1 as of now) you get the following
warnings when starting the application:

```
(process:9272): Rofi-WARNING **: 01:38:48.596: The old Xresources based configuration format is deprecated.

(process:9272): Rofi-WARNING **: 01:38:48.596: Please upgrade: rofi -upgrade-config.
``````

So this commit migrates it for its new configuration format, called rasi
instead.

This new implementation uses attrsets manipulation instead of using
strings, making the code clearer and also fixing some bugs found during
the way. To make sure everything is right, I also created some tests.

If someone wants to validate if the generated config is correct, just
run in terminal:

```
$ rofi -dump-config
```

And rofi will dump the current configuration file, including all
unsetted options.

* docs: document programs.rofi.extraConfig changes

* rofi: add thiagokokada as maintainer

* rofi: add toRasi function
2021-01-23 16:30:34 +01:00
Thiago Kenji Okada
2c0e3f61da
mpv: fix issue #1725 and add tests (#1726)
Closes issue #1725.

This allows mpv module to be customized with support for more advanced
features than the `programs.mpv.scripts` current support. For example,
with this change now this is possible:

```nix
{
  programs.mpv.package = (pkgs.wrapMpv (pkgs.mpv-unwrapped.override {
    vapoursynthSupport = true;
  }) {
    extraMakeWrapperArgs = [
      "--prefix" "LD_LIBRARY_PATH" ":" "${pkgs.vapoursynth-mvtools}/lib/vapoursynth"
    ];
  });
}

```

Since `programs.mpv.package` doesn't necessary reflect the final
derivation anymore (see #1524), we introduce `programs.mpv.finalPackage`
that has the resulting derivation.

This includes 2 tests:
- One to check if everything is alright with mpv
- Other to validate our assertion that package and scripts can't be
  passed both at the same time

* docs: document recent mpv module changes

* mpv: add thiagokokada as maintainer
2021-01-21 18:10:12 -05:00
Robert Helgesson
9d680ec662
kakoune: disable the kakoune-use-plugins test 2021-01-20 19:49:15 +01:00
Robert Helgesson
7e80e034cc
gh: fix attribute paths
This fixes some attribute paths to match recent changes in Nixpkgs.
2021-01-20 18:59:58 +01:00
Robert Helgesson
8f24ed4c7f
git: fix attribute paths
This fixes some attribute paths to match recent changes in Nixpkgs.
2021-01-20 18:58:35 +01:00
Alexander Foremny
4b772fd698 neomutt: fix smtp_pass option
Configuration option `smtp_pass` is expected to evaluate a shell
command, thus its value has to be in double-quotes.
2021-01-12 13:32:03 +01:00
Robin Townsend
b9597e5774
starship: remove deprecated character.symbol setting
Fixes #1550
PR #1695
2021-01-03 10:21:55 +01:00
Nicolas Berbiche
f4b5ae026c
waybar: fix css identifier check (#1687)
Fixes #1686
2020-12-30 18:17:39 -05:00
Robert Helgesson
9d53afb709
tests: add support for asserting warnings
This adds a "test.asserts" module that currently just provides a
convenient way to assert on the content of warnings. By default all
tests will assert that no warnings are given.
2020-12-30 17:25:48 +01:00
Matthieu Coudron
8e0c1c55fb
programs.neovim: write config in $XDG_CONFIG_HOME/init.vim (#1652)
* neovim: write config in $XDG_CONFIG_HOME/init.vim

instead of wrapping the configuration, which has sideeffects
https://github.com/NixOS/nixpkgs/issues/55376

* fix: update test accordingly
2020-12-29 20:26:02 +01:00
Nicolas Berbiche
99f0074362
waybar: allow CSS class when using a default module
Fixes #1682
2020-12-28 20:43:40 -05:00
Austin Butler
76de0632ac
starship: update prompt_order to format in example 2020-12-21 23:56:46 +01:00
toonn
a1162e04b3
tmux: add a prefix option overruling shortcut if defined
Previously, it was not possible to set an arbitrary tmux prefix since
CTRL was hardcoded in the module.

To avoid breaking existing configs, a new option was implemented that
conveniently uses the tmux terminology but defaults to null and does
not affect previous behavior when set to null.

The behavior for the shortcut option was not completely replicated,
i.e., it does not bind "b" to send-prefix but stick to the default of
the prefix binding sending prefix (C-b C-b instead of C-b b) and it
does not bind repetition of the prefix (C-b C-b) to `last-window`,
both of these bring the option closer to the default tmux
configuration.

Fixes #1237
2020-12-21 00:10:59 +01:00
seylerius
1a7f190cb9
rofi-pass: add rofi-pass plugin for password-store 2020-12-18 23:22:57 +01:00
Blaž Hrastnik
0654364426
waybar: fix systemd service
The current definition makes waybar wait for dbus.service, but that
never happens because dbus.service is started on demand by
dbus.socket.

Per systemd docs:
  https://www.freedesktop.org/software/systemd/man/systemd.service.html#Implicit%20Dependencies

- Services with Type=dbus set automatically acquire dependencies of
  type Requires= and After= on dbus.socket.

- Socket activated services are automatically ordered after their
  activating .socket units via an automatic After= dependency.
  Services also pull in all .socket units listed in Sockets= via
  automatic Wants= and After= dependencies.

Removing Requisite/After makes the service properly start for me,
simply specifying Type=dbus is enough.

See #1370
2020-12-01 23:07:39 +01:00
Nicolas Berbiche
44f9d68d8c
treewide: replace attrs by formats or types.anything 2020-11-29 21:54:55 -05:00
Martin Toman
b04aa56503
powerline-go: add zsh integration 2020-11-15 00:12:02 +01:00
Robert Helgesson
b3fdbfdf42
git: use gitMinimal in test 2020-11-14 23:18:07 +01:00
Robert Helgesson
f3372bf982
kakoune: use a plugin with smaller closure size in test 2020-11-14 23:17:54 +01:00
Joe Hermaszewski
9c14bbe988
tmux: allow setting default-shell before new-session 2020-11-14 10:59:10 +01:00
Robert Helgesson
b5e7817de2
zsh-prezto: remove package dependency in test 2020-11-14 10:37:35 +01:00
Nicolas Berbiche
4cc1b77c3f
kakoune: fix tests
Following https://github.com/NixOS/nixpkgs/pull/91792
2020-11-05 21:00:22 -05:00
workflow
9e9d8ffc7c
i3status-rust: add module
This adds the i3status-rust[0] module, a replacement for i3status
written in pure Rust.

[0] https://github.com/greshake/i3status-rust
2020-11-05 23:59:47 +01:00
Tobias Happ
22a3a5651d
gh: add module 2020-10-22 23:36:15 +02:00
zimbatm
014d8deb60
tree-wide: update url to the repo 2020-10-22 22:41:56 +02:00
Nick Hu
18a05a9604
zsh: add support for prezto configuration framework (#655) 2020-10-12 01:27:44 +01:00
Robert Helgesson
57518cd0bf
git: remove test dependencies on delta and git-lfs 2020-10-11 22:36:26 +02:00
Charlotte Van Petegem
473d9acdad
neomutt: fix duplicated extraConfig in account (#1546)
The `accounts.email.accounts.<name>.neomutt.extraConfig` option is
included twice in the resulting config file for the account. One time as
part of the `mraSection`, one time as part of `accountStr` (`accountStr`
includes the `mraSection`). This removes that duplication. I opted to
keep the one in `accounStr`, since `extraConfig` doesn't necessarily
have anything to do with the `mraSection`.
2020-10-09 20:55:35 +02:00
Evan Stoll
8537920706
autojump: add module
This also deprecates the `programs.bash.enableAutojump` option in
favor of this module.
2020-10-08 23:50:43 +02:00
Olmo Kramer
41147ae09a
feh: allow binding actions to multiple buttons/keys
In feh you can bind multiple keys to the same action, but Home Manager
only let you set a single key to an action. You can cheat and pass a
string with space-separated keys, but with this change you can pass a
list for each action to bind multiple keys to it.

Also adds a couple of tests.

Fixes #1366
2020-09-30 00:55:09 +02:00
Joe Hermaszewski
abfb4cde51
vim: Allow setting init.vim config alongside plugins + neovim test (#876)
* neovim: allow setting init.vim config alongside plugins
* neovim: add test for neovim plugins
* neovim: make pluginWithConfigType a have type submodule
2020-09-25 02:08:39 +02:00
Karl H
96d7de6db1
mbsync: per account multiple channels (#1360)
* mbsync: option for configuring a channel

A channel is a relationship between 2 directories/boxes/mailboxes
between the local machine (slave) and the remote mail server (master).
Each channel must be given at least:
     * an account-unique name
     * a pattern for which mailboxes to sync from master
     * a pattern for what directory where that mail ends up on the
     slave

Additional options can be added later.

* mbsync: option for configuring a group

A group is a grouping of channels together, so that many channels with
very different names can be handled as a single entity.

Groups are unique in mbsync because they will shadow channels that
have the same name on the command-line.

* mbsync: create groups configuration attribute

This is the end of the configuration that the end-user will use.

They will specify an attribute set that contains the name for the
group, so they can say
`accounts.email.accounts.<aname>.groups.<gname>` to access the
configuration for the group with the name `<gname>`.

* mbsync: write function to generate group-channel blocks

This function takes in a set of groups, and their consituent
channels and writes the appropriate .mbsyncrc block. The block is as
shown below:

      Group groupName1
      Channel channelName1
      Channel channelName2

      Group groupName2
      Channel channelName3

Each group must have a unique name, no matter which account it is
declared under. The same holds true for channels. However, if there is
a group that shares the same name as the channel, the channel will
effectively be "shadowed" by the group, and mbsync will default to
working with the group in that case.

* mbsync: write function to generate channel configuration blocks

This function takes in a set of groups, which includes their
consituent channels and writes the appropriate .mbsyncrc block for the
channel. The block that is generated is shown below:
      Channel groupName1-channelName1
      Master :<accountName>-remote:<master-pattern>
      Slave :<accountName>-local:<slave-pattern>

      Channel groupName2-channelName2
      Master :<accountName>-remote:<master-pattern>
      Slave :<accountName>-local:<slave-pattern>

Each group must have a unique name, no matter which account it is
declared under. The same holds true for channels.

Using channels with the patterns set up this way allows one to specify
which maildir directories are to be synchronized FROM the master TO
the slave. In addition, it allows for these maildirs to be remapped,
between the master server and the local slave.
This is critical, because Gmail has a strange way of storing its mail
that makes using mbsync, mu, and mu4e more difficult.

There are additional channel parameters that are already present in
this codebase from the previous use of group-channel configuration,
which will be reused.

* mbsync: set the submodule's names field according to parameter

This is the same method as is used in creating an email account, named
`<name>` under `accounts.email.accounts.<name>`. This allows the user
to specify groups and channels, in a list-like format, but still gets
the "namespacing" to more easily handle the options available in each
of these locations.

* mbsync: provide examples of master/slave patterns for channels

* mbsync: create nested-let function to generate channel pattern

This pattern is required to either NOT be present, which means the
master pattern is used to match, or it has a list of patterns to use
beneath the master maildir to match against.

This function checks to ensure that if patterns is not empty, ONLY
then is the `Pattern` keyword printed. Otherwise, there are many, many
problems.
If there IS a list of patterns, then we use proper escaping methods to
ensure that the exact string is constructed.

* mbsync: per-account groups can have additional patterns

Gave the
`accounts.email.accounts.<name>.mbsync.groups.<gname>.channel.<cname>`
set a `patterns` option, which will allow for greater customization
and filtering of the master maildir to sync to the slave maildir.

* mbsync: add extraConfig option for easier-to-format options

These are options that can be handled by the `genSection` function in
the `genAccountFunction`, so they are left to the user to decide.
Most of these are made on a global basis anyways.

* mbsync: remove unneeded extraConfig.channel

This was originally placed here, seemingly, just to get this module
working. However, this field is actually more confusing now that a
separate per-channel configuration option for extra configurations has
been made available.

* mbsync: correct and improve comment in masterPattern description

* mbsync: switch channel/group generation to new functions

Changing this out is what moves us from the old system to the new one.
Instead of having a single channel manage a whole mailbox, we can now
specify an attribute set of groups that should correspond to an email
account.

Each of these groups contains an attribute set of channels that make
it up, and are grouped together for synchronization. In addition, each
of these channels can have additional IMAP4 parameters attached to
them to further refine synchronization.

Lastly, each of the channels is grouped together under the Group
section, ensuring that the channels' mailboxes synchronize as they
have been specified.

* mbsync: only generate group/channel configuration if channels present

Typically, when a group is specified, channels will be specified as
well. However, if due to error or mistake, the user forgets to specify
ANY channels for a group, we should not generate that group's
information.

This means that no channels are specified (which maps the remote
master to local slave). In addition, the `Group <gName>` block (which
brings the separate channels together) is also not generated.

Another thing to consider is that a user might specify a group and a
channel, but perform no additional configuration of the channel.
In a configuration, this would be realized by
`accounts.email.accounts.<aName>.mbsync.groups.<gName>.channels.<cName>;`

This creates the channel with the name `<cName>` and the
`masterPattern`, `slavePattern`, and `patterns` fields use their defaults.
By definitions set within mbsync, these defaults actually specify that
the remote master's `INBOX` mail directory is synchronized to the
local slave's `INBOX` directory.

So, if there is a channel that has no fields specified, then we DO
want to generate its configuration. But if there is a group that has
no channels, then we do NOT generate it.

* mbsync: acc comment explaining why groups attr set is never empty

* Revert "mbsync: remove unneeded extraConfig.channel"

This reverts commit 941c4771ca.

To support backwards compatibility, I need to leave this field/option
in the module, even if it will likely be more confusing to do it this way.

* mbsync: channel compatibility with previous iteration of mbsync

The previous version of mbsync used a single channel for an entire
account. This leads to issues when trying to change the mailbox
hierarchy on the local machine. The problem with this is that some
email providers (Gmail, among others) use a slightly different maildir
hierarchy, where the standard mailboxes (Inbox, Drafts, Trash, etc.)
are stored inside another directory (`[Gmail]/` in the case of Gmail).

This new version allows the user to specify any number of groups with
any number of channels within to reorder their mail however they wish.

However, to maintain backwards compatibility, I moved the original
channel-generating code to a function that will run ONLY when
there are no groups specified for THIS account.

* Revert "mbsync: channel compatibility with previous iteration of mbsync"

This reverts commit b1a241ff9f.

This function is in the wrong location and this was wrongly committed.

* mbsync: function for backwards compatibility with previous mbsync

NOTE THAT THIS IS THE CORRECT COMMIT FOR THIS CHUNK OF CODE!!

The previous version of mbsync used a single channel for an entire
account. This leads to issues when trying to change the mailbox
hierarchy on the local machine. The problem with this is that some
email providers (Gmail, among others) use a slightly different maildir
hierarchy, where the standard mailboxes (Inbox, Drafts, Trash, etc.)
are stored inside another directory (`[Gmail]/` in the case of Gmail).

This new version allows the user to specify any number of groups with
any number of channels within to reorder their mail however they wish.

However, to maintain backwards compatibility, I moved the original
channel-generating code to a function that will run ONLY when
there are no groups specified for THIS account.

* mbsync: function to choose which style of group/channels to generate

This is a simple if-check. If the old style is used, then this
account's mbsync.groups attribute set is empty. If that is the case,
then the old-style single-channel per account is used.

If that is NOT the case, then the new style is used in preference of
the old. This means that ALL channel code that would be generated by
the old version is replaced by the new one.

* mbsync: switch per-account config generation to check channels

* mbsync: program-wide groups if no account-specific groups

At the end, we have to choose whether or not to generate the old style
of having program-wide groups to specify things, where the boxes on
the channel underneath the group specifies which mailboxes to sync.

Here, we only generate the old style of group IF there is ANY account
that does NOT have the new `accounts.mbsync.groups` defined. At that
point, it is up to the user to ensure that the accounts in
`programs.mbsync.groups.{}` align with the name chosen for the
account, as I have made no attempt to change this old code.

However, if ALL accounts have their `mbsync.groups` defined, even if
each of the groups has a single empty channel, it will generate the
groups in the new style.

* mbsync: ensure \n after hm-generated comment

This was a multi-part fix. First, the `# Generated by Home Manager.`
comment has been reworked to ensure that it will ALWAYS have a
newline, even if the program-wide extraConfiguration is empty.

Next, we switched to placing 2 newlines between every account, to
provide further visual distinction between each account, which can
have multiple channels and multiple groups defined at the same time.

Lastly, the groupsConfig was slightly reworked, so that both the old
and new version can be used, but the new one will take precedence.
Because of this, groupsConfig is now a list of strings, which will
have single newlines inserted between each element.

But if the old style is NOT used, then the groupsConfig list
contains one element, an empty string. A single element has nothing
added as a separator, and an empty string produces no output.

* mbsync: only generate new group/channels if channels present

Here, the problem was if the user created a group for an account, but
did not also include a set of channels. If no channels have been
specified, then the group should NOT have its group-channel mapping generated.

I also corrected and improved the comment regarding
`genGroupChannelString`'s function and intended behavior.

* mbsync: channel patterns generate their own newlines

This means that when a channel has extra `patterns` defined for it, it
will generate those, and a single newline will be appended to the end
of that newly constructed string.

The moving of the newline character is slightly important because
otherwise, every account would receive an extra newline after every
channel, leading to 2 newlines after every channel.

* mbsync: place newline between each channel in a group

* mbsync: ensure old group/channel has proper spacing

This ensures that if the old style of generating program-wide groups
that there is the proper spacing before the group and in between each
line within the group.

* mbsync: ensure no empty channels present

If the user specifies a group correctly, they must still specify an
attribute set of channels. However, if they do not, then we need to
ensure that a group with no channels does NOT have any channel
configurations generated for it.

If there is a channel string generated for a channel that is empty,
then the `mapAttrsToList` returns a singleton list that contains just
the empty string. Thus, we can filter out all those results, to ensure
that no empty channels are generated.

It is important to keep in mind the difference between an empty
channel and a channel that has received no configuration, but is
named.
	* A named channel is technically configured to have a name.
	  While the `masterPattern`, `slavePattern`, and `patterns`
	  field have NOT been populated, mbsync assumes that if
	  master/slave-Pattern are empty that means match against
	  `INBOX`.
	  If `patterns` is empty, no patterns are printed.
	* An empty channel set is a set that has no channels within
	  it, but `mbsync.groups.<gName>.channels` is defined.

* mbsync: filter empty groups and correct newlines

First thing, someone can specify that a group is empty. If this is
done, technically a group with channels would be generated at the end.
However, because they were empty and did not exist, whitespacing would
be generated, leading to a usable, but mangled config file.
The `filter` solves this problem by removing empty strings (which are
generated by groups that are empty) from the output strings to place
in the file.

Lastly, because the whitespacing was fixed elsewhere in the file, the
crazy double-newline at the end was changed to a single newline.
However, the double newline within the `concatStringsSep` is still
required, because the list that is being concatenated together is a
list of channel configurations. Each element corresponds to one of the
groups specified, whose contents are the channels specified within.

The double newline is needed because each string element is lacking a
trailing newline, because `concatStringsSep` does not add the
separator to the end of the last element in the list. So, the last
channel to be configured will not have that newline appended when the
channel-configuration list is created, thus, 2 are inserted here.

* mbsync: update test input to use per-account channels

* mbsync: comment how old/new style collision handled

This is left in the test input for now, because I think it is useful
to see why certain things are happening the way they are.

* mbsync: update test output pattern

The test output should now have the correct configuration according to
the way I have specified it in the input file.

* mbsync: use format script on new code

* mbsync: add KarlJoad as maintainer

Co-authored-by: Nick Hu <me@nickhu.co.uk>
2020-09-21 18:16:06 +01:00
Damien Cassou
472ca211ca
man: support building manual page index cache
The apropos software is useful to get a list of manpages matching a
description or to get a list of all manpages. The latter feature is
used by Emacs to get manpage completion (`M-x man`).

To have apropos working, a database of all available manpages must be
built with mandb. This is what this commits does.

A similar change was done for NixOS:
edc6a76cc0
2020-09-13 20:52:08 +02:00
Paho Lurie-Gregg
1a6d6b8ace
zplug: Reduce noise (#1441)
Running `zplug install` will always product output, even if there is
nothing to do.

Gating it behind a `zplug check` eliminates that output when there is
nothing to do, and is recommended in the zplug README.
2020-09-06 11:16:34 +02:00
Christoph Herzog
1ed8e7ef98
vscode: add options for keybindings
Adds a new `keybindings` option to the `vscode` configuration.

It contains a list of key bindings, which will be written to
`%vscode-dir%/User/keybindings.json`.

PR #1351
2020-09-04 14:14:52 +02:00
Olmo Kramer
4b702bf6b7
ncmpcpp: add module
PR #1457
2020-09-01 22:05:57 +02:00
Nicolas Berbiche
f4f9f1a618
waybar: add module
PR #1329
2020-08-14 00:20:49 +02:00
Daniel Gorin
96e2f1bdf0
kakoune: add support for plugins
The kakoune editor has a plugin mechanism and several plugins are
already packaged under `pkgs.kakounePlugins`. However, adding these
packages to `home.packages` is not enough: the `kakoune` package needs
to be configured with the list of plugins to include, so that they get
sourced on start-up.

We add a `programs.kakoune.plugins` option, analogous to
`programs.vim.plugins`.

The change is backwards compatible since `pkgs.kakoune` is defined as

    wrapKakoune kakoune-unwrapped { };

and `wrapKakoune` defaults the list of plugins to empty.

PR #1356
2020-08-13 23:45:49 +02:00
Andrew Fontaine
baea46c5ac
git: set SSL if useStartTls is false
The git-send-email [0] script uses StartTLS if `smtpEncryption` is set
to `tls`, which can break services that don't support StartTLS.

[0]: bd42bbe1a4/git-send-email.perl (L1533)

PR #1395
2020-08-13 21:36:31 +02:00
Daniel Gorin
d1f4d1514d
kakoune: escape showWhitespace separators
We were passing the separators for the `show-whitespaces` highlighter
verbatim. This was problematic in case one wanted to use, spaces,
quotes or `%` as separators since the resulting kakoune configuration
would be invalid.

According to kakoune's docs, the separator has to be one character
long, so we can use a simple rule for escaping them. It is possible
that people has been working this around by passing, e.g. `"' '"` as
separator in order to get a space (i.e., escaped explicitly by the
user), so we just let longer strings be used verbatim.

PR #1357
2020-08-12 22:44:33 +02:00
Daniel Gorin
861690ff29
kakoune: simplify testcase
Instead of using several regex assertions, just state precisely what we
are producing. While the regex was technically more flexible, since it
would ignore differences in whitespace, it was also harder to read/edit.
2020-08-12 22:43:38 +02:00
Leon Kowarschick
2e7935767f
alacritty: add package option
PR #1372
2020-07-27 17:08:10 +02:00
seylerius
89adfc9f01
qutebrowser: unwrap list from keybinding removal
The option to remove the default keybindings by setting the
`programs.qutebrowser.enableDefaultKeybindings` variable to `false`
had a list wrapped around the `config.py` line. This would cause a
type coercion error.

PR #1410
2020-07-27 16:48:38 +02:00
Philipp Mildenberger
3f1be69359
nushell: add module (#1333) 2020-07-24 17:15:55 +02:00
Mario Rodas
4bd0ca2cd7
git: configure delta through [delta] git section (#1371)
this breaks backwards compatibility (now accepts a dict instead of a list) so please update
programs.git.delta.options accordingly.
2020-07-20 17:03:40 +02:00
Damien Cassou
7f7348b470
powerline-go: fix argument to -error option
Addition of the line "local old_exit_status=$?" broke the call to
powerline-go.

PR #1364
2020-06-29 10:21:17 +02:00
Robert Helgesson
5a15f3833d
ne: use dummy package in tests
This is to avoid unnecessary downloads and builds when running the
tests suite.
2020-06-24 23:02:49 +02:00
cwyc
8f2342e13a
ne: add module
Added a simple module to place configuration files for ne: the nice
editor.

PR #1336
2020-06-23 22:37:02 +02:00
s1341
1b210e7143
zplug: add module
This adds initial support for the zsh package manager "zplug".

PR #1105
2020-06-14 15:12:49 +02:00
Damien Cassou
478022afad
powerline-go: add module
PR #1285
2020-06-13 00:02:13 +02:00
Dany Marcoux
c378c1cbcd
autorandr: add crtc option
This option was missing. It is generated by autorandr when executing
`autorandr --save my_profile`.

Fixes #1024
PR #1283
2020-06-09 23:15:44 +02:00
Damien Cassou
b33802ca7f
direnv: add support for nix-direnv
PR #1297
2020-06-06 22:17:43 +02:00
Damien Cassou
575cd4b8ba
direnv: add initial test for bash integration 2020-06-06 21:40:41 +02:00
Robert Helgesson
ba91ac5948
texlive: remove upstream dependency in tests
This changes the tests to not require downloading the texlive
distribution.
2020-06-06 16:43:17 +02:00
Damien Cassou
a21c97d011
ssh: add support for ServerAliveCountMax
PR #1299
2020-06-03 23:16:43 +02:00
Nikita Uvarov
09304026ae
autorandr: add basic configuration test 2020-05-26 19:04:25 +02:00
Justin Lovinger
e9945ee6ee
dircolors: add module
PR #1219
2020-05-12 22:15:32 +02:00
Mario Rodas
cba7b6ee6e
git: add basic support for delta
PR #1198
2020-05-05 00:12:58 +02:00
ivann
03b4f81679
qutebrowser: add some options
Specificially, this adds options

- `aliases`,
- `searchEngines`,
- `keyMappings`, and
- `keyBindings`.

PR #1212
2020-05-03 13:53:06 +02:00
Justin Lovinger
1dd226fde7
aria2: add module
PR #1202
2020-05-03 13:21:52 +02:00
Justin Lovinger
ecc1f2310c
i3status: add module
PR #1210
2020-05-03 13:12:13 +02:00
Matthieu Coudron
10673bff4c
alot: add structured settings
- Also support tags.

- Optionally write the hooks file.

PR #812
2020-05-01 22:26:26 +02:00
Robert Helgesson
642d9ffe24
git: escape string values in configuration
This should handle the special characters that typically occur.

Fixes #1206
2020-05-01 00:50:58 +02:00
Peter Rice
8b82f52e75
fish: source each file in plugin conf.d separately
According to https://fishshell.com/docs/current/cmds/source.html,
only one file can be sourced at a time: "If additional arguments are
specified after the file name, they will be inserted into the $argv
variable."

PR #1204
2020-04-29 21:46:10 +02:00
Johannes Rosenberger
a7cdfaa325
tmux: reorder tmux.conf content
In particular, put `extraConfig` in the end, which enables overriding
of all settings, even plugin settings.

PR #945
2020-04-27 22:04:13 +02:00
Johannes Rosenberger
23220d43f3
tmux: use stable plugin names (name -> pname)
PR #1195
2020-04-26 15:22:23 +02:00
Robert Helgesson
95b95b1407
tests: improve test purity
Before the XDG variables would be set from the user's environment, if
available. This would break some tests.

With this change the tests should be fully deterministic.

Fixes #1190
2020-04-24 21:46:34 +02:00
Owen McGrath
2f2a4396c6
lf: add module
Adds 'programs.lf', configuration managment for lf, a terminal file
manager.

PR #1174
2020-04-23 22:41:22 +02:00
Terje Larsen
9905ab5087
fish: fix fish plugins complete path update
PR #1178
2020-04-22 01:02:10 +02:00
Robin Stumm
86ccd8fecb
kakoune: implement whitespace highlighter config
The options under `programs.kakoune.config.showWhitespace` existed
but were not implemented.

PR #1162
2020-04-16 22:34:31 +02:00
Robert Helgesson
f6afd95ef8
tmux: fix broken test case 2020-04-15 23:25:16 +02:00
Robert Helgesson
022228e0aa
ssh: switch type of matchBlocks to listOrDagOf
This switches the type of `matchBlocks` from `loaOf` to `listOrDagOf`.
The former has been deprecated in Nixpkgs. The latter allows
dependencies between entries to be expressed using the DAG functions.
2020-04-13 23:24:40 +02:00
Terje Larsen
5b7b9821e0
qutebrowser: add support for list values in settings 2020-04-09 19:13:07 +02:00
Justin Lovinger
b7737f1732
qutebrowser: add module
PR #1132
2020-04-08 14:50:59 +02:00
Robert Helgesson
a128e35927
Update nixfmt and apply to a few more files 2020-04-06 12:51:11 +02:00
Robert Helgesson
5c1e7349bb
lieer: remove package dependency in tests 2020-03-08 12:02:35 +01:00
Tad Fisher
60a939bd01
programs.lieer: add module
Add 'programs.lieer', a tool for synchronizing a Gmail account with a
local maildir and notmuch database. Per-account configuration lives in
'accounts.email.accounts.<name>.lieer'.
2020-03-07 15:13:15 +01:00
Cole Helbling
a11cf1decd
fish: allow arguments to functions
This allows the ability to provide arguments to a function, such as
`--on-event` in order to trigger a function on the
`fish_command_not_found` event, for example.

PR #1063
2020-03-07 12:51:37 +01:00
zimbatm
9a1feb5b10
git: fix the config output formatting
When setting values using the `git config --set` command, git formats
the file a bit differently. This changes the output so it maps to that
format.

Differences:

* each `key = value` in a section is prefixed by a tab character
* the `=` between the key and the value is surrounded by spaces

PR #1069
2020-03-07 12:02:20 +01:00
Robert Helgesson
faa2945606
tests: remove package dependencies on rofi and abook 2020-03-06 00:27:21 +01:00
MmeQuignon
0a1ce53990
abook: add module
PR #1058
2020-03-04 19:58:05 +01:00
Robert Helgesson
acf106ced0
starship: give settings option more specific type
This more readily allows merging configurations.

Fixes #1023
2020-02-29 22:17:47 +01:00
ef148ab3cb
newsboat: show queries before urls
PR #1047
2020-02-26 21:38:07 +01:00
Cole Helbling
5ca224f75b
fish: consistency is key and other style changes
I like my empty sets with spaces between them.
2020-02-20 00:03:29 +01:00
Cole Helbling
9a258edc10
fish: fix sourcing of .fish files
Turns out, the quotes were messing things up.
2020-02-20 00:03:26 +01:00
Ryan Orendorff
111011b2c2
fish: add some tests
- If a function is defined, check that the function file exists and
  that the contents matches a given string.

- If no functions exists, the functions folder should not exist.

- Verify plugin functionality.
2020-02-20 00:03:26 +01:00
Robert Helgesson
5be9aa417a
neomutt: fix sendMailCommand when msmtp is enabled
This resolves the error

    The option `accounts.email.accounts.xyz.neomutt.sendMailCommand`
    is defined both null and not null, in
    `…/home-manager/modules/accounts/email.nix' and
    `…/home-manager/modules/accounts/email.nix'.

that would occur previously when both neomutt and msmtp were enabled
for an account.
2020-02-16 23:08:37 +01:00
Robert Helgesson
a4a07ba996
readline: fix example 2020-02-02 01:20:05 +01:00
Robert Helgesson
45abf3d38a
Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
Robert Helgesson
de8033747c
tests: clean up tests
- Move all module tests to their own directories.

- Avoid duplication of `// import`.
2020-01-26 21:11:23 +01:00
Matthieu Coudron
fba87f8998
neomutt: add module
PR #1002
2020-01-26 20:46:44 +01:00
Robert Helgesson
ba097beb17
tests: remove unnecessary user of import 2020-01-26 11:30:32 +01:00