Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.
zitongcharliedengPublic archive

About

Owning multiple linux daily drivers, I want to achieve workflow parity to get closer to my ideal LifeOS which automates everything for me and tells me what to do to GTD and health-maxx. NixOS, being declarative, sounds like the perfect option. But I have no experience in it, so this repo will contain the history of me being a stupid chud -> pro!

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

105 Commits

Folders and files

Repository files navigation

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.

GLF-OS based NixOS configuration

This repository is a flake-based NixOS configuration that uses GLF-OS as a base.

Installation on New System

  1. Follow the GLFOS installer on a new system which will generate a configuration.nix file with:

    • GLF optimizations (e.g., the right driver for your NVIDIA graphics card)
    • System-agnostic settings like glf.environment.type and glf.environment.edition (which should always be the same on any cognito OS)
  2. 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 to firmware-configuration.nix
    • Add your device name to the hosts list in flake.nix
    • Build with ./build.sh your-device-name switch or nixos-rebuild switch --flake .#your-device-name
  3. Clean up system-agnostic settings from the generated configuration:

    • Remove glf.environment.type and glf.environment.edition (these are now in the system-interface)
    • Keep hardware-specific settings like NVIDIA config, user accounts, bootloader, etc.

System-Agnostic vs Hardware-Specific Settings

System-Agnostic (stays in system-interface/software-configuration.nix):

  • glf.environment.type and glf.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

Layout

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
Loading

Build Script

Use the included interactive build.sh script for easy building and switching:

# Run the interactive build manager
./build.sh

The script will present you with:

  1. A list of available devices to choose from
  2. 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
  3. 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.

Hardware Changes

When you change your desktop hardware (new GPU, motherboard, etc.):

  1. For basic hardware changes (CPU, RAM, storage):

    • Use the "Regenerate hardware configuration" option in build.sh
    • This runs nixos-generate-config to detect new hardware
    • Updates hardware-configuration.nix with new hardware detection
  2. For firmware/driver changes (NVIDIA GPU, bootloader, etc.):

    • Recommended: Run a fresh GLFOS installer
    • The installer generates both hardware-configuration.nix AND firmware-configuration.nix
    • Gets you the latest GLF optimizations and driver configurations
    • Ensures proper NVIDIA setup, bootloader config, and other firmware-specific settings

Notes

o

About

Owning multiple linux daily drivers, I want to achieve workflow parity to get closer to my ideal LifeOS which automates everything for me and tells me what to do to GTD and health-maxx. NixOS, being declarative, sounds like the perfect option. But I have no experience in it, so this repo will contain the history of me being a stupid chud -> pro!

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages