diff options
Diffstat (limited to 'ginaz')
-rw-r--r-- | ginaz/README | 70 | ||||
-rw-r--r-- | ginaz/configuration.nix | 309 | ||||
-rw-r--r-- | ginaz/flake.lock | 48 | ||||
-rw-r--r-- | ginaz/flake.nix | 23 | ||||
-rw-r--r-- | ginaz/hardware-configuration.nix | 50 | ||||
-rw-r--r-- | ginaz/home.nix | 290 |
6 files changed, 0 insertions, 790 deletions
diff --git a/ginaz/README b/ginaz/README deleted file mode 100644 index 4384a3b..0000000 --- a/ginaz/README +++ /dev/null @@ -1,70 +0,0 @@ -# boot NixOS installer -# connect wireless -# start terminal -passwd -sudo passwd -sudo systemctl restart sshd -# connect remotely via SSH to IP from: ip a s - -DISK=/dev/disk/by-id/nvme-SAMSUNG_MZVL21T0HCLR-00BL2_S64NNX0T233166 -cat /dev/urandom > ${DISK} -wipefs ${DISK}; sgdisk -z ${DISK}; sgdisk -og ${DISK} -sgdisk --new 1::+1G --typecode=1:EF00 --change-name=1:'boot' ${DISK} -sgdisk --new 2::+32G --typecode=2:8200 --change-name=2:'swap' ${DISK} -sgdisk --new 3::-0 --typecode=3:BF00 --change-name=3:'rpool' ${DISK} -partprobe -udevadm settle -fdisk -l ${DISK} -mkfs.fat -F32 -nboot ${DISK}-part1 -mkswap -L swap ${DISK}-part2 -swapon /dev/disk/by-label/swap -zpool create -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=on -O dnodesize=auto -O normalization=formD -O encryption=on -O keyformat=passphrase -O keylocation=prompt -O relatime=on -O xattr=sa -O mountpoint=none -O canmount=off -f rpool ${DISK}-part3 -zfs create -p -o mountpoint=legacy rpool/local/root -zfs snapshot rpool/local/root@blank -mount -t zfs rpool/local/root /mnt -mkdir /mnt/boot -mount /dev/disk/by-label/boot /mnt/boot -zfs create -p -o mountpoint=legacy rpool/local/nix -mkdir /mnt/nix -mount -t zfs rpool/local/nix /mnt/nix -zfs create -p -o mountpoint=legacy rpool/user/home/root -mkdir /mnt/root -mount -t zfs rpool/user/home/root /mnt/root -zfs create -p -o mountpoint=legacy rpool/user/home/nipsy -mkdir -p /mnt/home/nipsy -mount -t zfs rpool/user/home/nipsy /mnt/home/nipsy - -nixos-generate-config --root /mnt - -cat <configuration.nix >/mnt/etc/nixos/configuration.nix -cat <hardware-configuration.nix >/mnt/etc/nixos/hardware-configuration.nix - -# unstable might be directly installable by first doing: -# see https://github.com/NixOS/nixpkgs/issues/35362 -#nix-channel --add https://nixos.org/channels/nixos-unstable nixos -#nix-channel --update - -#nixos-install --root /mnt -nixos-install - -cd / -umount -Rl /mnt -zpool export -a -reboot - -# upgrade to unstable -nix-channel --add https://nixos.org/channels/nixos-unstable nixos -nixos-rebuild switch --upgrade - -# later upgrades after flakes are enabled -cd /etc/nixos && nix flake update && cd && nixos-rebuild switch --upgrade && echo && nixos-rebuild list-generations | cat && echo && nix store diff-closures $(find /nix/var/nix/profiles -iname system-\* -type l | sort | tail -2 | xargs) - -# clean up all but the two most recent systems -nixos-rebuild list-generations | cat -rm $(ls /nix/var/nix/profiles/system-*-link -1dtr | head -n -2) -nixos-rebuild list-generations | cat -nix-store --gc -nixos-rebuild boot - -# deduplicate the store -nix store optimise diff --git a/ginaz/configuration.nix b/ginaz/configuration.nix deleted file mode 100644 index 9310c2b..0000000 --- a/ginaz/configuration.nix +++ /dev/null @@ -1,309 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - boot.initrd.kernelModules = [ "amdgpu" "zfs" ]; - boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.generationsDir.copyKernels = true; - boot.loader.systemd-boot.enable = true; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.devNodes = "/dev/disk/by-label"; - - documentation.dev.enable = true; - documentation.man.enable = true; - - environment.shells = with pkgs; [ zsh ]; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - bc - bespokesynth - bintools - cardinal - cargo - conntrack-tools - curl - dmenu - dict - dig - dmidecode - easyeffects - encfs - enscript - evince - feh - ffmpeg - file - flac - fldigi - fluidsynth - foot - fortune - fping - gcr - geeqie - geonkick - #gimp-with-plugins - gimp - git - go - godot_4 - google-authenticator - google-chrome - gv - helm - i3 - i3status - imagemagick - inkscape - inxi - iotop - ipcalc - iperf - jq - lame - libreoffice - libva-utils - lilypond-unstable-with-fonts - lshw - lsof - mame - mariadb - mednafen - mednaffe - mesa-demos - mkvtoolnix - mpv - mutt - netcat-openbsd - nix-index - nmap - ntfs3g - oath-toolkit - openldap - openssl - (pass.withExtensions (ext: with ext; [pass-otp])) - pass - patchelf - pavucontrol - pciutils - picom - polkit_gnome - polyphone - poppler_utils - powertop - psmisc - pv - pwgen - qemu_kvm - qpwgraph - qrencode - qsynth - radeontop - rdesktop - read-edid - reaper - recode - rosegarden - rustc - samplv1 - sfizz - sg3_utils - signal-desktop - speedtest-cli - sqlite - sshfs - st - stoken - surge - #surge-XT - sxiv - synthv1 - sysstat - tcpdump - tigervnc - traceroute - tree - tshark - turbovnc - unrar - unzip - usbutils - vapoursynth - vdpauinfo - vim - vlc - vmpk - vocproc - vulkan-tools - wavpack - wget - whois - winetricks - wineWowPackages.stagingFull - wireguard-tools - x11vnc - x265 - xclip - xdotool - xorg.xdpyinfo - xscreensaver - xsnow - yabridge - yabridgectl - yoshimi - zig - zip - zynaddsubfx - ]; - - i18n.defaultLocale = "en_US.UTF-8"; - - networking.hostId = "8425e349"; - networking.hostName = "ginaz"; - networking.networkmanager.enable = true; - networking.nftables.enable = true; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config.allowUnfree = true; - - programs.atop.enable = true; - programs.firefox.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - programs.iftop.enable = true; - programs.mtr.enable = true; - programs.nm-applet.enable = true; - programs.steam.enable = true; - programs.tmux.enable = true; - programs.zsh.enable = true; - - security.pam.services = { - chfn.googleAuthenticator.enable = true; - chsh.googleAuthenticator.enable = true; - cups.googleAuthenticator.enable = true; - lightdm.googleAuthenticator.enable = true; - login.googleAuthenticator.enable = true; - other.googleAuthenticator.enable = true; - sshd.googleAuthenticator.enable = true; - su.googleAuthenticator.enable = true; - sudo.googleAuthenticator.enable = true; - vlock.googleAuthenticator.enable = true; - xlock.googleAuthenticator.enable = true; - xscreensaver.googleAuthenticator.enable = true; - }; - security.polkit = { - enable = true; - extraConfig = '' - polkit.addRule(function(action, subject) { - if ( - subject.isInGroup("users") - && ( - action.id == "org.freedesktop.login1.reboot" || - action.id == "org.freedesktop.login1.reboot-multiple-sessions" || - action.id == "org.freedesktop.login1.power-off" || - action.id == "org.freedesktop.login1.power-off-multiple-sessions" - ) - ) - { - return polkit.Result.YES; - } - }) - ''; - }; - security.rtkit.enable = true; - - services.blueman.enable = true; - services.openssh = { - enable = true; - openFirewall = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - settings.PermitRootLogin = "yes"; - }; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - services.printing.enable = true; - services.udev.extraRules = '' - SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="2500",MODE:="0666" - SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3000",MODE:="0666" - SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3010",MODE:="0666" - SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3020",MODE:="0666" - SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3030",MODE:="0666" - ''; - services.xserver = { - displayManager.defaultSession = "xsession"; - displayManager.lightdm = { - enable = true; - extraSeatDefaults = ''greeter-hide-users=true''; - }; - displayManager.session = [ - { - manage = "desktop"; - name = "xsession"; - start = ''exec $HOME/.xsession''; - } - ]; - enable = true; - libinput.enable = true; - videoDrivers = [ "amdgpu" ]; - xkb.layout = "us"; - xkb.options = "caps:super,compose:ralt"; - }; - services.zfs.autoScrub.enable = true; - services.zfs.trim.enable = true; - - system.stateVersion = "23.11"; - - systemd = { - user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - wants = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - }; - - time.timeZone = "America/Los_Angeles"; - - users.groups.nipsy.gid = 1000; - users.users.nipsy = { - isNormalUser = true; - group = "nipsy"; - home = "/home/nipsy"; - description = "Mark Nipper"; - extraGroups = [ "wheel" "networkmanager" ]; - #packages = with pkgs; [ - # firefox - # tree - #]; - shell = pkgs.zsh; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIbKppxX6GF88fAfXJZR4ZcPzwopi7TAy+v/dmWso+7f nipsy@arrakis.bitgnome.net" ]; - }; - - users.users.root = { - shell = pkgs.zsh; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIbKppxX6GF88fAfXJZR4ZcPzwopi7TAy+v/dmWso+7f nipsy@arrakis.bitgnome.net" ]; - }; -} diff --git a/ginaz/flake.lock b/ginaz/flake.lock deleted file mode 100644 index 021cb88..0000000 --- a/ginaz/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1710401383, - "narHash": "sha256-jskq7uDpKXrRoY4hDpNqykmSSKHUXYlo7ZFc/se7fus=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "1ab3cec3a1bbb065b2d52b913d1431366028d5b5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/ginaz/flake.nix b/ginaz/flake.nix deleted file mode 100644 index b60a38a..0000000 --- a/ginaz/flake.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - description = "nipsy's NixOS configuration"; - - inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ nixpkgs, home-manager, ... }: { - nixosConfigurations.ginaz = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - #home-manager.useUserPackages = true; - home-manager.users.nipsy = import ./home.nix; - } - ]; - }; - }; -} diff --git a/ginaz/hardware-configuration.nix b/ginaz/hardware-configuration.nix deleted file mode 100644 index 140a799..0000000 --- a/ginaz/hardware-configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "rpool/local/root"; - fsType = "zfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - }; - - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; - - fileSystems."/root" = - { device = "rpool/user/home/root"; - fsType = "zfs"; - }; - - fileSystems."/home/nipsy" = - { device = "rpool/user/home/nipsy"; - fsType = "zfs"; - }; - - swapDevices = - [ { device = "/dev/disk/by-label/swap"; } - ]; - - hardware.bluetooth.enable = true; - #hardware.bluetooth.powerOnBoot = true; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/ginaz/home.nix b/ginaz/home.nix deleted file mode 100644 index c2f84f7..0000000 --- a/ginaz/home.nix +++ /dev/null @@ -1,290 +0,0 @@ -{ config, pkgs, ... }: - -{ - gtk = { - enable = true; - gtk3.extraConfig.gtk-application-prefer-dark-theme = true; - gtk4.extraConfig.gtk-application-prefer-dark-theme = true; - }; - - home.username = "nipsy"; - home.homeDirectory = "/home/nipsy"; - home.stateVersion = "23.11"; - - programs.git = { - enable = true; - userName = "Mark Nipper"; - userEmail = "nipsy@bitgnome.net"; - extraConfig.pull.rebase = true; - }; - - programs.home-manager.enable = true; - - programs.tmux = { - enable = true; - extraConfig = '' - #set-option -ga terminal-overrides ",st-256color:Tc" - set -as terminal-features ",foot*:RGB" - set -as terminal-features ",st-256color:RGB" - set -ga monitor-bell on - set -g history-limit 100000 - set -g bell-action any - #set -g bell-on-alert on - - set -s escape-time 0 - - setw -g aggressive-resize on - setw -g wrap-search off - - bind-key a send-prefix - bind-key k kill-session - bind-key H pipe-pane -o 'cat >> ~/.tmux.log.#h-#S-#I-#P' - - #bind-key m \ - # set -g mouse on \;\ - # display 'Mouse: ON' - #bind M \ - # set -g mouse off \;\ - # display 'Mouse: OFF' - - # vim-like copypaste mode - set-window-option -g mode-keys vi - bind-key -T copy-mode-vi v send -X begin-selection - bind-key -T copy-mode-vi y send -X copy-pipe "xclip -selection clipboard" - bind-key -T copy-mode-vi C-v send -X rectangle-toggle - bind-key P run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" - - # don't exit copy mode after selection - #set -s mouse on - #bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x - ''; - }; - - programs.vim = { - enable = true; - extraConfig = '' - " Handling of big files - William Natter, Tony Mechelynck and others - " fairly certain that BufSizeThreshold is in bytes - let g:SaveUndoLevels = &undolevels - let g:BufSizeThreshold = 5242880 - if has("autocmd") - au VimEnter * let g:SaveUndoLevels = &undolevels - au BufReadPre * if getfsize(expand("%")) >= g:BufSizeThreshold | setlocal noswapfile | endif - au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | let &undolevels=g:SaveUndoLevels | else | setlocal undolevels=-1 | endif - au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | syntax on | else | syntax off | endif - endif - - set mouse& - set noautoindent " always set autoindenting off - - " enable better 24-bit color support - "let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" - "let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" - set termguicolors - - " If using a dark background within the editing area and syntax highlighting - " turn on this option as well - set background=dark - - if has("autocmd") - " Enabled file type detection - " Use the default filetype settings. If you also want to load indent files - " to automatically do language-dependent indenting add 'indent' as well. - filetype plugin on - "filetype indent on - endif " has ("autocmd") - - " The following are commented out as they cause vim to behave a lot - " different from regular vi. They are highly recommended though. - set showcmd " Show (partial) command in status line. - set showmatch " Show matching brackets. - set ignorecase " Do case insensitive matching - set incsearch " Incremental search - "set expandtab " replace tabs with spaces - set smarttab " use shiftwidth instead of tabstop at start of line - set spell spelllang=en_us " turn on the spell check - - set laststatus=2 - set statusline=%<%f%h%m%r%=%{&ff}\ %Y\ %b\ 0x%B\ \ %l,%c%V\ %P - - map <F5> :w<CR><bar>:!clear;go run %<CR> - map <F6> :w<CR><bar>:%! gofmt<CR> - ''; - }; - - programs.zsh = { - enable = true; - initExtra = '' -umask 022 - -#export GOROOT="''${HOME}/.local/go" -#export GOPATH="''${HOME}/go" - -#export PATH="$HOME/bin:$GOROOT/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/games:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin" -#export PATH="$HOME/bin:$GOROOT/bin:/usr/bin:/usr/sbin:/usr/games:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin" -#export PATH=~/bin::~/.local/rust/cargo/bin:/usr/bin:/usr/sbin:/usr/games:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin -export PATH=~/bin:''${PATH} - -#export PS1="%B%n%b@%U%m%u/%l:%~> " -export PAGER=less -export EDITOR=vim -export BROWSER=firefox - -export LC_COLLATE="C" -eval $(dircolors) -export QUOTING_STYLE="literal" - -export IRCNICK="nipsy" -export IRCNAME="Mark Nipper" - -export NNTPSERVER="news.giganews.com" - -#export HISTFILE="$HOME/.zsh_hist" -export HISTSIZE=100000 -export SAVEHIST=''${HISTSIZE} - -#export COLORTERM=truecolor -export COLORFGBG="green;blue" - -# fix stupid broken Java shit -export _JAVA_AWT_WM_NONREPARENTING=1 - -# enable pass extensions -export PASSWORD_STORE_ENABLE_EXTENSIONS=true - -# set SWAYSOCK correctly -if pgrep -U nipsy -x sway >/dev/null; then - export SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock -fi - -# start sway by default if logging into tty1 -if [[ -z "''${DISPLAY}" ]] && [[ $(tty) == "/dev/tty1" ]]; then - - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - - # set some Wayland specific variables - export MOZ_ENABLE_WAYLAND=1 - export GDK_BACKEND=wayland - export QT_QPA_PLATFORM=wayland - export SDL_VIDEODRIVER=wayland - export XDG_SESSION_TYPE=wayland - - exec sway > ~/.sway.log - -fi - -# if already in Wayland, update the GPG TTY so ssh-askpass will work correctly -if [[ -n "''${WAYLAND_DISPLAY}" ]]; then - gpg-connect-agent updatestartuptty /bye >/dev/null -fi - -# completion options -setopt LIST_PACKED MENU_COMPLETE -# expansion and globbing options -setopt NO_NOMATCH -# history options -setopt SHARE_HISTORY EXTENDED_HISTORY HIST_FCNTL_LOCK HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_SAVE_NO_DUPS -# input/output options -setopt PRINT_EXIT_VALUE RM_STAR_SILENT -# job control options -setopt LONG_LIST_JOBS NO_HUP -# zle options -setopt NO_BEEP - -lsopt='--color=auto' -alias ll="ls -alFh $lsopt" -alias la="ls -aF $lsopt" -alias cal="ncal -b" -#alias grep='grep --color=always' # cannot do this as it breaks shell pipelines -alias talk='gnutalk --curses' -alias manage="tmux new-window ssh root@darkstar\; split-window -d ssh root@king\; new-window ssh root@black-sheep\; split-window -d ssh root@treebeard\; new-window ssh root@casey\; split-window -d ssh root@homer\; new-window ssh root@lilnasx\; split-window -d ssh root@trent" -alias manage-mac="tmux new-session \; source ~/.tmux/manage-mac" -alias win7="xfreerdp -x l -g 1680x1050 -u nipsy -d la-its841279wd kaitain" -alias win7-la="xfreerdp -x l -g 1680x1050 -u la-mrn447 -d austin kaitain" -#alias kubectl="~/k3s/k3s kubectl" -#alias helm="~/k3s/linux-amd64/helm" -alias lock="xscreensaver-command -lock" -alias fixkeyboard="setxkbmap -layout us -option caps:super -option compose:ralt" -alias zigup="zigup --install-dir ~/.local/zig --path-link ~/bin/zig" - -#autoload -U compinit -#compinit -zstyle ':completion:*' menu select=5 - -bindkey -v -export KEYTIMEOUT=1 - -autoload -U edit-command-line -zle -N edit-command-line -bindkey -M vicmd v edit-command-line - -# nix -#if [ -e /home/nipsy/.nix-profile/etc/profile.d/nix.sh ]; then . /home/nipsy/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer - -# The next line updates PATH for the Google Cloud SDK. -#source /home/nipsy/google-cloud-sdk/path.zsh.inc - -# The next line enables bash completion for gcloud. -#source /home/nipsy/google-cloud-sdk/completion.zsh.inc - -# always open tmux if interactive -[[ $- != *i* ]] && return -#[[ -z "$TMUX" ]] && (tmux -2 new-session -t default \; new-window || tmux -2 new-session -s default) -[[ -z "$TMUX" ]] && (tmux -2 attach -t default || tmux -2 new-session -s default) - -# prompt/theme shit -function precmd { - - local RC=''${?} - #local RC=''${(%)RC-%?} - - print -nP '\n' - - # current user - if [[ ''${EUID} -eq 0 ]]; then - print -nP '%{%S%F{red}%}%n%{%f%s%}' - else - print -nP '%{%F{magenta}%}%n%{%f%}' - fi - - print -nP '@' - - # current host - if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then - print -nP '%{%F{yellow}%}%m%{%f%}' - else - print -nP '%{%F{green}%}%m%{%f%}' - fi - - # connected terminal - print -nP '/%{%U%}%l%{%u%} ' - - # cwd - print -nP '%{%F{cyan}%}%~%{%f%} ' - - # job count - JOBCOUNT='%j' - if [[ ''${(%)JOBCOUNT} -gt 0 ]]; then - print -nP 'j=%{%F{yellow}%}%j%{%f%} ' - fi - - # previous return code - if [[ ''${RC} -ne 0 ]]; then - print -nP 'rc=%{%F{red}%}' - echo -n "''${RC}" - print -nP '%{%f%} ' - else - print -nP 'rc=%{%F{green}%}' - echo -n "''${RC}" - print -nP '%{%f%} ' - fi - - # time stamp - print -P '%{%F{cyan}%}%D{%FT%T%z}%{%f%}' - -} - -PS1='%# ' - ''; - }; -} |