Skip to content

Commit

Permalink
reorganize nixos module
Browse files Browse the repository at this point in the history
use `apple-silicon-support/modules` and `apple-silicon-support/packages`
  • Loading branch information
oati committed Jan 24, 2023
1 parent 74112e2 commit e87a34e
Show file tree
Hide file tree
Showing 19 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions apple-silicon-support/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ ... }:

{
imports = [
./modules/default.nix
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
in
{
overlays = rec {
asahi-overlay = import packages/overlay.nix;
asahi-overlay = import ./apple-silicon-support/packages/overlay.nix;
default = asahi-overlay;
};

nixosModules = rec {
m1-support = ./nixos-module;
m1-support = ./apple-silicon-support;
default = m1-support;
};

Expand Down
6 changes: 3 additions & 3 deletions iso-configuration/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
{
imports = [
./installer-configuration.nix
../nixos-module
../apple-silicon-support
];

# include those modules so the user can rebuild the install iso. that's not
# especially useful at this point, but the user will need the m1-support
# directory for their own config.
installer.cloneConfigIncludes = [
"./installer-configuration.nix"
"./m1-support/nixos-module"
"./apple-silicon-support"
];

# copy the m1-support and installer configs into the iso
boot.postBootCommands = lib.optionalString config.installer.cloneConfig ''
if ! [ -e /etc/nixos/m1-support ]; then
mkdir -p /etc/nixos/m1-support
cp ${./installer-configuration.nix} /etc/nixos/installer-configuration.nix
cp -r ${../packages} ${../nixos-module} -t /etc/nixos/m1-support
cp -rT ${../apple-silicon-support} /etc/nixos/apple-silicon-support
fi
'';
}

0 comments on commit e87a34e

Please sign in to comment.