2 Commits

Author SHA1 Message Date
Tom Alexander
6ed4aa08f6 Add a role for mitmproxy. 2026-08-29 09:40:21 -04:00
Tom Alexander
9bfa21368b Update to Linux 7.2.
This is to pull in the drivers for the mt7927 wireless chipset in my desktop. Normally, I would keep the rest of my machines on LTS but since Linux 7 significantly changed the kernel preemption, maintaining two configs would be more trouble than it is worth.
2026-08-29 06:50:47 -04:00
5 changed files with 36 additions and 27 deletions

View File

@@ -64,6 +64,7 @@ in
./roles/media ./roles/media
./roles/memtest86 ./roles/memtest86
./roles/minimal_base ./roles/minimal_base
./roles/mitmproxy
./roles/network ./roles/network
./roles/nix_index ./roles/nix_index
./roles/nix_repl ./roles/nix_repl

View File

@@ -118,6 +118,7 @@
me.lvfs.enable = true; me.lvfs.enable = true;
me.media.enable = true; me.media.enable = true;
me.memtest.enable = true; me.memtest.enable = true;
me.mitmproxy.enable = true;
me.network.enable = true; me.network.enable = true;
me.nix_index.enable = true; me.nix_index.enable = true;
me.nix_repl.enable = true; me.nix_repl.enable = true;

View File

@@ -111,6 +111,7 @@
me.lvfs.enable = true; me.lvfs.enable = true;
me.media.enable = true; me.media.enable = true;
me.memtest.enable = true; me.memtest.enable = true;
me.mitmproxy.enable = true;
me.network.enable = true; me.network.enable = true;
me.nix_index.enable = true; me.nix_index.enable = true;
me.nix_repl.enable = true; me.nix_repl.enable = true;

View File

@@ -14,30 +14,12 @@ let
full = { full = {
PREEMPT_DYNAMIC = yes; PREEMPT_DYNAMIC = yes;
PREEMPT = yes; PREEMPT = yes;
PREEMPT_VOLUNTARY = lib.mkForce no;
PREEMPT_LAZY = lib.mkForce no; PREEMPT_LAZY = lib.mkForce no;
PREEMPT_NONE = no;
}; };
lazy = { lazy = {
PREEMPT_DYNAMIC = yes; PREEMPT_DYNAMIC = yes;
PREEMPT = no; PREEMPT = no;
PREEMPT_VOLUNTARY = lib.mkForce no;
PREEMPT_LAZY = yes; PREEMPT_LAZY = yes;
PREEMPT_NONE = no;
};
voluntary = {
PREEMPT_DYNAMIC = no;
PREEMPT = no;
PREEMPT_VOLUNTARY = yes;
PREEMPT_LAZY = lib.mkForce no;
PREEMPT_NONE = no;
};
none = {
PREEMPT_DYNAMIC = no;
PREEMPT = no;
PREEMPT_VOLUNTARY = lib.mkForce no;
PREEMPT_LAZY = lib.mkForce no;
PREEMPT_NONE = yes;
}; };
}; };
tick_hz = tick_hz =
@@ -99,16 +81,14 @@ let
TRANSPARENT_HUGEPAGE_MADVISE = yes; TRANSPARENT_HUGEPAGE_MADVISE = yes;
}; };
}; };
common_config = common_config = with lib.kernel; {
with lib.kernel; # Google's BBRv3 TCP congestion Control
{ TCP_CONG_BBR = yes;
# Google's BBRv3 TCP congestion Control DEFAULT_BBR = yes;
TCP_CONG_BBR = yes; };
DEFAULT_BBR = yes;
};
flavors = { flavors = {
server = lib.mkMerge [ server = lib.mkMerge [
preemption_type.none preemption_type.lazy
tick_hz."300" tick_hz."300"
performance_governor.default performance_governor.default
tick_rate.tickless tick_rate.tickless
@@ -142,7 +122,8 @@ in
kernel.version = lib.mkOption { kernel.version = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "linux"; # LTS # default = "linux"; # LTS
default = "linux_7_2"; # LTS
example = "linux_6_18"; example = "linux_6_18";
description = "What version of the kernl should we use."; description = "What version of the kernl should we use.";
}; };

View File

@@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.me = {
mitmproxy.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install mitmproxy.";
};
};
config = lib.mkIf config.me.mitmproxy.enable {
environment.systemPackages = with pkgs; [
mitmproxy
];
};
}