From 73c9e5e3388a007c017d24f9ad7cad946fcb1af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 10 Dec 2023 11:57:48 +0100 Subject: [PATCH] disable installer channel in a single place --- flake.nix | 12 +++--------- nix/installer.nix | 3 +++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 75baad2..2909642 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,7 @@ let netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") { }).netboot.${system}; kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.kexec-installer ])).config.system.build.kexecTarball; - netboot-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.netboot-installer ])).config.system.build.netboot; + netboot-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [ self.nixosModules.netboot-installer ]).config.system.build.netboot; in { netboot-nixos-unstable = netboot nixos-unstable; @@ -32,24 +32,18 @@ kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [ { system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; - system.installer.channel.enable = false; } self.nixosModules.noninteractive ]; kexec-installer-nixos-2311-noninteractive = kexec-installer nixos-2311 [ { system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; - system.installer.channel.enable = false; } self.nixosModules.noninteractive ]; - netboot-installer-nixos-unstable = netboot-installer nixos-unstable [ - { system.installer.channel.enable = false; } - ]; - netboot-installer-nixos-2311 = netboot-installer nixos-2311 [ - { system.installer.channel.enable = false; } - ]; + netboot-installer-nixos-unstable = netboot-installer nixos-unstable; + netboot-installer-nixos-2311 = netboot-installer nixos-2311; }); nixosModules = { kexec-installer = ./nix/kexec-installer/module.nix; diff --git a/nix/installer.nix b/nix/installer.nix index 33c07ed..10274f1 100644 --- a/nix/installer.nix +++ b/nix/installer.nix @@ -27,6 +27,9 @@ ./nix-settings.nix ]; + # Don't add nixpkgs to the image to save space, for our intended use case we don't need it + system.installer.channel.enable = false; + systemd.services.log-network-status = { wantedBy = [ "multi-user.target" ]; # No point in restarting this. We just need this after boot