Refactor
This commit is contained in:
parent
556e0e1eb2
commit
e0a82ee731
49 changed files with 1076 additions and 765 deletions
10
modules/common/audio.nix
Normal file
10
modules/common/audio.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
_: {
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
27
modules/common/base.nix
Normal file
27
modules/common/base.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{lib, ...}: {
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "fr_FR.UTF-8";
|
||||
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
||||
LC_MEASUREMENT = "fr_FR.UTF-8";
|
||||
LC_MONETARY = "fr_FR.UTF-8";
|
||||
LC_NAME = "fr_FR.UTF-8";
|
||||
LC_NUMERIC = "fr_FR.UTF-8";
|
||||
LC_PAPER = "fr_FR.UTF-8";
|
||||
LC_TELEPHONE = "fr_FR.UTF-8";
|
||||
LC_TIME = "fr_FR.UTF-8";
|
||||
};
|
||||
|
||||
# journald & coredump
|
||||
systemd.coredump.enable = false;
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=200M
|
||||
RuntimeMaxUse=100M
|
||||
'';
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
environment.defaultPackages = lib.mkForce [];
|
||||
programs.zsh.enable = true; # shell dispo au niveau système
|
||||
}
|
||||
4
modules/common/bluetooth.nix
Normal file
4
modules/common/bluetooth.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
_: {
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
8
modules/common/energy.nix
Normal file
8
modules/common/energy.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
services.logind.settings.Login = {
|
||||
IdleAction = "suspend";
|
||||
IdleActionSec = "5min";
|
||||
HandleLidSwitch = "suspend";
|
||||
HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
}
|
||||
4
modules/common/gaming.nix
Normal file
4
modules/common/gaming.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
_: {
|
||||
programs.steam.enable = true;
|
||||
hardware.xpadneo.enable = true;
|
||||
}
|
||||
8
modules/common/lockscreen.nix
Normal file
8
modules/common/lockscreen.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
environment.etc."pam.d/i3lock".text = ''
|
||||
auth include login
|
||||
account include login
|
||||
password include login
|
||||
session include login
|
||||
'';
|
||||
}
|
||||
8
modules/common/networking.nix
Normal file
8
modules/common/networking.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
nameservers = ["1.1.1.1" "8.8.8.8"];
|
||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
11
modules/common/nix.nix
Normal file
11
modules/common/nix.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{config, ...}: {
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
}
|
||||
36
modules/common/plymouth.nix
Normal file
36
modules/common/plymouth.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
plymouth.enable = true;
|
||||
plymouth.theme = "spinner";
|
||||
consoleLogLevel = 3;
|
||||
initrd.verbose = false;
|
||||
|
||||
# Ajouts "quiet/splash" propres (sans auto-référence)
|
||||
kernelParams = lib.mkAfter [
|
||||
"mem_sleep_default=deep"
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
loader = {
|
||||
timeout = 5;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.consoleMode = "max";
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixos-bgrt-plymouth
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue