Move defaults/base to nixos-modules/system/physical.nix
This commit is contained in:
parent
24b4b04df9
commit
b4cd63afe8
8 changed files with 62 additions and 60 deletions
defaults/base
nixos-configurations
nixos-modules/system
|
@ -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
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,10 +7,11 @@
|
||||||
|
|
||||||
../../defaults/hardware/apu.nix
|
../../defaults/hardware/apu.nix
|
||||||
|
|
||||||
../../defaults/base
|
|
||||||
../../defaults/meta
|
../../defaults/meta
|
||||||
];
|
];
|
||||||
|
|
||||||
|
qois.system.physical.enable = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like fi:le locations and database versions
|
# settings for stateful data, like fi:le locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
|
|
||||||
../../defaults/hardware/asrock-z790m.nix
|
../../defaults/hardware/asrock-z790m.nix
|
||||||
|
|
||||||
../../defaults/base
|
|
||||||
../../defaults/meta
|
../../defaults/meta
|
||||||
];
|
];
|
||||||
|
|
||||||
|
qois.system.physical.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,11 @@
|
||||||
|
|
||||||
../../defaults/hardware/asrock.nix
|
../../defaults/hardware/asrock.nix
|
||||||
|
|
||||||
../../defaults/base
|
|
||||||
../../defaults/meta
|
../../defaults/meta
|
||||||
];
|
];
|
||||||
|
|
||||||
|
qois.system.physical.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../defaults/hardware/apu.nix
|
../../defaults/hardware/apu.nix
|
||||||
../../defaults/base
|
|
||||||
../../defaults/meta
|
../../defaults/meta
|
||||||
];
|
];
|
||||||
|
|
||||||
|
qois.system.physical.enable = true;
|
||||||
|
|
||||||
boot.initrd.luks.devices."systems".device =
|
boot.initrd.luks.devices."systems".device =
|
||||||
"/dev/disk/by-uuid/5718bd19-cb7a-4728-9ec4-6b2be48215fc";
|
"/dev/disk/by-uuid/5718bd19-cb7a-4728-9ec4-6b2be48215fc";
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./applications.nix
|
./applications.nix
|
||||||
./overlays.nix
|
./overlays.nix
|
||||||
|
./physical.nix
|
||||||
./security.nix
|
./security.nix
|
||||||
./unfree.nix
|
./unfree.nix
|
||||||
./virtual-machine.nix
|
./virtual-machine.nix
|
||||||
|
|
52
nixos-modules/system/physical.nix
Normal file
52
nixos-modules/system/physical.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue