docs: update README
This commit is contained in:
parent
8fd30ecb0a
commit
3e497c997a
1 changed files with 47 additions and 26 deletions
73
README.md
73
README.md
|
@ -1,36 +1,57 @@
|
|||
My NixOS configuration
|
||||
----------------------
|
||||
# My NixOS configuration
|
||||
|
||||
My configurations for NixOS using flakes. For now only my desktop computer is
|
||||
configured with this system.
|
||||
My machines and dotfiles management using Nix / NixOS.
|
||||
|
||||
## Install
|
||||
## Installation
|
||||
|
||||
Project contains a devshell installing all needed and a
|
||||
[Taskfile](https://Taskfile.dev) is available to help manage elements whether
|
||||
Home-Manager or NixOS configuration.
|
||||
|
||||
```
|
||||
doas nixos-rebuild switch --flake ".#mrmeeseeks"
|
||||
task --list-all
|
||||
task: Available tasks for this project:
|
||||
* check:flake: Check flake
|
||||
* check:sh: Check SH files, will call all check:sh:* tasks
|
||||
* check:sh:shellcheck: Pass Shellcheck on all *.sh files
|
||||
* check:sh:shfmt: Pass shfmt in check mode on all sh files
|
||||
* check:typos: Check typos in all files
|
||||
* home:*:*: Manage Home-Manager configuration, use home:verb:target format
|
||||
* home:gc: Garbage collect Home-Manager packages
|
||||
* home:list-gen: List Home-Manager generations
|
||||
* host:*:switch: Switch both Home-Manager and NixOS generations
|
||||
* host:*:update: Update package version then build NixOS and Home-Manager
|
||||
* nixos:*:*: Manage NixOS build, use nixos:verb:target format
|
||||
* nixos:gc: Garbage collect NixOS
|
||||
* nixos:list-gen: List Nixos generations
|
||||
```
|
||||
|
||||
## Update the flakes.lock
|
||||
|
||||
```
|
||||
nix flake update
|
||||
doas nixos-rebuild switch --flake ".#mrmeeseeks"
|
||||
```
|
||||
|
||||
## Update manual packages from github
|
||||
|
||||
Some modules use `fetchFromGithub` who need *SHA-256* hash to meet
|
||||
reproductibility. Theses hashed can be obtain with `nix-prefetch-github`:
|
||||
Managing *NixOS* installation, you can use all `nixos:*` targets for example:
|
||||
|
||||
```shell
|
||||
$ nix-shell -p nix-prefetch-github
|
||||
$ nix-prefetch-ghithub --rev v1.22.0 sindresorhus pure
|
||||
{
|
||||
"owner": "sindresorhus",
|
||||
"repo": "pure",
|
||||
"rev": "87e6f5dd4c793f6d980532205aaefe196780606f",
|
||||
"sha256": "TR4CyBZ+KoZRs9XDmWE5lJuUXXU1J8E2Z63nt+FS+5w="
|
||||
}
|
||||
# build mrmeeseeks nixos:
|
||||
task nixos:build:mrmeeseeks
|
||||
|
||||
# build/switch nixos installation for mrmeeseeks
|
||||
task nixos:switch:mrmeeseeks
|
||||
|
||||
# build ephase home configuration for mrmeeseeks:
|
||||
task home:build:mrmeeseeks
|
||||
|
||||
# build / switch ephase home configuration for mrmeeseeks
|
||||
```
|
||||
|
||||
In this example we have obtained the hash for the specific 1.22.0 version.
|
||||
## Update nixpkgs version
|
||||
|
||||
Update packages repositories version can be done with `host:<hostname>:update`:
|
||||
|
||||
```
|
||||
task host:mrmeeseeks:update
|
||||
```
|
||||
|
||||
`flake.lock` file will be updated then both NixOS and Home-Manager will be
|
||||
rebuilt. Note than new generation will not be activated, to do so you need to:
|
||||
|
||||
```
|
||||
task host:mrmeeseeks:switch
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue