Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3c338eb
docs: add examples, getting started, install, reference guide
jeffcogswell May 19, 2025
e5b18c7
fix file endings with dos2unix
zimbatm Jan 6, 2026
a6c7850
refs: add syntax on fence quotes
zimbatm Jan 6, 2026
bb656c5
refs: move repo to numtide
zimbatm Jan 6, 2026
5dbf10c
docs: remove WIP notes and fix outdated link
zimbatm Jan 6, 2026
73d8851
docs: fix broken anchor links
zimbatm Jan 6, 2026
7659a2e
docs: add nav section to control page ordering
zimbatm Jan 6, 2026
05bdd9c
docs: add homepage introduction
zimbatm Jan 6, 2026
41a9be3
docs: fix Example 1 timer system.nix code block
zimbatm Jan 6, 2026
d709280
docs: add rollback limitation warning
zimbatm Jan 6, 2026
07237bb
Revert "docs: add homepage introduction"
zimbatm Jan 6, 2026
8c99c7c
docs: add introduction page
zimbatm Jan 6, 2026
5904dd4
docs: rename install.md to requirements.md, remove duplicate content
zimbatm Jan 6, 2026
ab3dfa2
docs: standardize System Manager capitalization in prose
zimbatm Jan 6, 2026
9830862
docs: add inline code formatting for paths, commands, and attributes
zimbatm Jan 6, 2026
d465e7d
docs: improve requirements.md clarity and structure
zimbatm Jan 6, 2026
f2880ae
docs: rename requirements.md to install.md, focus on installation
zimbatm Jan 6, 2026
9b7d4bf
docs: move --sudo explanation from install.md to getting-started.md
zimbatm Jan 6, 2026
409fcb8
misc
zimbatm Jan 6, 2026
aafe36b
docs: consolidate experimental features documentation into install.md
zimbatm Jan 6, 2026
9fcb725
docs: split reference-guide.md into modular reference/ directory
zimbatm Jan 6, 2026
dc51da5
docs: complete 'Running System Manager with a remote flake' section
zimbatm Jan 6, 2026
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# system-manager
# System Manager

<img src="system-manager.svg" height="150"/>

Expand Down
22 changes: 22 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,25 @@ plugins:
type: date
fallback_to_build_date: true
- tags

nav:
- Home: index.md
- Introduction: introduction.md
- Getting Started: getting-started.md
- Installation: install.md
- Reference:
- Overview: reference/index.md
- CLI Commands: reference/cli.md
- Configuration: reference/configuration.md
- Modules: reference/modules.md
- Remote Flakes: reference/remote-flakes.md
- Blueprint: reference/blueprint.md
- Examples:
- Overview: reference/examples/index.md
- Timer: reference/examples/timer.md
- Docker: reference/examples/docker.md
- PostgreSQL: reference/examples/postgresql.md
- Nginx: reference/examples/nginx.md
- Nginx HTTPS: reference/examples/nginx-https.md
- Custom App: reference/examples/custom-app.md
- FAQ: faq.md
146 changes: 146 additions & 0 deletions docs/site/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# FAQ

## General Tips and Best Practices

### 1. Always Test in a VM First

Before applying changes to your production system, test in a safe environment:

```bash
# Build the configuration first to check for errors
nix build .#systemConfigs.default

# For actual VM testing, use a tool like NixOS's VM builder
# or test in a container/virtualized environment
```

### 2. Use Flake Inputs Follows

This ensures consistent nixpkgs versions:

```nix
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
system-manager = {
url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs
};
};
```

By default, each flake input pins its own version of its dependencies, which means you could end up with multiple versions of `nixpkgs`. The `follows` directive tells Nix to use your `nixpkgs` instead of the one bundled with System Manager, ensuring consistent package versions across your entire configuration while reducing disk usage and evaluation time.

### 3. Modular Configuration

Split your configuration into multiple files:

```
.
├── flake.nix
└── modules
├── default.nix
├── services.nix
├── packages.nix
└── users.nix
```

### 4. Check Logs

Always check systemd logs after activation:

```bash
sudo journalctl -u system-manager.target
sudo journalctl -xe
```

### 5. Garbage Collection

Regularly clean up old generations:

```bash
# Remove old system-manager profiles
sudo nix-env --profile /nix/var/nix/profiles/system-manager-profiles --delete-generations old

# Run garbage collection
sudo nix-collect-garbage -d
```

### 6. Rollback

If something goes wrong, you can rollback:

```bash
# List generations
sudo nix-env --profile /nix/var/nix/profiles/system-manager-profiles --list-generations

# Rollback to previous generation
sudo nix-env --profile /nix/var/nix/profiles/system-manager-profiles --rollback

# Activate the previous generation
nix run 'github:numtide/system-manager' -- activate --sudo
```

---

## Troubleshooting

### Service Won't Start

```bash
# Check service status
sudo systemctl status <service-name>

# View detailed logs
sudo journalctl -u <service-name> -n 50

# Check if service file exists
ls -la /etc/systemd/system/<service-name>.service
```

### Package Not Found in PATH

If you just installed System Manager, and installed a package through it, try logging out and logging back in to pick up the `PATH`.

```bash
# Check if package is in the profile
ls -la /nix/var/nix/profiles/system-manager-profiles/*/bin/

# Verify the package is in your config
cat /etc/installed-packages.txt

# Check $PATH
echo $PATH
```

### Permission Denied

Ensure you're running System Manager with sudo:

```bash
nix run 'github:numtide/system-manager' -- switch --flake . --sudo
```

### Configuration Won't Build

```bash
# Check for syntax errors
nix flake check

# Build without activation
nix build .#systemConfigs.default

# View build logs
nix log /nix/store/<hash>
```

---

## Additional Resources

- [System Manager GitHub Repository](https://github.com/numtide/system-manager)
- [System Manager Documentation](https://github.com/numtide/system-manager/tree/main/docs)
- [NixOS Module Options](https://search.nixos.org/options)
- [Nix Package Search](https://search.nixos.org/packages)
- [PR #266: User Management with Userborn](https://github.com/numtide/system-manager/pull/266)

---
Loading