about summary refs log tree commit diff
path: root/home/profiles/default.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-01-18 17:38:31 +0900
committersefidel <contact@sefidel.net>2022-01-18 17:38:31 +0900
commit7a372ed81256ce5d6aa608be9bebe173ab4e042e (patch)
tree29c7ee0a316ae0dc21ce3fe22342ec2c36ee0f4c /home/profiles/default.nix
parent2bdc141bebd35cc38396271c42b23b6f89d032a0 (diff)
downloadnixrc-7a372ed81256ce5d6aa608be9bebe173ab4e042e.tar.gz
nixrc-7a372ed81256ce5d6aa608be9bebe173ab4e042e.zip
project: rewrite
Diffstat (limited to 'home/profiles/default.nix')
-rw-r--r--home/profiles/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/home/profiles/default.nix b/home/profiles/default.nix
new file mode 100644
index 0000000..af9d9a8
--- /dev/null
+++ b/home/profiles/default.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;
+}