impernanence optional
This commit is contained in:
parent
99d9f457d3
commit
ac83f87c02
3 changed files with 29 additions and 4 deletions
|
|
@ -1,10 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf (
|
||||
(config.fileSystems ? "/persist")
|
||||
&& (config.fileSystems."/persist".fsType or "" == "btrfs")
|
||||
) {
|
||||
options.nanuqsaurus.impermanence.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable impermanence with a /persist Btrfs subvolume.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nanuqsaurus.impermanence.enable {
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
|
||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue