Skip to content

Latest commit

 

History

History
277 lines (235 loc) · 8.37 KB

dev-setup-arch.org

File metadata and controls

277 lines (235 loc) · 8.37 KB

dev-setup.org

first pass

  1. download arch linux parallels image
  2. update package info pacman -Sy
  3. pacman -S sudo openssh tmux
  4. sudo localectl set-locale LANG=en_US.UTF-8
  5. systemctl enable sshd && systemctl start sshd
  6. add johnny user
    useradd -m -G wheel johnny
        
  7. visudo johnny ALL=(ALL:ALL) ALL
  8. copy ssh public key
    (mkdir (format "%s:~/.ssh" ssh-host) t)
    (copy-file (format "%s" ssh-public-key) (format "%s:/home/johnny/.ssh/authorized_keys" scp-host) t)
        
  9. copy emacs config
    (mkdir (format "%s:~/.config/emacs" ssh-host) t)
    (copy-file (format "%s/early-init.el" emacs-config-path) (format "%s:/home/johnny/.config/emacs/" scp-host) t)
    (copy-file (format "%s/init.el" emacs-config-path) (format "%s:/home/johnny/.config/emacs/" scp-host) t)
    (copy-file (format "%s/config.org" emacs-config-path) (format "%s:/home/johnny/.config/emacs/" scp-host) t)
        
  10. set timezone
    sudo pacman -Sy
    sudo pacman -S xorg-server xorg-xinit lightdm lightdm-gtk-greeter wget accountsservice firefox which ripgrep unzip gnome-keyring aspell aspell-en openntpd inotify-tools openbox xterm --noconfirm
        
  11. start openntpd
    sudo systemctl start openntpd && sudo systemctl enable openntpd
        
  12. usermod -aG docker johnny
    sudo usermod -aG docker johnny
        
  13. lightdm config
    [LightDM]
    run-directory=/run/lightdm
    [Seat:*]
    greeter-session=lightdm-gtk-greeter
    session-wrapper=/etc/lightdm/Xsession
        
  14. install guix
    cd /tmp &&
    wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
    sudo chmod +x guix-install.sh
        

guix pull

  1. install guix
    sudo /tmp/guix-install.sh
        

after guix

  1. copy ~/.bashrc
    #
    # ~/.bashrc
    #
    
    GUIX_PROFILE="/home/johnny/.guix-profile"
    . "$GUIX_PROFILE/etc/profile"
    GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
    ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_file_bytes 1024000"
    ELIXIR_EDITOR="emacs +__LINE__ __FILE__"
    ECTO_EDITOR=$ELIXIR_EDITOR
    PLUG_EDITOR=$ELIXIR_EDITOR
    
    eval "$(direnv hook bash)"
    
    # this is needed when emacs --daemon is running so nyxt will operate correct and get org.gnome.system.proxy settings.
    # export XDG_DATA_DIRS=$XDG_DATA_DIRS:/home/johnny/.config/guix/current/share:/usr/local/share/:/usr/share/
    
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    
    alias ls='ls --color=auto'
    PS1='[\u@\h \W]\$ '
        
  2. guix install nss-certs glibc-locales
    guix install glibc-locales nss-certs
    export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
    guix pull
    GUIX_PROFILE="/home/johnny/.config/guix/current"
    . "$GUIX_PROFILE/etc/profile"
    guix upgrade
        
  3. install emacs git and nss-certs guix pull && guix install emacs-next git emacs-vterm elixir sometimes this can fail so might need to run this twice.
    guix install emacs-next git emacs-vterm direnv
        
  4. Copy nyxt init.lisp
    (define-configuration buffer
        ((default-modes (append '(emacs-mode) %slot-default%))
         (override-map (let ((map (make-keymap "override-map")))
                       (define-key map
                           "S-w" 'delete-current-buffer
                           "S-t" 'make-buffer-focus
                           "S-f" 'nyxt/web-mode:search-buffer
                           "S-r" 'reload-current-buffer)))))
    (define-configuration browser
      ((session-restore-prompt :always-restore)))
        
  5. add emacs.service file
    [Unit]
    Description=Emacs text editor
    Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
    
    [Service]
    Type=forking
    ExecStart=/home/johnny/.config/emacs.sh
    # ExecStop=emacsclient --eval "(save-buffers-kill-emacs)"
    Environment=SSH_AUTH_SOCK=%t/keyring/ssh
    EnvironmentFile=/home/johnny/.config/guix/current/etc/profile
    Restart=on-failure
    
    [Install]
    WantedBy=default.target
        
  6. add home/johnny.config/emacs.sh
    # #!/bin/bash
    
    source ~/.bashrc
    
    # emacs --daemon
    emacs
        
  7. start and enable emacs.service
    # systemctl enable --user emacs && systemctl start --user emacs
        
  8. ln -s ~/.bashrc ~/.xprofile
    ln -s ~/.bashrc ~/.xprofile
        
  9. .xinirc
    xhost +SI:localuser:$USER
    exec emacs
        
  10. printf “[Desktop Entry]\nName=EXWM\nComment=Emacs Window Manager\nExec=emacs\nType=Application” >> /usr/share/xsessions/emacs.desktop
    [Desktop Entry]
    Name=EXWM
    Comment=Emacs Window Manager
    Exec=emacs
    # Exec=emacsclient -c -a ""
    Type=Application
        
  11. enable lxdm systemctl enable lightdm
    sudo systemctl enable lightdm && sudo systemctl start lightdm
        

up and running setup

  1. pacman -S base-devel –needed
    sudo pacman -S base-devel --needed --noconfirm
        
  2. pacman install the rest of the deps
    sudo pacman -S docker docker-compose nyxt postgresql  --noconfirm
        
  3. git clone https://aur.archlinux.org/paru.git
    # source ~/.bashrc
    git clone https://aur.archlinux.org/paru.git
        
  4. install node and imagemagick node is for language servers
    guix install node imagemagick elixir
        
  5. cd paru && makepkg -si
    cd paru && makepkg -si
        
  6. paru visual-studio-code-bin mermaid-cli this might need to be run locally since I can’t do this from sudo here since it errors with can’t install AUR as root
    paru -S visual-studio-code-bin mermaid-cli --noconfirm
        
  7. install vs code liveshare manually
  8. install eglot-grammarly
    npm install @emacs-grammarly/grammarly-languageserver
        

1password

  1. wget https://cache.agilebits.com/dist/1P/op2/pkg/v2.7.0/op_linux_arm64_v2.7.0.zip https://developer.1password.com/docs/cli/get-started
    # exec 2>&1
    cd
    gpg --receive-keys 3FEF9748469ADBE15DA7CA80AC2D62742012EA22
    wget https://cache.agilebits.com/dist/1P/op2/pkg/v2.7.1/op_linux_arm64_v2.7.1.zip
    unzip op_linux_arm64*.zip
    gpg --verify op.sig op
    # :
        
  2. mv 1password cli op to /usr/local/bin
    # exec 2>&1
    sudo mv /home/johnny/op /usr/local/bin/
    op --version
        
  3. curl -sSO https://downloads.1password.com/linux/tar/stable/aarch64/1password-latest.tar.gz
    # exec 2>&1
    curl -sSO https://downloads.1password.com/linux/tar/stable/aarch64/1password-latest.tar.gz
    tar -xf 1password-latest.tar.gz
    # sudo mkdir -p /opt/1Password
    # sudo mv 1password-*/* /opt/1Password
    # sudo /opt/1Password/after-install.sh
    # :
        

hmm

will need pinentry for exwm emacs package

  • (multi-occur-in-matching-buffers) M-x multi-occur-in-matching-buffers . RET emac RET