1 import ./make-test-python.nix ({ ... }:
5 nodes.machine = { pkgs, lib, ... }: {
6 boot.initrd.postDeviceCommands = ''
7 ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux /dev/vdb
10 virtualisation.emptyDiskImages = [ 4096 ];
12 virtualisation.fileSystems = {
14 device = "/dev/disk/by-label/aux";
18 services.snapper.configs.home.subvolume = "/home";
19 services.snapper.filters = "/nix";
23 machine.succeed("btrfs subvolume create /home/.snapshots")
24 machine.succeed("snapper -c home list")
25 machine.succeed("snapper -c home create --description empty")
26 machine.succeed("echo test > /home/file")
27 machine.succeed("snapper -c home create --description file")
28 machine.succeed("snapper -c home status 1..2")
29 machine.succeed("snapper -c home undochange 1..2")
30 machine.fail("ls /home/file")
31 machine.succeed("snapper -c home delete 2")
32 machine.succeed("systemctl --wait start snapper-timeline.service")
33 machine.succeed("systemctl --wait start snapper-cleanup.service")