Prepare for pro laptop

This commit is contained in:
Florian RICHER 2024-05-21 21:42:24 +02:00
parent 9256b08843
commit fa161db05d
3 changed files with 85 additions and 0 deletions

View file

@ -31,6 +31,7 @@
{ name = "nixos-test"; system = "x86_64-linux"; }
{ name = "perso-laptop"; system = "x86_64-linux"; }
{ name = "perso-desktop"; system = "x86_64-linux"; }
{ name = "pro-laptop"; system = "x86_64-linux"; }
];
in {
nixosConfigurations = nixpkgs.lib.foldl (c: s:

View file

@ -0,0 +1,44 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[
../../modules/linux_gaming.nix
../../modules/system.nix
../../modules/network.nix
../../modules/nvidia.nix
../../modules/plasma.nix
../../modules/keymaps/fr.nix
../../modules/bluetooth.nix
../../modules/pipewire.nix
../../modules/plymouth.nix
../../modules # Import optional configuration
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos-laptop-pro"; # Define your hostname.
hardware.nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
# Make sure to use the correct Bus ID values for your system!
# information bus: pci@0000:00:02.0
intelBusId = "PCI:0:2:0";
# information bus: pci@0000:01:00.0
nvidiaBusId = "PCI:1:0:0";
};
}

View file

@ -0,0 +1,40 @@
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2559c3d8-2d01-4666-b1e2-e448dbe90dda";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D8F8-89DC";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9dae0d33-697c-442e-bc64-b79ad643d089"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}