Flake lock file updates:
• Updated input 'crane':
'github:ipetkov/crane/8c34e5ecadc691dd64b31b9317eb35d7cdaa636b' (2023-02-09)
→ 'github:ipetkov/crane/6fb400ec631b22ccdbc7090b38207f7fb5cfb5f2' (2023-02-12)
• Updated input 'devshell':
'github:numtide/devshell/6fe837bb4f540a1832522ec54604c453757836b2' (2023-02-07)
→ 'github:numtide/devshell/71e3022e3ab20bbf1342640547ef5bc14fb43bf4' (2023-02-13)
• Updated input 'flake-utils':
'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
→ 'github:numtide/flake-utils/3db36a8b464d0c4532ba1c7dda728f4576d6d073' (2023-02-13)
• Updated input 'nix-filter':
'github:numtide/nix-filter/e1b2f96c2a31415f362268bc48c3fccf47dff6eb' (2023-02-02)
→ 'github:numtide/nix-filter/fc282c5478e4141842f9644c239a41cfe9586732' (2023-02-13)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/fab09085df1b60d6a0870c8a89ce26d5a4a708c2' (2023-02-07)
→ 'github:NixOS/nixpkgs/d917136f550a8c36efb1724390c7245105f79023' (2023-02-12)
• Updated input 'pre-commit-hooks':
'github:cachix/pre-commit-hooks.nix/ab608394886fb04b8a5df3cb0bab2598400e3634' (2023-02-06)
→ 'github:cachix/pre-commit-hooks.nix/1583077009b6ef4236d1899c0f43cf1ce1db8085' (2023-02-13)
• Updated input 'rust-overlay':
'github:oxalica/rust-overlay/50ee0fa4d0eeadd97c63be57e14b01d531e79ed7' (2023-02-09)
→ 'github:oxalica/rust-overlay/1bd5d7bb2f31cbc43fb8f722e3a39a45ee4dcec8' (2023-02-13)
• Updated input 'treefmt-nix':
'github:numtide/treefmt-nix/e9033eca3d7139fd499f310023ddc3bb5abff515' (2023-02-09)
→ 'github:numtide/treefmt-nix/819dd7f076832838bba238eceef9a3dbfc63f5d0' (2023-02-11)
|
||
|---|---|---|
| nix | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| shell.nix | ||
Profile generation
Activation strategy
The activation script calls system-manager activate,
which will perform the following actions.
Systemd services
The info about services (name and store path of the service file) is found
in a file called services/services.json in the system-manager configuration directory.
The info about the services that were part of the previous generation is stored
in a state file at /var/lib/system-manager.
We then:
- Compare the list of services present in the current configuration with the ones stored in the state file from the previous generation.
- For all services in the new generation,
create a symlink from
/etc/systemd/system/<service name>to the service file in the nix store. - For all services present in the old generation but not in the new one:
- Stop the service.
- Remove the symlink from
/etc/systemd/system.
- Perform a systemd daemon-reload
- Start the services that are present in this generation and not in the previous one
- Restart services that are present in both
This approach basically ignores the wantedBy option.
A future version might improve upon this, but one of the complexities is that
NixOS does not encode the wantedBy option in the generated unit files, but
rather produces <unit name>.wants directories in the directory that
/etc/systemd/system gets linked to.
Supporting this properly would mean that we need to find a way to register
the wantedBy option on a non-NixOS system in a way such that we can use it.