Upgrade NixOS system (and/or home-manager) in the background, with notification support
Find a file
Evie Litherland-Smith e170c2c50e Abstract switch calling mechanic, add proper returncode checking
Catch different failure modes of subprocess.run

Add default versions of NIXOS_CONFIGURATION and
HOME_MANAGER_CONFIGURATION to compare to env vars, assume
configuration is a flake if different and append "--flake" argument to
process commands
2024-06-06 06:12:57 +01:00
src/nix_background_upgrade Abstract switch calling mechanic, add proper returncode checking 2024-06-06 06:12:57 +01:00
tests Initial commit: Add project structure and boilerplate 2024-05-26 09:26:55 +01:00
.dir-locals.el Add .dir-locals.el for Emacs 2024-05-27 07:33:42 +01:00
.gitignore Add .dir-locals.el for Emacs 2024-05-27 07:33:42 +01:00
.pre-commit-config.yaml Rename main.py -> cli.py and add poetry pre-commit hooks 2024-05-26 10:52:54 +01:00
default.nix Refactor to clean up python files 2024-06-02 06:52:28 +01:00
flake.lock Initial commit: Add project structure and boilerplate 2024-05-26 09:26:55 +01:00
flake.nix Refactor to clean up python files 2024-06-02 06:52:28 +01:00
LICENSE Update poetry.lock, add LICENSE file 2024-05-26 09:48:31 +01:00
poetry.lock Refactor to clean up python files 2024-06-02 06:52:28 +01:00
pyproject.toml Refactor to clean up python files 2024-06-02 06:52:28 +01:00
README.md Move nix shell to separate shell.nix 2024-05-27 08:34:36 +01:00
shell.nix Abstract switch calling mechanic, add proper returncode checking 2024-06-06 06:12:57 +01:00

Nix Background Upgrade

Upgrade NixOS system (and/or home-manager) in the background, with notification support.

Early stages of development, subject to change and likely not working at the current stage.

Install

Clone the repository and install with pip (or preferred Python packaging system):

git clone https://git.xenia.me.uk/pixelifytica/nix-background-upgrade.git
python3 -m pip install ./nix-background-upgrade

For development

Project uses Poetry to manage dependencies.

Install Poetry (see documentation for more details), for example using pipx:

pipx install poetry

Then install project using poetry:

poetry install

Python code is formatted using black and isort.

pre-commit

pre-commit is used to ensure formatting of new/changed files. Install pre-commit hooks with:

pre-commit install --install-hooks

Nix Flake

Project provides a Nix flake.nix and shell.nix to get up and running quickly.

Run nix develop (Flake) or nix-shell (non-Flake) to enter development shell containing project dependencies.