diff --git a/flake.nix b/flake.nix index 2c96d27..1aca992 100644 --- a/flake.nix +++ b/flake.nix @@ -86,7 +86,9 @@ { nixpkgs = { config.allowUnfree = true; - overlays = with inputs; [ emacs.overlay ]; + overlays = with inputs; [ + emacs.overlay + ]; }; } ) @@ -95,6 +97,9 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { + inherit inputs; + }; } { home-manager.users.alex = ./hosts/thrall/alex.nix; } ]; diff --git a/home/alex/programs/emacs/default.nix b/home/alex/programs/emacs/default.nix index cb38d8c..1707339 100644 --- a/home/alex/programs/emacs/default.nix +++ b/home/alex/programs/emacs/default.nix @@ -1,11 +1,13 @@ -{ inputs, config, lib, pkgs, ... }: +{ + pkgs, + ... +}: let emacsclient-wrapper = pkgs.writeShellScriptBin "e" '' exec ${pkgs.emacs}/bin/emacsclient --reuse-frame --no-wait "$@" ''; -in { - nixpkgs.overlays = [ inputs.emacs.overlay ]; - +in +{ home = { sessionPath = [ "$HOME/.emacs.d/bin" ]; packages = [ emacsclient-wrapper ]; diff --git a/hosts/dregil/default.nix b/hosts/dregil/default.nix index 40e0959..2880cb7 100644 --- a/hosts/dregil/default.nix +++ b/hosts/dregil/default.nix @@ -9,10 +9,13 @@ { imports = [ ( - { ... }: + { inputs, lib, ... }: { nixpkgs = { config.allowUnfree = true; + overlays = with inputs; [ + emacs.overlay + ]; }; home-manager.extraSpecialArgs = { inherit stable; }; }