I've got some old fava stuff but I want to work in a new file. We can allow this by importing the new file from our config in the same way as our default file...
+23
-12
packetmix/systems/teal/fava.nix
+23
-12
packetmix/systems/teal/fava.nix
···
123
${beancountOptions}
124
${userConfig.extraConfig or ""}
125
126
-
${builtins.concatStringsSep
127
-
"\n"
128
-
(map (file: ''include "${file}"'')
129
-
([
130
-
userConfig.favaOptions.default-file
131
-
] ++ (userConfig.extraFiles or [])))}
132
''
133
)
134
))
···
167
168
preStart =
169
let
170
-
userConfigToCreationScript = userConfig: builtins.concatStringsSep "\n" (map (file: ''
171
-
${pkgs.coreutils}/bin/mkdir -p "$(${pkgs.coreutils}/bin/dirname "${file}")"
172
-
${pkgs.coreutils}/bin/touch -a ${file}
173
-
'') ([
174
-
userConfig.favaOptions.default-file
175
-
] ++ (userConfig.extraFiles or [])));
176
in
177
lib.trivial.pipe userConfigs [
178
(map userConfigToCreationScript)
···
123
${beancountOptions}
124
${userConfig.extraConfig or ""}
125
126
+
${builtins.concatStringsSep "\n" (
127
+
map (file: ''include "${file}"'') (
128
+
[
129
+
userConfig.favaOptions.default-file
130
+
]
131
+
++ (userConfig.extraFiles or [ ])
132
+
)
133
+
)}
134
''
135
)
136
))
···
169
170
preStart =
171
let
172
+
userConfigToCreationScript =
173
+
userConfig:
174
+
builtins.concatStringsSep "\n" (
175
+
map
176
+
(file: ''
177
+
${pkgs.coreutils}/bin/mkdir -p "$(${pkgs.coreutils}/bin/dirname "${file}")"
178
+
${pkgs.coreutils}/bin/touch -a ${file}
179
+
'')
180
+
(
181
+
[
182
+
userConfig.favaOptions.default-file
183
+
]
184
+
++ (userConfig.extraFiles or [ ])
185
+
)
186
+
);
187
in
188
lib.trivial.pipe userConfigs [
189
(map userConfigToCreationScript)
History
2 rounds
0 comments
a.starrysky.fyi
submitted
#1
1 commit
expand
collapse
feat(pm/fava): allow adding extra files
I've got some old fava stuff but I want to work in a new file. We can
allow this by importing the new file from our config in the same way as
our default file...
expand 0 comments
This pull has been deleted (possibly by jj abandon or jj squash)
a.starrysky.fyi
submitted
#0
1 commit
expand
collapse
feat(pm/fava): allow adding extra files
I've got some old fava stuff but I want to work in a new file. We can
allow this by importing the new file from our config in the same way as
our default file...