From 103bf021c4b15381dec65c607dfd7ff3e6beb796 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Fri, 16 Aug 2024 20:03:48 +0200 Subject: [PATCH] Fix impermanence wipe path issue Signed-off-by: Nikolaos Karaolidis --- flake.lock | 36 ++++++++-------- .../system/configs/impermanence/default.nix | 41 +++++++++---------- submodules/home-manager | 2 +- submodules/nixpkgs | 2 +- update-submodules.sh | 2 + 5 files changed, 41 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 8c1c968..9c86da7 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1722217815, - "narHash": "sha256-8r5AJ3n8WEDw3rsZLALSuFQ5kJyWOcssNZvPxYLr2yc=", + "lastModified": 1723685519, + "narHash": "sha256-GkXQIoZmW2zCPp1YFtAYGg/xHNyFH/Mgm79lcs81rq0=", "owner": "nix-community", "repo": "disko", - "rev": "1e6f8a7b4634fc051cc9361959bf414fcf17e094", + "rev": "276a0d055a720691912c6a34abb724e395c8e38a", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1723023714, - "narHash": "sha256-AyQvRwyaSvzoknqzKmhKRbDsUpq5Igwl8sUS7syshWg=", + "lastModified": 1723821282, + "narHash": "sha256-5Hy75NwMiN6OFm+nP4O6MxKL3CSxtwFgbRqaZAFEE1U=", "owner": "karaolidis", "repo": "home-manager", - "rev": "82b0b4fbd2a54f787f28853f7ef8c99448d8824b", + "rev": "eb71187c745a4746bfe67343a0241c93fb755e12", "type": "github" }, "original": { @@ -80,11 +80,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722433574, - "narHash": "sha256-afgnRlDFUTln8fov+e7y6PbA6U/5yVTcHeF5gRjZh4U=", + "lastModified": 1723821278, + "narHash": "sha256-QSKXdJCVdpoyttRufXxiFSLegRwcsXxOf442sj5W1yY=", "owner": "karaolidis", "repo": "nixpkgs", - "rev": "e23f335105039328e5330cd49a83c8244e7580e0", + "rev": "7c67732e798b4bd4e27e83647aa27e6093343d62", "type": "github" }, "original": { @@ -112,11 +112,11 @@ }, "nur": { "locked": { - "lastModified": 1722429951, - "narHash": "sha256-BIzCDu3wMU3TGoCHkqd4+M4Zu7lbyJU6UtLWIngL0Wc=", + "lastModified": 1723815900, + "narHash": "sha256-USeM2VAo6DDN8yq6Ve02+ZQB8bqqSBqBfOfkuOmtzUE=", "owner": "nix-community", "repo": "NUR", - "rev": "a7f5d16dc0839bc3907a53c94ac69ce8da9dd070", + "rev": "4b5ae3627ff2bbe71adc1502f1321fcbb52006da", "type": "github" }, "original": { @@ -144,11 +144,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1722114803, - "narHash": "sha256-s6YhI8UHwQvO4cIFLwl1wZ1eS5Cuuw7ld2VzUchdFP0=", + "lastModified": 1723501126, + "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "eb34eb588132d653e4c4925d862f1e5a227cc2ab", + "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", "type": "github" }, "original": { @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1722426629, - "narHash": "sha256-w5V6pQFhX+beK2BxIvutyOxRaw4YEcLiLqRLaDP8O94=", + "lastModified": 1723781748, + "narHash": "sha256-PWzECN2A4PFiwqwPMcn77XZdLQa7v7qgBEhbkkEHg/4=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "2842897718c8b79fd9614bf3c001e08a7516caf4", + "rev": "ac3cd3dc2330efa0cd3c56ad01076b85196eed84", "type": "github" }, "original": { diff --git a/hosts/common/system/configs/impermanence/default.nix b/hosts/common/system/configs/impermanence/default.nix index 4ed40ab..4f57a18 100644 --- a/hosts/common/system/configs/impermanence/default.nix +++ b/hosts/common/system/configs/impermanence/default.nix @@ -2,29 +2,26 @@ { imports = [ ./options.nix ]; - boot.initrd.systemd = - let - bins = with pkgs; [ - coreutils - util-linux - findutils - btrfs-progs - ]; - in - { - enable = true; - initrdBin = bins; - services.impermanence = { - description = "Rollback BTRFS subvolumes to a pristine state"; - wantedBy = [ "initrd.target" ]; - before = [ "sysroot.mount" ]; - after = [ "cryptsetup.target" ]; - unitConfig.DefaultDependencies = "no"; - serviceConfig.Type = "oneshot"; - path = bins; - script = builtins.readFile ./scripts/wipe.sh; - }; + boot.initrd.systemd = { + enable = true; + + initrdBin = with pkgs; [ + coreutils + util-linux + findutils + btrfs-progs + ]; + + services.impermanence = { + description = "Rollback BTRFS subvolumes to a pristine state"; + wantedBy = [ "initrd.target" ]; + before = [ "sysroot.mount" ]; + after = [ "cryptsetup.target" ]; + unitConfig.DefaultDependencies = "no"; + serviceConfig.Type = "oneshot"; + script = builtins.readFile ./scripts/wipe.sh; }; + }; # uuidgen -r | tr -d - # https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/administration/systemd-state.section.md diff --git a/submodules/home-manager b/submodules/home-manager index 82b0b4f..eb71187 160000 --- a/submodules/home-manager +++ b/submodules/home-manager @@ -1 +1 @@ -Subproject commit 82b0b4fbd2a54f787f28853f7ef8c99448d8824b +Subproject commit eb71187c745a4746bfe67343a0241c93fb755e12 diff --git a/submodules/nixpkgs b/submodules/nixpkgs index c172886..7c67732 160000 --- a/submodules/nixpkgs +++ b/submodules/nixpkgs @@ -1 +1 @@ -Subproject commit c172886f0aa82a89f8dfd507aea058255fb1715a +Subproject commit 7c67732e798b4bd4e27e83647aa27e6093343d62 diff --git a/update-submodules.sh b/update-submodules.sh index fdc86f3..8846208 100755 --- a/update-submodules.sh +++ b/update-submodules.sh @@ -34,3 +34,5 @@ for path in $paths; do done echo "All submodules updated successfully." + +nix flake update