From 576d4d672d37e490bd5f8dfb4397909600ed68db Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 16 Nov 2023 02:16:22 +0300 Subject: 2023-11-16 --- checks.nix | 1 - darwinConfigurations/default.nix | 10 ++++------ flake.nix | 17 +++++++---------- modules/nixos/throttled.nix | 2 +- nixosConfigurations/default.nix | 10 ++++------ nixosConfigurations/test-headful/default.nix | 4 ++-- 6 files changed, 18 insertions(+), 26 deletions(-) diff --git a/checks.nix b/checks.nix index b169cb3..89df268 100644 --- a/checks.nix +++ b/checks.nix @@ -1,6 +1,5 @@ { inputs, - lib, system, }: let pkgs = inputs.self.legacyPackages.${system}; diff --git a/darwinConfigurations/default.nix b/darwinConfigurations/default.nix index 612c8b0..b8f1498 100644 --- a/darwinConfigurations/default.nix +++ b/darwinConfigurations/default.nix @@ -1,8 +1,5 @@ -{ - inputs, - lib, -}: -with lib; let +inputs: +with inputs.self.lib; let mkConfiguration = name: { modules ? [], configuration ? ./${name}, @@ -21,7 +18,8 @@ with lib; let ++ optional (configuration != null) (import configuration); specialArgs = { - inherit inputs lib this; + inherit inputs this; + inherit (inputs.self) lib; } // extraSpecialArgs; }); diff --git a/flake.nix b/flake.nix index 0a520e0..a70a934 100644 --- a/flake.nix +++ b/flake.nix @@ -249,17 +249,14 @@ }; outputs = inputs: - with inputs; let - lib = nixpkgs.lib.extend (import ./lib); - in - flake-utils.lib.eachDefaultSystem - (system: { + with inputs; + flake-utils.lib.eachDefaultSystem (system: { apps.default = { type = "app"; program = "${self.packages.${system}.default}/bin/nixfiles"; }; - packages = with lib; let + packages = let buildIsoImage = name: self.nixosConfigurations.${name}.config.system.build.isoImage; in { default = self.legacyPackages.${system}.nixfiles; @@ -278,18 +275,18 @@ formatter = self.legacyPackages.${system}.alejandra; - checks = import ./checks.nix {inherit system inputs lib;}; + checks = import ./checks.nix {inherit inputs system;}; }) // { - inherit lib; + lib = nixpkgs.lib.extend (import ./lib); modules.nixfiles = import ./modules/common; nixosModules.nixfiles = import ./modules/nixos; - nixosConfigurations = import ./nixosConfigurations {inherit inputs lib;}; + nixosConfigurations = import ./nixosConfigurations inputs; darwinModules.nixfiles = import ./modules/darwin; - darwinConfigurations = import ./darwinConfigurations {inherit inputs lib;}; + darwinConfigurations = import ./darwinConfigurations inputs; overlays.default = final: prev: import ./overlay.nix final prev; }; diff --git a/modules/nixos/throttled.nix b/modules/nixos/throttled.nix index a84fd27..eca803b 100644 --- a/modules/nixos/throttled.nix +++ b/modules/nixos/throttled.nix @@ -11,7 +11,7 @@ in { config = mkIf cfg.enable { services.throttled.enable = true; - environment.etc."throttled.conf".text = '' + environment.etc."throttled.conf".text = mkDefault '' [GENERAL] # Enable or disable the script execution Enabled: True diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix index 2fa32f9..b2e1511 100644 --- a/nixosConfigurations/default.nix +++ b/nixosConfigurations/default.nix @@ -1,8 +1,5 @@ -{ - inputs, - lib, -}: -with lib; let +inputs: +with inputs.self.lib; let mkConfiguration = name: { modules ? [], configuration ? ./${name}, @@ -21,7 +18,8 @@ with lib; let ++ optional (configuration != null) (import configuration); specialArgs = { - inherit inputs lib this; + inherit inputs this; + inherit (inputs.self) lib; } // extraSpecialArgs; }); diff --git a/nixosConfigurations/test-headful/default.nix b/nixosConfigurations/test-headful/default.nix index 25db8c7..a385a2e 100644 --- a/nixosConfigurations/test-headful/default.nix +++ b/nixosConfigurations/test-headful/default.nix @@ -1,8 +1,8 @@ {lib, ...}: with lib; { nixfiles.modules = { - dwm.enable = true; - kde.enable = false; + dwm.enable = false; + kde.enable = true; xmonad.enable = false; }; -- cgit v1.2.3