about summary refs log tree commit diff stats
path: root/hm/soispha/conf/taskwarrior/firefox/default.nix
blob: f2379983f3d25c1ac46531c4e83a60fb4d8182db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  extensions,
  userChrome,
  extraConfig,
  bookmarks,
  search,
  profile_size,
  lib,
  config,
  ...
}: let
  inherit (config.soispha.taskwarrior.projects) projects;

  mkFirefoxProfile = {
    name,
    id,
  }: {
    inherit name;
    value = {
      isDefault = false;
      inherit name id extensions userChrome search bookmarks extraConfig;
    };
  };
  projects_id =
    lib.imap1 (id: project: {
      name = project;
      id = id + profile_size;
    })
    projects;
  firefoxProfiles = builtins.listToAttrs (builtins.map mkFirefoxProfile projects_id);
in
  firefoxProfiles