organize modules
This commit is contained in:
parent
d7453265a1
commit
d0d4bf9ddb
21 changed files with 54 additions and 69 deletions
4
modules/hardware/core/firmware.nix
Normal file
4
modules/hardware/core/firmware.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
hardware.enableRedistributableFirmware = true; # T480 WiFi firmware fix
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
7
modules/hardware/core/tpm.nix
Normal file
7
modules/hardware/core/tpm.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }: {
|
||||||
|
security.tpm2 = {
|
||||||
|
enable = true;
|
||||||
|
pkcs11.enable = true;
|
||||||
|
tctiEnvironment.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
powerManagement.powertop.enable = true;
|
powerManagement.powertop.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ ... }: {
|
||||||
{
|
|
||||||
services = {
|
services = {
|
||||||
thermald.enable = true;
|
thermald.enable = true;
|
||||||
throttled.enable = true;
|
throttled.enable = true;
|
||||||
|
|
@ -15,9 +14,6 @@
|
||||||
governor = "powersave";
|
governor = "powersave";
|
||||||
energy_performance_preference = "balance_power";
|
energy_performance_preference = "balance_power";
|
||||||
turbo = "never";
|
turbo = "never";
|
||||||
enable_thresholds = "true";
|
|
||||||
start_threshold = "80";
|
|
||||||
stop_threshold = "85";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -29,9 +25,6 @@
|
||||||
[ 7 65 75 ]
|
[ 7 65 75 ]
|
||||||
[ "level full-speed" 75 100 ]
|
[ "level full-speed" 75 100 ]
|
||||||
];
|
];
|
||||||
# sensors = [
|
|
||||||
# { type = "hwmon"; query = "/sys/devices/platform/coretemp.0/hwmon"; }
|
|
||||||
# ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{ ... }: {
|
||||||
{
|
|
||||||
services.logind.settings.Login = {
|
services.logind.settings.Login = {
|
||||||
HandleLidSwitch = "suspend";
|
HandleLidSwitch = "suspend";
|
||||||
HandlePowerKey = "ignore";
|
HandlePowerKey = "ignore";
|
||||||
|
|
@ -1,35 +1,21 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./tzupdate.nix
|
./misc/battery-power.nix
|
||||||
./hibernation.nix
|
./misc/power-button.nix
|
||||||
./igpu.nix
|
./misc/cpu-thermal.nix
|
||||||
./cpu-thermal.nix
|
./misc/tzupdate.nix
|
||||||
./battery-power.nix
|
./core/hibernation.nix
|
||||||
./power-button.nix
|
./core/firmware.nix
|
||||||
|
./core/igpu.nix
|
||||||
|
./core/tpm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
security = {
|
hardware.bluetooth.enable = true;
|
||||||
tpm2 = {
|
|
||||||
enable = true;
|
|
||||||
pkcs11.enable = true;
|
|
||||||
tctiEnvironment.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
enableRedistributableFirmware = true; # T480 WiFi firmware fix
|
|
||||||
bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages;
|
kernelPackages = pkgs.linuxPackages;
|
||||||
kernel.sysctl."vm.laptop_mode" = 5;
|
kernel.sysctl."vm.laptop_mode" = 5;
|
||||||
initrd.availableKernelModules = [ "thinkpad_acpi" ];
|
initrd.availableKernelModules = [ "thinkpad_acpi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ hostname, timezone, ... }: {
|
{ hostname, timezone, ... }: {
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
imports = [
|
imports = [
|
||||||
./utilities.nix
|
./misc/utilities.nix
|
||||||
./nix-conf.nix
|
./misc/nix-conf.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "${hostname}";
|
networking.hostName = "${hostname}";
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
{ pkgs, locale, ... }: {
|
{ pkgs, locale, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./core/virtualization.nix
|
||||||
|
./core/bootloader.nix
|
||||||
|
./core/filesystem.nix
|
||||||
|
./core/network.nix
|
||||||
|
./core/kernel.nix
|
||||||
|
./core/user.nix
|
||||||
|
./misc/programs.nix
|
||||||
|
./misc/desktop.nix
|
||||||
./base.nix
|
./base.nix
|
||||||
./network.nix
|
|
||||||
./user.nix
|
|
||||||
./kernel.nix
|
|
||||||
./bootloader.nix
|
|
||||||
./filesystem.nix
|
|
||||||
./virtualization.nix
|
|
||||||
./desktop.nix
|
|
||||||
./programs.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
i18n.defaultLocale = locale;
|
i18n.defaultLocale = locale;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,21 @@
|
||||||
{ pkgs, username, ... }: {
|
{ pkgs, username, ... }: {
|
||||||
users = {
|
users.users."${username}" = {
|
||||||
users."${username}" = {
|
linger = true;
|
||||||
linger = true;
|
isNormalUser = true;
|
||||||
isNormalUser = true;
|
description = "${username}";
|
||||||
description = "${username}";
|
initialPassword = "${username}";
|
||||||
initialPassword = "${username}";
|
shell = pkgs.zsh;
|
||||||
shell = pkgs.zsh;
|
extraGroups = [
|
||||||
extraGroups = [
|
"networkmanager"
|
||||||
"networkmanager"
|
"wheel"
|
||||||
"wheel"
|
"dialout"
|
||||||
"dialout"
|
"libvirtd"
|
||||||
"libvirtd"
|
"docker"
|
||||||
"docker"
|
"input"
|
||||||
"input"
|
"uinput"
|
||||||
"uinput"
|
"plugdev"
|
||||||
"ydotool"
|
"adbusers"
|
||||||
"adbusers"
|
"kvm"
|
||||||
"kvm"
|
];
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue