complete refactor of packages and options

This commit is contained in:
stitchy 2024-03-27 03:47:54 +00:00
parent 16fb30026c
commit a2f3b33514
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8
12 changed files with 328 additions and 297 deletions

View file

@ -1,9 +1,55 @@
{config, pkg, home-manager, ...}:
{ config, lib, pkgs, ... }:
let
# This is a placeholder
in
{
options = {};
imports = [ ../packages/default.nix ];
config = {
hardware = {
bluetooth.enable = lib.mkDefault false;
steam-hardware.enable = lib.mkDefault false;
};
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
loader = {
efi.canTouchEfiVariables = lib.mkDefault true;
systemd-boot.enable = lib.mkDefault true;
};
};
security.sudo.wheelNeedsPassword = false;
security.rtkit.enable = true;
services.xserver.displayManager.lightdm.enable = false;
# Wireguard stuff, to-do make better
networking.firewall = {
enable = true;
# if packets are still dropped, they will show up in dmesg
logReversePathDrops = true;
# wireguard trips rpfilter up
extraCommands = ''
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 47111 -j RETURN
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 47111 -j RETURN
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
'';
extraStopCommands = ''
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 47111 -j RETURN || true
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 47111 -j RETURN || true
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
'';
# Open ports in the firewall.
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 22000 ];
};
environment.etc.hosts.mode = "0644";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
};
}