Skip to content

Instantly share code, notes, and snippets.

@ingenieroariel
Created November 3, 2023 16:21
Show Gist options
  • Save ingenieroariel/ec9b7b23d3887b05bcdc2e599b8fe237 to your computer and use it in GitHub Desktop.
Save ingenieroariel/ec9b7b23d3887b05bcdc2e599b8fe237 to your computer and use it in GitHub Desktop.
Apple Silicon System NixOS
{
inputs.nixpkgs.url = github:NixOS/nixpkgs;
inputs.apple-silicon = {
url = github:tpwrules/nixos-apple-silicon;
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, apple-silicon, ... }@attrs: let
system = "aarch64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
apple-silicon.overlays.default
];
};
in {
nixosConfigurations.globo = nixpkgs.lib.nixosSystem {
specialArgs = attrs;
modules = [
apple-silicon.nixosModules.default
( { config, lib, pkgs, ... }:
{
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ba257e07-6525-4927-a250-4c323dac2f62";
fsType = "ext4";
};
fileSystems."/usr/lib/firmware/vendor" =
{ device = "vendorfw";
fsType = "tmpfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DD5A-4EB6";
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;
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
networking.hostName = "globo";
networking.networkmanager.enable = true;
time.timeZone = "America/New_York";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
kakoune
ripgrep
htop
tmux
wget
git
firefox
#chromium
glxinfo
mesa-demos
glmark2
sway
arcanPackages.all-wrapped
fishPlugins.done
fishPlugins.fzf-fish
fishPlugins.forgit
fishPlugins.hydro
fzf
fishPlugins.grc
grc
foot
dmenu
blender
qgis
];
users.users.x = {
isNormalUser = true;
home = "/x";
extraGroups = [ "networkmanager" "input" "video" ];
};
users.mutableUsers = true;
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
environment.binsh = "${pkgs.dash}/bin/dash";
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "x";
services.xserver.desktopManager.plasma5.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.asahi.useExperimentalGPUDriver = true;
hardware.asahi.addEdgeKernelConfig = true;
hardware.asahi.withRust = true;
networking.firewall.enable = true;
system.stateVersion = "23.11"; # Did you read the comment?
})
];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment