diff --git a/home-manager/machines/wsl/home.nix b/home-manager/machines/wsl/home.nix index 382796d..2da173a 100644 --- a/home-manager/machines/wsl/home.nix +++ b/home-manager/machines/wsl/home.nix @@ -25,6 +25,8 @@ (import ../../modules/programs/git.nix { }) ../../modules/programs/core.nix ../../modules/programs/devel.nix + ../../modules/programs/ssh.nix + (import ../../modules/programs/emacs.nix { }) ]; home.username = "nathan"; home.homeDirectory = "/home/nathan/"; @@ -32,6 +34,9 @@ home.stateVersion = "24.11"; programs.home-manager.enable = true; + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + # Machine specific configuration programs.nushell.environmentVariables = { VISUAL = "nvim"; diff --git a/home-manager/modules/programs/emacs.nix b/home-manager/modules/programs/emacs.nix new file mode 100644 index 0000000..a3d28bc --- /dev/null +++ b/home-manager/modules/programs/emacs.nix @@ -0,0 +1,64 @@ +{ + emacsPackage ? null, +}: +{ + config, + lib, + pkgs, + ... +}: +let + myAspell = pkgs.aspellWithDicts (d: [ + d.en + d.en-science + d.en-computers + ]); + emacsPackage' = if emacsPackage == null then pkgs.emacs30-pgtk else emacsPackage; +in +{ + home.packages = with pkgs; [ + # For markdown rendering + python312Packages.grip + # For graph generation + graphviz + sqlite + plantuml + # For latex editing + texlive.combined.scheme-medium + # For notifications + libnotify + # For spelling + myAspell + # For nix + # rnix-lsp + manix + nix-doc + # For email + mu + meson + pkg-config + glib + # Desktop file for org-protocol + (makeDesktopItem { + name = "org-protocol"; + exec = "emacsclient %u"; + comment = "Org protocol"; + desktopName = "org-protocol"; + type = "Application"; + mimeTypes = [ "x-scheme-handler/org-protocol" ]; + }) + # For format output + # wkhtmltopdf + ]; + programs.emacs = { + enable = true; + package = emacsPackage'; + extraPackages = epkgs: [ + epkgs.mu4e + epkgs.vterm + epkgs.pdf-tools + epkgs.emacsql + epkgs.emacsql-sqlite + ]; + }; +} diff --git a/nixos/modules/base.nix b/nixos/modules/base.nix index 2e0da99..c40588c 100644 --- a/nixos/modules/base.nix +++ b/nixos/modules/base.nix @@ -25,4 +25,6 @@ ]; system.stateVersion = "24.11"; + + nixpkgs.config.allowUnfree = true; }