disko
disko copied to clipboard
installTest fails with home manager
I am testing out a nixos config with disko. I am using the following command to run the tests.
nix build .#nixosConfiguration.<host>.config.system.build.installTest -L
where <host>
for me is adalon
.
Everything has been working fine up until I tried adding a simple home manager configuration for my user. These are the errors I see with some surrounding context if it helps.
vm-test-run-disko-nixos-disko> booted_machine # [ 4.584811] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
vm-test-run-disko-nixos-disko> booted_machine # [ 4.585497] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
vm-test-run-disko-nixos-disko> booted_machine # [ 4.585900] cfg80211: failed to load regulatory.db
vm-test-run-disko-nixos-disko> booted_machine # [ 4.523411] nix-daemon[1030]: accepted connection from pid 963, user bakerdn (trusted)
vm-test-run-disko-nixos-disko> booted_machine # [ 4.529891] nix-daemon[1082]: unexpected Nix daemon error: error: changing ownership of path '/nix/store': Invalid argument
vm-test-run-disko-nixos-disko> booted_machine # [ 4.535418] hm-activate-bakerdn[963]: error: cannot open connection to remote store 'daemon': error: reading from file: Connection reset by peer
vm-test-run-disko-nixos-disko> booted_machine # [ 4.542636] systemd[1]: home-manager-bakerdn.service: Main process exited, code=exited, status=1/FAILURE
vm-test-run-disko-nixos-disko> booted_machine # [ 4.543336] systemd[1]: home-manager-bakerdn.service: Failed with result 'exit-code'.
vm-test-run-disko-nixos-disko> booted_machine # [ 4.544773] systemd[1]: Failed to start Home Manager environment for bakerdn.
vm-test-run-disko-nixos-disko> booted_machine # [ 4.559057] systemd[1]: Finished Networking Setup.
You can see the entire config here.
I'll paste the relevant parts of the config below.
# flake.nix
nixosConfiguration.adalon = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
disko.nixosModules.default
home-manager.nixosModules.home-manager
./disko/default.nix
./hosts/adalon/configuration.nix
./users/bakerdn
];
specialArgs = {
device = "/dev/disk/by-id/nvme-WD_BLACK_SN850_1TB_204178806629";
inherit nixpkgs;
};
};
# users/bakerdn/default.nix
{config, ...}: {
nix.settings.trusted-users = ["bakerdn"];
users.users.bakerdn = {
isNormalUser = true;
initialPassword = "password";
extraGroups = [
"wheel"
"networkManager"
];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.bakerdn = import ./home.nix;
};
}
# users/bakerdn/home.nix
{config, ...}: {
imports = [
./git.nix
];
home.stateVersion = "23.11";
}
# users/bakerdn/git.nix
{...}: {
programs.git = {
enable = true;
userName = "Daniel Baker";
userEmail = "[email protected]";
extraConfig = {
status = {
short = "true";
branch = "true";
};
init = {
defaultBranch = "main";
};
};
};
}