impermanence-talk/README.md

32 lines
856 B
Markdown
Raw Permalink Normal View History

2024-04-07 17:34:18 +00:00
# Impermanence Talk
## Start a NixOS setup with Impermanence
2024-04-09 11:27:55 +00:00
```txt
2024-04-08 19:15:33 +00:00
`nix-shell -p git`
2024-04-09 11:54:03 +00:00
`nix flake new nixos --template git+https://github.com/Krsnik/impermanence#default --extra-experimental-features "nix-command flakes"`
2024-04-08 19:15:33 +00:00
`cd nixos`
`nix develop --extra-experimental-features "nix-command flakes"`
`[CHANGE SETTINGS]`
`sudo disko --mode disko ./systems/disko.nix`
`[ENTER PASSWORD FOR ENCRYPTION]`
`sudo nixos-generate-config --no-filesystems --force --root /mnt --dir ./system`
`sudo nixos-install --no-root-password --root /mnt --flake .#default`
2024-04-09 11:27:55 +00:00
To save the configuration
`cd ..`
`sudo mv nixos /mnt/persist/etc`
`cd /mnt/persist/etc/nixos`
```
## Get cleared files back
```txt
cd /tmp
mkdir mnt
sudo btrfs subvolume list /
[NOTE the ID]
sudo mount /dev/mapper/crypted -o subvolid=[ID] mnt/
```