From 672b92b0e2742639ad70a9d97108cb3f47852c62 Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Wed, 10 Feb 2021 15:05:24 -0800 Subject: [PATCH] nix-darwin: add extraModules option Co-authored-by: Nicolas Berbiche --- nix-darwin/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index b112d8d6943d..db81acb0400d 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -29,7 +29,7 @@ let home.homeDirectory = config.users.users.${name}.home; }; }) - ]; + ] ++ cfg.extraModules; }; in @@ -67,6 +67,15 @@ in ''; }; + extraModules = mkOption { + type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]); + default = [ ]; + example = "[ { home.packages = [ nixpkgs-fmt ]; } ]"; + description = '' + Extra modules added to all users. + ''; + }; + verbose = mkEnableOption "verbose output on activation"; users = mkOption {