Skip to content

Commit 4165dfd

Browse files
authored
Merge pull request #127 from hollymlem/push-svxkospwtswt
modules/inori: init
2 parents 7bdb5f8 + 911af1a commit 4165dfd

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

modules/inori/module.nix

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
config,
3+
lib,
4+
wlib,
5+
...
6+
}:
7+
let
8+
tomlFmt = config.pkgs.formats.toml { };
9+
in
10+
{
11+
_class = "wrapper";
12+
options = {
13+
settings = lib.mkOption {
14+
type = tomlFmt.type;
15+
default = { };
16+
description = ''
17+
Configuration of inori.
18+
See <https://github.com/eshrh/inori/blob/master/CONFIGURATION.md>
19+
'';
20+
};
21+
"config.toml" = lib.mkOption {
22+
type = wlib.types.file config.pkgs;
23+
# TODO add a pure toTOML function
24+
default.path = tomlFmt.generate "config.toml" config.settings;
25+
description = "inori configuration file.";
26+
};
27+
};
28+
config = {
29+
env.XDG_CONFIG_HOME = "${config.pkgs.linkFarm ([
30+
{
31+
name = "inori/config.toml";
32+
inherit (config."config.toml") path;
33+
}
34+
])}";
35+
package = config.pkgs.inori;
36+
meta = {
37+
maintainers = [
38+
{
39+
name = "holly";
40+
github = "hollymlem";
41+
githubId = 35699052;
42+
}
43+
];
44+
};
45+
};
46+
}

0 commit comments

Comments
 (0)