From 4b8070da8834c259aba92a984feb50385436460e Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:30:09 +0400 Subject: [PATCH] make switch-to-configuration-ng module --- modules/shell/nix/default.nix | 1 + modules/shell/nix/switch-to-configuration-ng.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 modules/shell/nix/switch-to-configuration-ng.nix diff --git a/modules/shell/nix/default.nix b/modules/shell/nix/default.nix index 4286ab9f..d10ab61c 100644 --- a/modules/shell/nix/default.nix +++ b/modules/shell/nix/default.nix @@ -2,5 +2,6 @@ imports = [ ./search.nix ./optimization.nix + ./switch-to-configuration-ng.nix ]; } diff --git a/modules/shell/nix/switch-to-configuration-ng.nix b/modules/shell/nix/switch-to-configuration-ng.nix new file mode 100644 index 00000000..ed5da314 --- /dev/null +++ b/modules/shell/nix/switch-to-configuration-ng.nix @@ -0,0 +1,15 @@ +{ inputs, options, config, lib, ...}: +let + cfg = config.modules.shell.nix.switch-to-configuration-ng; +in { + options.modules.shell.nix.switch-configuration-ng = { + enable = lib.mkEnableOption false; + }; + + config = lib.mkIf cfg.enable { + system.switch = { + enable = false; + enableNg = true; + }; + }; +}