From fa27037e708c033cec1ae8aed13df589ae0282f8 Mon Sep 17 00:00:00 2001 From: Kayla Firestack Date: Tue, 19 Oct 2021 15:26:41 -0400 Subject: [PATCH] flake.nix: add nixosModules Signed-off-by: Kayla Firestack --- flake.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flake.nix b/flake.nix index 146da468..4c73fd14 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 {