me like nix
1{ pkgs, ... }:
2
3let
4 berkeley-mono-typeface = pkgs.callPackage ../../berkely-mono/berkeley.nix { };
5in
6{
7
8 nix.settings.experimental-features = [
9 "nix-command"
10 "flakes"
11 ];
12 nix.settings.download-buffer-size = 268435456;
13
14 hardware.bluetooth.enable = true;
15 hardware.bluetooth.powerOnBoot = true;
16 services.blueman.enable = true;
17
18 # Bootloader.
19 boot.loader.systemd-boot.enable = true;
20 boot.loader.efi.canTouchEfiVariables = true;
21
22 services.fwupd.enable = true;
23 # Use latest kernel.
24 boot.kernelPackages = pkgs.linuxPackages_latest;
25
26 # Fix USB disconnection issues with Dell U4025QW Thunderbolt dock
27 # Disables autosuspend and LPM for Dell hub (vendor ID: 1d5c, product ID: 5801)
28 # boot.kernelParams = [ "usbcore.quirks=1d5c:5801:gk" ];
29 # If USB disconnects persist, try disabling UCSI ACPI instead:
30 # boot.kernelParams = [ "module_blacklist=ucsi_acpi" ];
31
32 # Enable networking
33 networking.networkmanager.enable = true;
34
35 # Set your time zone.
36 # time.timeZone = "America/New_York";
37 time.timeZone = "America/Toronto";
38
39 # Select internationalisation properties.
40 i18n.defaultLocale = "en_US.UTF-8";
41
42 i18n.extraLocaleSettings = {
43 LC_ADDRESS = "en_US.UTF-8";
44 LC_IDENTIFICATION = "en_US.UTF-8";
45 LC_MEASUREMENT = "en_US.UTF-8";
46 LC_MONETARY = "en_US.UTF-8";
47 LC_NAME = "en_US.UTF-8";
48 LC_NUMERIC = "en_US.UTF-8";
49 LC_PAPER = "en_US.UTF-8";
50 LC_TELEPHONE = "en_US.UTF-8";
51 LC_TIME = "en_US.UTF-8";
52 };
53
54 # Font configuration
55 fonts = {
56 fontDir.enable = true;
57 fontconfig = {
58 enable = true;
59 defaultFonts = {
60 monospace = [
61 "BerkeleyMono Nerd Font"
62 "BerkeleyMono"
63 ];
64 };
65 };
66 packages = with pkgs; [
67 berkeley-mono-typeface
68 ];
69 };
70
71 programs.niri = {
72 enable = true;
73 };
74
75 services.greetd = {
76 enable = true;
77 settings = {
78 default_session = {
79 command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
80 user = "greeter";
81 };
82 };
83 };
84
85 # Enable CUPS to print documents.
86 services.printing.enable = true;
87
88 security.polkit.enable = true;
89 security.rtkit.enable = true;
90 services.pipewire = {
91 enable = true;
92 alsa.enable = true;
93 alsa.support32Bit = true;
94 pulse.enable = true;
95 # If you want to use JACK applications, uncomment this
96 #jack.enable = true;
97
98 # use the example session manager (no others are packaged yet so this is enabled by default,
99 # no need to redefine it in your config for now)
100 #media-session.enable = true;
101 };
102
103 services.udisks2.enable = true;
104 services.tailscale.enable = true;
105 services.pcscd.enable = true; # Smart card daemon for Yubikey
106
107 # ZSA Keyboard udev rules for Oryx web flashing and live training
108 services.udev.extraRules = ''
109 # Rules for Oryx web flashing and live training
110 KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
111 KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
112
113 # Legacy rules for live training over webusb (Not needed for firmware v21+)
114 # Rule for all ZSA keyboards
115 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
116 # Rule for the Moonlander
117 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
118 # Rule for the Ergodox EZ
119 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
120 # Rule for the Planck EZ
121 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
122
123 # Wally Flashing rules for the Ergodox EZ
124 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
125 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
126 SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
127 KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
128
129 # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
130 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
131 # Keymapp Flashing rules for the Voyager
132 SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
133 # USB serial device access via Chrome/Chromium
134 KERNEL=="ttyUSB[0-9]*", MODE:="0666", GROUP="dialout"
135 KERNEL=="ttyACM[0-9]*", MODE:="0666", GROUP="dialout"
136 '';
137
138 # Define a user account. Don't forget to set a password with ‘passwd’.
139 users.groups.storage = { };
140 users.groups.plugdev = { };
141 users.users.sean = {
142 isNormalUser = true;
143 description = "Sean Aye";
144 extraGroups = [
145 "docker"
146 "networkmanager"
147 "wheel"
148 "video"
149 "disk"
150 "storage"
151 "input"
152 "plugdev"
153 "dialout"
154 ];
155 shell = pkgs.fish;
156 };
157
158 programs.steam = {
159 enable = true;
160 remotePlay.openFirewall = true;
161 gamescopeSession.enable = true;
162 extraCompatPackages = with pkgs; [
163 proton-ge-bin
164 ];
165 };
166
167 programs.gamemode.enable = true;
168
169 programs.gamescope = {
170 enable = true;
171 capSysNice = true;
172 };
173
174 programs.fish.enable = true;
175 programs._1password.enable = true;
176 programs._1password-gui = {
177 enable = true;
178 polkitPolicyOwners = [ "sean" ];
179 };
180
181 virtualisation.docker.enable = true;
182
183 # Allow unfree packages
184 nixpkgs.config.allowUnfree = true;
185
186 # List packages installed in system profile. To search, run:
187 # $ nix search wget
188 environment.systemPackages = with pkgs; [
189 wl-clipboard
190 ];
191 environment.variables = {
192 EDITOR = "hx";
193 VISUAL = "hx";
194 SUDO_EDITOR = "hx";
195 };
196}