This commit is contained in:
mjallen18
2025-05-09 14:42:56 -05:00
parent df6701a609
commit 2ba6a6e0ba
5 changed files with 96 additions and 141 deletions

View File

@@ -15,16 +15,14 @@ let
in
{
imports = [
# ./boot.nix
./boot.nix
./hardware-configuration.nix
./impermanence.nix
./bootconfig.nix
# ./sops.nix
# ../default.nix
./networking.nix
./sops.nix
];
networking.networkmanager.enable = true;
programs.zsh.enable = true;
# raspberry-pi-nix.board = lib.mkForce "bcm2712";
# Enable nix flakes and nix-command tools
nix = {
@@ -52,9 +50,32 @@ in
];
};
};
# Configure nixpkgs
# Enable non free
nixpkgs.config.allowUnfree = lib.mkForce true;
nixpkgs = {
# Enable non free
config.allowUnfree = lib.mkForce true;
overlays = lib.mkAfter [
(self: super: {
# This is used in (modulesPath + "/hardware/all-firmware.nix") when at least
# enableRedistributableFirmware is enabled
# I know no easier way to override this package
inherit (kernelBundle) raspberrypiWirelessFirmware;
# Some derivations want to use it as an input,
# e.g. raspberrypi-dtbs, omxplayer, sd-image-* modules
inherit (kernelBundle) raspberrypifw;
})
];
};
system.nixos.tags = let
cfg = config.boot.loader.raspberryPi;
in [
"raspberry-pi-${cfg.variant}"
cfg.bootloader
config.boot.kernelPackages.kernel.version
];
# Hardware configs
hardware = {
@@ -75,30 +96,9 @@ in
};
};
# hardware = {
# raspberry-pi."4".fkms-3d.enable = false;
# raspberry-pi."4".apply-overlays-dtmerge.enable = false;
# raspberry-pi."4".audio.enable = false;
# raspberry-pi."4".bluetooth.enable = false;
# raspberry-pi."4".dwc2.enable = false;
# raspberry-pi."4".xhci.enable = false;
# };
# Set your time zone.
time.timeZone = timezone;
networking = {
hostName = hostname;
defaultGateway.address = "10.0.1.1";
nameservers = [ "10.0.1.1" ];
firewall = {
enable = true;
allowPing = true;
};
};
systemd.services.btattach = {
before = [ "bluetooth.service" ];
after = [ "dev-ttyAMA0.device" ];