Merge branch 'main' of git.atlanticaweb.fr:alexandre/nixos-config

This commit is contained in:
Alexandre LUCAZEAU 2023-01-10 19:30:51 +01:00
commit db5f756775
11 changed files with 113 additions and 7 deletions

View File

@ -11,6 +11,7 @@
./hardware-configuration.nix
./services.nix
./packages.nix
# ./vpn.nix
../modules/prometheus-node.nix
];
@ -51,7 +52,9 @@
enable = true;
extraConfig =''
load-module module-switch-on-connect
extraModules = [ pkgs.pulseaudio-modules-bt ];
'';
package = pkgs.pulseaudioFull;
};
sane = {
enable = true;
@ -164,7 +167,7 @@
TERMINAL = "xfce4-terminal";
PRIVATE_BROWSER = "firefox -private";
};
environment.systemPackages = [ pkgs.openvpn_24 ];
users = {
users.ntp.group = "ntp";
groups.ntp = {};

View File

@ -6,7 +6,11 @@
services = {
printing = {
enable = true;
drivers = [ pkgs.brlaser ];
drivers = [ pkgs.brlaser pkgs.hplip];
};
avahi = {
enable = true;
openFirewall = true;
};
blueman = {

View File

@ -143,7 +143,7 @@ exec --no-startup-id nm-applet
exec --no-startup-id nextcloud
exec --no-startup-id udiskie -t
exec --no-startup-id blueman-applet
exec --no-startup-id sublime-music
exec --no-startup-id vlc
exec --no-startup-id guake
exec --no-startup-id i3-msg 'workspace $ws9; exec keepassxc;'
#exec --no-startup-id i3-msg 'workspace $ws5; exec emacs;'
@ -153,3 +153,5 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec firefox;'
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
tiling_drag modifier titlebar

View File

@ -157,7 +157,8 @@
:config
(setq org-startup-folded t)
(setq org-agenda-files
"~/Nextcloud/PRIVE/13_Org/agenda.org")
"~/Nextcloud/PRIVE/13_Org/agenda-DRI.org"
"~/Nextcloud/PRIVE/13_Org/perso.org")
(setq org-refile-use-outline-path 'file)
(setq org-refile-targets
'(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3)
@ -170,10 +171,18 @@
("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold))))
(setq org-capture-templates
'(("i" "Inbox" entry (file "~/Nextcloud/PRIVE/13_Org/DRI.org") "* TODO %i%?")
("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
(setq org-agenda-custom-commands
'(("t" "Today" tags-todo "+LEVEL=1+CATEGORY=\"tasks\"|+SCHEDULED<=\"<today>\"|+DEADLINE<=\"<today>\""))))
(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/calendars/alexandre")
(setq org-caldav-calendars
'((:calendar-id "alexandre-dri" :files ("~/Nextcloud/PRIVE/13_Org/agenda.org")
:inbox "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org")
)
)
(use-package magit)
(setq magit-fetch-modules-jobs 16); fetch 16 modules in parallel
@ -263,7 +272,7 @@
#+end_signature")
(org-msg-mode)
;; Org-Roam basic configuration
(setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/notes"))
(setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org"))
(use-package org-roam
:after org
@ -280,3 +289,11 @@
("C-c n t" . org-roam-tag-add)
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle)))))
(autoload 'markdown-mode "markdown-mode"
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist
'("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode))
(autoload 'gfm-mode "markdown-mode"
"Major mode for editing GitHub Flavored Markdown files" t)
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))

View File

@ -21,7 +21,9 @@
org
org-roam
org-msg
org-caldav
magit
evil
bbdb
projectile
flycheck
@ -31,6 +33,7 @@
lsp-ivy
which-key
elpaPackages.org
markdown-mode
]));
};

View File

@ -14,6 +14,7 @@
# ./redshift.nix
# ../../../modules/neovim.nix
../../../modules/rust.nix
../../../modules/tmux.nix
];
home.keyboard = {
layout = "fr";

View File

@ -63,8 +63,13 @@
vlc
ferdi
pinta
openvpn_24
networkmanager-openvpn
python39Packages.grip
super-productivity
];
nixpkgs.config.permittedInsecurePackages = [
"ferdi-5.8.1"
"electron-17.4.1"
];
}

View File

@ -25,8 +25,10 @@
];
programs.ssh.extraConfig = "Host u329746.your-storagebox.de\n Hostname u329746.your-storagebox.de\n Port 23\n user u329746\n IdentityFile /home/alexandre/.ssh/id_ed25519-perso";
networking.firewall.allowedTCPPorts = [ 80 443 22 9002 4533 5050];
networking.firewall.allowedTCPPorts = [ 80 443 22 9002 4533 5050 8080];
services.qemuGuest.enable = true;
services.shiori.enable = true;
# environment.systemPackages = [ (pkgs.callPackage <agenix/pkgs/agenix.nix> {}) ];
# age.secrets.secret_restic = {

View File

@ -1,3 +1,4 @@
# atlanticaweb.fr 37.187.103.8/24
{ pkgs, ... }: {
imports = [
./hardware-configuration.nix

View File

@ -16,6 +16,7 @@
plocate
lsd
age
lsd
];
# Nix Garbage Collector
nix.gc = {

67
modules/tmux.nix Normal file
View File

@ -0,0 +1,67 @@
{ pkgs, config, ... }:
{
programs.tmux = {
enable = true;
shortcut = "a";
# aggressiveResize = true; -- Disabled to be iTerm-friendly
baseIndex = 1;
newSession = true;
# Stop tmux+escape craziness.
escapeTime = 0;
# Force tmux to use /tmp for sockets (WSL2 compat)
secureSocket = false;
plugins = with pkgs; [
tmuxPlugins.better-mouse-mode
tmuxPlugins.sidebar
# tmuxPlugins.tmux-power
];
extraConfig = ''
# scrollback size
set -g history-limit 50000
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# Redraw the client (if interrupted by wall, etc)
bind R refresh-client
# reload tmux config with ctrl + b + r
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
# C + control q to kill sessio
unbind q
unbind C-q
bind-key q kill-session
bind-key C-q kill-session
# Switching panes with alt
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Visual Activity Monitoring between windows
setw -g monitor-activity on
set -g visual-activity on
# Show tmux positions in titles
set -g set-titles on
# Attach to a session if runs otherwise create a new one
new-session -n $HOST
'';
};
# programs.tmate = {
# enable = true;
# FIXME: This causes tmate to hang.
# extraConfig = config.xdg.configFile."tmux/tmux.conf".text;
# };
}