{ config, inputs, lib, modulesPath, pkgs, ... }: { imports = [ # Minimize the build to produce a smaller closure (modulesPath + "/profiles/minimal.nix") (import (inputs.mobile-nixos + "/lib/configuration.nix") { device = "oneplus-enchilada"; }) ./firmware.nix ]; krebs.build.host = config.krebs.hosts.qi; krebs.shadow.overridesFile = "${config.krebs.secret.directory}/shadow-overrides"; networking.networkmanager.enable = false; networking.wireless = { userControlled.enable = true; enable = true; # The keys are in the secrets file, as lines of NAME=KEY. secretsFile = "${config.krebs.secret.directory}/wireless.secrets"; networks = { krebs.pskRaw = "ext:krebs"; Telefon.pskRaw = "ext:Telefon"; Vodafone-A72G.auth = '' key_mgmt=SAE ieee80211w=2 psk=ext:Vodafone-A72G ''; pi.pskRaw = "ext:pi"; Pixel_1108.pskRaw = "ext:Pixel_1108"; }; }; zramSwap.enable = true; environment.systemPackages = [ pkgs.git pkgs.rsync pkgs.btrfs-progs ]; nixpkgs.config.allowUnfree = false; services.openssh.enable = true; users.mutableUsers = false; users.users = { default = { isNormalUser = true; extraGroups = [ "wheel" ]; }; }; nix = { settings = { trusted-users = [ "@wheel" "root" ]; auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; builders-use-substitutes = true; flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}''; trust-tarballs-from-git-forges = true; }; package = pkgs.nixVersions.latest; nixPath = [ "/var/src" ]; }; # at least required for rebuild switch (not for creating the image) # otherwise nixos-rebuild switch will fail with: # Failed to install bootloader # warning: error(s) occurred while switching to the new configuration boot.loader.grub.enable = false; system.build.installBootLoader = pkgs.writers.writeDash "install-bootloader" '' echo DERP >&2 ''; services.journald.extraConfig = '' Storage=volatile ''; boot.growPartition = false; boot.initrd.luks.devices.main = { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888889"; allowDiscards = true; bypassWorkqueues = true; }; fileSystems."/" = { device = "/dev/mapper/main"; fsType = "btrfs"; }; }