Skip to content

Conversation

@zimbatm
Copy link
Member

@zimbatm zimbatm commented Nov 24, 2025

Ready for high-level review

Comment on lines 50 to 52
Then answer yes to the four questions.

[TODO: I'll explore the four questions further and write a short paragraph about them]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What questions?

[2025-12-22T13:33:40Z INFO  system_manager] Initializing new system-manager configuration at '/home/zimbatm/.config/system-manager'
[2025-12-22T13:33:40Z INFO  system_manager] 1153B written to '/home/zimbatm/.config/system-manager/system.nix'
[2025-12-22T13:33:40Z INFO  system_manager] 739B written to '/home/zimbatm/.config/system-manager/flake.nix'
[2025-12-22T13:33:40Z INFO  system_manager] Configuration '/home/zimbatm/.config/system-manager' ready for activation!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These questions come up when you're working on a clean system. I'm adding them to the text right now:

  • Do you want to allow configuration setting 'extra-substituters' to be set to 'https://cache.numtide.com' (y/N)?

  • Do you want to permanently mark this value as trusted (y/N)?

  • Do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=' (y/N)?

  • Do you want to permanently mark this value as trusted (y/N)?


This will fully demonstrate the declarative nature of these configuration files.

First, in the ~/.config/system-manager folder, create a file capps apps.nix and place the following in it:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/capps//

Comment on lines 206 to 211
```nix
modules = [
./system.nix
./apps.nix
];
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use "diff" instead of "nix" as the language, you can present a diff view. That might be a bit cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Good call. I'll try that. Thanks!



```
sudo env PATH="$PATH" nix --extra-experimental-features 'nix-command flakes' run 'github:numtide/system-manager' -- switch --flake .
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch to the --sudo flag

# Getting Started

If you’ve heard of NixOS, you’ve probably heard that it lets you define your entire system in configuration files and then reproduce that system anywhere with a single command. System Manager brings that same declarative model to any Linux distribution, with no reinstalling, no switching operating systems, and no special prerequisites beyond having Nix installed. Instead of manually installing packages, editing /etc files, or configuring system services by hand, you describe the desired state of your machine in a small set of Nix files. System Manager reads that configuration, applies it safely, and keeps previous versions so you can roll back at any time. This guide introduces those ideas step by step, helping you gain the benefits of Nix-style reproducibility and consistency on the Linux system you already have.
If you’ve heard of NixOS, you’ve probably heard that it lets you define your entire system in configuration files and then reproduce that system anywhere with a single command. System Manager brings that same declarative model to any Linux distribution, with no reinstalling, no switching operating systems, and no special prerequisites beyond having Nix installed.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an asterisk to any Linux distribution to say that it's only Ubuntu for now.

The services interface also only works with Linux distributions based on systemd.


# Concepts for people new to Nix

[Not sure we want this here, or at all, but it's a start. I think this will help people who are new to Nix. If we don't want it, I'll move it to my own personal website.]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it here for now. At some point this will go to a shared website like install-nix.com

Comment on lines 568 to 570
## Thoughts on learning the Nix language

[coming soon]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this for now


# Requirements

[TODO: I realized I wrote this section twice, here and in the getting-started guide. I'll combine them and provide the same in both, since some people might just read one doc or the other.]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding an install.md document for this?

In the getting started, tell the user to start with the installation and then come back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! I'll do that.

/home/ubuntu/.nix-profile/bin/system-manager
```

[Might be nice to list some ideas about When would you install locally... I'm not sure, can anyone help?]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a strong case for this. Either it's a new project and you want to run the nix run ... -- init command, or it's an existing project, and then you want to load the system-manager version the flake input is pointing to (like by loading the devshell).


# Setting up a folder and file structure

[TEAM: SHOULD THIS GO HERE OR IN THE GETTING STARTED GUIDE? I DON'T WANT TO WEIGH DOWN THE GETTING STARTED GUIDE TOO MUCH, BUT MAYBE IT STILL BELONGS THERE? --JEFFREY]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to structure your code is a generic Nix problem, not specific to System Manager.

In the Getting Started doc I think the structure you use is fine for the examples, but we want to point out that we recommend using blueprint to properly structure the code if the project gets any more complicated. Blueprint is an opinionated approach and others are also valid.

The reference doc should talk about the APIs of System Manager.

```bash
# Create the group and user
sudo groupadd nginx
sudo useradd -r -s /usr/sbin/nologin -g nginx nginx
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that user management is coming soon. After that this won't be needed anymore.


- Ensure you have the `nginx` user and group created on your system before activating
- You may need to adjust file paths based on your distribution
- The nginx binary location is pinned from nixpkgs to ensure reproducibility
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or the user can import the nginx module from NixOS. This gives them a much richer experience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I realized I duplicated efforts, with nginx samples in the Reference Guide. So I removed this sample altogether and replaced it with a sample that shows how to create a system timer.

# Should output: (nothing or "emacs not found")

# Check if the binary still exists in the nix store
ls -la /nix/store/*emacs*/bin/emacs 2>/dev/null || echo "Emacs removed from active profile"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would only fail if the /nix/store was garbage collected.


### 2. Use Flake Inputs Follows

This ensures consistent nixpkgs versions:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that enough of a description to make it clear what "follows" does?


---

## General Tips and Best Practices
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this go in a FAQ? All of these seem useful to have around.


# Check PATH
echo $PATH
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you just installed system-manager, try logging out and back again into your user session.

Ensure you're running system-manager with sudo:

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo nix run 'github:numtide/system-manager' -- switch --flake .
nix run 'github:numtide/system-manager' -- switch --flake . --sudo

Comment on lines 3 to 13
**System Manager** brings the power of NixOS-style declarative configuration to any Linux system.
Describe what your system should look like, packages, services, and settings, all in Nix, then apply it safely and atomically with a single command. Each change is reproducible and rollback-ready, just like NixOS generations but without needing to actually run NixOS.

!!! tip "Think of it as Home Manager for your entire machine"
Where Home Manager manages user environments, System Manager manages the full system—root-level configuration, packages, and services—using the same reliable, Nix-based model.

## Quick start

```bash
...
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems redundant with the README and the other docs.

@zimbatm zimbatm mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants