diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-09-16 15:13:19 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-09-16 15:13:19 +0300 |
commit | 751694df63b34946e1a79d379eac8c35ba40eed1 (patch) | |
tree | e1ac51c7ddca63c01c7042f84a0017dd8f75e5fb /configurations | |
parent | 2022-09-14 (diff) |
2022-09-16
Diffstat (limited to 'configurations')
-rw-r--r-- | configurations/default.nix | 54 | ||||
-rw-r--r-- | configurations/melian/default.nix | 52 |
2 files changed, 37 insertions, 69 deletions
diff --git a/configurations/default.nix b/configurations/default.nix index 124baec..40c133f 100644 --- a/configurations/default.nix +++ b/configurations/default.nix @@ -13,11 +13,37 @@ with lib; let modules = attrValues inputs.self.nixosModules ++ modules - ++ [(import configuration)]; + ++ optional (configuration != null) (import configuration); specialArgs = {inherit inputs lib this;}; }); in mapAttrs' mkConfiguration { + test-headless = { + modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixpkgs.nixosModules.notDetected + ]; + this = { + hostname = "test-headless"; + system = "x86_64-linux"; + isHeadless = true; + isHeadful = false; + }; + }; + + test-headful = { + modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixpkgs.nixosModules.notDetected + ]; + this = { + hostname = "test-headful"; + system = "x86_64-linux"; + isHeadless = false; + isHeadful = true; + }; + }; + melian.modules = with inputs; [ nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.lenovo-thinkpad-t480 @@ -44,30 +70,4 @@ in nixos-hardware.nixosModules.common-pc-hdd nixpkgs.nixosModules.notDetected ]; - - test-headless = { - modules = with inputs; [ - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - nixpkgs.nixosModules.notDetected - ]; - this = { - hostname = "test-headless"; - system = "x86_64-linux"; - isHeadless = true; - isHeadful = false; - }; - }; - - test-headful = { - modules = with inputs; [ - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - nixpkgs.nixosModules.notDetected - ]; - this = { - hostname = "test-headful"; - system = "x86_64-linux"; - isHeadless = false; - isHeadful = true; - }; - }; } diff --git a/configurations/melian/default.nix b/configurations/melian/default.nix index 08cbc8c..0aca218 100644 --- a/configurations/melian/default.nix +++ b/configurations/melian/default.nix @@ -66,15 +66,12 @@ with lib; { }; boot = { - kernelPackages = mkForce pkgs.linuxPackages_xanmod_latest; - - # Speeding Wi-Fi a bit. + # Speeding up Wi-Fi a bit. extraModprobeConfig = '' options iwlwifi 11n_disable=1 ''; initrd = { - kernelModules = []; availableKernelModules = ["ahci" "nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"]; luks.devices."root" = { @@ -83,7 +80,6 @@ with lib; { bypassWorkqueues = true; }; }; - kernelModules = ["kvm-intel"]; loader = { efi.canTouchEfiVariables = true; @@ -95,19 +91,10 @@ with lib; { }; }; - hardware = { - trackpoint = { - enable = true; - speed = 500; - sensitivity = 250; - }; - - opengl.extraPackages = with pkgs; [ - intel-media-driver - libvdpau-va-gl - vaapiIntel - vaapiVdpau - ]; + hardware.trackpoint = { + enable = true; + speed = 500; + sensitivity = 250; }; powerManagement = let @@ -127,31 +114,9 @@ with lib; { }; services = { - # No need for this anymore but it kept just in case. - # tlp = { - # enable = true; - # settings = { - # START_CHARGE_THRESH_BAT0 = 75; - # STOP_CHARGE_THRESH_BAT0 = 80; - # RESTORE_THRESHOLDS_ON_BAT = 1; - # }; - # }; - - throttled.enable = mkForce false; - thinkfan = { enable = true; - # Old-style configuration should be nullified because it does not support - # hwmon search and appends to valid configuration resulting in conflicts - # and crash. I probably should make a PR to remove what was introduced[1] - # before. - # - # [1]: https://github.com/NixOS/nixpkgs/commit/02b872310d6a6503639f5a71a14f00441f961bc9 - sensors = mkForce null; - fans = mkForce null; - levels = mkForce null; - settings = { sensors = [ { @@ -161,10 +126,13 @@ with lib; { } ]; fans = [{tpacpi = "/proc/acpi/ibm/fan";}]; - levels = [["level auto" 0 50] ["level disengaged" 50 32767]]; + levels = [ + ["level auto" 0 50] + ["level disengaged" 50 32767] + ]; }; }; - xserver.videoDrivers = ["intel" "modesetting"]; + # xserver.videoDrivers = ["intel" "modesetting"]; }; } |