Skip to content

Commit

Permalink
Move modules into subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfullmer committed Nov 4, 2022
1 parent 398add6 commit 01be4d8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ in rec {
# Use cross-compiled machine here so we don't have to depend on aarch64 builders
# TODO: Do a smaller cross-compiled version from old jetpack dir
dtbsDir = (pkgsAarch64.nixos {
imports = [ ./module.nix ];
imports = [ ./modules/default.nix ];
hardware.nvidia-jetpack.enable = true;
}).config.hardware.deviceTree.package;
};
} // (builtins.listToAttrs (map (n: lib.nameValuePair "flash-${n}" (flashScriptFromNixos (pkgs.nixos {
imports = [ ./module.nix (./. + "/profiles/${n}.nix") ];
imports = [ ./modules/default.nix (./. + "/profiles/${n}.nix") ];
hardware.nvidia-jetpack.enable = true;
networking.hostName = n; # Just so it sets
}).config)) [
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
installer_minimal_config = {
imports = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
./module.nix
./modules/default.nix
];
# Avoids a bunch of extra modules we don't have in the tegra_defconfig, like "ata_piix",
disabledModules = [ "profiles/all-hardware.nix" ];
Expand All @@ -25,7 +25,7 @@
installer_minimal_cross = nixpkgs.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.nixos installer_minimal_config;
};

nixosModules.default = import ./module.nix;
nixosModules.default = import ./modules/default.nix;

overlays.default = import ./overlay.nix;

Expand Down
14 changes: 9 additions & 5 deletions module.nix → modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ in
{
imports = [
# https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Performance_Tuning
./nvpmodel-module.nix
./nvfancontrol-module.nix
./nvargus-daemon-module.nix
./flash-script-module.nix
./nvpmodel.nix
./nvfancontrol.nix
./nvargus-daemon.nix
./flash-script.nix
];

options = {
Expand All @@ -30,11 +30,15 @@ in
type = types.bool;
description = "Always run at maximum clock speed";
};

chip = mkOption {
default = "generic";
};
};
};

config = mkIf cfg.enable {
nixpkgs.overlays = [ (import ./overlay.nix) ];
nixpkgs.overlays = [ (import ../overlay.nix) ];

boot.kernelPackages = pkgs.nvidia-jetpack.kernelPackages;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 01be4d8

Please sign in to comment.