Move defaults/base to nixos-modules/system/physical.nix

This commit is contained in:
Fabian Hauser 2025-03-21 20:19:29 +02:00
parent 24b4b04df9
commit b4cd63afe8
8 changed files with 62 additions and 60 deletions

View file

@ -1,32 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages =
with pkgs;
[
pciutils
dmidecode
smartmontools
iw
efibootmgr
efitools
efivar
pwgen
powertop
lm_sensors
]
++ [
# Filesystem & Disk Utilities
hdparm
smartmontools
]
++ [
# Networking Utilities
tcpdump
];
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./applications.nix
];
# System Services
services.fwupd.enable = true;
services.smartd = {
enable = true;
notifications.mail = {
enable = true;
mailer = "${pkgs.msmtp}/bin/sendmail";
sender = "system@qo.is";
recipient = "sysadmin@qo.is";
};
};
}

View file

@ -7,10 +7,11 @@
../../defaults/hardware/apu.nix
../../defaults/base
../../defaults/meta
];
qois.system.physical.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like fi:le locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -11,10 +11,11 @@
../../defaults/hardware/asrock-z790m.nix
../../defaults/base
../../defaults/meta
];
qois.system.physical.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";

View file

@ -12,10 +12,11 @@
../../defaults/hardware/asrock.nix
../../defaults/base
../../defaults/meta
];
qois.system.physical.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";

View file

@ -7,10 +7,12 @@
{
imports = [
../../defaults/hardware/apu.nix
../../defaults/base
../../defaults/meta
];
qois.system.physical.enable = true;
boot.initrd.luks.devices."systems".device =
"/dev/disk/by-uuid/5718bd19-cb7a-4728-9ec4-6b2be48215fc";

View file

@ -9,6 +9,7 @@
imports = [
./applications.nix
./overlays.nix
./physical.nix
./security.nix
./unfree.nix
./virtual-machine.nix

View file

@ -0,0 +1,52 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.qois.system.physical;
in
with lib;
{
options.qois.system.physical.enable = mkEnableOption "Enable qois physical system configuration";
config = lib.mkIf cfg.enable {
environment.systemPackages =
with pkgs;
[
pciutils
dmidecode
smartmontools
iw
efibootmgr
efitools
efivar
pwgen
powertop
lm_sensors
]
++ [
# Filesystem & Disk Utilities
hdparm
smartmontools
]
++ [
# Networking Utilities
tcpdump
];
# System Services
services.fwupd.enable = true;
services.smartd = {
enable = true;
notifications.mail = {
enable = true;
mailer = "${pkgs.msmtp}/bin/sendmail";
sender = "system@qo.is";
recipient = "sysadmin@qo.is";
};
};
};
}