From 854eed92279507900be53e382b4df03ad0936e8d Mon Sep 17 00:00:00 2001 From: Yves Dubromelle Date: Thu, 25 May 2017 02:17:42 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A9bauche=20de=20fonction=20pour=20g=C3=A9n?= =?UTF-8?q?=C3=A9rer=20un=20profil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib.nix diff --git a/lib.nix b/lib.nix new file mode 100644 index 0000000..1f3a871 --- /dev/null +++ b/lib.nix @@ -0,0 +1,29 @@ +{lib}: +let + profiles = { + isDesktopEnvironment = { + awesome = true; + internetSuite = true; + multimediaSuite = true; + officeSuite = true; + pulseaudio = true; + securitySuite = true; + }; + isWorkstation = { + graphical = true; + docker = true; + }; + isServer = { + }; + }; + +in + +rec { + applyProfilesToDirectory = customProfiles: directory: + lib.mapAttrs (applyProfilesToMachine customProfiles) directory; + + applyProfilesToMachine = customProfiles: machineName: machineOptions: + machineOptions; + #lib.recursiveUpdate {} machineOptions; +}