1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 00:39:45 +01:00
Commit graph

1011 commits

Author SHA1 Message Date
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
Robert Helgesson
b3498cccb3
info: generate dir file directly in profile
This avoids the need for the activation block. The `dir` file is
instead built directly in the installed profile.
2020-09-18 14:05:42 +02:00
Symphorien Gibol
92c682cd10
unison: fix escaping of arguments
The `ExecStart=` option of systemd must take arguments fully quoted.
That is,

    "-sshargs=-i somekey"

and not

    -ssargs="-i somekey"

Additionally, inside arguments passed to unison, `=` characters must
be quoted. After unquotation by systemd, one must have

    -sshargs=-o Foo\=4

instead of

    -sshargs=-o Foo=4
2020-09-18 00:16:22 +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
812b64d4d3
man: prepare for new programs.man options 2020-09-11 20:16:33 +02:00
Damien Cassou
605a8fc92e
generic-linux: add option extraXdgDataDirs
PR #1486
2020-09-11 12:26:55 +02:00
Damien Cassou
b819d2cc41
generic-linux: prepare code for new options
This moves the enable option into an explicit attribute set to allow
future addition of new options.
2020-09-11 12:26:54 +02:00
Bruno Bigras
1f04af74f2
mcfly: fix when non-interactive with fish 2020-09-11 11:41:08 +02:00
dawidsowa
249650a07e
mpd: change musicDirectory to str (#1449) 2020-09-06 23:37:46 +02:00
Niclas
4ebb7d1715
systemd: fix systemd spelling (#1373)
Systemdaemons are lowercased and get suffixed with a d
2020-09-06 11:28:40 +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
Elis Hirwing
f146620897
htop: Add new configuration options (#1463)
There's some new configuration options since the 3.0.0 release of htop.
2020-09-06 10:58:37 +02:00
Robert Helgesson
41b1af808f
targets.darwin: disable application directory
This disables the generation of the application directory until
conflicting behavior with nix-darwin is resolved.

See https://github.com/rycee/home-manager/issues/1341#issuecomment-687286866
2020-09-04 20:01:19 +02:00
Nicolas Berbiche
182454fe6b
kanshi: fix exec configuration
Also add a test case for the exec option.

PR #1446
2020-09-04 16:45:42 +02:00
Nicolas Berbiche
d3aee544b6
targets.darwin: add module
Currently, this module makes sure that `/Applications` directories for
packages in `home.packages` get linked into the user's environment.
2020-09-04 15:21:48 +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
Robert Helgesson
e6e49ad73c
home-environment: coerce home.homeDirectory to string
The home directory option should be a string without context to avoid
the directory being copied to the Nix store.

Fixes #1471
2020-09-02 22:37:21 +02:00
Cole Helbling
0399839271
lib/file-type: remove types.loaOf
loaOf has been deprecated for a long time and is now in the process of
removal (see https://github.com/NixOS/nixpkgs/pull/96042). Thus, we
remove it here, too.
2020-09-02 11:13:36 -07:00
Olmo Kramer
4b702bf6b7
ncmpcpp: add module
PR #1457
2020-09-01 22:05:57 +02:00
Robert Helgesson
4fe5afa755
files: make sure the target file name is escaped
The previous implementation would allow variables to sneak into the
file names. This commit makes sure the resulting target file path
exactly matches the expected path.
2020-08-29 18:22:03 +02:00
Robert Helgesson
209fb62d49
xdg-mime: more forcefully create directories
By installing two packages with the same directories we should force
`buildEnv` to generate real directories instead symlinks into the Nix
store.
2020-08-29 17:33:07 +02:00
Mario Rodas
a79d31fcfd
mcfly: add module
PR #1452
2020-08-26 00:21:01 +02:00
Alex Rice
0869e23700
sway: set bar defaults to null
Allows fields of bar to be nullable and omit them from the generated
configuration if unset.

Fixes #1361
PR #1386
2020-08-26 00:05:05 +02:00
Robert Helgesson
9854342b9f
nixpkgs: take Nixpkgs path from argument
This removes the dependency on the `nixpkgs` channel within the
modules for state version ≥ 20.09. The default Nixpkgs source starting
from this state version is the path of the `pkgs` argument used to
bootstrap the Home Manager modeuls.

This is a prerequisite for using Home Manager withing Nix flakes.

PR #1420
2020-08-19 00:33:25 +02:00
Vincent Gatine
a3dd580adc
kanshi: add service
PR #1142
2020-08-15 01:02:23 +02:00
Robert Helgesson
2bcd96928e
xdg-mime: make sure the target directories exist
Before the profile commands would not run if a single package is
installed since `buildEnv` will produce a symlink directly to that
package. By adding this dummy package we ensure that a real directory
will be generated.

Fixes #1392
2020-08-15 00:17:24 +02:00
James Ottaway
9a473b693a
zsh: add cdpath option (#1418) 2020-08-14 22:36:23 +02:00
Nicolas Berbiche
f4f9f1a618
waybar: add module
PR #1329
2020-08-14 00:20:49 +02:00
Jack McCown
2a54c353a9
gnome-terminal: add profile command options
Allow setting custom command and login shell.

PR #1423
2020-08-13 23:55:24 +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
Philipp Mildenberger
3886f8db33
pulseeffects: fix autostart
PR #1442
2020-08-13 22:39:03 +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
jD91mZM2
fceef469c2
xdg-user-dirs: fix erroneous dirs file
Before this change,

```rust
fn main() {
    println!("{:?}", glib::get_user_special_dir(glib::UserDirectory::Documents));
}
```

would return `None` even though `~/Documents` is available and
`xdg.userDirs.enable = true`. Checking the differences between
`xdg-user-dirs-update` shows that the latter has quotes around each
thing.

PR #1440
2020-08-13 00:07:04 +02:00
Tom Bereknyei
ae8f432a75
bash: initExtra after autojump config
Allow for initExtra to manipulate results of autojump, e.g., remove
aliases.

PR #1431
2020-08-12 23:21:57 +02:00
Symphorien Gibol
e1fbb74b41
lib.gvariant: escape backslashes in strings
PR #1433
2020-08-12 22:53:28 +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
Robert Helgesson
223e3c38a1
Revert "systemd: use sd-switch"
This reverts commit 9c0fe3957b.
2020-08-04 19:38:14 +02:00
Robert Helgesson
9c0fe3957b
systemd: use sd-switch
This makes the systemd module use the sd-switch application to perform
the unit switch during a generation activation.

Since the closure of sd-switch is relatively lightweight we
unconditionally pull it in as a dependency. We simultaneously remove
the `systemd.user.startServices` option and perform the switch action
automatically.

PR #1388
2020-08-04 01:01:10 +02:00
Robert Helgesson
152769aed9
xscreensaver: restart if settings change 2020-08-02 14:05:18 +02:00
hpfr
dbf6b2d2ab
starship: fix fish integration syntax
The previous fish integration for starship erroneously used parts of
POSIX-esque test syntax. It also used `-n` instead of `-z` to check
for an unset variable.

PR #1422
2020-08-02 13:04:24 +02:00
Robert Helgesson
79a2320fd0
files: minor documentation improvements 2020-07-31 00:54:23 +02:00
eyjhb
bb6eb9b13e
dropbox: fix bug caused by Python gi import
When running the service start script with `DISPLAY` set, a `gi`
import error is triggered. Blanking the variable will make the script
use a different code path that does not attempt to import `gi`.

Also moves activation script up into start of script instead.

PR #1415
2020-07-30 00:07:23 +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
eyjhb
7b73f84071
dropbox: add module
Ability to control Dropbox daemon, if it should start and where to
place the files.

PR #1391
2020-07-25 23:12:33 +02:00
Sergei Maximov
5cd7865c6c
spotifyd: add package option
This option can be used to enable optional Spotifyd features, such as
looking up the Spotify password in the system keyring or enabling
MPRIS support.

PR #1390
2020-07-25 20:43:43 +02:00
Philipp Mildenberger
3f1be69359
nushell: add module (#1333) 2020-07-24 17:15:55 +02:00
Robert Helgesson
83301ca787
lib: support gvariant maybe type
Fixes #1397
2020-07-24 16:45:13 +02:00
Robert Helgesson
8ad5580021
zsh: fix trailing white space 2020-07-21 01:10:54 +02:00
dawidsowa
e2e8b7371d
zsh: add shellGlobalAliases (#1381) 2020-07-20 19:54:30 +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
Cole Mickens
5c639ff68a
sway: focus.followMouse supports yes/no/always
Also add associated tests for both Sway and i3.

PR #1231
2020-07-17 15:35:00 +02:00
Robert Helgesson
a49ce0e9ed
home-environment: use per-user profile path in /etc
Before the profile directory value would point directly to the build
output in the Nix store. Unfortunately this would cause an infinite
loop if the user's configuration directly or indirectly refers to the
profile directory value.

Fixes #1188
2020-07-14 23:31:20 +02:00
f4814n
e0fb488e57
sway: Fix output example (#1385)
The example for wayland.windowManager.sway.config.output has to
contain a mode behind the filename to be correct.
2020-07-14 09:17:05 +01:00
Siva Mahadevan
5f189acce4
neomutt: fix SMTP port string
Fix the SMTP port string from #1374 by properly converting the integer
port into a string.

PR #1377
2020-07-04 12:21:02 +02:00
Robin Stumm
7dc322c1eb
kakoune: support user modes in keyMappings
kakoune: support user modes in keyMappings

User modes are declared automatically.

PR #1286
2020-07-03 22:43:18 +02:00
Siva Mahadevan
8736190743
neomutt: Add SMTP port to smtp_url 2020-07-03 15:30:12 -04: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
600f39f966
xresources: do not generate file for empty properties 2020-06-28 00:41:05 +02:00
Tad Fisher
54b69d2ef8
emacs: fix service environment
Emacs populates 'exec-path' at launch from the 'PATH' environment
variable. Likewise, the emacs derivation from nixpkgs populates
'load-path' from the 'NIX_PROFILES' variable. As neither of these are
available by default in the systemd user manager, revert to the
previous behavior of launching the Emacs daemon from a login shell.

Fixes #1354
Fixes #1340
PR #1355
2020-06-24 22:50:30 +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
Mario Rodas
8ab1139891
tmux: only enable secureSocket on Linux by default
Darwin does not have the `/run/user` directory.

PR #1349
2020-06-22 19:34:52 +02:00
Robert Helgesson
1f174f6681
git: add news entry about changed escaping 2020-06-18 00:54:41 +02:00
Robert Helgesson
bf7297d55c
Move email account options to their owning modules
This removes the long list of submodules from

    modules/accounts/email.nix

and instead move each entry to its owning module.
2020-06-16 00:45:20 +02:00
Jonathan Reeve
ad4f33cfc4
qutebrowser: add package option
Fixes #1315
PR #1334
2020-06-15 21:06:14 +02:00
Robert Helgesson
ecb93ab9ae
generic-linux: respect NIX_STATE_DIR 2020-06-14 23:34:53 +02:00
Dmitry Kalinkin
dc227b579d
home-manager: respect NIX_STATE_DIR
This allows to install home-manager on a system without root access.

PR #1196
2020-06-14 20:41:55 +02:00
Vincent Breitmoser
7682eb88c4
fluidsynth: fix description 2020-06-14 16:58:08 +02:00
Vincent Breitmoser
b0e8a1569e
fluidsynth: add module
Fluidsynth is a real-time MIDI synthesizer based on the SoundFont 2
format.

PR #1326
2020-06-14 15:30:51 +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
Robert Helgesson
bb567e20b3
vte: add module
This abstracts out the VTE setup from the gnome-terminal module into
its own module and options.
2020-06-14 12:20:12 +02:00
Zsolt Szende
507e446475
vscode: fix extensions directory path
Fixes #1302
PR #1327
2020-06-14 00:43:44 +02:00
Damien Cassou
478022afad
powerline-go: add module
PR #1285
2020-06-13 00:02:13 +02:00
Damien Cassou
43ef16c3e1
clipmenu: add module
PR #1309
2020-06-12 19:52:52 +02:00
Shamrock Lee
561b3d5650
eclipse: add option package
PR #1310
2020-06-12 19:34:39 +02:00
Robert Helgesson
a3cb63265d
emacs: make news entry Linux specific 2020-06-12 10:30:52 +02:00
Tad Fisher
2209d3cb51
emacs: add myself to maintainers 2020-06-11 20:40:10 +02:00
Tad Fisher
3815248786
emacs: Support socket activation via systemd
Add 'services.emacs.socketActivation.enable' for generating an
'emacs.socket' systemd unit.

Emacs since version 26 has supported socket activation, whereby an
external process manager such as systemd listens on a socket and passes
it to the Emacs daemon when the manager launches it. This improves
startup time of the user session and avoids launching the daemon when not
needed, for example when launching the user session via SSH.

This implementation hard-codes the socket path to the default for the
version of 'programs.emacs.finalPackage', because systemd does not
perform shell expansion in the socket unit's 'ListenStream' parameter
and it seems like an advanced use-case to change the socket path. Shell
expansion would be desirable as the socket path usually resides in
directories such as $XDG_RUNTIME_DIR or $TMPDIR.

Tests were added to verify behavior in the following cases:

- Emacs service with socket activation disabled
- Emacs 26 with socket activation enabled
- Emacs 27 with socket activation enabled

PR #1314
2020-06-11 20:39:49 +02:00
Robert Helgesson
02c1f8d416
status-notifier-watcher: introduce unit start delay
Fixes #1312
2020-06-10 23:32:44 +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
Robert Helgesson
abcddfe090
firefox: update extensions option description
This adds a note that the extensions will only apply to profiles
managed through Home Manager.
2020-06-09 22:12:08 +02:00
Damien Cassou
b33802ca7f
direnv: add support for nix-direnv
PR #1297
2020-06-06 22:17:43 +02:00
Alex Rice
68b931aef8
sway: add alexarice as codeowner 2020-06-06 21:35:09 +02:00
Alex Rice
2dbe637478
sway: allow package to be null
This allows the `sway.package` option to be null so that the module
can be used alongside the nixos module.
2020-06-06 21:35:08 +02:00
Jakub Fišer
479274775f
home-environment: add full locale options support
Allows setting every locale option independently. Also fixes `LC_`
order to match the order of `locale` command output for better
reference.

PR #1278
2020-06-06 21:23:01 +02:00
Robert Helgesson
cca5161289
i3: replace deprecated package name 2020-06-06 14:53:44 +02:00
Robert Helgesson
354344d971
gnome-keyring: replace deprecated package name 2020-06-06 14:53:43 +02:00
Robert Helgesson
248dc17394
gnome-terminal: replace deprecated package names
The names `gnome3.vte` and `gnome3.gnome_terminal` have been replaced
by their more modern names.
2020-06-06 14:53:42 +02:00
Robert Helgesson
410d2febbb
dunst: replace deprecated package name 2020-06-06 14:53:41 +02:00
Robert Helgesson
42fd47b246
emacs: replace use of emacsPackagesGen
Instead we use `emacsPackagesFor`, which `emacsPackagesGen` aliases
anyway.
2020-06-06 14:53:40 +02:00
Robert Helgesson
46cd37abc9
dunst: replace deprecated package name 2020-06-06 14:53:15 +02:00
zowoq
3b33862b04
files: reference lndir through xorg
The xlibs attribute set is deprecated and is an alias for xorg.

PR #1304
2020-06-06 13:24:51 +02:00
Roman Volosatovs
85748171ec
sway: add option config.bindkeysToCode
Do not use `--to-code` by default in `bindsym`.

PR #1289
2020-06-04 23:40:42 +02:00
Julien Moutinho
0ee5c9536b
broot: fix install check
broot uses `~/.config/broot/launcher/installed-v1`, not
`~/.config/broot/launcher/installed`.

PR #1303
2020-06-04 21:54:35 +02:00
Damien Cassou
ca6fcc92a1
firefox: show how to get pre-packaged add-ons
PR #1296
2020-06-04 21:29:51 +02:00
Robert Helgesson
8e8210b441
xdg-mime: fix issue on WSL1
This change stops update-mime-database from running unless the
`share/mime/packages` directory is writable. For some reason it
appears to be read-only on WSL1.

Fixes #1192
2020-06-04 19:45:22 +02:00
Damien Cassou
a21c97d011
ssh: add support for ServerAliveCountMax
PR #1299
2020-06-03 23:16:43 +02:00
Nicolas Berbiche
b567d27394
mpv: use wrapMpv instead of mpv-with-scripts
The latter has been removed from Nixpkgs.

See:

- <https://github.com/NixOS/nixpkgs/pull/88620>
- <https://github.com/NixOS/nixpkgs/pull/89208>

PR #1295
2020-05-31 14:11:10 +02:00
Justin Lovinger
3a80ece9fa
dircolors: fix usage together with zsh.oh-my-zsh
PR #1280
2020-05-28 00:08:15 +02:00