dotfiles/configuration.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2024-01-20 17:53:24 -08:00
{ config, pkgs, lib, ... }:
2023-08-05 18:48:10 -07:00
{
imports =
2024-01-20 17:53:24 -08:00
[
2023-08-05 21:03:24 -07:00
./packages/default.nix
2023-08-05 18:48:10 -07:00
];
# Use the systemd-boot EFI boot loader.
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.loader.systemd-boot.enable = true;
2024-01-23 20:02:43 -08:00
boot.loader.efi.canTouchEfiVariables = true;
2024-01-20 17:53:24 -08:00
2023-08-05 18:48:10 -07:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2024-01-20 17:53:24 -08:00
security.sudo.wheelNeedsPassword=false;
2023-08-05 18:48:10 -07:00
security.rtkit.enable = true;
programs.zsh.enable = true;
2024-03-13 18:46:44 -07:00
# Virtualization because I need mah vr back
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
2023-08-05 18:48:10 -07:00
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
configure = {
2024-02-01 19:48:41 -08:00
customRC = builtins.readFile ./config/nvim/init.vim;
2023-08-05 18:48:10 -07:00
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
cmp_luasnip
tokyonight-nvim
vim-lsp-cxx-highlight
2024-03-13 18:46:44 -07:00
typst-vim
2023-08-05 18:48:10 -07:00
];
};
};
};
2024-01-20 17:53:24 -08:00
boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1;
2023-08-05 18:48:10 -07:00
users.mutableUsers = false;
2024-01-23 20:02:43 -08:00
users.users = {
2024-02-01 20:25:35 -08:00
root.initialHashedPassword = "!";
2023-08-05 18:48:10 -07:00
};
2024-01-20 17:53:24 -08:00
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
'';
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
'';
# Open ports in the firewall.
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 22000 ];
};
2023-08-05 18:48:10 -07:00
}