about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/taskwarrior/firefox/default.nix
blob: fb5daaa844b3fd11bbe3951234b2dacb26aa6c0a (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
{
  config,
  lib,
  # options
  prefConfig,
  profile_size,
  search,
  userChrome,
  ...
}: let
  inherit (config.soispha.taskwarrior.projects) projects;

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