From c0f591787abc4155e236d03c3d21543b523a141c Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 27 Feb 2025 19:30:15 +0300 Subject: [PATCH] i staging all over --- hosts/harmonica/configuration.nix | 18 ---------- hosts/harmonica/hardware-configuration.nix | 20 +++-------- hosts/harmonica/sd-image.nix | 39 ---------------------- 3 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 hosts/harmonica/sd-image.nix diff --git a/hosts/harmonica/configuration.nix b/hosts/harmonica/configuration.nix index dfe7fd2..ce7cdd4 100644 --- a/hosts/harmonica/configuration.nix +++ b/hosts/harmonica/configuration.nix @@ -4,8 +4,6 @@ ... }: { imports = [ - ./sd-image.nix - "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" ./hardware-configuration.nix ../../modules inputs.agenix.nixosModules.default @@ -27,22 +25,6 @@ networking.hostName = "harmonica"; - networking = { - interfaces."wlan0".useDHCP = true; - wireless = { - enable = true; - interfaces = ["wlan0"]; - networks = { - "House_Bayram" = { - psk = "PASSWORD"; - }; - "it_hurts_when_IP" = { - psk = "PASSWORD"; - }; - }; - }; - }; - # NTP time sync. services.timesyncd.enable = true; diff --git a/hosts/harmonica/hardware-configuration.nix b/hosts/harmonica/hardware-configuration.nix index 6627bca..6e22dea 100644 --- a/hosts/harmonica/hardware-configuration.nix +++ b/hosts/harmonica/hardware-configuration.nix @@ -16,24 +16,12 @@ algorithm = "zstd"; }; - sdImage = { - # bzip2 compression takes loads of time with emulation, skip it. Enable this if you're low on space. - compressImage = false; - imageName = "zero2.img"; - extraFirmwareConfig = { - # Give up VRAM for more Free System Memory - # - Disable camera which automatically reserves 128MB VRAM - start_x = 0; - # - Reduce allocation of VRAM to 16MB minimum for non-rotated (32MB for rotated) - gpu_mem = 16; - - # Configure display to 800x600 so it fits on most screens - # * See: https://elinux.org/RPi_Configuration - hdmi_group = 2; - hdmi_mode = 8; + fileSystems."/" = { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + fsType = "ext4"; }; - }; + hardware = { enableRedistributableFirmware = lib.mkForce false; diff --git a/hosts/harmonica/sd-image.nix b/hosts/harmonica/sd-image.nix deleted file mode 100644 index 1893925..0000000 --- a/hosts/harmonica/sd-image.nix +++ /dev/null @@ -1,39 +0,0 @@ -# This module extends the official sd-image.nix with the following: -# - ability to add options to the config.txt firmware -{ - config, - lib, - ... -}: { - options.sdImage = with lib; { - extraFirmwareConfig = mkOption { - type = types.attrs; - default = {}; - description = lib.mdDoc '' - Extra configuration to be added to config.txt. - ''; - }; - }; - - config = { - sdImage.populateFirmwareCommands = - lib.mkIf ((lib.length (lib.attrValues config.sdImage.extraFirmwareConfig)) > 0) - ( - let - # Convert the set into a string of lines of "key=value" pairs. - keyValueMap = name: value: name + "=" + toString value; - keyValueList = lib.mapAttrsToList keyValueMap config.sdImage.extraFirmwareConfig; - extraFirmwareConfigString = lib.concatStringsSep "\n" keyValueList; - in - lib.mkAfter - '' - config=firmware/config.txt - # The initial file has just been created without write permissions. Add them to be able to append the file. - chmod u+w $config - echo "\n# Extra configuration" >> $config - echo "${extraFirmwareConfigString}" >> $config - chmod u-w $config - '' - ); - }; -}