Skip to content

Commit

Permalink
feat(flake): implement direnv and default rocket
Browse files Browse the repository at this point in the history
  • Loading branch information
airone01 committed Dec 2, 2024
1 parent 7322c55 commit 0c8315a
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 43 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
79 changes: 46 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ A modular and extensible NixOS configuration system using a custom star-based ar
- 📦 Multiple machine configurations
- 🔄 Automated formatting and checks
- 💾 ISO generation capabilities
- 📁 Direnv support

## 🏗️ Structure

Expand Down Expand Up @@ -57,32 +58,38 @@ A modular and extensible NixOS configuration system using a custom star-based ar
### Installation

1. Install the `just` command runner:

```bash
nix-env -iA nixpkgs.just
```

2. Bootstrap a new system:

```bash
just bootstrap <hostname>
```

This will:

- Set up the nix channels
- Install required tools
- Clone the repository
- Prepare the system for configuration

3. Generate SOPS key (if using secrets):

```bash
just sops-key
```

4. Review and modify the configuration:

- Choose or create a constellation in `constellations/`
- Modify `flake.nix` to include your system
- Adjust hardware configuration as needed

5. Deploy the configuration:

```bash
just switch <hostname>
```
Expand Down Expand Up @@ -177,16 +184,19 @@ Secrets are managed using sops-nix with age encryption:
## 📦 Machines

### aquarius

- Purpose: Home server
- Services: Caddy, planned hosting for various services
- Status: Active

### cassiopeia

- Purpose: Desktop workstation
- Features: GNOME desktop, development tools
- Status: Active

### ursamajor

- Purpose: Installation ISO
- Features: Basic system for testing and installation
- Status: In Development
Expand All @@ -199,13 +209,15 @@ This is my flake and it's mainly personal but contributions are welcome if you h
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run the following checks:

```bash
# Format code
just fmt

# Verify builds
just check
```

5. Commit your changes (following commitlint conventions)
6. Push to your branch
7. Open a Pull Request
Expand All @@ -226,41 +238,42 @@ Scopes: See `.commitlintrc.yml` for valid scopes

## 📋 Roadmap

| Category | Task | Priority | Status |
|----------|------|----------|--------|
| Documentation | Add installation guides for each constellation | High | 🟡 Pending |
| Documentation | Add architecture diagrams | Medium | 🔴 Not Started |
| Documentation | Create contribution guidelines | Medium | 🔴 Not Started |
| Testing | Add GitHub Actions workflows | High | 🔴 Not Started |
| Testing | Implement basic system tests | Medium | 🔴 Not Started |
| Testing | Add Nix formatting checks | High | 🟢 Complete |
| Security | Implement firewall configuration | High | 🔴 Not Started |
| Security | Add fail2ban configuration | Medium | 🔴 Not Started |
| Security | Configure automatic security updates | High | 🔴 Not Started |
| Security | Implement SSH hardening | High | 🔴 Not Started |
| Backup | Add restic/borgbackup configuration | High | 🔴 Not Started |
| Monitoring | Set up Prometheus + Grafana | Medium | 🔴 Not Started |
| Updates | Configure automatic system updates | Medium | 🔴 Not Started |
| Infrastructure | Add Hydra instance | Low | 🔴 Not Started |
| Infrastructure | Add TeamCity instance | Low | 🔴 Not Started |
| Infrastructure | Add Attic binary cache | Medium | 🔴 Not Started |
| Infrastructure | Add Mastodon instance | Low | 🔴 Not Started |
| Infrastructure | Add Matrix instance | Low | 🔴 Not Started |
| Infrastructure | Add Lemmy instance | Low | 🔴 Not Started |
| Infrastructure | Add Invidious instance | Low | 🔴 Not Started |
| Infrastructure | Add SearXNG instance | Medium | 🔴 Not Started |
| Infrastructure | Add Gitea instance | Medium | 🔴 Not Started |
| Infrastructure | Add Jellyfin instance | Low | 🔴 Not Started |
| Infrastructure | Add Vaultwarden instance | Low | 🔴 Not Started |
| Infrastructure | Add Home Assistant instance | Low | 🔴 Not Started |
| Infrastructure | Add Paperless-ngx instance | Low | 🔴 Not Started |
| Infrastructure | Add Syncthing instance | Low | 🔴 Not Started |
| Infrastructure | Add Calibre-Web instance | Low | 🔴 Not Started |
| Infrastructure | Add Photoprism instance | Low | 🔴 Not Started |
| Architecture | Task runner implementation | High | 🟢 Complete |
| Architecture | Figuring all of this out | High | 🟣 Always going on |
| Category | Task | Priority | Status |
| -------------- | ---------------------------------------------- | -------- | ------------------ |
| Documentation | Add installation guides for each constellation | High | 🟡 Pending |
| Documentation | Add architecture diagrams | Medium | 🔴 Not Started |
| Documentation | Create contribution guidelines | Medium | 🔴 Not Started |
| Testing | Add GitHub Actions workflows | High | 🔴 Not Started |
| Testing | Implement basic system tests | Medium | 🔴 Not Started |
| Testing | Add Nix formatting checks | High | 🟢 Complete |
| Security | Implement firewall configuration | High | 🔴 Not Started |
| Security | Add fail2ban configuration | Medium | 🔴 Not Started |
| Security | Configure automatic security updates | High | 🔴 Not Started |
| Security | Implement SSH hardening | High | 🔴 Not Started |
| Backup | Add restic/borgbackup configuration | High | 🔴 Not Started |
| Monitoring | Set up Prometheus + Grafana | Medium | 🔴 Not Started |
| Updates | Configure automatic system updates | Medium | 🔴 Not Started |
| Infrastructure | Add Hydra instance | Low | 🔴 Not Started |
| Infrastructure | Add TeamCity instance | Low | 🔴 Not Started |
| Infrastructure | Add Attic binary cache | Medium | 🔴 Not Started |
| Infrastructure | Add Mastodon instance | Low | 🔴 Not Started |
| Infrastructure | Add Matrix instance | Low | 🔴 Not Started |
| Infrastructure | Add Lemmy instance | Low | 🔴 Not Started |
| Infrastructure | Add Invidious instance | Low | 🔴 Not Started |
| Infrastructure | Add SearXNG instance | Medium | 🔴 Not Started |
| Infrastructure | Add Gitea instance | Medium | 🔴 Not Started |
| Infrastructure | Add Jellyfin instance | Low | 🔴 Not Started |
| Infrastructure | Add Vaultwarden instance | Low | 🔴 Not Started |
| Infrastructure | Add Home Assistant instance | Low | 🔴 Not Started |
| Infrastructure | Add Paperless-ngx instance | Low | 🔴 Not Started |
| Infrastructure | Add Syncthing instance | Low | 🔴 Not Started |
| Infrastructure | Add Calibre-Web instance | Low | 🔴 Not Started |
| Infrastructure | Add Photoprism instance | Low | 🔴 Not Started |
| Architecture | Task runner implementation | High | 🟢 Complete |
| Architecture | Figuring all of this out | High | 🟣 Always going on |

Legend:

- 🟢 Complete
- 🟡 In Progress/Partial
- 🔴 Not Started
Expand Down
1 change: 0 additions & 1 deletion constellations/cassiopeia/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
boot-plymouth
cli-btop
cli-eza
cli-just
cli-nvim
cli-oh-my-posh
cli-zellij
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@

# Rockets
devShells = eachSystem (system: {
default = import ./rockets {inherit system nixpkgs;};
commitlint = import ./rockets/commitlint.nix {inherit system nixpkgs;};
tauri = import ./rockets/tauri.nix {inherit system nixpkgs;};
});
Expand Down
22 changes: 22 additions & 0 deletions rockets/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
system,
nixpkgs,
...
}: let
pkgs = nixpkgs.legacyPackages.${system};

packages = with pkgs; [
# general
curl
wget
pkg-config
openssl
# nix
alejandra
# project-specific
just
];
in
pkgs.mkShell {
buildInputs = packages;
}
6 changes: 0 additions & 6 deletions stars/cli/just.nix

This file was deleted.

3 changes: 0 additions & 3 deletions stars/dev/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
packages = with pkgs; [
bat
git
nmap
# Nix formatter
alejandra
];
}
6 changes: 6 additions & 0 deletions stars/net/tools.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{pkgs, ...}: {
packages = _:
with pkgs; [
nmap
];
}

0 comments on commit 0c8315a

Please sign in to comment.