dotfiles/systems/aarch64-linux/pi4/default.nix

82 lines
2.1 KiB
Nix
Raw Permalink 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,
inputs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
inputs.nixos-hardware.nixosModules.raspberry-pi-4
];
# Workaround for issue 109280
# See here: https://github.com/NixOS/nixpkgs/issues/109280#issuecomment-973636212
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // {allowMissing = true;});
})
];
age.secrets.cf_dns_kilonull.file = ../../../secrets/cf_dns_kilonull.age;
aa = {
nix.enable = true;
nix.useSelfhostedCache = true;
services.tailscale = {
enable = true;
configureClientRouting = true;
};
services.openssh.enable = true;
services.octoprint = {
enable = true;
acmeCertName = "kilonull.com";
};
services.prometheus.enable = true;
services.promtail.enable = true;
services.mosquitto.enable = true;
security.acme = {
enable = true;
domainName = "kilonull.com";
dnsCredentialsFile = config.age.secrets.cf_dns_kilonull.path;
};
suites.utils.enable = true;
};
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
networking = {
hostName = "pi4";
useDHCP = false;
defaultGateway = "192.168.113.1";
nameservers = ["192.168.113.13" "1.1.1.1"];
interfaces.end0.ipv4.addresses = [
{
address = "192.168.113.42";
prefixLength = 24;
}
];
};
security.sudo = {
wheelNeedsPassword = false;
execWheelOnly = 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 = "23.05"; # Did you read the comment?
}