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
|
|
@ -5,6 +5,7 @@
|
||||||
++ [ (import ./amdgpu.nix) ]
|
++ [ (import ./amdgpu.nix) ]
|
||||||
++ [ (import ./nvidia.nix) ]
|
++ [ (import ./nvidia.nix) ]
|
||||||
++ [ (import ./server.nix) ]
|
++ [ (import ./server.nix) ]
|
||||||
|
++ [ (import ./router.nix) ]
|
||||||
++ [ (import ./desktop.nix) ]
|
++ [ (import ./desktop.nix) ]
|
||||||
++ [ (import ./wine.nix) ]
|
++ [ (import ./wine.nix) ]
|
||||||
++ [ (import ./creative.nix) ]
|
++ [ (import ./creative.nix) ]
|
||||||
|
|
|
||||||
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