mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: server beginnings
This commit is contained in:
parent
64f737ee3d
commit
4977342183
2 changed files with 63 additions and 0 deletions
50
hosts/server/default.nix
Normal file
50
hosts/server/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./../../modules/core
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
acpi
|
||||||
|
powertop
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
thermald.enable = true;
|
||||||
|
# cpupower-gui.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
|
upower = {
|
||||||
|
enable = true;
|
||||||
|
percentageLow = 20;
|
||||||
|
percentageCritical = 5;
|
||||||
|
percentageAction = 3;
|
||||||
|
criticalPowerAction = "PowerOff";
|
||||||
|
};
|
||||||
|
|
||||||
|
auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
kernelModules = ["acpi_call"];
|
||||||
|
extraModulePackages = with config.boot.kernelPackages;
|
||||||
|
[
|
||||||
|
acpi_call
|
||||||
|
cpupower
|
||||||
|
];
|
||||||
|
# ++ [pkgs.cpupower-gui];
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/core/default-server.nix
Normal file
13
modules/core/default-server.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (import ./bootloader.nix) ]
|
||||||
|
++ [ (import ./hardware.nix) ]
|
||||||
|
++ [ (import ./network.nix) ]
|
||||||
|
++ [ (import ./program.nix) ]
|
||||||
|
++ [ (import ./security.nix) ]
|
||||||
|
++ [ (import ./services.nix) ]
|
||||||
|
++ [ (import ./system.nix) ]
|
||||||
|
++ [ (import ./user.nix) ]
|
||||||
|
++ [ (import ./virtualization.nix) ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue