mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 03:27:45 +00:00
Update docs
This commit is contained in:
parent
655c48309e
commit
a10628027d
2 changed files with 14 additions and 9 deletions
17
README.md
17
README.md
|
@ -7,14 +7,19 @@ This repository contains my NixOS configurations for all my machines.
|
|||
Here is the script you need to run to get this working:
|
||||
|
||||
> [!IMPORTANT]
|
||||
> You **WILL NEED** `/etc/nixos/hardware-configuration.nix`, as this configuration
|
||||
> imports it, so you will need to run `sudo nixos-generate-config` if you've deleted them.
|
||||
> You will need to have an SSH key to authorize GitHub with,
|
||||
> and have access to the Ghostty GitHub repository as I
|
||||
> use Ghostty and Ghostty is in private beta at the moment.
|
||||
|
||||
```sh
|
||||
TODO
|
||||
sudo nix-shell --packages git nu nix-output-monitor --command "
|
||||
git clone https://github.com/RGBCube/NixOSConfiguration ~/Configuration
|
||||
cd ~/Configuration
|
||||
nu rebuild.nu <host>
|
||||
"
|
||||
```
|
||||
|
||||
`machine-name` is a machine selected from the machines in the `machines` directory.
|
||||
`host` is a host selected from the hosts in the `hosts` directory.
|
||||
|
||||
## Applying Changes
|
||||
|
||||
|
@ -37,13 +42,13 @@ This outputs:
|
|||
|
||||
```
|
||||
Usage:
|
||||
> rebuild.nu (machine) ...(arguments)
|
||||
> rebuild.nu (host) ...(arguments)
|
||||
|
||||
Flags:
|
||||
-h, --help - Display the help message for this command
|
||||
|
||||
Parameters:
|
||||
machine <string>: The machine to build. (optional, default: '')
|
||||
host <string>: The host to build. (optional, default: '')
|
||||
...arguments <any>: The arguments to pass to `nix system apply`.
|
||||
```
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#!/usr/bin/env nu
|
||||
|
||||
def complete [] {
|
||||
ls machines | get name | each { $in | str replace "machines/" "" }
|
||||
ls hosts | get name | each { $in | str replace "hosts/" "" }
|
||||
}
|
||||
|
||||
def main --wrapped [
|
||||
machine: string@complete = "" # The machine to build.
|
||||
host: string@complete = "" # The host to build.
|
||||
...arguments # The arguments to pass to `nix system apply`.
|
||||
] {
|
||||
let flags = [
|
||||
$"--flake ('.#' + $machine)"
|
||||
$"--flake ('.#' + $host)"
|
||||
"--option accept-flake-config true"
|
||||
"--log-format internal-json"
|
||||
] | append $arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue