initial commit for module-refactor
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
}
|
||||
36
hosts/laptop/config.nix
Normal file
36
hosts/laptop/config.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{pkgs, config, ...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
powerProfiles.enable = true;
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
host,
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./../../modules/sys/configuration.nix
|
||||
./hardware.nix
|
||||
./boot.nix
|
||||
./services.nix
|
||||
./environment.nix
|
||||
./settings.nix
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,53 +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/disk-main-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-nix";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-ESP";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-home";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# 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.enp14s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{...}: {
|
||||
services = {
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
settings.main = {
|
||||
capslock = "esc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageLow = 20;
|
||||
percentageCritical = 5;
|
||||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "performance";
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC = 500;
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT = 500;
|
||||
# INTEL_GPU_MAX_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
|
||||
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
}
|
||||
Reference in New Issue
Block a user