From 38a6aae875f8eeb28e7774adcf319fd52178b900 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 6 Jul 2020 19:51:46 -0700 Subject: fixes for mac build --- darwin.nix | 41 ++++++++++++++++++++++++++++++++++++++++- install.sh | 2 +- lib/common.nix | 1 - lib/emacs-packages.nix | 6 +++--- lib/packages.nix | 3 --- linux.nix | 6 ++++++ nixpkgs.nix | 2 +- 7 files changed, 51 insertions(+), 10 deletions(-) diff --git a/darwin.nix b/darwin.nix index 2e00fe2..d91c25e 100644 --- a/darwin.nix +++ b/darwin.nix @@ -2,8 +2,47 @@ let homedir = builtins.getEnv "HOME"; + gitCommitTemplate = ./lib/git-commit-template; + gpgid = "D09299626FA78AF8"; in { - imports = [ ./common.nix ]; + imports = [ ./lib/common.nix ]; home.sessionVariables.PATH = "/usr/local/opt/mysql@5.7/bin:${homedir}/bin:${homedir}/.cabal/bin:${homedir}/.local/bin:$PATH"; + programs = { + + git = { + enable = true; + userName = "Ben Sima"; + userEmail = "ben@bsima.me"; + ignores = [ "*~" "*.swp" ]; + package = pkgs.gitAndTools.gitFull; + signing = { + key = gpgid; + signByDefault = false; + }; + aliases = { + authors = "shortlog -s -n"; + }; + extraConfig = '' + [push] + default = simple + + [commit] + template = ${gitCommitTemplate} + + [sendemail] + smtpuser = ben@bsima.me + smptserverport = 587 + smptserver = mail.bsima.me + chainreplyto = false + composeencoding = UTF-8 + ''; + }; + + emacs = { + enable = true; + extraPackages = epkgs: import ./lib/emacs-packages.nix { inherit epkgs; }; + }; + + }; } diff --git a/install.sh b/install.sh index 1e8d2a9..e6108b3 100755 --- a/install.sh +++ b/install.sh @@ -20,7 +20,7 @@ NIXFILE="$(pwd)/$1" # override with a symlink. # mkdir -p ~/.config/notmuch -[[ -e ~/.notmuch-config ]] || ln -s ~/.config/notmuch/notmuchrc ~/.notmuch-config +[[ ! -e ~/.notmuch-config ]] || ln -s ~/.config/notmuch/notmuchrc ~/.notmuch-config # # symlinking must occur before initial generation. now we can install, and # pin our own nixpkgs. diff --git a/lib/common.nix b/lib/common.nix index e9c270e..2cf63fc 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -17,7 +17,6 @@ in PAGER = "vimpager"; LEDGER_FILE = "${homedir}/.hledger.journal"; XTERM_LOCALE = locale; - LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; PYTHONSTARTUP = "${homedir}/.pythonrc"; }; diff --git a/lib/emacs-packages.nix b/lib/emacs-packages.nix index 9642512..ca5439d 100644 --- a/lib/emacs-packages.nix +++ b/lib/emacs-packages.nix @@ -44,11 +44,11 @@ flycheck flycheck-haskell geiser general -git-gutter-plus +#git-gutter-plus melpaStablePackages.git-timemachine haskell-mode #hercules -hindent +#hindent highlight-symbol hledger-mode hlint-refactor @@ -83,7 +83,7 @@ org-ref org-trello org-web-tools pass -persp-mode +#persp-mode pinentry popwin projectile diff --git a/lib/packages.nix b/lib/packages.nix index 836077a..b9b48d8 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -6,7 +6,6 @@ with pkgs; [ ag -apvlv aspellDicts.en cloc ctags @@ -17,11 +16,9 @@ expect file font-awesome_5 git-lfs -gopher htop ispell jq -lshw lsof material-icons mononoki diff --git a/linux.nix b/linux.nix index 9a24ee6..fb8fb76 100644 --- a/linux.nix +++ b/linux.nix @@ -60,6 +60,9 @@ in ]; home = { keyboard.options = [ "caps:ctrl_modifier" ]; + sessionVariables = { + LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; + }; file = { mutt = { text = (builtins.readFile ./lib/muttrc) + @@ -73,6 +76,7 @@ in }; packages = with pkgs; [ + apvlv beets bind blueman @@ -83,6 +87,7 @@ in exercism feh flameshot + gopher glibcLocales # rofi locale fix -- https://github.com/rycee/home-manager/issues/354#issuecomment-415914278 gnumake gnupg @@ -92,6 +97,7 @@ in keybase-gui ledger libnotify + lshw minitube mononoki mplayer diff --git a/nixpkgs.nix b/nixpkgs.nix index 13dc360..1b8bd2d 100644 --- a/nixpkgs.nix +++ b/nixpkgs.nix @@ -1,5 +1,5 @@ # generated with ~/bin/nixos-pin { url = "https://github.com/NixOS/nixpkgs/archive/nixos-20.03.tar.gz"; - sha256 = "0mpcdwhippvgsj3kj8vw35dgz94dnzgxgsfqqzcfpmvnzjc23vk7"; + sha256 = "0qj3x0jcsz3lbia93a06dzvp2psayxxqxly62kjmsywvsm0picby"; } -- cgit v1.2.3