feat(dgn-hardware): Factorize bcachefs setup

This commit is contained in:
Tom Hubrecht 2024-02-20 21:25:04 +01:00
parent ade91c7bfd
commit 54ec4a6b18
6 changed files with 11 additions and 9 deletions

View file

@ -11,6 +11,8 @@ lib.extra.mkConfig {
extraConfig = { extraConfig = {
services.netbird.enable = true; services.netbird.enable = true;
dgn-hardware.useBcachefs = true;
}; };
root = ./.; root = ./.;

View file

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ lib, modulesPath, ... }: { modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -32,6 +32,4 @@
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/dd12c644-ead3-4367-9198-2f7740908633"; } ]; swapDevices = [ { device = "/dev/disk/by-uuid/dd12c644-ead3-4367-9198-2f7740908633"; } ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
} }

View file

@ -11,6 +11,8 @@ lib.extra.mkConfig {
extraConfig = { extraConfig = {
services.netbird.enable = true; services.netbird.enable = true;
dgn-hardware.useBcachefs = true;
}; };
root = ./.; root = ./.;

View file

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ lib, modulesPath, ... }: { modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -32,6 +32,4 @@
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/34db637d-5416-4ae1-98ef-3b0c5672159c"; } ]; swapDevices = [ { device = "/dev/disk/by-uuid/34db637d-5416-4ae1-98ef-3b0c5672159c"; } ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
} }

View file

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ pkgs, modulesPath, ... }: { modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -21,7 +21,6 @@
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
}; };
fileSystems = { fileSystems = {

View file

@ -58,7 +58,10 @@ in
}; };
}) })
(mkIf cfg.useBcachefs { boot.supportedFilesystems = [ "bcachefs" ]; }) (mkIf cfg.useBcachefs {
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
})
(mkIf cfg.useZfs { (mkIf cfg.useZfs {
boot = { boot = {