From cb68af5842bead368f0671f81dc90b5e46b6d40b Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 27 Aug 2023 17:01:55 +0200 Subject: devenv: nix: add formatter to emacs --- flake.nix | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 76e6291..cf07f6e 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,13 @@ } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { imports = [flake-parts.flakeModules.easyOverlay devenv.flakeModule]; - systems = ["x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; + systems = [ + "x86_64-linux" + "i686-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ]; flake = { devenvModules.personal = import ./modules/devenv; @@ -47,9 +53,7 @@ echo .devenv >> .gitignore ``` ''; - mkDevenvTemplate = path: { - inherit welcomeText path; - }; + mkDevenvTemplate = path: {inherit welcomeText path;}; devenv = mkDevenvTemplate ./templates/devenv/simple; devenvModular = mkDevenvTemplate ./templates/devenv/flake-parts; in { @@ -67,12 +71,17 @@ }: let flatten = let aux = path: attrs: - if lib.isAttrs attrs && ! lib.isDerivation attrs - then lib.foldlAttrs (prev: name: value: prev // aux (path ++ [name]) value) {} attrs + if lib.isAttrs attrs && !lib.isDerivation attrs + then + lib.foldlAttrs + (prev: name: value: prev // aux (path ++ [name]) value) {} + attrs else ( if lib.isDerivation attrs - then {"${lib.concatStringsSep "_" path}" = attrs;} + then { + "${lib.concatStringsSep "_" path}" = attrs; + } else {} ); in -- cgit v1.2.3