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