Update zerotier, default packages

This commit is contained in:
Alex Davies 2024-05-18 21:20:55 -03:00
parent b77b6cfaf4
commit 8453721cab
3 changed files with 71 additions and 10 deletions

View File

@ -47,6 +47,7 @@
};
};
home = {
username = "traverseda";
homeDirectory = "/home/traverseda";
@ -103,9 +104,63 @@
};
home.packages = with pkgs; [
pkgs.htop
pkgs.zsh
pkgs.xclip
pkgs.ripgrep
pkgs.mosh
pkgs.waypipe
pkgs.pwgen
pkgs.chezmoi
pkgs.neovim-remote
pkgs.pipx
pkgs.rclone
pkgs.pyright
pkgs.mosh
pkgs.jq
pkgs.copier
pkgs.pv
pkgs.poetry
pkgs.nmap
pkgs.dig
pkgs.tree
pkgs.curl
pkgs.wget
pkgs.wl-clipboard
(pkgs.writeShellScriptBin "nvr-edit" ''
nvr --remote-wait $@
'')
(pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'')
];
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history.size = 10000;
history.path = "${config.xdg.dataHome}/zsh/history";
oh-my-zsh = {
enable = true;
plugins = [ "git" "docker" "docker-compose"];
theme = "robbyrussell";
};
initExtra = ''
if [[ -n ''${NVIM+x} ]]; then
alias vim="nvr --remote"
export EDITOR=nvr-edit
fi
'';
};
# Enable home-manager and git
programs.home-manager.enable = true;

View File

@ -46,6 +46,8 @@
networking.hostName = hostname; # Define your hostname.
networking.networkmanager.enable = true;
nix.optimise.automatic = true;
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation.cores = 4;
@ -114,6 +116,7 @@
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
backupFileExtension = ".bak";
users = {
traverseda = import ../home-manager/home.nix;
};

View File

@ -6,15 +6,18 @@ in {
networking.firewall.trustedInterfaces = privateZeroTierInterfaces; # TRUST VPN ONLY
services.avahi.enable = true;
services.avahi.allowInterfaces = privateZeroTierInterfaces; # ONLY BROADCAST ON VPN
services.avahi.ipv6 = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.avahi.publish.addresses = true;
services.avahi.publish.domain = true;
services.avahi.nssmdns4 = true;
services.avahi.publish.workstation = true; # ADDED TO DESKTOP MACHINES
services.avahi = {
enable = true;
allowInterfaces = privateZeroTierInterfaces; # ONLY BROADCAST ON VPN
ipv6 = true;
publish.enable = true;
publish.userServices = true;
publish.addresses = true;
publish.domain = true;
nssmdns4 = true;
publish.workstation = true; # ADDED TO DESKTOP MACHINES
cacheEntriesMax = 512;
};
systemd.services.createDevicemap = {
description = "Create ZeroTier devicemap file";