FIX : a lot ^_^

This commit is contained in:
Alexandre LUCAZEAU 2022-03-29 13:47:21 +02:00
parent ff38e32554
commit 2ce74d7c90
No known key found for this signature in database
GPG Key ID: 3C8ADB07A8217BD3
10 changed files with 171 additions and 39 deletions

View File

@ -32,15 +32,22 @@
ntp.enable = true;
tlp.enable = true;
# udev.extraRules = ''
# ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="/usr/bin/lockscreen-all"
# '';
xserver = {
enable = true;
autorun = true;
#desktopManager.gnome.enable = true;
windowManager.i3.enable = true;
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
i3lock
];
};
xautolock = {
enable = true;
time = 1;
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
#notifier = "${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds'";
};
displayManager.defaultSession = "none+i3";
layout = "fr";
xkbOptions = "eurosign:e";
@ -50,17 +57,20 @@
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
};
};
udev.extraRules = ''
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
'';
};
nixpkgs.config = {
packageOverrides = pkgs: {
polybar = pkgs.polybar.override {
i3Support = true;
pulseSupport = true;
};
};
#packageOverrides = pkgs: {
# polybar = pkgs.polybar.override {
# i3Support = true;
# pulseSupport = true;
# };
#};
allowUnfree = true;
};

View File

@ -9,10 +9,11 @@ set $gray1 #484848
set $gray2 #333333
set $ws1 "1: console"
set $ws2 "2: office"
set $ws2 "2: mails"
set $ws3 "3: web"
set $ws4 "4: mails"
set $ws4 "4: office"
set $ws5 "5: diary"
set $ws9 "9: keepass"
# Couleur des fenetres avec et sans focus
client.focused $gray1 $gray1 #FFFFFF #333333
@ -81,7 +82,7 @@ bindsym $mod+parenleft workspace $ws5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+ccedilla workspace $ws9
bindsym $mod+agrave workspace 10
# Déplacement de la fenetre ayant le focus d'un bureau à l'autre
@ -93,7 +94,7 @@ bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace 10
# Recharge le fichier de configuration
@ -128,7 +129,7 @@ bar {
bindsym $mod+$ALT+l exec i3lock -ti ~/images/coffee_time.png
# blocage automatique de l'ecran en cas d'inactivité
exec xautolock -detectsleep -time 5 -locker 'i3lock -ti ~/images/coffee_time.png'
exec xautolock -detectsleep -time 120 -corners -locker 'i3lock -ti ~/images/coffee_time.png'
# Capture d'ecran
bindsym Print exec scrot -u '%Y-%m-%d-%T_$wx$h_scrot.png' -e 'mv $f ~/Screenshots/'
@ -144,3 +145,9 @@ assign [class="emacs"] $ws2
# programmes au démarrage
exec --no-startup-id nm-applet
exec --no-startup-id nextcloud
exec --no-startup-id blueman-applet
exec --no-startup-id i3-msg 'workspace $ws9; exec keepassxc;'
exec --no-startup-id i3-msg 'workspace $ws5; exec emacs;'
exec --no-startup-id i3-msg 'workspace $ws1; exec alacritty;'
exec --no-startup-id i3-msg 'workspace $ws2; exec thunderbird;'
exec --no-startup-id i3-msg 'workspace $ws3; exec firefox;'

View File

@ -2,6 +2,14 @@
;;(tool-bar-mode -1)
;;(tooltip-mode -1)
;;(menu-bar-mode -1)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(column-number-mode 't) ; show current column in status bar
(set-fringe-mode 10)
@ -65,23 +73,23 @@
(setq user-mail-address "alexandre@dri.fr")
(setq mail-user-agent 'gnus-user-agent)
(setq gnus-select-method
'(nnimap "dri"
(nnimap-address "dri.fr")
(nnimap-server-port 143)
(nnimap-stream starttls)
(nnimap-authinfo-file "~/.authinfo.gpg")))
(setq gnus-message-archive-group "nnimap+dri:Sent")
(setq gnus-gcc-mark-as-read t)
(setq nnmail-expiry-target "nnimap+dri:Trash")
(setq nnmail-expiry-wait 'immediate)
(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-smtp-server "dri.fr")
(setq smtpmail-smtp-service 587)
(setq message-citation-line-function 'message-insert-formatted-citation-line)
(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:")
;;(setq gnus-select-method
;; '(nnimap "dri"
;; (nnimap-address "dri.fr")
;; (nnimap-server-port 143)
;; (nnimap-stream starttls)
;; (nnimap-authinfo-file "~/.authinfo.gpg")))
;;
;;(setq gnus-message-archive-group "nnimap+dri:Sent")
;;(setq gnus-gcc-mark-as-read t)
;;(setq nnmail-expiry-target "nnimap+dri:Trash")
;;(setq nnmail-expiry-wait 'immediate)
;;(setq send-mail-function 'smtpmail-send-it)
;;(setq message-send-mail-function 'smtpmail-send-it)
;;(setq smtpmail-smtp-server "dri.fr")
;;(setq smtpmail-smtp-service 587)
;;(setq message-citation-line-function 'message-insert-formatted-citation-line)
;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:")
(defun default-web-indent-mode ()
(setq indent-tabs-mode nil)
@ -190,3 +198,85 @@
:config (setq which-key-idle-delay 0.5))
(setq TeX-PDF-mode t)
(require 'mu4e)
;;store org-mode links to messages
(require 'org-mu4e)
;;store link to message if in header view, not to header query
(setq org-mu4e-link-query-in-headers-mode nil)
(setq org-capture-templates
'(("t" "todo" entry (file+headline "~/todo.org" "Tasks")
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")))
(setq mail-user-agent 'mu4e-user-agent)
(setq org-mu4e-link-query-in-headers-mode t)
(setq mu4e-maildir (expand-file-name "~/Maildir/dri/INBOX"))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-sent-folder "/Sent")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-trash-folder "/Junk")
(setq mu4e-refile-folder "/INBOX/archives")
(setq mu4e-context-policy 'pick-first)
(setq mu4e-change-filenames-when-moving t)
(setq starttls-use-gnutls t)
(setq message-send-mail-function 'smtpmail-send-it)
(setq mu4e-update-interval 300)
(setq mu4e-use-fancy-chars t)
(setq mu4e-view-show-addresses t)
(setq mu4e-headers-show-threads t)
(setq mu4e-headers-skip-duplicates t)
(setq mail-user-agent 'mu4e-user-agent)
(defvaralias 'mu4e-compose-signature 'message-signature)
(setq-default mu4e-save-multiple-attachments-without-asking t)
(setq-default mu4e-view-show-addresses t)
(setq-default mu4e-confirm-quit nil)
(setq-default mu4e-hide-index-messages t)
(setq-default mu4e-index-update-in-background t)
(setq mu4e-compose-in-new-frame nil)
;;rename files when moving
;;NEEDED FOR MBSYNC
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-html2text-command "iconv -c -t utf-8 | ${pkgs.pandoc}/bin/pandoc -f html -t plain")
(setq mu4e-view-show-images t)
(when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))
(setq message-kill-buffer-on-exit t)
(require 'org-msg)
(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
org-msg-startup "hidestars indent inlineimages"
org-msg-greeting-fmt "\nHi%s,\n\n"
org-msg-recipient-names '(("alexandre@dri.fr" . "Alexandre"))
org-msg-greeting-name-limit 3
org-msg-default-alternatives '((new . (text html))
(reply-to-html . (text html))
(reply-to-text . (text)))
org-msg-convert-citation t
org-msg-signature "
Regards,
#+begin_signature
--
*Alexandre
/One Emacs to rule them all/
#+end_signature")
(org-msg-mode)
;; Org-Roam basic configuration
(setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/notes"))
(use-package org-roam
:after org
:init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
:config
(org-roam-setup)
:bind (("C-c n f" . org-roam-node-find)
("C-c n r" . org-roam-node-random)
(:map org-mode-map
(("C-c n i" . org-roam-node-insert)
("C-c n o" . org-id-get-create)
("C-c n t" . org-roam-tag-add)
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle)))))

View File

@ -19,9 +19,12 @@
prettier-js
smartparens
org
org-roam
org-msg
magit
bbdb
projectile
flycheck
ivy
counsel
counsel-projectile

View File

@ -29,7 +29,7 @@
whitespace = "red reverse";
};
};
#signing.key = "GPG-KEY-ID";
#signing.signByDefault = true;
signing.key = "3C8ADB07A8217BD3";
signing.signByDefault = true;
};
}

View File

@ -4,6 +4,9 @@
gnupg
pinentry-curses
];
#{
# permissions = "700";
#};
services = {
gpg-agent = {
enable = true;

View File

@ -8,6 +8,7 @@
./i3status.nix
./emacs.nix
./mails.nix
./dunst.nix
];
home.keyboard = {
layout = "fr";

View File

@ -54,6 +54,14 @@
format = "{ssid} {signal_strength} {ip} {speed_down;K*b}";
hide_missing = true;
}
{
block = "toggle";
text = "maison";
command_state = "xrandr | grep \"^DP-1 connected";
command_on = "sh ~/Nextcloud/DRI/outils/matin.sh";
command_off = "sh ~/Nextcloud/DRI/outils/soir.sh";
interval = 5;
}
{
block = "backlight";
}

View File

@ -35,5 +35,15 @@
acpi
cpufrequtils
xclip
gopass
ispell
aspellDicts.fr
nix-direnv
keepassxc
mu
direnv
freetube
texlive.combined.scheme-full
zola
];
}

View File

@ -1,12 +1,12 @@
{ config, pkgs, lib, ... }:
with lib; {
config ={
{ config, pkgs, lib, ... }: {
#with lib; {
#config ={
home.sessionVariables = {
LESS = "--quit-if-one-screen --RAW-CONTROL-CHARS";
EDITOR = "vim";
TERMINAL = "xfce4-terminal";
BROWSER = "firefox";
PRIVATE_BROWSER = "firefox -private";
};
# };
};
}