This commit is contained in:
Andrea Ciceri 2021-10-28 12:53:35 +02:00
parent aa7650e975
commit 7d02c94366
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
13 changed files with 117 additions and 10 deletions

View file

@ -160,6 +160,7 @@
profiles = digga.lib.rakeLeaves ./users/profiles; profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec { suites = with profiles; rec {
base = [ direnv git zsh gpg password-store ]; base = [ direnv git zsh gpg password-store ];
emails = [ mails ];
shell = [ zsh exa fzf ]; shell = [ zsh exa fzf ];
gui = [ sway xdg gtk foot bat ]; gui = [ sway xdg gtk foot bat ];
browser = [ firefox chromium qutebrowser ]; browser = [ firefox chromium qutebrowser ];

View file

@ -21,7 +21,7 @@ channels: final: prev: {
in in
{ {
# same for haskell packages, matching ghc versions # same for haskell packages, matching ghc versions
inherit (channels.latest.haskell.packages."ghc${version}") inherit (channels.unstable.haskell.packages."ghc${version}")
haskell-language-server; haskell-language-server;
}); });
}); });

View file

@ -16,11 +16,13 @@ emacsWithPackages (
evil-collection evil-collection
fira-code-mode fira-code-mode
haskell-mode haskell-mode
notmuch
helm helm
helm-ag helm-ag
helm-company helm-company
helm-projectile helm-projectile
lispy lispy
lsp-haskell
lsp-mode lsp-mode
lsp-python-ms lsp-python-ms
magit magit
@ -31,6 +33,7 @@ emacsWithPackages (
org-superstar org-superstar
projectile projectile
rainbow-delimiters rainbow-delimiters
rainbow-identifiers
sudo-utils sudo-utils
treemacs treemacs
treemacs-evil treemacs-evil

View file

@ -0,0 +1,10 @@
{
nix = {
binaryCaches = [
"https://hydra.iohk.io"
];
binaryCachePublicKeys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
};
}

View file

@ -1,7 +1,7 @@
{ pkgs, suites, lib, ... }: { pkgs, suites, lib, ... }:
{ {
home-manager.users.ccr = { suites, ... }: { home-manager.users.ccr = { suites, ... }: {
imports = with suites; shell ++ gui ++ browser ++ multimedia ++ dev ++ base; imports = with suites; shell ++ gui ++ browser ++ multimedia ++ emails ++ dev ++ base;
home.packages = with pkgs; [ home.packages = with pkgs; [
ack ack
ranger ranger
@ -20,7 +20,7 @@
users.users.ccr = { users.users.ccr = {
uid = 1000; uid = 1000;
hashedPassword = "$6$JGOefuRk7kL$fK9.5DFnLLoW08GL4eKRyf958jyZdw//hLMaz4pp28jJuSFb24H6R3dgt1.sMs0huPY85rludSw4dnQJG5xSw1"; #mkpasswd -m sha-512 hashedPassword = "$6$JGOefuRk7kL$fK9.5DFnLLoW08GL4eKRyf958jyZdw//hLMaz4pp28jJuSFb24H6R3dgt1.sMs0huPY85rludSw4dnQJG5xSw1"; # mkpasswd -m sha-512
description = "Andrea Ciceri"; description = "Andrea Ciceri";
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [

View file

@ -23,6 +23,8 @@
ag ag
nixpkgs-fmt nixpkgs-fmt
rnix-lsp rnix-lsp
haskell-language-server
stylish-haskell
graphviz-nox graphviz-nox
hunspell hunspell
hunspellDicts.en_US hunspellDicts.en_US

View file

@ -9,7 +9,7 @@
) )
(use-package fira-code-mode (use-package fira-code-mode
:custom (fira-code-mode-disabled-ligatures '()) ;; List of ligatures to turn off :custom (fira-code-mode-disabled-ligatures '("x")) ;; List of ligatures to turn off
:config :config
(fira-code-mode-set-font) (fira-code-mode-set-font)
(global-fira-code-mode)) (global-fira-code-mode))
@ -31,6 +31,9 @@
(use-package minimap) (use-package minimap)
(use-package rainbow-identifiers
:hook ((prog-mode . rainbow-identifiers-mode)))
;; To move in a different config file ;; To move in a different config file
(when (string-equal system-type "darwin") (when (string-equal system-type "darwin")
(setq mac-command-modifier 'ctrl)) (setq mac-command-modifier 'ctrl))

View file

@ -0,0 +1,23 @@
(use-package notmuch
:custom
(notmuch-archive-tags '("-unread"))
(notmuch-show-indent-content nil)
(notmuch-hello-sections
'(notmuch-hello-insert-header
notmuch-hello-insert-saved-searches
notmuch-hello-insert-search
notmuch-hello-insert-alltags
notmuch-hello-insert-recent-searches
notmuch-hello-insert-footer
))
(notmuch-tagging-keys
'(("a" notmuch-archive-tags "Archive")
("u" notmuch-show-
mark-read-tags "Mark read")
("m" ("+muted") "Mute")
("f" ("+flagged") "Flag")
("s" ("+spam" "-inbox") "Mark as spam")
("d" ("+deleted" "-inbox") "Delete")))
)
(provide 'config-emails)

View file

@ -2,9 +2,12 @@
:init :init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "C-c l") (setq lsp-keymap-prefix "C-c l")
:custom
(lsp-haskell-server-path "haskell-language-server-wrapper")
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
(nix-mode . lsp) (nix-mode . lsp)
(python-mode . lsp) (python-mode . lsp)
(haskell-mode . lsp)
;; if you want which-key integration ;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration)) (lsp-mode . lsp-enable-which-key-integration))
:commands lsp) :commands lsp)

View file

@ -16,6 +16,7 @@ Return nil if COMMAND is not found anywhere in `exec-path'."
(require 'config-evil) (require 'config-evil)
(require 'config-helm) (require 'config-helm)
(require 'config-org) (require 'config-org)
(require 'config-emails)
(require 'config-projectile) (require 'config-projectile)
(require 'config-company) (require 'config-company)
(require 'config-magit) (require 'config-magit)

View file

@ -0,0 +1,45 @@
{ pkgs, lib, ... }:
let
maildir = "mail";
in
{
programs.msmtp.enable = true; # For sending emails
# For fetching emails
accounts.email.maildirBasePath = maildir;
programs.mbsync = {
enable = true;
};
# For email browsing, tagging, and searching
programs.notmuch.enable = true;
accounts.email.accounts = {
personal = {
address = "andrea.ciceri@autistici.org";
#gpg = {
# key = "";
# signByDefault = true;
#};
imap.host = "mail.autistici.org";
mbsync = {
enable = true;
create = "maildir";
};
msmtp.enable = true;
notmuch.enable = true;
primary = true;
realName = "Andrea Ciceri";
#signature = {
# text = ''
# '';
# showSignature = "append";
#};
passwordCommand = "pass show autistici/password";
smtp = {
host = "smtp.autistici.org";
};
userName = "andrea.ciceri@autistici.org";
};
};
}

View file

@ -47,10 +47,19 @@
xkb_variant = "intl"; xkb_variant = "intl";
}; };
}; };
keybindings = lib.mkOptionDefault { keybindings =
let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="~/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" $filename
wl-copy -t image/png < $filename
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec ${pkgs.customEmacs}/bin/emacs"; "${modifier}+x" = "exec ${pkgs.customEmacs}/bin/emacs";
"${modifier}+b" = "exec ${pkgs.firefox}/bin/firefox"; "${modifier}+b" = "exec ${pkgs.firefox}/bin/firefox";
"${modifier}+s" = "exec \'file=\"~/shots/\$(date --iso-8601=seconds).png\"; ${pkgs.grim}/bin/grim -t png -g \"\$(${pkgs.slurp}/bin/slurp)\" \$file; wl-copy -t image/png < \$file\'"; "${modifier}+s" = "exec ${screenshotScript}";
}; };
}; };
extraConfig = '' extraConfig = ''
@ -77,7 +86,6 @@
]; ];
modules-center = [ "sway/window" ]; modules-center = [ "sway/window" ];
modules-right = [ modules-right = [
"idle_inhibitor"
"tray" "tray"
"network" "network"
"cpu" "cpu"

View file

@ -18,6 +18,14 @@
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
eamodio.gitlens eamodio.gitlens
jnoortheen.nix-ide jnoortheen.nix-ide
haskell.haskell
justusadam.language-haskell
]; ];
}; };
home.packages = with pkgs; [
haskell-language-server
stylish-haskell
ghc
];
} }