me like nix
0

Configure Feed

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

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