difftreelog
refactor drop long deprecated configs
in: trunk
5 files changed
modules/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.")
- ];
-}
modules/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
modules/nixos.nixdiffbeforeafterboth--- a/modules/nixos.nix
+++ b/modules/nixos.nix
@@ -11,7 +11,6 @@
inherit (lib.attrsets) mapAttrs;
inherit (lib.options) mkOption;
inherit (lib.types) deferredModule unspecified;
- inherit (lib.modules) mkRemovedOptionModule;
inherit (lib.strings) escapeNixIdentifier;
inherit (fleetLib.options) mkHostsOption;
@@ -55,9 +54,6 @@
};
};
config = {
- # imports = [
- # (mkRemovedOptionModule ["nixosModules"] "replaced with hosts.*.nixos.imports.")
- # ];
nixos = let
inherit (hostArgs.config) system;
in {
@@ -94,8 +90,5 @@
};
});
};
- imports = [
- (mkRemovedOptionModule [ "nixosModules" ] "replaced with nixos.imports.")
- ];
config.nixos.imports = import ./nixos/module-list.nix;
}
modules/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";
modules/nixpkgs.nixdiffbeforeafterboth1{2 lib,3 fleetLib,4 config,5 ...6}:7let8 inherit (lib.options) mkOption literalExpression;9 inherit (lib.types) path;10 inherit (lib.modules) mkRemovedOptionModule;11 inherit (fleetLib.options) mkHostsOption;12 inherit (fleetLib.types) listOfOverlay;1314 _file = ./nixpkgs.lib;15in16{17 options = {18 nixpkgs = {19 buildUsing = mkOption {20 description = ''21 Default nixpkgs to use for building the systems.22 '';23 type = path;24 };25 overlays = mkOption {26 description = ''27 Package overlays to apply for all the hosts, gets propagated into28 `hosts.*.nixosModules.nixpkgs.overlays`.29 '';30 type = listOfOverlay;31 };32 };33 hosts = mkHostsOption {34 inherit _file;35 options.nixpkgs.buildUsing = mkOption {36 description = ''37 Nixpkgs to use for building the system.3839 Note that this option is defined at the host level, not the nixosModules level,40 nixosModules will be evaluated using this flake input.41 '';42 type = path;43 default = config.nixpkgs.buildUsing;44 defaultText = literalExpression "config.nixpkgs.buildUsing";45 };46 # imports = [47 # (mkRemovedOptionModule ["nixpkgs" "overlays"] "this option needs to be specified at nixosModules level")48 # ];49 config.nixos = {50 inherit _file;51 nixpkgs.overlays = config.nixpkgs.overlays;52 imports = [53 (mkRemovedOptionModule [54 "nixpkgs"55 "buildUsing"56 ] "this option should be specified at the host level, not the nixosModules level")57 ];58 };59 };60 };61}1{2 lib,3 fleetLib,4 config,5 ...6}:7let8 inherit (lib.options) mkOption literalExpression;9 inherit (lib.types) path;10 inherit (fleetLib.options) mkHostsOption;11 inherit (fleetLib.types) listOfOverlay;1213 _file = ./nixpkgs.lib;14in15{16 options = {17 nixpkgs = {18 buildUsing = mkOption {19 description = ''20 Default nixpkgs to use for building the systems.21 '';22 type = path;23 };24 overlays = mkOption {25 description = ''26 Package overlays to apply for all the hosts, gets propagated into27 `hosts.*.nixosModules.nixpkgs.overlays`.28 '';29 type = listOfOverlay;30 };31 };32 hosts = mkHostsOption {33 inherit _file;34 options.nixpkgs.buildUsing = mkOption {35 description = ''36 Nixpkgs to use for building the system.3738 Note that this option is defined at the host level, not the nixosModules level,39 nixosModules will be evaluated using this flake input.40 '';41 type = path;42 default = config.nixpkgs.buildUsing;43 defaultText = literalExpression "config.nixpkgs.buildUsing";44 };45 config.nixos = {46 inherit _file;47 nixpkgs.overlays = config.nixpkgs.overlays;48 };49 };50 };51}