Skip to content

Commit

Permalink
feat: update config for new asus laptop
Browse files Browse the repository at this point in the history
  • Loading branch information
2giosangmitom committed Aug 26, 2024
1 parent ceb3779 commit 4b87261
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
19 changes: 19 additions & 0 deletions hosts/nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,24 @@
ibus.engines = with pkgs-unstable.ibus-engines; [ bamboo ];
};
environment.systemPackages = with pkgs-unstable; [ vesktop ];

services = {
asusd = {
enable = true;
enableUserService = true;
};
};
hardware.opengl.enable = true;
hardware.nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
powerManagement.enable = false;
prime = {
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
services.power-profiles-daemon.enable = true;
};
}
30 changes: 14 additions & 16 deletions hosts/nixos/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
Expand All @@ -12,45 +13,42 @@
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

fileSystems."/" = {
device = "/dev/disk/by-uuid/5b86d6b3-25cb-4cee-ae38-9f50d53cdffa";
device = "/dev/disk/by-uuid/bd21a581-8792-447a-9779-1c2e825ebb89";
fsType = "ext4";
};

fileSystems."/home" = {
device = "/dev/disk/by-uuid/45669dad-25dc-487f-ae13-99d928af7dbf";
fsType = "ext4";
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5A80-D712";
device = "/dev/disk/by-uuid/D014-CA15";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};

fileSystems."/home" = {
device = "/dev/disk/by-uuid/0751fd64-ec5f-4869-a5f5-fd971a7d6a85";
fsType = "ext4";
};

swapDevices = [ { device = "/dev/disk/by-uuid/c9df08f6-e3ff-4b45-86d5-bff89af73e3d"; } ];
swapDevices = [ { device = "/dev/disk/by-uuid/4eae885f-ff58-4cc2-b0ce-28a576a75d8c"; } ];

# 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.eno1.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;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
1 change: 0 additions & 1 deletion hosts/nixos/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
starship.enable = true;
eza.enable = true;
lazygit.enable = true;
tmux.enable = true;
yazi.enable = true;
waybar.enable = true;
};
Expand Down

0 comments on commit 4b87261

Please sign in to comment.