use nixvim module

This commit is contained in:
nyanloutre 2025-05-02 12:55:36 +02:00
parent 01730ad38b
commit 2a137869d4
3 changed files with 331 additions and 27 deletions

285
flake.lock generated
View file

@ -16,6 +16,27 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741473158,
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
"owner": "numtide",
"repo": "devshell",
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"dogetipbot-telegram": { "dogetipbot-telegram": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -38,6 +59,20 @@
} }
}, },
"flake-compat": { "flake-compat": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 69,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -53,6 +88,115 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1744743431,
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"ipmihddtemp": { "ipmihddtemp": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -74,6 +218,56 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737371634,
"narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.7",
"repo": "ixx",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743127615,
"narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "nix-darwin-24.11",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1744440957, "lastModified": 1744440957,
@ -120,6 +314,58 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1745068593,
"narHash": "sha256-YuQRMvqLVu+ghl2XzqXyVg/YevH/t3XHVCl7w+UrCH8=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "d35dc6dfcae3ff1a0c72f2d59491a7d83e5505a3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-24.11",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1745046075,
"narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=",
"owner": "NuschtOS",
"repo": "search",
"rev": "066afe8643274470f4a294442aadd988356a478f",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"dogetipbot-telegram": "dogetipbot-telegram", "dogetipbot-telegram": "dogetipbot-telegram",
@ -127,13 +373,14 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-4a3fc4cf7": "nixpkgs-4a3fc4cf7", "nixpkgs-4a3fc4cf7": "nixpkgs-4a3fc4cf7",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"simple-nixos-mailserver": "simple-nixos-mailserver" "simple-nixos-mailserver": "simple-nixos-mailserver"
} }
}, },
"simple-nixos-mailserver": { "simple-nixos-mailserver": {
"inputs": { "inputs": {
"blobs": "blobs", "blobs": "blobs",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs-unstable" "nixpkgs-unstable"
], ],
@ -155,6 +402,42 @@
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"type": "gitlab" "type": "gitlab"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1744961264,
"narHash": "sha256-aRmUh0AMwcbdjJHnytg1e5h5ECcaWtIFQa6d9gI85AI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "8d404a69efe76146368885110f29a2ca3700bee6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -11,6 +11,10 @@
nixpkgs-24_11.follows = "nixpkgs"; nixpkgs-24_11.follows = "nixpkgs";
}; };
}; };
nixvim = {
url = "github:nix-community/nixvim/nixos-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
dogetipbot-telegram = { dogetipbot-telegram = {
url = "gitlab:nyanloutre/dogetipbot-telegram/master"; url = "gitlab:nyanloutre/dogetipbot-telegram/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -28,6 +32,7 @@
nixpkgs-unstable, nixpkgs-unstable,
nixpkgs-4a3fc4cf7, nixpkgs-4a3fc4cf7,
simple-nixos-mailserver, simple-nixos-mailserver,
nixvim,
dogetipbot-telegram, dogetipbot-telegram,
ipmihddtemp, ipmihddtemp,
}@inputs: }@inputs:
@ -39,6 +44,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
nixpkgs-unstable.nixosModules.notDetected nixpkgs-unstable.nixosModules.notDetected
nixvim.nixosModules.nixvim
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
@ -69,6 +75,7 @@
modules = [ modules = [
nixpkgs-unstable.nixosModules.notDetected nixpkgs-unstable.nixosModules.notDetected
simple-nixos-mailserver.nixosModule simple-nixos-mailserver.nixosModule
nixvim.nixosModules.nixvim
dogetipbot-telegram.nixosModule dogetipbot-telegram.nixosModule
ipmihddtemp.nixosModule ipmihddtemp.nixosModule
{ {

View file

@ -4,35 +4,49 @@
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
environment.systemPackages = with pkgs; [ programs.nixvim = {
# Editeurs enable = true;
(neovim.override {
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
configure = { files = {
customRC = '' "ftplugin/nix.lua" = {
set tabstop=8 opts = {
set shiftwidth=4 tabstop = 8;
set softtabstop=0 shiftwidth = 4;
set expandtab softtabstop = 0;
set smarttab expandtab = true;
set background=dark smarttab = true;
set mouse= background = "dark";
''; mouse = "";
packages.myVimPackage = with pkgs.vimPlugins; { };
start = [ };
vim-startify };
airline plugins = {
sensible lualine.enable = true;
polyglot lsp = {
ale enable = true;
fugitive servers = {
nixd.enable = true;
ruff.enable = true;
};
};
bufferline.enable = true;
telescope.enable = true;
which-key.enable = true;
treesitter.enable = true;
cmp = {
enable = true;
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
]; ];
opt = [ ];
}; };
}; };
}) };
environment.systemPackages = with pkgs; [
# Gestionnaires de version # Gestionnaires de version
tig tig
gitAndTools.hub gitAndTools.hub