Skip to content
Open

Next #68

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d835bab
fix nvim command line history navigation
mstream Jan 8, 2025
e9fb029
tune cmp behaviour
mstream Jan 9, 2025
e0fa0e5
refactor
mstream Jan 9, 2025
0531039
add shortcuts configuration
mstream Jan 21, 2025
7741689
disable mission control gestures when aerospace is enabled
mstream Jan 22, 2025
1ba30bb
add check to prevent leaving flake debug mode accidentaly enabled
mstream Jan 22, 2025
ff4f2ba
rewrite all key mappings into module options
mstream Jan 23, 2025
deaf0d1
improve lua code generation
mstream Jan 27, 2025
2deedda
WIP
mstream Feb 2, 2025
315e157
make git not ignore filename case
mstream Feb 7, 2025
5068e4e
add markdown code generation
mstream Feb 9, 2025
117d001
improve documentation generation
mstream Feb 19, 2025
4efb604
update dependencies
mstream Feb 19, 2025
591d0d3
enable all performance improvement neovim options
mstream Feb 19, 2025
d664575
add lsp-status nvim plugin
mstream Feb 22, 2025
e0be632
add nvim plugin compilation
mstream Apr 2, 2025
3833822
implement automatic flake inputs generation
mstream Apr 17, 2025
5aaf9f4
enable vim plugins combination
mstream Apr 17, 2025
4a97ff4
increase nix download buffer size
mstream Apr 17, 2025
41cc7df
add a just recipe for updating flake inputs
mstream Apr 19, 2025
20384cb
disabling zsh completion source
mstream Apr 19, 2025
44a9799
alacritty hints
mstream Apr 19, 2025
b77a942
revert alacrity back to default hints config
mstream Apr 20, 2025
2e532ad
add generation of documentation
mstream Apr 20, 2025
065f812
fix aws abbreviation
mstream Apr 24, 2025
98094bf
add neoscroll nvim plugin
mstream Apr 25, 2025
5e9ac73
streamline zsh history scrolling keys
mstream Apr 26, 2025
63708cb
optimize nix daemon
mstream Apr 28, 2025
95aaee6
wip
mstream Apr 29, 2025
b11b7a1
automate nixos version upgrades
mstream May 21, 2025
1647fd0
add zellij keymappings documentation
mstream May 29, 2025
f7f58e7
add chad-library documentation generation
mstream May 30, 2025
6dfacc6
fix linting issues
mstream May 30, 2025
2b04b06
fix options documentation links
mstream May 31, 2025
9732b72
make darwin-rebuild run as root
mstream May 31, 2025
09116f5
switch expanduser to user name interpolation in activation scripts
mstream May 31, 2025
ebcc167
update flake inputs
mstream May 31, 2025
9bfbe67
dissable zellij's welcome screen
mstream Jun 1, 2025
ad31902
fix CI unit test runs
mstream Jun 1, 2025
89fc7f9
change aerospace layout to tiles on startup
mstream Jun 7, 2025
e281432
increase terminal transparency
mstream Jun 7, 2025
f52594c
swap ssh keys based on git url instead of gitdir
mstream Jun 18, 2025
bff8172
add purescript code formatter
mstream Jun 29, 2025
e7b1d0b
add purescript code formatter
mstream Jun 29, 2025
e3acbcc
add custom key mapping for nvim trouble plugin
mstream Jul 3, 2025
a062688
scrolling animation improvements
mstream Jul 4, 2025
bb68acd
decrease the opacity of allacrity
mstream Jul 9, 2025
dbbdc2c
implement nvim jumping to next diagnostic message
mstream Aug 10, 2025
ee88253
disable terminal's new tab creation shortcut
mstream Aug 10, 2025
9afa973
address linting problems
mstream Sep 14, 2025
fff3f49
Merge remote-tracking branch 'origin/next' into next
mstream Sep 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
strict_env
watch_file partitions/development/**/*
use flake
14 changes: 8 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ jobs:
linting-and-testing:
runs-on: ubuntu-24.04
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Nix
uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/
nix_path: nixpkgs=channel:nixos-24.11
nix_path: nixpkgs=channel:nixos-
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up direnv
uses: HatsuneMiku3939/direnv-action@v1
- name: Run tests and linters
run: nix develop --command just validate-project
run: nix develop --command just --list && nix develop --command just validate-project
- name: Generate documentation markdown documents
run: nix develop --command just generate-documentation
- name: Check if all generated files have been already commited
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__
.psc-ide-port
**/flake.backup.nix
just-flake.just
mermaid-filter.err
node_modules
Expand Down
76 changes: 52 additions & 24 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

______________________________________________________________________

![nix-chad logo](nix-chad.png)
![nix-chad logo](./assets/nix-chad.png)

An opinionated MacOS setup focused on software development.
An opinionated macOS setup focused on software development.

## Features

Expand All @@ -21,30 +21,30 @@ appears.

#### programming/configuration languages support

![nvim dhall example screenshot](nvim-dhall-example.png)

| language | actions | completion | diagnostics | formatting | highlighting |
| :--------- | :-----: | :--------: | :---------: | :--------: | :----------: |
| bash | | | | | |
| dhall | | | | | |
| docker | || || |
| GitHub Actions workflow | | | | | |
| html | | | | | |
| java | | | | | |
| json | | | | | |
| javascript | || || |
| lua | || || |
| markdown | || || |
| nix | | | | | |
| purescript | || || |
| python | || || |
| typescript | || || |
| yaml | | | | | |
![nvim dhall example screenshot](./assets/nvim-dhall-example.png)

| language | actions | completion | diagnostics | formatting | highlighting |
| :---------------------- | :-----: | :--------: | :---------: | :--------: | :----------: |
| bash | ☒ | | ☑ | | |
| dhall | ☒ | | ☑ | | |
| docker | | ☒ | | | ☑ |
| GitHub Actions workflow | | | ☑ | | |
| html | ☒ | | ☑ | | |
| java | ☒ | | ☑ | | |
| json | ☒ | | ☑ | | |
| javascript | | ☑ | | | ☑ |
| lua | | ☑ | | | ☑ |
| markdown | | ☑ | | | ☑ |
| nix | ☒ | | ☑ | | |
| purescript | | ☑ | | | ☑ |
| python | | ☑ | | | ☑ |
| typescript | | ☑ | | | ☑ |
| yaml | ☑ | | ☑ | | |

#### discoverable key mappings

After pressing `\` key a window enumerating all key mappings appears.
The same windows shows when user starts but does not finish a key
The same window shows when user starts but does not finish a key
sequence which has some action assigned to it.

## Prerequisites
Expand All @@ -63,7 +63,7 @@ nix flake init --template github:mstream/nix-chad/main#default

### Tweaking

Update any config entries to your liking like in
Update any config entries to your liking, like in
[this](https://github.com/mstream/nix-chad/blob/main/examples/custom/flake.nix) example.

### Applying
Expand All @@ -75,9 +75,37 @@ After any change to configuration, run from the directory where
nix run .#switch
```

#### Warning

While it is easy to roll back unwanted/broken configuration by either
reverting your configuration changes or using a different `nix-chad`
flake revision, there are some classes of misconfigurations that are
more difficult to undo.

One of them is one that results in an error during ZSH shell
initialization. If that results in, e.g. `PATH` environmental variable
not being properly set, you may lose easy access to your binaries.

In this situation, to recover back to working state, you may need to:
- switch to Bash using an absolute binary path
- use GUI tools (maybe enough to edit but not enough to rebuild Nix
configuration)
- set `PATH` environmental variable manually (requires knowledge about
Nix)
- install needed binaries without nix (an overkill just for recovery)
- using absolute `nix store` paths (very fiddly)

None of these options are convenient and most of them require
relatively broad administrative knowledge. Thus, **after every switch,
it is highly recommended to:**
- leave current shell session open
- create a new one,
- observe if initialization scripts do not produce any errors,
- and if so, use the previous session to fix the issues

## Updating

To stay up to date witch changes to Nix Chad, run periodically:
To stay up-to-date witch changes to Nix Chad, run periodically:

```bash
nix flake update
Expand Down
20 changes: 12 additions & 8 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
# Reference Guide

- [Options](options.generated.md)

- [Key Mappings](keymaps.generated.md)

- [For Developers](for-developers/README.md)

- [Library](for-developers/library.generated.md)

______________________________________________________________________

[Contributors](contributors.md)
- [Chad Library](for-developers/chad-library/README.md)
- [attribute sets (attrsets)](for-developers/chad-library/attrsets.md)
- [bash code generation helpers (bash)](for-developers/chad-library/bash.md)
- [various constants (constants)](for-developers/chad-library/constants.md)
- [enumerations (enum)](for-developers/chad-library/enum.md)
- [functions (functions)](for-developers/chad-library/functions.md)
- [lists manipulation (lists)](for-developers/chad-library/lists.md)
- [lua code generation helpers (lua)](for-developers/chad-library/lua.md)
- [markdown code generation helpers (markdown)](for-developers/chad-library/markdown.md)
- [nix CLI bash command generation helpers (nixCli)](for-developers/chad-library/nix-cli.md)
- [macOS keyboard shortcuts configuration support (shortcuts)](for-developers/chad-library/shortcuts.md)
- [strings manipulation (strings)](for-developers/chad-library/strings.md)
File renamed without changes
File renamed without changes
29 changes: 28 additions & 1 deletion docs/for-developers/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# For Developers

Bla bla bla
## Flake inputs

### Choosing version

Since this project uses flake-parts partitions module, flake inputs
are stored separately per each partition. This introduces possibility
of using different versions of inputs when evaluating different
flake output attributes. This is possible even when inputs share a
reference to the same branch. This is because commit revision is being
resolved and stored in the repo at the time of running `nix flake lock`
command, and this may happen at different times. In order to guarantee
that they share the same versions, use these rules:

1. If the input repository uses tags - use them.
1. If the input repository does not use tags - use commit hashes.
1. For `nixpkgs` use commit hashes from the branch which is appropriate for this project, namely `nixpkgs-{NIXOS_RELEASE_VERSION}-darwin`.
1. For `home-manager` use commit hashes from the branch which corresponds to the `nixpkgs` version, namely `release-${NIXOS_RELEASE_VERSION}`.
1. For `nix-darwin` use commit hashes from the branch which corresponds to the `nixpkgs` version, namely `nix-darwin-${NIXOS_RELEASE_VERSION}`.
1. For `nixvim` use commit hashes from the branch which corresponds to the `nixpkgs` version, namely `nixos-${NIXOS_RELEASE_VERSION}`.

### Control version of transitive dependencies

For each input of a flake type, identify its dependencies, define them
as this project's inputs and make them being used by the input with the
help of `inputs.{NAME_OF_TRANSITIVE_INPUT}.follows` property.



24 changes: 24 additions & 0 deletions docs/for-developers/chad-library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Chad Library

- [attrsets](./attrsets.md)

- [bash](./bash.md)

- [constants](./constants.md)

- [enum](./enum.md)

- [functions](./functions.md)

- [lists](./lists.md)

- [lua](./lua.md)

- [markdown](./markdown.md)

- [nixCli](./nix-cli.md)

- [shortcuts](./shortcuts.md)

- [strings](./strings.md)

56 changes: 56 additions & 0 deletions docs/for-developers/chad-library/attrsets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# attribute sets {#sec-functions-library-attrsets}


## `lib.attrsets.generate` {#function-library-lib.attrsets.generate}

Generate an attribute set from a list of values

### Example

```nix
generate ["a" "b" "c"] (v: {"${v}1"=v;"${v}2"=v;})
=>
{a1="a";a2="a";b1="b";b2="b";c1="c";c2="c";}
```

### Type

```
generate :: [Any] -> (Any -> AttrSet) -> AttrSet
```

### Arguments

values
: List of values

generator
: A function transforming a single value into an attribute set

## `lib.attrsets.merge` {#function-library-lib.attrsets.merge}

Deep merge two attribute sets

### Example

```nix
merge {a="a";c={c1="c1";}} {b="b";c={c2="c2";}}
=>
{a="a";b="b";c={c1="c1";c2="c2";}}
```

### Type

```
merge :: AttrSet -> AttrSet -> AttrSet
```

### Arguments

left
: Left attribute set

right
: Right attribute set


Loading
Loading