Compare commits

..

1 commit

Author SHA1 Message Date
Fish
8b9e928244 Switch updates 2025-08-31 18:49:59 -07:00
9 changed files with 12 additions and 130 deletions

View file

@ -32,7 +32,6 @@
android-nixpkgs = { android-nixpkgs = {
url = "github:tadfisher/android-nixpkgs/stable"; url = "github:tadfisher/android-nixpkgs/stable";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-options-search.url = "github:madsbv/nix-options-search"; nix-options-search.url = "github:madsbv/nix-options-search";

View file

@ -77,7 +77,6 @@ in
# ViM and Neovim # ViM and Neovim
".*.swp" ".*.swp"
".nvimlog" ".nvimlog"
".jj"
]; ];
}; };
@ -135,27 +134,6 @@ in
autocd = true; autocd = true;
history.size = 10000; history.size = 10000;
}; };
jujutsu = {
settings = {
user = {
email = config.programs.git.userEmail;
name = config.programs.git.userName;
};
signing = {
behavior = "own";
backend = "ssh";
key = "~/.ssh/id_ed25519.pub";
};
git = {
sign-on-push = true;
push-new-bookmarks = true;
};
ui = {
default-command = "log";
pager = "${pkgs.bat}/bin/bat --style=plain";
};
};
};
ghostty.settings.custom-shader = lib.mkIf ( ghostty.settings.custom-shader = lib.mkIf (
cfg.ghostty.shader != null cfg.ghostty.shader != null

View file

@ -131,7 +131,6 @@
hide_dotfiles = false; hide_dotfiles = false;
never_show = [ never_show = [
".git" ".git"
".jj"
".DS_Store" # macOS ".DS_Store" # macOS
"thumbs.db" # Windows "thumbs.db" # Windows
]; ];

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
pkgs, pkgs,
host,
... ...
}: }:
{ {
@ -10,6 +11,7 @@
./services.nix ./services.nix
./nvidia.nix ./nvidia.nix
]; ];
config.networking.hostName = host.name;
# make 'shared.darwin' not an error to define. # make 'shared.darwin' not an error to define.
options.shared.darwin = lib.mkOption { options.shared.darwin = lib.mkOption {
type = lib.types.anything; type = lib.types.anything;

View file

@ -7,104 +7,4 @@ let
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest; nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest;
in in
{ {
services.xserver.videoDrivers = [
"nvidia"
"amdgpu"
];
nixpkgs.config = {
nvidia.acceptLicense = true;
allowUnfree = true;
};
# Kernel parameters for better Wayland and Hyprland integration
boot.kernelParams = [
"nvidia-drm.modeset=1" # Enable mode setting for Wayland
"nvidia.NVreg_PreserveVideoMemoryAllocations=1" # Improves resume after sleep
];
# Blacklist nouveau to avoid conflicts
boot.blacklistedKernelModules = [ "nouveau" ];
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
XDG_SESSION_TYPE = "wayland"; # Force Wayland
GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
WLR_NO_HARDWARE_CURSORS = "1"; # Fix for cursors on Wayland
NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
__GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
__GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
WLR_DRM_NO_ATOMIC = "1"; # Fix for some issues with Hyprland
NVD_BACKEND = "direct"; # Configuration for new driver
MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
};
hardware = {
nvidia = {
forceFullCompositionPipeline = true; # Prevents screen tearing
# Modesetting is required.
modesetting.enable = true;
powerManagement = {
enable = true; # Power management
finegrained = true; # More precise power consumption control
};
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:15:0:0";
};
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = true;
# Environment variables for better compatibility
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
package = nvidiaDriverChannel;
# #Fixes a glitch
# nvidiaPersistenced = true;
};
nvidia-container-toolkit.enable = true;
graphics = {
enable = true;
package = nvidiaDriverChannel;
enable32Bit = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
mesa
egl-wayland
vulkan-loader
vulkan-validation-layers
libva
];
};
};
nix.settings = {
substituters = [ "https://cuda-maintainers.cachix.org" ];
trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
environment.systemPackages = with pkgs; [
vulkan-tools
glxinfo
libva-utils # VA-API debugging tools
];
} }

8
switch
View file

@ -1,12 +1,16 @@
#!/bin/sh #!/bin/sh
nh_subcommand="os" nh_subcommand="os"
fallback_command="nixos-rebuild" fallback_command="nixos-rebuild"
hostname=""
if [ -n "$1" ]; then
hostname="#$1"
fi
if [ "$(uname -o)" = "darwin" ]; then if [ "$(uname -o)" = "darwin" ]; then
nh_subcommand="darwin" nh_subcommand="darwin"
fallback_command="nix run .#darwin-rebuild" fallback_command="nix run .#darwin-rebuild --"
fi fi
if command -v nh >/dev/null; then if command -v nh >/dev/null; then
nh $nh_subcommand switch . nh $nh_subcommand switch .
else else
$fallback_command -- switch --flake . $fallback_command switch --flake '.'"${hostname}"
fi fi

View file

@ -49,7 +49,7 @@ in
shader = "cursor-smear-black.glsl"; shader = "cursor-smear-black.glsl";
package = null; package = null;
settings = { settings = {
theme = "light:farmhouse-light,dark:ChallengerDeep"; theme = "light:catppuccin-latte,dark:catppuccin-macchiato";
font-family = "AT Name Mono"; font-family = "AT Name Mono";
adjust-cursor-thickness = 1; adjust-cursor-thickness = 1;
background-opacity = 0.9; background-opacity = 0.9;
@ -81,8 +81,6 @@ in
# use a git-specific email # use a git-specific email
git.userEmail = "git@paperclover.net"; git.userEmail = "git@paperclover.net";
jujutsu.enable = true;
ssh = { ssh = {
enable = true; enable = true;
matchBlocks = rec { matchBlocks = rec {

View file

@ -2,6 +2,7 @@ _: {
homebrew = { homebrew = {
enable = true; enable = true;
casks = [ casks = [
"eloston-chromium"
"db-browser-for-sqlite" "db-browser-for-sqlite"
]; ];
}; };

View file

@ -163,7 +163,6 @@
}; };
networking = { networking = {
hostName = host.name; # Define your hostname.
# wireless.enable = true; # Enables wireless support via wpa_supplicant. # wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {
@ -180,6 +179,8 @@
}; };
}; };
services.xserver.videoDrivers = ["nvidia" "amdgpu"]
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.