nix: add asusctl overlay
Anirudh Oppiliappan x@icyphox.sh
Sun, 24 Apr 2022 11:55:56 +0530
2 files changed,
24 insertions(+),
4 deletions(-)
M
nix/hosts/wyndle/configuration.nix
→
nix/hosts/wyndle/configuration.nix
@@ -1,9 +1,14 @@
+let + asusctl-tar = fetchTarball "https://github.com/NixOS/nixpkgs/archive/a4a81b6f6c27e5a964faea25b7b5cbe611f98691.tar.gz"; +in { self, config, pkgs, theme, ... }: { imports = [ ./hardware-configuration.nix + "${asusctl-tar}/nixos/modules/services/misc/asusctl.nix" + "${asusctl-tar}/nixos/modules/services/misc/supergfxctl.nix" ]; boot.loader.systemd-boot.enable = true;@@ -51,11 +56,17 @@ };
}; nixpkgs.overlays = with self.overlays; [ + (self: super: { + asusctl = pkgs.callPackage "${asusctl-tar}/pkgs/tools/misc/asusctl/default.nix" { }; + supergfxctl = pkgs.callPackage "${asusctl-tar}/pkgs/tools/misc/supergfxctl/default.nix" { }; + }) nvim-nightly prompt ]; environment.systemPackages = with pkgs; [ + asusctl + supergfxctl cwm man-pages git@@ -101,6 +112,8 @@ };
}; services = { + asusctl.enable = true; + supergfxctl.enable = true; xserver = { enable = true; layout = "us";@@ -149,6 +162,10 @@ }];
pki.certificateFiles = [ "/home/icy/.local/share/caddy/pki/authorities/local/root.crt" ]; }; + powerManagement = { + enable = true; + powertop.enable = true; + }; users.users.icy = { isNormalUser = true;
M
nix/hosts/wyndle/hardware-configuration.nix
→
nix/hosts/wyndle/hardware-configuration.nix
@@ -5,7 +5,8 @@ { config, lib, pkgs, modulesPath, ... }:
{ imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];@@ -14,12 +15,14 @@ boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/f66408c3-50c9-421a-80c1-8163761f3817"; + { + device = "/dev/disk/by-uuid/f66408c3-50c9-421a-80c1-8163761f3817"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/E85D-EAD8"; + { + device = "/dev/disk/by-uuid/E85D-EAD8"; fsType = "vfat"; };@@ -27,7 +30,7 @@ swapDevices = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.opengl.enable = true; - hardware.nvidia.modesetting.enable = true; + hardware.nvidia.modesetting.enable = false; # high-resolution display hardware.video.hidpi.enable = lib.mkDefault true; }