Commit graph

378 commits

Author SHA1 Message Date
Robert Helgesson d14adb99f3
i3status-rust: fix formatting
(cherry picked from commit 778af87a98)
2022-04-26 23:06:58 +02:00
Naïm Favier 834d863dd2
types: fix dagOf behaviour with mkIf
This makes definitions like

    home.activation.foo = mkIf false "bar"

work, where previously they would complain about
`home.activation.foobar.data` being used but not defined.

The crucial part is that we don't call `convertAllToDags` in
`dagOf.merge`, because we need to process `mkIf`/`mkMerge` properties
first. So we let `attrEquivalent.merge` do its job normally, but give
it a type `dagEntryOf` that does the conversion.

Ideally this shouldn't require so much boilerplate; I'd like to
implement something like

    types.changeInto dagContentType elemType dagEntryAnywhere

in Nixpkgs.

(cherry picked from commit 8db712a6a2)
2022-04-26 12:34:13 +02:00
Naïm Favier 697cc8c68e
gpg: allow specifying trust levels by name
(cherry picked from commit 78aa7cceff)
2021-12-19 00:59:29 +01:00
Miles Breslin e0bfb57d62
gpg: support declarative trust and public keys
PR #810

(cherry picked from commit ea1794a798)
2021-12-19 00:59:09 +01:00
Lily Foster 93ad8661c7
rofi: fix theme definition in configuration for 1.7.0+ (#2513)
Since Rofi 1.7.1 (specifically davatorium/rofi@0e70d8a), the deprecated
`theme` option in the `configuration` section no longer works. For 1.7.0
and up, `@theme "name"` is supposed to be used *after* the
`configuration` block.

(cherry picked from commit 3ec7f6fb43)
2021-12-18 08:13:37 +01:00
Robert Helgesson 2889ee2363
mpv: temporarily disable tests 2021-11-25 22:29:47 +01:00
Robert Helgesson dc2a4e4146
Switch to 21.11 as stable release 2021-11-25 22:22:26 +01:00
Robert Helgesson 18461b5dda
firefox: fix tests 2021-11-25 08:21:54 +01:00
Robert Helgesson 81fc0c6fbf
tests: disable Nixpkgs release check 2021-11-25 08:16:16 +01:00
oxalica df931a59a5
taskwarrior: change config file location and use relative theme paths (#2455)
After taskwarrior 2.6.0, its default config file now locates at
`$XDG_CONFIG_HOME/task/taskrc`, and builtin themes can be included
via relative paths.
2021-11-23 21:33:03 -05:00
Tobias Happ c2aa831491
systemd: do not install systemd files when user is root (#2454)
For the user root, there are no user services provided by systemd.
Therefore, these files will never be used.
2021-11-23 01:06:43 -05:00
polykernel 15ae861e1b
swaynag: add module
Swaynag is a replacement of i3-nag for sway. Swaynag is embedded in
Sway's build process albeit it is not an integral part of Sway,
therefore it has been added under `wayland.windowManager.sway` instead
of `programs`. It can be moved at a later time if necessary.

Two unit tests were added validate the module behavior for an empty
configuration and the example configuration.
2021-11-21 18:37:50 +01:00
oxalica c82bc787b8
xdg: fix typo and add test 2021-11-20 09:47:27 +01:00
Robert Helgesson a19f40d39d
firefox: fix test case 2021-11-20 09:47:05 +01:00
Mmequignon d85bf67c48
pet: fix settings format issue
Before it was not possible to place setting values outside the
`General` section.
2021-11-17 23:42:21 +01:00
Tobias Happ 5559ef0023
ssh: add includes option (#2453) 2021-11-16 11:51:10 -07:00
Robert Helgesson be1ad30503
Remove remaining allowSubstitutes = false
See, e.g., https://github.com/NixOS/nix/issues/4442 for wider
discussions.
2021-11-12 23:24:08 +01:00
Robert Helgesson 2917ef23b3
kakoune: clean up tests
- Enable use-plugins test.

- Stub out `kakoune-unwrapped` to avoid unnecessary downloads.

- Unwrap unnecessary `config` attributes.
2021-11-07 09:43:42 +01:00
oxalica 70c5b268e1
xdg: add option 'xdg.stateHome' (#2439)
It corresponds to the newly introduced `XDG_STATE_HOME`.
2021-11-04 17:42:44 +01:00
flexagoon 288faaa5a6
programs.zsh.zplug: add zplugHome option
Add an option to set custom `$ZPLUG_HOME`. Changing it with
`home.sessionVariables` doesnt work, since it has to be exported
before Zplug is initialised
2021-11-02 08:49:47 +01:00
Bart Bakker 7523252f97
htop: fix order or header_columns setting (#2435)
When `header_columns` is in settings it must appear before any of the
`column_meters_*` options.

Fixes 2426.
2021-11-01 15:27:29 -04:00
Thiago Kenji Okada 3ccddfc48d
lib: remove top-level with lib 2021-10-31 08:50:53 +01:00
Robert Helgesson 134c5ccdd3
mbsync: stub test dependency 2021-10-30 20:44:21 +02:00
Robert Helgesson e28a720ce9
irssi: fix test directory name
Also fix stub package name.
2021-10-30 20:40:49 +02:00
Robert Helgesson 78afc2fa74
git: stub test dependency on msmtp 2021-10-30 20:36:18 +02:00
Robert Helgesson 0f72441821
bspwm: stub test dependency 2021-10-30 20:36:14 +02:00
polykernel 46a69810cb
fnott: remove global properties generation
Rationale:

As of release 1.1.2[1], the configuration ini file supports
declaration of the `[main]` header as an alternative to global
properties by enumerating all sections and mapping each to the
respective parsing function. Global properties will still be parsed
correctly by fnott however generation adds unnecessary complexity to
the module. This commit removes the need for global properties
generation.

Changes:

- Fixed the FIXME at L118.

- Cleaned up unneeded let bindings.

- Changed the generation method to use the `pkgs.formats.ini` from
  pkgs-lib instead of the raw `generators` library. This was done for
  consistency and clarity as the `pkgs.formats.ini` is still required
  for type declaration and uses `generators` internally.

- Removed `global-properties` testcase.

- Updated `example-settings` testcase.

[1] - https://codeberg.org/dnkl/fnott/releases/tag/1.1.2
2021-10-27 00:01:57 +02:00
superherointj 406eeec0b9
hexchat: add module
Review and contributions from Thiago Kenji Okada
<thiagokokada@gmail.com>.

Co-authored-by: Thiago Kenji Okada <thiagokokada@gmail.com>
Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-10-23 21:31:54 +02:00
Anselm Schüler cfe82d9f44
gh: support gh as git credential manager for github.com
Co-authored-by: Sumner Evans <me@sumnerevans.com>
2021-10-21 23:20:25 +02:00
Thiago Kenji Okada b22004bf1f
rofi: add test case for config with deprecated options 2021-10-13 01:31:12 +02:00
Thiago Kenji Okada b78b584368
tests: fix test.assert.assertions.enable not working
Co-authored-by: Robert Helgesson <robert@rycee.net>
2021-10-13 01:29:23 +02:00
Robert Helgesson 0b47ded208
flameshot: add settings option 2021-10-11 21:47:05 +02:00
Thiago Kenji Okada 32285d8fe6
rofi: remove options removed from upstream in v1.7.0 2021-10-09 00:45:20 +02:00
Nicolas Berbiche 82c92a18ba
gh: use structural settings (#2339) 2021-10-08 23:29:25 +02:00
Thiago Kenji Okada 592da767bd
nnn: init (#2368)
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`.
2021-10-05 19:14:52 -04:00
Robert Helgesson af2007bb77
atuin: add module
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).
2021-10-05 23:48:52 +02:00
Josh Robson Chase e4df31dcea
screen-locker: Make xautolock optional, reorganize options (#2343)
* 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
2021-10-05 12:58:25 -04:00
Emil Karlson e0a87d75e9
firefox: add bookmarks support
Generate bookmarks html file and hook it up in user.js.
2021-10-03 12:16:40 +02:00
Faye Duxovni 095f3e32ae
kanshi: allow multiple exec statements per profile
kanshi configurations can have more than one exec statement in a
profile. This change allows services.kanshi.profiles.<name>.exec to be
a list of strings rather than a single string.
2021-10-03 09:47:22 +02:00
Naïm Favier f15cd0f087
gtk: add final newline to bookmarks to avoid conflicts 2021-10-03 09:39:25 +02:00
schotts-fired 0f3dfc94ef
services.emacs: add option extraOptions
This is to allow adding command-line arguments to the Emacs daemon.
Previously only the Emacs client could be started with custom
arguments.
2021-10-02 23:28:22 +02:00
Gabriel Fontes 52e84a040e
xsettingsd: make configurable through module 2021-10-01 01:31:47 +02:00
Robert Helgesson cb09a968e9
tests: add option test.stubs
This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
2021-09-26 23:26:38 +02:00
Jakub Kozłowski 821299e90e
sbt: run passwordCommand without trailing newline 2021-09-21 22:16:34 +02:00
polykernel 7cb118c9d2
xdg: coerce XDG base directories settings to strings
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.
2021-09-21 21:29:44 +02:00
Tad Fisher 514acaebb9
lieer: change settings to freeform type
Also add missing options.
2021-09-14 23:59:56 +02:00
polykernel 4b964d2f7b
bottom: add module
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.
2021-09-14 23:40:21 +02:00
polykernel 039f786e60
fnott: refactor module
- Change generation behavior to always generate a configuration file
  and pass it explicitly to fnott, it enforces the module to be
  hermetic instead of offloading the configuration selection to
  heuristics.
- Various style changes.
- Fix issue where fnott would abort due to an invalid config file when
  both the configFile and settings options are unset.
- Remove the empty-settings test as a configuration file is now
  already generated.

Suggested-by: Robert Helgesson <robert@rycee.net>
2021-09-08 22:48:44 +02:00
Seth Etter 21a2ff4496
broot: expose modal option (#2300)
* broot: expose modal option

* broot: add basic test

* Use `mkEnableOption`
2021-08-31 10:52:20 -06:00
Jason Felice 33db7cc6a6
kitty: add environment and darwinLaunchOptions options (#2280)
* kitty: add environment option

* kitty: add darwinLaunchOptions option

See https://sw.kovidgoyal.net/kitty/faq/#how-do-i-specify-command-line-options-for-kitty-on-macos

* kitty: only allow darwinLaunchOptions on darwin

* kitty: make expression shorter

* kitty: fix assertion message
2021-08-26 22:08:34 -04:00