Files
nixos-conf/client-configuration.nix
T
2026-11-06 18:28:10 -05:00

602 lines
18 KiB
Nix

# Edit this configuration file to define what should be installed on your system. Help is available in the configuration.nix(5) man page, on https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, inputs, ... }:
{
imports = [ ./waybar.nix ./mako.nix ./ghostty.nix ];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.hyprland.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
};
programs.dconf.profiles.user.databases = [{
settings."org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita-dark";
icon-theme = "Adwaita";
cursor-theme = "Adwaita";
font-name = "Cantarell 11";
};
}];
qt = { enable = true; platformTheme = "gnome"; style = "adwaita-dark"; };
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
gamescopeSession.enable = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "America/Toronto";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
fonts.fontconfig.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
virtualisation.docker = {
enable = true;
package = pkgs.docker_29;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "not-nix"; # Add this line
users.jeremy = { pkgs, ... }: {
home.stateVersion = "25.11";
wayland.windowManager.hyprland = {
enable = true;
package = null; # use the one from programs.hyprland
portalPackage = null; # same, avoids version conflicts
settings = {
exec-once = [
"waybar"
"mako"
"hyprpaper"
# "nm-applet"
# "hypridle"
#"nextcloud --background"
];
env = [
"XCURSOR_THEME,Adwaita"
"XCURSOR_SIZE,24"
"XDG_CURRENT_DESKTOP,Hyprland:GNOME"
];
cursor = {
inactive_timeout = 3;
};
misc = {
force_default_wallpaper = 0;
background_color = "rgb(1e1e1e)";
};
general = {
gaps_in = 0;
gaps_out = 0;
border_size = 0;
"col.active_border" = "rgba(ffffff22)";
"col.inactive_border" = "rgba(ffffff0a)";
};
decoration = {
rounding = 0;
shadow = {
enabled = false;
range = 20;
render_power = 3;
color = "rgba(FFFFFFFF)";
};
blur.enabled = false;
};
animations = {
enabled = true;
bezier = [ "gnome, 0.25, 1, 0.5, 1" ];
animation = [
"windows, 1, 4, gnome, popin 90%"
"workspaces, 1, 4, gnome, slide"
"fade, 1, 3, gnome"
];
};
"$mod" = "SUPER";
bind = [
"$mod, C, exec, ghostty"
"$mod, D, exec, fuzzel"
"$mod, Q, killactive"
"$mod, grave, exec, rofi -show drun"
"$mod SHIFT, E, exit"
"$mod, F, fullscreen"
"$mod, V, togglefloating"
# focus
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"
"$mod, K, movefocus, u"
"$mod, J, movefocus, d"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
# workspaces
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
#", Print, exec, grimblast --freeze copy area"
#"SHIFT, Print, exec, grimblast copy screen"
", Print, exec, grimblast --freeze copysave area ~/screenshot.png"
"$mod, Print, exec, grimblast copysave screen ~/screenshot.png"
"$mod SHIFT, Escape, exec, systemctl suspend"
];
# drag/resize windows with Super + mouse
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bindel = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, brightnessctl set 5%+"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl = [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
};
};
# programs.waybar = {
# enable = false;
# settings = {
# mainBar = {
# layer = "top";
# position = "top";
# height = 24;
# margin-top = 0;
# margin-left = 0;
# margin-right = 0;
# spacing = 4;
#
# modules-left = [ "niri/workspaces" "niri/window" ];
# modules-center = [];
# modules-right = [ "cpu" "memory" "tray" "battery" "pulseaudio" "clock" ];
#
# "niri/workspaces" = {
# format = "{index}";
# active-only = true;
# };
#
# "clock" = {
# format = "{:%H:%M | %a %d}";
# tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
# };
#
# "pulseaudio" = {
# format = "{icon} {volume}%";
# format-muted = "󰝟";
# format-icons = {
# default = [ "󰕿" "󰖀" "󰕾" ];
# };
# on-click = "pavucontrol";
# };
#
# "cpu" = { format = " {usage}%"; };
# "memory" = { format = "󰍛 {percentage}%"; };
#
# "battery" = {
# states = { critical = 15; };
# format = "{icon} {capacity}%";
# format-icons = [ "󰁺" "󰁼" "󰁾" "󰂀" "󰁹" ];
# };
# };
# };
#
# style = ''
# * {
# font-family: "JetBrainsMono Nerd Font";
# font-size: 15px;
# border: none;
# border-radius: 0;
# }
#
# window#waybar {
# background: #000;
# color: #cdd6f4;
# }
#
# #workspaces button {
# padding: 0 8px;
# color: #bac2de;
# }
#
# #workspaces button.focused {
# color: #7fc8ff;
# background: rgba(127, 200, 255, 0.1);
# border-bottom: 2px solid #7fc8ff;
# }
#
# #clock, #cpu, #memory, #pulseaudio, #battery {
# padding: 0 10px;
# margin: 4px 2px;
# }
#
# #clock {
# font-weight: bold;
# color: #89b4fa;
# }
# '';
# };
services.hyprpaper = {
enable = true;
settings = {
preload = [ "/home/jeremy/nixos/wallpaper.jpg" ];
wallpaper = [ ", /home/jeremy/nixos/wallpaper.jpg" ];
};
};
programs.vscode = { # Configure vscodium
enable = true;
package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.vscodium; # i just want the vscode-dark-2026 theme
mutableExtensionsDir = true; # Keep theme updated
profiles.default.extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide # NIX syntax highlighting. Also uses nixfmt package
rust-lang.rust-analyzer # Rust
mkhl.direnv # recognize custom nix environments
tamasfe.even-better-toml # toml file support
myriad-dreamin.tinymist # typst files
tekumara.typos-vscode # spellcheck
bierner.markdown-mermaid # mermaid
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "skillavid-pure-black";
# publisher = "redwan-hossain";
# version = "5.0.0";
# sha256 = "sha256-/gLvhw0XcUb6Jch/LZ4k7xpSS9wdYWVf5u7uvOHS+i8=";
# }
# {
# name = "remote-ssh-edit";
# publisher = "ms-vscode-remote";
# version = "0.47.2";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
];
};
};
};
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
users.users.jeremy = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "wireshark" "adbusers" "plugdev" "networkmanager" "video" ];
shell = pkgs.bash;
home = "/home/jeremy";
createHome = true;
packages = with pkgs; [
prismlauncher # minecraft launcher
discord-canary
# godot # 4.5.1 for now
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.godot_4
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.typst # bleeding edge html exports for typst
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.tinymist # typst previews
nextcloud-client
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.signal-desktop
# swaybg # wallpaper
nixfmt # nix file formatting
openrgb # RGB editor
furmark # Room heater
gcc
xauth
python3
direnv # develop projects in custom environments
# hyprshot # screenshots
patchelf # make programs understand nix. good for downloaded executables such as crackmes
htop
ripgrep
obsidian # note taking
mullvad-vpn # arrr
qbittorrent # arrr
binaryninja-free # broke ahh cracker
mpv # arrr
starsector
burpsuite
wireshark
obs-studio
slack
wireguard-tools
blender # drone
gnumake # make & makefile
zathura
thunderbird
claude-code
gdb
tldr
rust-analyzer
cargo
rustc
pyright
ruff
clang-tools
bash-language-server
shellcheck
shfmt
];
};
# Use https://search.nixos.org/ to find more packages (and options).
environment.systemPackages = with pkgs; [
firefox
neovim
wget
gnome-disk-utility
dunst
libnotify
rofi
ghostty
ncdu
nmap
git
unzip
pavucontrol # PulseAudio Volume Control
bluez # Bluetooth support
bluez-tools # Bluetooth tools
polkit_gnome
usbutils # for lsusb
xwayland-satellite # xwayland support
fuzzel # menu
networkmanagerapplet
wireless-regdb
tmux
ripgrep
thunderbird
waybar fuzzel mako hyprlock hypridle
adwaita-icon-theme gnome-themes-extra
networkmanagerapplet pavucontrol brightnessctl
wl-clipboard grim slurp grimblast nautilus
just
];
fonts.packages = [ pkgs.nerd-fonts.jetbrains-mono ];
programs.niri.enable = false;
boot.initrd.kernelModules = [ "amdgpu" ];
environment.sessionVariables = {
SUDO_EDITOR = "nvim";
EDITOR = "nvim";
VISUAL = "nvim";
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.tailscale.enable = true;
services.ollama = {
enable = false;
package = pkgs.ollama;
acceleration = "rocm";
host = "0.0.0.0";
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.login.enableGnomeKeyring = true;
security.polkit.enable = true;
services.pulseaudio.enable = false; # Use Pipewire
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = false;
};
security.rtkit.enable = true; # Enable RealtimeKit for audio purposes
services.hardware.openrgb = { # Enable OpenRGB
enable = true;
package = pkgs.openrgb-with-all-plugins;
motherboard = "amd";
server.port = 6742;
};
services.udisks2.enable = true; # Enable gnome-disks
# services.displayManager.sddm.enable = true; # Enable display manager
# services.displayManager.sddm.wayland.enable = true; # Wayland
services.mullvad-vpn.package = pkgs.mullvad-vpn; # arr
services.resolved.enable = true; # for mullvad
# programs.ssh.startAgent = true; # Enable SSH tools
# programs.thunar.enable = true; # file manager
programs.wireshark.enable = true;
# virtualisation.waydroid.enable = true; # android :0
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
"furmark"
"burpsuite"
"slack"
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# Enable OpenSSH daemon
services.openssh = {
enable = true;
settings.X11Forwarding = true;
};
networking.networkmanager.enable = true;
networking.extraHosts = ''
10.0.1.51 freeipa.bsidestoctf.com
'';
programs.nm-applet.enable = true;
# Binaries auto linked
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc
stdenv.cc.cc.lib
zlib
fuse3
icu
nss
openssl
curl
expat
wayland
libxkbcommon
libGL
gtk3
glib
pango
harfbuzz
cairo
gdk-pixbuf
webkitgtk_4_1
libsoup_3
gobject-introspection
];
services.displayManager.gdm.enable = true;
#services.desktopManager.gnome.enable = true;
#services.desktopManager.cosmic.enable = true;
services.gnome.core-apps.enable = true;
services.gnome.core-developer-tools.enable = false;
services.gnome.games.enable = false;
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ];
# udev rules for pyocd for UTAT
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374e", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374b", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374f", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3753", MODE="0666", GROUP="plugdev"
'';
# bootloader device
# boot.loader.grub.device = "/dev/sda";
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#programs.wireshark.enable = true;
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.11"; # Did you read the comment?
}