formatting + waybar icons
This commit is contained in:
parent
4994eb5bff
commit
46244360db
3 changed files with 53 additions and 49 deletions
|
@ -56,7 +56,7 @@ in {
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams=["pci_aspm.policy=performance"];
|
kernelParams = ["pci_aspm.policy=performance"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# configure keymap in x11
|
# configure keymap in x11
|
||||||
|
|
|
@ -111,6 +111,8 @@ in {
|
||||||
"(.*) — Mozilla Firefox" = "$1"; # the dash here is SLIGHTLY different. Wow
|
"(.*) — Mozilla Firefox" = "$1"; # the dash here is SLIGHTLY different. Wow
|
||||||
"(.*) - Visual Studio Code" = "$1";
|
"(.*) - Visual Studio Code" = "$1";
|
||||||
#"(.*\\.nix\\s.*)" = "";
|
#"(.*\\.nix\\s.*)" = "";
|
||||||
|
"(\\S+\\.html\\s.*)" = " $1";
|
||||||
|
"(\\S+\\.css\\s.*)" = " $1";
|
||||||
"(\\S+\\.js\\s.*)" = " $1";
|
"(\\S+\\.js\\s.*)" = " $1";
|
||||||
"(\\S+\\.ts\\s.*)" = " $1";
|
"(\\S+\\.ts\\s.*)" = " $1";
|
||||||
"(\\S+\\.go\\s.*)" = " $1";
|
"(\\S+\\.go\\s.*)" = " $1";
|
||||||
|
@ -121,9 +123,11 @@ in {
|
||||||
"(\\S+\\.jsonc?\\s.*)" = " $1";
|
"(\\S+\\.jsonc?\\s.*)" = " $1";
|
||||||
"(\\S+\\.md\\s.*)" = " $1";
|
"(\\S+\\.md\\s.*)" = " $1";
|
||||||
"(\\S+\\.txt\\s.*)" = " $1";
|
"(\\S+\\.txt\\s.*)" = " $1";
|
||||||
"(\\S+\\.cs\\s.*)" = " $1";
|
"(\\S+\\.cs\\s.*)" = " $1";
|
||||||
"(\\S+\\.c\\s.*)" = " $1";
|
"(\\S+\\.c\\s.*)" = " $1";
|
||||||
"(\\S+\\.cpp\\s.*)" = " $1";
|
"(\\S+\\.cpp\\s.*)" = " $1";
|
||||||
|
"(\\S+\\.zig\\s.*)" = " $1";
|
||||||
|
"(\\S+\\.rs\\s.*)" = " $1";
|
||||||
"(\\S+\\.hs\\s.*)" = " $1";
|
"(\\S+\\.hs\\s.*)" = " $1";
|
||||||
".*Discord | (.*) | .*" = "$1 - ArmCord";
|
".*Discord | (.*) | .*" = "$1 - ArmCord";
|
||||||
#"(.*) - ArmCord" = "$1";
|
#"(.*) - ArmCord" = "$1";
|
||||||
|
|
|
@ -15,56 +15,56 @@ in {
|
||||||
|
|
||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
# magic sysrq key, allows low-level commands through keyboard input
|
# magic sysrq key, allows low-level commands through keyboard input
|
||||||
"kernel.sysrq" = 0;
|
"kernel.sysrq" = 0;
|
||||||
|
|
||||||
## TCP hardening
|
## TCP hardening
|
||||||
# prevent bogus ICMP errors from filling up logs
|
# prevent bogus ICMP errors from filling up logs
|
||||||
"net.ipv4.icmp_ignore_bogus_error_responses" = 1;
|
"net.ipv4.icmp_ignore_bogus_error_responses" = 1;
|
||||||
# do not accept IP source packets (we are not a router)
|
# do not accept IP source packets (we are not a router)
|
||||||
"net.ipv4.conf.all.accept_source_route" = 0;
|
"net.ipv4.conf.all.accept_source_route" = 0;
|
||||||
"net.ipv6.conf.all.accept_source_route" = 0;
|
"net.ipv6.conf.all.accept_source_route" = 0;
|
||||||
# don't send ICMP redirects (again, we're not a router)
|
# don't send ICMP redirects (again, we're not a router)
|
||||||
"net.ipv4.conf.all.send_redirects" = 0;
|
"net.ipv4.conf.all.send_redirects" = 0;
|
||||||
"net.ipv4.conf.default.send_redirects" = 0;
|
"net.ipv4.conf.default.send_redirects" = 0;
|
||||||
# refuse ICMP redirects (MITM mitigations)
|
# refuse ICMP redirects (MITM mitigations)
|
||||||
"net.ipv4.conf.all.accept_redirects" = 0;
|
"net.ipv4.conf.all.accept_redirects" = 0;
|
||||||
"net.ipv4.conf.default.accept_redirects" = 0;
|
"net.ipv4.conf.default.accept_redirects" = 0;
|
||||||
"net.ipv4.conf.all.secure_redirects" = 0;
|
"net.ipv4.conf.all.secure_redirects" = 0;
|
||||||
"net.ipv4.conf.default.secure_redirects" = 0;
|
"net.ipv4.conf.default.secure_redirects" = 0;
|
||||||
"net.ipv6.conf.all.accept_redirects" = 0;
|
"net.ipv6.conf.all.accept_redirects" = 0;
|
||||||
"net.ipv6.conf.default.accept_redirects" = 0;
|
"net.ipv6.conf.default.accept_redirects" = 0;
|
||||||
# protects against SYN flood attacks
|
# protects against SYN flood attacks
|
||||||
"net.ipv4.tcp_syncookies" = 1;
|
"net.ipv4.tcp_syncookies" = 1;
|
||||||
# incomplete protection against TIME-WAIT assassination
|
# incomplete protection against TIME-WAIT assassination
|
||||||
"net.ipv4.tcp_rfc1337" = 1;
|
"net.ipv4.tcp_rfc1337" = 1;
|
||||||
|
|
||||||
## TCP optimization
|
## TCP optimization
|
||||||
# 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_conjestion_control" = "bbr";
|
||||||
"net.core.default_qdisc" = "cake";
|
"net.core.default_qdisc" = "cake";
|
||||||
};
|
|
||||||
kernelModules = [ "tcp_bbr" ];
|
|
||||||
};
|
};
|
||||||
|
kernelModules = [ "tcp_bbr" ];
|
||||||
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
# prevents replacing the kernel without a reboot
|
# prevents replacing the kernel without a reboot
|
||||||
protectKernelImage = true;
|
protectKernelImage = true;
|
||||||
# rtkit allows unprivileged processes to use realtime scheduling
|
# rtkit allows unprivileged processes to use realtime scheduling
|
||||||
# polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot)
|
# polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot)
|
||||||
rtkit.enable = true;
|
rtkit.enable = true;
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# personal computer? no firewall ty :3
|
# personal computer? no firewall ty :3
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
} // (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