literate-dotfiles/windows.org

101 lines
3.0 KiB
Org Mode
Raw Normal View History

2020-12-13 16:39:07 +01:00
#+TITLE: Windows Config and Install
2021-01-01 20:12:34 +01:00
#+SETUPFILE: ./setup/org-setup-file.org
2020-12-13 16:39:07 +01:00
2021-01-01 20:12:34 +01:00
* Create a bootable USB Key
2020-12-13 16:39:07 +01:00
2021-01-01 20:12:34 +01:00
- Download Windows10 ISO https://www.microsoft.com/en-us/software-download/windows10ISO
- Create bootable USB key using the woeusb utility (https://computingforgeeks.com/create-windows-10-bootable-usb-on-linux/)
#+begin_src bash
yay -S woeusb
2021-01-01 20:12:34 +01:00
#+end_src
#+begin_src bash
sudo woeusb --device file.iso /dev/sdb --target-filesystem ntfs
2021-01-01 20:12:34 +01:00
#+end_src
2020-12-13 16:39:07 +01:00
2021-01-01 20:12:34 +01:00
* Install Windows10 PRO
2020-12-13 16:39:07 +01:00
* Install Software using Chocolatey
2021-01-01 20:12:34 +01:00
First install Chocolatey using a PowerShell as administrator:
2020-12-13 16:39:07 +01:00
#+begin_src bash
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
2021-01-01 20:12:34 +01:00
#+end_src
Then, install all required software using one command:
#+begin_src bash
choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim imageglass
2020-12-13 16:39:07 +01:00
#+end_src
* Debloat windows10
https://github.com/Sycnex/Windows10Debloater
2021-01-01 20:12:34 +01:00
Run a PowerShell with administrative rights and run:
#+begin_src bash
iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat'))
2021-01-01 20:12:34 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* SSHFS
** SSH Setup
Install OpenSSH from =chocolatey= as the one packed with Windows is quite old ([[https://blog.frankfu.com.au/2019/03/21/moving-from-windows-1809s-openssh-to-openssh-portable/][link]]):
#+begin_src bash
choco install openssh --package-parameters="/SSHAgentFeature"
2021-01-03 22:52:53 +01:00
#+end_src
Then generate the keys:
#+begin_src bash
ssh-keygen
2021-01-03 22:52:53 +01:00
#+end_src
Start the SSH-Agent to automatically unlock the keys:
#+begin_src bash
# Start the service
Start-Service ssh-agent
2021-01-03 22:52:53 +01:00
# This should return a status of Running
Get-Service ssh-agent
2021-01-03 22:52:53 +01:00
# Now load your key files into ssh-agent
ssh-add
2021-01-03 22:52:53 +01:00
#+end_src
Copy the public key with:
#+begin_src bash
Get-Content -Path $HOME\.ssh\id_rsa.pub | Set-Clipboard
2021-01-03 22:52:53 +01:00
#+end_src
And add it to =~/.ssh/authorized_keys= on the server side.
Finally, it should be possible to ssh to the server.
** SSHFS
Install [[https://github.com/billziss-gh/sshfs-win][sshfs-win]].
Run the =Registry Editor=, and find =Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services\sshfs.kr=, then edit =CommandLine=:
#+begin_src conf
svc %1 %2 %U -o create_dir_umask=000 -o create_file_umask=111 -o umask=000
2021-01-03 22:52:53 +01:00
#+end_src
Then, to mount the network drive using =sshfs=:
#+begin_src bash
2021-10-25 14:31:23 +02:00
net use X: \\sshfs.kr\thomas@192.168.1.21\srv\storage /persistent:yes
2021-01-03 22:52:53 +01:00
#+end_src
To un-mount it:
#+begin_src bash
net use X: /delete
2021-01-03 22:52:53 +01:00
#+end_src
2021-01-01 20:12:34 +01:00
* Software Setup
** Syncthing
https://docs.syncthing.net/users/autostart.html#autostart-windows-startup
Go to =%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup= and create a shortcut linking to =C:\path_to\syncthing.exe -no-console -no-browser=
Then, Syncthing can be accessed with: http://localhost:8384/
** Cura
- https://github.com/fieldOfView/Cura-OctoPrintPlugin