machine-config/sam/configuration.nix
Chandler Swift 10bdad00d8
sam: Pin old spice-vdagent
25.11 and unstable are using spice-vdagent 0.23.0, which doesn't seem to
work for display resizing. (It's likely that it's just a config error,
but this appears to revert it for now. I'll probably try to report/fix
the bug upstream at some point now that I've identified it.)

For future reference, here's how I bisected the problem to this package:

I didn't want to have to deal with compiling the universe from source to
check each commit, so I started with the commits that nixos-unstable
once pointed to, which would have been built by Hydra and cached. I used
`npc` for this:

    git clone git@github.com:samestep/npc
    NPC_REV=main NIX_BIN=`which nix` GIT_BIN=`which git` cargo build --release
    ~/projects/npc/target/release/npc fetch  # I wasn't able to find a way around this
    ~/projects/npc/target/release/npc bisect start nixos-unstable
    ~/projects/npc/target/release/npc bisect bad nixos-unstable # currently broken
    ~/projects/npc/target/release/npc bisect good f02fddb8acef29a8b32f10a335d44828d7825b78 # formerly working

`npc` will then print out commit hashes for me to try, which I can
check out and run:

    git -C ~/projects/nixpkgs checkout b6a8526db03f735b89dd5ff348f53f752e7ddc8e
    sudo nixos-rebuild -I nixpkgs="/home/chandler/projects/nixpkgs" boot && reboot
    ~/projects/npc/target/release/npc bisect <good|bad> $(git -C ~/projects/nixpkgs rev-parse HEAD)

This process repeats until it identifies a good and bad commit:

    $ ~/projects/npc/target/release/npc bisect good $(git -C ~/projects/nixpkgs rev-parse HEAD)
    done bisecting nixos-unstable
    8913c168d1c56dc49a7718685968f38752171c3b is the first bad commit
    7df7ff7d8e00218376575f0acdcc5d66741351ee is the last good commit

Now, there's still a pretty big gap here, so I'll want to do some
further bisection!

    [chandler@sam:~/projects/nixpkgs]$ git rev-list --count 7df7ff7d..8913c168
    3099

    [chandler@sam:~/projects/nixpkgs]$ git diff --shortstat 7df7ff7d..8913c168
     3716 files changed, 45544 insertions(+), 38260 deletions(-)

Now I can do a regular `git bisect`:

    $ git -C ~/projects/nixpkgs bisect start
    $ git -C ~/projects/nixpkgs bisect good 7df7ff7d8e00218376575f0acdcc5d66741351ee
    $ git -C ~/projects/nixpkgs bisect bad 8913c168d1c56dc49a7718685968f38752171c3b
    $ # …
    $ git -C ~/projects/nixpkgs bisect bad
    1491cf86eb405b21e518f1a94763524de36ee661 is the first bad commit
    commit 1491cf86eb405b21e518f1a94763524de36ee661 (HEAD)
    Author: R. RyanTM <ryantm-bot@ryantm.com>
    Date:   Tue Sep 23 12:31:00 2025 +0000

        spice-vdagent: 0.22.1 -> 0.23.0

     pkgs/by-name/sp/spice-vdagent/package.nix | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)

For this, I removed basically all packages, so I wouldn't have to
rebuild e.g. chromium from source! I did end up rebuilding the kernel
once, which took a while; most of the bisect steps didn't actually make
any changes so the whole process was pretty fast.
2026-02-03 09:52:58 -06:00

257 lines
6.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz}/nixos")
];
# https://discourse.nixos.org/t/github-strategies-for-configuration-nix/1983/14
nix.nixPath = [
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
"nixos-config=/home/chandler/projects/machine-config/${config.networking.hostName}/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
];
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
nixpkgs.overlays = [
(final: prev: {
spice-vdagent = prev.spice-vdagent.overrideAttrs ( old: rec {
version = "0.22.1";
src = prev.fetchurl {
url = "https://www.spice-space.org/download/releases/spice-vdagent-${version}.tar.bz2";
hash = "sha256-k7DRWspHYsx9N5sXmnEBFJ267WK3IRL/+ys+kLEWh6A=";
};
});
})
];
networking.hostName = "sam"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
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";
};
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
security.sudo.wheelNeedsPassword = false;
users.groups.users.gid = 100;
users.users.chandler = {
uid = 1000;
isNormalUser = true;
description = "Chandler Swift";
extraGroups = [ "networkmanager" "wheel" "docker"];
};
home-manager.users.chandler = { pkgs, ... }: {
home.packages = with pkgs; [
# applications
gimp3
inkscape
kdePackages.kate
libreoffice-qt
# command line applications
(azure-cli.withExtensions [
# azure-cli.extensions.automation
azure-cli.extensions.azure-devops
# azure-cli.extensions.bastion
# azure-cli.extensions.fleet
# azure-cli.extensions.interactive
# azure-cli.extensions.log-analytics
azure-cli.extensions.resource-graph
# azure-cli.extensions.serial-console
# azure-cli.extensions.ssh
])
iperf
units
# command line utilities
alsa-utils
dig
file
ffmpeg
git-absorb
gh
hyperfine
imagemagick
jujutsu
killall
kubectl
# From https://github.com/NixOS/nixpkgs/pull/370555
# I don't expect this to be backported, so this should be removed with 25.11
(import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/a5ea75e611fb5bf6898d7d72401f6cb2aacf30f0.tar.gz") {}).openconnect
pv
ripgrep
unzip
wl-clipboard
# ✨ AI ✨
ollama
# compilers/language utils
cargo
rustc
clang
go
go-tools
gopls
];
programs.bash = {
enable = true;
historyControl = [ "ignoredups" "ignorespace" ];
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userName = "Chandler Swift";
lfs.enable = true;
# TODO: delta or diff-so-fancy or difftastic
extraConfig = {
help.autoCorrect = "prompt";
init.defaultBranch = "main";
diff.wsErrorHighlight = "all";
pull.ff = "only";
url."ssh://git@github.com/ChandlerSwift/".insteadOf = "gh:";
url."ssh://forgejo@bert/chandlerswift/".insteadOf = "forgejo:";
push.autoSetupRemote = true;
rebase.autosquash = true;
rebase.autostash = true;
fetch.parallel = 0; # "some reasonable default"
fetch.prune = true;
merge.conflictstyle = "diff3";
};
ignores = [
"*.kate-swp"
"*.swp"
"*~"
"\\#*\\#"
"venv"
".direnv"
];
includes = [
{
condition = "gitdir:/home/chandler/work/";
contents.user.email = "chandler.swift@pearson.com";
}
{
condition = "gitdir:/home/chandler/projects/";
contents.user.email = "chandler+pearson@chandlerswift.com";
}
{
condition = "gitdir:/home/chandler/work/github-vue/";
contents.core.sshCommand = "ssh -i ~/.ssh/github-vue";
}
{
condition = "gitdir:/home/chandler/projects/machine-config/";
contents.core.sshCommand = "ssh -i ~/.ssh/machine-config-deploy-key";
}
];
hooks = {
pre-commit = ../git-pre-commit-hook;
};
signing.signByDefault = true;
signing.key = null; # "let GnuPG decide what signing key to use depending on commit's author"
};
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
includes = [
"config.d/*"
];
};
programs.firefox.enable = true;
programs.chromium = {
enable = true;
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin
];
};
programs.atuin = {
enable = true;
flags = [
"--disable-up-arrow"
];
};
home.stateVersion = "25.05";
};
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "chandler";
virtualisation.docker.enable = true;
environment.systemPackages = with pkgs; [
git
];
# 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;
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}