Ask HN: Cleanest way to manage Windows OS?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • nx

    Smart Monorepos · Fast CI

  • On Nix, you can declare everything necessary to build a package so you don't need to install packages on your system by yourself. I don't want to put myself into a dependency hell anymore. But I have an idea for this: using docker. Docker separates developing environment from host's system so there would be no pre-installed dependencies. It would be good and I'm considering learning docker. Next thing I'm considering is to use something like [nx](https://nx.dev/). If you have better ideas, please tell me.

    This is pretty much everything I need for my next Windows environment. Every small tips or tricks are welcome.

  • Fog

    An open source computer cloning & management system

  • I heard about devbox [1] but I haven't tried it yet. Perhaps it could suit your needs.

    Back in the day I used "Norton Ghost" to create a full image of a just-installed windows just in case I needed to go back in time. Windows includes a snapshot feature built-in but I did not really trusted it. These days you can use a "sysprep" tool [2] to create a similar system snapshot. Make a partition and keep everything you don't want deleted on drive D: or something :-).

    --

    1: https://www.jetpack.io/devbox

    2: like https://www.ntlite.com or https://fogproject.org

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Vagrant

    Vagrant is a tool for building and distributing development environments.

  • It sounds like you're using Nix as a sort of configuration management solution. CM just isn't worth it for managing a single desktop IMO. It triples the effort for whenever you need to add or remove a package, as you must now add that also to your nix configuration. You're supposed to be able to make that back up in time saved restoring to the next machine, but inevitably the next machine will be different enough that you'll have to edit it all anyway. In the end I just got tired of trying to manage my own machine with infrastructure as code (though in fairness I was using puppet at the time not nix).

    I keep a git repository with all my dot files in it[1]. This seems to work the best. It has a Windows folder as well, and I copy that out whenever I need to set up Windows.

    A lot of people like using WSL but I hate how it hogs on my memory. Hyper-V is a terrible virtualization engine for consumer-grade use cases because it can't thin provision RAM. If I need to use docker, I will spin up a small Linux VM using vagrant[3] with Virtualbox[4] and put Docker on there. Vagrant is an extremely underrated tool in my opinion, particularly in a Windows context.

    I use scoop for packages. Typically I will scoop install msys2 and then pin it so that it doesn't get blown away by the next upgrade.

    Then I basically do all of my development inside of msys2. I can get most things running in there without virtualization. In my case that means sbcl and roswell for common lisp, senpai for irc, and tmux and nvim for sanity. Msys2 uses the pacman package manager and this is good enough.

    All In all, I set up my Windows machine affresh after a while of not using it and it took me about 3 hours. Most of that time was just getting through upgrades though, I felt like it was pretty fast.

    1: https://git.sr.ht/~skin/dotfiles

    2: https://www.msys2.org/

    3: https://www.vagrantup.com/

    4: https://www.virtualbox.org/

  • PowerToys

    Windows system utilities to maximize productivity

  • Thank you all for the informative advices. Here is the summary for those who are in the same situation:

    1. Run Windows on Linux by using VM

    for the applications you can’t run on Linux

    Risks:

    * some softwares may attempt to detect VMs and refuse running

    * Anything what needs to touch hardware may not work.

    2. separate "data" partition on D:

    3. back up %APPDATA% and %USERPROFILE%

    4. learn chocolatey, scoop or winget

    Winget should be good enough

    5. Don’t worry about C:\Program Files

    6. (Mixed) Use/Don’t use Ansible (or saltstack/salt)

    Use:

    * Allows you to setup a new machine quickly and consistently when one breaks, get stolen, or lost in an inconvenient time.

    * You can get a clean and consistent development environment so that you do not depend on anything accidentally installed on the machine.

    * If you define specialised roles, create test playbooks for those individual roles, use these roles to compose more complex playbooks, and offload logic to custom ansible modules that are written in python, you won't wrestle with heavy logic in the template or playbook layer.

    * installing software and pulling some configs and scripts down is fine

    Don’t use:

    * You will spend your days fighting a mix of yaml and Jinja.

    * You will end up looking at Python errors because there are no static types.

    * errors are cryptic.

    7. Use WSL2

    You need 32gb of ram, but ram is cheap so choose a good thinkpad

    8. Debloat with Recommended Tweaks

    Run

    irm christitus.com/win | iex

    from Administrator Terminal (Powershell)

    The link leads to https://raw.githubusercontent.com/ChrisTitusTech/winutil/mai...

    VirusTotal

    https://www.virustotal.com/gui/file/709834b0e003b6bb546cf16e...

    9. Get [PowerToys](https://github.com/microsoft/PowerToys)

    10. Use Devbox for containered environment

    https://www.jetpack.io/devbox

    11. Dual-Booting Linux and Windows

    If you use physically separated drives, you don’t need partitioning.

    12. Dedicated Windows machine for class

    Yes it sure would be the cleanest solution but I prefer one device for everything

    13. keep a git repository with all dot files in it

    Many people suggested me to use virtualization, otherwise just let Windows be Windows.

    Also, backing up seems to be a good practice.

    I’m planning to write a blog about this, if it worked.

    Again, thank you all for the helps!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts