diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
commit | 9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch) | |
tree | f28beec29deeea36038615a8fb98a810891940b5 /flake.nix | |
parent | 2024-03-19 (diff) |
2024-03-31
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/flake.nix b/flake.nix index f145382..018bd45 100644 --- a/flake.nix +++ b/flake.nix @@ -146,48 +146,52 @@ flake-compat.url = "github:edolstra/flake-compat/master"; }; - outputs = inputs: + outputs = + inputs: with inputs; - flake-utils.lib.eachDefaultSystem (system: { - apps.default = { - type = "app"; - program = "${self.packages.${system}.default}/bin/nixfiles"; - }; + flake-utils.lib.eachDefaultSystem (system: { + apps.default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/nixfiles"; + }; - packages = let + packages = + let buildIsoImage = name: self.nixosConfigurations.${name}.config.system.build.isoImage; - in { + in + { default = self.legacyPackages.${system}.nixfiles; iso-arm = buildIsoImage "iso-arm"; iso-x86 = buildIsoImage "iso-x86"; }; - legacyPackages = import nixpkgs { - inherit system; - overlays = [self.overlays.default]; - }; + legacyPackages = import nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + }; - devShells.default = with self.legacyPackages.${system}; - mkShell { - inherit (self.checks.${system}.preCommit) shellHook; - packages = [go-task]; - }; + devShells.default = + with self.legacyPackages.${system}; + mkShell { + inherit (self.checks.${system}.preCommit) shellHook; + packages = [ go-task ]; + }; - formatter = self.legacyPackages.${system}.alejandra; + formatter = self.legacyPackages.${system}.nixfmt; - checks = import ./checks.nix {inherit inputs system;}; - }) - // { - lib = nixpkgs.lib.extend (import ./lib); + checks = import ./checks.nix { inherit inputs system; }; + }) + // { + lib = nixpkgs.lib.extend (import ./lib); - modules.nixfiles = import ./modules/common; + modules.nixfiles = import ./modules/common; - nixosModules.nixfiles = import ./modules/nixos; - nixosConfigurations = import ./nixosConfigurations inputs; + nixosModules.nixfiles = import ./modules/nixos; + nixosConfigurations = import ./nixosConfigurations inputs; - darwinModules.nixfiles = import ./modules/darwin; - darwinConfigurations = import ./darwinConfigurations inputs; + darwinModules.nixfiles = import ./modules/darwin; + darwinConfigurations = import ./darwinConfigurations inputs; - overlays.default = final: prev: import ./overlay.nix final prev; - }; + overlays.default = final: prev: import ./overlay.nix final prev; + }; } |