about summary refs log tree commit diff
path: root/home/profiles/populate.nix
blob: af9d9a8578ae04cf89dcdf15854cc0936b8efe85 (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;
}