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
|
# Mark a bunch of paths as needed for boot
|
||||||
fileSystems = lib.attrsets.genAttrs
|
fileSystems = lib.attrsets.genAttrs
|
||||||
[ "/" "/nix" "/persist/data" "/persist/state" "/persist/local/cache" "/boot" ]
|
[ "/" "/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.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
boot.kernelParams = [ "nohibernate" ];
|
boot.kernelParams = [ "nohibernate" ];
|
||||||
|
|
||||||
# {{{ Mount usb for zfs secrets
|
fileSystems."/hermes" = {
|
||||||
boot.initrd.systemd.mounts = [{
|
neededForBoot = true;
|
||||||
where = "/hermes";
|
device = "/dev/disk/by-uuid/7FE7-CA68";
|
||||||
what = "/dev/sdb";
|
fsType = "exfat";
|
||||||
|
};
|
||||||
|
|
||||||
# The usb contains sensitive data that should only be readable to root
|
# # {{{ Mount usb for zfs secrets
|
||||||
# mountConfig.DirectoryMode = "0750";
|
# boot.initrd.systemd.mounts = [{
|
||||||
|
# where = "/hermes";
|
||||||
wantedBy = [ "zfs-import.target" ];
|
# what = "/dev/sdb";
|
||||||
before = [ "zfs-import.target" ];
|
#
|
||||||
}];
|
# # 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 = {
|
boot.initrd.systemd.services = {
|
||||||
# # {{{ Rollback
|
# # {{{ Rollback
|
||||||
|
|
Loading…
Reference in a new issue