diff --git a/home-manager/home.nix b/home-manager/home.nix index 8e578d9..28a258d 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -47,6 +47,7 @@ }; }; + home = { username = "traverseda"; homeDirectory = "/home/traverseda"; @@ -102,10 +103,64 @@ ''; }; - home.packages = with pkgs; [ + 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; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 7e0bf95..c8a0e5b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -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; }; diff --git a/nixos/zerotier.nix b/nixos/zerotier.nix index 8320657..295089e 100644 --- a/nixos/zerotier.nix +++ b/nixos/zerotier.nix @@ -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";