From d5e1d319f32cc41e5ebf9beb460721dfd7288d76 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Sun, 25 Aug 2024 08:45:01 -0500 Subject: [PATCH] Conditionals! --- home/users/benson.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home/users/benson.nix b/home/users/benson.nix index 08a0515..0d383aa 100644 --- a/home/users/benson.nix +++ b/home/users/benson.nix @@ -1,4 +1,4 @@ -{ inputs, config, pkgs, ... }: +{ inputs, config, pkgs, lib, ... }: { imports = [ @@ -14,10 +14,11 @@ home.username = "benson"; home.homeDirectory = "/home/benson"; - nix = { + nix = (lib.mkIf (!config.submoduleSupport.enable) { package = pkgs.nix; settings.experimental-features = "nix-command flakes"; - }; + registry.nixpkgs.flake = inputs.nixpkgs; + }); my.bash-config.enable = true; @@ -81,7 +82,6 @@ EDITOR = "emacsclient -n"; }; - nix.registry.nixpkgs.flake = inputs.nixpkgs; # Let Home Manager install and manage itself. programs = {