From 0a024c20c50c7f5991fddfa10d7ea4390e5c45f5 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Fri, 23 May 2025 13:29:50 +0100 Subject: [PATCH] Remove emacs (#116) --- darwin-configuration.nix | 2 + flake.lock | 87 +++++++--------------------------- flake.nix | 12 ++--- home-manager/darwin.nix | 1 + home-manager/modules/mail.nix | 11 +++-- home-manager/modules/zsh/zshrc | 2 + 6 files changed, 30 insertions(+), 85 deletions(-) diff --git a/darwin-configuration.nix b/darwin-configuration.nix index 6ee8f82..b7a00c0 100644 --- a/darwin-configuration.nix +++ b/darwin-configuration.nix @@ -127,4 +127,6 @@ in { # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 4; + + system.primaryUser = "patrick"; } diff --git a/flake.lock b/flake.lock index 1d7104f..e2dcd1a 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,14 @@ "apple-silicon": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1742098834, - "narHash": "sha256-l98XVpNXW6hr0AsxCeQZbdf6EGT8OpHdkWBi7sdel4s=", + "lastModified": 1747514947, + "narHash": "sha256-irRDuerdVu495nBgkhCUjCi2mRpPig0F6cKMoIOfScA=", "owner": "tpwrules", "repo": "nixos-apple-silicon", - "rev": "8457960249bcfd34c22838e20eaa7d8261428688", + "rev": "db46177593e24f68e802455875850cdeaf49eb1c", "type": "github" }, "original": { @@ -27,11 +26,11 @@ ] }, "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "lastModified": 1747964474, + "narHash": "sha256-i73u8NLiqewGy0iIriH4XizatLnAojXxzrBqHJEz49E=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "rev": "93562b65cf68612a544779c9f77536f9dff01096", "type": "github" }, "original": { @@ -41,27 +40,6 @@ "type": "github" } }, - "emacs": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1745745433, - "narHash": "sha256-fpb9C7rV2XxWnmr7QAgb9ioh21a7lstZVOYuDnR2Dxc=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "24a3e2b6b0dda50c1afaa3da730f156d0400e95a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, "flake-compat": { "locked": { "lastModified": 1688025799, @@ -102,11 +80,11 @@ ] }, "locked": { - "lastModified": 1745703610, - "narHash": "sha256-KgaGPlmjJItZ+Xf8mSoRmrsso+sf3K54n9oIP9Q17LY=", + "lastModified": 1747978958, + "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f5819a962489e037a57835f63ed6ff8dbc2d5fb", + "rev": "7419250703fd5eb50e99bdfb07a86671939103ea", "type": "github" }, "original": { @@ -129,11 +107,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741851582, - "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", + "lastModified": 1747327360, + "narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", + "rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46", "type": "github" }, "original": { @@ -143,29 +121,13 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1745487689, - "narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1745377448, - "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", + "lastModified": 1747920628, + "narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", + "rev": "e314d5c6d3b3a0f40ec5bcbc007b0cbe412f48ae", "type": "github" }, "original": { @@ -194,28 +156,11 @@ "inputs": { "apple-silicon": "apple-silicon", "darwin": "darwin", - "emacs": "emacs", "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", "whisper": "whisper" } }, - "rust-overlay": { - "flake": false, - "locked": { - "lastModified": 1686795910, - "narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 9e4d91d..84950e3 100644 --- a/flake.nix +++ b/flake.nix @@ -14,10 +14,6 @@ # url = "github:Smaug123/nix-darwin/extract"; inputs.nixpkgs.follows = "nixpkgs"; }; - emacs = { - url = "github:nix-community/emacs-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; apple-silicon = { url = "github:tpwrules/nixos-apple-silicon"; }; @@ -28,7 +24,6 @@ outputs = { darwin, - emacs, nixpkgs, home-manager, apple-silicon, @@ -41,7 +36,6 @@ }; systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"]; in let - overlays = [emacs.overlay]; recursiveMerge = attrList: let f = attrPath: builtins.zipAttrsWith (n: values: @@ -59,7 +53,7 @@ capybara = let system = "x86_64-linux"; in let - pkgs = import nixpkgs {inherit system config overlays;}; + pkgs = import nixpkgs {inherit system config;}; in nixpkgs.lib.nixosSystem { inherit system; @@ -89,7 +83,7 @@ earthworm = let system = "aarch64-linux"; in let - pkgs = import nixpkgs {inherit system config overlays;}; + pkgs = import nixpkgs {inherit system config;}; in nixpkgs.lib.nixosSystem { inherit system; @@ -117,7 +111,7 @@ darwinConfigurations = let system = "aarch64-darwin"; in let - pkgs = import nixpkgs {inherit system config overlays;}; + pkgs = import nixpkgs {inherit system config;}; in { nixpkgs = pkgs; patrick = darwin.lib.darwinSystem { diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index df41ecc..02c94e3 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -30,6 +30,7 @@ "lean.memoryLimit" = 16384; "latex-workshop.view.pdf.viewer" = "tab"; "lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16"; + "git.openRepositoryInParentFolders" = "always"; }; }; }; diff --git a/home-manager/modules/mail.nix b/home-manager/modules/mail.nix index 5e07a14..bd0842c 100644 --- a/home-manager/modules/mail.nix +++ b/home-manager/modules/mail.nix @@ -49,7 +49,7 @@ in { accounts.email.accounts."Gmail" = let address = (deobfuscate "AFTN0cWdh12c") + "gmail.com"; in { - notmuch.enable = true; + notmuch.enable = false; neomutt = { enable = true; }; @@ -82,7 +82,7 @@ in { accounts.email.accounts."BTInternet" = let address = (deobfuscate "z5WZ2VGdz5yajlmc0FGc") + "@btinternet.com"; in { - notmuch.enable = true; + notmuch.enable = false; neomutt = { enable = true; }; @@ -116,7 +116,7 @@ in { accounts.email.accounts."Proton" = let address = deobfuscate "gAya15ybj5ycuVmdlR3crNWayRXYwB0ajlmc0FGc"; in { - notmuch.enable = true; + # notmuch.enable = true; neomutt = { enable = true; }; @@ -164,6 +164,7 @@ in { }; programs.neomutt = { enable = true; + package = pkgs.neomutt.override {withNotmuch = false;}; extraConfig = '' set use_threads=threads sort=last-date sort_aux=date ''; @@ -171,12 +172,12 @@ in { vimKeys = true; }; - programs.notmuch.enable = true; + programs.notmuch.enable = false; home.file.".mailcap".source = ./mail/mailcap; home.packages = [ - pkgs.notmuch + # pkgs.notmuch pkgs.lynx ]; } diff --git a/home-manager/modules/zsh/zshrc b/home-manager/modules/zsh/zshrc index e126162..5442947 100644 --- a/home-manager/modules/zsh/zshrc +++ b/home-manager/modules/zsh/zshrc @@ -24,6 +24,8 @@ precmd_functions+=(prompt_custom) export WORDCHARS='' +export OPENAI_API_KEY=$(cat ~/.secrets/openai.txt) + autoload edit-command-line zle -N edit-command-line bindkey '^X^E' edit-command-line