Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake.lock: Update #47

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/flake-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ jobs:

- uses: cachix/install-nix-action@V27

- name: build stable
if: matrix.target == 'stable'
run: |
nix build -L \
--override-input nixpkgs github:NixOS/nixpkgs/nixos-24.05 \
--override-input home-manager github:nix-community/home-manager/release-24.05 \
--override-input nixvim github:nix-community/nixvim/nixos-24.05
# TODO: bring back with 24.11
# - name: build stable
# if: matrix.target == 'stable'
# run: |
# nix build -L \
# --override-input nixpkgs github:NixOS/nixpkgs/nixos-24.05 \
# --override-input home-manager github:nix-community/home-manager/release-24.05 \
# --override-input nixvim github:nix-community/nixvim/nixos-24.05

- name: build unstable
if: matrix.target != 'stable'
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
package = pkgs.callPackage ./pkgs/angular-language-server { };
};

mkLsp = import "${nixvim.outPath}/plugins/lsp/language-servers/_mk-lsp.nix";
mkLsp = args: import "${nixvim.outPath}/plugins/lsp/language-servers/_mk-lsp.nix" (args // {
package = nixpkgs.lib.mkOption {
default = args.package;
type = with nixpkgs.lib.types; nullOr package;
description = "Which package to use for ${args.name}.";
};
});

mkModules = { config, lib, pkgs }: [
./modules/nixos.nix
Expand All @@ -41,7 +47,7 @@
};

config.programs.nixvim = lib.mkMerge [
(mkLsp { inherit config lib pkgs; } (angularLsp { inherit pkgs; }))
(mkLsp (angularLsp { inherit pkgs; }))
{
# this unfortunately needs to be here as we cannot access the nixos options inside of nixvim
extraPackages = map (let
Expand Down Expand Up @@ -82,7 +88,7 @@
nixvimWithOptions = { pkgs, options ? { } } : nixvim.legacyPackages.${system}.makeNixvimWithModule {
module = { config, lib, pkgs, ... }: {
imports = [
(mkLsp { inherit config lib pkgs; } (angularLsp { inherit pkgs; }))
(mkLsp (angularLsp { inherit pkgs; }))
./modules
options
];
Expand Down
2 changes: 1 addition & 1 deletion modules/cmp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ in

luasnip = {
enable = true;
extraConfig = {
settings = {
region_check_events = "CursorHold,InsertLeave";
# those are for removing deleted snippets, also a common problem
delete_check_events = "TextChanged,InsertEnter";
Expand Down
24 changes: 14 additions & 10 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,21 @@
lastplace.enable = true;
lualine = {
enable = true;
globalstatus = true;
# https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options
sections = {
lualine_b = [ {
extraConfig.sources = [ "nvim_diagnostic" "nvim_lsp" ];
} ];
lualine_c = [ {
extraConfig.path = 1;
} ];
settings = {
options = {
globalstatus = true;
theme = "onedark";
};
# https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options
sections = {
lualine_b = [ {
sources = [ "nvim_diagnostic" "nvim_lsp" ];
} ];
lualine_c = [ {
path = 1;
} ];
};
};
theme = "onedark";
};
nvim-autopairs.enable = true; # brackets, html, ...
nvim-colorizer.enable = true;
Expand Down