blob: 881c5b84e213a02eb1de6d323da21301dd77dd5b [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 Singerad310612021-12-05 01:57:19 +010011 system.stateVersion = "21.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
114 dmidecode
115 dosfstools
116 e2fsprogs
117 efibootmgr
118 efivar
119 exfat
120 f2fs-tools
Felix Singerf9948a42021-02-01 13:46:50 +0100121 fuse
122 fuse3
123 fwts
124 gptfdisk
125 gitAndTools.gitFull
126 gitAndTools.tig
127 gzip
128 hdparm
129 hexdump
130 htop
131 i2c-tools
Felix Singerf9948a42021-02-01 13:46:50 +0100132 intel-gpu-tools
133 inxi
134 iotools
135 jfsutils
136 jq
137 mdadm
138 minicom
139 mkpasswd
140 ms-sys
141 msr-tools
Felix Singer9758ef92021-12-25 11:33:24 +0100142 mtdutils
Felix Singerf9948a42021-02-01 13:46:50 +0100143 neovim
144 nixos-install-tools
145 ntfsprogs
Felix Singerae90f2e2021-09-30 15:24:20 +0200146 nvme-cli
Felix Singerf9948a42021-02-01 13:46:50 +0100147 openssl
148 p7zip
149 pacman
150 parted
151 pciutils
152 phoronix-test-suite
153 powertop
154 psmisc
155 python3Full
156 rsync
157 screen
158 sdparm
159 smartmontools
160 socat
161 sshfs-fuse
162 testdisk
163 tmate
164 tmux
Felix Singer5e443222021-09-13 22:46:23 +0200165 uefitool
166 uefitoolPackages.old-engine
Felix Singerf9948a42021-02-01 13:46:50 +0100167 unzip
168 upterm
169 usbutils
170 wget
171 xfsprogs.bin
172 zfs
173 zip
174 zstd
175 ];
176}