system-scripts provides the system command, which can manage a flake-based NixOS system. It can update your lockfile, rebuild your system, commit your changes (if you're using git), and more.
- Pass
github:tom-ricci/system-scriptsto your configuration:
{
...
inputs.system-scripts.url = "github:tom-ricci/system-scripts";
...
outputs = { self, system-scripts, ...}: (
...
);
...
}- Append it to
environment.systemPackages:
{ pkgs, inputs, ... }: {
...
environment.systemPackages = with pkgs; [
...
inputs.system-scripts."${pkgs.system}".packages.system-scripts
];
...
}- Set the
$SYSTEM_SCRIPTS_CONFIG_ROOTenvironment variable to the location of your flake. This would've been an option, but flakes don't support options☹️
Use system --help for more information.
See flake.nix.
The main branch is stable. All development happens on dev; you can switch to it with inputs.system-scripts.url = "github:tom-ricci/system-scripts/dev"