mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +00:00
add proper readme file
This commit is contained in:
parent
c42b0b20be
commit
8705f2a96f
70
README.md
70
README.md
@ -1 +1,69 @@
|
||||
Test
|
||||
# Config Files
|
||||
|
||||
This repository contains configuration files for my NixOS, macOS, and WSL
|
||||
hosts.
|
||||
|
||||
---
|
||||
|
||||
## NixOS - From Live Disk
|
||||
|
||||
Format drives and build system from any NixOS host, including the live
|
||||
installer disk:
|
||||
|
||||
**This will erase your drives; use at your own risk!**
|
||||
|
||||
```bash
|
||||
lsblk # Choose the disk you want to wipe
|
||||
nix-shell -p nixFlakes
|
||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop
|
||||
```
|
||||
|
||||
## NixOS - From Existing System
|
||||
|
||||
If you're already running NixOS, you can switch to this configuration with the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
nix-shell -p nixFlakes
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#desktop
|
||||
```
|
||||
|
||||
## Windows - From NixOS WSL
|
||||
|
||||
After [installing NixOS on
|
||||
WSL](https://xeiaso.net/blog/nix-flakes-4-wsl-2022-05-01), you can switch to
|
||||
the WSL configuration:
|
||||
|
||||
```
|
||||
nix-shell -p nixFlakes
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#wsl
|
||||
```
|
||||
|
||||
## macOS
|
||||
|
||||
To get started on a bare macOS installation, first install Nix:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl -L https://nixos.org/nix/install)"
|
||||
```
|
||||
|
||||
Then use Nix to build nix-darwin:
|
||||
|
||||
```bash
|
||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
||||
./result/bin/darwin-installer
|
||||
```
|
||||
|
||||
Then switch to the macOS configuration:
|
||||
|
||||
```bash
|
||||
darwin-rebuild switch --flake .#macbook
|
||||
```
|
||||
|
||||
## Flake Templates
|
||||
|
||||
You can also use the templates as flakes for starting new projects:
|
||||
|
||||
```bash
|
||||
nix flake init --template github:nmasur/dotfiles#poetry
|
||||
```
|
||||
|
@ -56,9 +56,6 @@
|
||||
|
||||
in {
|
||||
|
||||
# You can load it from any NixOS system with:
|
||||
# nix-shell -p nixFlakes
|
||||
# sudo nixos-rebuild switch --flake github:nmasur/dotfiles#desktop
|
||||
nixosConfigurations = {
|
||||
desktop = import ./hosts/desktop {
|
||||
inherit nixpkgs home-manager nur globals wallpapers;
|
||||
@ -72,10 +69,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
# You can partition, format, and install from a live disk with:
|
||||
# nix-shell -p nixFlakes
|
||||
# nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop
|
||||
# Will erase drives; use at your own risk!
|
||||
# Format and install from nothing
|
||||
apps = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user