This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asahi.nix
81 lines (68 loc) · 2.09 KB
/
asahi.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, apple-silicon, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware/asahi.nix
# apple-silicon hardware support
apple-silicon.nixosModules.apple-silicon-support
../default.nix
];
# custom options
yusef = {
system = "aarch64-linux";
hidpi = true;
gui.enable = true;
sound.enable = true;
bluetooth.enable = true;
droidcam.enable = true;
obs.enable = true;
sway = {
enable = true;
natural-scrolling = true;
terminal = "alacritty";
output = {
eDP-1 = {
scale = "2";
};
};
# set the playback volume on the headphone jack to 100%
# since it seems to reset to zero on boot.
# The actual volume will be controlled by pulseaudio / pipewire
startup-commands = [
{ command = "${pkgs.alsa-utils}/bin/amixer -c 1 set 'Jack DAC' 100%"; }
];
};
podman.enable = true;
key-remap = {
enable = true;
caps-to-ctrl-esc = true;
right-alt-to-ctrl-b = true;
};
};
# asahi linux overlay
nixpkgs.overlays = [ apple-silicon.overlays.apple-silicon-overlay ];
# enable GPU support
hardware.asahi.useExperimentalGPUDriver = true;
# backlight control
programs.light.enable = true;
services.actkbd = {
enable = true;
bindings = [
{ keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -A 10"; }
{ keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -U 10"; }
];
};
# use TLP for power management
services.tlp = {
enable = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
networking.hostName = "asahi"; # Define your hostname.
networking.networkmanager.enable = true;
system.stateVersion = "23.05";
}