mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 08:32:39 +02:00
feat: remove x86_64-darwin, add new nixos host on macbook pro m2
This commit is contained in:
+10
-20
@@ -4,25 +4,23 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
preservation.url = "github:nix-community/preservation";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nuenv.url = "github:DeterminateSystems/nuenv";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
nuenv,
|
||||
...
|
||||
}: {
|
||||
outputs = inputs @ {nixpkgs, ...}: let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
mylib = import ../lib {inherit lib;};
|
||||
myvars = import ../vars {inherit lib;};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
ai = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs =
|
||||
inputs
|
||||
// {
|
||||
myvars.username = "ryan";
|
||||
myvars.userfullname = "Ryan Yin";
|
||||
inherit mylib myvars;
|
||||
};
|
||||
|
||||
modules = [
|
||||
{networking.hostName = "ai";}
|
||||
|
||||
@@ -39,22 +37,14 @@
|
||||
};
|
||||
|
||||
shoukei = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
system = "aarch64-linux";
|
||||
specialArgs =
|
||||
inputs
|
||||
// {
|
||||
myvars.username = "ryan";
|
||||
myvars.userfullname = "Ryan Yin";
|
||||
inherit mylib myvars;
|
||||
};
|
||||
modules = [
|
||||
# Building on a USB installer is buggy, lack of disk space, memory, trublesome to setup substituteers, etc.
|
||||
# so we disable apple-t2 module here to avoid build kernel during the initial installation, and enable it after the first boot.
|
||||
# nixos-hardware.nixosModules.apple-t2
|
||||
({pkgs, ...}: {
|
||||
networking.hostName = "shoukei";
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest; # Use latest kernel for the initial installation.
|
||||
# hardware.apple-t2.enableAppleSetOsLoader = true;
|
||||
})
|
||||
{networking.hostName = "shoukei";}
|
||||
|
||||
./configuration.nix
|
||||
|
||||
|
||||
Reference in New Issue
Block a user