flake: update configuration, add proper outputs and arm64 target

This commit is contained in:
Asmir A 2023-10-27 01:38:31 +02:00
parent a81f0a2041
commit 3c95acb92e
2 changed files with 36 additions and 21 deletions

5
flake.lock generated
View File

@ -10,10 +10,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixpkgs-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "type": "indirect"
"type": "github"
} }
}, },
"root": { "root": {

View File

@ -2,31 +2,47 @@
description = "A very basic flake"; description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
}: let }: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in { in {
nvim = pkgs.mkShell { packages = forAllSystems (system: let
nativeBuildInputs = [ pkgs = nixpkgsFor.${system};
pkgs.alejandra in {
pkgs.ccls nvim = import ./nvim-lsp.nix {inherit pkgs;};
pkgs.luaformatter });
pkgs.nixd
pkgs.pyright devShells = forAllSystems (system: let
pkgs.rust-analyzer pkgs = nixpkgsFor.${system};
pkgs.sumneko-lua-language-server in {
pkgs.svls default = pkgs.mkShell {
pkgs.texlab nativeBuildInputs = [
pkgs.tree-sitter pkgs.alejandra
pkgs.verible pkgs.ccls
pkgs.zls pkgs.gopls
(import ./nvim-lsp.nix {inherit pkgs;}) pkgs.luaformatter
]; pkgs.nixd
}; pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
(import ./nvim-lsp.nix {inherit pkgs;})
];
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
}; };
} }