Ephemeral, themed, gaming-ready NixOS config for a Framework 13 (12th-gen Intel) laptop.
Highlights:
- 🧱 NixOS with flakes on
nixos-unstable(with anixos-24.05stable pocket aspkgs.stable) - 🧊 Btrfs + tmpfs root + impermanence
/on tmpfs (ephemeral)/nix+/persiston btrfs subvolumes
- 🖥️ GNOME on Wayland with GDM themed to match your session
- 🎨 Stylix for full theming
- Custom Base16 scheme in
themes/robert-base16.nix lutgen-recolored wallpaper- Recolored avatar piped to
~/.face - Firefox themed and GNOME-integrated
- Custom Base16 scheme in
- 🧵 Ghostty terminal + zsh + oh-my-zsh
- 🔐 1Password (GUI + CLI + shell plugins) + Firefox integration
- 🎮 Gaming stack
- Steam (+ gamescope session, extest)
- Gamescope, Gamemode
- MangoHud overlay
- 🛠️ Dev tooling
- Python 3.12 toolchain (poetry, black, ruff, mypy, ipython)
direnv+nix-direnvfor flake dev shells- VS Code (official Microsoft build)
- 🧹 Nix & system hygiene
- Automatic Nix GC + optimise
nix-index+nix-index-database-comma- Firewall, fwupd, btrfs autoscrub
systemd.user.startServices = "sd-switch"
framework-nixos/
├── README.md
├── flake.nix
├── configuration.nix
├── hardware-configuration.nix
├── home.nix
├── disko-framework13-impermanence.nix
├── themes
│ └── robert-base16.nix
├── wallpapers
│ └── wallpaper.jpg
└── avatars
└── profile.png
Most files are wired together via flake.nix and configuration.nix. hardware-configuration.nix has placeholder UUIDs you should update with your actual disk IDs.
The flake uses:
nixpkgs→nixos-unstable(default for system and user packages)nixpkgs-stable→nixos-24.05, imported via an overlay aspkgs.stable
Unfree is enabled globally in configuration.nix:
nixpkgs.config = {
allowUnfree = true;
};The overlay exposes pkgs.stable:
{
nixpkgs.overlays = [
(final: prev: {
stable = import nixpkgs-stable {
inherit system;
config = { allowUnfree = true; };
};
})
];
}Usage examples:
# system (configuration.nix)
environment.systemPackages = with pkgs; [
vim
git
# unstable by default
stable.libreoffice # explicitly from stable
];
# home (home.nix)
home.packages =
(with pkgs; [
neovim
# ...
stable.spotify
])
++ (with pkgs.gnomeExtensions; [ ... ]);See disko-framework13-impermanence.nix for the desired partitioning on /dev/nvme0n1:
- EFI (
/boot) - swap
- btrfs root with subvolumes:
@root,@nix,@persist
hardware-configuration.nix then mounts:
/as tmpfs (ephemeral)/nixas btrfs subvolume@nix/persistas btrfs subvolume@persist(withneededForBoot = true;)
Impermanence is configured in configuration.nix via:
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
directories = [ ... ];
files = [ ... ];
users.robert = {
directories = [
"Documents" "Downloads" "Music" "Pictures" "Videos"
".config" ".local/share" ".local/state" ".ssh" ".gnupg"
".local/share/Steam" ".steam"
];
};
};Everything outside /nix and those persisted paths resets on reboot.
Stylix is enabled in configuration.nix with:
base16Scheme = import ./themes/robert-base16.nix;image = wallpaper;wherewallpaperis alutgen-recolored version of./wallpapers/wallpaper.jpg- Fonts (
FiraCode Nerd Font,Noto Sans/Serif,Noto Color Emoji) - Cursor theme (
phinger-cursors) - Targets:
- Firefox (with GNOME Firefox theme)
- Console and Plymouth explicitly disabled for Stylix theming
In home.nix, an avatar at ./avatars/profile.png is recolored with lutgen using the same Base16 palette, and installed as ~/.face via Home Manager. GDM picks this up as the user icon.
configuration.nix enables:
- GNOME (Wayland) via
services.xserver.desktopManager.gnome.enable = true; - GDM via
services.xserver.displayManager.gdm.enable = true;with Wayland
System-wide GNOME gsettings are set to:
- Use the Stylix-colored wallpaper for:
- Desktop background
- Screensaver
- GDM background
- Prefer dark color scheme
- Use 12-hour clock without date in the top bar
User-specific GNOME settings (extensions, keybindings, favorites, etc.) are handled in home.nix via dconf.settings.
- Default shell:
zsh(with oh-my-zsh) for userrobert - Terminal:
ghostty, themed by Stylix inhome.nix, bound to Super+T, and set as the XDG default terminal. - Dev tooling:
- Python 3.12 (
python312Full) pipx,virtualenv,poetryipython,black,ruff,mypy
- Python 3.12 (
direnv+nix-direnvfor flake-based dev shells
VS Code (official Microsoft build) is enabled via programs.vscode in configuration.nix.
Firefox is:
- Installed and configured at the system level (
programs.firefoxpolicies) - Themed via Stylix’ Firefox target and the GNOME Firefox theme
- Configured with a
userprofile via Home Manager:- Custom search engines (
Nix Packages,Nix Options) - UI tweaks (tab bar hidden via
userChrome)
- Custom search engines (
1Password:
- Desktop app is enabled (
programs._1password-gui) - CLI + shell plugins for tools like
gh - Firefox integration is allowed via
/etc/1password/custom_allowed_browserscontainingfirefox
Steam is enabled with:
- Remote Play and dedicated server firewall rules
- Gamescope session integration
extestfor better controller support
Also enabled:
programs.gamescopeprograms.gamemodeprograms.mangohud(with a useful HUD configuration)
- Automatic Nix GC weekly (
--delete-older-than 7d) - Automatic Nix store optimisation
nix-index+nix-index-database.comma- Firewall enabled
- Firmware updates via
fwupd - Monthly btrfs
autoScrubon/nixand/persist systemd.user.startServices = "sd-switch"for smoother Home Manager/systemd user service reloads
- Static fallback timezone:
America/New_York - Dynamic timezone:
services.automatic-timezoned.enable = true; - Geolocation via
geoclue2pointing athttps://beacondb.net/v1/geolocate
GNOME’s weather and location settings in home.nix are configured to automatically use this data.
From a NixOS installer:
-
Connect to Wi-Fi (e.g. via NetworkManager).
-
Clone this repo.
-
Run
diskowithdisko-framework13-impermanence.nixto partition/dev/nvme0n1. -
Mount the resulting filesystems to
/mntaccording tohardware-configuration.nix. -
Run
nixos-generate-config --root /mntif needed and adjusthardware-configuration.nixUUIDs. -
Install:
nixos-install --root /mnt --flake .#framework-13 -
Reboot and log in as
robert.
Apply changes with:
sudo nixos-rebuild switch --flake .#framework-13Because Home Manager is integrated as a NixOS module, this single command updates both system and user config.