auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-26 21:39:04 +01:00
parent dbbd032191
commit 8b4da0e70d
2 changed files with 5 additions and 4 deletions

View File

@ -228,11 +228,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1716755172, "lastModified": 1716755938,
"narHash": "sha256-os5wQsYjysS9Fd28GegNim+OOE3WoK5ETDYSaFMqd14=", "narHash": "sha256-x2XbBriM3ZBt6sodNgCvq68gy9lGFanWSGgh8weTB4I=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "6772ccd68afefc0b456625112b4ca4bb65a3aa76", "rev": "b32b7f37f6e4a31b99d1cc4ce2e70778f363e43e",
"revCount": 58, "revCount": 59,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },

View File

@ -2,6 +2,7 @@
{ {
boot.initrd.postDeviceCommands = lib.mkAfter '' boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp mkdir /btrfs_tmp
mount /dev/mapper/crypted /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")