From e20bc8c0428edd3701ce9c8c2a0f96f4d4160bc2 Mon Sep 17 00:00:00 2001 From: Dmitrii Gudov Date: Wed, 18 Feb 2026 10:03:29 +0300 Subject: [PATCH] some upd --- home-manager/modules/zsh/zsh.nix | 15 +++++++++++++++ nixos/custom.nix | 1 + nixos/modules/networking.nix | 2 +- nixos/modules/programs.nix | 6 ++++++ nixos/modules/virtualbox.nix | 12 ++++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/virtualbox.nix diff --git a/home-manager/modules/zsh/zsh.nix b/home-manager/modules/zsh/zsh.nix index 0eb93b1..80e9181 100644 --- a/home-manager/modules/zsh/zsh.nix +++ b/home-manager/modules/zsh/zsh.nix @@ -119,6 +119,9 @@ s = '' (){ local val=''${1:-true} vault=''${2:-default}; local file="$HOME/stats/''${vault}.tsv"; mkdir -p "''${file:h}"; printf "%s\t%s\n" "$(date "+%Y-%m-%d %H:%M:%S")" "$val" >> "$file"; }''; + + startvm = + "VBoxManage startvm --type=headless src; socat -,cfmakeraw,echo=0,escape=15 TCP4:localhost:2026"; }; initContent = '' @@ -170,8 +173,20 @@ add-zsh-hook chpwd _ls_after_cd fi + # mini-neofetch + printf "--- Hi, %s! ---\n" "$USER" + printf "Battery: %s%%\n" "$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "N/A")" + printf "Time you live: %s years :)\n" "$(python3 -c "from datetime import datetime; age_years = (datetime.now() - datetime(2006, 6, 16)).total_seconds() / (365.25 * 24 * 3600); print(f'{age_years:.10f}')")" + + + printf "--\n" + printf "Task to do: \n" + todo sort && todo; + + alias дт='f() { todo add "$*"; todo; unset -f f; }; f' ''; + }; } diff --git a/nixos/custom.nix b/nixos/custom.nix index 7d8b50c..ce1af19 100644 --- a/nixos/custom.nix +++ b/nixos/custom.nix @@ -15,6 +15,7 @@ ./modules/wm.nix ./modules/unsorted.nix ./modules/thunar.nix # ! edit for nemo + ./modules/virtualbox.nix ]; } diff --git a/nixos/modules/networking.nix b/nixos/modules/networking.nix index 2d7be10..c2e86c7 100644 --- a/nixos/modules/networking.nix +++ b/nixos/modules/networking.nix @@ -6,5 +6,5 @@ networking.networkmanager.enable = true; networking.nameservers = [ "8.8.8.8" "1.1.1.1" ]; networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ]; - networking.firewall.enable = mkDefault false; # ! 🤡 + networking.firewall.enable = lib.mkDefault false; # ! 🤡 } diff --git a/nixos/modules/programs.nix b/nixos/modules/programs.nix index 578f835..6aa9d09 100644 --- a/nixos/modules/programs.nix +++ b/nixos/modules/programs.nix @@ -13,6 +13,12 @@ toybox ]; + virtualisation.podman = { + enable = true; + defaultNetwork.settings.dns_enabled = true; + }; + programs.zsh.shellAliases = { docker = "podman"; }; + programs.ssh.startAgent = true; services.gnome.gcr-ssh-agent.enable = lib.mkForce false; diff --git a/nixos/modules/virtualbox.nix b/nixos/modules/virtualbox.nix new file mode 100644 index 0000000..d5c7d0c --- /dev/null +++ b/nixos/modules/virtualbox.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + virtualisation.virtualbox.host.enable = true; + users.extraGroups.vboxusers.members = [ "krosh" ]; + virtualisation.virtualbox.host.enableExtensionPack = true; + virtualisation.virtualbox.guest.enable = true; + virtualisation.virtualbox.guest.dragAndDrop = true; + + environment.systemPackages = with pkgs; [ socat ]; + +}