feat: successfully compile on callisto (asahi aarch64)

This commit is contained in:
Youwen Wu 2024-08-07 05:55:39 -07:00
parent d9dce7d1a7
commit cde45f87fd
41 changed files with 125 additions and 55 deletions

0
LICENSE Normal file → Executable file
View file

0
README.md Normal file → Executable file
View file

0
config/neofetch.conf Normal file → Executable file
View file

View file

@ -1,5 +1,27 @@
{ {
"nodes": { "nodes": {
"apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1722469787,
"narHash": "sha256-P20oAmbgXHl1E77TXPXiAj1Ntycc1mf7fZMI7X13VYw=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "8a665fee82901878edaeb8ee120296a979db2dd2",
"type": "github"
},
"original": {
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"bleedingpkgs": { "bleedingpkgs": {
"locked": { "locked": {
"lastModified": 1722979953, "lastModified": 1722979953,
@ -70,6 +92,21 @@
} }
}, },
"flake-compat": { "flake-compat": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -252,14 +289,14 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1718178907, "lastModified": 1718178907,
@ -460,6 +497,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"apple-silicon": "apple-silicon",
"bleedingpkgs": "bleedingpkgs", "bleedingpkgs": "bleedingpkgs",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"home-manager": "home-manager", "home-manager": "home-manager",
@ -474,6 +512,22 @@
} }
}, },
"rust-overlay": { "rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"lanzaboote", "lanzaboote",

View file

@ -32,10 +32,15 @@
"https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs
, bleedingpkgs, lix-module, nix-darwin, nix-homebrew, ... }@inputs: rec { , bleedingpkgs, lix-module, nix-darwin, nix-homebrew, apple-silicon, ...
}@inputs: rec {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
nixosConfigurations = { nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem { nixos = nixpkgs.lib.nixosSystem {
@ -63,7 +68,7 @@
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.users.youwen = { home-manager.users.youwen = {
imports = [ imports = [
./users/youwen/linux/linux-home.nix # ./users/youwen/linux/linux-home.nix
./users/youwen/linux/desktop.nix ./users/youwen/linux/desktop.nix
./users/youwen/linux/programs.nix ./users/youwen/linux/programs.nix
./users/youwen/common/core.nix ./users/youwen/common/core.nix
@ -76,21 +81,19 @@
}; };
callisto = nixpkgs.lib.nixosSystem { callisto = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
system = "x86_64-linux"; system = "aarch64-linux";
modules = [ modules = [
./hosts/callisto ./hosts/callisto
# ./modules/nixos/secureboot.nix
# ./modules/nixos/gaming.nix # ./modules/nixos/gaming.nix
# ./modules/nixos/audio.nix ./modules/nixos/audio.nix
# ./modules/nixos/nvidia.nix ./modules/nixos/networking.nix
# ./modules/nixos/networking.nix ./modules/common/fonts.nix
# ./modules/common/fonts.nix
apple-silicon.nixosModules.apple-silicon-support
catppuccin.nixosModules.catppuccin catppuccin.nixosModules.catppuccin
# lix-module.nixosModules.default lix-module.nixosModules.default
# lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
@ -99,11 +102,11 @@
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.users.youwen = { home-manager.users.youwen = {
imports = [ imports = [
# ./users/youwen/linux/linux-home.nix ./users/youwen/linux/linux-home.nix
# ./users/youwen/linux/desktop.nix ./users/youwen/linux/desktop.nix
# ./users/youwen/linux/programs.nix ./users/youwen/linux/programs.nix
# ./users/youwen/common/core.nix ./users/youwen/common/core.nix
# ./users/youwen/linux/catppuccin.nix ./users/youwen/linux/catppuccin.nix
inputs.catppuccin.homeManagerModules.catppuccin inputs.catppuccin.homeManagerModules.catppuccin
]; ];
}; };
@ -112,6 +115,7 @@
}; };
}; };
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt; formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt;
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt;
# Build darwin flake using: # Build darwin flake using:
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro # $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
darwinConfigurations."Youwens-MacBook-Pro" = nix-darwin.lib.darwinSystem { darwinConfigurations."Youwens-MacBook-Pro" = nix-darwin.lib.darwinSystem {

View file

@ -7,11 +7,21 @@
{ {
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./apple-silicon-support # ./apple-silicon-support
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchVariables = false; boot.loader.efi.canTouchEfiVariables = false;
hardware.asahi = {
peripheralFirmwareDirectory = ./firmware;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
};
boot.extraModprobeConfig = ''
options hid_apple iso_layout=0
'';
networking.hostName = "callisto"; # Define your hostname. networking.hostName = "callisto"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -21,12 +31,16 @@
settings.General.EnableNetworkConfiguration = true; settings.General.EnableNetworkConfiguration = true;
}; };
nixpkgs.overlays = [ inputs.apple-silicon.overlays.apple-silicon-overlay ];
programs.light.enable = true;
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking # Enable networking
networking.networkmanager.enable = true; # networking.networkmanager.enable = true;
# Set your time zone. # Set your time zone.
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
@ -126,24 +140,24 @@
wget wget
git git
curl curl
librewolf # librewolf
gnumake # gnumake
clang # clang
gcc # gcc
cachix # cachix
nodejs_22 # nodejs_22
cargo # cargo
rustc # rustc
gnupg # gnupg
openssh # openssh
python3 # python3
(pkgs.catppuccin-sddm.override { flavor = "mocha"; }) (pkgs.catppuccin-sddm.override { flavor = "mocha"; })
steam-run # steam-run
# deps for neovim compilation # # deps for neovim compilation
lua51Packages.lua # lua51Packages.lua
lua51Packages.luarocks # lua51Packages.luarocks
tree-sitter # tree-sitter
]; ];
environment.variables = { environment.variables = {
@ -172,7 +186,7 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
programs.zsh.enable = false; programs.zsh.enable = false;
programs.fish.enable = true; programs.fish.enable = true;

0
hosts/callisto/default.nix.bak Normal file → Executable file
View file

22
hosts/callisto/hardware-configuration.nix Normal file → Executable file
View file

@ -4,25 +4,23 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ]; boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608"; device = "/dev/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/852F-07F1"; device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
swapDevices = [ ]; swapDevices = [ ];

0
modules/common/fonts.nix Normal file → Executable file
View file

0
modules/darwin/darwin-configuration.nix Normal file → Executable file
View file

0
modules/darwin/homebrew.nix Normal file → Executable file
View file

0
modules/darwin/yabai.nix Normal file → Executable file
View file

0
modules/nixos/audio.nix Normal file → Executable file
View file

0
modules/nixos/gaming.nix Normal file → Executable file
View file

0
modules/nixos/networking.nix Normal file → Executable file
View file

0
modules/nixos/nvidia.nix Normal file → Executable file
View file

0
modules/nixos/secureboot.nix Normal file → Executable file
View file

0
users/youwen/common/core.nix Normal file → Executable file
View file

0
users/youwen/darwin/darwin-home.nix Normal file → Executable file
View file

0
users/youwen/linux/catppuccin.nix Normal file → Executable file
View file

0
users/youwen/linux/desktop.nix Normal file → Executable file
View file

0
users/youwen/linux/hyprland-conf.nix Normal file → Executable file
View file

View file

@ -60,14 +60,14 @@
# desktop apps # desktop apps
dolphin dolphin
bitwarden-desktop # bitwarden-desktop
thunderbird thunderbird
spotify # spotify
vesktop vesktop
signal-desktop signal-desktop
modrinth-app # modrinth-app
lutris # lutris
wine # wine
# dev tools # dev tools
nodePackages_latest.pnpm nodePackages_latest.pnpm

0
users/youwen/linux/programs.nix Normal file → Executable file
View file

0
users/youwen/linux/waybar/waybar-conf.nix Normal file → Executable file
View file

0
users/youwen/linux/waybar/waybar.css Normal file → Executable file
View file

0
wallpapers/aesthetic/ign_colorful.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

0
wallpapers/anime/frieren.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 9.6 MiB

After

Width:  |  Height:  |  Size: 9.6 MiB

0
wallpapers/anime/kudou-chitose-normal.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 633 KiB

After

Width:  |  Height:  |  Size: 633 KiB

0
wallpapers/anime/kudou-chitose-violet.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

0
wallpapers/anime/nixos-sus-anime-wallpaper.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 3 MiB

After

Width:  |  Height:  |  Size: 3 MiB

0
wallpapers/anime/nixos-sus-anime.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 529 KiB

After

Width:  |  Height:  |  Size: 529 KiB

0
wallpapers/cityscapes/yellow_kyoto.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 11 MiB

After

Width:  |  Height:  |  Size: 11 MiB

0
wallpapers/nixos/nix-neon.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

0
wallpapers/nixos/nix-wallpaper.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

0
wallpapers/nixos/nixos-ascii.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

0
wallpapers/nixos/nixos-declarative.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 235 KiB

0
wallpapers/nixos/nixos-everforest.webp Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

0
wallpapers/nixos/nixos-hm.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

0
wallpapers/retro/commodore.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 457 KiB

After

Width:  |  Height:  |  Size: 457 KiB