TODO: REVISE WHOLE THING
My NixOS and Home Manager configurations in a Nix flake.
Features
- Hyprland and the Hypr suite;
- A modern shell experience in Zsh;
- Custom Nix packages built from source; and
- Neovim configured with the Nixvim module.
TODO: Add screenshots / videos
What does "nivem" mean?
"Nivem" is the accusative case of the word snow in Latin whereas "nix" is the nominative case. So they mean the same thing but "nix" is the subject and "nivem" is the object... very poetic ❄️
Install a configuration without cloning this repository.
- If Home Manager is not installed and experimental features are not enabled, run
nix develop --extra-experimental-features 'nix-command flakes' github:benvonh/nivem
- Install the Home Manager configuration of your choice.
home-manager switch --flake github:benvonh/nivem#$USER
where $USER
is an attribute in the homeConfigurations
set inside the flake.nix
file.
May be omitted to automatically read from the shell environment.
Configure Home Manager on a non-NixOS system.
- Clone this repository; and enter the custom shell if experimental features are not enabled.
git clone https://github.com/benvonh/nivem ~/nivem
# For noobs
nix develop --extra-experimental-features 'nix-command flakes' ~/nivem
- Create a Home Manager configuration and add to the flake.
mkdir ~/nivem/home-manager/$USER
# Create configuration...
# Refer to
# Add to 'homeConfigurations'
vim ~/nivem/flake.nix
- Install the Home Manager configuration.
home-manager switch --flake .#$USER@$HOST
where $USER
is an attribute in the homeConfigurations
set inside the flake.nix
file.
Configure NixOS and Home Manager locally through this flake.
- Clone this repository.
git clone https://github.com/benvonh/nivem ~/nivem
- Create a NixOS configuration.
mkdir ~/nivem/nixos/$HOST
cp /etc/nixos/hardware-configuration.nix ~/nivem/nixos/$HOST
# Refer to an existing `default.nix` under `nixos/` to get started
vim ~/nivem/nixos/$HOST/default.nix
- Add the configuration to the flake and switch to it.
vim ~/nivem/flake.nix
cd ~/nivem; git add .
sudo nixos-rebuild switch --flake ~/nivem
Append #$HOST
and #$USER@$HOST
to the switch commands (no space) if the correct values are not set in the environment variables.
If you want a quick start to using my configurations,
replace the below references, $USER
and $HOST
, in each of the files.
NixOS
nixosConfigurations = {
$HOST = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./nixos/$HOST ];
};
};
networking.hostName = "$HOST";
...
users.users.$USER = {
home = "/home/$USER";
};
Home Manager
homeConfigurations = {
"$USER@$HOST" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home-manager/ben ];
pkgs = pkgsFor.x86_64-linux;
};
};
home-manager/$USER/default.nix
home = {
username = "$USER";
homeDirectory = "/home/$USER";
};
Special thanks to Misterio77 for creating the nix-starter-configs!