modules/nixos/system: add headless and minimal modules
This commit is contained in:
parent
2960bf9989
commit
91d76c8c83
2 changed files with 39 additions and 0 deletions
21
modules/nixos/system/headless.nix
Normal file
21
modules/nixos/system/headless.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/profiles/headless.nix
|
||||||
|
|
||||||
|
systemd.services = {
|
||||||
|
"serial-getty@ttyS0".enable = false;
|
||||||
|
"serial-getty@hvc0".enable = false;
|
||||||
|
"getty@tty1".enable = false;
|
||||||
|
"autovt@".enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"panic=1"
|
||||||
|
"boot.panic_on_fail"
|
||||||
|
"vga=0x317"
|
||||||
|
"nomodeset"
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.enableEmergencyMode = false;
|
||||||
|
}
|
||||||
18
modules/nixos/system/minimal.nix
Normal file
18
modules/nixos/system/minimal.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# see modules/common/debloat.nix
|
||||||
|
|
||||||
|
documentation = {
|
||||||
|
enable = false;
|
||||||
|
man.enable = false;
|
||||||
|
nixos.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
autostart.enable = false;
|
||||||
|
icons.enable = false;
|
||||||
|
mime.enable = false;
|
||||||
|
sounds.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue