mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Fix usage of rolling_datasets
on omen
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
99005cd768
commit
fd97d611f6
|
@ -1,4 +1,12 @@
|
|||
{ inputs', pkgs, ... }:
|
||||
let
|
||||
rollbackStart =
|
||||
pkgs.writeText "rollback-start" ''
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/home" "10"
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/root" "10"
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/nix-tmp" "10"
|
||||
'';
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
inputs'.self.overlays.show-files-to-be-deleted
|
||||
|
@ -56,6 +64,7 @@
|
|||
];
|
||||
files = [
|
||||
{ file = ".config/wallpaper"; method = "symlink"; }
|
||||
{ file = ".gitignore"; method = "symlink"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -63,6 +72,8 @@
|
|||
boot.initrd.systemd.storePaths = with pkgs; [
|
||||
zfs
|
||||
busybox
|
||||
rolling_datasets
|
||||
rollbackStart
|
||||
];
|
||||
boot.initrd.systemd.services.rollback = {
|
||||
description = "Rollback ZFS datasets to a pristine state";
|
||||
|
@ -81,11 +92,7 @@
|
|||
];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/home" "10"
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/root" "10"
|
||||
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/nix-tmp" "10"
|
||||
'';
|
||||
serviceConfig.ExecStart = "/bin/sh ${rollbackStart}";
|
||||
};
|
||||
|
||||
systemd.services."mount-old-homes" = {
|
||||
|
|
Loading…
Reference in a new issue