aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix77
1 files changed, 50 insertions, 27 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;
+ outputs =
+ inputs@{ self, nixpkgs }:
+ let
+ inherit (nixpkgs) lib;
- name = "specimen";
- systems = [ "x86_64-linux" "aarch64-linux" ];
+ name = "specimen";
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ ];
- pkgsForSystem = system: import nixpkgs { inherit system; };
+ 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/. { };
- });
+ 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 ];
- };
- });
+ devShells = forAllSystems (
+ { system, pkgs }:
+ {
+ default = pkgs.mkShell {
+ buildInputs = with pkgs; [
+ go
+ gopls
+ delve
+ go-task
+ golangci-lint
+ ];
+ };
+ }
+ );
- nixosModules.default = import ./application/module.nix;
+ nixosModules.default = import ./application/module.nix;
- nixosConfigurations.${name} = lib.nixosSystem {
- system = "aarch64-linux";
- specialArgs = inputs;
- modules = [
- ./configuration/configuration.nix
- self.nixosModules.default
- ];
+ nixosConfigurations.${name} = lib.nixosSystem {
+ system = "aarch64-linux";
+ specialArgs = inputs;
+ modules = [
+ ./configuration/configuration.nix
+ self.nixosModules.default
+ ];
+ };
};
- };
}