2021-02-01 13:46:50 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
{ config, options, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
|
|
|
<nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix>
|
|
|
|
];
|
|
|
|
|
2023-12-08 10:06:20 +01:00
|
|
|
system.stateVersion = "23.11";
|
2021-02-01 13:46:50 +01:00
|
|
|
|
|
|
|
isoImage = {
|
|
|
|
makeEfiBootable = true;
|
|
|
|
makeUsbBootable = true;
|
|
|
|
isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
|
|
|
|
};
|
|
|
|
|
2021-09-03 22:44:22 +02:00
|
|
|
environment = {
|
|
|
|
variables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
VISUAL = "nvim";
|
|
|
|
# Tell the Nix evaluator to garbage collect more aggressively.
|
|
|
|
# This is desirable in memory-constrained environments that don't
|
|
|
|
# (yet) have swap set up.
|
|
|
|
GC_INITIAL_HEAP_SIZE = "1M";
|
|
|
|
};
|
|
|
|
shellAliases.vim = "nvim";
|
|
|
|
};
|
2021-02-01 13:46:50 +01:00
|
|
|
|
|
|
|
boot = {
|
2021-09-09 21:28:39 +02:00
|
|
|
kernelParams = [
|
|
|
|
"console=ttyS0,115200"
|
|
|
|
"console=tty0"
|
|
|
|
"iomem=relaxed"
|
2023-10-16 23:38:52 +02:00
|
|
|
"spi_intel.writeable=1"
|
2021-09-09 21:28:39 +02:00
|
|
|
];
|
2021-02-01 13:46:50 +01:00
|
|
|
# pkgs.linuxPackages == lts
|
|
|
|
# pkgs.linuxPackages_latest == stable
|
|
|
|
kernelPackages = pkgs.linuxPackages;
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
acpi_call
|
|
|
|
chipsec
|
|
|
|
zfs
|
|
|
|
];
|
|
|
|
# Make programs more likely to work in low memory
|
|
|
|
# environments. The kernel's overcommit heustistics bite us
|
|
|
|
# fairly often, preventing processes from forking even if
|
|
|
|
# there is plenty of free memory.
|
|
|
|
kernel.sysctl."vm.overcommit_memory" = "1";
|
|
|
|
loader.grub.memtest86.enable = true;
|
|
|
|
postBootCommands = ''
|
|
|
|
mkdir -p /mnt
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
hardware = {
|
|
|
|
cpu.intel.updateMicrocode = true;
|
|
|
|
cpu.amd.updateMicrocode = true;
|
|
|
|
enableAllFirmware = true;
|
|
|
|
bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
fwupd.enable = true;
|
|
|
|
udev.packages = with pkgs; [
|
|
|
|
rfkill_udev
|
|
|
|
];
|
|
|
|
openssh = {
|
|
|
|
enable = true;
|
2023-10-16 23:38:52 +02:00
|
|
|
settings.PermitRootLogin = "yes";
|
2021-02-01 13:46:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "devsystem";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
|
|
users = {
|
|
|
|
groups.user = {};
|
|
|
|
users = {
|
|
|
|
root.initialHashedPassword = "";
|
|
|
|
user = {
|
|
|
|
isNormalUser = true;
|
|
|
|
group = "user";
|
2022-02-19 17:15:31 +01:00
|
|
|
extraGroups = [ "users" "wheel" "networkmanager" "uucp" "flashrom" ];
|
2021-02-01 13:46:50 +01:00
|
|
|
initialHashedPassword = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-19 17:15:31 +01:00
|
|
|
programs.flashrom.enable = true;
|
|
|
|
|
2021-02-01 13:46:50 +01:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
acpica-tools
|
|
|
|
btrfs-progs
|
|
|
|
bzip2
|
|
|
|
ccrypt
|
|
|
|
chipsec
|
|
|
|
coreboot-utils
|
|
|
|
cryptsetup
|
|
|
|
curl
|
|
|
|
ddrescue
|
2022-07-27 02:03:20 +02:00
|
|
|
devmem2
|
2021-02-01 13:46:50 +01:00
|
|
|
dmidecode
|
|
|
|
dosfstools
|
|
|
|
e2fsprogs
|
|
|
|
efibootmgr
|
|
|
|
efivar
|
|
|
|
exfat
|
|
|
|
f2fs-tools
|
|
|
|
fuse
|
|
|
|
fuse3
|
|
|
|
fwts
|
|
|
|
gptfdisk
|
|
|
|
gitAndTools.gitFull
|
|
|
|
gitAndTools.tig
|
|
|
|
gzip
|
|
|
|
hdparm
|
|
|
|
hexdump
|
|
|
|
htop
|
|
|
|
i2c-tools
|
|
|
|
intel-gpu-tools
|
|
|
|
inxi
|
|
|
|
iotools
|
|
|
|
jfsutils
|
|
|
|
jq
|
|
|
|
mdadm
|
|
|
|
minicom
|
|
|
|
mkpasswd
|
|
|
|
ms-sys
|
|
|
|
msr-tools
|
2021-12-25 11:33:24 +01:00
|
|
|
mtdutils
|
2021-02-01 13:46:50 +01:00
|
|
|
neovim
|
|
|
|
nixos-install-tools
|
|
|
|
ntfsprogs
|
2021-09-30 15:24:20 +02:00
|
|
|
nvme-cli
|
2021-02-01 13:46:50 +01:00
|
|
|
openssl
|
|
|
|
p7zip
|
|
|
|
pacman
|
|
|
|
parted
|
2022-07-27 02:03:20 +02:00
|
|
|
pcimem
|
2021-02-01 13:46:50 +01:00
|
|
|
pciutils
|
|
|
|
phoronix-test-suite
|
|
|
|
powertop
|
|
|
|
psmisc
|
|
|
|
python3Full
|
|
|
|
rsync
|
|
|
|
screen
|
|
|
|
sdparm
|
|
|
|
smartmontools
|
|
|
|
socat
|
|
|
|
sshfs-fuse
|
|
|
|
testdisk
|
|
|
|
tmate
|
|
|
|
tmux
|
2021-09-13 22:46:23 +02:00
|
|
|
uefitool
|
|
|
|
uefitoolPackages.old-engine
|
2021-02-01 13:46:50 +01:00
|
|
|
unzip
|
|
|
|
upterm
|
|
|
|
usbutils
|
|
|
|
wget
|
|
|
|
zfs
|
|
|
|
zip
|
|
|
|
zstd
|
|
|
|
];
|
|
|
|
}
|