This commit introduces the `nixpkgs-disabled` module, that is
basically a mock of `nixpkgs` module where any value different from
`null` will cause an assertion error.
This is to help debugging cases where `home-manager.useGlobalPkgs` is
set to `true` and `nixpkgs.*` options are being used.
Nowadays this returns the following error:
```
error: The option `home-manager.users.<user>.nixpkgs` does not exist.
```
This will change too:
```
error: `nixpkgs` options are disabled when `home-manager.useGlobalPkgs` is enabled.
```
That will direct the user to the correct solution (either removing
`nixpkgs` or disable `home-manager.useGlobalPkgs`).
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`.
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).
* screen-locker: Make xautolock optional, reorganize options
xautolock isn't really needed to trigger xss-lock on the basis of time
since the built-in screensaver functionality of X serves as one of the
event sources for xss-lock. Keeping it around and defaulting to
"enabled" to avoid unexpected breakage.
Also shuffled around the options to submodules for xss-lock and
xautolock to get rid of prefixes in option names and to make
enableDetectSleep a bit clearer.
* screen-locker: update maintainership
* tests/screen-locker: Stub i3lock and xss-lock
* screen-locker: add package options for xss-lock and xautolock
Currently, when a custom path is set for any of the XDG base
directories (i.e XDG_DATA_HOME, XDG_CONFIG_HOME, ...), the path will
be coerced into a string when consumed by other options such as
xdg.configFile et al. This causes the the given path to be copied to
the nix store which in the case of xdg.configFile et al, translate to
the file being written there as it is a absolute path.
Interestingly, the default base directories all work as intended as
they are encoded as a string.
This commit converts the option to a string regardless of whether it
is a primitive path or a string encoded path. This allows downstream
consumers to use the base directories in arbitrary way without
accidentally copying the content of the directory to the store. It is
implemented in a similar manner as how home.homeDirectory undergoes
string conversion.
The existing file-attr-name test was modified to test also custom xdg
base directories, and the home.file generation test was removed as
there is a dedicated test for this case in the files module. The test
case was renamed to file-gen to better reflect the new scope.
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.
Fnott is a keyboard driven and lightweight Wayland notification daemon
for wlroots-based compositors.
There are four unit test to validate behavior for an empty
configuration, the default configuration, global properties and
systemd service file generation.
* pulseeffects: change default example
pulseeffects-pw is now an alias to easyeffects, and the `pulseeffects` binary
that this module references is no longer in that package.
* easyeffects: add module
The easyeffects service is the PipeWire equivalent of the pulseeffects
service.
Before, loading a module would be guarded by an optional platform
condition. This made it possible to avoid loading and evaluating a
module if it did not support the host platform.
Unfortunately, this made it impossible to share a single configuration
between GNU/Linux and Darwin hosts, which some wish to do.
This removes the conditional load and instead inserts host platform
assertions in the modules that are platform specific.
Fixes#1906
`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`.
* 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>
* 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
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.
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.
`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.
* ncspot: add module
ncspot is a ncurses Spotify client written in Rust using librespot.
* news: fix bad github ui merge
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
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;
};
};
}
```
This makes Home Manager respect the NO_COLOR environment variable to
disable coloring from output generated by Home Manager.
This initiative can be found more on https://no-color.org/
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.
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 :(.
Add new options Darwin options:
- `targets.darwin.defaults`
This adds options for configuring macOS through the `defaults(1)` system.
This option can be used to manipulate a vast majority of user settings for macOS
and its applications.
This is implemented using freeform modules and includes additional descriptions
and type information for some useful options.
- `targets.darwin.keybindings`
This adds options for configuring the default keybindings for macOS text fields.
- `targets.darwin.search`
This adds options for configuring the default search engine for macOS.
The `invocation` is an optional attribute, so it doesn't make sense to
use it as the key in an attribute set. See
https://dystroy.org/broot/documentation/configuration/#verb-definition-attributes
Actually, `invocation` should not be defined when one wants to rebind
a built-in verb to a different key.
Also added documentation for the `key` attribute.
Adds a pet module without sync support as it makes no sense when
configuration is managed with Home Manager and the config would be
unwritable for pet anyway.
PR #1045
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
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
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
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
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
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
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
Add a new 'bookmarks' option, for managing `~/.config/gtk3/bookmarks`,
a list of URIs to display as bookmarks in the sidebar of GTK file
browsers.
PR #1129
Nixpkgs no longer packages compton, and instead packages picom, a
(mostly) compatible fork of compton, providing an alias from compton
to picom. Because some configuration options have been changed, and
all references to "compton" have been made deprecated and replaced
with "picom", 'services.compton' has been deprecated in favor of the
new 'services.picom'.
Resolves#878
PR #1101
Add 'services.lieer', which generates systemd timer and service units
to synchronize a Gmail account with lieer. Per-account configuration
lives in 'accounts.email.accounts.<name>.lieer.sync'.
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'.
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
This adds a service module for [grobi](https://github.com/fd0/grobi),
which can be used to automatically configure monitors/outputs for Xorg
via RANDR.
This allows pkgs to be overridden in such a way that `<nixpkgs>` is
never imported, allowing home-manager to be used in environments where
`NIX_PATH` is not set.
PR #993
This change makes use of the `extend` function inside `lib` to inject
a new `hm` field containing the Home Manager library functions. This
simplifies use of the Home Manager library in the modules and reduces
the risk of accidental infinite recursion.
PR #994
- Default value is set to static '$HOME/.zsh_history' -- dotDir is not
prepended anymore
- $HOME is not prepended to the option value
- Ensure history path directory exists
Fixes#886, replaces #427.
This change allows to pass custom packages into the `vim.plugins`
option.
Additionally this adds a deprecation warning and an error message if a
vim plugin is not present. This is an improvement because the user
gets instant feedback, when a plugin is not found.
When a configuration file would be written to an existing file, rather
than failing switch (and having the user have to move or delete those
files), move the files automatically to a new path.
Closes#585
This fixes a build error occurring when building a configuration
having fontconfig enabled and `home.packages` only containing one
package installing things to `/lib`.
Also adds a number of test cases to verify the fontconfig cache
generation functionality.
Fixes#703
Also deprecates the `fonts.fontconfig.enableProfileFonts` option. The
configuration is now always generated if `fonts.fontconfig.enable` is
set.
Fixes#520
Unfortunately, using `attrsOf` is not possible since it results in too
eager evaluation. In particular, the
home.sessionVariables = {
FOO = "Hello";
BAR = "${config.home.sessionVariables.FOO} World!";
};
example will cause an infinite recursion.
This commit restores the option type of
- `home.sessionVariables`,
- `pam.sessionVariables`,
- `programs.bash.sessionVariables`, and
- `programs.zsh.sessionVariables`
to `attrs`. It also adds test cases for the above options to avoid
regressions.
Fixes#659
This should allow more sensible merging behavior. In particular, with
this change it is possible to use, for example, `mkForce` for greater
control of merging.
Fixes#543
When using the NixOS module we cannot guarantee that the Nix store
will be writable during startup. Installing the user packages through
`nix-env -i` will fail in these cases.
This commit adds a NixOS option `home-manager.useUserPackages` that,
when enabled, installs user packages through the NixOS
users.users.<name?>.packages
option.
Note, when submodule support and external package install is enabled
then the installed packages are not available in `~/.nix-profile`. We
therefore set `home.profileDirectory` directly to the HM profile
packages.
This removes the `nixosSubmodule` option in favor of a new option
`submoduleSupport.enable`. This name better indicates that the
submodule mode applies to both NixOS and nix-darwin.
On non-x86 architectures (for example, aarch64) the installation of
home-manager fails indicating that it is attempting to select i686
packages for Linux and those aren't available.
Solution: make the condition for choosing these packages stricter
This commit adds the tmux program to Home Manager.
In addition to configuring tmux, a user may specify tmux plugins from
Nixpkgs. These can be included in the list of `plugins` and can either
be a package (all tmux plugins live under `nixpkgs.tmuxPlugins.*`), or
an object which includes the plugin and an `extraConfig`, which will
be run immediately after sourcing the tmux plugin.
Finally, this commit introduces two nested programs which may be
enabled which depend on tmux: tmuxp and tmuxinator. These do not have
the ability to be configured, although this may be a future
contribution.
This adds a general module infrastructure for configuring email
accounts. The intent is to specify high level information such as IMAP
and SMTP hostnames and login information so that more specific program
and service modules do not have to duplicate options for specifying
accounts.
It is allowed for modules to inject further options within this
namespace where relevant. For example, an MUA may wish add an option
to add per-account filter rules.
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
This is needed to support overriding these options inside match
blocks. A new option `programs.ssh.extraOptionOverrides` has been
added to allow global overrides.
The preferred method of theming rofi is now to use "rasi" theme files.
This commit therefore downplays the colors option and introduces the
theme option.
This is a NixOS module that is intended to be imported into a NixOS
system configuration. It allows the system users to be set up directly
from the system configuration.
The actual profile switch is performed by a oneshot systemd unit per
configured user that acts much like the regular `home-manager switch`
command.
With this implementation, the NixOS module does not work properly with
the `nixos-rebuild build-vm` command. This can be solved by using the
`users.users.<name?>.packages` option to install packages but this
does not work flawlessly with certain Nixpkgs packages. In particular,
for programs using the Qt libraries.
Adds a service for the Stalonetray system tray.
Configured through a 'config' attribute set, which writes space
separated key value pairs on successive lines to `~/.stalonetrayrc`.
Very simple module for hg based on programs.git, and is intended to have
compatible options. For simple setups, a user should be able to write
something like:
{...}:
let vcsconfig = {
enable = true;
userName = "John Smith";
userEmail = "js@example.com";
ignores = [ "*.swp" "*~" ];
};
in
{
programs.git = vcsconfig // {...extra git config...};
programs.mercurial = vcsconfig // {...extra hg confg...};
}
For this reason, the ignore options are `ignores` for `syntax: glob`
and `ignoresRegexp` for `syntax: regexp` so that simple glob ignores
can (very likely) be shared with a git config, despite regular
expressions being the default for mercurial.
This adds a Parcellite service. It has no configuration options, since
the app has its own mutable preferences dialog, which unconditionally
replaces `~/.config/parcellite/parcelliterc` when preferences are
saved.
This removes the deprecated use of `xsession.windowManager` as a
string.
This commit also adjusts the xmonad module to become a full module.
I.e., the backwards compatibility hack was removed.
When enabled this module will cause Home Manager to manage the user
environment XDG variables. When disabled, then Home Manager will use
the XDG variables taken from the user environment.
Before this path would point to the modules path. Using the project
root instead makes it possible to set `<home-manager>` to point to a
downloadable archive of Home Manager. This should make it
significantly easier to install and keep Home Manager up to date.
To match this change we also deprecate the Home Manager option
programs.home-manager.modulesPath
and instead ask users to use
programs.home-manager.path
Note, we still pull in the user's `PATH` in case the user has defined
their own activation blocks that depend on additional tools.
Eventually this will be deprecated and removed.
See #99.
The new options allow some control over automounting, notifications,
and the tray icon.
This commit also changes the defaults to automatically mount new
devices, udiskie was previously told not to automount. The change in
behavior is to closer match the default options.
This option gathers basic Vim options into a single place. The idea is
to allow many options without making the Home Manager documentation
too verbose.
This also deprecates the options `programs.vim.lineNumbers` and
`programs.vim.tabSize`.
Fixes#69.
The intention is for the `xsession.windowManager` option to be
available for full modules in the future. The option
`xsession.windowManager.command` should now be used to specify the
window manager startup command.
Same motivation as in https://github.com/NixOS/nixpkgs/pull/28378.
zsh.initExtra parameter can be used by external modules which can
redefine user aliases. This change will give user-defined aliases
the highest priority.