From fb45fa4b49464f91224aff17e3c887301a5afffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 28 Jan 2023 11:04:33 +0100 Subject: [PATCH] add emacs with packages preinstalled --- flake.lock | 139 ++++++++++++++++++++++++++++++++----- flake.nix | 1 + modules/programs/emacs.nix | 4 +- overlays/default.nix | 2 + 4 files changed, 125 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 2ca5bdb..fa4658c 100644 --- a/flake.lock +++ b/flake.lock @@ -53,9 +53,49 @@ "type": "github" } }, + "emacs": { + "inputs": { + "emacs-overlay": "emacs-overlay", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1674900203, + "narHash": "sha256-oBEBvGPkHT31+VxxzHy6KOUrfv16D7dDReltJ7AXebg=", + "ref": "main", + "rev": "9406d9d62b5f0781c68a006b0ec975f5bbb740a5", + "revCount": 64, + "type": "git", + "url": "ssh://git@gitea.moritzboeh.me/moritz/emacs.git" + }, + "original": { + "ref": "main", + "type": "git", + "url": "ssh://git@gitea.moritzboeh.me/moritz/emacs.git" + } + }, "emacs-overlay": { "inputs": { "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1674874856, + "narHash": "sha256-RWFiIGbcvN13aj2MKETjoUt3upbAziNTdeW1AESOkWg=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "d2d7a3c5eb96fa6ca486b3adc0694295aedef6c7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, + "emacs-overlay_2": { + "inputs": { + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ] @@ -107,11 +147,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -136,6 +176,36 @@ } }, "flake-utils_4": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -210,7 +280,7 @@ }, "howdy": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixpkgs" ], @@ -232,7 +302,7 @@ }, "hypr-contrib": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1672071700, @@ -251,7 +321,7 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "wlroots": "wlroots", "xdph": "xdph" }, @@ -303,7 +373,7 @@ }, "hyprpaper": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1672925969, @@ -336,11 +406,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1658161305, - "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", + "lastModified": 1673540789, + "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", + "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", "type": "github" }, "original": { @@ -367,6 +437,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1674869206, + "narHash": "sha256-yfafZreWPEIuUX+9GWHX8/8UlaM8hiVNRrOtNMP+v4s=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "13645205311aa81dbc7c5adeee0382e38e52ee7c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1658161305, + "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1672791794, "narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=", @@ -382,7 +484,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1658826464, "narHash": "sha256-94ZTF0uIX/iZdiD4RJ5f933ak/OM4XLl7hF+gCa4Iuk=", @@ -398,7 +500,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1672997035, "narHash": "sha256-DNaNjsGMRYefBTAxFIrVOB2ok477cj1FTpqnu/mKRf4=", @@ -414,7 +516,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1671271357, "narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=", @@ -458,9 +560,9 @@ "pre-commit-hooks_2": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_5", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -482,7 +584,8 @@ "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", - "emacs-overlay": "emacs-overlay", + "emacs": "emacs", + "emacs-overlay": "emacs-overlay_2", "forgit-git": "forgit-git", "home-manager": "home-manager", "howdy": "howdy", @@ -490,7 +593,7 @@ "hyprland": "hyprland", "hyprpaper": "hyprpaper", "master": "master", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", "utils": "utils_2" @@ -529,7 +632,7 @@ }, "utils_2": { "inputs": { - "flake-utils": "flake-utils_4" + "flake-utils": "flake-utils_6" }, "locked": { "lastModified": 1657226504, diff --git a/flake.nix b/flake.nix index e95fcb4..5efa2d3 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main"; # Hyprland hyprland.url = "github:hyprwm/Hyprland"; diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index 0e65565..6c51425 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -8,8 +8,6 @@ with lib; let cfg = config.my.programs.emacs; - myEmacs = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages - (epkgs: [ epkgs.vterm ])); in { options.my.programs.emacs.enable = mkEnableOption "emacs"; @@ -39,7 +37,7 @@ in home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ]; services.emacs = { enable = true; - package = myEmacs; + package = pkgs.myEmacs; }; }; }; diff --git a/overlays/default.nix b/overlays/default.nix index 071a899..f16924d 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,6 @@ { inputs }: final: prev: { + myEmacs = inputs.emacs.packages.${prev.system}.default; + logseq-wayland = prev.symlinkJoin { name = "logseq-wayland"; paths = [ prev.logseq ];