c'est le bordel un peu
This commit is contained in:
159
__devshells.nix
Normal file
159
__devshells.nix
Normal file
@@ -0,0 +1,159 @@
|
||||
{pkgs}: let
|
||||
nvimCfg = import ./modules/common/nvim-cfg.nix {inherit pkgs;};
|
||||
|
||||
texlive = pkgs.texliveBasic.withPackages (
|
||||
ps: [
|
||||
ps.beamer
|
||||
ps.preprint
|
||||
ps.tikz-ext
|
||||
ps.latexmk
|
||||
ps.microtype
|
||||
ps.mathtools
|
||||
ps.thmtools
|
||||
ps.enumitem
|
||||
ps.csquotes
|
||||
ps.cleveref
|
||||
ps.algorithm2e
|
||||
ps.ifoddpage
|
||||
ps.relsize
|
||||
ps.amsfonts
|
||||
ps.amsmath
|
||||
ps.geometry
|
||||
ps.hyperref
|
||||
ps.lm
|
||||
ps.xcolor
|
||||
ps.datetime2
|
||||
]
|
||||
);
|
||||
|
||||
latexCustomRC = ''
|
||||
${nvimCfg.baseVimConfig}
|
||||
|
||||
lua << EOF
|
||||
${nvimCfg.baseLuaConfig}
|
||||
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
build_dir = "",
|
||||
callback = 1,
|
||||
continuous = 1,
|
||||
executable = "latexmk",
|
||||
options = {
|
||||
"-pdf",
|
||||
"-interaction=nonstopmode",
|
||||
"-synctex=1",
|
||||
"-file-line-error",
|
||||
},
|
||||
}
|
||||
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
|
||||
vim.g.plantuml_executable_script = "${pkgs.plantuml}/bin/plantuml"
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
local ok_cmp_lsp, cmp_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if ok_cmp_lsp then
|
||||
capabilities = cmp_lsp.default_capabilities(capabilities)
|
||||
end
|
||||
|
||||
if vim.lsp and vim.lsp.config then
|
||||
vim.lsp.config("texlab", {
|
||||
cmd = { "${pkgs.texlab}/bin/texlab" },
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
texlab = {
|
||||
build = {
|
||||
executable = "latexmk",
|
||||
args = {
|
||||
"-pdf",
|
||||
"-interaction=nonstopmode",
|
||||
"-synctex=1",
|
||||
"-file-line-error",
|
||||
"%f",
|
||||
},
|
||||
onSave = false,
|
||||
forwardSearchAfter = false,
|
||||
},
|
||||
forwardSearch = {
|
||||
executable = "${pkgs.zathura}/bin/zathura",
|
||||
args = {
|
||||
"--synctex-forward",
|
||||
"%l:1:%f",
|
||||
"%p",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable("texlab")
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "tex", "plaintex", "bib" },
|
||||
callback = function()
|
||||
local opts = { buffer = true }
|
||||
|
||||
vim.keymap.set("n", "<localleader>ll", "<cmd>VimtexCompile<CR>", vim.tbl_extend("force", opts, {
|
||||
desc = "LaTeX compile",
|
||||
}))
|
||||
|
||||
vim.keymap.set("n", "<localleader>lv", "<cmd>VimtexView<CR>", vim.tbl_extend("force", opts, {
|
||||
desc = "LaTeX view PDF",
|
||||
}))
|
||||
|
||||
vim.keymap.set("n", "<localleader>lc", "<cmd>VimtexClean<CR>", vim.tbl_extend("force", opts, {
|
||||
desc = "LaTeX clean",
|
||||
}))
|
||||
|
||||
vim.keymap.set("n", "<localleader>lt", "<cmd>VimtexTocToggle<CR>", vim.tbl_extend("force", opts, {
|
||||
desc = "LaTeX TOC",
|
||||
}))
|
||||
end,
|
||||
})
|
||||
EOF
|
||||
'';
|
||||
|
||||
neovimTex = pkgs.wrapNeovim pkgs.neovim-unwrapped {
|
||||
configure = {
|
||||
customRC = latexCustomRC;
|
||||
|
||||
packages.myNeovimPackages = {
|
||||
start =
|
||||
nvimCfg.basePlugins
|
||||
++ (with pkgs.vimPlugins; [
|
||||
vimtex
|
||||
nvim-lspconfig
|
||||
cmp-nvim-lsp
|
||||
plantuml-syntax
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nvimTex = pkgs.writeShellScriptBin "nvim-tex" ''
|
||||
set -euo pipefail
|
||||
exec ${neovimTex}/bin/nvim "$@"
|
||||
'';
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
nvimTex
|
||||
|
||||
texlive
|
||||
pkgs.texlab
|
||||
pkgs.zathura
|
||||
|
||||
pkgs.plantuml
|
||||
pkgs.graphviz
|
||||
pkgs.jre
|
||||
|
||||
pkgs.git
|
||||
pkgs.ripgrep
|
||||
pkgs.fd
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -11,6 +11,8 @@
|
||||
./modules/common/base.nix
|
||||
./modules/common/yubikey.nix
|
||||
./modules/common/desktop-i3.nix
|
||||
./modules/common/terminal.nix
|
||||
./modules/common/editor.nix
|
||||
./modules/common/net.nix
|
||||
./modules/common/parsec.nix
|
||||
./modules/common/users.nix
|
||||
|
||||
@@ -64,7 +64,15 @@ in {
|
||||
ps.hyperref
|
||||
ps.lm
|
||||
ps.xcolor
|
||||
ps.datetime2-french
|
||||
ps.datetime2
|
||||
ps.llncs
|
||||
|
||||
ps.ec
|
||||
ps.cm-super
|
||||
ps.metafont
|
||||
|
||||
ps.latexindent
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
@@ -42,7 +42,7 @@ floating_modifier $mod
|
||||
|
||||
bindsym $mod+Shift+Q kill
|
||||
bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+Return exec alacritty -e zellij
|
||||
bindsym $mod+Tab exec rofi -show combi -show-icons
|
||||
|
||||
# Focus
|
||||
|
||||
263
dotconfig/polybar/config.ini
Normal file
263
dotconfig/polybar/config.ini
Normal file
@@ -0,0 +1,263 @@
|
||||
[color]
|
||||
background = #2f4a36
|
||||
background-alt = #375740
|
||||
foreground = #e8e8e8
|
||||
foreground-dim = #b8c0b8
|
||||
accent = #a3be8c
|
||||
alert = #ff6b6b
|
||||
|
||||
; =========================
|
||||
; BASES
|
||||
; =========================
|
||||
|
||||
[bar/base]
|
||||
monitor = ${env:MONITOR:}
|
||||
width = 100%
|
||||
height = 20
|
||||
offset-x = 0
|
||||
foreground = ${color.foreground}
|
||||
border-size = 0
|
||||
line-size = 0
|
||||
padding-left = 1
|
||||
padding-right = 1
|
||||
module-margin = 1
|
||||
separator = " · "
|
||||
separator-foreground = ${color.foreground-dim}
|
||||
font-0 = "DejaVuSansM Nerd Font Mono:size=10;2"
|
||||
font-1 = "Noto Sans CJK JP:size=10;2"
|
||||
font-2 = "Noto Color Emoji:size=10;2"
|
||||
radius = 10
|
||||
enable-ipc = true
|
||||
|
||||
[module/temp-base]
|
||||
type = internal/temperature
|
||||
warn-temperature = 80
|
||||
format = <label>
|
||||
label-warn-foreground = ${color.alert}
|
||||
|
||||
[fs-base]
|
||||
type = internal/fs
|
||||
interval = 30
|
||||
fixed-values = true
|
||||
format-mounted = <label-mounted>
|
||||
|
||||
; =========================
|
||||
; BARS
|
||||
; =========================
|
||||
|
||||
[bar/top]
|
||||
inherit = bar/base
|
||||
offset-y = 0
|
||||
background = ${color.background}
|
||||
modules-left =
|
||||
modules-center = date-time
|
||||
modules-right = battery
|
||||
radius-bottom = 0
|
||||
|
||||
[bar/middle]
|
||||
inherit = bar/base
|
||||
offset-y = 20
|
||||
background = ${color.background-alt}
|
||||
modules-left = cpu memory
|
||||
modules-center = cpu-temp gpu-temp nvme-temp fan
|
||||
modules-right = dns
|
||||
radius = 0
|
||||
|
||||
[bar/bottom]
|
||||
inherit = bar/base
|
||||
offset-y = 40
|
||||
background = ${color.background}
|
||||
modules-left = net-wireless
|
||||
modules-center = fs-system
|
||||
modules-right = defaultaudio volume
|
||||
radius-top = 0
|
||||
|
||||
; =========================
|
||||
; FOOTER
|
||||
; =========================
|
||||
|
||||
[bar/tray-bottom]
|
||||
inherit = bar/base
|
||||
bottom = true
|
||||
offset-y = 0
|
||||
background = ${color.background-alt}
|
||||
modules-left = desktops
|
||||
modules-center = ping-amaury
|
||||
modules-right = spotify spotify-prev spotify-play-pause spotify-next tray
|
||||
|
||||
[bar/bottom-b]
|
||||
inherit = bar/base
|
||||
bottom = true
|
||||
offset-y = 0
|
||||
background = ${color.background-alt}
|
||||
modules-left = desktops
|
||||
modules-center =
|
||||
modules-right =
|
||||
|
||||
|
||||
; =========================
|
||||
; MODULES
|
||||
; =========================
|
||||
|
||||
[module/desktops]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
scroll-up = "#i3.prev"
|
||||
scroll-down = "#i3.next"
|
||||
|
||||
label-focused = %name%
|
||||
label-focused-padding = 1
|
||||
label-focused-background = ${color.accent}
|
||||
label-focused-foreground = #1f2a1f
|
||||
|
||||
label-unfocused = %name%
|
||||
label-unfocused-padding = 1
|
||||
label-unfocused-foreground = ${color.foreground-dim}
|
||||
|
||||
label-visible = %name%
|
||||
label-visible-padding = 1
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-padding = 1
|
||||
label-urgent-background = ${color.alert}
|
||||
label-urgent-foreground = #ffffff
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format = <label>
|
||||
label = CPU %percentage%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format = <label>
|
||||
label = RAM %percentage_used%% %used%
|
||||
|
||||
[module/cpu-temp]
|
||||
inherit = module/temp-base
|
||||
hwmon-path = /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon7/temp1_input
|
||||
label = CPU %temperature-c%
|
||||
label-warn = CPU %temperature-c%
|
||||
|
||||
[module/gpu-temp]
|
||||
inherit = module/temp-base
|
||||
hwmon-path = /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon7/temp2_input
|
||||
label = GPU %temperature-c%
|
||||
label-warn = GPU %temperature-c%
|
||||
|
||||
[module/nvme-temp]
|
||||
inherit = module/temp-base
|
||||
hwmon-path = /sys/devices/pci0000:00/0000:00:06.0/0000:01:00.0/nvme/nvme0/hwmon0/temp1_input
|
||||
label = NVMe %temperature-c%
|
||||
label-warn = NVMe %temperature-c%
|
||||
|
||||
[module/fan]
|
||||
type = custom/script
|
||||
exec = cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon*/fan1_input
|
||||
label = Fan %output% RPM
|
||||
|
||||
[module/date-time]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = %a %d %b
|
||||
time = %H:%M:%S
|
||||
label = %date% · %time%
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
poll-interval = 1
|
||||
low-at = 15
|
||||
full-at = 100
|
||||
time-format = %Hh %Mm
|
||||
|
||||
format-charging = <label-charging>
|
||||
label-charging = %percentage%% %time% %consumption%W
|
||||
|
||||
format-discharging = <label-discharging>
|
||||
label-discharging = %percentage%% %time% %consumption%W
|
||||
|
||||
format-full = <label-full>
|
||||
label-full = %percentage%%
|
||||
|
||||
format-low = <label-low>
|
||||
label-low = %percentage%%
|
||||
label-low-foreground = ${color.alert}
|
||||
|
||||
[module/net-wireless]
|
||||
type = internal/network
|
||||
interface-type = wireless
|
||||
interval = 3
|
||||
speed-unit = B/s
|
||||
format-connected = <label-connected>
|
||||
label-connected = %essid% · %local_ip% · U %upspeed% · D %downspeed%
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = Wi-Fi down
|
||||
label-disconnected-foreground = ${color.foreground-dim}
|
||||
|
||||
[module/fs-system]
|
||||
inherit = fs-base
|
||||
mount-0 = /
|
||||
label-mounted = / %used% on %total%
|
||||
|
||||
[module/dns]
|
||||
type = custom/script
|
||||
exec = nslookup amauryjoly.fr | sed -n '2p' | awk '{print $2}'
|
||||
interval = 30
|
||||
label = DNS %output%
|
||||
|
||||
[module/volume]
|
||||
type = internal/pulseaudio
|
||||
format-volume = <label-volume>
|
||||
label-volume = VOL %percentage%%
|
||||
format-muted = <label-muted>
|
||||
label-muted = VOL mute
|
||||
label-muted-foreground = ${color.foreground-dim}
|
||||
|
||||
[module/defaultaudio]
|
||||
type = custom/script
|
||||
exec = wpctl inspect @DEFAULT_AUDIO_SINK@ 2>/dev/null | awk -F'"' '/^[[:space:]]*device\.api = "bluez5"/ { bt=1 } /^[[:space:]]*media\.name = "/ { name=$2 } END { print (bt && name) ? name : "local" }'
|
||||
interval = 3
|
||||
label = %output%
|
||||
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
format-margin = 2
|
||||
tray-spacing = 2
|
||||
|
||||
[module/ping-amaury]
|
||||
type = custom/script
|
||||
exec = sh -c 'v=$(ping -c 1 -W 1 amauryjoly.fr 2>/dev/null | sed -n "s/.*temps=\\([0-9.]*\\).*/\\1/p"); [ -n "$v" ] && echo "$v ms" || echo "down"'
|
||||
interval = 60
|
||||
format = <label>
|
||||
label = LAT %output%
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
tail = true
|
||||
interval = 5
|
||||
; prefix symbol is shown before the text
|
||||
format-prefix = " "
|
||||
format = <label>
|
||||
exec = /etc/nixos/dotconfig/polybar/scroll_spotify_status.sh
|
||||
|
||||
[module/spotify-prev]
|
||||
type = custom/text
|
||||
format = ""
|
||||
click-left = playerctl previous -p spotify
|
||||
|
||||
[module/spotify-play-pause]
|
||||
type = custom/ipc
|
||||
hook-0 = echo ''
|
||||
hook-1 = echo ''
|
||||
initial = 1
|
||||
click-left = playerctl play-pause -p spotify
|
||||
|
||||
[module/spotify-next]
|
||||
type = custom/text
|
||||
format = ""
|
||||
click-left = playerctl next -p spotify
|
||||
@@ -243,7 +243,7 @@ interval = 5
|
||||
; prefix symbol is shown before the text
|
||||
format-prefix = " "
|
||||
format = <label>
|
||||
exec = ~/.config/polybar/scroll_spotify_status.sh
|
||||
exec = /etc/nixos/dotconfig/polybar/scroll_spotify_status.sh
|
||||
|
||||
[module/spotify-prev]
|
||||
type = custom/text
|
||||
|
||||
@@ -19,7 +19,7 @@ done
|
||||
exit 1
|
||||
}
|
||||
|
||||
polybar_dir="/home/alice/.config/polybar"
|
||||
polybar_dir="/home/alice/src/nixos-config/dotconfig/polybar"
|
||||
|
||||
tmpconf="$polybar_dir/config.ini"
|
||||
sed "s/@HW@/$hw/g" $polybar_dir/config.ini.model > "$tmpconf"
|
||||
@@ -27,14 +27,14 @@ sed "s/@HW@/$hw/g" $polybar_dir/config.ini.model > "$tmpconf"
|
||||
primary=$(xrandr --query | grep " primary" | cut -d" " -f1)
|
||||
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
MONITOR="$m" HW="$hw" polybar top &
|
||||
MONITOR="$m" HW="$hw" polybar -c $tmpconf top &
|
||||
sleep 0.1
|
||||
MONITOR="$m" HW="$hw" polybar middle &
|
||||
MONITOR="$m" HW="$hw" polybar -c $tmpconf middle &
|
||||
sleep 0.1
|
||||
MONITOR="$m" HW="$hw" polybar bottom &
|
||||
MONITOR="$m" HW="$hw" polybar -c $tmpconf bottom &
|
||||
if [ "$m" = "$primary" ]; then
|
||||
MONITOR="$m" HW="$hw" polybar tray-bottom &
|
||||
MONITOR="$m" HW="$hw" polybar -c $tmpconf tray-bottom &
|
||||
else
|
||||
MONITOR="$m" HW="$hw" polybar bottom-b &
|
||||
MONITOR="$m" HW="$hw" polybar -c $tmpconf bottom-b &
|
||||
fi
|
||||
done
|
||||
42
flake.lock
generated
42
flake.lock
generated
@@ -9,11 +9,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774857716,
|
||||
"narHash": "sha256-z05BKQ6F9/6H2/ecIYEXuq54JCUEiOpdYXTQIijB/wM=",
|
||||
"lastModified": 1778493576,
|
||||
"narHash": "sha256-/vvNyF8C2tNTkxtffGUQbcTJvf72cRw3qo8cyBh33pM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "9ad9c53e902485e006c07ae54a7dd4ad55a8c4d8",
|
||||
"rev": "5bf88a04d8678c7334f2f5072975f3b2cb0fe1ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -65,11 +65,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775622785,
|
||||
"narHash": "sha256-/yFxO+7oS1SymDfJ2iVO7K5vJKcYfe9XGIJ+quLqz0Q=",
|
||||
"lastModified": 1778853583,
|
||||
"narHash": "sha256-0P4/nDOxxufeh5SD5vqpfFw0n4mq29WZISYAgfryD3Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "527e47b78fe67213072f706bf933a9705a8c4974",
|
||||
"rev": "1bedcc8740b9aa2f7d3e1312a6c88baf00909f54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -102,11 +102,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1775423009,
|
||||
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
|
||||
"lastModified": 1778443072,
|
||||
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
|
||||
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -141,11 +141,11 @@
|
||||
"poetry2nix": "poetry2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775547505,
|
||||
"narHash": "sha256-DqQN57mJqoFSfgvC/VY+x2nLGN3gpAPZuQ4EqCuiPP0=",
|
||||
"lastModified": 1778518087,
|
||||
"narHash": "sha256-8dnp635aH6myp2rbYhtgYtBDC4a7GHwu7y4Kek8iEdg=",
|
||||
"owner": "FirelightFlagboy",
|
||||
"repo": "parsec-cloud-nix",
|
||||
"rev": "ccd1531532d2aeaed550d973719ac3272ca3439b",
|
||||
"rev": "a8b2d1f91078454a941d8b81d1b124db274c1ae4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -192,11 +192,11 @@
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1774787924,
|
||||
"narHash": "sha256-Cbpmf0+1pqi/zbpub2vkp5lTPx3QdVtDkkagDwQzHHg=",
|
||||
"lastModified": 1778424672,
|
||||
"narHash": "sha256-v/CZ9tJT+ulSe3ZmjuG3lWABwOvITbT7EqF/2NAl3Hs=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "f1297b21119565c626320c1ffc248965fffb2527",
|
||||
"rev": "e266f5cab8f6525d0bc2ddccc0006418c534b5e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -213,11 +213,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775619836,
|
||||
"narHash": "sha256-VcC/+MMMldwQKcST2y/QTndGLusSxjeUvYwFwzZKKko=",
|
||||
"lastModified": 1777944972,
|
||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "de5f2d596eb896a5728afcd15f823f59cb9ecfdb",
|
||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -298,11 +298,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775591480,
|
||||
"narHash": "sha256-kgyMN5eOJwsOxnSszJ9709vKvp7vvSQ/t1AI8mJ11Sk=",
|
||||
"lastModified": 1778423132,
|
||||
"narHash": "sha256-GzzW5RUYZjYZZYlqKfL2iHibHvJHGLCoDt3uLlEfK3E=",
|
||||
"owner": "netbrain",
|
||||
"repo": "zwift",
|
||||
"rev": "f425356bdef3b5d0625dec6d860b23dc1efdef17",
|
||||
"rev": "5b8cf71bcffe43bda7a4d2c4c446b45b6e67ae87",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -39,4 +39,8 @@
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="4745", ATTR{idProduct}=="277f", MODE="0666", TAG+="uaccess"
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
scream
|
||||
nixd
|
||||
alejandra
|
||||
|
||||
pulseaudio
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
|
||||
@@ -2,16 +2,24 @@
|
||||
# Description: Enables X11 with i3 window manager and associated desktop tools
|
||||
# Services: xserver with i3
|
||||
# Packages: alacritty (terminal), tint2 (panel), rofi (launcher), i3lock, dunst
|
||||
{pkgs, ...}: let
|
||||
{
|
||||
pkgs,
|
||||
customConfig,
|
||||
...
|
||||
}: let
|
||||
updatescreen = pkgs.writeShellScript "updatescreens.sh" ''
|
||||
#!/bin/sh
|
||||
i3-msg restart
|
||||
feh --bg-fill --no-xinerama Downloads/fire1.png
|
||||
|
||||
'';
|
||||
in {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.i3.enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
configFile = "/etc/nixos/dotconfig/i3/config";
|
||||
};
|
||||
autorun = true;
|
||||
};
|
||||
|
||||
@@ -29,6 +37,7 @@ in {
|
||||
IdleActionSec = "15min";
|
||||
|
||||
HandleLidSwitch = "suspend";
|
||||
HandlePowerSwitch = "ignore";
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
@@ -64,6 +73,17 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${customConfig.username} = {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
script = "/etc/nixos/dotconfig/polybar/start.sh";
|
||||
package = pkgs.polybar.override {
|
||||
i3Support = true;
|
||||
pulseSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
maim
|
||||
@@ -71,7 +91,6 @@ in {
|
||||
dunst
|
||||
dex
|
||||
rofi
|
||||
polybarFull
|
||||
oh-my-posh
|
||||
playerctl
|
||||
zscroll
|
||||
|
||||
26
modules/common/editor.nix
Normal file
26
modules/common/editor.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
# modules/common/editor.nix
|
||||
{pkgs, ...}: let
|
||||
nvimCfg = import ./nvim-cfg.nix {inherit pkgs;};
|
||||
in {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
configure = {
|
||||
customRC = ''
|
||||
${nvimCfg.baseVimConfig}
|
||||
|
||||
lua << EOF
|
||||
${nvimCfg.baseLuaConfig}
|
||||
EOF
|
||||
'';
|
||||
|
||||
packages.myNeovimPackages = {
|
||||
start = nvimCfg.basePlugins;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
}: let
|
||||
backupToml = pkgs.writeText "dnscrypt-proxy-backup.toml" ''
|
||||
listen_addresses = ["127.0.0.2:53"]
|
||||
server_names = ["dns0-eu"]
|
||||
server_names = ["dns4eu"]
|
||||
|
||||
[sources.public-resolvers]
|
||||
urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md']
|
||||
@@ -85,7 +85,7 @@ in {
|
||||
};
|
||||
|
||||
systemd.services."dnscrypt-proxy-backup" = {
|
||||
description = "dnscrypt-proxy backup (dns0-eu)";
|
||||
description = "dnscrypt-proxy backup (dns4eu)";
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
@@ -93,6 +93,7 @@ in {
|
||||
Restart = "on-failure";
|
||||
NoNewPrivileges = true;
|
||||
DynamicUser = true;
|
||||
StateDirectory = "dnscrypt-proxy-backup";
|
||||
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
|
||||
};
|
||||
};
|
||||
|
||||
194
modules/common/nvim-cfg.nix
Normal file
194
modules/common/nvim-cfg.nix
Normal file
@@ -0,0 +1,194 @@
|
||||
# This file configures Neovim with a set of plugins and settings to enhance the editing experience.
|
||||
{pkgs}: {
|
||||
basePlugins = with pkgs.vimPlugins; [
|
||||
rose-pine
|
||||
lualine-nvim
|
||||
everforest
|
||||
|
||||
nvim-tree-lua
|
||||
nvim-web-devicons
|
||||
|
||||
nvim-lspconfig
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
luasnip
|
||||
cmp_luasnip
|
||||
friendly-snippets
|
||||
|
||||
conform-nvim
|
||||
|
||||
indent-blankline-nvim
|
||||
nvim-autopairs
|
||||
|
||||
copilot-vim
|
||||
];
|
||||
|
||||
baseVimConfig = ''
|
||||
set number
|
||||
set relativenumber
|
||||
set cursorline
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
||||
set smartindent
|
||||
set wrap
|
||||
set scrolloff=8
|
||||
set sidescrolloff=8
|
||||
set signcolumn=yes
|
||||
'';
|
||||
|
||||
baseLuaConfig = ''
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- Style/Theme
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.background = "dark"
|
||||
|
||||
require("rose-pine").setup({
|
||||
variant = "main", -- "main", "moon" ou "dawn"
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("rose-pine")
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "everforest",
|
||||
globalstatus = true,
|
||||
}
|
||||
})
|
||||
|
||||
require("ibl").setup()
|
||||
|
||||
-- File explorer
|
||||
vim.g.loadednetrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
require("nvim-tree").setup({
|
||||
view = {
|
||||
side = "left",
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>b", ":NvimTreeToggle<CR>", {
|
||||
noremap = true,
|
||||
silent = true,
|
||||
desc = "Toggle file tree",
|
||||
})
|
||||
|
||||
-- Diagnostics lisibles
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
})
|
||||
|
||||
-- Raccourcis LSP
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf, silent = true }
|
||||
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
require("conform").format({
|
||||
async = true,
|
||||
lsp_format = "fallback",
|
||||
})
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Autocomplétion
|
||||
require("nvim-autopairs").setup({
|
||||
disable_filetype = { "TelescopePrompt" , "vim" },
|
||||
})
|
||||
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- LSP Nix avec nixd
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetypes = { "nix" },
|
||||
capabilities = capabilities,
|
||||
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
|
||||
formatting = {
|
||||
command = { "alejandra" },
|
||||
},
|
||||
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake (builtins.toString ./.)).nixosConfigurations."laptop".options',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable("nixd")
|
||||
|
||||
-- Formatage automatique avec alejandra
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
nix = { "alejandra" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
timeout_ms = 1000,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
})
|
||||
'';
|
||||
}
|
||||
10
modules/common/terminal.nix
Normal file
10
modules/common/terminal.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
customConfig,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.${customConfig.username} = {
|
||||
programs.zellij.enable = true;
|
||||
programs.zellij.enableFishIntegration = true;
|
||||
};
|
||||
}
|
||||
@@ -7,11 +7,12 @@
|
||||
customConfig,
|
||||
...
|
||||
}: {
|
||||
systemd.sysusers.enable = false;
|
||||
users.users."${customConfig.username}" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${customConfig.username}";
|
||||
# Base groups - docker/vboxusers are added by virtualization.nix if enabled
|
||||
extraGroups = ["wheel" "audio" "dialout" "plugdev"];
|
||||
extraGroups = ["wheel" "audio" "dialout" "plugdev" "tty"];
|
||||
packages = with pkgs; [
|
||||
# Browsers & Web
|
||||
firefox
|
||||
@@ -24,7 +25,6 @@
|
||||
nextcloud-client
|
||||
|
||||
# Development
|
||||
neovim
|
||||
git
|
||||
vscode
|
||||
zotero
|
||||
@@ -46,7 +46,7 @@
|
||||
# Gaming & Entertainment
|
||||
prismlauncher # Minecraft launcher
|
||||
# widelands # Strategy game
|
||||
wasistlos # Game
|
||||
whatsapp-electron
|
||||
signal-desktop
|
||||
moonlight-qt # Game streaming
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
customConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
username = customConfig.username;
|
||||
@@ -26,6 +27,6 @@ in {
|
||||
home.stateVersion = "24.05";
|
||||
xdg.enable = true;
|
||||
|
||||
xdg.configFile = lib.mapAttrs' mkConfigEntry dotconfigEntries;
|
||||
# xdg.configFile = lib.mapAttrs' mkConfigEntry dotconfigEntries;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
wifi-networks: ENC[AES256_GCM,data:ttpUrmiypU54BtQb4eSopI5iLt5OFS3v+WPWD9NiyQGbLcV9ABOr4CbGAbUOZqBAZgBJj4Byh6mdx5r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:
|
||||
- recipient: age1hhyew9sv8lqqfeza92jkxsdudhsgaef66cxalp06ez2cm9k6aqysc7mlf7
|
||||
@@ -10,7 +10,7 @@ sops:
|
||||
NENiek9YeUhXNFhuZkZzRnBIYXdGY2cKpfSlzP7uK6VFl71OYfoHBxAwrKfpJSNT
|
||||
QQUngSh6VBrWeJIxoMkJ7O+xSgwZnWc0fnrB+OpoRqy5YVctSmHERg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2026-04-06T08:15:15Z"
|
||||
mac: ENC[AES256_GCM,data:Y9rEWXkTcDaoBtWhQ6RepnaaPUZujA6oeHhG/YdvhLLo0Nq3Or6F59YXaArwmTcOxjJzUP0eaUphZYuinVZKomMkxeFfm6ms4Tg6VHDzCxpmrwJgvWCjmmy69jrFm75l6D/Q1WeGqijsxuOCitYjgpfIDnfwomx1RPWTWNrs77M=,iv:gBspVAUPd8AexuAqKeMcuMDA9HVTXKkl87wntGUOtz0=,tag:B3yFoxu+Qs84bJQDJ6brKQ==,type:str]
|
||||
lastmodified: "2026-04-29T12:39:35Z"
|
||||
mac: ENC[AES256_GCM,data:h3GiVpsQ55DSq9zVgeE91hXkkcv+OU10SAHoICUChqQLp4YuIjqYxJfTuLAeYHOAWiyE+yFhvLdZr+fw35XKlRPoqTPEEVQDoIbPO7XTZ1a3CauJeA/lfJj5Uvj9/KPNSVqrX6qYQOM/8e5aliVRSAS7sjRMmZSvp9PVf4IsIkA=,iv:0+rNYnuG6eQ6HL9pDNtMKBePG4FNxMNUwLTdQZJyRpk=,tag:qdS50AXPr2aj8MWOLRz3sQ==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.12.2
|
||||
|
||||
Reference in New Issue
Block a user