getting stuff ready for flake to see
This commit is contained in:
parent
48d0d64349
commit
822bc0394e
18
flake.lock
generated
18
flake.lock
generated
@ -22,6 +22,23 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-vimtex": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1708936870,
|
||||
"narHash": "sha256-07FqXsRe0RP5f3b6osrsi5gai+bZi9ybm5JL/nnBH+4=",
|
||||
"owner": "micangl",
|
||||
"repo": "cmp-vimtex",
|
||||
"rev": "613fbfc54d9488252b0b0289d6d1d60242513558",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "micangl",
|
||||
"ref": "master",
|
||||
"repo": "cmp-vimtex",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -132,6 +149,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"NixOS-WSL": "NixOS-WSL",
|
||||
"cmp-vimtex": "cmp-vimtex",
|
||||
"homeManager": "homeManager",
|
||||
"homeManager-23-11": "homeManager-23-11",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
49
flake.nix
49
flake.nix
@ -1,28 +1,37 @@
|
||||
{
|
||||
|
||||
description = "Configuration v1";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs-23-11.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
homeManager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
homeManager-23-11 = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs-23-11";
|
||||
};
|
||||
|
||||
NixOS-WSL = {
|
||||
url = "github:nix-community/NixOS-WSL";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs-23-11.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
homeManager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, homeManager, NixOS-WSL, nixpkgs-23-11, homeManager-23-11, ...}@inputs: {
|
||||
homeManager-23-11 = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs-23-11";
|
||||
};
|
||||
|
||||
NixOS-WSL = {
|
||||
url = "github:nix-community/NixOS-WSL";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
cmp-vimtex = {
|
||||
url = "github:micangl/cmp-vimtex/master";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, homeManager, NixOS-WSL, nixpkgs-23-11, homeManager-23-11, cmp-vimtex, ...}@inputs:
|
||||
let
|
||||
customPackageOverlay = import ./overlays/cmp-vimtex.nix { inherit cmp-vimtex; };
|
||||
in
|
||||
{
|
||||
nixosConfigurations = (
|
||||
import ./hosts/hosts.nix {
|
||||
inherit nixpkgs;
|
||||
@ -30,8 +39,10 @@
|
||||
inherit inputs;
|
||||
inherit (nixpkgs) lib;
|
||||
inherit NixOS-WSL;
|
||||
inherit nixpkgs-23-11;
|
||||
inherit homeManager-23-11;
|
||||
inherit nixpkgs-23-11;
|
||||
inherit homeManager-23-11;
|
||||
inherit cmp-vimtex;
|
||||
inherit customPackageOverlay;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -82,10 +82,17 @@
|
||||
vim-fugitive
|
||||
friendly-snippets
|
||||
luasnip
|
||||
pkgs.customVimPlugins.cmp-vimtex
|
||||
];
|
||||
extraConfig = ''
|
||||
inoremap jj <Esc>
|
||||
inoremap kk <Esc>
|
||||
|
||||
set tabstop=4
|
||||
set noexpandtab
|
||||
set list
|
||||
set listchars=eol:¬,tab:▸\,trail:·
|
||||
|
||||
lua << EOF
|
||||
|
||||
local lsp_zero = require('lsp-zero')
|
||||
@ -104,6 +111,7 @@
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'buffer'},
|
||||
{name = 'luasnip'},
|
||||
{name = 'vimtex'},
|
||||
},
|
||||
formatting = cmp_format,
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ lib, inputs, nixpkgs, nixpkgs-23-11, homeManager, homeManager-23-11, NixOS-WSL, ... }:
|
||||
{ lib, inputs, nixpkgs-23-11, homeManager, homeManager-23-11, NixOS-WSL, customPackageOverlay, ... }:
|
||||
{
|
||||
"maxos" = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit customPackageOverlay;
|
||||
};
|
||||
modules = [
|
||||
./maxos/configuration.nix
|
||||
homeManager.nixosModules.home-manager {
|
||||
@ -19,6 +22,9 @@
|
||||
|
||||
"nixosWSL" = nixpkgs-23-11.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit customPackageOverlay;
|
||||
};
|
||||
modules = [
|
||||
./nixosWSL/configuration.nix
|
||||
homeManager-23-11.nixosModules.home-manager {
|
||||
|
@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, customPackageOverlay, ... }:
|
||||
|
||||
let
|
||||
custom-fonts = import ../../fonts { inherit pkgs; };
|
||||
@ -109,6 +109,9 @@ in
|
||||
programs.zsh.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [
|
||||
customPackageOverlay.overlay
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, modulesPath, ... }:
|
||||
{ pkgs, customPackageOverlay, modulesPath, ... }:
|
||||
|
||||
let
|
||||
custom-fonts = import ../../fonts { inherit pkgs; };
|
||||
@ -34,6 +34,10 @@ in
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
nixpkgs.overlays = [
|
||||
customPackageOverlay.overlay
|
||||
];
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
|
15
overlays/cmp-vimtex.nix
Normal file
15
overlays/cmp-vimtex.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ cmp-vimtex }:
|
||||
{
|
||||
overlay = final: prev:
|
||||
let
|
||||
cmpVimtexPlugin = prev.vimUtils.buildVimPlugin {
|
||||
src = cmp-vimtex;
|
||||
name = "cmp-vimtex";
|
||||
};
|
||||
in
|
||||
{
|
||||
customVimPlugins = [
|
||||
cmpVimtexPlugin
|
||||
];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user