mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 13:25:38 +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
|
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.
|
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)
|
| Feature | Program | Configuration |
|
||||||
- [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)
|
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||||
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/git.nix)
|
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||||
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
|
| 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
|
```bash
|
||||||
nix run github:nmasur/dotfiles#neovim
|
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
|
```bash
|
||||||
nix build github:nmasur/dotfiles#neovim
|
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
|
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
||||||
configs might conflict with each other.
|
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
|
# Flake Templates
|
||||||
|
|
||||||
You can also use the [templates](./templates/) as flakes for starting new
|
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
|
# Used for Windows Subsystem for Linux compatibility
|
||||||
wsl.url = "github:nix-community/NixOS-WSL";
|
wsl.url = "github:nix-community/NixOS-WSL";
|
||||||
|
|
||||||
# Used for user packages
|
# Used for user packages and dotfiles
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows =
|
inputs.nixpkgs.follows =
|
||||||
@ -134,6 +134,8 @@
|
|||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
|
# Contains my full system builds, including home-manager
|
||||||
|
# nixos-rebuild switch --flake .#tempest
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
||||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
||||||
@ -141,6 +143,8 @@
|
|||||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Contains my full Mac system builds, including home-manager
|
||||||
|
# darwin-rebuild switch --flake .#lookingglass
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
lookingglass =
|
lookingglass =
|
||||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||||
@ -155,23 +159,24 @@
|
|||||||
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disk formatting
|
# Disk formatting, only used once
|
||||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||||
|
|
||||||
# Package servers into images with a generator
|
# Other packages, such as system images or programs
|
||||||
packages = forAllSystems (system: {
|
packages = forAllSystems (system: {
|
||||||
|
|
||||||
|
# Package servers into images with a generator
|
||||||
aws = {
|
aws = {
|
||||||
"${system}" =
|
"${system}" =
|
||||||
import ./generators/aws { inherit inputs globals system overlays; };
|
import ./generators/aws { inherit inputs globals system overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
staff = {
|
staff = {
|
||||||
"${system}" = import ./generators/staff {
|
"${system}" = import ./generators/staff {
|
||||||
inherit inputs globals system overlays;
|
inherit inputs globals system overlays;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Package Neovim config into standalone package
|
||||||
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in import ./modules/common/neovim/package {
|
in import ./modules/common/neovim/package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
@ -181,6 +186,7 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Programs that can be run by calling this flake
|
||||||
apps = forAllSystems (system:
|
apps = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@ -193,6 +199,7 @@
|
|||||||
};
|
};
|
||||||
in import ./apps { inherit pkgs; });
|
in import ./apps { inherit pkgs; });
|
||||||
|
|
||||||
|
# Development environments
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system overlays; };
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in {
|
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