Skip to content

MichaelAug/NixOS-Config

Repository files navigation

Directory Structure

  • base directory:
    Shared configurations across all hosts are stored in this directory.

  • desktop and laptop directories:
    Host-specific configuration files for the 'nix-desktop' and 'nix-laptop' hosts are contained in these directories. Each holds its configuration.nix and hardware-configuration.nix to tailor settings per device.

  • desktop_environments directory:
    Houses a collection of available desktop environments, including GNOME, KDE, Hyprland, and potentially more. Each environment has its configuration.nix and home.nix.

  • scripts directory:
    Stores miscellaneous scripts, offering additional functionalities or utilities for the system.

How to set up a machine with this config:

  1. Install NixOS on your machine
  2. Add this to your /etc/nixos/configuration.nix:
    nix = {
    extraOptions = ''
      experimental-features = nix-command flakes
    '';
    };
    
  3. Run sudo nixos-rebuild switch
  4. Enter shell with nix-shell -p git and clone this repo (make sure to init all submodules!)
  5. change the "username" variable in flake.nix to your desired user name
  6. Modify desktop/configuration.nix and/or laptop/configuration.nix: remove my driver configurations and add your own
  7. Copy your hardware configuration into appropriate profile e.g. if using nix-desktop, place it in desktop/ sudo cp /etc/nixos/hardware-configuration.nix ~/[path to this repo]/desktop/
  8. Run sudo nix flake update to update packages
  9. Run sudo nixos-rebuild switch --flake .#nix-desktop to apply configuration to OS
  10. If everything works, remove non-flake NixOS configuration sudo rm -rf /etc/nixos/

After Setup

  1. To update packages run 'update'
  2. To switch to new configuration run 'switch'

About

My NixOS configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published