Compare commits
2 commits
3f3f770622
...
37c6c3371e
| Author | SHA1 | Date | |
|---|---|---|---|
| 37c6c3371e | |||
| 98f3f2df9a |
4 changed files with 76 additions and 75 deletions
|
|
@ -24,7 +24,7 @@ in {
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = mkDefault pkgs.linuxPackages_latest;
|
kernelPackages = mkDefault pkgs.linuxPackages_latest;
|
||||||
kernelParams = [ "pci_aspm.policy=performance" ];
|
kernelParams = [ "pcie_aspm.policy=performance" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# configure keymap in x11
|
# configure keymap in x11
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.hardware.nixosModules.gigabyte-b550
|
|
||||||
inputs.hardware.nixosModules.common-cpu-amd
|
inputs.hardware.nixosModules.common-cpu-amd
|
||||||
inputs.hardware.nixosModules.common-gpu-amd
|
inputs.hardware.nixosModules.common-gpu-amd
|
||||||
inputs.hardware.nixosModules.common-pc-ssd
|
inputs.hardware.nixosModules.common-pc-ssd
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,8 @@
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ amdgpu_top ];
|
environment.systemPackages = with pkgs; [ amdgpu_top ];
|
||||||
|
|
||||||
# fix audio issues
|
# fix audio issues: https://forums.linuxmint.com/viewtopic.php?t=445461
|
||||||
# Is this even needed. I'm losing my mindddddd
|
boot.extraModprobeConfig = ''
|
||||||
# https://forums.linuxmint.com/viewtopic.php?t=445461
|
options snd_hda_intel model=generic
|
||||||
# https://help.ubuntu.com/community/HdaIntelSoundHowto
|
'';
|
||||||
boot.extraModprobeConfig = ''options snd_hda_intel model=generic'';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ in {
|
||||||
useDoas = mkEnableOption "use opendoas instead of sudo";
|
useDoas = mkEnableOption "use opendoas instead of sudo";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkMerge [
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
tmp.useTmpfs = lib.mkDefault true;
|
tmp.useTmpfs = lib.mkDefault true;
|
||||||
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
|
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
|
||||||
|
|
@ -45,7 +46,7 @@ in {
|
||||||
# TCP fastopen
|
# TCP fastopen
|
||||||
"net.ipv4.tcp_fastopen" = 3;
|
"net.ipv4.tcp_fastopen" = 3;
|
||||||
# bufferbloat mitigations + improvement in throughput and latency
|
# bufferbloat mitigations + improvement in throughput and latency
|
||||||
"net.ipv4.tcp_conjestion_control" = "bbr";
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
"net.core.default_qdisc" = "cake";
|
"net.core.default_qdisc" = "cake";
|
||||||
};
|
};
|
||||||
kernelModules = [ "tcp_bbr" ];
|
kernelModules = [ "tcp_bbr" ];
|
||||||
|
|
@ -78,12 +79,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
} // (mkIf cfg.useDoas {
|
}
|
||||||
|
(mkIf cfg.useDoas {
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
security.doas.enable = true;
|
security.doas.enable = true;
|
||||||
security.doas.extraRules = [
|
security.doas.extraRules = [
|
||||||
{ users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; }
|
{ users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; }
|
||||||
];
|
];
|
||||||
environment.systemPackages = with pkgs; [ doas-sudo-shim ];
|
environment.systemPackages = with pkgs; [ doas-sudo-shim ];
|
||||||
});
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue