From 1ac9f0cc8cade78fdb73d010546dfc8ec88901c0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 27 May 2021 21:50:14 +0200 Subject: [PATCH] home: comma: configure custom 'nixpkgs' flake This makes use of my pinned `pkgs` flake from the registry by default. --- home/comma.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/home/comma.nix b/home/comma.nix index 60de863..cc6a0ad 100644 --- a/home/comma.nix +++ b/home/comma.nix @@ -5,11 +5,25 @@ in { options.my.home.comma = with lib; { enable = my.mkDisableOption "comma configuration"; + + pkgsFlake = mkOption { + type = types.str; + default = "pkgs"; + example = "nixpkgs"; + description = '' + Which flake from the registry should be used with + nix shell. + ''; + }; }; config = lib.mkIf cfg.enable { home.packages = with pkgs; [ ambroisie.comma ]; + + home.sessionVariables = { + COMMA_PKGS_FLAKE = cfg.pkgsFlake; + }; }; }