Skip to content

Linux (NixOS) Deployment

Guide to deploying this configuration on NixOS.


📋 Planned - NixOS support is designed but not yet fully implemented.

This document describes the planned NixOS deployment strategy.


This configuration will support NixOS deployment with:

  • Shared modules with macOS (nix-darwin)
  • Linux-specific base configuration
  • Systemd service management
  • Multi-architecture support (x86_64, aarch64)

  • NixOS installation media
  • x86_64 or aarch64 system
  • Administrator access
  • Network connectivity

nix/modules/linux-base.nix (placeholder exists):

{ config, pkgs, lib, ... }:
{
# NixOS base configuration
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
services.openssh.enable = true;
system.stateVersion = "24.11";
}

In flake.nix:

nixosConfigurations.linux-workstation = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nix/modules/common.nix
./nix/modules/linux-base.nix
./nix/profiles/cloud-cli.nix
./nix/profiles/developer.nix
./hosts/linux-workstation.nix
home-manager.nixosModules.home-manager
{
home-manager.users.wikigen = import ./home/users/wikigen.nix;
}
];
};

Terminal window
# Boot from USB/ISO
# Connect to network
sudo systemctl start wpa_supplicant
Terminal window
# UEFI system
parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
parted /dev/sda -- set 1 esp on
parted /dev/sda -- mkpart primary 512MiB 100%
# Format
mkfs.fat -F 32 -n boot /dev/sda1
mkfs.ext4 -L nixos /dev/sda2
# Mount
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot
Terminal window
# Clone to /mnt
cd /mnt
git clone https://github.com/yourusername/Config.git /mnt/etc/nixos
cd /mnt/etc/nixos
Terminal window
# Install
nixos-install --flake .#linux-workstation
# Set root password
nixos-install --root /mnt --no-root-passwd
# Reboot
reboot
Terminal window
# Update system
nixos-rebuild switch --flake /etc/nixos#linux-workstation
# Update flake
cd /etc/nixos
nix flake update
nixos-rebuild switch --flake .#linux-workstation

# macOS: Homebrew for GUI apps
homebrew.casks = [ "app" ];
# NixOS: All packages via Nix
environment.systemPackages = [ pkgs.app ];
# macOS: launchd
launchd.user.agents.myservice = { ... };
# NixOS: systemd
systemd.user.services.myservice = { ... };
# NixOS: Declarative users
users.users.wikigen = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
shell = pkgs.zsh;
};

  • Complete linux-base.nix module
  • Test on VM
  • Document installation process
  • Add example NixOS configuration
  • All profiles working on Linux
  • Systemd service equivalents
  • Linux-specific optimizations
  • Multi-user support
  • Impermanence setup
  • Secure boot
  • Full disk encryption
  • Remote deployment

Terminal window
# Build VM for testing
nix build .#nixosConfigurations.linux-workstation.config.system.build.vm
# Run VM
./result/bin/run-linux-workstation-vm
# Test installation
nixos-rebuild build-vm --flake .#linux-workstation




Status: 📋 Planned - Contribute on GitHub