Compare commits

...

36 commits

Author SHA1 Message Date
Robert Helgesson b78b5fa4a0
firefox: force extension file linking
(cherry picked from commit b9d4f55228)
2020-04-09 11:42:55 +02:00
Andrei Shumailov 7aa2bd5bf4
firefox: backport extensions fix to release-19.09 2020-04-09 11:42:09 +02:00
Robert Helgesson 57f3b72d3a
files: add force flag
Enabling this flag for a `home.file` entry causes the target to be
unconditionally overwritten. The option is not visible in
documentation for now and shouldn't be relied on for general use.

(cherry picked from commit 37694e9f51)
2020-04-09 11:29:54 +02:00
Robert Helgesson 0d1ca254d0
readline: fix example
(cherry picked from commit a4a07ba996)
2020-02-16 18:10:00 +01:00
Robert Helgesson 3166ae7993
readline: add variables option
Also add a basic test case.

(cherry picked from commit 284b8d94d4)
2020-02-16 18:08:26 +01:00
Vojtěch Káně 2b71762384
readline: add module
Add basic readline configuration (~/.inputrc) management.

(cherry picked from commit bb5dea02b9)
2020-02-16 18:08:07 +01:00
dind 1261ffee91
termite: fix scrollbar position option description
Signed-off-by: dind <lewdavatar@gmail.com>
(cherry picked from commit d8d5f85ab7)
2020-02-16 18:05:32 +01:00
Robert Helgesson f5c9303ced
mpv: allow string values in scripts list
Fixes #976

(cherry picked from commit 297ed97166)
2020-01-18 23:53:20 +01:00
Ross A. Baker 8d663335eb
lorri: add gitMinimal to daemon path
Fixes https://github.com/target/lorri/issues/255 when the service is
installed through home-manager.

PR #975

(cherry picked from commit 0fce533e70)
2020-01-11 17:24:16 +01:00
Robert Helgesson 72400b2c29
contributing.md: minor update
This elaborates the instructions for the news entry of new modules.

(cherry picked from commit ef6674d1d1)
2020-01-11 17:24:15 +01:00
risson 1d38ffc372 neovim: un-deprecate the configure option (#978)
The `programs.neovim.configure` option is consistent with NixOS's
`wrapNeovim` and offers features not supported by the `extraConfig`
and `plugins` option pair.

Closes #971

(cherry picked from commit 1b7b1bc294)

Co-authored-by: Wael Nasreddine <wael.nasreddine@gmail.com>
2020-01-09 15:08:26 +01:00
oxalica 10d2c4e7e4
home-manager: fix pass-through option passing
This resolves, e.g., the errors occurring when passing empty arguments
like `--option builders ''`.

Closes #967

(cherry picked from commit 7c30831e8f)
2020-01-06 11:28:39 +01:00
Robert Helgesson b646623a39
kakoune: prepend extra configuration with newline (#870)
Fixes #869

(cherry picked from commit 1b987952b5)
2020-01-06 11:28:06 +01:00
Robert Helgesson af2303526d
install: add state version to initial configuration
This sets the state version in recent installs to the latest released
version. It is beneficial for people to be aware of this option and it
is also good to help new users get a more recent setup.

(cherry picked from commit 54f367b119)
2019-12-31 09:31:24 +01:00
Gregory Oakes 11f8b1c1ce
random-background: add bgSupport documentation
On NixOS it is necessary to set `bgSupport = true` when creating a
Home Manager desktop manager session. Otherwise NixOS will add code
that sets the background, overriding the effort made by the
`random-background` module.

Fixes #955
Pull request #956

(cherry picked from commit a12a8f7977)
2019-12-31 09:31:09 +01:00
Robert Helgesson 94c0367dd8
blueman-applet: minor cleanup of enable option
In particular use proper DocBook format in description.

(cherry picked from commit 8d14ffbe88)
2019-12-28 09:46:24 +01:00
Cabia Rangris 24c6d8dfc5
blueman: update advice for removing error message
The old method for hiding the error no longer works in NixOS 19.09,
and ends up breaking blueman-applet entirely. Enable the NixOS service
instead.

Pull request #950

(cherry picked from commit a5d3d6f665)
2019-12-28 09:46:23 +01:00
arcnmx 8fb1ed5919
systemd: fix degraded warning
(cherry picked from commit 8abaa025ec)
2019-12-28 09:45:23 +01:00
Robert Helgesson 829b688827
mbsync: skip maildir creation if no account is defined
Fixes #937

(cherry picked from commit 621c98f15a)
2019-12-28 09:45:22 +01:00
adisbladis 9e69b0d8b9
emacs: Don't use emacsPackagesNg
It's deprecated and since Nixos 19.09 it's an alias to `emacsPackages`.

(cherry picked from commit 49852220f9)
2019-12-28 09:44:22 +01:00
Robert Helgesson 9bdfdfe14e
lorri: restrict news entry to Linux
(cherry picked from commit 9e716025b6)
2019-12-10 21:00:02 +01:00
Tobias Happ b41fc9e6e8
lorri: add service
(cherry picked from commit 286dd9b308)

Fixes #944
2019-12-10 20:59:29 +01:00
Robert Helgesson 5e7a4c55ed
gpg: remove dummy gnupg package from test
It caused evaluation issues related to systemd.

Fixes #934

(cherry picked from commit ed9a6e34ad)
2019-12-08 23:05:44 +01:00
leotaku 22076437f3
mpdris2: improve service description
In particular, make sure the systemd service actually starts.

(cherry picked from commit 34dc4a5e03)
2019-12-08 23:04:48 +01:00
Philip Stears 0d7b515a65
files: additional support for symlinked /nix
In the case where `/nix` is a link, for example, on macOS Catalina,
`builtins.storeDir` returns `/nix`, not the canonical location.

This causes tests on existing files to result in Home Manager thinking
those files are outside of the store.

This change uses `readlink` on the store path so that the tests work
as intended.

(cherry picked from commit 0e9b7aab3c)
2019-12-08 23:04:39 +01:00
Robert Helgesson eafc8897e6
systemd: perform reload even in degraded state
This fixes #355, fixes #798, and fixes #909.

(cherry picked from commit 9781f3766d)
2019-12-08 23:04:38 +01:00
Anton Plotnikov 415f12bae5
files: update script to support linked Nix store
(cherry picked from commit b1dd373f5a)
2019-12-08 23:04:20 +01:00
pacien 06f1b13c21
Revert "astroid: require notmuch synchronize flags"
The Astroid program can work without this option,
which should be disabled when synchronising emails with muchsync for example.

This reverts commit fa3d1f98e0.

(cherry picked from commit 24dbac8da7)
2019-12-08 23:03:45 +01:00
pacien a0653a7fb0
astroid: fix maildir folder paths
Using the absolute path of maildir folders is required for Astroid to save
messages in those.

(cherry picked from commit 18dc4153c7)
2019-12-08 23:03:44 +01:00
Robert Helgesson dff5f07952
tests: reduce number of downloads
This replaces some derivation outputs by simple strings rather than
full Nix store paths. This removes the need to download the whole
derivation when all we need is a static string.

(cherry picked from commit 797c77a00a)
2019-10-29 23:11:09 +01:00
Robert Helgesson b905de5833
doc: update version number in some places
(cherry picked from commit 6b6f759e7a)
2019-10-29 23:10:42 +01:00
Robert Helgesson ecf333d27a
faq: describe how to install Nixpkgs unstable packages
(cherry picked from commit a93d01fb4d)
2019-10-29 23:10:33 +01:00
dnsdhrj e413a1408e
getmail: fix port option type mismatch
Fixed type mismatch in commit 410f573226.
Added test case to ensure it works well.

(cherry picked from commit a177d0282f)
2019-10-29 23:10:23 +01:00
SoonHo Seo 06ae8792e7
getmail: add port option (#882)
Fixed bug where "accounts.email.accounts.<name>.imap.port" option was being ignored in getmail.

(cherry picked from commit 410f573226)
2019-10-29 23:10:15 +01:00
Robert Helgesson f856c78a4a
doc: finalize the 19.09 release notes
(cherry picked from commit ad52dbe044)
2019-10-09 21:08:09 +02:00
Robert Helgesson 31e84945d5
gitlab-ci: activate 19.09 branch 2019-10-07 20:06:52 +02:00
51 changed files with 699 additions and 156 deletions

View file

@ -9,7 +9,7 @@ Run tests:
script: script:
- nix-shell tests -A run.files-text - nix-shell tests -A run.files-text
only: only:
- master - release-19.09
pages: pages:
stage: deploy stage: deploy
@ -34,4 +34,4 @@ Deploy NUR:
project: rycee/nur-expressions project: rycee/nur-expressions
branch: master branch: master
only: only:
- master - release-19.09

View file

@ -139,15 +139,18 @@ If you do have a change worthy of a news entry then please add one in
> use 'services.myservice.bar' instead. > use 'services.myservice.bar' instead.
- A new module, say `foo.nix`, should always include a news entry - A new module, say `foo.nix`, should always include a news entry
(without any condition) that has a message along the lines of that has a message along the lines of
> A new service is available: 'services.foo'. > A new module is available: 'services.foo'.
or If the module is platform specific, e.g., a service module using
systemd, then a condition like
> A new program configuration is available: 'program.foo'. ```
condition = hostPlatform.isLinux;
```
depending on the type of module. should be added.
[open issues]: https://github.com/rycee/home-manager/issues [open issues]: https://github.com/rycee/home-manager/issues
[new issue]: https://github.com/rycee/home-manager/issues/new [new issue]: https://github.com/rycee/home-manager/issues/new

30
FAQ.md
View file

@ -119,3 +119,33 @@ The solution on NixOS is to add
services.dbus.packages = with pkgs; [ gnome3.dconf ]; services.dbus.packages = with pkgs; [ gnome3.dconf ];
to your system configuration. to your system configuration.
How do I install packages from Nixpkgs unstable?
------------------------------------------------
If you are using a stable version of Nixpkgs but would like to install
some particular packages from Nixpkgs unstable then you can import the
unstable Nixpkgs and refer to its packages within your configuration.
Something like
```nix
{ pkgs, config, ... }:
let
pkgsUnstable = import <nixpkgs-unstable> {};
in
{
home.packages = [
pkgsUnstable.foo
];
# …
}
```
should work provided you have a Nix channel called `nixpkgs-unstable`.
Note, the package will not be affected by any package overrides,
overlays, etc.

View file

@ -19,7 +19,7 @@ will write to your dconf store and cannot tell whether a configuration
that it is about to be overwrite was from a previous Home Manager that it is about to be overwrite was from a previous Home Manager
generation or from manual configuration. generation or from manual configuration.
Home Manager targets [NixOS][] unstable and NixOS version 19.03 (the Home Manager targets [NixOS][] unstable and NixOS version 19.09 (the
current stable version), it may or may not work on other Linux current stable version), it may or may not work on other Linux
distributions and NixOS versions. distributions and NixOS versions.
@ -72,11 +72,11 @@ Currently the easiest way to install Home Manager is as follows:
if you are following Nixpkgs master or an unstable channel and if you are following Nixpkgs master or an unstable channel and
```console ```console
$ nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager $ nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
$ nix-channel --update $ nix-channel --update
``` ```
if you follow a Nixpkgs version 19.03 channel. if you follow a Nixpkgs version 19.09 channel.
On NixOS you may need to log out and back in for the channel to On NixOS you may need to log out and back in for the channel to
become available. On non-NixOS you may have to add become available. On non-NixOS you may have to add

View file

@ -79,11 +79,11 @@
if you are following Nixpkgs master or an unstable channel and if you are following Nixpkgs master or an unstable channel and
</para> </para>
<screen> <screen>
<prompt>$</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager</userinput> <prompt>$</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput>
<prompt>$</prompt> <userinput>nix-channel --update</userinput> <prompt>$</prompt> <userinput>nix-channel --update</userinput>
</screen> </screen>
<para> <para>
if you follow a Nixpkgs version 19.03 channel. if you follow a Nixpkgs version 19.09 channel.
</para> </para>
<para> <para>
On NixOS you may need to log out and back in for the channel to become On NixOS you may need to log out and back in for the channel to become
@ -169,12 +169,12 @@ $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
</para> </para>
<screen> <screen>
<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput>
<prompt>#</prompt> <userinput>nix-channel --update</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput>
</screen> </screen>
<para> <para>
if you follow a Nixpkgs version 19.03 channel. if you follow a Nixpkgs version 19.09 channel.
</para> </para>
<para> <para>
@ -251,12 +251,12 @@ home-manager.useUserPackages = true;
</para> </para>
<screen> <screen>
<prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager</userinput> <prompt>#</prompt> <userinput>nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager</userinput>
<prompt>#</prompt> <userinput>nix-channel --update</userinput> <prompt>#</prompt> <userinput>nix-channel --update</userinput>
</screen> </screen>
<para> <para>
if you follow a Nixpkgs version 19.03 channel. if you follow a Nixpkgs version 19.09 channel.
</para> </para>
<para> <para>

View file

@ -1,8 +1,20 @@
[[sec-release-19.09]] [[sec-release-19.09]]
== Release 19.09 (unreleased) == Release 19.09
This is the current unstable branch and the information in this The 19.09 release branch became the stable branch in October, 2019.
section is therefore not final.
[[sec-release-19.09-highlights]]
=== Highlights
This release has the following notable changes:
* The <<opt-programs.firefox.enableGoogleTalk>> and
<<opt-programs.firefox.enableIcedTea>> options are now deprecated
and will only work if Firefox ESR 52.x is used.
* The `home-manager` tool now provides an `uninstall` sub-command that
can be used to uninstall Home Manager, if used in the standalone
mode. That is, not as a NixOS module.
[[sec-release-19.09-state-version-changes]] [[sec-release-19.09-state-version-changes]]
=== State Version Changes === State Version Changes

View file

@ -93,14 +93,14 @@ function doBuildAttr() {
nix build \ nix build \
-f "<home-manager/home-manager/home-manager.nix>" \ -f "<home-manager/home-manager/home-manager.nix>" \
$extraArgs \ $extraArgs \
${PASSTHROUGH_OPTS[*]} \ "${PASSTHROUGH_OPTS[@]}" \
--argstr confPath "$HOME_MANAGER_CONFIG" \ --argstr confPath "$HOME_MANAGER_CONFIG" \
--argstr confAttr "$HOME_MANAGER_CONFIG_ATTRIBUTE" --argstr confAttr "$HOME_MANAGER_CONFIG_ATTRIBUTE"
else else
nix-build \ nix-build \
"<home-manager/home-manager/home-manager.nix>" \ "<home-manager/home-manager/home-manager.nix>" \
$extraArgs \ $extraArgs \
${PASSTHROUGH_OPTS[*]} \ "${PASSTHROUGH_OPTS[@]}" \
--argstr confPath "$HOME_MANAGER_CONFIG" \ --argstr confPath "$HOME_MANAGER_CONFIG" \
--argstr confAttr "$HOME_MANAGER_CONFIG_ATTRIBUTE" --argstr confAttr "$HOME_MANAGER_CONFIG_ATTRIBUTE"
fi fi

View file

@ -21,6 +21,16 @@ runCommand
{ {
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "19.09";
} }
EOF EOF
fi fi

View file

@ -23,10 +23,6 @@ let
then file.source then file.source
else builtins.path { path = file.source; name = sourceName; }; else builtins.path { path = file.source; name = sourceName; };
# A symbolic link whose target path matches this pattern will be
# considered part of a Home Manager generation.
homeFilePattern = "${builtins.storeDir}/*-home-manager-files/*";
in in
{ {
@ -49,16 +45,40 @@ in
# overwrite an existing file. # overwrite an existing file.
home.activation.checkLinkTargets = dag.entryBefore ["writeBoundary"] ( home.activation.checkLinkTargets = dag.entryBefore ["writeBoundary"] (
let let
# Paths that should be forcibly overwritten by Home Manager.
# Caveat emptor!
forcedPaths =
concatMapStringsSep " " (p: ''"$HOME/${p}"'')
(mapAttrsToList (n: v: v.target)
(filterAttrs (n: v: v.force) cfg));
check = pkgs.writeText "check" '' check = pkgs.writeText "check" ''
. ${./lib-bash/color-echo.sh} . ${./lib-bash/color-echo.sh}
# A symbolic link whose target path matches this pattern will be
# considered part of a Home Manager generation.
homeFilePattern="$(readlink -e "${builtins.storeDir}")/*-home-manager-files/*"
forcedPaths=(${forcedPaths})
newGenFiles="$1" newGenFiles="$1"
shift shift
for sourcePath in "$@" ; do for sourcePath in "$@" ; do
relativePath="''${sourcePath#$newGenFiles/}" relativePath="''${sourcePath#$newGenFiles/}"
targetPath="$HOME/$relativePath" targetPath="$HOME/$relativePath"
if [[ -e "$targetPath" \
&& ! "$(readlink "$targetPath")" == ${homeFilePattern} ]] ; then forced=""
for forcedPath in "''${forcedPaths[@]}"; do
if [[ $targetPath == $forcedPath* ]]; then
forced="yeah"
break
fi
done
if [[ -n $forced ]]; then
$VERBOSE_ECHO "Skipping collision check for $targetPath"
elif [[ -e "$targetPath" \
&& ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then
if [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then if [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then
backup="$targetPath.$HOME_MANAGER_BACKUP_EXT" backup="$targetPath.$HOME_MANAGER_BACKUP_EXT"
if [[ -e "$backup" ]]; then if [[ -e "$backup" ]]; then
@ -133,13 +153,17 @@ in
cleanup = pkgs.writeText "cleanup" '' cleanup = pkgs.writeText "cleanup" ''
. ${./lib-bash/color-echo.sh} . ${./lib-bash/color-echo.sh}
# A symbolic link whose target path matches this pattern will be
# considered part of a Home Manager generation.
homeFilePattern="$(readlink -e "${builtins.storeDir}")/*-home-manager-files/*"
newGenFiles="$1" newGenFiles="$1"
shift 1 shift 1
for relativePath in "$@" ; do for relativePath in "$@" ; do
targetPath="$HOME/$relativePath" targetPath="$HOME/$relativePath"
if [[ -e "$newGenFiles/$relativePath" ]] ; then if [[ -e "$newGenFiles/$relativePath" ]] ; then
$VERBOSE_ECHO "Checking $targetPath: exists" $VERBOSE_ECHO "Checking $targetPath: exists"
elif [[ ! "$(readlink "$targetPath")" == ${homeFilePattern} ]] ; then elif [[ ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then
warnEcho "Path '$targetPath' not link into Home Manager generation. Skipping delete." warnEcho "Path '$targetPath' not link into Home Manager generation. Skipping delete."
else else
$VERBOSE_ECHO "Checking $targetPath: gone (deleting)" $VERBOSE_ECHO "Checking $targetPath: gone (deleting)"
@ -236,6 +260,9 @@ in
('' (''
mkdir -p $out mkdir -p $out
# Needed in case /nix is a symbolic link.
realOut="$(realpath -m "$out")"
function insertFile() { function insertFile() {
local source="$1" local source="$1"
local relTarget="$2" local relTarget="$2"
@ -244,10 +271,10 @@ in
# Figure out the real absolute path to the target. # Figure out the real absolute path to the target.
local target local target
target="$(realpath -m "$out/$relTarget")" target="$(realpath -m "$realOut/$relTarget")"
# Target path must be within $HOME. # Target path must be within $HOME.
if [[ ! $target == $out* ]] ; then if [[ ! $target == $realOut* ]] ; then
echo "Error installing file '$relTarget' outside \$HOME" >&2 echo "Error installing file '$relTarget' outside \$HOME" >&2
exit 1 exit 1
fi fi

View file

@ -86,6 +86,18 @@ in
into place. into place.
''; '';
}; };
force = mkOption {
type = types.bool;
default = false;
visible = false;
description = ''
Whether the target path should be unconditionally replaced
by the managed file source. Warning, this will silently
delete the target regardless of whether it is a file or
link.
'';
};
}; };
config = { config = {

View file

@ -1207,6 +1207,47 @@ in
A new module is available: 'programs.rtorrent'. A new module is available: 'programs.rtorrent'.
''; '';
} }
{
time = "2019-12-10T19:58:00+00:00";
condition = hostPlatform.isLinux;
message = ''
A new module is available: 'services.lorri'.
'';
}
{
time = "2020-02-16T17:07:44+00:00";
message = ''
A new module is available: 'programs.readline'.
'';
}
{
time = "2020-03-15T16:55:28+00:00";
condition = config.programs.firefox.enable;
message = ''
In anticipation of Firefox dropping support for extension
sideloading[1], we now install extensions directly to
Firefox profiles managed through Home Manager's
'programs.firefox.profiles'
option.
Unfortunately this will most likely trigger an "Existing
file is in the way" error when activating your configuration
since Firefox keeps a copy of the add-on in the location
Home Manager wants to overwrite. If this is the case, remove
the listed '.xpi' files and try again.
This change also means that extensions installed through
Home Manager may disappear from unmanaged profiles in future
Firefox releases.
[1] https://blog.mozilla.org/addons/2019/10/31/firefox-to-discontinue-sideloaded-extensions/
'';
}
]; ];
}; };
} }

View file

@ -83,6 +83,7 @@ let
(loadModule ./programs/offlineimap.nix { }) (loadModule ./programs/offlineimap.nix { })
(loadModule ./programs/opam.nix { }) (loadModule ./programs/opam.nix { })
(loadModule ./programs/pidgin.nix { }) (loadModule ./programs/pidgin.nix { })
(loadModule ./programs/readline.nix { })
(loadModule ./programs/rofi.nix { }) (loadModule ./programs/rofi.nix { })
(loadModule ./programs/rtorrent.nix { }) (loadModule ./programs/rtorrent.nix { })
(loadModule ./programs/skim.nix { }) (loadModule ./programs/skim.nix { })
@ -114,6 +115,7 @@ let
(loadModule ./services/kdeconnect.nix { }) (loadModule ./services/kdeconnect.nix { })
(loadModule ./services/keepassx.nix { }) (loadModule ./services/keepassx.nix { })
(loadModule ./services/keybase.nix { }) (loadModule ./services/keybase.nix { })
(loadModule ./services/lorri.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/mbsync.nix { }) (loadModule ./services/mbsync.nix { })
(loadModule ./services/mpd.nix { }) (loadModule ./services/mpd.nix { })
(loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; }) (loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; })

View file

@ -20,9 +20,9 @@ let
sendmail = astroid.sendMailCommand; sendmail = astroid.sendMailCommand;
additional_sent_tags = ""; additional_sent_tags = "";
default = boolOpt primary; default = boolOpt primary;
save_drafts_to = folders.drafts; save_drafts_to = "${maildir.absPath}/${folders.drafts}";
save_sent = "true"; save_sent = "true";
save_sent_to = folders.sent; save_sent_to = "${maildir.absPath}/${folders.sent}";
select_query = ""; select_query = "";
} }
// optionalAttrs (signature.showSignature != "none") { // optionalAttrs (signature.showSignature != "none") {
@ -106,14 +106,6 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [
{
assertion = config.programs.notmuch.maildir.synchronizeFlags;
message = "The astroid module requires"
+ " 'programs.notmuch.maildir.synchronizeFlags = true'.";
}
];
home.packages = [ pkgs.astroid ]; home.packages = [ pkgs.astroid ];
xdg.configFile."astroid/config".source = xdg.configFile."astroid/config".source =

View file

@ -12,7 +12,7 @@ let
# overrides. # overrides.
emacsPackages = emacsPackages =
let let
epkgs = pkgs.emacsPackagesNgGen cfg.package; epkgs = pkgs.emacsPackagesGen cfg.package;
in in
epkgs.overrideScope' cfg.overrides; epkgs.overrideScope' cfg.overrides;
emacsWithPackages = emacsPackages.emacsWithPackages; emacsWithPackages = emacsPackages.emacsWithPackages;
@ -42,7 +42,7 @@ in
description = '' description = ''
Extra packages available to Emacs. To get a list of Extra packages available to Emacs. To get a list of
available packages run: available packages run:
<command>nix-env -f '&lt;nixpkgs&gt;' -qaP -A emacsPackagesNg</command>. <command>nix-env -f '&lt;nixpkgs&gt;' -qaP -A emacsPackages</command>.
''; '';
}; };

View file

@ -6,8 +6,21 @@ let
cfg = config.programs.firefox; cfg = config.programs.firefox;
mozillaConfigPath = ".mozilla";
firefoxConfigPath = "${mozillaConfigPath}/firefox";
profilesPath = firefoxConfigPath;
# The extensions path shared by all profiles; will not be supported
# by future Firefox versions.
extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
extensionsEnvPkg = pkgs.buildEnv {
name = "hm-firefox-extensions";
paths = cfg.extensions;
};
profiles = profiles =
flip mapAttrs' cfg.profiles (_: profile: flip mapAttrs' cfg.profiles (_: profile:
nameValuePair "Profile${toString profile.id}" { nameValuePair "Profile${toString profile.id}" {
@ -250,32 +263,31 @@ in
home.file = mkMerge ( home.file = mkMerge (
[{ [{
".mozilla/${extensionPath}" = mkIf (cfg.extensions != []) ( "${mozillaConfigPath}/${extensionPath}" = mkIf (cfg.extensions != []) {
let source = "${extensionsEnvPkg}/share/mozilla/${extensionPath}";
extensionsEnv = pkgs.buildEnv { recursive = true;
name = "hm-firefox-extensions"; };
paths = cfg.extensions;
};
in {
source = "${extensionsEnv}/share/mozilla/${extensionPath}";
recursive = true;
}
);
".mozilla/firefox/profiles.ini" = mkIf (cfg.profiles != {}) { "${firefoxConfigPath}/profiles.ini" = mkIf (cfg.profiles != {}) {
text = profilesIni; text = profilesIni;
}; };
}] }]
++ flip mapAttrsToList cfg.profiles (_: profile: { ++ flip mapAttrsToList cfg.profiles (_: profile: {
".mozilla/firefox/${profile.path}/chrome/userChrome.css" = "${profilesPath}/${profile.path}/chrome/userChrome.css" =
mkIf (profile.userChrome != "") { mkIf (profile.userChrome != "") {
text = profile.userChrome; text = profile.userChrome;
}; };
".mozilla/firefox/${profile.path}/user.js" = "${profilesPath}/${profile.path}/user.js" =
mkIf (profile.settings != {} || profile.extraConfig != "") { mkIf (profile.settings != {} || profile.extraConfig != "") {
text = mkUserJs profile.settings profile.extraConfig; text = mkUserJs profile.settings profile.extraConfig;
}; };
"${profilesPath}/${profile.path}/extensions" = mkIf (cfg.extensions != []) {
source = "${extensionsEnvPkg}/share/mozilla/${extensionPath}";
recursive = true;
force = true;
};
}) })
); );
}; };

View file

@ -31,6 +31,7 @@ let
[retriever] [retriever]
type = ${retrieverType} type = ${retrieverType}
server = ${imap.host} server = ${imap.host}
${optionalString (imap.port != null) "port = ${toString imap.port}"}
username = ${userName} username = ${userName}
password_command = (${passCmd}) password_command = (${passCmd})
mailboxes = ( ${renderedMailboxes} ) mailboxes = ( ${renderedMailboxes} )

View file

@ -540,6 +540,7 @@ let
in in
pkgs.writeText "kakrc" ( pkgs.writeText "kakrc" (
optionalString (cfg.config != null) cfgStr optionalString (cfg.config != null) cfgStr
+ "\n"
+ cfg.extraConfig + cfg.extraConfig
); );

View file

@ -178,11 +178,13 @@ in
++ groupsConfig ++ groupsConfig
) + "\n"; ) + "\n";
home.activation.createMaildir = home.activation = mkIf (mbsyncAccounts != []) {
dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' createMaildir =
$DRY_RUN_CMD mkdir -m700 -p $VERBOSE_ARG ${ dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
concatMapStringsSep " " (a: a.maildir.absPath) mbsyncAccounts $DRY_RUN_CMD mkdir -m700 -p $VERBOSE_ARG ${
} concatMapStringsSep " " (a: a.maildir.absPath) mbsyncAccounts
''; }
'';
};
}; };
} }

View file

@ -55,7 +55,7 @@ in {
enable = mkEnableOption "mpv"; enable = mkEnableOption "mpv";
scripts = mkOption { scripts = mkOption {
type = types.listOf types.package; type = with types; listOf (either package str);
default = []; default = [];
example = literalExample "[ pkgs.mpvScripts.mpris ]"; example = literalExample "[ pkgs.mpvScripts.mpris ]";
description = '' description = ''

View file

@ -148,8 +148,8 @@ in
</para><para> </para><para>
This option is deprecated. Please use the options <varname>extraConfig</varname> This option is mutually exclusive with <varname>extraConfig</varname>
and <varname>plugins</varname> which are mutually exclusive with this option. and <varname>plugins</varname>.
''; '';
}; };
@ -193,11 +193,6 @@ in
} }
]; ];
warnings = optional (cfg.configure != {}) ''
The programs.neovim.configure option is deprecated. Please use
extraConfig and package option.
'';
home.packages = [ cfg.finalPackage ]; home.packages = [ cfg.finalPackage ];
programs.neovim.finalPackage = pkgs.wrapNeovim cfg.package { programs.neovim.finalPackage = pkgs.wrapNeovim cfg.package {

View file

@ -0,0 +1,78 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.readline;
mkSetVariableStr = n: v:
let
mkValueStr = v:
if v == true then "on"
else if v == false then "off"
else if isInt v then toString v
else if isString v then v
else abort ("values ${toPretty v} is of unsupported type");
in
"set ${n} ${mkValueStr v}";
mkBindingStr = k: v: "\"${k}\": ${v}";
in
{
options.programs.readline = {
enable = mkEnableOption "readline";
bindings = mkOption {
default = {};
type = types.attrsOf types.str;
example = literalExample ''
{ "\\C-h" = "backward-kill-word"; }
'';
description = "Readline bindings.";
};
variables = mkOption {
type = with types; attrsOf (either str (either int bool));
default = {};
example = { expand-tilde = true; };
description = ''
Readline customization variable assignments.
'';
};
includeSystemConfig = mkOption {
type = types.bool;
default = true;
description = "Whether to include the system-wide configuration.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Configuration lines appended unchanged to the end of the
<filename>~/.inputrc</filename> file.
'';
};
};
config = mkIf cfg.enable {
home.file.".inputrc".text =
let
configStr = concatStringsSep "\n" (
optional cfg.includeSystemConfig "$include /etc/inputrc"
++ mapAttrsToList mkSetVariableStr cfg.variables
++ mapAttrsToList mkBindingStr cfg.bindings
);
in
''
# Generated by Home Manager.
${configStr}
${cfg.extraConfig}
'';
};
}

View file

@ -178,7 +178,7 @@ in
scrollbar = mkOption { scrollbar = mkOption {
default = null; default = null;
type = types.nullOr (types.enum [ "off" "left" "right" ]); type = types.nullOr (types.enum [ "off" "left" "right" ]);
description = "Scroll to the bottom when the shell generates output."; description = "Scrollbar position.";
}; };
backgroundColor = mkOption { backgroundColor = mkOption {

View file

@ -5,15 +5,18 @@ with lib;
{ {
options = { options = {
services.blueman-applet = { services.blueman-applet = {
enable = mkEnableOption '' enable = mkEnableOption "" // {
Blueman applet. description = ''
Whether to enable the Blueman applet.
Note, for the applet to work, 'blueman' package should also be installed system-wide </para><para>
since it requires running 'blueman-mechanism' service activated via dbus. Note, for the applet to work, the 'blueman' service should
You can add it to the dbus packages in system configuration: be enabled system-wide. You can enable it in the system
configuration using
services.dbus.packages = [ pkgs.blueman ]; <programlisting language="nix">
''; services.blueman.enable = true;
</programlisting>
'';
};
}; };
}; };

View file

@ -0,0 +1,58 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.lorri;
in
{
meta.maintainers = [ maintainers.gerschtli ];
options = {
services.lorri.enable = mkEnableOption "lorri build daemon";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.lorri ];
systemd.user = {
services.lorri = {
Unit = {
Description = "lorri build daemon";
Requires = "lorri.socket";
After = "lorri.socket";
RefuseManualStart = true;
};
Service = {
ExecStart = "${pkgs.lorri}/bin/lorri daemon";
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = "read-only";
Restart = "on-failure";
Environment =
let path = with pkgs; makeSearchPath "bin" [ nix gitMinimal gnutar gzip ];
in "PATH=${path}";
};
};
sockets.lorri = {
Unit = {
Description = "Socket for lorri build daemon";
};
Socket = {
ListenStream = "%t/lorri/daemon.socket";
RuntimeDirectory = "lorri";
};
Install = {
WantedBy = [ "sockets.target" ];
};
};
};
};
}

View file

@ -86,15 +86,21 @@ in
xdg.configFile."mpDris2/mpDris2.conf".text = toIni mpdris2Conf; xdg.configFile."mpDris2/mpDris2.conf".text = toIni mpdris2Conf;
systemd.user.services.mpdris2 = { systemd.user.services.mpdris2 = {
Install = {
WantedBy = [ "default.target" ];
};
Unit = { Unit = {
Description = "MPRIS 2 support for MPD"; Description = "MPRIS 2 support for MPD";
After = [ "graphical-session-pre.target" "mpd.service" ]; After = [ "mpd.service" ];
PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
Restart = "on-failure";
RestartSec = "5s";
ExecStart = "${cfg.package}/bin/mpDris2"; ExecStart = "${cfg.package}/bin/mpDris2";
BusName = "org.mpris.MediaPlayer2.mpd";
}; };
}; };
}; };

View file

@ -22,7 +22,17 @@ in
options = { options = {
services.random-background = { services.random-background = {
enable = mkEnableOption "random desktop background"; enable = mkEnableOption "" // {
description = ''
Whether to enable random desktop background.
</para><para>
Note, if you are using NixOS and have set up a custom
desktop manager session for Home Manager, then the session
configuration must have the <option>bgSupport</option>
option set to <literal>true</literal> or the background
image set by this module may be overwritten.
'';
};
imageDirectory = mkOption { imageDirectory = mkOption {
type = types.str; type = types.str;

View file

@ -242,15 +242,27 @@ in
''; '';
ensureRuntimeDir = "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"; ensureRuntimeDir = "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)}";
systemctl = "${ensureRuntimeDir} ${cfg.systemctlPath}";
in in
'' ''
if ${ensureRuntimeDir} ${cfg.systemctlPath} --quiet --user is-system-running 2> /dev/null; then systemdStatus=$(${systemctl} --user is-system-running 2>&1 || true)
if [[ $systemdStatus == 'running' || $systemdStatus == 'degraded' ]]; then
if [[ $systemdStatus == 'degraded' ]]; then
warnEcho "The user systemd session is degraded:"
${systemctl} --user --state=failed
warnEcho "Attempting to reload services anyway..."
fi
${ensureRuntimeDir} \ ${ensureRuntimeDir} \
PATH=${dirOf cfg.systemctlPath}:$PATH \ PATH=${dirOf cfg.systemctlPath}:$PATH \
${if cfg.startServices then autoReloadCmd else legacyReloadCmd} ${if cfg.startServices then autoReloadCmd else legacyReloadCmd}
else else
echo "User systemd daemon not running. Skipping reload." echo "User systemd daemon not running. Skipping reload."
fi fi
unset systemdStatus
'' ''
); );
}) })

View file

@ -46,6 +46,7 @@ import nmt {
// import ./modules/programs/alacritty // import ./modules/programs/alacritty
// import ./modules/programs/bash // import ./modules/programs/bash
// import ./modules/programs/gpg // import ./modules/programs/gpg
// import ./modules/programs/readline
// import ./modules/programs/ssh // import ./modules/programs/ssh
// import ./modules/programs/tmux // import ./modules/programs/tmux
// import ./modules/programs/zsh; // import ./modules/programs/zsh;

View file

@ -14,6 +14,16 @@ with lib;
profileExtra = "profile extra commands"; profileExtra = "profile extra commands";
}; };
nixpkgs.overlays = [
(self: super: {
xorg = super.xorg // {
setxkbmap = super.xorg.setxkbmap // {
outPath = "@setxkbmap@";
};
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.xprofile assertFileExists home-files/.xprofile
assertFileContent \ assertFileContent \
@ -28,10 +38,7 @@ with lib;
assertFileExists home-files/.config/systemd/user/setxkbmap.service assertFileExists home-files/.config/systemd/user/setxkbmap.service
assertFileContent \ assertFileContent \
home-files/.config/systemd/user/setxkbmap.service \ home-files/.config/systemd/user/setxkbmap.service \
${pkgs.substituteAll { ${./basic-setxkbmap-expected.service}
src = ./basic-setxkbmap-expected.service;
inherit (pkgs.xorg) setxkbmap;
}}
''; '';
}; };
} }

View file

@ -20,14 +20,21 @@ with lib;
profileExtra = "profile extra commands"; profileExtra = "profile extra commands";
}; };
nixpkgs.overlays = [
(self: super: {
xorg = super.xorg // {
setxkbmap = super.xorg.setxkbmap // {
outPath = "@setxkbmap@";
};
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.config/systemd/user/setxkbmap.service assertFileExists home-files/.config/systemd/user/setxkbmap.service
assertFileContent \ assertFileContent \
home-files/.config/systemd/user/setxkbmap.service \ home-files/.config/systemd/user/setxkbmap.service \
${pkgs.substituteAll { ${./keyboard-without-layout-expected.service}
src = ./keyboard-without-layout-expected.service;
inherit (pkgs.xorg) setxkbmap;
}}
''; '';
}; };
} }

View file

@ -6,6 +6,12 @@ with lib;
config = { config = {
programs.alacritty.enable = true; programs.alacritty.enable = true;
nixpkgs.overlays = [
(self: super: {
alacritty = pkgs.writeScriptBin "dummy-alacritty" "";
})
];
nmt.script = '' nmt.script = ''
assertPathNotExists home-files/.config/alacritty assertPathNotExists home-files/.config/alacritty
''; '';

View file

@ -23,6 +23,12 @@ with lib;
}; };
}; };
nixpkgs.overlays = [
(self: super: {
alacritty = pkgs.writeScriptBin "dummy-alacritty" "";
})
];
nmt.script = '' nmt.script = ''
assertFileContent \ assertFileContent \
home-files/.config/alacritty/alacritty.yml \ home-files/.config/alacritty/alacritty.yml \

View file

@ -1,6 +1,6 @@
# -*- mode: sh -*- # -*- mode: sh -*-
. "@homeDirectory@/.nix-profile/etc/profile.d/hm-session-vars.sh" . "/home/testuser/.nix-profile/etc/profile.d/hm-session-vars.sh"
export V1="v1" export V1="v1"
export V2="v2-v1" export V2="v2-v1"

View file

@ -13,16 +13,13 @@ with lib;
}; };
}; };
home.homeDirectory = "/home/testuser";
nmt.script = '' nmt.script = ''
assertFileExists home-files/.profile assertFileExists home-files/.profile
assertFileContent \ assertFileContent \
home-files/.profile \ home-files/.profile \
${ ${./session-variables-expected.txt}
pkgs.substituteAll {
src = ./session-variables-expected.txt;
inherit (config.home) homeDirectory;
}
}
''; '';
}; };
} }

View file

@ -11,6 +11,24 @@ with lib;
}; };
}; };
nixpkgs.overlays = [
(self: super: {
firefox-unwrapped =
pkgs.runCommand
"firefox-0"
{
meta.description = "I pretend to be Firefox";
preferLocalBuild = true;
allowSubstitutes = false;
}
''
mkdir -p "$out/bin"
touch "$out/bin/firefox"
chmod 755 "$out/bin/firefox"
'';
})
];
nmt.script = '' nmt.script = ''
assertFileRegex \ assertFileRegex \
home-path/bin/firefox \ home-path/bin/firefox \

View file

@ -8,6 +8,24 @@ with lib;
programs.firefox.enable = true; programs.firefox.enable = true;
nixpkgs.overlays = [
(self: super: {
firefox-unwrapped =
pkgs.runCommand
"firefox-0"
{
meta.description = "I pretend to be Firefox";
preferLocalBuild = true;
allowSubstitutes = false;
}
''
mkdir -p "$out/bin"
touch "$out/bin/firefox"
chmod 755 "$out/bin/firefox"
'';
})
];
nmt.script = '' nmt.script = ''
assertFileRegex \ assertFileRegex \
home-path/bin/firefox \ home-path/bin/firefox \

View file

@ -2,6 +2,7 @@
[retriever] [retriever]
type = SimpleIMAPSSLRetriever type = SimpleIMAPSSLRetriever
server = imap.example.com server = imap.example.com
port = 993
username = home.manager username = home.manager
password_command = ('password-command') password_command = ('password-command')
mailboxes = ( 'INBOX', 'Sent', 'Work' ) mailboxes = ( 'INBOX', 'Sent', 'Work' )

View file

@ -10,11 +10,14 @@ with lib;
home.homeDirectory = "/home/hm-user"; home.homeDirectory = "/home/hm-user";
accounts.email.accounts = { accounts.email.accounts = {
"hm@example.com".getmail = { "hm@example.com" = {
enable = true; getmail = {
mailboxes = ["INBOX" "Sent" "Work"]; enable = true;
destinationCommand = "/bin/maildrop"; mailboxes = ["INBOX" "Sent" "Work"];
delete = false; destinationCommand = "/bin/maildrop";
delete = false;
};
imap.port = 993;
}; };
}; };

View file

@ -8,6 +8,7 @@ with lib;
config = { config = {
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitMinimal;
userEmail = "hm@example.com"; userEmail = "hm@example.com";
userName = "H. M. Test"; userName = "H. M. Test";
}; };

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
@ -6,6 +6,7 @@ with lib;
config = { config = {
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitMinimal;
extraConfig = '' extraConfig = ''
This can be anything. This can be anything.
''; '';

View file

@ -24,6 +24,7 @@ in
programs.git = mkMerge [ programs.git = mkMerge [
{ {
enable = true; enable = true;
package = pkgs.gitMinimal;
aliases = { aliases = {
a1 = "foo"; a1 = "foo";
a2 = "bar"; a2 = "bar";

View file

@ -0,0 +1,3 @@
{
readline-using-all-options = ./using-all-options.nix;
}

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.readline = {
enable = true;
bindings = { "\\C-h" = "backward-kill-word"; };
variables = {
bell-style = "audible";
completion-map-case = true;
completion-prefix-display-length = 2;
};
extraConfig = ''
$if mode=emacs
"\e[1~": beginning-of-line
$endif
'';
};
nmt.script = ''
assertFileContent \
home-files/.inputrc \
${./using-all-options.txt}
'';
};
}

View file

@ -0,0 +1,11 @@
# Generated by Home Manager.
$include /etc/inputrc
set bell-style audible
set completion-map-case on
set completion-prefix-display-length 2
"\C-h": backward-kill-word
$if mode=emacs
"\e[1~": beginning-of-line
$endif

View file

@ -2,16 +2,6 @@
with lib; with lib;
let
substituteExpected = path: pkgs.substituteAll {
src = path;
sensible_rtp = pkgs.tmuxPlugins.sensible.rtp;
};
in
{ {
config = { config = {
programs.tmux = { programs.tmux = {
@ -19,10 +9,20 @@ in
disableConfirmationPrompt = true; disableConfirmationPrompt = true;
}; };
nixpkgs.overlays = [
(self: super: {
tmuxPlugins = super.tmuxPlugins // {
sensible = super.tmuxPlugins.sensible // {
rtp = "@sensible_rtp@";
};
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.tmux.conf assertFileExists home-files/.tmux.conf
assertFileContent home-files/.tmux.conf \ assertFileContent home-files/.tmux.conf \
${substituteExpected ./disable-confirmation-prompt.conf} ${./disable-confirmation-prompt.conf}
''; '';
}; };
} }

View file

@ -37,18 +37,18 @@ set -g history-limit 2000
# tmuxplugin-logging # tmuxplugin-logging
# --------------------- # ---------------------
run-shell @tmuxplugin_logging@/share/tmux-plugins/logging/logging.tmux run-shell @tmuxplugin_logging_rtp@
# tmuxplugin-prefix-highlight # tmuxplugin-prefix-highlight
# --------------------- # ---------------------
run-shell @tmuxplugin_prefix_highlight@/share/tmux-plugins/prefix-highlight/prefix_highlight.tmux run-shell @tmuxplugin_prefix_highlight_rtp@
# tmuxplugin-fzf-tmux-url # tmuxplugin-fzf-tmux-url
# --------------------- # ---------------------
run-shell @tmuxplugin_fzf_tmux_url@/share/tmux-plugins/fzf-tmux-url/fzf-url.tmux run-shell @tmuxplugin_fzf_tmux_url_rtp@
# ============================================= # # ============================================= #

View file

@ -2,19 +2,6 @@
with lib; with lib;
let
substituteExpected = path: pkgs.substituteAll {
src = path;
tmuxplugin_fzf_tmux_url = pkgs.tmuxPlugins.fzf-tmux-url;
tmuxplugin_logging = pkgs.tmuxPlugins.logging;
tmuxplugin_prefix_highlight = pkgs.tmuxPlugins.prefix-highlight;
tmuxplugin_sensible_rtp = pkgs.tmuxPlugins.sensible.rtp;
};
in
{ {
config = { config = {
programs.tmux = { programs.tmux = {
@ -32,10 +19,31 @@ in
]; ];
}; };
nixpkgs.overlays = [
(self: super: {
tmuxPlugins = super.tmuxPlugins // {
fzf-tmux-url = super.tmuxPlugins.fzf-tmux-url // {
rtp = "@tmuxplugin_fzf_tmux_url_rtp@";
};
logging = super.tmuxPlugins.logging // {
rtp = "@tmuxplugin_logging_rtp@";
};
prefix-highlight = super.tmuxPlugins.prefix-highlight // {
rtp = "@tmuxplugin_prefix_highlight_rtp@";
};
sensible = super.tmuxPlugins.sensible // {
rtp = "@tmuxplugin_sensible_rtp@";
};
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.tmux.conf assertFileExists home-files/.tmux.conf
assertFileContent home-files/.tmux.conf \ assertFileContent home-files/.tmux.conf ${./emacs-with-plugins.conf}
${substituteExpected ./emacs-with-plugins.conf}
''; '';
}; };
} }

View file

@ -2,15 +2,7 @@
with lib; with lib;
let {
substituteExpected = path: pkgs.substituteAll {
src = path;
sensible_rtp = pkgs.tmuxPlugins.sensible.rtp;
};
in {
config = { config = {
programs.tmux = { programs.tmux = {
aggressiveResize = true; aggressiveResize = true;
@ -21,10 +13,19 @@ in {
reverseSplit = true; reverseSplit = true;
}; };
nixpkgs.overlays = [
(self: super: {
tmuxPlugins = super.tmuxPlugins // {
sensible = super.tmuxPlugins.sensible // {
rtp = "@sensible_rtp@";
};
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.tmux.conf assertFileExists home-files/.tmux.conf
assertFileContent home-files/.tmux.conf \ assertFileContent home-files/.tmux.conf ${./vi-all-true.conf}
${substituteExpected ./vi-all-true.conf}
''; '';
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
@ -13,6 +13,12 @@ with lib;
}; };
}; };
nixpkgs.overlays = [
(self: super: {
zsh = pkgs.writeScriptBin "dummy-zsh" "";
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.zshrc assertFileExists home-files/.zshrc
assertFileRegex home-files/.zshrc 'export V1="v1"' assertFileRegex home-files/.zshrc 'export V1="v1"'

View file

@ -0,0 +1,100 @@
font pango:monospace 8
floating_modifier Mod1
new_window normal 2
new_float normal 2
hide_edge_borders none
force_focus_wrapping no
focus_follows_mouse yes
focus_on_window_activation smart
mouse_warping output
workspace_layout default
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+1 workspace 1
bindsym Mod1+2 workspace 2
bindsym Mod1+3 workspace 3
bindsym Mod1+4 workspace 4
bindsym Mod1+5 workspace 5
bindsym Mod1+6 workspace 6
bindsym Mod1+7 workspace 7
bindsym Mod1+8 workspace 8
bindsym Mod1+9 workspace 9
bindsym Mod1+Down focus down
bindsym Mod1+Invented invented-key-command
bindsym Mod1+Left overridden-command
bindsym Mod1+Return exec i3-sensible-terminal
bindsym Mod1+Shift+1 move container to workspace 1
bindsym Mod1+Shift+2 move container to workspace 2
bindsym Mod1+Shift+3 move container to workspace 3
bindsym Mod1+Shift+4 move container to workspace 4
bindsym Mod1+Shift+5 move container to workspace 5
bindsym Mod1+Shift+6 move container to workspace 6
bindsym Mod1+Shift+7 move container to workspace 7
bindsym Mod1+Shift+8 move container to workspace 8
bindsym Mod1+Shift+9 move container to workspace 9
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Right move right
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+c reload
bindsym Mod1+Shift+e exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'
bindsym Mod1+Shift+q kill
bindsym Mod1+Shift+r restart
bindsym Mod1+Shift+space floating toggle
bindsym Mod1+Up focus up
bindsym Mod1+d exec @dmenu@/bin/dmenu_run
bindsym Mod1+e layout toggle split
bindsym Mod1+f fullscreen toggle
bindsym Mod1+h split h
bindsym Mod1+r mode resize
bindsym Mod1+s layout stacking
bindsym Mod1+space focus mode_toggle
bindsym Mod1+v split v
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px or 10 ppt
bindsym Escape mode default
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Return mode default
bindsym Right resize grow width 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
}
bar {
font pango:monospace 8
mode dock
hidden_state hide
position bottom
status_command @i3status@/bin/i3status
i3bar_command @i3@/bin/i3bar
workspace_buttons yes
strip_workspace_numbers no
tray_output primary
colors {
background #000000
statusline #ffffff
separator #666666
focused_workspace #4c7899 #285577 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
binding_mode #2f343a #900000 #ffffff
}
}

View file

@ -18,17 +18,26 @@ with lib;
}; };
}; };
nixpkgs.overlays = [
(self: super: {
dmenu = super.dmenu // {
outPath = "@dmenu@";
};
i3 = super.i3 // {
outPath = "@i3@";
};
i3status = super.i3status // {
outPath = "@i3status@";
};
})
];
nmt.script = '' nmt.script = ''
assertFileExists home-files/.config/i3/config assertFileExists home-files/.config/i3/config
assertFileContent home-files/.config/i3/config \
assertFileRegex home-files/.config/i3/config \ ${./i3-keybindings-expected.conf}
'bindsym Mod1+Left overridden-command'
assertFileNotRegex home-files/.config/i3/config \
'Mod1+Right'
assertFileRegex home-files/.config/i3/config \
'bindsym Mod1+Invented invented-key-command'
''; '';
}; };
} }