My Nix flake configurations for NixOS and Home Manager.
Features
- Hyprland and the Hypr suite;
- A modern shell experience in Zsh;
- Custom Nix packages built from source; and
- Neovim configured through the Nixvim module.
TODO: Add screenshots / videos
What does "nivem" mean?
"Nivem" is the accusative case of the word snow in Latin while "nix" is the nominative case.
Install a configuration without cloning this repository.
- If Home Manager is not installed and flakes 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@$HOST
where $USER@$HOST
is the homeConfigurations
string in flake.nix
.
Configure your NixOS system based off this flake.
- Clone this repository and enter the custom shell.
# If not already installed
nix-shell -p git
git clone https://github.com/benvonh/nivem ~/nivem
cd ~/nivem
nix-shell
- Create a NixOS configuration. See For The Impatient.
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
- Create a Home Manager configuration. See For The Impatient.
mkdir ~/nivem/home-manager/$USER
# Refer to an existing `default.nix` under `home-manager/` to get started
vim ~/nivem/home-manager/$USER/default.nix
- Add the configurations to the flake and switch to it.
vim ~/nivem/flake.nix
cd ~/nivem; git add .
sudo nixos-rebuild switch --flake ~/nivem
home-manager 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!