blob: 93a4168524d19ac0562815abd024ff41baa07845 [file] [log] [blame]
Felix Singerf9948a42021-02-01 13:46:50 +01001# SPDX-License-Identifier: GPL-2.0-only
2
3{ config, options, pkgs, ... }:
4
5{
6 imports = [
7 <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
8 <nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix>
9 ];
10
Felix Singerb3ebf5b2022-12-01 16:40:13 +010011 system.stateVersion = "22.11";
Felix Singerf9948a42021-02-01 13:46:50 +010012
13 isoImage = {
14 makeEfiBootable = true;
15 makeUsbBootable = true;
16 isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
17 };
18
Felix Singer7a474a52021-09-03 22:44:22 +020019 environment = {
20 variables = {
21 EDITOR = "nvim";
22 VISUAL = "nvim";
23 # Tell the Nix evaluator to garbage collect more aggressively.
24 # This is desirable in memory-constrained environments that don't
25 # (yet) have swap set up.
26 GC_INITIAL_HEAP_SIZE = "1M";
27 };
28 shellAliases.vim = "nvim";
29 };
Felix Singerf9948a42021-02-01 13:46:50 +010030
31 boot = {
Felix Singer46e109f2021-09-09 21:28:39 +020032 kernelParams = [
33 "console=ttyS0,115200"
34 "console=tty0"
35 "iomem=relaxed"
Felix Singereb4edc32021-12-25 11:18:11 +010036 "intel-spi.writeable=1"
Felix Singer46e109f2021-09-09 21:28:39 +020037 ];
Felix Singerf9948a42021-02-01 13:46:50 +010038 # pkgs.linuxPackages == lts
39 # pkgs.linuxPackages_latest == stable
40 kernelPackages = pkgs.linuxPackages;
41 extraModulePackages = with config.boot.kernelPackages; [
42 acpi_call
43 chipsec
44 zfs
45 ];
46 # Make programs more likely to work in low memory
47 # environments. The kernel's overcommit heustistics bite us
48 # fairly often, preventing processes from forking even if
49 # there is plenty of free memory.
50 kernel.sysctl."vm.overcommit_memory" = "1";
51 loader.grub.memtest86.enable = true;
52 postBootCommands = ''
53 mkdir -p /mnt
54 '';
55 };
56
57 console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
58
59 nixpkgs.config.allowUnfree = true;
60 hardware = {
61 cpu.intel.updateMicrocode = true;
62 cpu.amd.updateMicrocode = true;
63 enableAllFirmware = true;
64 bluetooth = {
65 enable = true;
66 powerOnBoot = false;
67 package = pkgs.bluezFull;
68 };
69 };
70
71 services = {
72 fwupd.enable = true;
73 udev.packages = with pkgs; [
74 rfkill_udev
75 ];
76 openssh = {
77 enable = true;
78 permitRootLogin = "yes";
79 };
80 };
81
82 networking = {
83 hostName = "devsystem";
84 networkmanager.enable = true;
85 };
86
87 security.sudo.wheelNeedsPassword = false;
88
89 users = {
90 groups.user = {};
91 users = {
92 root.initialHashedPassword = "";
93 user = {
94 isNormalUser = true;
95 group = "user";
Felix Singer3a5e6f52022-02-19 17:15:31 +010096 extraGroups = [ "users" "wheel" "networkmanager" "uucp" "flashrom" ];
Felix Singerf9948a42021-02-01 13:46:50 +010097 initialHashedPassword = "";
98 };
99 };
100 };
101
Felix Singer3a5e6f52022-02-19 17:15:31 +0100102 programs.flashrom.enable = true;
103
Felix Singerf9948a42021-02-01 13:46:50 +0100104 environment.systemPackages = with pkgs; [
105 acpica-tools
106 btrfs-progs
107 bzip2
108 ccrypt
109 chipsec
110 coreboot-utils
111 cryptsetup
112 curl
113 ddrescue
Felix Singerdca85832022-07-27 02:03:20 +0200114 devmem2
Felix Singerf9948a42021-02-01 13:46:50 +0100115 dmidecode
116 dosfstools
117 e2fsprogs
118 efibootmgr
119 efivar
120 exfat
121 f2fs-tools
Felix Singerf9948a42021-02-01 13:46:50 +0100122 fuse
123 fuse3
124 fwts
125 gptfdisk
126 gitAndTools.gitFull
127 gitAndTools.tig
128 gzip
129 hdparm
130 hexdump
131 htop
132 i2c-tools
Felix Singerf9948a42021-02-01 13:46:50 +0100133 intel-gpu-tools
134 inxi
135 iotools
136 jfsutils
137 jq
138 mdadm
139 minicom
140 mkpasswd
141 ms-sys
142 msr-tools
Felix Singer9758ef92021-12-25 11:33:24 +0100143 mtdutils
Felix Singerf9948a42021-02-01 13:46:50 +0100144 neovim
145 nixos-install-tools
146 ntfsprogs
Felix Singerae90f2e2021-09-30 15:24:20 +0200147 nvme-cli
Felix Singerf9948a42021-02-01 13:46:50 +0100148 openssl
149 p7zip
150 pacman
151 parted
Felix Singerdca85832022-07-27 02:03:20 +0200152 pcimem
Felix Singerf9948a42021-02-01 13:46:50 +0100153 pciutils
154 phoronix-test-suite
155 powertop
156 psmisc
157 python3Full
158 rsync
159 screen
160 sdparm
161 smartmontools
162 socat
163 sshfs-fuse
164 testdisk
165 tmate
166 tmux
Felix Singer5e443222021-09-13 22:46:23 +0200167 uefitool
168 uefitoolPackages.old-engine
Felix Singerf9948a42021-02-01 13:46:50 +0100169 unzip
170 upterm
171 usbutils
172 wget
173 xfsprogs.bin
174 zfs
175 zip
176 zstd
177 ];
178}