mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: create router role
This commit is contained in:
parent
71d816fe80
commit
1b8b3f607d
2 changed files with 47 additions and 0 deletions
46
roles/router.nix
Normal file
46
roles/router.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
username,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.liv.router;
|
||||
in
|
||||
{
|
||||
options.liv.router = {
|
||||
enable = mkEnableOption "Enable router";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs.kitty.terminfo
|
||||
powertop
|
||||
bind
|
||||
];
|
||||
|
||||
services = {
|
||||
thermald.enable = true;
|
||||
vnstat.enable = true;
|
||||
# cpupower-gui.enable = true;
|
||||
# power-profiles-daemon.enable = true;
|
||||
|
||||
# auto-cpufreq = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# battery = {
|
||||
# governor = "powersave";
|
||||
# turbo = "auto";
|
||||
# };
|
||||
# charger = {
|
||||
# governor = "performance";
|
||||
# turbo = "auto";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue