Skip to content

NathanFouere/nix-cfg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

206 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-cfg

Personal NixOS configuration managed with flakes. Heavily inspired by Vimjoyer work.

Installation

Using an existing host configuration

1 - Clone the repository

2 - Remove the existing hardware configuration if you want to use an already defined host:

rm -f hosts/<host>/hardware-configuration.nix

3 - Regenerate the hardware configuration if you want to use an already defined host:

sudo nixos-generate-config --show-hardware-config > hosts/<host>/hardware-configuration.nix

4 - Switch to the new configuration:

sudo nixos-rebuild switch --flake .#<host>

Creating a new host configuration

1 - Clone the repository

2 - Do ur stuff

3 - Generate the hardware configuration:

sudo nixos-generate-config --show-hardware-config > hosts/<host>/hardware-configuration.nix

4 - Switch to the new configuration:

sudo nixos-rebuild switch --flake .#<host>

Update && Upgrade

nix flake update
sudo nixos-rebuild switch --flake .#<host>

Ollama / Opencode

Connect to the host "tour" and run the following command to run opencode with ollama

ollama launch opencode

Cloud-Hypervisor

To ping a running vm from the host:

sudo ch-remote --api-socket /var/lib/microvms/{{vm-name}}/{{vm-name}}.sock ping

Get the K3S conf

source ./scripts/fetch-k3s-kubeconfig.sh

Sources

About

Personal NixOS configuration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors