Commit graph

90 commits

Author SHA1 Message Date
Nadrieril da92360208
polybar: allow config to be more nix-like (#1430)
Polybar's config format is a bit strange, and lists in particular are
annoying to handle. This enables using normal nix lists and nested
attrsets instead.

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

This is a breaking change since there is no support for some of the
older options like `extraOptions`, but unless you use `extraOptions`
it should work without changes.
2021-02-07 23:33:17 +01:00
Robert Helgesson ef4370bedc
tests: allow testing assertions
By default tests are expected to produce no assertion.

This also updates the existing tests to match.
2021-02-07 22:48:22 +01:00
Robert Helgesson bdee1be7b3
Revert "redshift/gammastep: use ini file"
Manual latitude and longitude setting doesn't work in Redshift.

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

This is a breaking change since there is no support for some of the
older options like `extraOptions`, but unless you use `extraOptions`
it should work without changes.
2021-02-07 10:02:57 +01:00
Sara Johnsson df7d81b0b3
playerctld: add module 2021-01-31 12:36:30 +01:00
Thiago Kenji Okada 7de0d07dd9 redshift/gammastep: add tests 2021-01-26 01:40:25 -03:00
Nicolas Berbiche 8127799f79
sxhkd: configurable package and command line arguments
Fixes #1598.
2021-01-16 10:57:32 +01:00
Nicolas Berbiche d62bdaf938
sway: fix error with null package and swaybar
When setting `...sway.package = null`, the default bar configuration
would throw an error trying to use the bar from the null package.

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

Fixes #1714
2021-01-11 12:26:18 -05:00
Robert Helgesson 9d53afb709
tests: add support for asserting warnings
This adds a "test.asserts" module that currently just provides a
convenient way to assert on the content of warnings. By default all
tests will assert that no warnings are given.
2020-12-30 17:25:48 +01:00
Ivar e6a58a7e71
pbgopy: add service 2020-12-09 23:45:51 +01:00
Matthias Riße 33407189c1
wlsunset: add module
This adds the wlsunset module, a program for day/night gamma
adjustments on wayland.

Fixes #1625
2020-12-01 21:46:46 +01:00
Robert Helgesson 7b6ebf2785
Revert "sway: validate configuration at build time"
This reverts commit 99b75f99df. See

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

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

Fixes #1611

This reverts commit 7c3c64208e.
2020-11-16 22:35:07 +01:00
Robert Helgesson cde1d33e61
sway: remove test dependency on xwayland 2020-11-14 23:49:34 +01:00
Robert Helgesson 18429f1d1d
emacs: remove use of makeDesktopItem
Can generate the file directly to avoid the dependency on the
`makeDesktopItem` API.
2020-10-22 22:00:22 +02:00
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
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
Alex Rice 625b92cbba
sway: add default test 2020-08-25 23:58:43 +02:00
Vincent Gatine a3dd580adc
kanshi: add service
PR #1142
2020-08-15 01:02:23 +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
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
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
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
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 95b95b1407
tests: improve test purity
Before the XDG variables would be set from the user's environment, if
available. This would break some tests.

With this change the tests should be fully deterministic.

Fixes #1190
2020-04-24 21:46:34 +02:00
Robert Helgesson ebdfa06685
tests: update nmt 2020-04-10 01:01:20 +02:00
Robert Helgesson 1cfc0a3203
sxhkd: add dummy package in tests 2020-04-06 12:55:58 +02:00
Robert Helgesson 5c1e7349bb
lieer: remove package dependency in tests 2020-03-08 12:02:35 +01:00
Tad Fisher 9f46d516fa
services.lieer: add module
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'.
2020-03-07 15:13:50 +01:00
Robert Helgesson f3fbb50b68
polybar: add test case 2020-03-04 21:26:35 +01:00
Robert Helgesson 45abf3d38a
Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
Robert Helgesson de8033747c
tests: clean up tests
- Move all module tests to their own directories.

- Avoid duplication of `// import`.
2020-01-26 21:11:23 +01:00
Michael Hoang df4db50632
i3: update default i3 key bindings
Update to match the default i3 key bindings

  https://github.com/i3/i3/blob/master/etc/config

PR #957
2019-12-31 11:19:20 +01:00
Nikita Uvarov 26defdf205
tests: fix i3-keybindings test 2019-10-28 22:05:09 +01:00
Robert Helgesson 797c77a00a
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.
2019-10-26 13:07:04 +02:00
Nazarii Bardiuk 51581b7e43
sxhkd: add service 2019-09-17 21:42:05 +02:00
Robert Helgesson c42206db02
i3: add test of keybinding merge logic 2019-01-14 22:50:11 +01:00