2024-10-25 10:41:45 -05:00
|
|
|
<div align="center">
|
2024-10-25 10:43:35 -05:00
|
|
|
|
2024-10-25 10:41:45 -05:00
|
|
|
<h1>
|
2024-10-25 10:42:32 -05:00
|
|
|
<img width="100" src="images/Nix_snowflake_lytedev.svg" /> <br>
|
2024-10-25 10:43:35 -05:00
|
|
|
Nix for <code>lytedev</code>
|
2024-10-25 10:41:45 -05:00
|
|
|
</h1>
|
2023-09-04 11:40:30 -05:00
|
|
|
|
2024-08-30 13:03:23 -05:00
|
|
|
[![flake check status](https://git.lyte.dev/lytedev/nix/badges/workflows/nix-flake-check.yaml/badge.svg)](https://git.lyte.dev/lytedev/nix/actions?workflow=nix-flake-check.yaml)
|
|
|
|
[![build status](https://git.lyte.dev/lytedev/nix/badges/workflows/nix-build.yaml/badge.svg)](https://git.lyte.dev/lytedev/nix/actions?workflow=nix-build.yaml)
|
2024-07-30 17:10:52 -05:00
|
|
|
|
2024-10-25 10:43:35 -05:00
|
|
|
</div>
|
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
My grand, declarative, and unified application, service, environment, and
|
|
|
|
machine configuration, secret, and package management in a single flake. ❤️ ❄️
|
2023-09-06 00:14:34 -05:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
**NOTE**: Everything in here is highly specific to my personal preference. I
|
|
|
|
can't recommend you actually use this in any way, but hopefully some stuff in
|
|
|
|
here is useful inspiration.
|
2023-09-06 00:14:34 -05:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
# Quick Start
|
2023-09-04 11:49:33 -05:00
|
|
|
|
2023-10-20 16:24:50 -05:00
|
|
|
```shell_session
|
|
|
|
$ nixos-rebuild switch --flake git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}
|
|
|
|
```
|
|
|
|
|
2023-11-21 14:59:08 -06:00
|
|
|
You don't have even have to clone this crap yourself. How cool is that! But if you do, it looks like this:
|
2023-09-06 00:14:34 -05:00
|
|
|
|
2023-11-21 14:59:08 -06:00
|
|
|
```shell_session
|
|
|
|
$ nixos-rebuild switch --flake ./repo/dir/for/nix#${FLAKE_ATTR}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Secrets
|
|
|
|
|
2023-10-03 16:26:45 -05:00
|
|
|
If you're deploying anything secrets-related, you will need the proper keys:
|
|
|
|
|
|
|
|
```shell_session
|
|
|
|
$ mkdir -p ${XDG_CONFIG_HOME:-~/.config}/sops/age
|
|
|
|
$ pass age-key >> ${XDG_CONFIG_HOME:-~/.config}/sops/age/keys.txt
|
2023-09-19 20:57:24 -05:00
|
|
|
```
|
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
## NixOS
|
2023-09-04 11:40:30 -05:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
```shell_session
|
2024-02-23 10:35:41 -06:00
|
|
|
$ nixos-rebuild switch --flake .
|
2023-09-06 00:14:34 -05:00
|
|
|
```
|
2023-09-04 11:40:30 -05:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
## Not NixOS
|
2023-09-04 11:40:30 -05:00
|
|
|
|
2024-02-23 10:35:41 -06:00
|
|
|
**NOTE**: I pretty much solely use Home Manager as a NixOS module presently, so
|
|
|
|
this is not fully supported.
|
2023-11-21 14:59:08 -06:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
```shell_session
|
|
|
|
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
2024-02-23 10:35:41 -06:00
|
|
|
$ nix run github:nix-community/home-manager switch --flake git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}
|
2023-09-04 11:49:33 -05:00
|
|
|
```
|
|
|
|
|
2023-11-21 14:59:08 -06:00
|
|
|
# Internal/Advanced Usage
|
2023-11-03 16:56:45 -05:00
|
|
|
|
2023-11-21 14:59:08 -06:00
|
|
|
See [lib/internal.md](./lib/internal.md).
|
2023-11-03 16:56:45 -05:00
|
|
|
|
2023-09-15 11:16:38 -05:00
|
|
|
# To Do
|
2023-09-04 11:40:30 -05:00
|
|
|
|
2023-10-05 10:41:31 -05:00
|
|
|
## Short Term
|
|
|
|
|
2023-11-21 10:06:10 -06:00
|
|
|
- more-easily manage gitea repo mirroring to github?
|
2023-10-10 22:56:48 -05:00
|
|
|
- router https://github.com/breakds/nixos-routers/blob/main/machines/welderhelper/router.nix
|
2023-10-06 23:56:28 -05:00
|
|
|
- a.lyte.dev for web analytics
|
|
|
|
- grafana and stuff for monitoring
|
|
|
|
- alerts?
|
|
|
|
- Broot config?
|
2023-10-05 10:41:31 -05:00
|
|
|
|
|
|
|
## Long Term
|
|
|
|
|
2023-10-06 20:11:44 -05:00
|
|
|
- nix-darwin for work profile(s)
|
|
|
|
- https://medium.com/@zmre/nix-darwin-quick-tip-activate-your-preferences-f69942a93236
|