me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ pkgs, lib, ... }: 2 3let 4 berkeley-mono-typeface = pkgs.callPackage ../../berkely-mono/berkeley.nix { }; 5 6 # Steam/gamescope calls steamos-session-select when the user presses 7 # "Switch to Desktop". Without this script, the button does nothing. 8 # Returning 0 lets gamescope proceed to exit, returning to greetd/regreet. 9 steamos-session-select = pkgs.writeShellScriptBin "steamos-session-select" '' 10 echo "Switching session to: $1" 11 ''; 12in 13{ 14 15 nix.settings.experimental-features = [ 16 "nix-command" 17 "flakes" 18 ]; 19 nix.settings.download-buffer-size = 268435456; 20 21 hardware.bluetooth.enable = true; 22 hardware.bluetooth.powerOnBoot = true; 23 services.blueman.enable = true; 24 25 # Bootloader. 26 boot.loader.systemd-boot.enable = true; 27 boot.loader.efi.canTouchEfiVariables = true; 28 29 services.fwupd.enable = true; 30 # Use latest kernel. 31 boot.kernelPackages = pkgs.linuxPackages_latest; 32 boot.kernel.sysctl."kernel.task_delayacct" = 1; 33 34 # Fix USB disconnection issues with Dell U4025QW Thunderbolt dock 35 # Disables autosuspend and LPM for Dell hub (vendor ID: 1d5c, product ID: 5801) 36 # boot.kernelParams = [ "usbcore.quirks=1d5c:5801:gk" ]; 37 # If USB disconnects persist, try disabling UCSI ACPI instead: 38 # boot.kernelParams = [ "module_blacklist=ucsi_acpi" ]; 39 40 # Enable networking 41 networking.networkmanager.enable = true; 42 43 # Set your time zone. 44 # time.timeZone = "America/New_York"; 45 time.timeZone = "America/Toronto"; 46 47 # Select internationalisation properties. 48 i18n.defaultLocale = "en_US.UTF-8"; 49 50 i18n.extraLocaleSettings = { 51 LC_ADDRESS = "en_US.UTF-8"; 52 LC_IDENTIFICATION = "en_US.UTF-8"; 53 LC_MEASUREMENT = "en_US.UTF-8"; 54 LC_MONETARY = "en_US.UTF-8"; 55 LC_NAME = "en_US.UTF-8"; 56 LC_NUMERIC = "en_US.UTF-8"; 57 LC_PAPER = "en_US.UTF-8"; 58 LC_TELEPHONE = "en_US.UTF-8"; 59 LC_TIME = "en_US.UTF-8"; 60 }; 61 62 # Font configuration 63 fonts = { 64 fontDir.enable = true; 65 fontconfig = { 66 enable = true; 67 defaultFonts = { 68 monospace = [ 69 "BerkeleyMono Nerd Font" 70 "BerkeleyMono" 71 ]; 72 }; 73 }; 74 packages = with pkgs; [ 75 berkeley-mono-typeface 76 ]; 77 }; 78 79 programs.niri = { 80 enable = true; 81 }; 82 83 catppuccin = { 84 enable = true; 85 flavor = "frappe"; 86 }; 87 88 programs.regreet = { 89 enable = true; 90 cageArgs = [ "-s" "-d" ]; 91 settings.GTK.application_prefer_dark_theme = true; 92 theme = { 93 package = pkgs.catppuccin-gtk.override { 94 variant = "frappe"; 95 accents = [ "lavender" ]; 96 size = "standard"; 97 }; 98 name = "catppuccin-frappe-lavender-standard"; 99 }; 100 iconTheme = { 101 package = pkgs.catppuccin-papirus-folders.override { 102 flavor = "frappe"; 103 accent = "lavender"; 104 }; 105 name = "Papirus-Dark"; 106 }; 107 cursorTheme = { 108 package = pkgs.catppuccin-cursors.frappeDark; 109 name = "catppuccin-frappe-dark-cursors"; 110 }; 111 }; 112 113 # Scale regreet's greeter for HiDPI displays 114 services.greetd.settings.default_session.command = lib.mkForce 115 "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} -s -d -- env GDK_SCALE=2 ${lib.getExe pkgs.greetd.regreet}"; 116 117 # Enable CUPS to print documents. 118 services.printing.enable = true; 119 120 security.polkit.enable = true; 121 security.rtkit.enable = true; 122 services.pipewire = { 123 enable = true; 124 alsa.enable = true; 125 alsa.support32Bit = true; 126 pulse.enable = true; 127 # If you want to use JACK applications, uncomment this 128 #jack.enable = true; 129 130 # use the example session manager (no others are packaged yet so this is enabled by default, 131 # no need to redefine it in your config for now) 132 #media-session.enable = true; 133 }; 134 135 services.gnome.gnome-keyring.enable = true; 136 security.pam.services.greetd.enableGnomeKeyring = true; 137 138 services.udisks2.enable = true; 139 services.tailscale.enable = true; 140 services.pcscd.enable = true; # Smart card daemon for Yubikey 141 142 security.pam.u2f = { 143 enable = true; 144 control = "sufficient"; 145 cue = true; 146 settings = { 147 origin = "pam://nixos"; 148 appid = "pam://nixos"; 149 }; 150 }; 151 security.pam.services.sudo.u2fAuth = true; 152 153 programs.yubikey-touch-detector.enable = true; 154 155 # ZSA Keyboard udev rules for Oryx web flashing and live training 156 services.udev.extraRules = '' 157 # Rules for Oryx web flashing and live training 158 KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" 159 KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" 160 161 # Legacy rules for live training over webusb (Not needed for firmware v21+) 162 # Rule for all ZSA keyboards 163 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" 164 # Rule for the Moonlander 165 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" 166 # Rule for the Ergodox EZ 167 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" 168 # Rule for the Planck EZ 169 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" 170 171 # Wally Flashing rules for the Ergodox EZ 172 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" 173 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" 174 SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" 175 KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" 176 177 # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ 178 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" 179 # Keymapp Flashing rules for the Voyager 180 SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" 181 # USB serial device access via Chrome/Chromium 182 KERNEL=="ttyUSB[0-9]*", MODE:="0666", GROUP="dialout" 183 KERNEL=="ttyACM[0-9]*", MODE:="0666", GROUP="dialout" 184 ''; 185 186 # Define a user account. Don't forget to set a password with ‘passwd’. 187 users.groups.storage = { }; 188 users.groups.plugdev = { }; 189 users.users.sean = { 190 isNormalUser = true; 191 description = "Sean Aye"; 192 extraGroups = [ 193 "docker" 194 "networkmanager" 195 "wheel" 196 "video" 197 "disk" 198 "storage" 199 "input" 200 "plugdev" 201 "dialout" 202 ]; 203 shell = pkgs.fish; 204 }; 205 206 programs.steam = { 207 enable = true; 208 remotePlay.openFirewall = true; 209 gamescopeSession = { 210 enable = true; 211 args = [ 212 "-r" "120" 213 "-R" "120" 214 ]; 215 env = { 216 STEAM_DESKTOP_SESSION = "niri"; 217 }; 218 }; 219 extraCompatPackages = with pkgs; [ 220 proton-ge-bin 221 ]; 222 }; 223 224 programs.gamemode.enable = true; 225 226 programs.gamescope = { 227 enable = true; 228 capSysNice = false; 229 }; 230 231 # Manually add the gamescope capability wrapper without triggering 232 # the steam module's setuid bwrap override (which zeros CapBnd 233 # inside the FHS sandbox, preventing games from launching) 234 security.wrappers.gamescope = { 235 owner = "root"; 236 group = "root"; 237 source = "${pkgs.gamescope}/bin/gamescope"; 238 capabilities = "cap_sys_nice+pie"; 239 }; 240 241 programs.fish.enable = true; 242 programs._1password.enable = true; 243 programs._1password-gui = { 244 enable = true; 245 polkitPolicyOwners = [ "sean" ]; 246 }; 247 248 virtualisation.docker.enable = true; 249 250 # Allow unfree packages 251 nixpkgs.config.allowUnfree = true; 252 253 # List packages installed in system profile. To search, run: 254 # $ nix search wget 255 environment.systemPackages = with pkgs; [ 256 wl-clipboard 257 steamos-session-select 258 ]; 259 environment.variables = { 260 EDITOR = "hx"; 261 VISUAL = "hx"; 262 SUDO_EDITOR = "hx"; 263 }; 264}