Compare commits
2 Commits
4eb7749967
...
6ed4aa08f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ed4aa08f6
|
||
|
|
9bfa21368b
|
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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.";
|
||||||
};
|
};
|
||||||
|
|||||||
25
nix/configuration/roles/mitmproxy/default.nix
Normal file
25
nix/configuration/roles/mitmproxy/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user