As a new user to NixOS (Evaluating in a VM) I find it fascinating yet a little mind melting. I wanted to start a community thread to help each other on NixOS. I myself an Arch User. Love a lot of the features that NixOS offers. It is a different type of OS. I have seen a few neofetch posts of people using NixOS.
There is a lot going on here
-Nix Language
-Flakes
-Home Manager
-nix repl
-nix-shell
-nix-env
-/etc/nixos/configuration.nix
and so much more.
I am reinstalling this for the third time on 24.05 in a VM
fascinated by this distro.
Let the comments fly
I see this as a very strong Server distro.
I do have a devel server right now. I want to switch, the wife may get upset.
I want to know more.
I found out a few weeks ago that SteamOS also supports the nix package manager (since some version). For those who donāt know: SteamOS is an arch based immutable distro. The only way to install software is in user mode, flatpaks/appimages but now also nix packages. So far they have been working great for me. Running emacs in a flatpak is a PITA, since your config directory is āsomewhereā and permissions on dev tools can be weird. On some machines (server with just user access) Iād just compile emacs, but the deck is a bit slow for that and doesnāt come with compilers. But the nix package works perfectly and integrates seamlessly in the system.
I should really look more into nix for my work purposes. We rely quite a bit on containers but nix offers another solution to the āit runs on my machineā problem that might be more suitable sometimes.
Iām not really a huge fan of managing user packages through configuration.nix. Instead, I opted to use Home Manager without using NixOS module to manage my $HOME, and leave configuration.nix to only manage the system. The only packages I have on my configuration.nix are the ones that require system-level configuration (e.g. PolicyKit, pam, system daemon, etc.).
This means I have two repositories that I use to manage my Nix configuration:
For containers and flake, if weāre talking about nixos-container (which is NixOSā wrapper on top of systemd-nspawn), then I donāt think you can configure nixos-container through flake at all (which defeat its usefulness in workstation context, since all containers must be configured at system-level; still useful for servers though).
If weāre talking about using flake as a replacement for containers, then I donāt think flake is a substitute for a container. While flakes are self-contained, the runtime is not isolated (as with containers and cgroups), which may or may not be a dealbreaker for many scenarios. Itās still very useful to distribute the same packages to every machine, though (even more so with nix-direnv).
I am having problems enabling flakes on 24.05 here is the config. i donāt know what I am doing wrong.
this is the link I am following. nothing seems to work
{ config, pkgs, ⦠}:
{
# Import other configuration modules
# (hardware-configuration.nix is autogenerated upon installation)
# paths in nix expressions are always relative the file which defines them
imports =
[
./hardware-configuration.nix
./my-dev-tools.nix
./my-desktop-env.nix
./etc.nix
];
# Name your host machine
networking.hostName = "mymachine";
# Set your time zone.
time.timeZone = "Europe/Utrecht";
# Enter keyboard layout
services.xserver.layout = "us";
services.xserver.xkbVariant = "altgr-intl";
# Define user accounts
users.extraUsers =
{
myuser =
{
extraGroups = [ "wheel" "networkmanager" ];
isNormalUser = true;
};
};
# Install some packages
environment.systemPackages =
with pkgs;
[
ddate
testdisk
zsh
];
# Enable the OpenSSH daemon
services.openssh.enable = true;
}
I always get an error on line 9 which is the beginning of the code.
and my braces always seem to be correct. what am i missing to get flakes enabled?
NixOS is really cool and unique, but itās not easy to use and getting things done is slow. Itās fine if you really need to worry about reproduceability and change management, like you might in the enterprise, but for desktop use, itās just massive overkill.
My desktop installs usually last about 4-5 years, so Iām generally not too worried about needing to start from scratch, and when I do, Iāve got shell scripts to pull down the needed packages and gnu stow to reinstall the dotfiles.
Hey! I been driving that NixOS on homelab as my primary server, Mac and WSL for the past two months and change. Weird that this probably is my first time posting instead of lurking but wanted to say hi to others also taking the plunge into this wonderful world of not having to remember what you did.
Well After I have thought things through and took a step back. I am slowly starting to understand (sort of) how it works. lots of rabbit holes to go down. I am really intrigued on how you could take advantage of this distro as a development platform. I really love the feature of ephemeral shells. take ventoy as an example. no need to install this one time app. just run a nix-shell, do what you need to do then exit the shell. there it is gone.
i am not one for whatsapp, zoom etc ⦠so for christmas I can install zoom or whatsapp in a nix-shell , talk to my mother at christmas, then exit the shell, or create a script, keep in my home folder or wherever I want for a later date if I need that app again. this is what I love about it.
flakes I had a hard time with, everyting seems to be a module of some sorts. still learning thisā¦
anywhooo ā¦
still researching. been running for two months. I am on the 24.11 beta. I miss my hyprland on arch. but to gain knowledge, sometimes sacrifices have to be made.
my goal is to have nixos as a development server in my homelab via ssh. this I think would be a fantastic back end R and D server. Then have arch as a front end, then I can have the best of both worlds.
been busy have not had time to come in and say hello. well here I am again. āHelloā
I have a bit of a better understanding of nixOS. I am getting there.
Playing around with Nixos. I have been looking for a powerful Neovim config. I stumbled across this Nixvim (Neovim) Setup. I have been playing around with it. It is setup as a flake.