As I mentioned earlier - you can run it in WSL (Windows Services for Linux) on Windows and you can run it on MacOS… Dunno about the BSDs (see below FreeBSD - not sure I understand was “musl” is other than a C library?)… Dunno quite how it works on MacOS or WSL - maybe containerised?
From Download | Nix & NixOS
curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh
“install” is the same thing for Linux and Mac, and it’s only 129 lines - and yeah - it includes FreeBSD (the OS detection case statement):
27 case "$(uname -s).$(uname -m)" in
28 Linux.x86_64)
29 hash=0c3960a9792331a22081c3c7a5d8465db9b17c50b3acdf18587fa4c6f2cb1158
30 path=3d229fmjbbhn74zwp21z6rfx2a35ryy8/nix-2.35.2-x86_64-linux.tar.xz
31 system=x86_64-linux
32 ;;
33 Linux.i?86)
34 hash=55363adb55f1447be49298c671f5beb539526f2f3181e8e11eab669af6d5990b
35 path=bzfrrx38n5qc3kj6id18zqbysk48vykz/nix-2.35.2-i686-linux.tar.xz
36 system=i686-linux
37 ;;
38 Linux.aarch64)
39 hash=4d0302a2910f5eec1c33b8deef634f04899a75737e7001ec49908d003ae5efda
40 path=f8vsr7dbkb5slmwiv6s2cc5bjw73xqwn/nix-2.35.2-aarch64-linux.tar.xz
41 system=aarch64-linux
42 ;;
43 Linux.armv6l)
44 hash=2f79330820e2de68279d1c796827d4d6269396c3cbb22bacf6c238639db9b306
45 path=j3i097mi5gf31qqcfimgmdqmdrncpvnc/nix-2.35.2-armv6l-linux.tar.xz
46 system=armv6l-linux
47 ;;
48 Linux.armv7l)
49 hash=e4a68bd13f20b10f67b551178116655520323f5a29a7e82a2db24a6b2a166e89
50 path=jq9dyz2q83d4z6rhfgfzbaqgcar7ss82/nix-2.35.2-armv7l-linux.tar.xz
51 system=armv7l-linux
52 ;;
53 Linux.riscv64)
54 hash=98ee79540d4b9ccfe733655ea049a67af24f15860fbf92103bc1911bbd905a53
55 path=1slh67389ncg34nqsz1a0ampcwzlcxq8/nix-2.35.2-riscv64-linux.tar.xz
56 system=riscv64-linux
57 ;;
58 Darwin.x86_64)
59 hash=d725518d89f3b0b8d4af702a9d38d519814014cbe125afb3ed0545c9d755f6a5
60 path=q89r761wxaykz2zhb2l8j0rsljm9k9ak/nix-2.35.2-x86_64-darwin.tar.xz
61 system=x86_64-darwin
62 ;;
63 Darwin.arm64|Darwin.aarch64)
64 hash=1695c13aba5afa7c2ecd6dc4a9393f602e7bbc440ed45e81602c831546580ec3
65 path=hl0qj2xiq7npi3xxk1byan3nc75kx0q1/nix-2.35.2-aarch64-darwin.tar.xz
66 system=aarch64-darwin
67 ;;
68 FreeBSD.amd64|FreeBSD.x86_64)
69 hash=e944893995e82989a13df992e6f636f1050a2498f7792f9cef3cb2e1d18ba692
70 path=j9ll2y5d3mh1ichmkrfnjfrjc64z18gf/nix-2.35.2-x86_64-freebsd.tar.xz
71 system=x86_64-freebsd
72 ;;
73 *) oops "sorry, there is no binary distribution of Nix for your platform";;
74 esac
I’m going to assume WSL will show as Linux.x86_64
You know if it included vi/vim by default I might be tempted to spend more time on it - but it’s such an ordeal replacing nano (which I LOATHE) with vim I can’t be bothered - given that configuring ANYTHING on it means editing text - and to do the vim bit - you have to use nano!
However - just read this :
So :
[x@nixos:~]$ nix-shell -p neovim
Will give me neovim and and I can run nvim - so I could alias “vi” to nvim… That’s better than being forced to use nano to get a real
text editor installed… That’s what I’m going to do next time I try NixOS install. Get neovim running, alias vi to nvim, then I can use vi to edit the other files (like to install vim, openssh-server, enable sshd, enable passwordless sudo) - i.e. by “files” - it’s mostly just the one file : /etc/nixos/configuration.nix
I may try creating a FreeBSD jail on my NAS and see if I can install NixOS in there… From my understanding - it’s not just an O/S - it’s an API and it’s a package manager…
OK - further playing with Pantheon desktop on NixOS (a VM in KVM) and the ugliness and lack of opacity settings in both terminals bothers me :
That’s Gnome Terminal on the left - so ugly… Also seems I need to install a compositor to get transparency/opacity settings… I’m sure that happens by default on other distros…
I might actually try it on my Pi5…
But I am slightly impressed by NixOS - kinda prefer it to Arch anyway…
– edit –
I’m not about to give up - but hit another hurdle - it won’t let me run something as an AppImage… Tried getting Sayonara player to work/run - it’s ugly - doesn’t respect my dark mode or window control location… So I downloaded an AppImage of Sayonara :
[x@nixos:~/tmp]$ ./Sayonara-1.8.0-beta1.AppImage
Could not start dynamically linked executable: ./Sayonara-1.8.0-beta1.AppImage
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
Yeah, nah… two steps forward, one step back…