Skip to content

onsah/nix-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Config

This repository contains Nix configuration for my devices.

Prerequisites

Project File Structure

.
├── scripts
├── hooks
└── users/
    ├── common/
    │   └── programs
    └── $user/
        ├── programs
        └── home.nix
  • scripts: Scripts to execute configurations.
  • hooks: Git hooks.
  • users: List of user configs.
    • $user
      • home.nix: Home Manager entry to the configuration.
      • programs: Program configurations.
    • common: Configurations used accross users
      • programs: Program configurations.

Setup

You need to run setup for one time setup. It's needed for git hooks etc.

In nix shell, run ./scripts/setup.nu.

Entering to nix-shell

For the first time (Before setting up the user)

Run nix-shell in the root of the project.

After you have set your user

  1. cd into the project root.
  2. For one time, execute direnv allow

After enabling direnv once, it will automatically enter to the nix-shell whenever you cd into the directory.

Usage

Prerequisites

Setting device configuration

Use rebuild script to set NIXOS configuration. It uses the pinned channel in the repository root.

Example:

build-device devices/tuxedo-infinitybook-gen8/

Setting user configuration

Example:

build-user users/aiono-tuxedo

Formatting

format-nix-staged

You don't need to do it manually as it runs automatically pre commit after setup.

Cleaning up the Nix Store

Unfortunately Nix Store accumulates garbage as it's being used, so occasionally one needs to cleanup the store. For now there is a script for it: cleanup-nix-store.

About

My Nix configuration repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published