mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 02:23:16 +00:00
afe96e7433
Note, the pubs configuration file uses ConfigObj syntax, which is similar to the INI files syntax but with extra functionalities like nested sections. This prevents it from using Nix's INI format generator. Here is an example of pubs configuration that cannot be generated using Nix's INI format generator: [plugins] [[git]] manual=False For this reason, we opted for a stringly-typed configuration since the use of a structured `settings` option would require a custom parser.
36 lines
598 B
Nix
36 lines
598 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
programs.pubs = {
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
[main]
|
|
pubsdir = ~/.pubs
|
|
docsdir = ~/.pubs/doc
|
|
doc_add = link
|
|
open_cmd = xdg-open
|
|
|
|
[plugins]
|
|
active = git,alias
|
|
|
|
[[alias]]
|
|
|
|
[[[la]]]
|
|
command = list -a
|
|
description = lists papers in lexicographic order
|
|
|
|
[[git]]
|
|
quiet = True
|
|
manual = False
|
|
force_color = False
|
|
'';
|
|
};
|
|
|
|
test.stubs.pubs = { };
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.pubsrc ${./pubs-example-settings-expected-pubsrc}
|
|
'';
|
|
}
|