From 530ba15140114533204619e59e293a78b0023d89 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Tue, 11 Jul 2023 22:25:07 +0530 Subject: [PATCH] refactor: move specialisation configs to separate file --- hosts/skipper/default.nix | 2 +- hosts/skipper/hardware/kernel.nix | 17 ----------------- hosts/skipper/specialisations.nix | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 hosts/skipper/specialisations.nix diff --git a/hosts/skipper/default.nix b/hosts/skipper/default.nix index d1e2f73..b534f28 100644 --- a/hosts/skipper/default.nix +++ b/hosts/skipper/default.nix @@ -1,5 +1,4 @@ { - config, lib, pkgs, ... @@ -13,6 +12,7 @@ ./rollback.nix ./secureboot.nix ./security.nix + ./specialisations.nix ./virtualisation.nix ]; diff --git a/hosts/skipper/hardware/kernel.nix b/hosts/skipper/hardware/kernel.nix index 681d55e..a62e6f4 100644 --- a/hosts/skipper/hardware/kernel.nix +++ b/hosts/skipper/hardware/kernel.nix @@ -3,22 +3,6 @@ pkgs, ... }: { - specialisation = { - xanmod = { - inheritParentConfig = true; - configuration = { - boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_latest; - system.nixos.tags = ["with-xanmod"]; - }; - }; - vanilla = { - inheritParentConfig = true; - configuration = { - boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; - system.nixos.tags = ["with-vanilla"]; - }; - }; - }; boot = { consoleLogLevel = 3; initrd = { @@ -41,6 +25,5 @@ "vm.swappiness" = 0; }; }; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; } diff --git a/hosts/skipper/specialisations.nix b/hosts/skipper/specialisations.nix new file mode 100644 index 0000000..a965039 --- /dev/null +++ b/hosts/skipper/specialisations.nix @@ -0,0 +1,22 @@ +{ + lib, + pkgs, + ... +}: { + specialisation = { + xanmod = { + inheritParentConfig = true; + configuration = { + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_latest; + system.nixos.tags = ["with-xanmod"]; + }; + }; + vanilla = { + inheritParentConfig = true; + configuration = { + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; + system.nixos.tags = ["with-vanilla"]; + }; + }; + }; +}