From f4168a2509dfe364851f6e8b48356c7c526f2f1e Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Fri, 17 Feb 2023 23:13:58 +0100 Subject: [PATCH] Use emacs-overlay to install Emacs - we use the bleeding edge emacs master branch so beware when updating - revision fb1cdbb0a12d7f0e0e50022c405aca7c856dd233 of emacs-overlay seems to work quite well. --- flake.lock | 108 ++++++++++++++++++++++++++++++--------------------- flake.nix | 10 ++++- home/cli.nix | 7 +++- 3 files changed, 78 insertions(+), 47 deletions(-) diff --git a/flake.lock b/flake.lock index 1ad990b..618136d 100644 --- a/flake.lock +++ b/flake.lock @@ -59,13 +59,34 @@ "type": "github" } }, + "emacs": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676484851, + "narHash": "sha256-IQtPR+ObyNgh+Gc5rvfPUD3Xe7jsWk6jTMSwU6YOdHs=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "fb1cdbb0a12d7f0e0e50022c405aca7c856dd233", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-utils": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -78,88 +99,104 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ] + ], + "utils": "utils" }, "locked": { - "lastModified": 1667907331, - "narHash": "sha256-bHkAwkYlBjkupPUFcQjimNS8gxWSWjOTevEuwdnp5m0=", + "lastModified": 1676257154, + "narHash": "sha256-eW3jymNLpdxS5fkp9NWKyNtgL0Gqtgg1vCTofKXDF1g=", "owner": "nix-community", "repo": "home-manager", - "rev": "6639e3a837fc5deb6f99554072789724997bc8e5", + "rev": "2cb27c79117a2a75ff3416c3199a2dc57af6a527", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.05", + "ref": "release-22.11", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", + "lastModified": 1676546582, + "narHash": "sha256-MJ+PXNmUyxnMTFoss7G2lEcUY2cfYZM6RudBAL5aX1k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", + "rev": "2fb7d749c084890192b2cd08ba264e5e4a14df1b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05-small", + "ref": "nixos-22.11-small", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-22_05": { + "nixpkgs_2": { "locked": { - "lastModified": 1654936503, - "narHash": "sha256-soKzdhI4jTHv/rSbh89RdlcJmrPgH8oMb/PLqiqIYVQ=", + "lastModified": 1676569297, + "narHash": "sha256-2n4C4H3/U+3YbDrQB6xIw7AaLdFISCCFwOkcETAigqU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dab6df51387c3878cdea09f43589a15729cae9f4", + "rev": "ac1f5b72a9e95873d1de0233fddcb56f99884b37", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-22.05", + "ref": "nixos-unstable", "type": "indirect" } }, "root": { "inputs": { "agenix": "agenix", + "emacs": "emacs", "hm": "hm", "nixpkgs": "nixpkgs", - "snm": "snm", - "utils": "utils_2" + "snm": "snm" } }, "snm": { "inputs": { "blobs": "blobs", - "nixpkgs": [ + "nixpkgs": "nixpkgs_2", + "nixpkgs-22_11": [ "nixpkgs" ], - "nixpkgs-22_05": "nixpkgs-22_05", - "utils": "utils" + "utils": "utils_2" }, "locked": { - "lastModified": 1655930346, - "narHash": "sha256-ht56HHOzEhjeIgAv5ZNFjSVX/in1YlUs0HG9c1EUXTM=", + "lastModified": 1671659164, + "narHash": "sha256-DbpT+v1POwFOInbrDL+vMbYV3mVbTkMxmJ5j50QnOcA=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "f535d8123c4761b2ed8138f3d202ea710a334a1d", + "rev": "bc667fb6afc45f6cc2d118ab77658faf2227cffd", "type": "gitlab" }, "original": { "owner": "simple-nixos-mailserver", - "ref": "nixos-22.05", + "ref": "nixos-22.11", "repo": "nixos-mailserver", "type": "gitlab" } }, "utils": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { "locked": { "lastModified": 1605370193, "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", @@ -173,25 +210,6 @@ "repo": "flake-utils", "type": "github" } - }, - "utils_2": { - "inputs": { - "flake-utils": "flake-utils" - }, - "locked": { - "lastModified": 1638172912, - "narHash": "sha256-jxhQGNEsZTdop/Br3JPS+xmBf6t9cIWRzVZFxbT76Rw=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "166d6ebd9f0de03afc98060ac92cba9c71cfe550", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "ref": "v1.3.1", - "repo": "flake-utils-plus", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 3d9f8e4..2a55083 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,9 @@ inputs.nixpkgs-22_11.follows = "nixpkgs"; }; + emacs.url = "github:nix-community/emacs-overlay"; + emacs.inputs.nixpkgs.follows = "nixpkgs"; + # age for nix to store encrypted passwords conveniently agenix = { url = "github:ryantm/agenix"; @@ -24,7 +27,12 @@ nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ({ nixpkgs = { config.allowUnfree = true; }; }) + ({ + nixpkgs = { + config.allowUnfree = true; + overlays = with inputs; [ emacs.overlay ]; + }; + }) snm.nixosModule ./modules/security.nix ./hosts/thrall diff --git a/home/cli.nix b/home/cli.nix index 4870f27..90b8069 100644 --- a/home/cli.nix +++ b/home/cli.nix @@ -43,7 +43,6 @@ #haskellPackages.patat # terminal based presentations using pandoc # editors - emacs28NativeComp sqlite # c/c++ @@ -101,6 +100,12 @@ enableBashIntegration = true; }; + emacs = { + enable = true; + package = pkgs.emacsGit; + #package = pkgs.emacsUnstable; + }; + gh = { enable = true; settings.git_protocol = "ssh";