Files
cyper-rpi/nixos/default.nix
2026-02-11 20:52:39 +01:00

94 lines
1.8 KiB
Nix

{
config,
pkgs,
inputs,
self,
primaryUser,
...
}:
{
imports = [
./hardware.nix
./settings.nix
./packages.nix
];
nixpkgs.config.allowUnfree = true;
# Override python-lsp-server to skip tests (flaky tests cause timeout)
nixpkgs.config.packageOverrides = pkgs: {
python3 = pkgs.python3.override {
packageOverrides = self: super: {
python-lsp-server = super.python-lsp-server.overridePythonAttrs (old: {
doCheck = false;
});
};
};
};
networking = {
hostName = "rpi-4";
networkmanager.enable = true;
};
# SSH configuration
services.openssh = {
enable = true;
settings.PermitRootLogin = "no";
settings.PasswordAuthentication = true;
};
# User configuration
users.users.${primaryUser} = {
isNormalUser = true;
home = "/home/${primaryUser}";
description = "Phil";
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.fish;
};
# Shell
programs.zsh.enable = true;
programs.fish.enable = true;
# Nix settings
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
builders-use-substitutes = true;
trusted-substituters = [ "ssh://phil@192.168.2.40" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
buildMachines = [
{
hostName = "192.168.2.40";
system = "aarch64-linux";
sshUser = "phil";
maxJobs = 4;
speedFactor = 2;
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
mandatoryFeatures = [ ];
}
];
};
system.stateVersion = "25.11";
}