From: Kayla Firestack Date: Tue, 19 Oct 2021 19:26:41 +0000 (-0400) Subject: flake.nix: add nixosModules X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fa27037e708c033cec1ae8aed13df589ae0282f8;p=bcachefs-tools-debian flake.nix: add nixosModules Signed-off-by: Kayla Firestack --- diff --git a/flake.nix b/flake.nix index 146da46..4c73fd1 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,18 @@ version = "${builtins.substring 0 8 self.lastModifiedDate}-${self.shortRev or "dirty"}"; overlay = import ./nix/overlay.nix inputs; + nixosModule = self.nixosModules.bcachefs; + nixosModules.bcachefs = import ./rust-src/mount/module.nix; + nixosModules.bcachefs-enable-boot = ({config, pkgs, lib, ... }:{ + # Disable Upstream NixOS Module when this is in use + disabledModules = [ "tasks/filesystems/bcachefs.nix" ]; + # Import needed packages + nixpkgs.overlays = [ self.overlay ]; + + # Add bcachefs to boot and kernel + boot.initrd.supportedFilesystems = [ "bcachefs" ]; + boot.supportedFilesystems = [ "bcachefs" ]; + }); } // utils.lib.eachSystem supportedSystems (system: let pkgs = import nixpkgs {