Created
June 26, 2025 15:36
-
-
Save lordofwizard/75432bd4da33643b9d5aabbae9bee8cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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, ... }: | |
| { | |
| imports = | |
| [ # Include the results of the hardware scan. | |
| ./hardware-configuration.nix | |
| ]; | |
| # Bootloader. | |
| boot.loader = { | |
| efi = { | |
| canTouchEfiVariables = true; | |
| efiSysMountPoint = "/boot/efi"; # ← use the same mount point here. | |
| }; | |
| grub = { | |
| efiSupport = true; | |
| #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system | |
| device = "nodev"; | |
| useOSProber = true; | |
| }; | |
| }; | |
| boot.kernelParams = [ "i915.force_probe=7d55" ]; | |
| boot.kernelPackages = pkgs.linuxPackages_latest; | |
| boot.initrd.kernelModules = ["xe"]; | |
| networking.hostName = "kyoichi"; # Define your hostname. | |
| # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
| hardware.graphics.enable = true; | |
| hardware.graphics.enable32Bit = true; | |
| networking.networkmanager.enable = true; | |
| time.timeZone = "Asia/Kolkata"; | |
| i18n.defaultLocale = "en_IN"; | |
| programs.nix-ld.enable = true; | |
| i18n.extraLocaleSettings = { | |
| LC_ADDRESS = "en_IN"; | |
| LC_IDENTIFICATION = "en_IN"; | |
| LC_MEASUREMENT = "en_IN"; | |
| LC_MONETARY = "en_IN"; | |
| LC_NAME = "en_IN"; | |
| LC_NUMERIC = "en_IN"; | |
| LC_PAPER = "en_IN"; | |
| LC_TELEPHONE = "en_IN"; | |
| LC_TIME = "en_IN"; | |
| }; | |
| nix.settings.experimental-features = [ "nix-command" "flakes" ]; | |
| # hardware.opengl.enable = true; | |
| # Enable the X11 windowing system. | |
| services.xserver.enable = true; | |
| services.xserver.videoDrivers = [ "modesetting" ]; | |
| # Enable the GNOME Desktop Environment. | |
| services.xserver.displayManager.gdm.enable = true; | |
| services.xserver.desktopManager.gnome.enable = true; | |
| # Configure keymap in X11 | |
| services.xserver.xkb = { | |
| layout = "us"; | |
| variant = ""; | |
| }; | |
| # Enable CUPS to print documents. | |
| services.printing.enable = true; | |
| # Enable sound with pipewire. | |
| hardware.pulseaudio.enable = false; | |
| security.rtkit.enable = true; | |
| services.pipewire = { | |
| enable = true; | |
| alsa.enable = true; | |
| alsa.support32Bit = true; | |
| pulse.enable = true; | |
| # If you want to use JACK applications, uncomment this | |
| jack.enable = true; | |
| # use the example session manager (no others are packaged yet so this is enabled by default, | |
| # no need to redefine it in your config for now) | |
| #media-session.enable = true; | |
| }; | |
| # Enable touchpad support (enabled default in most desktopManager). | |
| services.libinput.enable = true; | |
| # Define a user account. Don't forget to set a password with ‘passwd’. | |
| programs.firefox.enable = true; | |
| nixpkgs.config.allowUnfree = true; | |
| environment.systemPackages = with pkgs; [ | |
| vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. | |
| neovim | |
| firefox | |
| vscode | |
| gnome-tweaks | |
| gnome-pomodoro | |
| home-manager | |
| powertop | |
| go | |
| # Utils for Raspberry Pi Pico Programming | |
| minicom | |
| usbutils | |
| thonny | |
| # General Development and ssh goodies. | |
| git | |
| tree | |
| tmux | |
| gnumake | |
| zeroad | |
| gcc | |
| gdb | |
| lldb | |
| pkg-config | |
| cmake | |
| curl | |
| wget | |
| openssl | |
| zlib | |
| # Rust toolchain via rustup | |
| rustup | |
| # VSCode and extensions | |
| vscode | |
| # Recommended VSCode extensions (install via user settings or extensions.json, not here directly) | |
| # Optional: extra useful tools for Rust dev | |
| clippy # Linter | |
| rust-analyzer # IDE support | |
| cargo-edit # Adds `cargo add`, `cargo rm`, etc. | |
| cargo-watch # For watching and auto-rebuilding | |
| cargo-outdated # For checking outdated dependencies | |
| cargo-audit # For auditing dependencies for security issues | |
| ripgrep # Used by rust-analyzer and vscode | |
| # Nix tools | |
| nixpkgs-fmt # Formatter for nix files | |
| nil # Nix language server | |
| #veloren | |
| ffmpeg | |
| # GPU Things | |
| # mesa | |
| #mesa.drivers | |
| #libglvnd | |
| #libGL | |
| #libva | |
| #vaapiVdpau | |
| #vulkan-loader | |
| #vulkan-validation-layers | |
| #gvfs | |
| #xorg.libxcb | |
| #xorg.libX11 | |
| #xorg.libXdamage | |
| #xorg.libXext | |
| #xorg.libXfixes | |
| #xorg.libXi | |
| #xorg.libXrender | |
| #xorg.libXtst | |
| #xorg.libXcomposite | |
| #xorg.libxkbfile | |
| #libdrm | |
| nss | |
| # Game related packages | |
| wine | |
| dwarfs | |
| gamemode | |
| heroic | |
| mangohud | |
| bubblewrap | |
| fuse-overlayfs | |
| cozy | |
| # Python Packages add them here. (It's not working as expected tho) | |
| (python3.withPackages (ps: with ps; [ | |
| pip | |
| rshell | |
| thonny | |
| ])) | |
| (chromium.override { | |
| commandLineArgs = [ | |
| "--enable-features=AcceleratedVideoEncoder" | |
| "--ignore-gpu-blocklist" | |
| "--enable-zero-copy" | |
| ]; | |
| }) | |
| ]; | |
| programs.sway = { | |
| enable = true; | |
| wrapperFeatures.gtk = true; # so that gtk works properly | |
| extraPackages = with pkgs; [ | |
| swaylock | |
| swayidle | |
| wmenu | |
| wl-clipboard | |
| wf-recorder | |
| mako # notification daemon | |
| grim | |
| #kanshi | |
| slurp | |
| alacritty # Alacritty is the default terminal in the config | |
| dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native | |
| xfce.thunar | |
| wofi | |
| ]; | |
| extraSessionCommands = '' | |
| export SDL_VIDEODRIVER=wayland | |
| export QT_QPA_PLATFORM=wayland | |
| export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" | |
| export _JAVA_AWT_WM_NONREPARENTING=1 | |
| export MOZ_ENABLE_WAYLAND=1 | |
| export WAYLAND_DISPLAY= | |
| ''; | |
| }; | |
| programs.waybar.enable = true; | |
| hardware.opengl.extraPackages = with pkgs; [ | |
| vulkan-loader | |
| vulkan-validation-layers | |
| intel-media-driver | |
| vaapiIntel | |
| vaapiVdpau | |
| libvdpau-va-gl | |
| ]; | |
| environment.sessionVariables.NIXOS_OZONE_WL = "1"; | |
| programs.gnupg.agent = { | |
| enable = true; | |
| enableSSHSupport = true; | |
| }; | |
| # Virtmanager | |
| programs.virt-manager.enable = true; | |
| users.groups.libvirtd.members = ["lordofwizard"]; | |
| virtualisation.libvirtd.enable = true; | |
| virtualisation.spiceUSBRedirection.enable = true; | |
| users.users.lordofwizard = { | |
| isNormalUser = true; | |
| description = "Advait Pandharpurkar"; | |
| extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; | |
| packages = with pkgs; [ | |
| # thunderbird | |
| fastfetch | |
| tmux | |
| obs-studio | |
| hmcl | |
| spotify | |
| mpv | |
| yt-dlp | |
| calibre | |
| obsidian | |
| qbittorrent | |
| brave | |
| komikku | |
| rustup | |
| ]; | |
| }; | |
| services.syncthing = { | |
| enable = true; | |
| user = "lordofwizard"; | |
| dataDir = "/home/lordofwizard/Documents"; | |
| configDir = "/home/lordofwizard/.config/syncthing"; | |
| settings = { | |
| folders = { | |
| "notes" = { | |
| path = "/home/lordofwizard/Documents/memoir/"; | |
| }; | |
| }; | |
| }; | |
| }; | |
| # Optional: set up GOPATH and add it to PATH | |
| environment.variables = { | |
| GOPATH = "/home/lordofwizard/go"; | |
| GOBIN = "/home/lordofwizard/go/bin"; | |
| }; | |
| systemd.user.services.syncthing.wantedBy = [ "default.target" ]; | |
| # Enable SSH | |
| services.openssh.enable = true; | |
| services.flatpak.enable = true; | |
| services.tailscale.enable = true; | |
| programs.gamescope.enable = true; | |
| programs.gamemode.enable = true; | |
| # Writable rule for Raspberry Pi Pico | |
| services.udev.extraRules = '' | |
| # Raspberry Pi Pico rules | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="2e8a", ATTR{idProduct}=="0005", MODE="0666" | |
| SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0005", MODE="0666" | |
| ''; | |
| system.stateVersion = "24.11"; # Did you read the comment? | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment