initial commit
This commit is contained in:
commit
2ca4b5440a
13 changed files with 584 additions and 0 deletions
18
shared/modules/easy-zfs-mounts.nix
Normal file
18
shared/modules/easy-zfs-mounts.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.mine.zfsMounts;
|
||||
in {
|
||||
options.mine.zfsMounts = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config = {
|
||||
mine.zfsMounts = let
|
||||
zfsFilesystems = lib.filterAttrs (_: v: v.fsType == "zfs") config.fileSystems;
|
||||
in lib.mapAttrs' (_: v: lib.nameValuePair v.device v.mountPoint) zfsFilesystems;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue