about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-05-02 03:17:48 +0300
committerAzat Bahawi <azat@bahawi.net>2024-05-02 03:17:48 +0300
commit9b3ebd974bde5c8ebe1f8c8f049f7ee2c6462655 (patch)
tree408194f6f761872df938888ebc4ce46244168618 /flake.nix
parent2024-05-01 (diff)
2024-05-02
Diffstat (limited to '')
-rw-r--r--flake.nix63
1 files changed, 51 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index dc194f5..484f94b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -133,6 +133,8 @@
   outputs =
     inputs@{ self, nixpkgs, ... }:
     let
+      lib = nixpkgs.lib.extend (import ./lib);
+
       system = "x86_64-linux";
 
       pkgs = import nixpkgs {
@@ -144,23 +146,23 @@
       };
     in
     {
-      lib = nixpkgs.lib.extend (import ./lib);
+      inherit lib;
 
-      legacyPackages.${system} = pkgs;
+      apps.${system}.default = {
+        type = "app";
+        program = self.lib.getExe self.packages.${system}.nixfiles;
+      };
 
       packages.${system} = {
         default = self.packages.${system}.nixfiles;
         inherit (self.legacyPackages.${system}) nixfiles;
 
         iso = self.nixosConfigurations.iso.config.system.build.isoImage;
-      };
 
-      apps.${system}.default = {
-        type = "app";
-        program = self.lib.getExe self.packages.${system}.nixfiles;
+        topology = self.topology.config.output;
       };
 
-      overlays = import ./overlays.nix;
+      legacyPackages.${system} = pkgs;
 
       devShells.${system}.default =
         with pkgs;
@@ -169,14 +171,51 @@
           packages = [ go-task ];
         };
 
-      nixosModules = import ./modules self.lib;
+      formatter.${system} = pkgs.nixfmt;
+
+      checks.${system} = import ./checks.nix {
+        inherit
+          inputs
+          lib
+          pkgs
+          system
+          ;
+      };
 
-      nixosConfigurations = import ./configurations inputs;
+      nixosModules = import ./modules {
+        inherit
+          inputs
+          lib
+          pkgs
+          system
+          ;
+      };
 
-      checks.${system} = import ./checks.nix inputs system pkgs;
+      nixosConfigurations = import ./configurations {
+        inherit
+          inputs
+          lib
+          pkgs
+          system
+          ;
+      };
 
-      formatter.${system} = pkgs.nixfmt;
+      overlays = import ./overlays.nix {
+        inherit
+          inputs
+          lib
+          pkgs
+          system
+          ;
+      };
 
-      topology = import ./topology.nix inputs self pkgs;
+      topology = import ./topology.nix {
+        inherit
+          inputs
+          lib
+          pkgs
+          system
+          ;
+      };
     };
 }

Consider giving Nix/NixOS a try! <3