mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 14:35:37 +00:00
start working on readme table
fill out readme table more readme links and move installation clean up add more flake comments hosts and modules readmes fix: macos readme link switch links to relative file
This commit is contained in:
parent
514244476d
commit
b06b6490f4
118
README.md
118
README.md
@ -6,21 +6,56 @@ hosts.
|
||||
They are organized and managed by [Nix](https://nixos.org), so some of the
|
||||
configuration may be difficult to translate to a non-Nix system.
|
||||
|
||||
However, some of the configurations are easier to lift directly:
|
||||
## System Features
|
||||
|
||||
- [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/common/neovim/config)
|
||||
- [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/common/shell/fish/functions)
|
||||
- [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/fish/default.nix)
|
||||
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/git.nix)
|
||||
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) |
|
||||
| Window Manager | [i3](https://i3wm.org/) | [Link](./modules/nixos/graphical/i3.nix) |
|
||||
| Panel | [Polybar](https://polybar.github.io/) | [Link](./modules/nixos/graphical/polybar.nix) |
|
||||
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./modules/nixos/graphical/fonts.nix) |
|
||||
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./modules/nixos/graphical/rofi.nix) |
|
||||
|
||||
Try out my Neovim config (requires [nix](https://nixos.org/download.html)):
|
||||
## User Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
||||
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix)
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./modules/common/applications/nautilus.nix) |
|
||||
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./modules/common/applications/media.nix) |
|
||||
| Video Player | [mpv](https://mpv.io/) | [Link](./modules/common/applications/media.nix) |
|
||||
|
||||
## macOS Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
| --- | --- | --- |
|
||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Click [here](./docs/installation.md) for detailed installation instructions.
|
||||
|
||||
# Neovim
|
||||
|
||||
Try out my Neovim config with nix:
|
||||
|
||||
```bash
|
||||
nix run github:nmasur/dotfiles#neovim
|
||||
```
|
||||
|
||||
Or build it as a package (requires [nix](https://nixos.org/download.html)):
|
||||
Or build it as a package:
|
||||
|
||||
```bash
|
||||
nix build github:nmasur/dotfiles#neovim
|
||||
@ -30,73 +65,6 @@ If you already have a Neovim configuration, you may need to move it out of
|
||||
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
||||
configs might conflict with each other.
|
||||
|
||||
---
|
||||
|
||||
# Full Installation
|
||||
|
||||
## 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 nixVersions.stable
|
||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
||||
```
|
||||
|
||||
## NixOS - From Existing System
|
||||
|
||||
If you're already running NixOS, you can switch to this configuration with the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
nix-shell -p nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
||||
```
|
||||
|
||||
## 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 nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
||||
```
|
||||
|
||||
You should also download the
|
||||
[FiraCode](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip)
|
||||
font and install it on Windows. Install [Alacritty](https://alacritty.org/) and
|
||||
move the `windows/alacritty.yml` file to
|
||||
`C:\Users\<user>\AppData\Roaming\alacritty`.
|
||||
|
||||
## 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 github:nmasur/dotfiles#lookingglass
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Flake Templates
|
||||
|
||||
You can also use the [templates](./templates/) as flakes for starting new
|
||||
|
67
docs/installation.md
Normal file
67
docs/installation.md
Normal file
@ -0,0 +1,67 @@
|
||||
[Back to README](../README.md)
|
||||
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
## 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 nixVersions.stable
|
||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
||||
```
|
||||
|
||||
## NixOS - From Existing System
|
||||
|
||||
If you're already running NixOS, you can switch to this configuration with the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
nix-shell -p nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
||||
```
|
||||
|
||||
## 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 nixVersions.stable
|
||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
||||
```
|
||||
|
||||
You should also download the
|
||||
[FiraCode](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip)
|
||||
font and install it on Windows. Install [Alacritty](https://alacritty.org/) and
|
||||
move the `windows/alacritty.yml` file to
|
||||
`C:\Users\<user>\AppData\Roaming\alacritty`.
|
||||
|
||||
## 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 github:nmasur/dotfiles#lookingglass
|
||||
```
|
||||
|
15
flake.nix
15
flake.nix
@ -16,7 +16,7 @@
|
||||
# Used for Windows Subsystem for Linux compatibility
|
||||
wsl.url = "github:nix-community/NixOS-WSL";
|
||||
|
||||
# Used for user packages
|
||||
# Used for user packages and dotfiles
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows =
|
||||
@ -134,6 +134,8 @@
|
||||
|
||||
in rec {
|
||||
|
||||
# Contains my full system builds, including home-manager
|
||||
# nixos-rebuild switch --flake .#tempest
|
||||
nixosConfigurations = {
|
||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
||||
@ -141,6 +143,8 @@
|
||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
||||
};
|
||||
|
||||
# Contains my full Mac system builds, including home-manager
|
||||
# darwin-rebuild switch --flake .#lookingglass
|
||||
darwinConfigurations = {
|
||||
lookingglass =
|
||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||
@ -155,23 +159,24 @@
|
||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||
};
|
||||
|
||||
# Disk formatting
|
||||
# Disk formatting, only used once
|
||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||
|
||||
# Package servers into images with a generator
|
||||
# Other packages, such as system images or programs
|
||||
packages = forAllSystems (system: {
|
||||
|
||||
# Package servers into images with a generator
|
||||
aws = {
|
||||
"${system}" =
|
||||
import ./generators/aws { inherit inputs globals system overlays; };
|
||||
};
|
||||
|
||||
staff = {
|
||||
"${system}" = import ./generators/staff {
|
||||
inherit inputs globals system overlays;
|
||||
};
|
||||
};
|
||||
|
||||
# Package Neovim config into standalone package
|
||||
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in import ./modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
@ -181,6 +186,7 @@
|
||||
|
||||
});
|
||||
|
||||
# Programs that can be run by calling this flake
|
||||
apps = forAllSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
@ -193,6 +199,7 @@
|
||||
};
|
||||
in import ./apps { inherit pkgs; });
|
||||
|
||||
# Development environments
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in {
|
||||
|
10
hosts/README.md
Normal file
10
hosts/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# Hosts
|
||||
|
||||
| Host | Purpose |
|
||||
| --- | --- |
|
||||
| [flame](./flame/default.nix) | Oracle cloud server |
|
||||
| [hydra](./hydra/default.nix) | WSL config |
|
||||
| [lookingglass](./lookingglass/default.nix) | Work macOS |
|
||||
| [swan](./swan/default.nix) | Home NAS and server |
|
||||
| [tempest](./tempest/default.nix) | Desktop |
|
||||
|
8
modules/README.md
Normal file
8
modules/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Modules
|
||||
|
||||
| Module | Purpose |
|
||||
| --- | --- |
|
||||
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
||||
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
||||
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
||||
|
Loading…
Reference in New Issue
Block a user