summaryrefslogtreecommitdiff
path: root/pkgs/lib
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2023-03-01 13:51:13 +0100
committerQuentin Aristote <quentin@aristote.fr>2023-03-01 14:04:24 +0100
commit857b17aa02062cc3e036e4049e37c11eb1a7e707 (patch)
tree170ad50688cfb5432e82ac6bb3ac154bf6558575 /pkgs/lib
parent21034a5a36d62fbad795c4139c98c32e0516ec93 (diff)
add updateInputFlag to library
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index 964d099..6ba56ef 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -1,10 +1,15 @@
{ lib }:
-{
- homeManager = import ./home-manager { };
- toUserJS = prefs: ''
- ${lib.concatStrings (lib.mapAttrsToList (name: value: ''
- user_pref("${name}", ${builtins.toJSON value});
- '') prefs)}
- '';
-}
+let
+ self = {
+ homeManager = import ./home-manager { };
+ toUserJS = prefs: ''
+ ${lib.concatStrings (lib.mapAttrsToList (name: value: ''
+ user_pref("${name}", ${builtins.toJSON value});
+ '') prefs)}
+ '';
+ updateInputFlag = input: [ "--update-input" input ];
+ updateInputFlags = inputs:
+ builtins.concatLists (builtins.map self.updateInputFlag inputs);
+ };
+in self