updates for kanbaru~

This commit is contained in:
Kate 2024-11-09 12:21:37 -07:00
parent 592d2f3b31
commit dda27a3be5
4 changed files with 86 additions and 37 deletions

View file

@ -9,6 +9,7 @@
pkgs, pkgs,
deprekages, deprekages,
modulesPath, modulesPath,
fetchFromGitHub,
... ...
}: }:
{ {
@ -45,10 +46,13 @@
# Intel+NVIDIA / prime setup. # Intel+NVIDIA / prime setup.
# #
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = [ "nvidia" ];
# Set up the NVIDIA half of the GPU setup. # Set up the NVIDIA half of the GPU setup.
system.nixos.tags = ["NVIDIA" "AMDGPU"]; system.nixos.tags = [
"NVIDIA"
"AMDGPU"
];
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = true;
@ -58,31 +62,67 @@
# Enable the nvidia-settings command. # Enable the nvidia-settings command.
nvidiaSettings = true; nvidiaSettings = true;
# Offloading setup: use GPU when asked for by command, and not otherwise. # Offloading setup: use GPU when asked for by command, and not otherwise.
prime = { prime = {
sync.enable = true; sync.enable = true;
# Specify how to find our GPUs. # Specify how to find our GPUs.
amdgpuBusId = "PCI:4:0:0"; amdgpuBusId = "PCI:4:0:0";
nvidiaBusId = "PCI:1:0:0"; nvidiaBusId = "PCI:1:0:0";
}; };
}; };
# Provide a way to disable the NVIDIA GPU entirely, # Provide a way to disable the NVIDIA GPU entirely,
# for points when traveling where we don't want to burn power. # for points when traveling where we don't want to burn power.
specialisation.lowpower.configuration = { specialisation.lowpower.configuration = {
system.nixos.tags = lib.mkForce ["AMDGPU"]; system.nixos.tags = lib.mkForce [ "AMDGPU" ];
# Disable the NVIDIA GPU. # Disable the NVIDIA GPU.
hardware.nvidiaOptimus.disable = true; hardware.nvidiaOptimus.disable = true;
# These don't actually do anything, but they make introspecting # These don't actually do anything, but they make introspecting
# the configuration a bit nicer. # the configuration a bit nicer.
hardware.nvidia.modesetting.enable = lib.mkForce false; hardware.nvidia.modesetting.enable = lib.mkForce false;
hardware.nvidia.prime.sync.enable = lib.mkForce false; hardware.nvidia.prime.sync.enable = lib.mkForce false;
}; };
# Set up the asus-on-linux services for this machine.
services.asusd = {
enable = true;
enableUserService = true;
};
# Enable fingerprint reader...
services.fprintd = {
enable = false;
# ... and use a weird Goodix-ized fork of libfprintd.
package = pkgs.fprintd.override {
libfprint = pkgs.libfprint.overrideAttrs (prev: {
# Add in the additional dependencies for the Goodix fork...
buildInputs =
prev.buildInputs
++ (with pkgs; [
cmake
openssl
]);
# ... and retarget the package to the fork.
src = pkgs.fetchFromGitHub {
owner = "infinytum";
repo = "libfprint";
rev = "5e14af7f136265383ca27756455f00954eef5db1";
hash = "sha256-MFhPsTF0oLUMJ9BIRZnSHj9VRwtHJxvWv0WT5zz7vDY=";
};
# Manually null out the installCheckPhase.
installCheckPhase = "";
});
};
};
# #
# Hardware config. # Hardware config.

View file

@ -55,7 +55,7 @@ with pkgs;
niv niv
# Utils. # Utils.
_1password _1password-cli
age age
agenix.agenix agenix.agenix
atool atool

View file

@ -205,26 +205,19 @@ config = {
-- --
-- Font Size Tweaks -- Font Size Tweaks
-- --
font_overrides = {
miko = 16,
hinata = 16,
valere = 13,
utol = 13,
trailblazer = 12,
kanbaru = 12,
}
if (hostname == "miko") or (hostname == "hinata") then if font_overrides[hostname] ~= nil then
config["font_size"] = 16 config.font_size = font_overrides[hostname]
end end
if (hostname == "valere") or (hostname == "utol") then
config["font_size"] = 13
end
if (hostname == "trailblazer") then
config["font_size"] = 12
end
if hostname == "tohru" then
config["font_size"] = 17
end
if hostname == "veth" then
config["font_size"] = 32
end
-- --
-- Increase tab bar spacing. -- Increase tab bar spacing.

16
xonsh/kanbaru.xsh Normal file
View file

@ -0,0 +1,16 @@
#
# Dotfile specifics for this machine.
#
# Path
# Note: lower in the list = higher priority
PATH_ADDS = [
"/run/current-system/sw/bin"
"/run/wrappers/bin"
]
# SSH key management.
try_source("includes/add-ssh-keys")
# NixOS compatibility.
try_source("includes/nixos")