more cleanup

This commit is contained in:
mjallen18
2025-08-21 20:05:58 -05:00
parent 2601629e47
commit 1f9af9618f
11 changed files with 365 additions and 219 deletions

View File

@@ -3,14 +3,9 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
lib,
pkgs,
namespace,
...
}:
let
kernelBundle = pkgs.linuxAndFirmware.latest;
in
{
imports = [
./adguard.nix
@@ -20,7 +15,13 @@ in
];
${namespace} = {
hardware.disko.enable = true;
hardware = {
disko.enable = true;
raspberry-pi = {
enable = true;
variant = "4";
};
};
user = {
name = "matt";
password = "BogieDudie1";
@@ -51,50 +52,9 @@ in
};
};
# Configure nixpkgs
nixpkgs = {
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;
})
];
};
hardware.i2c.enable = true;
systemd.services.btattach = {
before = [ "bluetooth.service" ];
after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000";
};
};
environment = {
systemPackages = with pkgs; [
i2c-tools
libraspberrypi
raspberrypi-eeprom
raspberrypifw
raspberrypiWirelessFirmware
raspberrypi-armstubs
];
};
# Root user configuration - explicit to avoid conflicts with home-manager
users.users.root = {
isSystemUser = true;
isNormalUser = false;
shell = pkgs.zsh;
};
programs = {
kdeconnect.enable = false;
};
}

View File

@@ -3,15 +3,9 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
lib,
pkgs,
namespace,
...
}:
let
kernelBundle = pkgs.linuxAndFirmware.latest;
in
{
imports = [
./boot.nix
@@ -21,7 +15,13 @@ in
];
${namespace} = {
hardware.disko.enable = true;
hardware = {
disko.enable = true;
raspberry-pi = {
enable = true;
variant = "5";
};
};
desktop.hyprland.enable = false;
user = {
name = "matt";
@@ -46,63 +46,4 @@ in
};
};
};
# Configure nixpkgs
nixpkgs = {
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.raspberry-pi;
in
[
"raspberry-pi-${cfg.variant}"
cfg.bootloader
config.boot.kernelPackages.kernel.version
];
systemd.services.btattach = {
before = [ "bluetooth.service" ];
after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000";
};
};
environment = {
systemPackages = with pkgs; [
erofs-utils
fex
libraspberrypi
raspberrypi-eeprom
raspberrypifw
raspberrypiWirelessFirmware
raspberrypi-armstubs
squashfuse
squashfsTools
];
};
hardware.graphics.enable32Bit = lib.mkForce false;
# Root user configuration
users.users.root.shell = pkgs.zsh;
programs = {
kdeconnect.enable = false;
};
zramSwap.enable = true;
}

View File

@@ -5,7 +5,6 @@
{
config,
pkgs,
lib,
namespace,
...
}:
@@ -32,6 +31,15 @@
${namespace} = {
bootloader.lanzaboote.enable = true;
desktop.cosmic.enable = false;
development = {
enable = true;
includeLanguages = [
"python"
"c"
];
includeContainers = true;
};
monitoring.enable = true;
hardware.nvidia = {
enable = true;
enableBeta = true;
@@ -126,34 +134,25 @@
systemPackages = with pkgs; [
attic-client
bcachefs-tools
binutils
cryptsetup
clevis
cmake
deconz
duperemove
efibootmgr
ffmpeg
gcc
glances
ipset
jq
llama-cpp
ninja
# inputs.nas-nixai.packages.x86_64-linux.nixai
networkmanagerapplet
nmon
nut
packagekit
pass
protonmail-bridge
protonvpn-cli
python3
python3Packages.llama-cpp-python
qrencode
rcon
sbctl
speedtest-cli
tigervnc
tpm2-tools
tpm2-tss
@@ -163,8 +162,6 @@
# Configure programs
programs = {
virt-manager.enable = true;
nix-ld.enable = true;
screen.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
@@ -213,42 +210,6 @@
'';
};
# Virtualisation
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
autoPrune.enable = true;
defaultNetwork.settings = {
dns_enabled = true;
};
};
libvirtd.enable = true;
};
# Enable nix flakes and nix-command tools
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
warn-dirty = lib.mkForce false;
experimental-features = lib.mkForce [
"nix-command"
"flakes"
];
trusted-users = [ "@wheel" ];
};
# Garbage collect automatically every week
gc.automatic = lib.mkDefault true;
gc.options = lib.mkDefault "--delete-older-than 30d";
optimise.automatic = lib.mkDefault true;
};
# Additional virtualization beyond what's in development module
virtualisation.libvirtd.enable = true;
}

View File

@@ -1,5 +1,4 @@
{
lib,
namespace,
...
}:
@@ -49,28 +48,4 @@
};
};
# Enable nix flakes and nix-command tools
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
warn-dirty = lib.mkForce false;
experimental-features = lib.mkForce [
"nix-command"
"flakes"
];
trusted-users = [ "@wheel" ];
};
# Garbage collect automatically every week
gc.automatic = lib.mkDefault true;
gc.options = lib.mkDefault "--delete-older-than 30d";
optimise.automatic = lib.mkDefault true;
};
}