/ configuration.nix
configuration.nix
1 # 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 2 # NixOS manual (accessible by running ‘nixos-help’). 3 4 { config, pkgs, ... }: { 5 imports = [ 6 # Include the results of the hardware scan. 7 ./hardware-configuration.nix 8 ]; 9 10 # Bootloader. 11 boot.loader.grub.enable = true; 12 boot.loader.grub.efiSupport = true; 13 boot.loader.grub.efiInstallAsRemovable = true; 14 boot.loader.grub.device = "nodev"; 15 boot.loader.grub.useOSProber = false; 16 boot.initrd.kernelModules = [ "pinctrl_tigerlake" ]; 17 18 networking.hostName = "krebmachine"; # Define your hostname. 19 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 20 21 # Configure network proxy if necessary networking.proxy.default = "http://user:password@proxy:port/"; networking.proxy.noProxy = 22 # "127.0.0.1,localhost,internal.domain"; 23 24 # Enable networking 25 networking.networkmanager.enable = true; 26 27 # Wayland settings 28 services.xserver.enable = true; 29 programs.xwayland.enable = true; 30 31 # Window Manager 32 services.xserver.windowManager.i3.enable = true; 33 # services.xserver.desktopManager.xfce.enable = true; 34 programs.niri.enable = true; 35 36 # Display Manager 37 services.displayManager.defaultSession = "niri"; 38 # services.xserver.displayManager.lightdm.enable = true; 39 # services.displayManager.sddm.enable = true; 40 # services.displayManager.sddm.wayland.enable = true; 41 services.displayManager.ly = { 42 enable = true; 43 settings = { 44 load = true; 45 save = true; 46 hide_key_hints = true; 47 hide_version_string = true; 48 full_color = true; 49 }; 50 }; 51 52 # Session Variables 53 environment.sessionVariables = { 54 XDG_SESSION_TYPE = "wayland"; 55 XDG_CURRENT_DESKTOP = "KDE"; 56 XDG_SESSION_DESKTOP = "niri"; 57 WAYLAND_DISPLAY = "wayland-0"; 58 }; 59 60 # Set your time zone. 61 time.timeZone = "Australia/Brisbane"; 62 63 # Select internationalisation properties. 64 i18n.defaultLocale = "en_AU.UTF-8"; 65 66 i18n.extraLocaleSettings = { 67 LC_ADDRESS = "en_AU.UTF-8"; 68 LC_IDENTIFICATION = "en_AU.UTF-8"; 69 LC_MEASUREMENT = "en_AU.UTF-8"; 70 LC_MONETARY = "en_AU.UTF-8"; 71 LC_NAME = "en_AU.UTF-8"; 72 LC_NUMERIC = "en_AU.UTF-8"; 73 LC_PAPER = "en_AU.UTF-8"; 74 LC_TELEPHONE = "en_AU.UTF-8"; 75 LC_TIME = "en_AU.UTF-8"; 76 }; 77 78 # Configure keymap in X11 79 services.xserver.xkb = { 80 layout = "au"; 81 variant = ""; 82 }; 83 84 programs.fish.enable = true; 85 users.users.mrkrebs.shell = pkgs.bash; 86 87 # Define a user account. Don't forget to set a password with ‘passwd’. 88 users.users.mrkrebs = { 89 isNormalUser = true; 90 description = "mrkrebs"; 91 extraGroups = [ "networkmanager" "wheel" "dialout" "video" ]; 92 packages = with pkgs; [ ]; 93 }; 94 95 # Allow unfree packages 96 nixpkgs.config.allowUnfree = true; 97 98 # List packages installed in system profile. To search, run: $ nix search wget 99 environment.systemPackages = with pkgs; [ 100 # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 101 wget 102 light 103 git 104 mangohud 105 vim 106 curl 107 niri 108 zip 109 brightnessctl 110 unzip 111 bluez 112 p7zip 113 unrar 114 rar 115 gnutar 116 iproute2 117 gcc 118 unixtools.ping 119 plymouth 120 parted 121 xwayland-satellite 122 xbindkeys 123 xdg-utils 124 xbindkeys-config 125 nnn 126 pcmanfm 127 nautilus 128 wineWow64Packages.full 129 ]; 130 131 # Some programs need SUID wrappers, can be configured further or are started in user sessions. programs.mtr.enable = true; programs.gnupg.agent = { 132 # enable = true; enableSSHSupport = true; 133 # }; 134 135 # List services that you want to enable: 136 137 # Enable the OpenSSH daemon. services.openssh.enable = true; 138 139 # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ ... ]; networking.firewall.allowedUDPPorts = [ ... ]; Or disable the firewall 140 # altogether. networking.firewall.enable = false; 141 142 # This value determines the NixOS release from which the default settings for stateful data, like file locations and database versions on your system 143 # were taken. It‘s perfectly fine and recommended to leave this value at the release version of the first install of this system. Before changing this 144 # value read the documentation for this option (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 145 system.stateVersion = "25.05"; # Did you read the comment? 146 147 # Enable flakes 148 nix.settings.experimental-features = [ "nix-command" "flakes" ]; 149 150 # Plymouth module, check available themes at https://github.com/adi1090x/plymouth-themes 151 boot.plymouth = { 152 enable = true; 153 themePackages = [ pkgs.adi1090x-plymouth-themes ]; 154 theme = "circuit"; 155 }; 156 157 # Nix Garbage Collection. Remove old system generations 158 nix.gc = { 159 automatic = true; 160 dates = "weekly"; 161 options = "--delete-older-than 30d"; 162 }; 163 164 # Enable Flatpak 165 services.flatpak.enable = true; 166 167 # Enable auto-cpufreq to save battery 168 services.auto-cpufreq.enable = true; 169 services.power-profiles-daemon.enable = false; 170 171 # Bluetooth 172 hardware.bluetooth = { 173 enable = true; 174 powerOnBoot = true; 175 }; 176 177 # Mime 178 xdg.mime.enable = true; 179 xdg.menus.enable = true; 180 181 # Steam Enable with GameScope 182 programs.steam = { 183 enable = true; 184 gamescopeSession.enable = true; 185 remotePlay.openFirewall = true; 186 dedicatedServer.openFirewall = true; 187 localNetworkGameTransfers.openFirewall = true; 188 }; 189 programs.gamescope = { 190 enable = true; 191 capSysNice = true; 192 }; 193 hardware = 194 { 195 graphics = { 196 enable = true; 197 enable32Bit = true; 198 }; 199 }; 200 201 # Running non-Nix binaries with dynamic linking 202 programs.nix-ld.enable = true; 203 204 # Allow brightnessctl be run by anyone 205 security.sudo.enable = true; 206 services.udev.extraRules = '' 207 ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" 208 ''; 209 210 # Framework 12 with intel settings 211 services.fwupd.enable = true; 212 services.fwupd.extraRemotes = [ "lvfs-testing" ]; 213 services.fwupd.uefiCapsuleSettings.DisableCapsuleUpdateOnDisk = true; 214 215 }