diff --git a/home-manager/cli/default.nix b/home-manager/cli/default.nix index 2f9b6eb9..ab1a5b3f 100644 --- a/home-manager/cli/default.nix +++ b/home-manager/cli/default.nix @@ -5,6 +5,7 @@ ./git.nix ./htop.nix ./irssi.nix + ./nixpkgs.nix ./nnn.nix ./ssh.nix ./tmux.nix diff --git a/home-manager/cli/nixpkgs.nix b/home-manager/cli/nixpkgs.nix new file mode 100644 index 00000000..957f98c6 --- /dev/null +++ b/home-manager/cli/nixpkgs.nix @@ -0,0 +1,34 @@ +{ flake, config, pkgs, lib, ... }: + + +let + nixpkgs-review = + if (pkgs.stdenv.isLinux) then + pkgs.nixpkgs-review.override { withSandboxSupport = true; withNom = true; } + else + pkgs.nixpkgs-review.override { withNon = true; }; +in +{ + imports = [ flake.inputs.nix-index-database.hmModules.nix-index ]; + + options.home-manager.cli.nixpkgs.enable = lib.mkDefaultOption "nixpkgs tools config" // { + default = config.home-manager.cli.enable; + }; + + config = lib.mkIf config.home-manager.cli.nixpkgs.enable { + programs = { + nix-index = { + enable = true; + symlinkToCacheHome = true; + }; + nix-index-database.comma.enable = true; + }; + + home.packages = with pkgs; [ + nix-output-monitor + nixpkgs-review + ] ++ lib.optionals stdenv.isLinux [ + flake.inputs.nix-alien.packages.${pkgs.system}.nix-alien + ]; + }; +} diff --git a/home-manager/default.nix b/home-manager/default.nix index 4b6d14ad..33064b36 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -5,8 +5,6 @@ ./desktop ./i3 ./minimal.nix - ./nixpkgs.nix - ./non-nix.nix ./sway ./theme ]; diff --git a/home-manager/nixpkgs.nix b/home-manager/nixpkgs.nix deleted file mode 100644 index 9a0ad3ac..00000000 --- a/home-manager/nixpkgs.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: - - -let - nixpkgs-review = - if (pkgs.stdenv.isLinux) then - pkgs.nixpkgs-review.override { withSandboxSupport = true; withNom = true; } - else - pkgs.nixpkgs-review.override { withNon = true; }; -in -{ - home.packages = with pkgs; [ - nix-output-monitor - nixpkgs-review - ]; -} diff --git a/home-manager/non-nix.nix b/home-manager/non-nix.nix deleted file mode 100644 index 04ab7bbb..00000000 --- a/home-manager/non-nix.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ flake, pkgs, lib, ... }: - -{ - imports = [ flake.inputs.nix-index-database.hmModules.nix-index ]; - home.packages = lib.optionals pkgs.stdenv.isLinux [ flake.inputs.nix-alien.packages.${pkgs.system}.nix-alien ]; -}