Deprecated, working on the full-life OS as a locally hosted, private project. Once I am confident in my encryption techniques, I will share my dotfiles with the world. Hope, I become a Nix God. This legacy attempt served me well, and I racked thousands of gaming, editing and browsing hours on this humble beast.
This repository is a flake-based NixOS configuration that uses GLF-OS as a base.
-
Follow the GLFOS installer on a new system which will generate a
configuration.nixfile with:- GLF optimizations (e.g., the right driver for your NVIDIA graphics card)
- System-agnostic settings like
glf.environment.typeandglf.environment.edition(which should always be the same on any cognito OS)
-
Manual setup (TODO: automate this process):
- Create a new folder for your device in
system-hardware-shims/(e.g.,system-hardware-shims/my-laptop/) - Move the autogenerated
hardware-configuration.nix(found in /etc/nixos) to your system-hardware-shims device folder - Move the autogenerated
configuration.nix(found in /etc/nixos) to your system-hardware-shims device folder and rename it tofirmware-configuration.nix - Add your device name to the
hostslist inflake.nix - Build with
./build.sh your-device-name switchornixos-rebuild switch --flake .#your-device-name
- Create a new folder for your device in
-
Clean up system-agnostic settings from the generated configuration:
- Remove
glf.environment.typeandglf.environment.edition(these are now in the system-interface) - Keep hardware-specific settings like NVIDIA config, user accounts, bootloader, etc.
- Remove
System-Agnostic (stays in system-interface/software-configuration.nix):
glf.environment.typeandglf.environment.edition- same across all cognito OS systems- GNOME configuration and extensions
- Application packages and user scripts
- Input device configurations (libinput, maccel, udev rules)
Hardware-Specific (moves to system-hardware-shims/device-name/firmware-configuration.nix):
- NVIDIA graphics configuration
- User accounts and passwords (generated by GLFOS installer)
- Bootloader configuration (GRUB settings)
- Hostname and networking configuration
Location-Specific (debated - could be system-specific or hardware-specific):
- Timezone - Different for different physical locations (UK vs China PC)
- Keyboard layout - PC-specific (different keyboards/regions)
- i18n settings - Region-specific (language preferences)
- Networking - Could vary by location/network setup
flowchart TD
A[/flake.nix/] -->|defines| B[nixosConfigurations."GLF-OS"]
A -->|inputs| C[glf-channels]
A -->|inputs| D[nixpkgs]
A -->|inputs| E[nixpkgs-unstable]
A -->|inputs| F[glf (GLF-OS root flake)]
B -->|modules| G[system-interface/]
G --> H[system-interface/software-configuration.nix]
H --> I[system-hardware-shims/device-name/]
I --> J[hardware-configuration.nix]
I --> K[firmware-configuration.nix]
subgraph "Auto-updates"
L[system.autoUpgrade] -->|timer| M[nixos-upgrade.timer]
L -->|service| N[nixos-upgrade.service]
end
H -. enables .-> L
Use the included interactive build.sh script for easy building and switching:
# Run the interactive build manager
./build.shThe script will present you with:
- A list of available devices to choose from
- Actions to perform:
- Build configuration (compile only)
- Build and switch to configuration
- Test configuration (dry run)
- Regenerate hardware configuration (for hardware changes)
- List available devices
- Exit
- Option to perform multiple actions in one session
No parameters needed - just run ./build.sh and follow the interactive prompts!
Warning: This setup assumes the repository is cloned at ~/cognito. If it is not at that exact path, some features and paths may not work as intended.
When you change your desktop hardware (new GPU, motherboard, etc.):
-
For basic hardware changes (CPU, RAM, storage):
- Use the "Regenerate hardware configuration" option in
build.sh - This runs
nixos-generate-configto detect new hardware - Updates
hardware-configuration.nixwith new hardware detection
- Use the "Regenerate hardware configuration" option in
-
For firmware/driver changes (NVIDIA GPU, bootloader, etc.):
- Recommended: Run a fresh GLFOS installer
- The installer generates both
hardware-configuration.nixANDfirmware-configuration.nix - Gets you the latest GLF optimizations and driver configurations
- Ensures proper NVIDIA setup, bootloader config, and other firmware-specific settings
o