dotfiles/configuration.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2024-01-21 01:53:24 +00:00
{ config, pkgs, lib, ... }:
2023-08-06 01:48:10 +00:00
{
imports =
2024-01-21 01:53:24 +00:00
[
2023-08-06 04:03:24 +00:00
./packages/default.nix
2023-08-06 01:48:10 +00:00
];
# Use the systemd-boot EFI boot loader.
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.loader.systemd-boot.enable = true;
2024-01-24 04:02:43 +00:00
boot.loader.efi.canTouchEfiVariables = true;
2024-01-21 01:53:24 +00:00
2023-08-06 01:48:10 +00:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2024-01-21 01:53:24 +00:00
security.sudo.wheelNeedsPassword=false;
2023-08-06 01:48:10 +00:00
security.rtkit.enable = true;
programs.zsh.enable = true;
2024-03-14 01:46:44 +00:00
# Virtualization because I need mah vr back
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
2023-08-06 01:48:10 +00:00
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
configure = {
2024-02-02 03:48:41 +00:00
customRC = builtins.readFile ./config/nvim/init.vim;
2023-08-06 01:48:10 +00: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-14 01:46:44 +00:00
typst-vim
2023-08-06 01:48:10 +00:00
];
};
};
};
2024-01-21 01:53:24 +00:00
boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1;
2023-08-06 01:48:10 +00:00
users.mutableUsers = false;
2024-01-24 04:02:43 +00:00
users.users = {
2024-02-02 04:25:35 +00:00
root.initialHashedPassword = "!";
2023-08-06 01:48:10 +00:00
};
2024-01-21 01:53:24 +00: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-06 01:48:10 +00:00
}