Attempt to use nixos filesystems to mount usb
This commit is contained in:
parent
638a81e61a
commit
d9b438536f
|
@ -8,5 +8,8 @@
|
|||
# Mark a bunch of paths as needed for boot
|
||||
fileSystems = lib.attrsets.genAttrs
|
||||
[ "/" "/nix" "/persist/data" "/persist/state" "/persist/local/cache" "/boot" ]
|
||||
(_: { neededForBoot = true; });
|
||||
(_: {
|
||||
neededForBoot = true;
|
||||
depends = [ "/hermes" ];
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,18 +8,24 @@ in
|
|||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.kernelParams = [ "nohibernate" ];
|
||||
|
||||
# {{{ Mount usb for zfs secrets
|
||||
boot.initrd.systemd.mounts = [{
|
||||
where = "/hermes";
|
||||
what = "/dev/sdb";
|
||||
fileSystems."/hermes" = {
|
||||
neededForBoot = true;
|
||||
device = "/dev/disk/by-uuid/7FE7-CA68";
|
||||
fsType = "exfat";
|
||||
};
|
||||
|
||||
# The usb contains sensitive data that should only be readable to root
|
||||
# mountConfig.DirectoryMode = "0750";
|
||||
|
||||
wantedBy = [ "zfs-import.target" ];
|
||||
before = [ "zfs-import.target" ];
|
||||
}];
|
||||
# }}}
|
||||
# # {{{ Mount usb for zfs secrets
|
||||
# boot.initrd.systemd.mounts = [{
|
||||
# where = "/hermes";
|
||||
# what = "/dev/sdb";
|
||||
#
|
||||
# # The usb contains sensitive data that should only be readable to root
|
||||
# # mountConfig.DirectoryMode = "0750";
|
||||
#
|
||||
# wantedBy = [ "zfs-import.target" ];
|
||||
# before = [ "zfs-import.target" ];
|
||||
# }];
|
||||
# # }}}
|
||||
|
||||
boot.initrd.systemd.services = {
|
||||
# # {{{ Rollback
|
||||
|
|
Loading…
Reference in a new issue