Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 1 | # 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 Singer | 3e94068 | 2022-06-05 09:40:27 +0200 | [diff] [blame] | 11 | system.stateVersion = "22.05"; |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 12 | |
| 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 Singer | 7a474a5 | 2021-09-03 22:44:22 +0200 | [diff] [blame] | 19 | 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 Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 30 | |
| 31 | boot = { |
Felix Singer | 46e109f | 2021-09-09 21:28:39 +0200 | [diff] [blame] | 32 | kernelParams = [ |
| 33 | "console=ttyS0,115200" |
| 34 | "console=tty0" |
| 35 | "iomem=relaxed" |
Felix Singer | eb4edc3 | 2021-12-25 11:18:11 +0100 | [diff] [blame] | 36 | "intel-spi.writeable=1" |
Felix Singer | 46e109f | 2021-09-09 21:28:39 +0200 | [diff] [blame] | 37 | ]; |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 38 | # 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 Singer | 3a5e6f5 | 2022-02-19 17:15:31 +0100 | [diff] [blame] | 96 | extraGroups = [ "users" "wheel" "networkmanager" "uucp" "flashrom" ]; |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 97 | initialHashedPassword = ""; |
| 98 | }; |
| 99 | }; |
| 100 | }; |
| 101 | |
Felix Singer | 3a5e6f5 | 2022-02-19 17:15:31 +0100 | [diff] [blame] | 102 | programs.flashrom.enable = true; |
| 103 | |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 104 | 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 Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 121 | 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 Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 132 | intel-gpu-tools |
| 133 | inxi |
| 134 | iotools |
| 135 | jfsutils |
| 136 | jq |
| 137 | mdadm |
| 138 | minicom |
| 139 | mkpasswd |
| 140 | ms-sys |
| 141 | msr-tools |
Felix Singer | 9758ef9 | 2021-12-25 11:33:24 +0100 | [diff] [blame] | 142 | mtdutils |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 143 | neovim |
| 144 | nixos-install-tools |
| 145 | ntfsprogs |
Felix Singer | ae90f2e | 2021-09-30 15:24:20 +0200 | [diff] [blame] | 146 | nvme-cli |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 147 | 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 Singer | 5e44322 | 2021-09-13 22:46:23 +0200 | [diff] [blame] | 165 | uefitool |
| 166 | uefitoolPackages.old-engine |
Felix Singer | f9948a4 | 2021-02-01 13:46:50 +0100 | [diff] [blame] | 167 | unzip |
| 168 | upterm |
| 169 | usbutils |
| 170 | wget |
| 171 | xfsprogs.bin |
| 172 | zfs |
| 173 | zip |
| 174 | zstd |
| 175 | ]; |
| 176 | } |