Skip to content

suasuasuasuasua/nixos-config

Repository files navigation

NixOS Config

.github/workflows/flake-checker.yml built with nix

Hosts

lab (custom build)

  • Main server for services like mealie, actual, jellyfin, and more!
  • NAS with ZFS pooled hdds and shared via smb

legion (pre-built)

  • Main drivers Windows 11 but experimenting with NixOS
  • Gaming is the main factor stopping me from running full NixOS

mbp3 (MacBook Pro M3 Max)

  • Main daily driver (yes I'm an apple fanboy secretly)
  • Love that nix-darwin allows you to use the same configuration

penguin (Acer 713-3W Chromebook NixOS)

  • Thin client notebook
  • Mainly for web browsing, tinkering, note-taking, and light coding

pi (Raspberry Pi Model 4B (2GB RAM))

  • For fun single board computer (acquired in college class)
  • Runs simple services like adguardhome

Setup

NixOS

The initial setup is pretty simple now thanks to disko.

  1. Boot the minimal disk ISO onto a computer

  2. Connect to the Internet

    # Enter sudo mode
    sudo -i
    
    # Start the service
    systemctl start wpa_supplicant.service
    
    # Use the CLI to connect
    wpa_cli
    
    > add_network 0
    > set_network 0 ssid "<network name>"
    > set_network 0 psk "<password>"
    > enable_network 0
    
    nix-shell -p disko
  3. Run the disko utility

    # Add the program to the path
    nix-shell -p disko
    
    CONFIG_PATH="github:suasuasuasuasua/nixos-config" # or you could clone locally first
    NAME="penguin" # for example
    disko --mode disko --flake "${CONFIG_PATH}"#"${NAME}"
    nixos-install --no-channel-copy --no-root-password --flake "${CONFIG_PATH}"#"${NAME}"
  4. Prepare the passwords and ZFS pools

    # Set your password
    nixos-enter --root /mnt -c "passwd ${USERNAME}"
    
    # Export the zpools so that they can be used by the actual computer (not the
    # installer!)
    zpool export -a
    
    # Reboot to your new system!
    reboot
  5. Initialize Samba (smb) (as root)

    # Add a user and a password
    smbpasswd -a ${USERNAME}
    smbpasswd -e ${USERNAME}
    
    # Make the zshare owned by samba and writable
    chgrp -R samba /zshare
    chmod -R 775 /zshare
  6. Make changes and rebuild the system

    # Rebuild the system after any changes!
    just switch

Darwin

The setup for darwin machines is much simpler. Make sure to connect to the internet before beginning.

  1. Install nix on the machine. You may be prompted to install developer tools (like git, xcode, etc.), so make sure to accept and be patient.

    curl -fsSL https://install.determinate.systems/nix | sh -s -- install
  2. Install nix-darwin

    # To use Nixpkgs 25.05:
    sudo nix run nix-darwin/nix-darwin-25.05#darwin-rebuild -- switch
  3. Install the configuration from GitHub

    # switch to the mbp3 device for example
    darwin-rebuild switch --flake github:suasuasuasuasua/nixos-config#mbp3

Contributors 3

  •  
  •  
  •  

Languages