From 4b442b85223bf4e718db5ca917c17e4446144eb1 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 25 Jan 2022 18:08:24 +0900 Subject: home: make populator more obvious --- home/profiles/populate.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 home/profiles/populate.nix (limited to 'home/profiles/populate.nix') diff --git a/home/profiles/populate.nix b/home/profiles/populate.nix new file mode 100644 index 0000000..af9d9a8 --- /dev/null +++ b/home/profiles/populate.nix @@ -0,0 +1,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; +} -- cgit 1.4.1