123 lines
2.9 KiB
Nix
123 lines
2.9 KiB
Nix
{
|
|
pkgs,
|
|
primaryUser,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
./hardware.nix
|
|
./settings.nix
|
|
./packages.nix
|
|
];
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# Speeding up builds
|
|
documentation.enable = false;
|
|
|
|
# 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 = "cyper-pi";
|
|
|
|
useDHCP = false;
|
|
dhcpcd.enable = false;
|
|
networkmanager.enable = false;
|
|
|
|
defaultGateway = "192.168.2.1";
|
|
nameservers = [
|
|
"192.168.2.2"
|
|
"8.8.8.8"
|
|
"1.1.1.1"
|
|
];
|
|
|
|
interfaces.wlan0 = {
|
|
useDHCP = true;
|
|
};
|
|
|
|
wireless = {
|
|
enable = true;
|
|
networks = {
|
|
LANFRED = {
|
|
pskRaw = "36e2b41b51328800a9582be1a05f13f796f943569610ccdb61304803b86ce3da";
|
|
};
|
|
};
|
|
};
|
|
|
|
enableIPv6 = false;
|
|
};
|
|
|
|
# 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;
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCaLHfxVylghDMYR8t4QMUpeRRqXasNABQKBEy9MmhbUXCcWiPbPMSZH8FMHON34rm2OrXP1kY/8jQxqBJDA+SqpFR2AZ4Khk9iVMaq5GHxxpn2amZUjoBa+fB29WaiE1npV5JVJV3O0ylw6GtiCnpneE6fGx2MO1vOY/7zKrUX/OK7WfwkDpeEzZgV/j/md917HrzUVeZwdeTq3WCRO8Gew6R8Xs6FRjSiGuH0dq14D4Ow5Zf1cI1jx+JfD/5vGasw8HXPu1NdxsOE+6D7/22IKqGr+S74/lAoyyD5qqk0s05lw8UY/PXBLJaNLZu9Fwx0BqTHpJEvftpmvd9wUxgR3msx9VXtKNSrqivIbDgeU+3oGzzkrGZODl7FCp4XKGmbrX85Z6lKwEGgv5jez4MLZcmT86bxB7m1wIbqSbVtfhS+GI7yPTA/kLzzFa14Im/+LTj95pb8qs2ALMwTMP1j2f9A6D3RriOFihL+68qn+YbK58KuV1R0f+CQRmlfVbk= phil@web.cyperpunk.de"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuYuGhqRC/QLoRBH91c3DG5JHlAdRLQsvde18k5ipY2 phil@cyperpunk.de"
|
|
];
|
|
};
|
|
|
|
# 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";
|
|
}
|