This repository contains my personal NixOS configuration, built around:
- Nix Flakes
- Home Manager
- Hyprland / GNOME
- A shared set of dotfiles for both NixOS and non-NixOS machines (e.g., macOS)
It is designed primarily for my own systems, but it can serve as a reference or starting point if you are building your own flake-based NixOS setup.
NEW: This flake now exports reusable nixosModules and homeModules
that can be used in other flakes. See MODULES.md for
documentation on using these modules in your own configurations.
The main entry point is flake.nix.
It defines several host configurations:
| System Name | Description | Profile |
|---|---|---|
| Daytona | Personal laptop | Desktop + Extra Packages + Development |
| Maranello | Home workstation | Desktop + Extra Packages + Games + Streaming + Development |
| acarshub | Server | Server + Development |
| vdlmhub | Server | Server + Development |
| hfdlhub-1 | Server | Server + Development |
| hfdlhub-2 | Server | Server + Development |
| Freds-Macbook-Pro | Personal macOS laptop | Development/Darwin |
This is mostly here for my own machines---but if you want to adopt it:
- Install NixOS (graphical installer recommended --- GNOME works fine).
- Clone this repo into your home directory.
- In
flake.nix, remove all systems except maranello. - Rename
maranelloto your desired hostname. - Rename
system/maranello→system/<your system name>. - Copy your generated
/etc/nixos/hardware-configuration.nixinto that directory. - In
flake.nix, update the{nixos|darwin}Configurations.<system>entry to point to your renamed system directory. Each of themk{Nixos|Darwin}Systemhas some global configuration options. The name documents what they do, and you will want to change them. Very likely, you will want to ALSO set thestateVersionto the most recent NixOS release which at this current time is25.05. - Build and switch:
sudo nixos-rebuild switch --flake .#<system name>Important
flake.nix has the configuration options to allow you to dynamically set your username and a few other options to customize this to your needs.
That said, if you look in the dotfiles directory I have custom scripts for myself that hard code paths in them.
You will, obviously, need to audit these files because they're bespoke to my needs. Most of these can probably be nuked without issue.
-
Authenticate GitHub:
gh auth login
-
Bring in any extra dotfiles:
stow -vt ~ *
-
Install SSH keys into
~/.sshand runssh-add. -
Fix VS Code keyring integration by adding:
"password-store": "gnome"
to
~/.vscode/argv.json. -
In Neovim, authenticate GitHub Copilot:
:Copilot authEach system's configuration.nix supports these options:
| Option | Description | Default |
|---|---|---|
desktop.enable |
Enables the desktop environment | false |
desktop.enable_extra |
Installs "extra" packages (some may fail on aarch64 VM) | false |
desktop.enable_games |
Installs Steam and related gaming packages | false |
desktop.enable_streaming |
Installs OBS and streaming-related packages | false |
This flake exports reusable NixOS and Home Manager modules. To use them in your own flake:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fredsystems.url = "github:FredSystems/nixos";
};
outputs = { nixpkgs, fredsystems, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
modules = [
fredsystems.nixosModules.github-runners
fredsystems.nixosModules.hardware-graphics
./configuration.nix
];
};
};
}Available modules include:
- Profiles:
desktop-common,adsb-hub - Hardware:
hardware-graphics,hardware-i2c,hardware-fingerprint, etc. - Services:
github-runners(self-hosted GitHub Actions runners) - Shared:
nas-mounts,wifi-networks,sync-hosts
See MODULES.md for complete documentation.
Warning
This is not a pure-Nix, perfectly-immutable setup.
Some development tools are installed system-wide to make tools
like lazygit work cleanly.
Several optional post-install steps are still imperative, and
should ideally be baked into declarative modules in the future.
I am migrating all of my git repositories to include a flake.nix, and when that happens I will be able to remove a lot of the imperative steps.
GNOMEHyprlandCosmicNiri
fredbarvicinaecliphistwl-clipboard
FirefoxBraveLadybird
AlacrittyGhosttyWezTerm(default)iTerm2(darwin only)
NeovimZedVS CodeSublime Text
VLCmultiviewerobs-studiostreamcontroller
LibreOffice
Discord
bashZsh(default)
batezafastfetchfdfzfgnupglazygitoh-my-zshstarshipyazizoxide
