mirror of
https://github.com/Moe1369/nixos-config.git
synced 2024-10-18 06:04:07 +02:00
refractor hardware configuration
This commit is contained in:
parent
1edfeccebd
commit
b1c898d13c
@ -17,7 +17,7 @@
|
||||
./system/set-controller.nix
|
||||
./system/set-desktop.nix
|
||||
./system/set-dev.nix
|
||||
./system/set-hardware-configuration.nix
|
||||
./system/set-filesystems.nix
|
||||
./system/set-hardware.nix
|
||||
./system/set-locale.nix
|
||||
./system/set-networking.nix
|
||||
|
@ -1,10 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
boot.plymouth.theme = "bgrt";
|
||||
boot.initrd.verbose = false;
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.kernelParams = [ "quiet" "udev.log_level=0" "amd_pstate=guided" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
|
18
system/set-filesystems.nix
Normal file
18
system/set-filesystems.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
{
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-partlabel/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-partlabel/EFI";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}];
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-partlabel/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-partlabel/EFI";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}];
|
||||
|
||||
# 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.enp11s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{ lib, config,... }:
|
||||
{
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.fwupd.enable = true;
|
||||
services.printing.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
networking.hostName = "computer-mo";
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user