removed btrfs hook for permanence, if btrfs is not used
This commit is contained in:
parent
2e2d2a464f
commit
cc9e188106
1 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,7 @@
|
||||||
{ lib, inputs, ... }:
|
{ config, lib, inputs, ... }:
|
||||||
|
let
|
||||||
|
isBtrfs = config.fileSystems."/".fsType == "btrfs";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
|
@ -27,7 +30,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
boot.initrd.postDeviceCommands = lib.mkAfter (if isBtrfs then ''
|
||||||
mkdir /btrfs_tmp
|
mkdir /btrfs_tmp
|
||||||
mount /dev/root_vg/root /btrfs_tmp
|
mount /dev/root_vg/root /btrfs_tmp
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
if [[ -e /btrfs_tmp/root ]]; then
|
||||||
|
|
@ -50,5 +53,5 @@
|
||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
btrfs subvolume create /btrfs_tmp/root
|
||||||
umount /btrfs_tmp
|
umount /btrfs_tmp
|
||||||
'';
|
'' else '''');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue