diff --git a/nixos/hosts/kanbaru.nix b/nixos/hosts/kanbaru.nix index a5aa9ab..4d49556 100644 --- a/nixos/hosts/kanbaru.nix +++ b/nixos/hosts/kanbaru.nix @@ -9,6 +9,7 @@ pkgs, deprekages, modulesPath, + fetchFromGitHub, ... }: { @@ -45,10 +46,13 @@ # Intel+NVIDIA / prime setup. # - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; - # Set up the NVIDIA half of the GPU setup. - system.nixos.tags = ["NVIDIA" "AMDGPU"]; + # Set up the NVIDIA half of the GPU setup. + system.nixos.tags = [ + "NVIDIA" + "AMDGPU" + ]; hardware.nvidia = { modesetting.enable = true; @@ -58,31 +62,67 @@ # Enable the nvidia-settings command. nvidiaSettings = true; - # Offloading setup: use GPU when asked for by command, and not otherwise. - prime = { - sync.enable = true; + # Offloading setup: use GPU when asked for by command, and not otherwise. + prime = { + sync.enable = true; - # Specify how to find our GPUs. - amdgpuBusId = "PCI:4:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; + # Specify how to find our GPUs. + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; - # Provide a way to disable the NVIDIA GPU entirely, - # for points when traveling where we don't want to burn power. + # Provide a way to disable the NVIDIA GPU entirely, + # for points when traveling where we don't want to burn power. specialisation.lowpower.configuration = { - system.nixos.tags = lib.mkForce ["AMDGPU"]; + system.nixos.tags = lib.mkForce [ "AMDGPU" ]; - # Disable the NVIDIA GPU. - hardware.nvidiaOptimus.disable = true; + # Disable the NVIDIA GPU. + hardware.nvidiaOptimus.disable = true; - # These don't actually do anything, but they make introspecting - # the configuration a bit nicer. - hardware.nvidia.modesetting.enable = lib.mkForce false; - hardware.nvidia.prime.sync.enable = lib.mkForce false; + # These don't actually do anything, but they make introspecting + # the configuration a bit nicer. + hardware.nvidia.modesetting.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. diff --git a/nixos/packages/default.pkgs.nix b/nixos/packages/default.pkgs.nix index 5cc6544..8e33659 100644 --- a/nixos/packages/default.pkgs.nix +++ b/nixos/packages/default.pkgs.nix @@ -55,7 +55,7 @@ with pkgs; niv # Utils. - _1password + _1password-cli age agenix.agenix atool diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua index 16dee5d..34452f6 100644 --- a/wezterm/wezterm.lua +++ b/wezterm/wezterm.lua @@ -205,26 +205,19 @@ config = { -- -- Font Size Tweaks -- +font_overrides = { + miko = 16, + hinata = 16, + valere = 13, + utol = 13, + trailblazer = 12, + kanbaru = 12, +} -if (hostname == "miko") or (hostname == "hinata") then - config["font_size"] = 16 +if font_overrides[hostname] ~= nil then + config.font_size = font_overrides[hostname] 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. diff --git a/xonsh/kanbaru.xsh b/xonsh/kanbaru.xsh new file mode 100644 index 0000000..5e7e0e2 --- /dev/null +++ b/xonsh/kanbaru.xsh @@ -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")