about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-29 21:41:15 +0100
committerMel <einebeere@gmail.com>2024-12-29 21:41:15 +0100
commit171074bb59beae6cfa45de66ea1bd26ee35a7ed7 (patch)
treee332f44cb643c5b93e64879c39d8ecdcde82886d
parent684c8381dd35ae41ecd8665caacb08ea3399a6a3 (diff)
downloadspecimen-171074bb59beae6cfa45de66ea1bd26ee35a7ed7.tar.zst
specimen-171074bb59beae6cfa45de66ea1bd26ee35a7ed7.zip
Run flake through nixfmt
Signed-off-by: Mel <einebeere@gmail.com>
-rw-r--r--flake.nix85
1 files changed, 54 insertions, 31 deletions
diff --git a/flake.nix b/flake.nix
index c382f36..2b30e11 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,38 +8,61 @@
     nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
   };
 
-  outputs = inputs @ { self, nixpkgs }:
-  let
-    inherit (nixpkgs) lib;
-
-    name = "specimen";
-    systems = [ "x86_64-linux" "aarch64-linux" ];
-
-    pkgsForSystem = system: import nixpkgs { inherit system; };
-
-    forAllSystems = f: lib.genAttrs systems
-      (system: f { inherit system; pkgs = pkgsForSystem system; });
-  in
-  {
-    packages = forAllSystems ({ system, pkgs }: {
-      default = pkgs.callPackage ./application/. { };
-    });
-
-    devShells = forAllSystems ({ system, pkgs }: {
-      default = pkgs.mkShell {
-       buildInputs = with pkgs; [ go gopls delve go-task golangci-lint ];
-      };
-    });
-
-    nixosModules.default = import ./application/module.nix;
+  outputs =
+    inputs@{ self, nixpkgs }:
+    let
+      inherit (nixpkgs) lib;
 
-    nixosConfigurations.${name} = lib.nixosSystem {
-      system = "aarch64-linux";
-      specialArgs = inputs;
-      modules = [
-        ./configuration/configuration.nix
-        self.nixosModules.default
+      name = "specimen";
+      systems = [
+        "x86_64-linux"
+        "aarch64-linux"
       ];
+
+      pkgsForSystem = system: import nixpkgs { inherit system; };
+
+      forAllSystems =
+        f:
+        lib.genAttrs systems (
+          system:
+          f {
+            inherit system;
+            pkgs = pkgsForSystem system;
+          }
+        );
+    in
+    {
+      packages = forAllSystems (
+        { system, pkgs }:
+        {
+          default = pkgs.callPackage ./application/. { };
+        }
+      );
+
+      devShells = forAllSystems (
+        { system, pkgs }:
+        {
+          default = pkgs.mkShell {
+            buildInputs = with pkgs; [
+              go
+              gopls
+              delve
+              go-task
+              golangci-lint
+            ];
+          };
+        }
+      );
+
+      nixosModules.default = import ./application/module.nix;
+
+      nixosConfigurations.${name} = lib.nixosSystem {
+        system = "aarch64-linux";
+        specialArgs = inputs;
+        modules = [
+          ./configuration/configuration.nix
+          self.nixosModules.default
+        ];
+      };
     };
-  };
 }