diff options
| author | Mel <einebeere@gmail.com> | 2024-12-29 21:41:15 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-29 21:41:15 +0100 |
| commit | 171074bb59beae6cfa45de66ea1bd26ee35a7ed7 (patch) | |
| tree | e332f44cb643c5b93e64879c39d8ecdcde82886d | |
| parent | 684c8381dd35ae41ecd8665caacb08ea3399a6a3 (diff) | |
| download | specimen-171074bb59beae6cfa45de66ea1bd26ee35a7ed7.tar.zst specimen-171074bb59beae6cfa45de66ea1bd26ee35a7ed7.zip | |
Run flake through nixfmt
Signed-off-by: Mel <einebeere@gmail.com>
| -rw-r--r-- | flake.nix | 85 |
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 + ]; + }; }; - }; } |
