mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 11:17:17 +00:00
Adds voyager host (asahi linux on m1 mac)
This commit is contained in:
parent
b3366ca0f2
commit
53181cc77b
4 changed files with 67 additions and 0 deletions
|
@ -74,6 +74,7 @@
|
|||
|
||||
nixbox = mkNixos "x86_64" [./nixos/hosts/nixbox.nix];
|
||||
thinkpad = mkNixos "x86_64" [./nixos/hosts/thinkpad.nix];
|
||||
voyager = mkNixos "aarch64" [./nixos/hosts/voyager];
|
||||
|
||||
darwin-arm-minimal-vm = mkNixos "aarch64" [./nixos/hosts/vms/aarch64-darwin-host/minimal.nix];
|
||||
darwin-arm-homeconsole-vm = mkNixos "aarch64" [./nixos/hosts/vms/aarch64-darwin-host/home-console.nix];
|
||||
|
|
66
nixos/hosts/voyager/default.nix
Executable file
66
nixos/hosts/voyager/default.nix
Executable file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
../profiles/hyprland.nix
|
||||
../users/willem/home/linux.nix
|
||||
../modules/zerotier.nix
|
||||
inputs.nixos-apple-silicon.nixosModules.apple-silicon-support
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/62169b05-efa5-482c-9664-6683b6d474ce";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3CAD-1DF4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
hardware.asahi.peripheralFirmwareDirectory = ./firmware;
|
||||
|
||||
hardware.asahi = {
|
||||
withRust = true;
|
||||
addEdgeKernelConfig = true;
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "overlay";
|
||||
};
|
||||
|
||||
systemd.services.limit-charge = {
|
||||
enable = true;
|
||||
description = "Limit battery charge to 80%.";
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
Group = "root";
|
||||
};
|
||||
script = ''
|
||||
${pkgs.coreutils}/bin/echo 80 > /sys/class/power_supply/macsmc-battery/charge_control_end_threshold
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
networking.hostName = "voyager";
|
||||
}
|
BIN
nixos/hosts/voyager/firmware/all_firmware.tar.gz
Executable file
BIN
nixos/hosts/voyager/firmware/all_firmware.tar.gz
Executable file
Binary file not shown.
BIN
nixos/hosts/voyager/firmware/kernelcache.release.mac13j
Executable file
BIN
nixos/hosts/voyager/firmware/kernelcache.release.mac13j
Executable file
Binary file not shown.
Loading…
Add table
Reference in a new issue