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

chillcicada/nixos-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS-config

Stargazers

This repo stores some cc's nixos and home-manager configurations.

Hint: this repo contains my hardware configuration, you shouldn't directly use the config to build your system.

Run just --list to see all recipes.

Below are some miscellaneous notes.


Set a temporary proxy for nix-daemon:

#!/usr/bin/env bash
mkdir /run/systemd/system/nix-daemon.service.d
cat > /run/systemd/system/nix-daemon.service.d/override.conf << EOF
[Service]
Environment="http_proxy=<your_proxy>"
Environment="https_proxy=<your_proxy>"
Environment="all_proxy=<your_proxy>"
EOF
systemctl daemon-reload
systemctl restart nix-daemon

Format the repo:

treefmt

Clean the machine:

nh clean all

Get the dependency graph of a package:

nix-store --gc --print-roots | rg -v '/proc/' | rg -Po '(?<= -> ).*' | xargs -o nix-tree

Then type / and the package name to get the dependency graph.

This nixos config is designed to build remote nixos system on a local machine, use

just push <remote-host>

Here the <remote-host> is the hostname of the remote machine, which is defined in ssh config, and the recipe is a wrapper of the following command:

nixos-rebuild --target-host {{TARGET}} --use-remote-sudo switch --flake

License

GLWTS