git.delta.rocks / jrsonnet / refs/commits / c653e89d0859

difftreelog

refactor drop long deprecated configs

vttkltonYaroslav Bolyukin2026-01-22parent: #fca1ee1.patch.diff
in: trunk

5 files changed

deletedmodules/meta.nixdiffbeforeafterboth
--- a/modules/meta.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ lib, ... }:
-let
-  inherit (lib.modules) mkRemovedOptionModule;
-in
-{
-  imports = [
-    (mkRemovedOptionModule [ "fleetModules" ] "replaced with imports.")
-  ];
-}
modifiedmodules/module-list.nixdiffbeforeafterboth
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -2,7 +2,6 @@
   ./assertions.nix
   ./fleetLib.nix
   ./hosts.nix
-  ./meta.nix
   ./nixos.nix
   ./nixpkgs.nix
   ./secrets.nix
modifiedmodules/nixos.nixdiffbeforeafterboth
after · modules/nixos.nix
1{2  lib,3  fleetLib,4  inputs,5  self,6  config,7  _fleetFlakeRootConfig,8  ...9}:10let11  inherit (lib.attrsets) mapAttrs;12  inherit (lib.options) mkOption;13  inherit (lib.types) deferredModule unspecified;14  inherit (lib.strings) escapeNixIdentifier;15  inherit (fleetLib.options) mkHostsOption;1617  _file = ./nixos.nix;18in19{20  options = {21    nixos = mkOption {22      description = ''23        Shared nixos configuration module for all hosts.24      '';25      type = deferredModule;26    };27    hosts = mkHostsOption (hostArgs: {28      inherit _file;29      options = {30        nixos = mkOption {31          description = ''32            Nixos configuration for the current host.33          '';34          type = deferredModule;35          apply =36            module:37            let38              modulesPath = "${config.nixpkgs.buildUsing}/nixos/modules";39            in40            config.nixpkgs.buildUsing.lib.evalModules {41              class = "nixos";42              prefix = ["fleetConfiguration" "hosts" hostArgs.config._module.args.name "nixos"];43              modules = (import "${modulesPath}/module-list.nix") ++ [44                (module // { key = "attr<host.nixos>"; })45                (config.nixos // { key = "attr<fleet.nixos>"; })46              ];47              specialArgs = {48                inherit fleetLib inputs self modulesPath;49              };50            };51        };52        nixos_unchecked = mkOption {53          type = unspecified;54        };55      };56      config = {57        nixos = let 58          inherit (hostArgs.config) system;59        in {60          _module.args = {61            nixosHosts = mapAttrs (_: value: value.nixos_unchecked.config) config.hosts;62            hosts = config.hosts;63            host = hostArgs.config;64            fleetConfiguration = config;6566            inputs' = mapAttrs (67              inputName: input:68              builtins.addErrorContext69                "while retrieving system-dependent attributes for input ${escapeNixIdentifier inputName}"70                (71                  if input._type or null == "flake" then72                    _fleetFlakeRootConfig.perInput system input73                  else74                    "input is not a flake, perhaps flake = false was added to te input declaration?"75                )76            ) inputs;77            self' = builtins.addErrorContext "while retrieving system-dependent attributes for a flake's own outputs" (78              _fleetFlakeRootConfig.perInput system self79            );80          };81          nixpkgs.hostPlatform = system;82        };83        nixos_unchecked = hostArgs.config.nixos.extendModules {84          modules = [85            {86              _module.check = false;87            }88          ];89        };90      };91    });92  };93  config.nixos.imports = import ./nixos/module-list.nix;94}
modifiedmodules/nixos/meta.nixdiffbeforeafterboth
--- a/modules/nixos/meta.nix
+++ b/modules/nixos/meta.nix
@@ -1,17 +1,4 @@
-{ lib, ... }:
-let
-  inherit (lib.modules) mkRemovedOptionModule;
-in
 {
-  imports = [
-    (mkRemovedOptionModule [ "tags" ]
-      "tags are now defined at the host level, not the nixos system level for fast filtering without evaluating unnecessary hosts."
-    )
-    (mkRemovedOptionModule [
-      "network"
-    ] "network is now defined at the host level, not the nixos system level")
-  ];
-
   # Version of environment (fleet scripts such as rollback) already installed on the host
   config = {
     environment.etc.FLEET_HOST.text = "1";
modifiedmodules/nixpkgs.nixdiffbeforeafterboth
--- a/modules/nixpkgs.nix
+++ b/modules/nixpkgs.nix
@@ -7,7 +7,6 @@
 let
   inherit (lib.options) mkOption literalExpression;
   inherit (lib.types) path;
-  inherit (lib.modules) mkRemovedOptionModule;
   inherit (fleetLib.options) mkHostsOption;
   inherit (fleetLib.types) listOfOverlay;
 
@@ -43,18 +42,9 @@
         default = config.nixpkgs.buildUsing;
         defaultText = literalExpression "config.nixpkgs.buildUsing";
       };
-      # imports = [
-      # 	(mkRemovedOptionModule ["nixpkgs" "overlays"] "this option needs to be specified at nixosModules level")
-      # ];
       config.nixos = {
         inherit _file;
         nixpkgs.overlays = config.nixpkgs.overlays;
-        imports = [
-          (mkRemovedOptionModule [
-            "nixpkgs"
-            "buildUsing"
-          ] "this option should be specified at the host level, not the nixosModules level")
-        ];
       };
     };
   };