Commit graph

378 commits

Author SHA1 Message Date
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
Lava 85d67b0a6e
xsession: Add profilePath configuration option (#2140)
This allows the user to move .xprofile somewhere else, which can help
with decluttering their home directory.
2021-06-28 09:11:15 -06:00
Robert Helgesson 2aeaf65e8f
files: assert that target files are unique
Fixes #1807
2021-06-27 17:10:45 +02: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
Ilan Joselevich 7e2b1a42aa
i18n.inputMethod: add module 2021-06-25 00:58:50 +02:00
Robert Helgesson ab0e6c3e0e
tests: bump nmt 2021-06-24 22:47:21 +02:00
Sergey Vlasov b42fce7aaa
i3,sway: add bar color options for the focused output (#2135)
Both i3bar and swaybar can use different colors for the bar on the
currently focused monitor output; add color options for this feature.
2021-06-22 20:56:41 -06:00
Robert Helgesson 762f860cfb
tests: prevent some unnecessary downloads 2021-06-23 00:37:25 +02:00
Naïm Favier dc1b6b8349
bspwm: re-add support for lists as config option values (#2125)
Removed by mistake in e70524c, but ignore_ewmh_fullscreen still needs it.
2021-06-20 00:57:40 -04:00
Naïm Favier e70524cd2b
bspwm: various improvements (#2095)
* bspwm: various improvements

- fixes shell escaping issues and general style issues
- allow reloading the config on-the-fly by exposing bspwmrc to the user

* bspwm: add configuration test
2021-06-19 18:40:17 -04:00
Philipp Dargel d04e52b0c0
terminator: add module (#2063)
added configuration for terminator
2021-06-17 09:06:47 -06:00
Robert Helgesson a01fe9f81e
sxhkd: fix service test
Before it generated a nonsense test script.
2021-06-17 00:16:17 +02:00
Robert Helgesson 6cd92c643a
sxhkd: minor formatting in test 2021-06-16 23:57:58 +02: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
Dmitry Kulikov 9b39fd7eb4
sxhkd: stop scope before creating (#2086) 2021-06-15 13:27:35 -04: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
Johannes Schleifenbaum 06a98ba0fd
pantalaimon: add module (#2056) 2021-06-07 17:38:42 -04: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
Rodney Lorrimar 5060262b79
services/emacs: Prevent deletion of socket file
When running a socket-activated emacs service, we don't want emacs to
remove the socket file after exiting, because then subsequent
invocations of `emacsclient` won't be able to use the socket to start
emacs.service again.
2021-06-06 01:00:20 +02:00
Tad Fisher ac82c036d8
services/emacs: Update systemd definitions, drop Emacs 26 support
Emacs 27 added Type=notify support and updated the service definition to
remove the use of `emacsclient' to kill the service. Emacs 28 changes
the `StartupWMClass' in emacsclient.desktop to `Emacsd'. Update our
emacs.service and emacsclient.desktop definitions to match upstream
changes.

When killing emacs.service, the socket is removed, and subsequently
starting the service manually results in a service without a socket.
Prevent this by adding `RefuseManualStart=true' to the service's Unit
definition.

Drop Emacs 26 support as it is no longer shipped in nixpkgs. Update the
tests to verify the following configuration scenarios:

- Emacs version: 27, 28
- Socket activation: disabled, enabled
2021-06-06 01:00:19 +02: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
Basti 95da56b783
i3,sway: workspace output assignment (#2003)
(cherry picked from commit ea3ff797c87313e71f2ed2fd2b932a18a4b4400b)
2021-06-02 18:03:20 -06:00
cwyc 30102ea9e5
xdg-desktop-entries: add module (#1450)
* xdg-desktop-entries: add module

rebase

* xdg-desktop-entries: adapt to changes in makeDesktopItem

This package depends on the makeDesktopItem function in nixpkgs, which recently changed its syntax:
https://github.com/NixOS/nixpkgs/pull/91790

This commit makes the module compatible with the new syntax.

It also exposes the fileValidation option in makeDesktopItem.

Co-authored-by: cwyc <cwyc@users.noreply.github.com>
Co-authored-by: --get <--show>
2021-06-02 19:36:17 -04: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
Nick Hu 3612ca58e8
syncthing: make syncthing tray package configurable (#1257)
Also sets the default syncthing tray package to
https://github.com/Martchus/syncthingtray instead of
https://github.com/sieren/QSyncthingTray, which indirectly fixes #603
2021-05-18 15:43:17 +01:00
Robert Helgesson f9e45390de
scmpuff: use pkgs.scmpuff 2021-05-18 00:47:40 +02:00
Robert Helgesson adbabcd0a0
gtk: fix gtk2-basic-config test 2021-05-18 00:47:15 +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
Sebastian Sellmeier 6a471f1b11
i3,sway: add option for default workspace (#2002)
Related to #695
2021-05-16 22:54:53 -06:00
Tad Fisher 01ec2aaefe
systemd: revert systemd-environment-generator usage for environment variables (#2001) 2021-05-16 17:43:50 -04:00
Tad Fisher 23769994e8
xdg.systemDirs: init module (#1797)
There is a need to manage XDG Base Directory system directory
environment variables in Home Manager modules. There is an existing
mechanism in `targets.genericLinux.extraXdgDataDirs', but this does not
apply to NixOS systems.

Furthermore, it is important that `XDG_CONFIG_DIRS' and `XDG_DATA_DIRS'
are set in both login shells (to support getty and SSH sessions) as well
as the systemd user manager (to propagate them to user services and
desktop environments).

The first need is addressed by adding the `xdg.systemDirs' module, which
configures lists of directory names for both `config' and `data'
directories. These are then set in
`$XDG_CONFIG_DIR/environment.d/10-home-manager.conf' and picked up by
the systemd user manager.

To make these, and other variables set in
`systemd.user.sessionVariables', available in login shells, an
additional step is added to `etc/profile.d/hm-session-vars.sh' which
exports the result of
`user-environment-generators/30-systemd-environment-d-generator' which
is shipped with systemd. The effect of this generator is to print
variables set on the systemd user manager such that shells can import
these into their environment.
2021-05-10 20:14:42 -04: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
Michal Sojka b2dec35b86
Fix eval errors when i3 or sway null configs are null (#1989) 2021-05-07 15:39:10 -06:00
0qq ff959fd49a
sxhkd: fix environment (#1892)
* sxhkd: move to xsession.initExtra

When sxhkd is launched as systemd service it
doesn't have $PATH a user expects to see.

* sxhkd: add news entry
2021-05-07 15:28:52 -04:00
Sumner Evans 9ffb206050
i3, sway: replace fonts with submodule (#1950)
This applies to both the root-level and the bar configs.

Closes #1937.
2021-05-03 21:54:35 -06: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
David Terry cdc774f337
lieer-service: add path to notmuch config (#1704)
This change makes the services created via the lieer module aware of the notmuch config created by the home-mangager notmuch module (which is stored in a non-standard location).

Without this change all the lieer services created by the lieer module failed for me, as they were unable to find the notmuch config.
2021-05-03 00:19:41 +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
Kritnich 2eed138026
barrier: add module
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-05-01 00:11:17 +02:00
Sumner Evans 5e6f09795c
gtk2: allow configuration of gtkrc file
Closes #519
2021-04-30 22:56:56 +02: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
Ivar Scholten 4727b0543d
pbgopy: add missing options 2021-04-29 00:26:17 +02:00
Sumner Evans 19ebab97e8
i3, sway: extract border functionality to common function (#1947)
* i3, sway: extract border functionality to common function

Converted the i3 module to use default_border and
default_floating_border and extracted that functionality out to be
shared between the i3 and sway modules.

* i3: add sumnerevans as maintainer
2021-04-28 15:52:31 -04: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
Sumner Evans 5c5d562266
sway: add config.seat
Added seat configuration to sway config. Also improved the way that the
configuration is generated to reduce superfluous whitespace.

Supersedes #1663
2021-04-11 22:11:22 +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
midchildan 5fbb33cff5
targets/genericLinux: set TERMINFO_DIRS (#1819)
This makes terminfo descriptions in installed packages available to
shell sessions. Not needed for NixOS, which does the same thing already.
2021-03-08 15:41:23 -05: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
Thiago Kenji Okada 0e2dc4be30
qt: add qt.style option (#1839)
This allows you to set a theme for Qt applications. For example, if you
want to use `adwaita-qt` theme to have uniform look between Gtk and Qt
applications, you can use it like this:

```nix
{
  qt = {
    enable = true;
    platformTheme = "gnome";
    style = {
      name = "adwaita";
      package = pkgs.adwaita-qt;
    };
  };
}
```
2021-03-03 22:20:17 -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
Nadrieril da92360208
polybar: allow config to be more nix-like (#1430)
Polybar's config format is a bit strange, and lists in particular are
annoying to handle. This enables using normal nix lists and nested
attrsets instead.

This change is not backwards-compatible, because the INI converter
converts lists of strings to space-separated values, and this does
something else. I expect that this is only relevant for the
`modules-left` etc bar setting, but that's enough to break things :(.
2021-02-20 18:34:59 +01: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
Thiago Kenji Okada d8dd2a09b0
redshift/gammastep: use ini file
Not every option is exposed by redshift/gammastep parameters, for
example gamma options are only exposed in configuration file. So this
PR refactors this module to generate a configuration file and pass it
to the redshift/gammastep using -c parameter.

This is a breaking change since there is no support for some of the
older options like `extraOptions`, but unless you use `extraOptions`
it should work without changes.
2021-02-07 23:33:17 +01: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
Robert Helgesson bdee1be7b3
Revert "redshift/gammastep: use ini file"
Manual latitude and longitude setting doesn't work in Redshift.

This reverts commit dd6ee694df.
2021-02-07 10:20:03 +01:00
Thiago Kenji Okada dd6ee694df
redshift/gammastep: use ini file
Not every option is exposed by redshift/gammastep parameters, for
example gamma options are only exposed in configuration file. So this
PR refactors this module to generate a configuration file and pass it
to the redshift/gammastep using -c parameter.

This is a breaking change since there is no support for some of the
older options like `extraOptions`, but unless you use `extraOptions`
it should work without changes.
2021-02-07 10:02:57 +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
Sara Johnsson df7d81b0b3
playerctld: add module 2021-01-31 12:36:30 +01: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 7de0d07dd9 redshift/gammastep: add tests 2021-01-26 01:40:25 -03:00
midchildan e44faef21c
i18n: various fixes 2021-01-23 16:40:25 +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
midchildan 9a12cd7e81
i18n: set the appropriate LOCALE_ARCHIVE_x_xx variable (#1659) 2021-01-23 15:56:38 +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
Nicolas Berbiche 8127799f79
sxhkd: configurable package and command line arguments
Fixes #1598.
2021-01-16 10:57:32 +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
Nicolas Berbiche d62bdaf938
sway: fix error with null package and swaybar
When setting `...sway.package = null`, the default bar configuration
would throw an error trying to use the bar from the null package.

Logic is added to use the bar from `pkgs.sway` instead of `cfg.package`
if it is null.

Fixes #1714
2021-01-11 12:26:18 -05: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
Guillaume Girol 6739d8bb50
targets/genericLinux: make locales work 2020-12-10 22:34:30 +01:00
Ivar e6a58a7e71
pbgopy: add service 2020-12-09 23:45:51 +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
Matthias Riße 33407189c1
wlsunset: add module
This adds the wlsunset module, a program for day/night gamma
adjustments on wayland.

Fixes #1625
2020-12-01 21:46:46 +01:00
Nicolas Berbiche 44f9d68d8c
treewide: replace attrs by formats or types.anything 2020-11-29 21:54:55 -05:00
Robert Helgesson 7b6ebf2785
Revert "sway: validate configuration at build time"
This reverts commit 99b75f99df. See

  https://github.com/nix-community/home-manager/issues/1613 and
  https://github.com/nix-community/home-manager/pull/1614

for associated discussions.
2020-11-17 18:45:23 +01:00
Nicolas Berbiche 6dc68b1d16
i3: validate configuration at build time
PR #1579
2020-11-16 23:51:59 +01:00
Nicolas Berbiche 99b75f99df
sway: validate configuration at build time
PR #1579
2020-11-16 23:51:34 +01:00
Robert Helgesson 4f20ee61c2
sway: restore use of pkgs.sway
Using the final package in the `onChange` block broke some use cases.
This restores the old behavior and instead solves the test
dependencies in a different way.

Fixes #1611

This reverts commit 7c3c64208e.
2020-11-16 22:35:07 +01:00
Martin Toman b04aa56503
powerline-go: add zsh integration 2020-11-15 00:12:02 +01:00
Robert Helgesson cde1d33e61
sway: remove test dependency on xwayland 2020-11-14 23:49:34 +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
Robert Helgesson 28eb093a1e
systemd: use listsAsDuplicateKeys
This causes list values to be emitted as a list of key-value pairs
instead of a single key-value pair where the value is space separated.

This is useful, e.g., for socket units that would like to specify more
than one `ListenStream=` address.
2020-10-25 22:55:06 +01:00
arcnmx 9bf1f40af1
xdg: disambiguate home.file attribute names 2020-10-22 23:51:01 +02: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
Robert Helgesson 18429f1d1d
emacs: remove use of makeDesktopItem
Can generate the file directly to avoid the dependency on the
`makeDesktopItem` API.
2020-10-22 22:00:22 +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
Andrew Fontaine 0006da1381
home-environment: add option home.sessionPath
This option allows adding additional entries to `PATH`.
2020-10-05 21:06:42 +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
Evan Stoll 9b1b55ba02
numlock: add test
- Add evanjs to CODEOWNERS for numlock and numlock test
- Add evanjs to maintainers for numlock module
2020-09-18 19:35:19 +02: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
Damien Cassou 605a8fc92e
generic-linux: add option extraXdgDataDirs
PR #1486
2020-09-11 12:26:55 +02:00