Skip to content

FabianMoertter/NixOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

nixos-config: Nix-Flake for my systems

Repo under construction!

Systems

Hostname Machine Status
lepidoptera Desktop WIP
mantodea Mini Homelab WIP
coleoptera Laptop 1 not started
hymenoptera Laptop 2 WIP
Raspberry Pi not started

Overview

Program Name
Code Editor Neovim
Shell zsh/bash
Terminal Emulator alacritty

Project Structure

.
β”œβ”€β”€ systems            # System configuration
β”œβ”€β”€ home-manager       # Home configuration
β”œβ”€β”€ docs               # Documentation files
β”œβ”€β”€ modules            # Modules for system and home configuration
β”œβ”€β”€ shells             # Development shells (independent of this NixOS configuration)
β”œβ”€β”€ ...
β”œβ”€β”€ LICENSE
β”œβ”€β”€ flake.nix
β”œβ”€β”€ flake.lock
β”œβ”€β”€ shell.nix
└── README.md

Installation

Warning: Do not follow this blindly, it will probably not work for you!

NixOS

After installing NixOS on your system, run:

nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs#git clone https://github.com/FabianMoertter/NixOS
cd NixOS
nix-shell

to clone this repo and bootstrap flakes and home-manager. Note: The shell provides neovim so you can edit configuration files. Copy hardware-configuration.nix: Depending on what you do you need to copy your hardware-configuration.nix from /etc/nixos/ to the desired location. Do not just copy this command!

cp /etc/nixos/hardware-configuration.nix system/<system>/hardware-configuration.nix

Now you can build the system:

sudo nixos-rebuild switch --flake .#<hostname>

Home Manager

Proceed with this steps after you installed NixOS and after you rebuild the system. You should still be in the dev shell from above. Otherwise, try:

nix shell nixpkgs#home-manager

Then run home-manager with:

home-manager switch --flake .#<user>@<hostname>

If you get an error like this: "Could not find suitable profile directory, tried .../profiles and .../user" run:

nix profile list

to fix the issue and then run home-manager again.

Neovim

Neovim config is based on kickstart.nvim: https://github.com/nvim-lua/kickstart.nvim

The config is located under modules/home-manager/nvim/

Documentation

Nix Resources

Here is an incomplete list of great Nix/Nixpkgs/NixOS resources:

Documentation:

Tutorials:

NixOS example repositories:

Homelab examples:

Videos:

Neovim repositories:

sops-nix:

deploy-rs:

Blogs and articles:

Companies:

Other:

Credits

Flake based on standard template: https://github.com/Misterio77/nix-starter-configs.

Neovim config based on kickstart.nvim: https://github.com/nvim-lua/kickstart.nvim.

Hyprland config inspired by: https://gitlab.com/stephan-raabe/dotfiles

Wallpaper: DNA Image by kjpargeter on Freepik