Update config

This commit is contained in:
Lomig 2025-08-31 12:03:52 +02:00
parent e1df4bbbcf
commit 556e0e1eb2
15 changed files with 323 additions and 164 deletions

View file

@ -1,14 +1,9 @@
# modules/alerts/sms.nix
{ config, pkgs, lib, ... }:
{
# services.xserver.enable = true;
services.xserver.xkb.extraLayouts.bepovim = {
description = "Clavier Bepovim 4 niveaux";
languages = [ "fr" ];
# IMPORTANT: c'est `symbolsFile`, pas `symbols`.
symbolsFile = builtins.toFile "bepovim.xkb" ''
xkb_symbols "basic" {
name[Group1] = "Bepovim";
@ -24,7 +19,7 @@
key <AE08> { [ minus, 7, asciitilde ] };
key <AE09> { [ asterisk, 8 ] };
key <AE10> { [ slash, 9, backslash ] };
key <AE11> { [ quotedbl, 0 ] };
key <AE11> { [ quotedbl, 0, percent ] };
key <AE12> { [ equal, ampersand ] };
key <BKSP> { [ BackSpace ] };
key <TAB> { [ Tab, ISO_Left_Tab ] };
@ -79,17 +74,17 @@
key <SPCE> { [ space, underscore, nobreakspace, U202F ] };
key <RALT> { [ ISO_Level3_Shift ] };
key <FK02> { [ F1, F1 ] };
key <FK03> { [ F2, F2 ] };
key <FK04> { [ F3, F3 ] };
key <FK05> { [ F4, F4 ] };
key <FK06> { [ F5, F5 ] };
key <FK07> { [ F6, F6 ] };
key <FK08> { [ F7, F7 ] };
key <FK09> { [ F8, F8 ]};
key <FK10> { [ F9, F9 ] };
key <FK11> { [ F10, F10 ] };
key <FK12> { [ F11, F11 ] };
key <FK02> { [ F1, F1 ] };
key <FK03> { [ F2, F2 ] };
key <FK04> { [ F3, F3 ] };
key <FK05> { [ F4, F4 ] };
key <FK06> { [ F5, F5 ] };
key <FK07> { [ F6, F6 ] };
key <FK08> { [ F7, F7 ] };
key <FK09> { [ F8, F8 ]};
key <FK10> { [ F9, F9 ] };
key <FK11> { [ F10, F10 ] };
key <FK12> { [ F11, F11 ] };
};
'';
};
@ -100,3 +95,4 @@
console.useXkbConfig = true;
}
# vim: set ts=2 sw=2 sts=2 et :

View file

@ -2,33 +2,37 @@
{
imports = [
./raid.nix
./bepovim.nix
../../wm/bspwm.nix
../../wm/plasma.nix
../../apps/qemu.nix
../../apps/gitea.nix
../../apps/truenas.nix
];
nix.settings.experimental-features = ["nix-command" "flakes" ];
boot.initrd.kernelModules = [];
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" "amdgpu" ];
boot.kernelModules = [ "amdgpu" "kvm-amd" ];
boot.extraModulePackages = [];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"mem_sleep_default=deep"
"amdgpu.si_support=0"
"amdgpu.cik_support=0"
"radeon.si_support=0"
"radeon.cik_support=0"
"amdgpu.cik_support=0"
"radeon.si_support=0"
"radeon.cik_support=0"
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_priority=3"
"rd.systemd.show_status=auto"
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/b4e3577b-17ab-4a89-9aeb-4e223be4c75b"; # à adapter si tu as un autre label/disque
fsType = "ext4"; # ou btrfs, xfs, ce que t'as utilisé
};
swapDevices = [] ;
boot.plymouth.enable = true ;
boot.plymouth.theme = "spinner" ;
boot.consoleLogLevel = 3 ;
boot.initrd.verbose = false ;
boot.loader.timeout = 5;
boot.loader.systemd-boot.enable = true ;
boot.loader.systemd-boot.consoleMode = "max" ;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot";
@ -39,6 +43,12 @@
RuntimeMaxUse=100M
'';
fileSystems."/" = {
device = "/dev/disk/by-uuid/b4e3577b-17ab-4a89-9aeb-4e223be4c75b"; # à adapter si tu as un autre label/disque
fsType = "ext4"; # ou btrfs, xfs, ce que t'as utilisé
};
swapDevices = [] ;
hardware.firmware = with pkgs ; [ linux-firmware ];
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
@ -52,6 +62,7 @@
LIBVA_DRIVER_NAME = "radeonsi";
VDPAU_DRIVER = "va_gl";
};
environment.defaultPackages = lib.mkForce [] ;
hardware.bluetooth.enable = true ;
environment.etc."pam.d/i3lock".text = ''
@ -61,17 +72,18 @@
session include login
'';
services.blueman.enable = true ;
services.logind.settings.Login = {
IdleAction="suspend";
IdleActionSec="5min";
HandleLidSwitch="suspend";
HandleLidSwitchDocked="ignore";
};
services.openssh.enable = true ;
services.xserver.enable = true ;
services.xserver.videoDrivers = [ "amdgpu" ];
services.logind.extraConfig = ''
IdleAction=suspend
IdleActionSec=5min
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
'';
networking.hostName = "pennsardin";
networking.firewall.enable = true ;
time.timeZone = "Europe/Paris";
# Select internationalisation properties.
i18n.defaultLocale = "fr_FR.UTF-8";
@ -106,16 +118,22 @@
};
environment.systemPackages = with pkgs; [
# i3lock
p7zip
btrfs-progs
cifs-utils
evtest
gdu
git
glances
lm_sensors
neovim
nixos-bgrt-plymouth
parted
pciutils
pulseaudio
snapper
tmux
usbutils
xorg.xev
xorg.xkbcomp
];
@ -136,3 +154,4 @@
system.stateVersion = "25.05"; # pour éviter les hurlements inutiles
}
# vim: set ts=2 sw=2 sts=2 et :

View file

@ -1,54 +0,0 @@
# modules/alerts/sms.nix
{ config, pkgs, lib, ... }:
let
user = "21782061"; # Ton identifiant Free
pass = "PEmCOQLKMEdMW9"; # Ta clé
in
{
environment.systemPackages = with pkgs; [ curl ];
environment.etc."mdadm-raid-wrapper.sh".text = ''
systemctl start raid-alert-sms.service
'';
boot.swraid = {
enable = true ;
mdadmConf = ''
MAILADDR guillaume.lame@protonmail.com
PROGRAM /etc/mdadm-raid-wrapper.sh
ARRAY /dev/md/raid-home UUID=cad7faf8:93cab941:ba745379:becc1918
'';
};
fileSystems."/mnt/raid" = {
device = "/dev/md/raid-home" ;
fsType = "btrfs" ;
options = ["compress=zstd" "noatime" "nofail" "x-systemd.device-timeout=5"];
};
# systemd.services.raid-alert-sms = {
# description = "Envoie un SMS si RAID pète";
# wantedBy = [ "multi-user.target" ];
# serviceConfig = {
# Type = "oneshot";
# ExecStart = ''
# ${pkgs.curl}/bin/curl -s \
# "https://smsapi.free-mobile.fr/sendmsg?user=${user}&pass=${pass}&msg=TON+RAID+EST+MORT+FUIS"
# '';
# };
# };
# systemd.services.mdadm-monitor = {
# description = "RAID monitoring";
# wantedBy = [ "multi-user.target" ];
# after = [ "network.target" ];
# serviceConfig = {
# ExecStart = "${pkgs.mdadm}/bin/mdadm --monitor --scan --daemonize --program=/etc/mdadm-raid-wrapper.sh";
# Restart = "always";
# RestartSec = "5s";
# Type = "forking";
# };
# };
}