about summary refs log tree commit diff
path: root/home/modules/profiles/default.nix
blob: 1fa2960e8358e79416525a54b10a06df1366b483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{ config, lib, ... }:
let
  profileEnabler =
    let
      reducer = l: r: { "${r}".enable = true; } // l;
    in
    builtins.foldl' reducer { } config.activeProfiles;
in
  {
    options.activeProfiles = lib.mkOption { type = lib.types.listOf lib.types.str; };

    config.profiles = profileEnabler;
  }