add config from gitlab
This commit is contained in:
commit
e02f7f00f9
842 changed files with 297362 additions and 0 deletions
7
hosts/nixos-home/config/bluetooth.nix
Normal file
7
hosts/nixos-home/config/bluetooth.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
||||
13
hosts/nixos-home/config/boot.nix
Normal file
13
hosts/nixos-home/config/boot.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.luks.devices."luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c".device = "/dev/disk/by-uuid/5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c";
|
||||
}
|
||||
37
hosts/nixos-home/config/drivers_video.nix
Normal file
37
hosts/nixos-home/config/drivers_video.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# driver proprietaire
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true; # nécessaire pour Steam / jeux 32-bit
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake)
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # requis pour Wayland/Hyprland
|
||||
# dGPU endormi en général, offload sinon
|
||||
powerManagement.enable = true;
|
||||
# powerManagement.finegrained = true; # nécessite offload (ci-dessous)
|
||||
# RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le
|
||||
# propriétaire reste plus mature sur cette génération. Garde `open = false`.
|
||||
open = false;
|
||||
nvidiaSettings = true; # fournit `nvidia-settings`
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
#offload = {
|
||||
# enable = true; # dGPU à la demande (meilleure autonomie)
|
||||
# enableOffloadCmd = true; # fournit la commande `nvidia-offload`
|
||||
#};
|
||||
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
||||
40
hosts/nixos-home/config/extra-services.nix
Normal file
40
hosts/nixos-home/config/extra-services.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# ── Mullvad VPN ──
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
|
||||
# ── Steam ──
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = false;
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 50;
|
||||
};
|
||||
|
||||
# ── VirtualBox (Oracle) ──
|
||||
# virtualisation.virtualbox.host = {
|
||||
# enable = true;
|
||||
# enableExtensionPack = true;
|
||||
# };
|
||||
# users.extraGroups.vboxusers.members = [ "afoucaultc" ];
|
||||
|
||||
# ── Intégration KDE/Dolphin ──
|
||||
services.gvfs.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
}
|
||||
25
hosts/nixos-home/config/fonts.nix
Normal file
25
hosts/nixos-home/config/fonts.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
source-sans
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
corefonts
|
||||
b612
|
||||
|
||||
nerd-fonts.symbols-only
|
||||
nerd-fonts.adwaita-mono
|
||||
nerd-fonts.cousine
|
||||
|
||||
fira-code
|
||||
jetbrains-mono
|
||||
|
||||
dejavu_fonts
|
||||
liberation_ttf
|
||||
font-awesome
|
||||
|
||||
texlivePackages.luciole
|
||||
];
|
||||
}
|
||||
23
hosts/nixos-home/config/hyprland.nix
Normal file
23
hosts/nixos-home/config/hyprland.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
};
|
||||
|
||||
# Portails XDG (captures d'écran, partage d'écran, file pickers sous Wayland)
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
}
|
||||
20
hosts/nixos-home/config/language.nix
Normal file
20
hosts/nixos-home/config/language.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
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";
|
||||
};
|
||||
console = {
|
||||
keyMap = "fr-latin1";
|
||||
};
|
||||
}
|
||||
11
hosts/nixos-home/config/noctalia.nix
Normal file
11
hosts/nixos-home/config/noctalia.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
extra-substituters = [ "https://noctalia.cachix.org" ];
|
||||
extra-trusted-public-keys = [ "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" ];
|
||||
};
|
||||
}
|
||||
7
hosts/nixos-home/config/power_management.nix
Normal file
7
hosts/nixos-home/config/power_management.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.asusd.enable = true;
|
||||
services.supergfxd.enable = false;
|
||||
}
|
||||
12
hosts/nixos-home/config/sound.nix
Normal file
12
hosts/nixos-home/config/sound.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
||||
11
hosts/nixos-home/config/system_packages.nix
Normal file
11
hosts/nixos-home/config/system_packages.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
gnumake
|
||||
gcc
|
||||
wget
|
||||
];
|
||||
}
|
||||
|
||||
10
hosts/nixos-home/config/system_saves.nix
Normal file
10
hosts/nixos-home/config/system_saves.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
17
hosts/nixos-home/config/system_services.nix
Normal file
17
hosts/nixos-home/config/system_services.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "nixos-home";
|
||||
networkmanager.enable = true;
|
||||
# open ports manually if needed
|
||||
firewall.enable = true;
|
||||
};
|
||||
services = {
|
||||
xserver.xkb = {
|
||||
layout = "fr";
|
||||
variant = "";
|
||||
};
|
||||
printing.enable = true;
|
||||
openssh.enable = false;
|
||||
};
|
||||
}
|
||||
10
hosts/nixos-home/config/user.nix
Normal file
10
hosts/nixos-home/config/user.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.afoucaultc = {
|
||||
isNormalUser = true;
|
||||
description = "afoucaultc";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
31
hosts/nixos-home/configuration.nix
Normal file
31
hosts/nixos-home/configuration.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
# faire nixos-generate-config dans le bon dossier
|
||||
./hardware-configuration.nix
|
||||
./config/bluetooth.nix
|
||||
./config/boot.nix
|
||||
./config/drivers_video.nix
|
||||
./config/extra-services.nix
|
||||
./config/fonts.nix
|
||||
./config/hyprland.nix
|
||||
./config/language.nix
|
||||
./config/noctalia.nix
|
||||
./config/power_management.nix
|
||||
./config/sound.nix
|
||||
./config/system_packages.nix
|
||||
./config/system_saves.nix
|
||||
./config/system_services.nix
|
||||
./config/user.nix
|
||||
# profil nixos pour mon ordi portable
|
||||
# nécessite l'input nixos-hardware dans flake.nix.
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"pnpm-10.29.2"
|
||||
];
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
35
hosts/nixos-home/hardware-configuration.nix
Normal file
35
hosts/nixos-home/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/luks-eddcceff-290e-478d-baef-3fdc0f47a220";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-eddcceff-290e-478d-baef-3fdc0f47a220".device = "/dev/disk/by-uuid/eddcceff-290e-478d-baef-3fdc0f47a220";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2A23-C86E";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/mapper/luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue