Skip to content

Commit

Permalink
Finished readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Oct 8, 2024
1 parent 1282f6a commit eaa0b9d
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 28 deletions.
77 changes: 49 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# My nix config

Repo for my nix config.
Repo for my nix config. Feel free to look around and grab anything if you
feel inspired by something.

**Features:**

- Single flake setup
- Agenix for secrets management
- Home-manager
- Modularization
- Automatic module options documentation generation at [https://nix.rasmuskirk.com/](https://nix.rasmuskirk.com/)

**Directions:**

- `configurations/home-manager`:
- Home-Manager configurations for my machines (deck, pi, and work).
Expand All @@ -17,7 +28,14 @@ Repo for my nix config.

## The Configurations

TODO!
The Home-Manager configurations are not very interesting since they mostly just
make use of the modules, but the nixos configuration has some notable features:

- [Agenix](https://github.com/ryantm/agenix) for handling secrets
- [Nixarr](https://nixarr.com/)
- Syncthing
- SSH-tunneling
- Sudo insults

## The Modules

Expand All @@ -32,49 +50,52 @@ Example follows below:

```nix
kirk = {
fonts.enable = true;
foot.enable = true;
fzf.enable = true;
git = { enable = true; userEmail = "[email protected]"; userName = "rasmus-kirk"; };
helix.enable = true;
homeManagerScripts = { enable = true; configDir = configDir; machine = machine; };
jiten.enable = true;
joshuto.enableZshIntegration = false;
kakoune.enable = true;
scripts.enable = true;
ssh = { enable = true; identityPath = "${secretDir}/id_ed25519"; };
terminalTools.enable = true;
userDirs = { enable = true; autoSortDownloads = true; };
yazi = { enable = true; configDir = configDir; };
zathura = { enable = true; darkmode = false; };
yazi = {
enable = true;
configDir = configDir;
};
git = {
enable = true;
userEmail = "[email protected]";
userName = "rasmus-kirk";
};
zsh.enable = true;
fonts.enable = true;
terminalTools.enable = true;
};
```

### Snippet from Nas/Pi's Configuration

```nix
kirk = {
terminalTools.enable = true;
fzf.enable = true;
git = { enable = true; userEmail = "[email protected]"; userName = "rasmus-kirk"; };
helix = { enable = true; installMostLsps = false; extraPackages = with pkgs; [nil marksman nodePackages_latest.bash-language-server]; };
homeManagerScripts = { enable = true; configDir = configDir; machine = machine; };
userDirs = { enable = true; autoSortDownloads = true; };
yazi = { enable = true; configDir = configDir; };
kakoune.enable = true;
ssh = { enable = true; identityPath = "${secretDir}/${machine}/ssh/id_ed25519"; };
helix = {
enable = true;
installMostLsps = false;
extraPackages = with pkgs; [nil marksman nodePackages_latest.bash-language-server];
};
yazi = {
enable = true;
configDir = configDir;
};
git = {
enable = true;
userEmail = "[email protected]";
userName = "rasmus-kirk";
};
zsh.enable = true;
fonts.enable = true;
terminalTools.enable = true;
};
```

### Importing Modules

The options that I have created allows varying behaviour between machines,
while keeping configuration duplication low. Even though the modules are
created and maintained for personal use the flake allows others to reuse
the modules if they so please.
while avoiding writing the same configuration snippets twice. Even though
the modules are created and maintained for personal use the flake allows
others to reuse the modules if they so please:

```nix
{
Expand Down
45 changes: 45 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,48 @@ This is the options documentation for my personal nix modules

- **Docs for the home manager modules** can be found [here](./home.html)
- **Docs for the nixos modules** can be found [here](./nixos.html)

### Importing Modules

The options that I have created allows varying behaviour between machines,
while avoiding writing the same configuration snippets twice. Even though
the modules are created and maintained for personal use the flake allows
others to reuse the modules if they so please:

```nix
{
description = "My Nixos configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
kirk-modules.url = "github:rasmus-kirk/nixarr/nix-configuration";
kirk-modules.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {
self,
nixpkgs,
kirk-modules,
flake-parts,
...
}: let
inherit (self) outputs;
in {
homeConfigurations = {
myMachine = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./configurations/home-manager/my-machine/home.nix
kirk-modules.homeManagerModules.default
];
};
};
};
}
```

0 comments on commit eaa0b9d

Please sign in to comment.