diff --git a/modules/devos/hm-system-defaults.nix b/modules/devos/hm-system-defaults.nix index 74d4338..845f7c4 100644 --- a/modules/devos/hm-system-defaults.nix +++ b/modules/devos/hm-system-defaults.nix @@ -1,5 +1,8 @@ { config, lib, ... }: { home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + extraSpecialArgs = { main = config; }; diff --git a/modules/devos/nix-path.nix b/modules/devos/nix-path.nix deleted file mode 100644 index ddf7b80..0000000 --- a/modules/devos/nix-path.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ channel, inputs, ... }: { - nix.nixPath = [ - "nixpkgs=${channel.input}" - "nixos-config=${../../lib/compat/nixos}" - "home-manager=${inputs.home}" - ]; -} diff --git a/profiles/core/nix.nix b/modules/devos/nix.nix similarity index 82% rename from profiles/core/nix.nix rename to modules/devos/nix.nix index fd3b201..9822685 100644 --- a/profiles/core/nix.nix +++ b/modules/devos/nix.nix @@ -1,5 +1,6 @@ -{ config, pkgs, self, lib, ... }: { - +{ channel, inputs, pkgs, lib, ... }: +with lib; +{ nix = { package = pkgs.nixUnstable; @@ -23,13 +24,24 @@ keep-derivations = true fallback = true ''; + + nixPath = [ + "nixpkgs=${channel.input}" + "nixos-config=${../../lib/compat/nixos}" + "home-manager=${inputs.home}" + ]; }; + nixpkgs.config = { + allowUnfree = true; + }; + + environment = { systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ]; shellAliases = - let ifSudo = lib.mkIf config.security.sudo.enable; + let ifSudo = mkIf config.security.sudo.enable; in { # nix @@ -50,13 +62,4 @@ nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; }; }; - - nixpkgs.config = { - allowUnfree = true; - }; - - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - }; }